JFIF  H H (ICC_PROFILE   0 mntrRGB XYZ acsp   - desc trXYZ d gXYZ x bXYZ  rTRC  (gTRC  (bTRC  (wtpt  cprt  بV7eudakt!Q ,*RGPQNČzŬb 5666p z"c83''Mq6Gitql@90.ۚAcN|li:9蠃p/^ZnLx84v;[#$ nh'c32o8Ɛ5KAv*_?nX?pyֆ̈́#z23F0Oe> {Gu.V (C'h/o%>x1X r:(>}{ycX8b]U:dOMsVAp'Z3'3E-ybj:>jOvUw#2cl~@gFCjțbz ^:-tdfj{XTh8aUM^+dAl"(KK m1$$ XKKqržoqg V FF#pG~:]֦!!Ң:pC+ AzӬ].t`='h_/} @L\,x㌼z԰+J-v+Y['8' % X q=[4Sj~4ݢ#dʂēRL5kX؊>l:t\baBA\Q38( ө:&$ 'L#d{qH>*5;jDo ˷YmԈ*[9*5tUf%3= GUW\'AR_W4_P պ -|4RFJZv0d[ˠzJ|PU8;鯌 'VcL,κ>*eb)f,0"j1 1v՘;bJ++COz7%>NU,=z\cEVK>Ic7} .jHn;^觱GHI HVǂO:ߊ{mSV?K|@ AiAT`2j 1~K8’$ ~]=9ឦG *9EMּm5Xf9Qĸ}i D%+t+;F: v:-&h_rD|! Ә;Zl븂':C&ҀaeKkm6 uT".}J&\ hciB2B+T7t?EPþЌmAF\lc2ЊABmE,cն\QJ]d5 `O Y@8?lx#KiI&Ri1fR2f1N%_g*TӨ??N:}+לɀh٭qL,ʈBrcuBmz ̢TV^ 뙏8' ufUX3㓏>NG:/;Hp饕B1K /%iɫ VQ%:_ -1oL?Roa\i^F|W*Na)P X#y㯨z+Cح\вjirm*dWҡQbBȨi'%NEb?'[h=`OiU϶u nR}GW4fVJmiR~J|l%m'%"LW V27NsXb?_={s}ij4Ý=SNjxFV"ԎI(E)]ӝЖm[4 m`5-7Wf󪥎bZKa#Vb%KY5T$y`46̼p C7HM'l{Oi +Pw~j,S5T4(FԨ;A`*HJTPgt(6/cg5U1@Qb8Y!rBzOQKF+6v%=~XDPpWc_-:߈#c坣CW1:^Q 06Ӭq@ Dj$ UW$?9F\cSM5=2>hב\,()JBk; J#j徻W(p=oQD #UMhU*Fc ?N=nF5Ӑ12w05Z뀩4ڣ霅uC1y%nJ8Ԑ*crR 9W=H9,A׻,.ZFb QEGVNs, q';OMmbtNVqOw*֙kPѬ؈XJIӯEWok+R{%j; Yx 7&&,LԜYbw"lI(*`۹F AS- #$413)Qpڤ3RxOJ$cP]viuq {kyN.- B,@󪳪ڸAor%X0UNb9 򍕑7)*233|Rnb@q|EUý$!7&["XOy ~ƓtADhP]mG파9p=ԜZ]ӭሎOeyq !bI GU:5~FoL ST[е$]$g*w]!;m@ޠ&IUڬ{҄բ-.SmҒ` vU"oL;'5s"W)@äL1i}^Y5$+Pv0o HU @ȓsQM)?M\4Q $2;g WJ/NwFJGD: y όMfW!QUZ%azҳDK_XhM^rԝ^!d'<#ﴛO{/F?+$ Y' wg'$ljGAH7l4xѶc}I*esg~;ͤt@B2iB'9C a8fTR: %NO@ m3sv w .@濾 ,FYrT0mUW_v>>d[A6ڊx:YTLHvӺ!nSD}>[mET0_,'C]pjVᅷPDZ[-V0`>}ܟpmֻ2O6O*ݹXHSN(J /+1՟#(P*gEO#w&j6?;ڡ)+U]l\/{莄*I/9<'$'#'yt/&-\\WPL`/p9qa'e¨E] fAAEYnGtm,ϮwXT>AaN#FjŵjQFdq^<H?yJ܃2*3 T4ЧH**W;(ꭽ¾Pf=eyA4FJ6{e]JqOCf#3SJf iMM\ iT$rG8$9>2:M)Q#NKe&"E8.z<mHk?#t˒A]; G0H:f!i! j{1m}o7u;$99Ӱ\ncz:zALq޶wyKT<4X,'!Y;Ͱ6q GM~_~܂}t>(zl}:r L9 fe}.-R*<`c6oܛ=prҽGB)nQ%)s*&i΍%—Zb{m[NNkbwBw Q*dF HP iܛ; aV68j}\eIGI'͔B;yA :^bn-m#@S6ˎr ;~cmƻgU:X6G%[gc{]c4)fpsgY˅>*"1}2<175)]V5)kdkM~`΂:{4nGPTTb   뎱϶w FFᓂG8>zF_H9_rDl:ҶH5Z!Bj.yk}erb:SOT]!ǎ?n:HεZsyztn[7NZ#UQO$.J#]Cr#YX9c<'$z 9 .$$PnDSn 2u5X g\ ?|Aᬰⶵ >>bE)Cb-ruMc׺*,\)`^m ge\k.۫8گoK1gWMpU޻zI=EErz:#6--/Wm\z8מ0x tA_c?Ծc^MژIMyO>l0ċ}t7[\ʲ9̜m_a[姯rְjP\kx1'CdmvF70e+m-]a?ݝKuSMUm 8f Yb!)2Z.UD \~:ܽ8zR̪Kcbs&ߦ1$, w\gc3F$iU#<`:I4{w.2aQ$EXNo?Gm NN rE$#Jn҉!AH'zePzRog8u(tJP߁Z.pÐ͢Aռ65Xsyvm 6RW7W;|0 >OүG@ٳ<>omԼ()kZJlK,F 4)snOQ{u㌏= Ao,ծ?eKBzG 6e6 f|CU _4C[j͕M8,%emM8\ cv COwTGi _94BDf%'ns8MPc&-y"8R_j 3a+z+N 9QlDQ40E VۋrH2I_YO',:뿉WNHvﵐ0B}na*E zUbN#0e"f.Q H5"-HVn=+ # Eiy- v8=g`o[ 鼛2.D^QeB ؅qϿRC~ B+Jۍ8 4*ӖΝ1R BI\ 1[0 I9y)Y " 7]6qg\ vP  s= Ѭ֕)פE< c`ϷU9W,: ?y1hsU(T ge/룮JA]|4aZVAIeIhBI!l$3![qHnw\7R{oM/ִ>5& gwjFE dc@K:V&W/k+=Yk[ @fU5zzmFȖH,[ n-dc wd[z"g4ϘRr0`B8_; #$^Zo5KZYKj GY%s"!a[9I2TF-w#a]˒Itٮei_FpVЧ૱W3eCi7 "}HApG>h֝5i T٧- '`dX1AF$$ޙ_Z]ڷTC Uy JGO} >A"5a> ZUR -Z\9 jrWݖQRݳ*ļ]$ڵXq=/w z\II#{ӭl^;F_R쵎[ָ[gKKͰoQ )W녕іs*kuzŨQde`WU_KLE~"g r<2GyއL(-VY -Z(IU0 |\;8C mhl:̄DkYHOk|:*DY tsس |zrO;񍃌sT31=jwyШ^nZHm_G̮0W󿓹S;_$mٛIDV=f-H}U]HA*vԶ3\Wh*I#$@6x^OZC&JU 16 XD*if&BDGFYYP[KLX uX .Z hq Ghb8M#Mqt\c> aT 00=㎨ʕGQԪR,ĜI9zӦJO3Rn`C5܊@QO1N.ؔ"I\YÖĐHdL\}IP~jm$ y; :ZGZVJv =&*UF#``R`*S+p\=) ҭ9k̮Ršx0'**ԑLkɺk+zJb#:|MZ ?j$ݼ &X)$6FY6ѕ/; J*nlC*ų_ ԕ{_6:\47ڷs4RmĊ=z *ʪXT[]5Bl#a-˙bv8@H|Rwe9A%5&M%Z02TN)&&GfM 儀oŒM;=.//k~ E"a9/3y,>lj>ZXy&εYP&h gec<``]!}i'c KQulFIʓ_\T58(+cJq~ [dgmm/`Xڙhtkq ו$"c[PVY[uɜ&#몵"ȾqC"ÜȔ!<Mj8u-dx*gϫtTLdKlaWڭ\~|7u`h(w֋cL=˼=FvcGs}зUBSМ;FI;Q$8+V|[CS쮙1%YP Q% LVVK+&,cIb]Vyi ~h?yF4"5As-F ݆x55P&E:W@f;}Gy^]U ITki 1 d﫠*cNh' cؗYnsL:b?H :kM~@8#Iqɔ~:f]P*i]H'fjhxTҗ1O:^t$1]UXz&tODT>(^s&3#N_/x-䬦? ~vU-W$4'ӎvRG|jySW?u4(1 G[ِ22jʎhrmoյشgRͮ%ϟѬ9 oR  n-&F-@hgY_qN;"2 !KJ  šA^, "aG8`=14=5Mqk>U@UT :RgjrKF.O$I9'=i}._ One Hat Cyber Team
  • Your IP: 216.73.216.30
  • Server IP: 198.54.114.155
  • Server: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
  • Server Software: LiteSpeed
  • PHP Version: 8.1.33
  • Buat File | Buat Folder
View File Name : src.zip
",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};d.jQueryDetection(),o.default.fn.emulateTransitionEnd=function(t){var e=this,n=!1;return o.default(this).one(d.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||d.triggerTransitionEnd(e)}),t),this},o.default.event.special[d.TRANSITION_END]={bindType:f,delegateType:f,handle:function(t){if(o.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var c="bs.alert",h=o.default.fn.alert,g=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.default.removeData(this._element,c),this._element=null},e._getRootElement=function(t){var e=d.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=o.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=o.default.Event("close.bs.alert");return o.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(o.default(t).removeClass("show"),o.default(t).hasClass("fade")){var n=d.getTransitionDurationFromElement(t);o.default(t).one(d.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){o.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(c);i||(i=new t(this),n.data(c,i)),"close"===e&&i[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}();o.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',g._handleDismiss(new g)),o.default.fn.alert=g._jQueryInterface,o.default.fn.alert.Constructor=g,o.default.fn.alert.noConflict=function(){return o.default.fn.alert=h,g._jQueryInterface};var m="bs.button",p=o.default.fn.button,_="active",v='[data-toggle^="button"]',y='input:not([type="hidden"])',b=".btn",E=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=o.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var i=this._element.querySelector(y);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(_))t=!1;else{var a=n.querySelector(".active");a&&o.default(a).removeClass(_)}t&&("checkbox"!==i.type&&"radio"!==i.type||(i.checked=!this._element.classList.contains(_)),this.shouldAvoidTriggerChange||o.default(i).trigger("change")),i.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(_)),t&&o.default(this._element).toggleClass(_))},e.dispose=function(){o.default.removeData(this._element,m),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var i=o.default(this),a=i.data(m);a||(a=new t(this),i.data(m,a)),a.shouldAvoidTriggerChange=n,"toggle"===e&&a[e]()}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}();o.default(document).on("click.bs.button.data-api",v,(function(t){var e=t.target,n=e;if(o.default(e).hasClass("btn")||(e=o.default(e).closest(b)[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var i=e.querySelector(y);if(i&&(i.hasAttribute("disabled")||i.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||E._jQueryInterface.call(o.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",v,(function(t){var e=o.default(t.target).closest(b)[0];o.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),o.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide(N)},e.nextWhenVisible=function(){var t=o.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(D)},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(d.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(I);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)o.default(this._element).one(A,(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var i=t>n?N:D;this._slide(i,this._items[t])}},e.dispose=function(){o.default(this._element).off(".bs.carousel"),o.default.removeData(this._element,w),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=r({},k,t),d.typeCheckConfig(T,t,O),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&o.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&o.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&j[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&j[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};o.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(o.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),o.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(o.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),o.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){t.touchDeltaX=e.originalEvent.touches&&e.originalEvent.touches.length>1?0:e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),o.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n=t===N,i=t===D,o=this._getItemIndex(e),a=this._items.length-1;if((i&&0===o||n&&o===a)&&!this._config.wrap)return e;var s=(o+(t===D?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(I)),a=o.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n});return o.default(this._element).trigger(a),a},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));o.default(e).removeClass(S);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&o.default(n).addClass(S)}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(I);if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var n,i,a,s=this,l=this._element.querySelector(I),r=this._getItemIndex(l),u=e||l&&this._getItemByDirection(t,l),f=this._getItemIndex(u),c=Boolean(this._interval);if(t===N?(n="carousel-item-left",i="carousel-item-next",a="left"):(n="carousel-item-right",i="carousel-item-prev",a="right"),u&&o.default(u).hasClass(S))this._isSliding=!1;else if(!this._triggerSlideEvent(u,a).isDefaultPrevented()&&l&&u){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(u),this._activeElement=u;var h=o.default.Event(A,{relatedTarget:u,direction:a,from:r,to:f});if(o.default(this._element).hasClass("slide")){o.default(u).addClass(i),d.reflow(u),o.default(l).addClass(n),o.default(u).addClass(n);var g=d.getTransitionDurationFromElement(l);o.default(l).one(d.TRANSITION_END,(function(){o.default(u).removeClass(n+" "+i).addClass(S),o.default(l).removeClass("active "+i+" "+n),s._isSliding=!1,setTimeout((function(){return o.default(s._element).trigger(h)}),0)})).emulateTransitionEnd(g)}else o.default(l).removeClass(S),o.default(u).addClass(S),this._isSliding=!1,o.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data(w),i=r({},k,o.default(this).data());"object"==typeof e&&(i=r({},i,e));var a="string"==typeof e?e:i.slide;if(n||(n=new t(this,i),o.default(this).data(w,n)),"number"==typeof e)n.to(e);else if("string"==typeof a){if("undefined"==typeof n[a])throw new TypeError('No method named "'+a+'"');n[a]()}else i.interval&&i.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=d.getSelectorFromElement(this);if(n){var i=o.default(n)[0];if(i&&o.default(i).hasClass("carousel")){var a=r({},o.default(i).data(),o.default(this).data()),s=this.getAttribute("data-slide-to");s&&(a.interval=!1),t._jQueryInterface.call(o.default(i),a),s&&o.default(i).data(w).to(s),e.preventDefault()}}},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return k}}]),t}();o.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",P._dataApiClickHandler),o.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e0&&(this._selector=s,this._triggerArray.push(a))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){o.default(this._element).hasClass(q)?this.hide():this.show()},e.show=function(){var e,n,i=this;if(!(this._isTransitioning||o.default(this._element).hasClass(q)||(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof i._config.parent?t.getAttribute("data-parent")===i._config.parent:t.classList.contains(F)}))).length&&(e=null),e&&(n=o.default(e).not(this._selector).data(R))&&n._isTransitioning))){var a=o.default.Event("show.bs.collapse");if(o.default(this._element).trigger(a),!a.isDefaultPrevented()){e&&(t._jQueryInterface.call(o.default(e).not(this._selector),"hide"),n||o.default(e).data(R,null));var s=this._getDimension();o.default(this._element).removeClass(F).addClass(Q),this._element.style[s]=0,this._triggerArray.length&&o.default(this._triggerArray).removeClass(B).attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(s[0].toUpperCase()+s.slice(1)),r=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,(function(){o.default(i._element).removeClass(Q).addClass("collapse show"),i._element.style[s]="",i.setTransitioning(!1),o.default(i._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(r),this._element.style[s]=this._element[l]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&o.default(this._element).hasClass(q)){var e=o.default.Event("hide.bs.collapse");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",d.reflow(this._element),o.default(this._element).addClass(Q).removeClass("collapse show");var i=this._triggerArray.length;if(i>0)for(var a=0;a0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets,t._element)),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),r({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data(K);if(n||(n=new t(this,"object"==typeof e?e:null),o.default(this).data(K,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll(it)),i=0,a=n.length;i0&&s--,40===e.which&&sdocument.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(ht);var i=d.getTransitionDurationFromElement(this._dialog);o.default(this._element).off(d.TRANSITION_END),o.default(this._element).one(d.TRANSITION_END,(function(){t._element.classList.remove(ht),n||o.default(t._element).one(d.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,i)})).emulateTransitionEnd(i),this._element.focus()}},e._showElement=function(t){var e=this,n=o.default(this._element).hasClass(dt),i=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),o.default(this._dialog).hasClass("modal-dialog-scrollable")&&i?i.scrollTop=0:this._element.scrollTop=0,n&&d.reflow(this._element),o.default(this._element).addClass(ct),this._config.focus&&this._enforceFocus();var a=o.default.Event("shown.bs.modal",{relatedTarget:t}),s=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,o.default(e._element).trigger(a)};if(n){var l=d.getTransitionDurationFromElement(this._dialog);o.default(this._dialog).one(d.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},e._enforceFocus=function(){var t=this;o.default(document).off(pt).on(pt,(function(e){document!==e.target&&t._element!==e.target&&0===o.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?o.default(this._element).on(yt,(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||o.default(this._element).off(yt)},e._setResizeEvent=function(){var t=this;this._isShown?o.default(window).on(_t,(function(e){return t.handleUpdate(e)})):o.default(window).off(_t)},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){o.default(document.body).removeClass(ft),t._resetAdjustments(),t._resetScrollbar(),o.default(t._element).trigger(gt)}))},e._removeBackdrop=function(){this._backdrop&&(o.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=o.default(this._element).hasClass(dt)?dt:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),o.default(this._backdrop).appendTo(document.body),o.default(this._element).on(vt,(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&d.reflow(this._backdrop),o.default(this._backdrop).addClass(ct),!t)return;if(!n)return void t();var i=d.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(d.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){o.default(this._backdrop).removeClass(ct);var a=function(){e._removeBackdrop(),t&&t()};if(o.default(this._element).hasClass(dt)){var s=d.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Ut={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Mt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Wt=function(){function t(t,e){if("undefined"==typeof a.default)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=o.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(o.default(this.getTipElement()).hasClass(Rt))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),o.default.removeData(this.element,this.constructor.DATA_KEY),o.default(this.element).off(this.constructor.EVENT_KEY),o.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&o.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===o.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=o.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){o.default(this.element).trigger(e);var n=d.findShadowRoot(this.element),i=o.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!i)return;var s=this.getTipElement(),l=d.getUID(this.constructor.NAME);s.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&o.default(s).addClass(Lt);var r="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,u=this._getAttachment(r);this.addAttachmentClass(u);var f=this._getContainer();o.default(s).data(this.constructor.DATA_KEY,this),o.default.contains(this.element.ownerDocument.documentElement,this.tip)||o.default(s).appendTo(f),o.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new a.default(this.element,s,this._getPopperConfig(u)),o.default(s).addClass(Rt),o.default(s).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&o.default(document.body).children().on("mouseover",null,o.default.noop);var c=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,o.default(t.element).trigger(t.constructor.Event.SHOWN),e===qt&&t._leave(null,t)};if(o.default(this.tip).hasClass(Lt)){var h=d.getTransitionDurationFromElement(this.tip);o.default(this.tip).one(d.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},e.hide=function(t){var e=this,n=this.getTipElement(),i=o.default.Event(this.constructor.Event.HIDE),a=function(){e._hoverState!==xt&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),o.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(o.default(this.element).trigger(i),!i.isDefaultPrevented()){if(o.default(n).removeClass(Rt),"ontouchstart"in document.documentElement&&o.default(document.body).children().off("mouseover",null,o.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,o.default(this.tip).hasClass(Lt)){var s=d.getTransitionDurationFromElement(n);o.default(n).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(o.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),o.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=At(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?o.default(e).parent().is(t)||t.empty().append(e):t.text(o.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return r({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:d.isElement(this.config.container)?o.default(this.config.container):o.default(document).find(this.config.container)},e._getAttachment=function(t){return Bt[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)o.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n=e===Ft?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i=e===Ft?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;o.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(i,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},o.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Qt:Ft]=!0),o.default(e.getTipElement()).hasClass(Rt)||e._hoverState===xt?e._hoverState=xt:(clearTimeout(e._timeout),e._hoverState=xt,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){e._hoverState===xt&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Qt:Ft]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=qt,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){e._hoverState===qt&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=o.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==Pt.indexOf(t)&&delete e[t]})),"number"==typeof(t=r({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),d.typeCheckConfig(It,t,this.constructor.DefaultType),t.sanitize&&(t.template=At(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(jt);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(o.default(t).removeClass(Lt),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(kt),a="object"==typeof e&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new t(this,a),n.data(kt,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return Ht}},{key:"NAME",get:function(){return It}},{key:"DATA_KEY",get:function(){return kt}},{key:"Event",get:function(){return Mt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Ut}}]),t}();o.default.fn.tooltip=Wt._jQueryInterface,o.default.fn.tooltip.Constructor=Wt,o.default.fn.tooltip.noConflict=function(){return o.default.fn.tooltip=Ot,Wt._jQueryInterface};var Vt="bs.popover",zt=o.default.fn.popover,Kt=new RegExp("(^|\\s)bs-popover\\S+","g"),Xt=r({},Wt.Default,{placement:"right",trigger:"click",content:"",template:''}),Yt=r({},Wt.DefaultType,{content:"(string|element|function)"}),$t={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Jt=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,u(e,n);var a=i.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},a.setContent=function(){var t=o.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(Kt);null!==e&&e.length>0&&t.removeClass(e.join(""))},i._jQueryInterface=function(t){return this.each((function(){var e=o.default(this).data(Vt),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new i(this,n),o.default(this).data(Vt,e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},l(i,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return Xt}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return Vt}},{key:"Event",get:function(){return $t}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Yt}}]),i}(Wt);o.default.fn.popover=Jt._jQueryInterface,o.default.fn.popover.Constructor=Jt,o.default.fn.popover.noConflict=function(){return o.default.fn.popover=zt,Jt._jQueryInterface};var Gt="scrollspy",Zt="bs.scrollspy",te=o.default.fn[Gt],ee="active",ne="position",ie=".nav, .list-group",oe={offset:10,method:"auto",target:""},ae={offset:"number",method:"string",target:"(string|element)"},se=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,o.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":ne,n="auto"===this._config.method?e:this._config.method,i=n===ne?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,a=d.getSelectorFromElement(t);if(a&&(e=document.querySelector(a)),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[o.default(e)[n]().top+i,a]}return null})).filter(Boolean).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){o.default.removeData(this._element,Zt),o.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=r({},oe,"object"==typeof t&&t?t:{})).target&&d.isElement(t.target)){var e=o.default(t.target).attr("id");e||(e=d.getUID(Gt),o.default(t.target).attr("id",e)),t.target="#"+e}return d.typeCheckConfig(Gt,t,ae),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active",ge=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&o.default(this._element).hasClass(ue)||o.default(this._element).hasClass("disabled")||this._element.hasAttribute("disabled"))){var e,n,i=o.default(this._element).closest(".nav, .list-group")[0],a=d.getSelectorFromElement(this._element);if(i){var s="UL"===i.nodeName||"OL"===i.nodeName?he:ce;n=(n=o.default.makeArray(o.default(i).find(s)))[n.length-1]}var l=o.default.Event("hide.bs.tab",{relatedTarget:this._element}),r=o.default.Event("show.bs.tab",{relatedTarget:n});if(n&&o.default(n).trigger(l),o.default(this._element).trigger(r),!r.isDefaultPrevented()&&!l.isDefaultPrevented()){a&&(e=document.querySelector(a)),this._activate(this._element,i);var u=function(){var e=o.default.Event("hidden.bs.tab",{relatedTarget:t._element}),i=o.default.Event("shown.bs.tab",{relatedTarget:n});o.default(n).trigger(e),o.default(t._element).trigger(i)};e?this._activate(e,e.parentNode,u):u()}}},e.dispose=function(){o.default.removeData(this._element,le),this._element=null},e._activate=function(t,e,n){var i=this,a=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?o.default(e).children(ce):o.default(e).find(he))[0],s=n&&a&&o.default(a).hasClass(fe),l=function(){return i._transitionComplete(t,a,n)};if(a&&s){var r=d.getTransitionDurationFromElement(a);o.default(a).removeClass(de).one(d.TRANSITION_END,l).emulateTransitionEnd(r)}else l()},e._transitionComplete=function(t,e,n){if(e){o.default(e).removeClass(ue);var i=o.default(e.parentNode).find("> .dropdown-menu .active")[0];i&&o.default(i).removeClass(ue),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}o.default(t).addClass(ue),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),d.reflow(t),t.classList.contains(fe)&&t.classList.add(de);var a=t.parentNode;if(a&&"LI"===a.nodeName&&(a=a.parentNode),a&&o.default(a).hasClass("dropdown-menu")){var s=o.default(t).closest(".dropdown")[0];if(s){var l=[].slice.call(s.querySelectorAll(".dropdown-toggle"));o.default(l).addClass(ue)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(le);if(i||(i=new t(this),n.data(le,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}();o.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),ge._jQueryInterface.call(o.default(this),"show")})),o.default.fn.tab=ge._jQueryInterface,o.default.fn.tab.Constructor=ge,o.default.fn.tab.noConflict=function(){return o.default.fn.tab=re,ge._jQueryInterface};var me="bs.toast",pe=o.default.fn.toast,_e="hide",ve="show",ye="showing",be="click.dismiss.bs.toast",Ee={animation:!0,autohide:!0,delay:500},Te={animation:"boolean",autohide:"boolean",delay:"number"},we=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=o.default.Event("show.bs.toast");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove(ye),t._element.classList.add(ve),o.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove(_e),d.reflow(this._element),this._element.classList.add(ye),this._config.animation){var i=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,n).emulateTransitionEnd(i)}else n()}},e.hide=function(){if(this._element.classList.contains(ve)){var t=o.default.Event("hide.bs.toast");o.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains(ve)&&this._element.classList.remove(ve),o.default(this._element).off(be),o.default.removeData(this._element,me),this._element=null,this._config=null},e._getConfig=function(t){return t=r({},Ee,o.default(this._element).data(),"object"==typeof t&&t?t:{}),d.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;o.default(this._element).on(be,'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add(_e),o.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove(ve),this._config.animation){var n=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(me);if(i||(i=new t(this,"object"==typeof e&&e),n.data(me,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e](this)}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"DefaultType",get:function(){return Te}},{key:"Default",get:function(){return Ee}}]),t}();o.default.fn.toast=we._jQueryInterface,o.default.fn.toast.Constructor=we,o.default.fn.toast.noConflict=function(){return o.default.fn.toast=pe,we._jQueryInterface},t.Alert=g,t.Button=E,t.Carousel=P,t.Collapse=V,t.Dropdown=lt,t.Modal=Ct,t.Popover=Jt,t.Scrollspy=se,t.Tab=ge,t.Toast=we,t.Tooltip=Wt,t.Util=d,Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=bootstrap.min.js.mapPKs[f&&(e=a.render.queue[f]);f++)d=e.generate(),typeof e.callback==typeof Function&&e.callback(d);a.render.queue.splice(0,f),a.render.queue.length?setTimeout(c):(a.dispatch.render_end(),a.render.active=!1)};setTimeout(c)},a.render.active=!1,a.render.queue=[],a.addGraph=function(b){typeof arguments[0]==typeof Function&&(b={generate:arguments[0],callback:arguments[1]}),a.render.queue.push(b),a.render.active||a.render()},"undefined"!=typeof module&&"undefined"!=typeof exports&&(module.exports=a),"undefined"!=typeof window&&(window.nv=a),a.dom.write=function(a){return void 0!==window.fastdom?fastdom.write(a):a()},a.dom.read=function(a){return void 0!==window.fastdom?fastdom.read(a):a()},a.interactiveGuideline=function(){"use strict";function b(l){l.each(function(l){function m(){var a=d3.mouse(this),d=a[0],e=a[1],i=!0,j=!1;if(k&&(d=d3.event.offsetX,e=d3.event.offsetY,"svg"!==d3.event.target.tagName&&(i=!1),d3.event.target.className.baseVal.match("nv-legend")&&(j=!0)),i&&(d-=f.left,e-=f.top),0>d||0>e||d>o||e>p||d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement||j){if(k&&d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement&&(void 0===d3.event.relatedTarget.className||d3.event.relatedTarget.className.match(c.nvPointerEventsClass)))return;return h.elementMouseout({mouseX:d,mouseY:e}),b.renderGuideLine(null),void c.hidden(!0)}c.hidden(!1);var l=g.invert(d);h.elementMousemove({mouseX:d,mouseY:e,pointXValue:l}),"dblclick"===d3.event.type&&h.elementDblclick({mouseX:d,mouseY:e,pointXValue:l}),"click"===d3.event.type&&h.elementClick({mouseX:d,mouseY:e,pointXValue:l})}var n=d3.select(this),o=d||960,p=e||400,q=n.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([l]),r=q.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");r.append("g").attr("class","nv-interactiveGuideLine"),j&&(j.on("touchmove",m).on("mousemove",m,!0).on("mouseout",m,!0).on("dblclick",m).on("click",m),b.guideLine=null,b.renderGuideLine=function(c){i&&(b.guideLine&&b.guideLine.attr("x1")===c||a.dom.write(function(){var b=q.select(".nv-interactiveGuideLine").selectAll("line").data(null!=c?[a.utils.NaNtoZero(c)]:[],String);b.enter().append("line").attr("class","nv-guideline").attr("x1",function(a){return a}).attr("x2",function(a){return a}).attr("y1",p).attr("y2",0),b.exit().remove()}))})})}var c=a.models.tooltip();c.duration(0).hideDelay(0)._isInteractiveLayer(!0).hidden(!1);var d=null,e=null,f={left:0,top:0},g=d3.scale.linear(),h=d3.dispatch("elementMousemove","elementMouseout","elementClick","elementDblclick"),i=!0,j=null,k="ActiveXObject"in window;return b.dispatch=h,b.tooltip=c,b.margin=function(a){return arguments.length?(f.top="undefined"!=typeof a.top?a.top:f.top,f.left="undefined"!=typeof a.left?a.left:f.left,b):f},b.width=function(a){return arguments.length?(d=a,b):d},b.height=function(a){return arguments.length?(e=a,b):e},b.xScale=function(a){return arguments.length?(g=a,b):g},b.showGuideLine=function(a){return arguments.length?(i=a,b):i},b.svgContainer=function(a){return arguments.length?(j=a,b):j},b},a.interactiveBisect=function(a,b,c){"use strict";if(!(a instanceof Array))return null;var d;d="function"!=typeof c?function(a){return a.x}:c;var e=function(a,b){return d(a)-b},f=d3.bisector(e).left,g=d3.max([0,f(a,b)-1]),h=d(a[g]);if("undefined"==typeof h&&(h=g),h===b)return g;var i=d3.min([g+1,a.length-1]),j=d(a[i]);return"undefined"==typeof j&&(j=i),Math.abs(j-b)>=Math.abs(h-b)?g:i},a.nearestValueIndex=function(a,b,c){"use strict";var d=1/0,e=null;return a.forEach(function(a,f){var g=Math.abs(b-a);null!=a&&d>=g&&c>g&&(d=g,e=f)}),e},function(){"use strict";a.models.tooltip=function(){function b(){if(k){var a=d3.select(k);"svg"!==a.node().tagName&&(a=a.select("svg"));var b=a.node()?a.attr("viewBox"):null;if(b){b=b.split(" ");var c=parseInt(a.style("width"),10)/b[2];p.left=p.left*c,p.top=p.top*c}}}function c(){if(!n){var a;a=k?k:document.body,n=d3.select(a).append("div").attr("class","nvtooltip "+(j?j:"xy-tooltip")).attr("id",v),n.style("top",0).style("left",0),n.style("opacity",0),n.selectAll("div, table, td, tr").classed(w,!0),n.classed(w,!0),o=n.node()}}function d(){if(r&&B(e)){b();var f=p.left,g=null!==i?i:p.top;return a.dom.write(function(){c();var b=A(e);b&&(o.innerHTML=b),k&&u?a.dom.read(function(){var a=k.getElementsByTagName("svg")[0],b={left:0,top:0};if(a){var c=a.getBoundingClientRect(),d=k.getBoundingClientRect(),e=c.top;if(0>e){var i=k.getBoundingClientRect();e=Math.abs(e)>i.height?0:e}b.top=Math.abs(e-d.top),b.left=Math.abs(c.left-d.left)}f+=k.offsetLeft+b.left-2*k.scrollLeft,g+=k.offsetTop+b.top-2*k.scrollTop,h&&h>0&&(g=Math.floor(g/h)*h),C([f,g])}):C([f,g])}),d}}var e=null,f="w",g=25,h=0,i=null,j=null,k=null,l=!0,m=400,n=null,o=null,p={left:null,top:null},q={left:0,top:0},r=!0,s=100,t=!0,u=!1,v="nvtooltip-"+Math.floor(1e5*Math.random()),w="nv-pointer-events-none",x=function(a){return a},y=function(a){return a},z=function(a){return a},A=function(a){if(null===a)return"";var b=d3.select(document.createElement("table"));if(t){var c=b.selectAll("thead").data([a]).enter().append("thead");c.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",!0).html(y(a.value))}var d=b.selectAll("tbody").data([a]).enter().append("tbody"),e=d.selectAll("tr").data(function(a){return a.series}).enter().append("tr").classed("highlight",function(a){return a.highlight});e.append("td").classed("legend-color-guide",!0).append("div").style("background-color",function(a){return a.color}),e.append("td").classed("key",!0).html(function(a,b){return z(a.key,b)}),e.append("td").classed("value",!0).html(function(a,b){return x(a.value,b)}),e.selectAll("td").each(function(a){if(a.highlight){var b=d3.scale.linear().domain([0,1]).range(["#fff",a.color]),c=.6;d3.select(this).style("border-bottom-color",b(c)).style("border-top-color",b(c))}});var f=b.node().outerHTML;return void 0!==a.footer&&(f+=""),f},B=function(a){if(a&&a.series){if(a.series instanceof Array)return!!a.series.length;if(a.series instanceof Object)return a.series=[a.series],!0}return!1},C=function(b){o&&a.dom.read(function(){var c,d,e=parseInt(o.offsetHeight,10),h=parseInt(o.offsetWidth,10),i=a.utils.windowSize().width,j=a.utils.windowSize().height,k=window.pageYOffset,p=window.pageXOffset;j=window.innerWidth>=document.body.scrollWidth?j:j-16,i=window.innerHeight>=document.body.scrollHeight?i:i-16;var r,t,u=function(a){var b=d;do isNaN(a.offsetTop)||(b+=a.offsetTop),a=a.offsetParent;while(a);return b},v=function(a){var b=c;do isNaN(a.offsetLeft)||(b+=a.offsetLeft),a=a.offsetParent;while(a);return b};switch(f){case"e":c=b[0]-h-g,d=b[1]-e/2,r=v(o),t=u(o),p>r&&(c=b[0]+g>p?b[0]+g:p-r+c),k>t&&(d=k-t+d),t+e>k+j&&(d=k+j-t+d-e);break;case"w":c=b[0]+g,d=b[1]-e/2,r=v(o),t=u(o),r+h>i&&(c=b[0]-h-g),k>t&&(d=k+5),t+e>k+j&&(d=k+j-t+d-e);break;case"n":c=b[0]-h/2-5,d=b[1]+g,r=v(o),t=u(o),p>r&&(c=p+5),r+h>i&&(c=c-h/2+5),t+e>k+j&&(d=k+j-t+d-e);break;case"s":c=b[0]-h/2,d=b[1]-e-g,r=v(o),t=u(o),p>r&&(c=p+5),r+h>i&&(c=c-h/2+5),k>t&&(d=k);break;case"none":c=b[0],d=b[1]-g,r=v(o),t=u(o)}c-=q.left,d-=q.top;var w=o.getBoundingClientRect(),k=window.pageYOffset||document.documentElement.scrollTop,p=window.pageXOffset||document.documentElement.scrollLeft,x="translate("+(w.left+p)+"px, "+(w.top+k)+"px)",y="translate("+c+"px, "+d+"px)",z=d3.interpolateString(x,y),A=n.style("opacity")<.1;l?n.transition().delay(m).duration(0).style("opacity",0):n.interrupt().transition().duration(A?0:s).styleTween("transform",function(){return z},"important").style("-webkit-transform",y).style("opacity",1)})};return d.nvPointerEventsClass=w,d.options=a.utils.optionsFunc.bind(d),d._options=Object.create({},{duration:{get:function(){return s},set:function(a){s=a}},gravity:{get:function(){return f},set:function(a){f=a}},distance:{get:function(){return g},set:function(a){g=a}},snapDistance:{get:function(){return h},set:function(a){h=a}},classes:{get:function(){return j},set:function(a){j=a}},chartContainer:{get:function(){return k},set:function(a){k=a}},fixedTop:{get:function(){return i},set:function(a){i=a}},enabled:{get:function(){return r},set:function(a){r=a}},hideDelay:{get:function(){return m},set:function(a){m=a}},contentGenerator:{get:function(){return A},set:function(a){A=a}},valueFormatter:{get:function(){return x},set:function(a){x=a}},headerFormatter:{get:function(){return y},set:function(a){y=a}},keyFormatter:{get:function(){return z},set:function(a){z=a}},headerEnabled:{get:function(){return t},set:function(a){t=a}},_isInteractiveLayer:{get:function(){return u},set:function(a){u=!!a}},position:{get:function(){return p},set:function(a){p.left=void 0!==a.left?a.left:p.left,p.top=void 0!==a.top?a.top:p.top}},offset:{get:function(){return q},set:function(a){q.left=void 0!==a.left?a.left:q.left,q.top=void 0!==a.top?a.top:q.top}},hidden:{get:function(){return l},set:function(a){l!=a&&(l=!!a,d())}},data:{get:function(){return e},set:function(a){a.point&&(a.value=a.point.x,a.series=a.series||{},a.series.value=a.point.y,a.series.color=a.point.color||a.series.color),e=a}},tooltipElem:{get:function(){return o},set:function(){}},id:{get:function(){return v},set:function(){}}}),a.utils.initOptions(d),d}}(),a.utils.windowSize=function(){var a={width:640,height:480};return window.innerWidth&&window.innerHeight?(a.width=window.innerWidth,a.height=window.innerHeight,a):"CSS1Compat"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth?(a.width=document.documentElement.offsetWidth,a.height=document.documentElement.offsetHeight,a):document.body&&document.body.offsetWidth?(a.width=document.body.offsetWidth,a.height=document.body.offsetHeight,a):a},a.utils.windowResize=function(b){return window.addEventListener?window.addEventListener("resize",b):a.log("ERROR: Failed to bind to window.resize with: ",b),{callback:b,clear:function(){window.removeEventListener("resize",b)}}},a.utils.getColor=function(b){if(void 0===b)return a.utils.defaultColor();if(Array.isArray(b)){var c=d3.scale.ordinal().range(b);return function(a,b){var d=void 0===b?a:b;return a.color||c(d)}}return b},a.utils.defaultColor=function(){return a.utils.getColor(d3.scale.category20().range())},a.utils.customTheme=function(a,b,c){b=b||function(a){return a.key},c=c||d3.scale.category20().range();var d=c.length;return function(e){var f=b(e);return"function"==typeof a[f]?a[f]():void 0!==a[f]?a[f]:(d||(d=c.length),d-=1,c[d])}},a.utils.pjax=function(b,c){var d=function(d){d3.html(d,function(d){var e=d3.select(c).node();e.parentNode.replaceChild(d3.select(d).select(c).node(),e),a.utils.pjax(b,c)})};d3.selectAll(b).on("click",function(){history.pushState(this.href,this.textContent,this.href),d(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&d(d3.event.state)})},a.utils.calcApproxTextWidth=function(a){if("function"==typeof a.style&&"function"==typeof a.text){var b=parseInt(a.style("font-size").replace("px",""),10),c=a.text().length;return c*b*.5}return 0},a.utils.NaNtoZero=function(a){return"number"!=typeof a||isNaN(a)||null===a||1/0===a||a===-1/0?0:a},d3.selection.prototype.watchTransition=function(a){var b=[this].concat([].slice.call(arguments,1));return a.transition.apply(a,b)},a.utils.renderWatch=function(b,c){if(!(this instanceof a.utils.renderWatch))return new a.utils.renderWatch(b,c);var d=void 0!==c?c:250,e=[],f=this;this.models=function(a){return a=[].slice.call(arguments,0),a.forEach(function(a){a.__rendered=!1,function(a){a.dispatch.on("renderEnd",function(){a.__rendered=!0,f.renderEnd("model")})}(a),e.indexOf(a)<0&&e.push(a)}),this},this.reset=function(a){void 0!==a&&(d=a),e=[]},this.transition=function(a,b,c){if(b=arguments.length>1?[].slice.call(arguments,1):[],c=b.length>1?b.pop():void 0!==d?d:250,a.__rendered=!1,e.indexOf(a)<0&&e.push(a),0===c)return a.__rendered=!0,a.delay=function(){return this},a.duration=function(){return this},a;a.__rendered=0===a.length?!0:a.every(function(a){return!a.length})?!0:!1;var g=0;return a.transition().duration(c).each(function(){++g}).each("end",function(){0===--g&&(a.__rendered=!0,f.renderEnd.apply(this,b))})},this.renderEnd=function(){e.every(function(a){return a.__rendered})&&(e.forEach(function(a){a.__rendered=!1}),b.renderEnd.apply(this,arguments))}},a.utils.deepExtend=function(b){var c=arguments.length>1?[].slice.call(arguments,1):[];c.forEach(function(c){for(var d in c){var e=b[d]instanceof Array,f="object"==typeof b[d],g="object"==typeof c[d];f&&!e&&g?a.utils.deepExtend(b[d],c[d]):b[d]=c[d]}})},a.utils.state=function(){if(!(this instanceof a.utils.state))return new a.utils.state;var b={},c=function(){},d=function(){return{}},e=null,f=null;this.dispatch=d3.dispatch("change","set"),this.dispatch.on("set",function(a){c(a,!0)}),this.getter=function(a){return d=a,this},this.setter=function(a,b){return b||(b=function(){}),c=function(c,d){a(c),d&&b()},this},this.init=function(b){e=e||{},a.utils.deepExtend(e,b)};var g=function(){var a=d();if(JSON.stringify(a)===JSON.stringify(b))return!1;for(var c in a)void 0===b[c]&&(b[c]={}),b[c]=a[c],f=!0;return!0};this.update=function(){e&&(c(e,!1),e=null),g.call(this)&&this.dispatch.change(b)}},a.utils.optionsFunc=function(a){return a&&d3.map(a).forEach(function(a,b){"function"==typeof this[a]&&this[a](b)}.bind(this)),this},a.utils.calcTicksX=function(b,c){var d=1,e=0;for(e;ed?f:d}return a.log("Requested number of ticks: ",b),a.log("Calculated max values to be: ",d),b=b>d?b=d-1:b,b=1>b?1:b,b=Math.floor(b),a.log("Calculating tick count as: ",b),b},a.utils.calcTicksY=function(b,c){return a.utils.calcTicksX(b,c)},a.utils.initOption=function(a,b){a._calls&&a._calls[b]?a[b]=a._calls[b]:(a[b]=function(c){return arguments.length?(a._overrides[b]=!0,a._options[b]=c,a):a._options[b]},a["_"+b]=function(c){return arguments.length?(a._overrides[b]||(a._options[b]=c),a):a._options[b]})},a.utils.initOptions=function(b){b._overrides=b._overrides||{};var c=Object.getOwnPropertyNames(b._options||{}),d=Object.getOwnPropertyNames(b._calls||{});c=c.concat(d);for(var e in c)a.utils.initOption(b,c[e])},a.utils.inheritOptionsD3=function(a,b,c){a._d3options=c.concat(a._d3options||[]),c.unshift(b),c.unshift(a),d3.rebind.apply(this,c)},a.utils.arrayUnique=function(a){return a.sort().filter(function(b,c){return!c||b!=a[c-1]})},a.utils.symbolMap=d3.map(),a.utils.symbol=function(){function b(b,e){var f=c.call(this,b,e),g=d.call(this,b,e);return-1!==d3.svg.symbolTypes.indexOf(f)?d3.svg.symbol().type(f).size(g)():a.utils.symbolMap.get(f)(g)}var c,d=64;return b.type=function(a){return arguments.length?(c=d3.functor(a),b):c},b.size=function(a){return arguments.length?(d=d3.functor(a),b):d},b},a.utils.inheritOptions=function(b,c){var d=Object.getOwnPropertyNames(c._options||{}),e=Object.getOwnPropertyNames(c._calls||{}),f=c._inherited||[],g=c._d3options||[],h=d.concat(e).concat(f).concat(g);h.unshift(c),h.unshift(b),d3.rebind.apply(this,h),b._inherited=a.utils.arrayUnique(d.concat(e).concat(f).concat(d).concat(b._inherited||[])),b._d3options=a.utils.arrayUnique(g.concat(b._d3options||[]))},a.utils.initSVG=function(a){a.classed({"nvd3-svg":!0})},a.utils.sanitizeHeight=function(a,b){return a||parseInt(b.style("height"),10)||400},a.utils.sanitizeWidth=function(a,b){return a||parseInt(b.style("width"),10)||960},a.utils.availableHeight=function(b,c,d){return a.utils.sanitizeHeight(b,c)-d.top-d.bottom},a.utils.availableWidth=function(b,c,d){return a.utils.sanitizeWidth(b,c)-d.left-d.right},a.utils.noData=function(b,c){var d=b.options(),e=d.margin(),f=d.noData(),g=null==f?["No Data Available."]:[f],h=a.utils.availableHeight(d.height(),c,e),i=a.utils.availableWidth(d.width(),c,e),j=e.left+i/2,k=e.top+h/2;c.selectAll("g").remove();var l=c.selectAll(".nv-noData").data(g);l.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),l.attr("x",j).attr("y",k).text(function(a){return a})},a.models.axis=function(){"use strict";function b(g){return s.reset(),g.each(function(b){var g=d3.select(this);a.utils.initSVG(g);var p=g.selectAll("g.nv-wrap.nv-axis").data([b]),q=p.enter().append("g").attr("class","nvd3 nv-wrap nv-axis"),t=(q.append("g"),p.select("g"));null!==n?c.ticks(n):("top"==c.orient()||"bottom"==c.orient())&&c.ticks(Math.abs(d.range()[1]-d.range()[0])/100),t.watchTransition(s,"axis").call(c),r=r||c.scale();var u=c.tickFormat();null==u&&(u=r.tickFormat());var v=t.selectAll("text.nv-axislabel").data([h||null]);v.exit().remove();var w,x,y;switch(c.orient()){case"top":v.enter().append("text").attr("class","nv-axislabel"),y=d.range().length<2?0:2===d.range().length?d.range()[1]:d.range()[d.range().length-1]+(d.range()[1]-d.range()[0]),v.attr("text-anchor","middle").attr("y",0).attr("x",y/2),i&&(x=p.selectAll("g.nv-axisMaxMin").data(d.domain()),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-x",0==b?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),x.exit().remove(),x.attr("transform",function(b){return"translate("+a.utils.NaNtoZero(d(b))+",0)"}).select("text").attr("dy","-0.5em").attr("y",-c.tickPadding()).attr("text-anchor","middle").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max top").attr("transform",function(b,c){return"translate("+a.utils.NaNtoZero(d.range()[c])+",0)"}));break;case"bottom":w=o+36;var z=30,A=0,B=t.selectAll("g").select("text"),C="";if(j%360){B.each(function(){var a=this.getBoundingClientRect(),b=a.width;A=a.height,b>z&&(z=b)}),C="rotate("+j+" 0,"+(A/2+c.tickPadding())+")";var D=Math.abs(Math.sin(j*Math.PI/180));w=(D?D*z:z)+30,B.attr("transform",C).style("text-anchor",j%360>0?"start":"end")}v.enter().append("text").attr("class","nv-axislabel"),y=d.range().length<2?0:2===d.range().length?d.range()[1]:d.range()[d.range().length-1]+(d.range()[1]-d.range()[0]),v.attr("text-anchor","middle").attr("y",w).attr("x",y/2),i&&(x=p.selectAll("g.nv-axisMaxMin").data([d.domain()[0],d.domain()[d.domain().length-1]]),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-x",0==b?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),x.exit().remove(),x.attr("transform",function(b){return"translate("+a.utils.NaNtoZero(d(b)+(m?d.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",c.tickPadding()).attr("transform",C).style("text-anchor",j?j%360>0?"start":"end":"middle").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max bottom").attr("transform",function(b){return"translate("+a.utils.NaNtoZero(d(b)+(m?d.rangeBand()/2:0))+",0)"})),l&&B.attr("transform",function(a,b){return"translate(0,"+(b%2==0?"0":"12")+")"});break;case"right":v.enter().append("text").attr("class","nv-axislabel"),v.style("text-anchor",k?"middle":"begin").attr("transform",k?"rotate(90)":"").attr("y",k?-Math.max(e.right,f)+12:-10).attr("x",k?d3.max(d.range())/2:c.tickPadding()),i&&(x=p.selectAll("g.nv-axisMaxMin").data(d.domain()),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-y",0==b?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),x.exit().remove(),x.attr("transform",function(b){return"translate(0,"+a.utils.NaNtoZero(d(b))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",c.tickPadding()).style("text-anchor","start").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max right").attr("transform",function(b,c){return"translate(0,"+a.utils.NaNtoZero(d.range()[c])+")"}).select("text").style("opacity",1));break;case"left":v.enter().append("text").attr("class","nv-axislabel"),v.style("text-anchor",k?"middle":"end").attr("transform",k?"rotate(-90)":"").attr("y",k?-Math.max(e.left,f)+25-(o||0):-10).attr("x",k?-d3.max(d.range())/2:-c.tickPadding()),i&&(x=p.selectAll("g.nv-axisMaxMin").data(d.domain()),x.enter().append("g").attr("class",function(a,b){return["nv-axisMaxMin","nv-axisMaxMin-y",0==b?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),x.exit().remove(),x.attr("transform",function(b){return"translate(0,"+a.utils.NaNtoZero(r(b))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-c.tickPadding()).attr("text-anchor","end").text(function(a){var b=u(a);return(""+b).match("NaN")?"":b}),x.watchTransition(s,"min-max right").attr("transform",function(b,c){return"translate(0,"+a.utils.NaNtoZero(d.range()[c])+")"}).select("text").style("opacity",1))}if(v.text(function(a){return a}),!i||"left"!==c.orient()&&"right"!==c.orient()||(t.selectAll("g").each(function(a){d3.select(this).select("text").attr("opacity",1),(d(a)d.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),d.domain()[0]==d.domain()[1]&&0==d.domain()[0]&&p.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),i&&("top"===c.orient()||"bottom"===c.orient())){var E=[];p.selectAll("g.nv-axisMaxMin").each(function(a,b){try{E.push(b?d(a)-this.getBoundingClientRect().width-4:d(a)+this.getBoundingClientRect().width+4)}catch(c){E.push(b?d(a)-4:d(a)+4)}}),t.selectAll("g").each(function(a){(d(a)E[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}t.selectAll(".tick").filter(function(a){return!parseFloat(Math.round(1e5*a)/1e6)&&void 0!==a}).classed("zero",!0),r=d.copy()}),s.renderEnd("axis immediate"),b}var c=d3.svg.axis(),d=d3.scale.linear(),e={top:0,right:0,bottom:0,left:0},f=75,g=60,h=null,i=!0,j=0,k=!0,l=!1,m=!1,n=null,o=0,p=250,q=d3.dispatch("renderEnd");c.scale(d).orient("bottom").tickFormat(function(a){return a});var r,s=a.utils.renderWatch(q,p);return b.axis=c,b.dispatch=q,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{axisLabelDistance:{get:function(){return o},set:function(a){o=a}},staggerLabels:{get:function(){return l},set:function(a){l=a}},rotateLabels:{get:function(){return j},set:function(a){j=a}},rotateYLabel:{get:function(){return k},set:function(a){k=a}},showMaxMin:{get:function(){return i},set:function(a){i=a}},axisLabel:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return g},set:function(a){g=a}},ticks:{get:function(){return n},set:function(a){n=a}},width:{get:function(){return f},set:function(a){f=a}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},duration:{get:function(){return p},set:function(a){p=a,s.reset(p)}},scale:{get:function(){return d},set:function(e){d=e,c.scale(d),m="function"==typeof d.rangeBands,a.utils.inheritOptionsD3(b,d,["domain","range","rangeBand","rangeBands"])}}}),a.utils.initOptions(b),a.utils.inheritOptionsD3(b,c,["orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"]),a.utils.inheritOptionsD3(b,d,["domain","range","rangeBand","rangeBands"]),b},a.models.boxPlot=function(){"use strict";function b(l){return v.reset(),l.each(function(b){var l=j-i.left-i.right,p=k-i.top-i.bottom;r=d3.select(this),a.utils.initSVG(r),m.domain(c||b.map(function(a,b){return o(a,b)})).rangeBands(e||[0,l],.1);var w=[];if(!d){var x=d3.min(b.map(function(a){var b=[];return b.push(a.values.Q1),a.values.hasOwnProperty("whisker_low")&&null!==a.values.whisker_low&&b.push(a.values.whisker_low),a.values.hasOwnProperty("outliers")&&null!==a.values.outliers&&(b=b.concat(a.values.outliers)),d3.min(b)})),y=d3.max(b.map(function(a){var b=[];return b.push(a.values.Q3),a.values.hasOwnProperty("whisker_high")&&null!==a.values.whisker_high&&b.push(a.values.whisker_high),a.values.hasOwnProperty("outliers")&&null!==a.values.outliers&&(b=b.concat(a.values.outliers)),d3.max(b)}));w=[x,y]}n.domain(d||w),n.range(f||[p,0]),g=g||m,h=h||n.copy().range([n(0),n(0)]);{var z=r.selectAll("g.nv-wrap").data([b]);z.enter().append("g").attr("class","nvd3 nv-wrap")}z.attr("transform","translate("+i.left+","+i.top+")");var A=z.selectAll(".nv-boxplot").data(function(a){return a}),B=A.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);A.attr("class","nv-boxplot").attr("transform",function(a,b){return"translate("+(m(o(a,b))+.05*m.rangeBand())+", 0)"}).classed("hover",function(a){return a.hover}),A.watchTransition(v,"nv-boxplot: boxplots").style("stroke-opacity",1).style("fill-opacity",.75).delay(function(a,c){return c*t/b.length}).attr("transform",function(a,b){return"translate("+(m(o(a,b))+.05*m.rangeBand())+", 0)"}),A.exit().remove(),B.each(function(a,b){var c=d3.select(this);["low","high"].forEach(function(d){a.values.hasOwnProperty("whisker_"+d)&&null!==a.values["whisker_"+d]&&(c.append("line").style("stroke",a.color?a.color:q(a,b)).attr("class","nv-boxplot-whisker nv-boxplot-"+d),c.append("line").style("stroke",a.color?a.color:q(a,b)).attr("class","nv-boxplot-tick nv-boxplot-"+d))})});var C=A.selectAll(".nv-boxplot-outlier").data(function(a){return a.values.hasOwnProperty("outliers")&&null!==a.values.outliers?a.values.outliers:[]});C.enter().append("circle").style("fill",function(a,b,c){return q(a,c)}).style("stroke",function(a,b,c){return q(a,c)}).on("mouseover",function(a,b,c){d3.select(this).classed("hover",!0),s.elementMouseover({series:{key:a,color:q(a,c)},e:d3.event})}).on("mouseout",function(a,b,c){d3.select(this).classed("hover",!1),s.elementMouseout({series:{key:a,color:q(a,c)},e:d3.event})}).on("mousemove",function(){s.elementMousemove({e:d3.event})}),C.attr("class","nv-boxplot-outlier"),C.watchTransition(v,"nv-boxplot: nv-boxplot-outlier").attr("cx",.45*m.rangeBand()).attr("cy",function(a){return n(a)}).attr("r","3"),C.exit().remove();var D=function(){return null===u?.9*m.rangeBand():Math.min(75,.9*m.rangeBand())},E=function(){return.45*m.rangeBand()-D()/2},F=function(){return.45*m.rangeBand()+D()/2};["low","high"].forEach(function(a){var b="low"===a?"Q1":"Q3";A.select("line.nv-boxplot-whisker.nv-boxplot-"+a).watchTransition(v,"nv-boxplot: boxplots").attr("x1",.45*m.rangeBand()).attr("y1",function(b){return n(b.values["whisker_"+a])}).attr("x2",.45*m.rangeBand()).attr("y2",function(a){return n(a.values[b])}),A.select("line.nv-boxplot-tick.nv-boxplot-"+a).watchTransition(v,"nv-boxplot: boxplots").attr("x1",E).attr("y1",function(b){return n(b.values["whisker_"+a])}).attr("x2",F).attr("y2",function(b){return n(b.values["whisker_"+a])})}),["low","high"].forEach(function(a){B.selectAll(".nv-boxplot-"+a).on("mouseover",function(b,c,d){d3.select(this).classed("hover",!0),s.elementMouseover({series:{key:b.values["whisker_"+a],color:q(b,d)},e:d3.event})}).on("mouseout",function(b,c,d){d3.select(this).classed("hover",!1),s.elementMouseout({series:{key:b.values["whisker_"+a],color:q(b,d)},e:d3.event})}).on("mousemove",function(){s.elementMousemove({e:d3.event})})}),B.append("rect").attr("class","nv-boxplot-box").on("mouseover",function(a,b){d3.select(this).classed("hover",!0),s.elementMouseover({key:a.label,value:a.label,series:[{key:"Q3",value:a.values.Q3,color:a.color||q(a,b)},{key:"Q2",value:a.values.Q2,color:a.color||q(a,b)},{key:"Q1",value:a.values.Q1,color:a.color||q(a,b)}],data:a,index:b,e:d3.event})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),s.elementMouseout({key:a.label,value:a.label,series:[{key:"Q3",value:a.values.Q3,color:a.color||q(a,b)},{key:"Q2",value:a.values.Q2,color:a.color||q(a,b)},{key:"Q1",value:a.values.Q1,color:a.color||q(a,b)}],data:a,index:b,e:d3.event})}).on("mousemove",function(){s.elementMousemove({e:d3.event})}),A.select("rect.nv-boxplot-box").watchTransition(v,"nv-boxplot: boxes").attr("y",function(a){return n(a.values.Q3)}).attr("width",D).attr("x",E).attr("height",function(a){return Math.abs(n(a.values.Q3)-n(a.values.Q1))||1}).style("fill",function(a,b){return a.color||q(a,b)}).style("stroke",function(a,b){return a.color||q(a,b)}),B.append("line").attr("class","nv-boxplot-median"),A.select("line.nv-boxplot-median").watchTransition(v,"nv-boxplot: boxplots line").attr("x1",E).attr("y1",function(a){return n(a.values.Q2)}).attr("x2",F).attr("y2",function(a){return n(a.values.Q2)}),g=m.copy(),h=n.copy()}),v.renderEnd("nv-boxplot immediate"),b}var c,d,e,f,g,h,i={top:0,right:0,bottom:0,left:0},j=960,k=500,l=Math.floor(1e4*Math.random()),m=d3.scale.ordinal(),n=d3.scale.linear(),o=function(a){return a.x},p=function(a){return a.y},q=a.utils.defaultColor(),r=null,s=d3.dispatch("elementMouseover","elementMouseout","elementMousemove","renderEnd"),t=250,u=null,v=a.utils.renderWatch(s,t);return b.dispatch=s,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return j},set:function(a){j=a}},height:{get:function(){return k},set:function(a){k=a}},maxBoxWidth:{get:function(){return u},set:function(a){u=a}},x:{get:function(){return o},set:function(a){o=a}},y:{get:function(){return p},set:function(a){p=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return l},set:function(a){l=a}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},color:{get:function(){return q},set:function(b){q=a.utils.getColor(b)}},duration:{get:function(){return t},set:function(a){t=a,v.reset(t)}}}),a.utils.initOptions(b),b},a.models.boxPlotChart=function(){"use strict";function b(k){return t.reset(),t.models(e),l&&t.models(f),m&&t.models(g),k.each(function(k){var p=d3.select(this);a.utils.initSVG(p);var t=(i||parseInt(p.style("width"))||960)-h.left-h.right,u=(j||parseInt(p.style("height"))||400)-h.top-h.bottom;if(b.update=function(){r.beforeUpdate(),p.transition().duration(s).call(b)},b.container=this,!(k&&k.length&&k.filter(function(a){return a.values.hasOwnProperty("Q1")&&a.values.hasOwnProperty("Q2")&&a.values.hasOwnProperty("Q3")}).length)){var v=p.selectAll(".nv-noData").data([q]);return v.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),v.attr("x",h.left+t/2).attr("y",h.top+u/2).text(function(a){return a}),b}p.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var w=p.selectAll("g.nv-wrap.nv-boxPlotWithAxes").data([k]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-boxPlotWithAxes").append("g"),y=x.append("defs"),z=w.select("g"); x.append("g").attr("class","nv-x nv-axis"),x.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),x.append("g").attr("class","nv-barsWrap"),z.attr("transform","translate("+h.left+","+h.top+")"),n&&z.select(".nv-y.nv-axis").attr("transform","translate("+t+",0)"),e.width(t).height(u);var A=z.select(".nv-barsWrap").datum(k.filter(function(a){return!a.disabled}));if(A.transition().call(e),y.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),z.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",c.rangeBand()*(o?2:1)).attr("height",16).attr("x",-c.rangeBand()/(o?1:2)),l){f.scale(c).ticks(a.utils.calcTicksX(t/100,k)).tickSize(-u,0),z.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),z.select(".nv-x.nv-axis").call(f);var B=z.select(".nv-x.nv-axis").selectAll("g");o&&B.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2==0?"5":"17")+")"})}m&&(g.scale(d).ticks(Math.floor(u/36)).tickSize(-t,0),z.select(".nv-y.nv-axis").call(g)),z.select(".nv-zeroLine line").attr("x1",0).attr("x2",t).attr("y1",d(0)).attr("y2",d(0))}),t.renderEnd("nv-boxplot chart immediate"),b}var c,d,e=a.models.boxPlot(),f=a.models.axis(),g=a.models.axis(),h={top:15,right:10,bottom:50,left:60},i=null,j=null,k=a.utils.getColor(),l=!0,m=!0,n=!1,o=!1,p=a.models.tooltip(),q="No Data Available.",r=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate","renderEnd"),s=250;f.orient("bottom").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(n?"right":"left").tickFormat(d3.format(",.1f")),p.duration(0);var t=a.utils.renderWatch(r,s);return e.dispatch.on("elementMouseover.tooltip",function(a){p.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(a){p.data(a).hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){p.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=r,b.boxplot=e,b.xAxis=f,b.yAxis=g,b.tooltip=p,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},staggerLabels:{get:function(){return o},set:function(a){o=a}},showXAxis:{get:function(){return l},set:function(a){l=a}},showYAxis:{get:function(){return m},set:function(a){m=a}},tooltips:{get:function(){return tooltips},set:function(a){tooltips=a}},tooltipContent:{get:function(){return p},set:function(a){p=a}},noData:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!==a.top?a.top:h.top,h.right=void 0!==a.right?a.right:h.right,h.bottom=void 0!==a.bottom?a.bottom:h.bottom,h.left=void 0!==a.left?a.left:h.left}},duration:{get:function(){return s},set:function(a){s=a,t.reset(s),e.duration(s),f.duration(s),g.duration(s)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}},rightAlignYAxis:{get:function(){return n},set:function(a){n=a,g.orient(a?"right":"left")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.bullet=function(){"use strict";function b(d){return d.each(function(b,d){var p=m-c.left-c.right,s=n-c.top-c.bottom;o=d3.select(this),a.utils.initSVG(o);{var t=f.call(this,b,d).slice().sort(d3.descending),u=g.call(this,b,d).slice().sort(d3.descending),v=h.call(this,b,d).slice().sort(d3.descending),w=i.call(this,b,d).slice(),x=j.call(this,b,d).slice(),y=k.call(this,b,d).slice(),z=d3.scale.linear().domain(d3.extent(d3.merge([l,t]))).range(e?[p,0]:[0,p]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(z.range())}this.__chart__=z;var A=d3.min(t),B=d3.max(t),C=t[1],D=o.selectAll("g.nv-wrap.nv-bullet").data([b]),E=D.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),F=E.append("g"),G=D.select("g");F.append("rect").attr("class","nv-range nv-rangeMax"),F.append("rect").attr("class","nv-range nv-rangeAvg"),F.append("rect").attr("class","nv-range nv-rangeMin"),F.append("rect").attr("class","nv-measure"),D.attr("transform","translate("+c.left+","+c.top+")");var H=function(a){return Math.abs(z(a)-z(0))},I=function(a){return z(0>a?a:0)};G.select("rect.nv-rangeMax").attr("height",s).attr("width",H(B>0?B:A)).attr("x",I(B>0?B:A)).datum(B>0?B:A),G.select("rect.nv-rangeAvg").attr("height",s).attr("width",H(C)).attr("x",I(C)).datum(C),G.select("rect.nv-rangeMin").attr("height",s).attr("width",H(B)).attr("x",I(B)).attr("width",H(B>0?A:B)).attr("x",I(B>0?A:B)).datum(B>0?A:B),G.select("rect.nv-measure").style("fill",q).attr("height",s/3).attr("y",s/3).attr("width",0>v?z(0)-z(v[0]):z(v[0])-z(0)).attr("x",I(v)).on("mouseover",function(){r.elementMouseover({value:v[0],label:y[0]||"Current",color:d3.select(this).style("fill")})}).on("mousemove",function(){r.elementMousemove({value:v[0],label:y[0]||"Current",color:d3.select(this).style("fill")})}).on("mouseout",function(){r.elementMouseout({value:v[0],label:y[0]||"Current",color:d3.select(this).style("fill")})});var J=s/6,K=u.map(function(a,b){return{value:a,label:x[b]}});F.selectAll("path.nv-markerTriangle").data(K).enter().append("path").attr("class","nv-markerTriangle").attr("transform",function(a){return"translate("+z(a.value)+","+s/2+")"}).attr("d","M0,"+J+"L"+J+","+-J+" "+-J+","+-J+"Z").on("mouseover",function(a){r.elementMouseover({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill"),pos:[z(a.value),s/2]})}).on("mousemove",function(a){r.elementMousemove({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(a){r.elementMouseout({value:a.value,label:a.label||"Previous",color:d3.select(this).style("fill")})}),D.selectAll(".nv-range").on("mouseover",function(a,b){var c=w[b]||(b?1==b?"Mean":"Minimum":"Maximum");r.elementMouseover({value:a,label:c,color:d3.select(this).style("fill")})}).on("mousemove",function(){r.elementMousemove({value:v[0],label:y[0]||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){var c=w[b]||(b?1==b?"Mean":"Minimum":"Maximum");r.elementMouseout({value:a,label:c,color:d3.select(this).style("fill")})})}),b}var c={top:0,right:0,bottom:0,left:0},d="left",e=!1,f=function(a){return a.ranges},g=function(a){return a.markers?a.markers:[0]},h=function(a){return a.measures},i=function(a){return a.rangeLabels?a.rangeLabels:[]},j=function(a){return a.markerLabels?a.markerLabels:[]},k=function(a){return a.measureLabels?a.measureLabels:[]},l=[0],m=380,n=30,o=null,p=null,q=a.utils.getColor(["#1f77b4"]),r=d3.dispatch("elementMouseover","elementMouseout","elementMousemove");return b.dispatch=r,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return f},set:function(a){f=a}},markers:{get:function(){return g},set:function(a){g=a}},measures:{get:function(){return h},set:function(a){h=a}},forceX:{get:function(){return l},set:function(a){l=a}},width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},tickFormat:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},orient:{get:function(){return d},set:function(a){d=a,e="right"==d||"bottom"==d}},color:{get:function(){return q},set:function(b){q=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.bulletChart=function(){"use strict";function b(d){return d.each(function(e,o){var p=d3.select(this);a.utils.initSVG(p);var q=a.utils.availableWidth(k,p,g),r=l-g.top-g.bottom;if(b.update=function(){b(d)},b.container=this,!e||!h.call(this,e,o))return a.utils.noData(b,p),b;p.selectAll(".nv-noData").remove();var s=h.call(this,e,o).slice().sort(d3.descending),t=i.call(this,e,o).slice().sort(d3.descending),u=j.call(this,e,o).slice().sort(d3.descending),v=p.selectAll("g.nv-wrap.nv-bulletChart").data([e]),w=v.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),x=w.append("g"),y=v.select("g");x.append("g").attr("class","nv-bulletWrap"),x.append("g").attr("class","nv-titles"),v.attr("transform","translate("+g.left+","+g.top+")");var z=d3.scale.linear().domain([0,Math.max(s[0],t[0],u[0])]).range(f?[q,0]:[0,q]),A=this.__chart__||d3.scale.linear().domain([0,1/0]).range(z.range());this.__chart__=z;var B=x.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(l-g.top-g.bottom)/2+")");B.append("text").attr("class","nv-title").text(function(a){return a.title}),B.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(a){return a.subtitle}),c.width(q).height(r);var C=y.select(".nv-bulletWrap");d3.transition(C).call(c);var D=m||z.tickFormat(q/100),E=y.selectAll("g.nv-tick").data(z.ticks(n?n:q/50),function(a){return this.textContent||D(a)}),F=E.enter().append("g").attr("class","nv-tick").attr("transform",function(a){return"translate("+A(a)+",0)"}).style("opacity",1e-6);F.append("line").attr("y1",r).attr("y2",7*r/6),F.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",7*r/6).text(D);var G=d3.transition(E).attr("transform",function(a){return"translate("+z(a)+",0)"}).style("opacity",1);G.select("line").attr("y1",r).attr("y2",7*r/6),G.select("text").attr("y",7*r/6),d3.transition(E.exit()).attr("transform",function(a){return"translate("+z(a)+",0)"}).style("opacity",1e-6).remove()}),d3.timer.flush(),b}var c=a.models.bullet(),d=a.models.tooltip(),e="left",f=!1,g={top:5,right:40,bottom:20,left:120},h=function(a){return a.ranges},i=function(a){return a.markers?a.markers:[0]},j=function(a){return a.measures},k=null,l=55,m=null,n=null,o=null,p=d3.dispatch("tooltipShow","tooltipHide");return d.duration(0).headerEnabled(!1),c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:a.label,value:a.value,color:a.color},d.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(){d.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(){d.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.bullet=c,b.dispatch=p,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return h},set:function(a){h=a}},markers:{get:function(){return i},set:function(a){i=a}},measures:{get:function(){return j},set:function(a){j=a}},width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},tickFormat:{get:function(){return m},set:function(a){m=a}},ticks:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return o},set:function(a){o=a}},tooltips:{get:function(){return d.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),d.enabled(!!b)}},tooltipContent:{get:function(){return d.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),d.contentGenerator(b)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},orient:{get:function(){return e},set:function(a){e=a,f="right"==e||"bottom"==e}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.candlestickBar=function(){"use strict";function b(x){return x.each(function(b){c=d3.select(this);var x=a.utils.availableWidth(i,c,h),y=a.utils.availableHeight(j,c,h);a.utils.initSVG(c);var A=x/b[0].values.length*.45;l.domain(d||d3.extent(b[0].values.map(n).concat(t))),l.range(v?f||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]:f||[5+A/2,x-A/2-5]),m.domain(e||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(g||[y,0]),l.domain()[0]===l.domain()[1]&&l.domain(l.domain()[0]?[l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]:[-1,1]);var B=d3.select(this).selectAll("g.nv-wrap.nv-candlestickBar").data([b[0].values]),C=B.enter().append("g").attr("class","nvd3 nv-wrap nv-candlestickBar"),D=C.append("defs"),E=C.append("g"),F=B.select("g");E.append("g").attr("class","nv-ticks"),B.attr("transform","translate("+h.left+","+h.top+")"),c.on("click",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:k})}),D.append("clipPath").attr("id","nv-chart-clip-path-"+k).append("rect"),B.select("#nv-chart-clip-path-"+k+" rect").attr("width",x).attr("height",y),F.attr("clip-path",w?"url(#nv-chart-clip-path-"+k+")":"");var G=B.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});G.exit().remove();{var H=G.enter().append("g").attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b});H.append("line").attr("class","nv-candlestick-lines").attr("transform",function(a,b){return"translate("+l(n(a,b))+",0)"}).attr("x1",0).attr("y1",function(a,b){return m(r(a,b))}).attr("x2",0).attr("y2",function(a,b){return m(s(a,b))}),H.append("rect").attr("class","nv-candlestick-rects nv-bars").attr("transform",function(a,b){return"translate("+(l(n(a,b))-A/2)+","+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+")"}).attr("x",0).attr("y",0).attr("width",A).attr("height",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)})}c.selectAll(".nv-candlestick-lines").transition().attr("transform",function(a,b){return"translate("+l(n(a,b))+",0)"}).attr("x1",0).attr("y1",function(a,b){return m(r(a,b))}).attr("x2",0).attr("y2",function(a,b){return m(s(a,b))}),c.selectAll(".nv-candlestick-rects").transition().attr("transform",function(a,b){return"translate("+(l(n(a,b))-A/2)+","+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+")"}).attr("x",0).attr("y",0).attr("width",A).attr("height",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)})}),b}var c,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=null,j=null,k=Math.floor(1e4*Math.random()),l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return b.highlightPoint=function(a,d){b.clearHighlights(),c.select(".nv-candlestickBar .nv-tick-0-"+a).classed("hover",d)},b.clearHighlights=function(){c.select(".nv-candlestickBar .nv-tick.hover").classed("hover",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return k},set:function(a){k=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!=a.top?a.top:h.top,h.right=void 0!=a.right?a.right:h.right,h.bottom=void 0!=a.bottom?a.bottom:h.bottom,h.left=void 0!=a.left?a.left:h.left}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.cumulativeLineChart=function(){"use strict";function b(l){return H.reset(),H.models(f),r&&H.models(g),s&&H.models(h),l.each(function(l){function A(){d3.select(b.container).style("cursor","ew-resize")}function E(){G.x=d3.event.x,G.i=Math.round(F.invert(G.x)),K()}function H(){d3.select(b.container).style("cursor","auto"),y.index=G.i,C.stateChange(y)}function K(){bb.data([G]);var a=b.duration();b.duration(0),b.update(),b.duration(a)}var L=d3.select(this);a.utils.initSVG(L),L.classed("nv-chart-"+x,!0);var M=this,N=a.utils.availableWidth(o,L,m),O=a.utils.availableHeight(p,L,m);if(b.update=function(){0===D?L.call(b):L.transition().duration(D).call(b)},b.container=this,y.setter(J(l),b.update).getter(I(l)).update(),y.disabled=l.map(function(a){return!!a.disabled}),!z){var P;z={};for(P in y)z[P]=y[P]instanceof Array?y[P].slice(0):y[P]}var Q=d3.behavior.drag().on("dragstart",A).on("drag",E).on("dragend",H);if(!(l&&l.length&&l.filter(function(a){return a.values.length}).length))return a.utils.noData(b,L),b;if(L.selectAll(".nv-noData").remove(),d=f.xScale(),e=f.yScale(),w)f.yDomain(null);else{var R=l.filter(function(a){return!a.disabled}).map(function(a){var b=d3.extent(a.values,f.y());return b[0]<-.95&&(b[0]=-.95),[(b[0]-b[1])/(1+b[1]),(b[1]-b[0])/(1+b[0])]}),S=[d3.min(R,function(a){return a[0]}),d3.max(R,function(a){return a[1]})];f.yDomain(S)}F.domain([0,l[0].values.length-1]).range([0,N]).clamp(!0);var l=c(G.i,l),T=v?"none":"all",U=L.selectAll("g.nv-wrap.nv-cumulativeLine").data([l]),V=U.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),W=U.select("g");if(V.append("g").attr("class","nv-interactive"),V.append("g").attr("class","nv-x nv-axis").style("pointer-events","none"),V.append("g").attr("class","nv-y nv-axis"),V.append("g").attr("class","nv-background"),V.append("g").attr("class","nv-linesWrap").style("pointer-events",T),V.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none"),V.append("g").attr("class","nv-legendWrap"),V.append("g").attr("class","nv-controlsWrap"),q&&(i.width(N),W.select(".nv-legendWrap").datum(l).call(i),m.top!=i.height()&&(m.top=i.height(),O=a.utils.availableHeight(p,L,m)),W.select(".nv-legendWrap").attr("transform","translate(0,"+-m.top+")")),u){var X=[{key:"Re-scale y-axis",disabled:!w}];j.width(140).color(["#444","#444","#444"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),W.select(".nv-controlsWrap").datum(X).attr("transform","translate(0,"+-m.top+")").call(j)}U.attr("transform","translate("+m.left+","+m.top+")"),t&&W.select(".nv-y.nv-axis").attr("transform","translate("+N+",0)");var Y=l.filter(function(a){return a.tempDisabled});U.select(".tempDisabled").remove(),Y.length&&U.append("text").attr("class","tempDisabled").attr("x",N/2).attr("y","-.71em").style("text-anchor","end").text(Y.map(function(a){return a.key}).join(", ")+" values cannot be calculated for this time period."),v&&(k.width(N).height(O).margin({left:m.left,top:m.top}).svgContainer(L).xScale(d),U.select(".nv-interactive").call(k)),V.select(".nv-background").append("rect"),W.select(".nv-background rect").attr("width",N).attr("height",O),f.y(function(a){return a.display.y}).width(N).height(O).color(l.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!l[b].disabled&&!l[b].tempDisabled}));var Z=W.select(".nv-linesWrap").datum(l.filter(function(a){return!a.disabled&&!a.tempDisabled}));Z.call(f),l.forEach(function(a,b){a.seriesIndex=b});var $=l.filter(function(a){return!a.disabled&&!!B(a)}),_=W.select(".nv-avgLinesWrap").selectAll("line").data($,function(a){return a.key}),ab=function(a){var b=e(B(a));return 0>b?0:b>O?O:b};_.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(a){return f.color()(a,a.seriesIndex)}).attr("x1",0).attr("x2",N).attr("y1",ab).attr("y2",ab),_.style("stroke-opacity",function(a){var b=e(B(a));return 0>b||b>O?0:1}).attr("x1",0).attr("x2",N).attr("y1",ab).attr("y2",ab),_.exit().remove();var bb=Z.selectAll(".nv-indexLine").data([G]);bb.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(Q),bb.attr("transform",function(a){return"translate("+F(a.i)+",0)"}).attr("height",O),r&&(g.scale(d)._ticks(a.utils.calcTicksX(N/70,l)).tickSize(-O,0),W.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),W.select(".nv-x.nv-axis").call(g)),s&&(h.scale(e)._ticks(a.utils.calcTicksY(O/36,l)).tickSize(-N,0),W.select(".nv-y.nv-axis").call(h)),W.select(".nv-background rect").on("click",function(){G.x=d3.mouse(this)[0],G.i=Math.round(F.invert(G.x)),y.index=G.i,C.stateChange(y),K()}),f.dispatch.on("elementClick",function(a){G.i=a.pointIndex,G.x=F(G.i),y.index=G.i,C.stateChange(y),K()}),j.dispatch.on("legendClick",function(a){a.disabled=!a.disabled,w=!a.disabled,y.rescaleY=w,C.stateChange(y),b.update()}),i.dispatch.on("stateChange",function(a){for(var c in a)y[c]=a[c];C.stateChange(y),b.update()}),k.dispatch.on("elementMousemove",function(c){f.clearHighlights();var d,e,i,j=[];if(l.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(g,h){e=a.interactiveBisect(g.values,c.pointXValue,b.x()),f.highlightPoint(h,e,!0);var k=g.values[e];"undefined"!=typeof k&&("undefined"==typeof d&&(d=k),"undefined"==typeof i&&(i=b.xScale()(b.x()(k,e))),j.push({key:g.key,value:b.y()(k,e),color:n(g,g.seriesIndex)}))}),j.length>2){var o=b.yScale().invert(c.mouseY),p=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),q=.03*p,r=a.nearestValueIndex(j.map(function(a){return a.value}),o,q);null!==r&&(j[r].highlight=!0)}var s=g.tickFormat()(b.x()(d,e),e);k.tooltip.position({left:i+m.left,top:c.mouseY+m.top}).chartContainer(M.parentNode).valueFormatter(function(a){return h.tickFormat()(a)}).data({value:s,series:j})(),k.renderGuideLine(i)}),k.dispatch.on("elementMouseout",function(){f.clearHighlights()}),C.on("changeState",function(a){"undefined"!=typeof a.disabled&&(l.forEach(function(b,c){b.disabled=a.disabled[c]}),y.disabled=a.disabled),"undefined"!=typeof a.index&&(G.i=a.index,G.x=F(G.i),y.index=a.index,bb.data([G])),"undefined"!=typeof a.rescaleY&&(w=a.rescaleY),b.update()})}),H.renderEnd("cumulativeLineChart immediate"),b}function c(a,b){return K||(K=f.y()),b.map(function(b){if(!b.values)return b;var c=b.values[a];if(null==c)return b;var d=K(c,a);return-.95>d&&!E?(b.tempDisabled=!0,b):(b.tempDisabled=!1,b.values=b.values.map(function(a,b){return a.display={y:(K(a,b)-d)/(1+d)},a}),b)})}var d,e,f=a.models.line(),g=a.models.axis(),h=a.models.axis(),i=a.models.legend(),j=a.models.legend(),k=a.interactiveGuideline(),l=a.models.tooltip(),m={top:30,right:30,bottom:50,left:60},n=a.utils.defaultColor(),o=null,p=null,q=!0,r=!0,s=!0,t=!1,u=!0,v=!1,w=!0,x=f.id(),y=a.utils.state(),z=null,A=null,B=function(a){return a.average},C=d3.dispatch("stateChange","changeState","renderEnd"),D=250,E=!1;y.index=0,y.rescaleY=w,g.orient("bottom").tickPadding(7),h.orient(t?"right":"left"),l.valueFormatter(function(a,b){return h.tickFormat()(a,b)}).headerFormatter(function(a,b){return g.tickFormat()(a,b)}),j.updateState(!1);var F=d3.scale.linear(),G={i:0,x:0},H=a.utils.renderWatch(C,D),I=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),index:G.i,rescaleY:w}}},J=function(a){return function(b){void 0!==b.index&&(G.i=b.index),void 0!==b.rescaleY&&(w=b.rescaleY),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};f.dispatch.on("elementMouseover.tooltip",function(a){var c={x:b.x()(a.point),y:b.y()(a.point),color:a.point.color};a.point=c,l.data(a).position(a.pos).hidden(!1)}),f.dispatch.on("elementMouseout.tooltip",function(){l.hidden(!0)});var K=null;return b.dispatch=C,b.lines=f,b.legend=i,b.controls=j,b.xAxis=g,b.yAxis=h,b.interactiveLayer=k,b.state=y,b.tooltip=l,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return o},set:function(a){o=a}},height:{get:function(){return p},set:function(a){p=a}},rescaleY:{get:function(){return w},set:function(a){w=a}},showControls:{get:function(){return u},set:function(a){u=a}},showLegend:{get:function(){return q},set:function(a){q=a}},average:{get:function(){return B},set:function(a){B=a}},defaultState:{get:function(){return z},set:function(a){z=a}},noData:{get:function(){return A},set:function(a){A=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},noErrorCheck:{get:function(){return E},set:function(a){E=a}},tooltips:{get:function(){return l.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),l.enabled(!!b)}},tooltipContent:{get:function(){return l.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),l.contentGenerator(b)}},margin:{get:function(){return m},set:function(a){m.top=void 0!==a.top?a.top:m.top,m.right=void 0!==a.right?a.right:m.right,m.bottom=void 0!==a.bottom?a.bottom:m.bottom,m.left=void 0!==a.left?a.left:m.left}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),i.color(n)}},useInteractiveGuideline:{get:function(){return v},set:function(a){v=a,a===!0&&(b.interactive(!1),b.useVoronoi(!1))}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,h.orient(a?"right":"left")}},duration:{get:function(){return D},set:function(a){D=a,f.duration(D),g.duration(D),h.duration(D),H.reset(D)}}}),a.utils.inheritOptions(b,f),a.utils.initOptions(b),b},a.models.discreteBar=function(){"use strict";function b(m){return y.reset(),m.each(function(b){var m=k-j.left-j.right,x=l-j.top-j.bottom;c=d3.select(this),a.utils.initSVG(c),b.forEach(function(a,b){a.values.forEach(function(a){a.series=b})});var z=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:p(a,b),y:q(a,b),y0:a.y0}})});n.domain(d||d3.merge(z).map(function(a){return a.x})).rangeBands(f||[0,m],.1),o.domain(e||d3.extent(d3.merge(z).map(function(a){return a.y}).concat(r))),o.range(t?g||[x-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]:g||[x,0]),h=h||n,i=i||o.copy().range([o(0),o(0)]);{var A=c.selectAll("g.nv-wrap.nv-discretebar").data([b]),B=A.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),C=B.append("g");A.select("g")}C.append("g").attr("class","nv-groups"),A.attr("transform","translate("+j.left+","+j.top+")");var D=A.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});D.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),D.exit().watchTransition(y,"discreteBar: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),D.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),D.watchTransition(y,"discreteBar: groups").style("stroke-opacity",1).style("fill-opacity",.75);var E=D.selectAll("g.nv-bar").data(function(a){return a.values});E.exit().remove();var F=E.enter().append("g").attr("transform",function(a,b){return"translate("+(n(p(a,b))+.05*n.rangeBand())+", "+o(0)+")"}).on("mouseover",function(a,b){d3.select(this).classed("hover",!0),v.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),v.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){v.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){v.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}).on("dblclick",function(a,b){v.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()});F.append("rect").attr("height",0).attr("width",.9*n.rangeBand()/b.length),t?(F.append("text").attr("text-anchor","middle"),E.select("text").text(function(a,b){return u(q(a,b))}).watchTransition(y,"discreteBar: bars text").attr("x",.9*n.rangeBand()/2).attr("y",function(a,b){return q(a,b)<0?o(q(a,b))-o(0)+12:-4})):E.selectAll("text").remove(),E.attr("class",function(a,b){return q(a,b)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(a,b){return a.color||s(a,b)}).style("stroke",function(a,b){return a.color||s(a,b)}).select("rect").attr("class",w).watchTransition(y,"discreteBar: bars rect").attr("width",.9*n.rangeBand()/b.length),E.watchTransition(y,"discreteBar: bars").attr("transform",function(a,b){var c=n(p(a,b))+.05*n.rangeBand(),d=q(a,b)<0?o(0):o(0)-o(q(a,b))<1?o(0)-1:o(q(a,b));return"translate("+c+", "+d+")"}).select("rect").attr("height",function(a,b){return Math.max(Math.abs(o(q(a,b))-o(e&&e[0]||0))||1)}),h=n.copy(),i=o.copy()}),y.renderEnd("discreteBar immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=d3.scale.ordinal(),o=d3.scale.linear(),p=function(a){return a.x},q=function(a){return a.y},r=[0],s=a.utils.defaultColor(),t=!1,u=d3.format(",.2f"),v=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),w="discreteBar",x=250,y=a.utils.renderWatch(v,x);return b.dispatch=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},forceY:{get:function(){return r},set:function(a){r=a}},showValues:{get:function(){return t},set:function(a){t=a}},x:{get:function(){return p},set:function(a){p=a}},y:{get:function(){return q},set:function(a){q=a}},xScale:{get:function(){return n},set:function(a){n=a}},yScale:{get:function(){return o},set:function(a){o=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},valueFormat:{get:function(){return u},set:function(a){u=a}},id:{get:function(){return m},set:function(a){m=a}},rectClass:{get:function(){return w},set:function(a){w=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},color:{get:function(){return s},set:function(b){s=a.utils.getColor(b)}},duration:{get:function(){return x},set:function(a){x=a,y.reset(x)}}}),a.utils.initOptions(b),b},a.models.discreteBarChart=function(){"use strict";function b(h){return t.reset(),t.models(e),m&&t.models(f),n&&t.models(g),h.each(function(h){var l=d3.select(this);a.utils.initSVG(l);var q=a.utils.availableWidth(j,l,i),t=a.utils.availableHeight(k,l,i);if(b.update=function(){r.beforeUpdate(),l.transition().duration(s).call(b)},b.container=this,!(h&&h.length&&h.filter(function(a){return a.values.length}).length))return a.utils.noData(b,l),b;l.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var u=l.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([h]),v=u.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),w=v.append("defs"),x=u.select("g");v.append("g").attr("class","nv-x nv-axis"),v.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),v.append("g").attr("class","nv-barsWrap"),x.attr("transform","translate("+i.left+","+i.top+")"),o&&x.select(".nv-y.nv-axis").attr("transform","translate("+q+",0)"),e.width(q).height(t);var y=x.select(".nv-barsWrap").datum(h.filter(function(a){return!a.disabled}));if(y.transition().call(e),w.append("clipPath").attr("id","nv-x-label-clip-"+e.id()).append("rect"),x.select("#nv-x-label-clip-"+e.id()+" rect").attr("width",c.rangeBand()*(p?2:1)).attr("height",16).attr("x",-c.rangeBand()/(p?1:2)),m){f.scale(c)._ticks(a.utils.calcTicksX(q/100,h)).tickSize(-t,0),x.select(".nv-x.nv-axis").attr("transform","translate(0,"+(d.range()[0]+(e.showValues()&&d.domain()[0]<0?16:0))+")"),x.select(".nv-x.nv-axis").call(f); var z=x.select(".nv-x.nv-axis").selectAll("g");p&&z.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2==0?"5":"17")+")"})}n&&(g.scale(d)._ticks(a.utils.calcTicksY(t/36,h)).tickSize(-q,0),x.select(".nv-y.nv-axis").call(g)),x.select(".nv-zeroLine line").attr("x1",0).attr("x2",q).attr("y1",d(0)).attr("y2",d(0))}),t.renderEnd("discreteBar chart immediate"),b}var c,d,e=a.models.discreteBar(),f=a.models.axis(),g=a.models.axis(),h=a.models.tooltip(),i={top:15,right:10,bottom:50,left:60},j=null,k=null,l=a.utils.getColor(),m=!0,n=!0,o=!1,p=!1,q=null,r=d3.dispatch("beforeUpdate","renderEnd"),s=250;f.orient("bottom").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(o?"right":"left").tickFormat(d3.format(",.1f")),h.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).keyFormatter(function(a,b){return f.tickFormat()(a,b)});var t=a.utils.renderWatch(r,s);return e.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color},h.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){h.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){h.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=r,b.discretebar=e,b.xAxis=f,b.yAxis=g,b.tooltip=h,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return j},set:function(a){j=a}},height:{get:function(){return k},set:function(a){k=a}},staggerLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return m},set:function(a){m=a}},showYAxis:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return q},set:function(a){q=a}},tooltips:{get:function(){return h.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),h.enabled(!!b)}},tooltipContent:{get:function(){return h.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),h.contentGenerator(b)}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},duration:{get:function(){return s},set:function(a){s=a,t.reset(s),e.duration(s),f.duration(s),g.duration(s)}},color:{get:function(){return l},set:function(b){l=a.utils.getColor(b),e.color(l)}},rightAlignYAxis:{get:function(){return o},set:function(a){o=a,g.orient(a?"right":"left")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.distribution=function(){"use strict";function b(k){return m.reset(),k.each(function(b){var k=(e-("x"===g?d.left+d.right:d.top+d.bottom),"x"==g?"y":"x"),l=d3.select(this);a.utils.initSVG(l),c=c||j;var n=l.selectAll("g.nv-distribution").data([b]),o=n.enter().append("g").attr("class","nvd3 nv-distribution"),p=(o.append("g"),n.select("g"));n.attr("transform","translate("+d.left+","+d.top+")");var q=p.selectAll("g.nv-dist").data(function(a){return a},function(a){return a.key});q.enter().append("g"),q.attr("class",function(a,b){return"nv-dist nv-series-"+b}).style("stroke",function(a,b){return i(a,b)});var r=q.selectAll("line.nv-dist"+g).data(function(a){return a.values});r.enter().append("line").attr(g+"1",function(a,b){return c(h(a,b))}).attr(g+"2",function(a,b){return c(h(a,b))}),m.transition(q.exit().selectAll("line.nv-dist"+g),"dist exit").attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}).style("stroke-opacity",0).remove(),r.attr("class",function(a,b){return"nv-dist"+g+" nv-dist"+g+"-"+b}).attr(k+"1",0).attr(k+"2",f),m.transition(r,"dist").attr(g+"1",function(a,b){return j(h(a,b))}).attr(g+"2",function(a,b){return j(h(a,b))}),c=j.copy()}),m.renderEnd("distribution immediate"),b}var c,d={top:0,right:0,bottom:0,left:0},e=400,f=8,g="x",h=function(a){return a[g]},i=a.utils.defaultColor(),j=d3.scale.linear(),k=250,l=d3.dispatch("renderEnd"),m=a.utils.renderWatch(l,k);return b.options=a.utils.optionsFunc.bind(b),b.dispatch=l,b.margin=function(a){return arguments.length?(d.top="undefined"!=typeof a.top?a.top:d.top,d.right="undefined"!=typeof a.right?a.right:d.right,d.bottom="undefined"!=typeof a.bottom?a.bottom:d.bottom,d.left="undefined"!=typeof a.left?a.left:d.left,b):d},b.width=function(a){return arguments.length?(e=a,b):e},b.axis=function(a){return arguments.length?(g=a,b):g},b.size=function(a){return arguments.length?(f=a,b):f},b.getData=function(a){return arguments.length?(h=d3.functor(a),b):h},b.scale=function(a){return arguments.length?(j=a,b):j},b.color=function(c){return arguments.length?(i=a.utils.getColor(c),b):i},b.duration=function(a){return arguments.length?(k=a,m.reset(k),b):k},b},a.models.furiousLegend=function(){"use strict";function b(p){function q(a,b){return"furious"!=o?"#000":m?a.disengaged?g(a,b):"#fff":m?void 0:a.disabled?g(a,b):"#fff"}function r(a,b){return m&&"furious"==o?a.disengaged?"#fff":g(a,b):a.disabled?"#fff":g(a,b)}return p.each(function(b){var p=d-c.left-c.right,s=d3.select(this);a.utils.initSVG(s);var t=s.selectAll("g.nv-legend").data([b]),u=(t.enter().append("g").attr("class","nvd3 nv-legend").append("g"),t.select("g"));t.attr("transform","translate("+c.left+","+c.top+")");var v,w=u.selectAll(".nv-series").data(function(a){return"furious"!=o?a:a.filter(function(a){return m?!0:!a.disengaged})}),x=w.enter().append("g").attr("class","nv-series");if("classic"==o)x.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),v=w.select("circle");else if("furious"==o){x.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),v=w.select("rect"),x.append("g").attr("class","nv-check-box").property("innerHTML",'').attr("transform","translate(-10,-8)scale(0.5)");var y=w.select(".nv-check-box");y.each(function(a,b){d3.select(this).selectAll("path").attr("stroke",q(a,b))})}x.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var z=w.select("text.nv-legend-text");w.on("mouseover",function(a,b){n.legendMouseover(a,b)}).on("mouseout",function(a,b){n.legendMouseout(a,b)}).on("click",function(a,b){n.legendClick(a,b);var c=w.data();if(k){if("classic"==o)l?(c.forEach(function(a){a.disabled=!0}),a.disabled=!1):(a.disabled=!a.disabled,c.every(function(a){return a.disabled})&&c.forEach(function(a){a.disabled=!1}));else if("furious"==o)if(m)a.disengaged=!a.disengaged,a.userDisabled=void 0==a.userDisabled?!!a.disabled:a.userDisabled,a.disabled=a.disengaged||a.userDisabled;else if(!m){a.disabled=!a.disabled,a.userDisabled=a.disabled;var d=c.filter(function(a){return!a.disengaged});d.every(function(a){return a.userDisabled})&&c.forEach(function(a){a.disabled=a.userDisabled=!1})}n.stateChange({disabled:c.map(function(a){return!!a.disabled}),disengaged:c.map(function(a){return!!a.disengaged})})}}).on("dblclick",function(a,b){if(("furious"!=o||!m)&&(n.legendDblclick(a,b),k)){var c=w.data();c.forEach(function(a){a.disabled=!0,"furious"==o&&(a.userDisabled=a.disabled)}),a.disabled=!1,"furious"==o&&(a.userDisabled=a.disabled),n.stateChange({disabled:c.map(function(a){return!!a.disabled})})}}),w.classed("nv-disabled",function(a){return a.userDisabled}),w.exit().remove(),z.attr("fill",q).text(f);var A;switch(o){case"furious":A=23;break;case"classic":A=20}if(h){var B=[];w.each(function(){var b,c=d3.select(this).select("text");try{if(b=c.node().getComputedTextLength(),0>=b)throw Error()}catch(d){b=a.utils.calcApproxTextWidth(c)}B.push(b+i)});for(var C=0,D=0,E=[];p>D&&Cp&&C>1;){E=[],C--;for(var F=0;F(E[F%C]||0)&&(E[F%C]=B[F]);D=E.reduce(function(a,b){return a+b})}for(var G=[],H=0,I=0;C>H;H++)G[H]=I,I+=E[H];w.attr("transform",function(a,b){return"translate("+G[b%C]+","+(5+Math.floor(b/C)*A)+")"}),j?u.attr("transform","translate("+(d-c.right-D)+","+c.top+")"):u.attr("transform","translate(0,"+c.top+")"),e=c.top+c.bottom+Math.ceil(B.length/C)*A}else{var J,K=5,L=5,M=0;w.attr("transform",function(){var a=d3.select(this).select("text").node().getComputedTextLength()+i;return J=L,dM&&(M=L),"translate("+J+","+K+")"}),u.attr("transform","translate("+(d-c.right-M)+","+c.top+")"),e=c.top+c.bottom+K+15}"furious"==o&&v.attr("width",function(a,b){return z[0][b].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),v.style("fill",r).style("stroke",function(a,b){return a.color||g(a,b)})}),b}var c={top:5,right:0,bottom:5,left:0},d=400,e=20,f=function(a){return a.key},g=a.utils.getColor(),h=!0,i=28,j=!0,k=!0,l=!1,m=!1,n=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),o="classic";return b.dispatch=n,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},key:{get:function(){return f},set:function(a){f=a}},align:{get:function(){return h},set:function(a){h=a}},rightAlign:{get:function(){return j},set:function(a){j=a}},padding:{get:function(){return i},set:function(a){i=a}},updateState:{get:function(){return k},set:function(a){k=a}},radioButtonMode:{get:function(){return l},set:function(a){l=a}},expanded:{get:function(){return m},set:function(a){m=a}},vers:{get:function(){return o},set:function(a){o=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return g},set:function(b){g=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.historicalBar=function(){"use strict";function b(x){return x.each(function(b){w.reset(),k=d3.select(this);var x=a.utils.availableWidth(h,k,g),y=a.utils.availableHeight(i,k,g);a.utils.initSVG(k),l.domain(c||d3.extent(b[0].values.map(n).concat(p))),l.range(r?e||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]:e||[0,x]),m.domain(d||d3.extent(b[0].values.map(o).concat(q))).range(f||[y,0]),l.domain()[0]===l.domain()[1]&&l.domain(l.domain()[0]?[l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]:[-1,1]);var z=k.selectAll("g.nv-wrap.nv-historicalBar-"+j).data([b[0].values]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+j),B=A.append("defs"),C=A.append("g"),D=z.select("g");C.append("g").attr("class","nv-bars"),z.attr("transform","translate("+g.left+","+g.top+")"),k.on("click",function(a,b){u.chartClick({data:a,index:b,pos:d3.event,id:j})}),B.append("clipPath").attr("id","nv-chart-clip-path-"+j).append("rect"),z.select("#nv-chart-clip-path-"+j+" rect").attr("width",x).attr("height",y),D.attr("clip-path",s?"url(#nv-chart-clip-path-"+j+")":"");var E=z.select(".nv-bars").selectAll(".nv-bar").data(function(a){return a},function(a,b){return n(a,b)});E.exit().remove(),E.enter().append("rect").attr("x",0).attr("y",function(b,c){return a.utils.NaNtoZero(m(Math.max(0,o(b,c))))}).attr("height",function(b,c){return a.utils.NaNtoZero(Math.abs(m(o(b,c))-m(0)))}).attr("transform",function(a,c){return"translate("+(l(n(a,c))-x/b[0].values.length*.45)+",0)"}).on("mouseover",function(a,b){v&&(d3.select(this).classed("hover",!0),u.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")}))}).on("mouseout",function(a,b){v&&(d3.select(this).classed("hover",!1),u.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")}))}).on("mousemove",function(a,b){v&&u.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){v&&(u.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}).on("dblclick",function(a,b){v&&(u.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}),E.attr("fill",function(a,b){return t(a,b)}).attr("class",function(a,b,c){return(o(a,b)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+c+"-"+b}).watchTransition(w,"bars").attr("transform",function(a,c){return"translate("+(l(n(a,c))-x/b[0].values.length*.45)+",0)"}).attr("width",x/b[0].values.length*.9),E.watchTransition(w,"bars").attr("y",function(b,c){var d=o(b,c)<0?m(0):m(0)-m(o(b,c))<1?m(0)-1:m(o(b,c));return a.utils.NaNtoZero(d)}).attr("height",function(b,c){return a.utils.NaNtoZero(Math.max(Math.abs(m(o(b,c))-m(0)),1))})}),w.renderEnd("historicalBar immediate"),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=Math.floor(1e4*Math.random()),k=null,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=[],q=[0],r=!1,s=!0,t=a.utils.defaultColor(),u=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),v=!0,w=a.utils.renderWatch(u,0);return b.highlightPoint=function(a,b){k.select(".nv-bars .nv-bar-0-"+a).classed("hover",b)},b.clearHighlights=function(){k.select(".nv-bars .nv-bar.hover").classed("hover",!1)},b.dispatch=u,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},forceX:{get:function(){return p},set:function(a){p=a}},forceY:{get:function(){return q},set:function(a){q=a}},padData:{get:function(){return r},set:function(a){r=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},clipEdge:{get:function(){return s},set:function(a){s=a}},id:{get:function(){return j},set:function(a){j=a}},interactive:{get:function(){return v},set:function(a){v=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},color:{get:function(){return t},set:function(b){t=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.historicalBarChart=function(b){"use strict";function c(b){return b.each(function(k){z.reset(),z.models(f),q&&z.models(g),r&&z.models(h);var w=d3.select(this),A=this;a.utils.initSVG(w);var B=a.utils.availableWidth(n,w,l),C=a.utils.availableHeight(o,w,l);if(c.update=function(){w.transition().duration(y).call(c)},c.container=this,u.disabled=k.map(function(a){return!!a.disabled}),!v){var D;v={};for(D in u)v[D]=u[D]instanceof Array?u[D].slice(0):u[D]}if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(c,w),c;w.selectAll(".nv-noData").remove(),d=f.xScale(),e=f.yScale();var E=w.selectAll("g.nv-wrap.nv-historicalBarChart").data([k]),F=E.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g"),G=E.select("g");F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y nv-axis"),F.append("g").attr("class","nv-barsWrap"),F.append("g").attr("class","nv-legendWrap"),F.append("g").attr("class","nv-interactive"),p&&(i.width(B),G.select(".nv-legendWrap").datum(k).call(i),l.top!=i.height()&&(l.top=i.height(),C=a.utils.availableHeight(o,w,l)),E.select(".nv-legendWrap").attr("transform","translate(0,"+-l.top+")")),E.attr("transform","translate("+l.left+","+l.top+")"),s&&G.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)"),t&&(j.width(B).height(C).margin({left:l.left,top:l.top}).svgContainer(w).xScale(d),E.select(".nv-interactive").call(j)),f.width(B).height(C).color(k.map(function(a,b){return a.color||m(a,b)}).filter(function(a,b){return!k[b].disabled}));var H=G.select(".nv-barsWrap").datum(k.filter(function(a){return!a.disabled}));H.transition().call(f),q&&(g.scale(d)._ticks(a.utils.calcTicksX(B/100,k)).tickSize(-C,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+e.range()[0]+")"),G.select(".nv-x.nv-axis").transition().call(g)),r&&(h.scale(e)._ticks(a.utils.calcTicksY(C/36,k)).tickSize(-B,0),G.select(".nv-y.nv-axis").transition().call(h)),j.dispatch.on("elementMousemove",function(b){f.clearHighlights();var d,e,i,n=[];k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(g){e=a.interactiveBisect(g.values,b.pointXValue,c.x()),f.highlightPoint(e,!0);var h=g.values[e];void 0!==h&&(void 0===d&&(d=h),void 0===i&&(i=c.xScale()(c.x()(h,e))),n.push({key:g.key,value:c.y()(h,e),color:m(g,g.seriesIndex),data:g.values[e]}))});var o=g.tickFormat()(c.x()(d,e));j.tooltip.position({left:i+l.left,top:b.mouseY+l.top}).chartContainer(A.parentNode).valueFormatter(function(a){return h.tickFormat()(a)}).data({value:o,index:e,series:n})(),j.renderGuideLine(i)}),j.dispatch.on("elementMouseout",function(){x.tooltipHide(),f.clearHighlights()}),i.dispatch.on("legendClick",function(a){a.disabled=!a.disabled,k.filter(function(a){return!a.disabled}).length||k.map(function(a){return a.disabled=!1,E.selectAll(".nv-series").classed("disabled",!1),a}),u.disabled=k.map(function(a){return!!a.disabled}),x.stateChange(u),b.transition().call(c)}),i.dispatch.on("legendDblclick",function(a){k.forEach(function(a){a.disabled=!0}),a.disabled=!1,u.disabled=k.map(function(a){return!!a.disabled}),x.stateChange(u),c.update()}),x.on("changeState",function(a){"undefined"!=typeof a.disabled&&(k.forEach(function(b,c){b.disabled=a.disabled[c]}),u.disabled=a.disabled),c.update()})}),z.renderEnd("historicalBarChart immediate"),c}var d,e,f=b||a.models.historicalBar(),g=a.models.axis(),h=a.models.axis(),i=a.models.legend(),j=a.interactiveGuideline(),k=a.models.tooltip(),l={top:30,right:90,bottom:50,left:90},m=a.utils.defaultColor(),n=null,o=null,p=!1,q=!0,r=!0,s=!1,t=!1,u={},v=null,w=null,x=d3.dispatch("tooltipHide","stateChange","changeState","renderEnd"),y=250;g.orient("bottom").tickPadding(7),h.orient(s?"right":"left"),k.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return h.tickFormat()(a,b)}).headerFormatter(function(a,b){return g.tickFormat()(a,b)});var z=a.utils.renderWatch(x,0);return f.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:c.x()(a.data),value:c.y()(a.data),color:a.color},k.data(a).hidden(!1)}),f.dispatch.on("elementMouseout.tooltip",function(){k.hidden(!0)}),f.dispatch.on("elementMousemove.tooltip",function(){k.position({top:d3.event.pageY,left:d3.event.pageX})()}),c.dispatch=x,c.bars=f,c.legend=i,c.xAxis=g,c.yAxis=h,c.interactiveLayer=j,c.tooltip=k,c.options=a.utils.optionsFunc.bind(c),c._options=Object.create({},{width:{get:function(){return n},set:function(a){n=a}},height:{get:function(){return o},set:function(a){o=a}},showLegend:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return q},set:function(a){q=a}},showYAxis:{get:function(){return r},set:function(a){r=a}},defaultState:{get:function(){return v},set:function(a){v=a}},noData:{get:function(){return w},set:function(a){w=a}},tooltips:{get:function(){return k.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),k.enabled(!!b)}},tooltipContent:{get:function(){return k.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),k.contentGenerator(b)}},margin:{get:function(){return l},set:function(a){l.top=void 0!==a.top?a.top:l.top,l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},color:{get:function(){return m},set:function(b){m=a.utils.getColor(b),i.color(m),f.color(m)}},duration:{get:function(){return y},set:function(a){y=a,z.reset(y),h.duration(y),g.duration(y)}},rightAlignYAxis:{get:function(){return s},set:function(a){s=a,h.orient(a?"right":"left")}},useInteractiveGuideline:{get:function(){return t},set:function(a){t=a,a===!0&&c.interactive(!1)}}}),a.utils.inheritOptions(c,f),a.utils.initOptions(c),c},a.models.ohlcBarChart=function(){var b=a.models.historicalBarChart(a.models.ohlcBar());return b.useInteractiveGuideline(!0),b.interactiveLayer.tooltip.contentGenerator(function(a){var c=a.series[0].data,d=c.open'+a.value+"
open:"+b.yAxis.tickFormat()(c.open)+"
close:"+b.yAxis.tickFormat()(c.close)+"
high"+b.yAxis.tickFormat()(c.high)+"
low:"+b.yAxis.tickFormat()(c.low)+"
"}),b},a.models.candlestickBarChart=function(){var b=a.models.historicalBarChart(a.models.candlestickBar());return b.useInteractiveGuideline(!0),b.interactiveLayer.tooltip.contentGenerator(function(a){var c=a.series[0].data,d=c.open'+a.value+"
open:"+b.yAxis.tickFormat()(c.open)+"
close:"+b.yAxis.tickFormat()(c.close)+"
high"+b.yAxis.tickFormat()(c.high)+"
low:"+b.yAxis.tickFormat()(c.low)+"
"}),b},a.models.legend=function(){"use strict";function b(p){function q(a,b){return"furious"!=o?"#000":m?a.disengaged?"#000":"#fff":m?void 0:(a.color||(a.color=g(a,b)),a.disabled?a.color:"#fff")}function r(a,b){return m&&"furious"==o&&a.disengaged?"#eee":a.color||g(a,b)}function s(a){return m&&"furious"==o?1:a.disabled?0:1}return p.each(function(b){var g=d-c.left-c.right,p=d3.select(this);a.utils.initSVG(p);var t=p.selectAll("g.nv-legend").data([b]),u=t.enter().append("g").attr("class","nvd3 nv-legend").append("g"),v=t.select("g");t.attr("transform","translate("+c.left+","+c.top+")");var w,x,y=v.selectAll(".nv-series").data(function(a){return"furious"!=o?a:a.filter(function(a){return m?!0:!a.disengaged})}),z=y.enter().append("g").attr("class","nv-series");switch(o){case"furious":x=23;break;case"classic":x=20}if("classic"==o)z.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),w=y.select("circle");else if("furious"==o){z.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),w=y.select(".nv-legend-symbol"),z.append("g").attr("class","nv-check-box").property("innerHTML",'').attr("transform","translate(-10,-8)scale(0.5)");var A=y.select(".nv-check-box");A.each(function(a,b){d3.select(this).selectAll("path").attr("stroke",q(a,b))})}z.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var B=y.select("text.nv-legend-text");y.on("mouseover",function(a,b){n.legendMouseover(a,b)}).on("mouseout",function(a,b){n.legendMouseout(a,b)}).on("click",function(a,b){n.legendClick(a,b);var c=y.data();if(k){if("classic"==o)l?(c.forEach(function(a){a.disabled=!0}),a.disabled=!1):(a.disabled=!a.disabled,c.every(function(a){return a.disabled})&&c.forEach(function(a){a.disabled=!1}));else if("furious"==o)if(m)a.disengaged=!a.disengaged,a.userDisabled=void 0==a.userDisabled?!!a.disabled:a.userDisabled,a.disabled=a.disengaged||a.userDisabled;else if(!m){a.disabled=!a.disabled,a.userDisabled=a.disabled;var d=c.filter(function(a){return!a.disengaged});d.every(function(a){return a.userDisabled})&&c.forEach(function(a){a.disabled=a.userDisabled=!1})}n.stateChange({disabled:c.map(function(a){return!!a.disabled}),disengaged:c.map(function(a){return!!a.disengaged})})}}).on("dblclick",function(a,b){if(("furious"!=o||!m)&&(n.legendDblclick(a,b),k)){var c=y.data();c.forEach(function(a){a.disabled=!0,"furious"==o&&(a.userDisabled=a.disabled)}),a.disabled=!1,"furious"==o&&(a.userDisabled=a.disabled),n.stateChange({disabled:c.map(function(a){return!!a.disabled})})}}),y.classed("nv-disabled",function(a){return a.userDisabled}),y.exit().remove(),B.attr("fill",q).text(f);var C=0;if(h){var D=[];y.each(function(){var b,c=d3.select(this).select("text");try{if(b=c.node().getComputedTextLength(),0>=b)throw Error()}catch(d){b=a.utils.calcApproxTextWidth(c)}D.push(b+i)});var E=0,F=[];for(C=0;g>C&&Eg&&E>1;){F=[],E--;for(var G=0;G(F[G%E]||0)&&(F[G%E]=D[G]);C=F.reduce(function(a,b){return a+b})}for(var H=[],I=0,J=0;E>I;I++)H[I]=J,J+=F[I];y.attr("transform",function(a,b){return"translate("+H[b%E]+","+(5+Math.floor(b/E)*x)+")"}),j?v.attr("transform","translate("+(d-c.right-C)+","+c.top+")"):v.attr("transform","translate(0,"+c.top+")"),e=c.top+c.bottom+Math.ceil(D.length/E)*x}else{var K,L=5,M=5,N=0;y.attr("transform",function(){var a=d3.select(this).select("text").node().getComputedTextLength()+i;return K=M,dN&&(N=M),K+N>C&&(C=K+N),"translate("+K+","+L+")"}),v.attr("transform","translate("+(d-c.right-N)+","+c.top+")"),e=c.top+c.bottom+L+15}if("furious"==o){w.attr("width",function(a,b){return B[0][b].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),u.insert("rect",":first-child").attr("class","nv-legend-bg").attr("fill","#eee").attr("opacity",0);var O=v.select(".nv-legend-bg");O.transition().duration(300).attr("x",-x).attr("width",C+x-12).attr("height",e+10).attr("y",-c.top-10).attr("opacity",m?1:0)}w.style("fill",r).style("fill-opacity",s).style("stroke",r)}),b}var c={top:5,right:0,bottom:5,left:0},d=400,e=20,f=function(a){return a.key},g=a.utils.getColor(),h=!0,i=32,j=!0,k=!0,l=!1,m=!1,n=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),o="classic";return b.dispatch=n,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},key:{get:function(){return f},set:function(a){f=a}},align:{get:function(){return h},set:function(a){h=a}},rightAlign:{get:function(){return j},set:function(a){j=a}},padding:{get:function(){return i},set:function(a){i=a}},updateState:{get:function(){return k},set:function(a){k=a}},radioButtonMode:{get:function(){return l},set:function(a){l=a}},expanded:{get:function(){return m},set:function(a){m=a}},vers:{get:function(){return o},set:function(a){o=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return g},set:function(b){g=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.line=function(){"use strict";function b(r){return v.reset(),v.models(e),r.each(function(b){i=d3.select(this);var r=a.utils.availableWidth(g,i,f),s=a.utils.availableHeight(h,i,f);a.utils.initSVG(i),c=e.xScale(),d=e.yScale(),t=t||c,u=u||d;var w=i.selectAll("g.nv-wrap.nv-line").data([b]),x=w.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),y=x.append("defs"),z=x.append("g"),A=w.select("g");z.append("g").attr("class","nv-groups"),z.append("g").attr("class","nv-scatterWrap"),w.attr("transform","translate("+f.left+","+f.top+")"),e.width(r).height(s);var B=w.select(".nv-scatterWrap");B.call(e),y.append("clipPath").attr("id","nv-edge-clip-"+e.id()).append("rect"),w.select("#nv-edge-clip-"+e.id()+" rect").attr("width",r).attr("height",s>0?s:0),A.attr("clip-path",p?"url(#nv-edge-clip-"+e.id()+")":""),B.attr("clip-path",p?"url(#nv-edge-clip-"+e.id()+")":"");var C=w.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});C.enter().append("g").style("stroke-opacity",1e-6).style("stroke-width",function(a){return a.strokeWidth||j}).style("fill-opacity",1e-6),C.exit().remove(),C.attr("class",function(a,b){return(a.classed||"")+" nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return k(a,b)}).style("stroke",function(a,b){return k(a,b)}),C.watchTransition(v,"line: groups").style("stroke-opacity",1).style("fill-opacity",function(a){return a.fillOpacity||.5});var D=C.selectAll("path.nv-area").data(function(a){return o(a)?[a]:[]});D.enter().append("path").attr("class","nv-area").attr("d",function(b){return d3.svg.area().interpolate(q).defined(n).x(function(b,c){return a.utils.NaNtoZero(t(l(b,c)))}).y0(function(b,c){return a.utils.NaNtoZero(u(m(b,c)))}).y1(function(){return u(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[b.values])}),C.exit().selectAll("path.nv-area").remove(),D.watchTransition(v,"line: areaPaths").attr("d",function(b){return d3.svg.area().interpolate(q).defined(n).x(function(b,d){return a.utils.NaNtoZero(c(l(b,d)))}).y0(function(b,c){return a.utils.NaNtoZero(d(m(b,c)))}).y1(function(){return d(d.domain()[0]<=0?d.domain()[1]>=0?0:d.domain()[1]:d.domain()[0])}).apply(this,[b.values])});var E=C.selectAll("path.nv-line").data(function(a){return[a.values]});E.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(q).defined(n).x(function(b,c){return a.utils.NaNtoZero(t(l(b,c)))}).y(function(b,c){return a.utils.NaNtoZero(u(m(b,c)))})),E.watchTransition(v,"line: linePaths").attr("d",d3.svg.line().interpolate(q).defined(n).x(function(b,d){return a.utils.NaNtoZero(c(l(b,d)))}).y(function(b,c){return a.utils.NaNtoZero(d(m(b,c)))})),t=c.copy(),u=d.copy()}),v.renderEnd("line immediate"),b}var c,d,e=a.models.scatter(),f={top:0,right:0,bottom:0,left:0},g=960,h=500,i=null,j=1.5,k=a.utils.defaultColor(),l=function(a){return a.x},m=function(a){return a.y},n=function(a,b){return!isNaN(m(a,b))&&null!==m(a,b)},o=function(a){return a.area},p=!1,q="linear",r=250,s=d3.dispatch("elementClick","elementMouseover","elementMouseout","renderEnd");e.pointSize(16).pointDomain([16,256]);var t,u,v=a.utils.renderWatch(s,r);return b.dispatch=s,b.scatter=e,e.dispatch.on("elementClick",function(){s.elementClick.apply(this,arguments)}),e.dispatch.on("elementMouseover",function(){s.elementMouseover.apply(this,arguments)}),e.dispatch.on("elementMouseout",function(){s.elementMouseout.apply(this,arguments)}),b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},defined:{get:function(){return n},set:function(a){n=a}},interpolate:{get:function(){return q},set:function(a){q=a}},clipEdge:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}},duration:{get:function(){return r},set:function(a){r=a,v.reset(r),e.duration(r)}},isArea:{get:function(){return o},set:function(a){o=d3.functor(a)}},x:{get:function(){return l},set:function(a){l=a,e.x(a)}},y:{get:function(){return m},set:function(a){m=a,e.y(a)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.lineChart=function(){"use strict";function b(j){return y.reset(),y.models(e),p&&y.models(f),q&&y.models(g),j.each(function(j){var v=d3.select(this),y=this;a.utils.initSVG(v);var B=a.utils.availableWidth(m,v,k),C=a.utils.availableHeight(n,v,k);if(b.update=function(){0===x?v.call(b):v.transition().duration(x).call(b)},b.container=this,t.setter(A(j),b.update).getter(z(j)).update(),t.disabled=j.map(function(a){return!!a.disabled}),!u){var D;u={};for(D in t)u[D]=t[D]instanceof Array?t[D].slice(0):t[D] }if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,v),b;v.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var E=v.selectAll("g.nv-wrap.nv-lineChart").data([j]),F=E.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),G=E.select("g");F.append("rect").style("opacity",0),F.append("g").attr("class","nv-x nv-axis"),F.append("g").attr("class","nv-y nv-axis"),F.append("g").attr("class","nv-linesWrap"),F.append("g").attr("class","nv-legendWrap"),F.append("g").attr("class","nv-interactive"),G.select("rect").attr("width",B).attr("height",C>0?C:0),o&&(h.width(B),G.select(".nv-legendWrap").datum(j).call(h),k.top!=h.height()&&(k.top=h.height(),C=a.utils.availableHeight(n,v,k)),E.select(".nv-legendWrap").attr("transform","translate(0,"+-k.top+")")),E.attr("transform","translate("+k.left+","+k.top+")"),r&&G.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)"),s&&(i.width(B).height(C).margin({left:k.left,top:k.top}).svgContainer(v).xScale(c),E.select(".nv-interactive").call(i)),e.width(B).height(C).color(j.map(function(a,b){return a.color||l(a,b)}).filter(function(a,b){return!j[b].disabled}));var H=G.select(".nv-linesWrap").datum(j.filter(function(a){return!a.disabled}));H.call(e),p&&(f.scale(c)._ticks(a.utils.calcTicksX(B/100,j)).tickSize(-C,0),G.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),G.select(".nv-x.nv-axis").call(f)),q&&(g.scale(d)._ticks(a.utils.calcTicksY(C/36,j)).tickSize(-B,0),G.select(".nv-y.nv-axis").call(g)),h.dispatch.on("stateChange",function(a){for(var c in a)t[c]=a[c];w.stateChange(t),b.update()}),i.dispatch.on("elementMousemove",function(c){e.clearHighlights();var d,h,m,n=[];if(j.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(f,g){h=a.interactiveBisect(f.values,c.pointXValue,b.x());var i=f.values[h],j=b.y()(i,h);null!=j&&e.highlightPoint(g,h,!0),void 0!==i&&(void 0===d&&(d=i),void 0===m&&(m=b.xScale()(b.x()(i,h))),n.push({key:f.key,value:j,color:l(f,f.seriesIndex)}))}),n.length>2){var o=b.yScale().invert(c.mouseY),p=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),q=.03*p,r=a.nearestValueIndex(n.map(function(a){return a.value}),o,q);null!==r&&(n[r].highlight=!0)}var s=f.tickFormat()(b.x()(d,h));i.tooltip.position({left:c.mouseX+k.left,top:c.mouseY+k.top}).chartContainer(y.parentNode).valueFormatter(function(a){return null==a?"N/A":g.tickFormat()(a)}).data({value:s,index:h,series:n})(),i.renderGuideLine(m)}),i.dispatch.on("elementClick",function(c){var d,f=[];j.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(e){var g=a.interactiveBisect(e.values,c.pointXValue,b.x()),h=e.values[g];if("undefined"!=typeof h){"undefined"==typeof d&&(d=b.xScale()(b.x()(h,g)));var i=b.yScale()(b.y()(h,g));f.push({point:h,pointIndex:g,pos:[d,i],seriesIndex:e.seriesIndex,series:e})}}),e.dispatch.elementClick(f)}),i.dispatch.on("elementMouseout",function(){e.clearHighlights()}),w.on("changeState",function(a){"undefined"!=typeof a.disabled&&j.length===a.disabled.length&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),t.disabled=a.disabled),b.update()})}),y.renderEnd("lineChart immediate"),b}var c,d,e=a.models.line(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.interactiveGuideline(),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=a.utils.defaultColor(),m=null,n=null,o=!0,p=!0,q=!0,r=!1,s=!1,t=a.utils.state(),u=null,v=null,w=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd"),x=250;f.orient("bottom").tickPadding(7),g.orient(r?"right":"left"),j.valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)});var y=a.utils.renderWatch(w,x),z=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},A=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return e.dispatch.on("elementMouseover.tooltip",function(a){j.data(a).position(a.pos).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){j.hidden(!0)}),b.dispatch=w,b.lines=e,b.legend=h,b.xAxis=f,b.yAxis=g,b.interactiveLayer=i,b.tooltip=j,b.dispatch=w,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return o},set:function(a){o=a}},showXAxis:{get:function(){return p},set:function(a){p=a}},showYAxis:{get:function(){return q},set:function(a){q=a}},defaultState:{get:function(){return u},set:function(a){u=a}},noData:{get:function(){return v},set:function(a){v=a}},tooltips:{get:function(){return j.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),j.enabled(!!b)}},tooltipContent:{get:function(){return j.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),j.contentGenerator(b)}},margin:{get:function(){return k},set:function(a){k.top=void 0!==a.top?a.top:k.top,k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return x},set:function(a){x=a,y.reset(x),e.duration(x),f.duration(x),g.duration(x)}},color:{get:function(){return l},set:function(b){l=a.utils.getColor(b),h.color(l),e.color(l)}},rightAlignYAxis:{get:function(){return r},set:function(a){r=a,g.orient(r?"right":"left")}},useInteractiveGuideline:{get:function(){return s},set:function(a){s=a,s&&(e.interactive(!1),e.useVoronoi(!1))}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.linePlusBarChart=function(){"use strict";function b(v){return v.each(function(v){function J(a){var b=+("e"==a),c=b?1:-1,d=X/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function S(){u.empty()||u.extent(I),kb.data([u.empty()?e.domain():I]).each(function(a){var b=e(a[0])-e.range()[0],c=e.range()[1]-e(a[1]);d3.select(this).select(".left").attr("width",0>b?0:b),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>c?0:c)})}function T(){I=u.empty()?null:u.extent(),c=u.empty()?e.domain():u.extent(),K.brush({extent:c,brush:u}),S(),l.width(V).height(W).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&v[b].bar})),j.width(V).height(W).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&!v[b].bar}));var b=db.select(".nv-focus .nv-barsWrap").datum(Z.length?Z.map(function(a){return{key:a.key,values:a.values.filter(function(a,b){return l.x()(a,b)>=c[0]&&l.x()(a,b)<=c[1]})}}):[{values:[]}]),h=db.select(".nv-focus .nv-linesWrap").datum($[0].disabled?[{values:[]}]:$.map(function(a){return{area:a.area,fillOpacity:a.fillOpacity,key:a.key,values:a.values.filter(function(a,b){return j.x()(a,b)>=c[0]&&j.x()(a,b)<=c[1]})}}));d=Z.length?l.xScale():j.xScale(),n.scale(d)._ticks(a.utils.calcTicksX(V/100,v)).tickSize(-W,0),n.domain([Math.ceil(c[0]),Math.floor(c[1])]),db.select(".nv-x.nv-axis").transition().duration(L).call(n),b.transition().duration(L).call(l),h.transition().duration(L).call(j),db.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),p.scale(f)._ticks(a.utils.calcTicksY(W/36,v)).tickSize(-V,0),q.scale(g)._ticks(a.utils.calcTicksY(W/36,v)).tickSize(Z.length?0:-V,0),db.select(".nv-focus .nv-y1.nv-axis").style("opacity",Z.length?1:0),db.select(".nv-focus .nv-y2.nv-axis").style("opacity",$.length&&!$[0].disabled?1:0).attr("transform","translate("+d.range()[1]+",0)"),db.select(".nv-focus .nv-y1.nv-axis").transition().duration(L).call(p),db.select(".nv-focus .nv-y2.nv-axis").transition().duration(L).call(q)}var U=d3.select(this);a.utils.initSVG(U);var V=a.utils.availableWidth(y,U,w),W=a.utils.availableHeight(z,U,w)-(E?H:0),X=H-x.top-x.bottom;if(b.update=function(){U.transition().duration(L).call(b)},b.container=this,M.setter(R(v),b.update).getter(Q(v)).update(),M.disabled=v.map(function(a){return!!a.disabled}),!N){var Y;N={};for(Y in M)N[Y]=M[Y]instanceof Array?M[Y].slice(0):M[Y]}if(!(v&&v.length&&v.filter(function(a){return a.values.length}).length))return a.utils.noData(b,U),b;U.selectAll(".nv-noData").remove();var Z=v.filter(function(a){return!a.disabled&&a.bar}),$=v.filter(function(a){return!a.bar});d=l.xScale(),e=o.scale(),f=l.yScale(),g=j.yScale(),h=m.yScale(),i=k.yScale();var _=v.filter(function(a){return!a.disabled&&a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})}),ab=v.filter(function(a){return!a.disabled&&!a.bar}).map(function(a){return a.values.map(function(a,b){return{x:A(a,b),y:B(a,b)}})});d.range([0,V]),e.domain(d3.extent(d3.merge(_.concat(ab)),function(a){return a.x})).range([0,V]);var bb=U.selectAll("g.nv-wrap.nv-linePlusBar").data([v]),cb=bb.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),db=bb.select("g");cb.append("g").attr("class","nv-legendWrap");var eb=cb.append("g").attr("class","nv-focus");eb.append("g").attr("class","nv-x nv-axis"),eb.append("g").attr("class","nv-y1 nv-axis"),eb.append("g").attr("class","nv-y2 nv-axis"),eb.append("g").attr("class","nv-barsWrap"),eb.append("g").attr("class","nv-linesWrap");var fb=cb.append("g").attr("class","nv-context");if(fb.append("g").attr("class","nv-x nv-axis"),fb.append("g").attr("class","nv-y1 nv-axis"),fb.append("g").attr("class","nv-y2 nv-axis"),fb.append("g").attr("class","nv-barsWrap"),fb.append("g").attr("class","nv-linesWrap"),fb.append("g").attr("class","nv-brushBackground"),fb.append("g").attr("class","nv-x nv-brush"),D){var gb=t.align()?V/2:V,hb=t.align()?gb:0;t.width(gb),db.select(".nv-legendWrap").datum(v.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(a.bar?O:P),a})).call(t),w.top!=t.height()&&(w.top=t.height(),W=a.utils.availableHeight(z,U,w)-H),db.select(".nv-legendWrap").attr("transform","translate("+hb+","+-w.top+")")}bb.attr("transform","translate("+w.left+","+w.top+")"),db.select(".nv-context").style("display",E?"initial":"none"),m.width(V).height(X).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&v[b].bar})),k.width(V).height(X).color(v.map(function(a,b){return a.color||C(a,b)}).filter(function(a,b){return!v[b].disabled&&!v[b].bar}));var ib=db.select(".nv-context .nv-barsWrap").datum(Z.length?Z:[{values:[]}]),jb=db.select(".nv-context .nv-linesWrap").datum($[0].disabled?[{values:[]}]:$);db.select(".nv-context").attr("transform","translate(0,"+(W+w.bottom+x.top)+")"),ib.transition().call(m),jb.transition().call(k),G&&(o._ticks(a.utils.calcTicksX(V/100,v)).tickSize(-X,0),db.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+h.range()[0]+")"),db.select(".nv-context .nv-x.nv-axis").transition().call(o)),F&&(r.scale(h)._ticks(X/36).tickSize(-V,0),s.scale(i)._ticks(X/36).tickSize(Z.length?0:-V,0),db.select(".nv-context .nv-y3.nv-axis").style("opacity",Z.length?1:0).attr("transform","translate(0,"+e.range()[0]+")"),db.select(".nv-context .nv-y2.nv-axis").style("opacity",$.length?1:0).attr("transform","translate("+e.range()[1]+",0)"),db.select(".nv-context .nv-y1.nv-axis").transition().call(r),db.select(".nv-context .nv-y2.nv-axis").transition().call(s)),u.x(e).on("brush",T),I&&u.extent(I);var kb=db.select(".nv-brushBackground").selectAll("g").data([I||u.extent()]),lb=kb.enter().append("g");lb.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",X),lb.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",X);var mb=db.select(".nv-x.nv-brush").call(u);mb.selectAll("rect").attr("height",X),mb.selectAll(".resize").append("path").attr("d",J),t.dispatch.on("stateChange",function(a){for(var c in a)M[c]=a[c];K.stateChange(M),b.update()}),K.on("changeState",function(a){"undefined"!=typeof a.disabled&&(v.forEach(function(b,c){b.disabled=a.disabled[c]}),M.disabled=a.disabled),b.update()}),T()}),b}var c,d,e,f,g,h,i,j=a.models.line(),k=a.models.line(),l=a.models.historicalBar(),m=a.models.historicalBar(),n=a.models.axis(),o=a.models.axis(),p=a.models.axis(),q=a.models.axis(),r=a.models.axis(),s=a.models.axis(),t=a.models.legend(),u=d3.svg.brush(),v=a.models.tooltip(),w={top:30,right:30,bottom:30,left:60},x={top:0,right:30,bottom:20,left:60},y=null,z=null,A=function(a){return a.x},B=function(a){return a.y},C=a.utils.defaultColor(),D=!0,E=!0,F=!1,G=!0,H=50,I=null,J=null,K=d3.dispatch("brush","stateChange","changeState"),L=0,M=a.utils.state(),N=null,O=" (left axis)",P=" (right axis)";j.clipEdge(!0),k.interactive(!1),n.orient("bottom").tickPadding(5),p.orient("left"),q.orient("right"),o.orient("bottom").tickPadding(5),r.orient("left"),s.orient("right"),v.headerEnabled(!0).headerFormatter(function(a,b){return n.tickFormat()(a,b)});var Q=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},R=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return j.dispatch.on("elementMouseover.tooltip",function(a){v.duration(100).valueFormatter(function(a,b){return q.tickFormat()(a,b)}).data(a).position(a.pos).hidden(!1)}),j.dispatch.on("elementMouseout.tooltip",function(){v.hidden(!0)}),l.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={value:b.y()(a.data),color:a.color},v.duration(0).valueFormatter(function(a,b){return p.tickFormat()(a,b)}).data(a).hidden(!1)}),l.dispatch.on("elementMouseout.tooltip",function(){v.hidden(!0)}),l.dispatch.on("elementMousemove.tooltip",function(){v.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=K,b.legend=t,b.lines=j,b.lines2=k,b.bars=l,b.bars2=m,b.xAxis=n,b.x2Axis=o,b.y1Axis=p,b.y2Axis=q,b.y3Axis=r,b.y4Axis=s,b.tooltip=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return y},set:function(a){y=a}},height:{get:function(){return z},set:function(a){z=a}},showLegend:{get:function(){return D},set:function(a){D=a}},brushExtent:{get:function(){return I},set:function(a){I=a}},noData:{get:function(){return J},set:function(a){J=a}},focusEnable:{get:function(){return E},set:function(a){E=a}},focusHeight:{get:function(){return H},set:function(a){H=a}},focusShowAxisX:{get:function(){return G},set:function(a){G=a}},focusShowAxisY:{get:function(){return F},set:function(a){F=a}},legendLeftAxisHint:{get:function(){return O},set:function(a){O=a}},legendRightAxisHint:{get:function(){return P},set:function(a){P=a}},tooltips:{get:function(){return v.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),v.enabled(!!b)}},tooltipContent:{get:function(){return v.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),v.contentGenerator(b)}},margin:{get:function(){return w},set:function(a){w.top=void 0!==a.top?a.top:w.top,w.right=void 0!==a.right?a.right:w.right,w.bottom=void 0!==a.bottom?a.bottom:w.bottom,w.left=void 0!==a.left?a.left:w.left}},duration:{get:function(){return L},set:function(a){L=a}},color:{get:function(){return C},set:function(b){C=a.utils.getColor(b),t.color(C)}},x:{get:function(){return A},set:function(a){A=a,j.x(a),k.x(a),l.x(a),m.x(a)}},y:{get:function(){return B},set:function(a){B=a,j.y(a),k.y(a),l.y(a),m.y(a)}}}),a.utils.inheritOptions(b,j),a.utils.initOptions(b),b},a.models.lineWithFocusChart=function(){"use strict";function b(o){return o.each(function(o){function z(a){var b=+("e"==a),c=b?1:-1,d=M/3;return"M"+.5*c+","+d+"A6,6 0 0 "+b+" "+6.5*c+","+(d+6)+"V"+(2*d-6)+"A6,6 0 0 "+b+" "+.5*c+","+2*d+"ZM"+2.5*c+","+(d+8)+"V"+(2*d-8)+"M"+4.5*c+","+(d+8)+"V"+(2*d-8)}function G(){n.empty()||n.extent(y),U.data([n.empty()?e.domain():y]).each(function(a){var b=e(a[0])-c.range()[0],d=K-e(a[1]);d3.select(this).select(".left").attr("width",0>b?0:b),d3.select(this).select(".right").attr("x",e(a[1])).attr("width",0>d?0:d)})}function H(){y=n.empty()?null:n.extent();var a=n.empty()?e.domain():n.extent();if(!(Math.abs(a[0]-a[1])<=1)){A.brush({extent:a,brush:n}),G();var b=Q.select(".nv-focus .nv-linesWrap").datum(o.filter(function(a){return!a.disabled}).map(function(b){return{key:b.key,area:b.area,values:b.values.filter(function(b,c){return g.x()(b,c)>=a[0]&&g.x()(b,c)<=a[1]})}}));b.transition().duration(B).call(g),Q.select(".nv-focus .nv-x.nv-axis").transition().duration(B).call(i),Q.select(".nv-focus .nv-y.nv-axis").transition().duration(B).call(j)}}var I=d3.select(this),J=this;a.utils.initSVG(I);var K=a.utils.availableWidth(t,I,q),L=a.utils.availableHeight(u,I,q)-v,M=v-r.top-r.bottom;if(b.update=function(){I.transition().duration(B).call(b)},b.container=this,C.setter(F(o),b.update).getter(E(o)).update(),C.disabled=o.map(function(a){return!!a.disabled}),!D){var N;D={};for(N in C)D[N]=C[N]instanceof Array?C[N].slice(0):C[N]}if(!(o&&o.length&&o.filter(function(a){return a.values.length}).length))return a.utils.noData(b,I),b;I.selectAll(".nv-noData").remove(),c=g.xScale(),d=g.yScale(),e=h.xScale(),f=h.yScale();var O=I.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([o]),P=O.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g"),Q=O.select("g");P.append("g").attr("class","nv-legendWrap");var R=P.append("g").attr("class","nv-focus");R.append("g").attr("class","nv-x nv-axis"),R.append("g").attr("class","nv-y nv-axis"),R.append("g").attr("class","nv-linesWrap"),R.append("g").attr("class","nv-interactive");var S=P.append("g").attr("class","nv-context");S.append("g").attr("class","nv-x nv-axis"),S.append("g").attr("class","nv-y nv-axis"),S.append("g").attr("class","nv-linesWrap"),S.append("g").attr("class","nv-brushBackground"),S.append("g").attr("class","nv-x nv-brush"),x&&(m.width(K),Q.select(".nv-legendWrap").datum(o).call(m),q.top!=m.height()&&(q.top=m.height(),L=a.utils.availableHeight(u,I,q)-v),Q.select(".nv-legendWrap").attr("transform","translate(0,"+-q.top+")")),O.attr("transform","translate("+q.left+","+q.top+")"),w&&(p.width(K).height(L).margin({left:q.left,top:q.top}).svgContainer(I).xScale(c),O.select(".nv-interactive").call(p)),g.width(K).height(L).color(o.map(function(a,b){return a.color||s(a,b)}).filter(function(a,b){return!o[b].disabled})),h.defined(g.defined()).width(K).height(M).color(o.map(function(a,b){return a.color||s(a,b)}).filter(function(a,b){return!o[b].disabled})),Q.select(".nv-context").attr("transform","translate(0,"+(L+q.bottom+r.top)+")");var T=Q.select(".nv-context .nv-linesWrap").datum(o.filter(function(a){return!a.disabled}));d3.transition(T).call(h),i.scale(c)._ticks(a.utils.calcTicksX(K/100,o)).tickSize(-L,0),j.scale(d)._ticks(a.utils.calcTicksY(L/36,o)).tickSize(-K,0),Q.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+L+")"),n.x(e).on("brush",function(){H()}),y&&n.extent(y);var U=Q.select(".nv-brushBackground").selectAll("g").data([y||n.extent()]),V=U.enter().append("g");V.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",M),V.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",M);var W=Q.select(".nv-x.nv-brush").call(n);W.selectAll("rect").attr("height",M),W.selectAll(".resize").append("path").attr("d",z),H(),k.scale(e)._ticks(a.utils.calcTicksX(K/100,o)).tickSize(-M,0),Q.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),d3.transition(Q.select(".nv-context .nv-x.nv-axis")).call(k),l.scale(f)._ticks(a.utils.calcTicksY(M/36,o)).tickSize(-K,0),d3.transition(Q.select(".nv-context .nv-y.nv-axis")).call(l),Q.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+f.range()[0]+")"),m.dispatch.on("stateChange",function(a){for(var c in a)C[c]=a[c];A.stateChange(C),b.update()}),p.dispatch.on("elementMousemove",function(c){g.clearHighlights();var d,f,h,k=[];if(o.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(i,j){var l=n.empty()?e.domain():n.extent(),m=i.values.filter(function(a,b){return g.x()(a,b)>=l[0]&&g.x()(a,b)<=l[1]});f=a.interactiveBisect(m,c.pointXValue,g.x());var o=m[f],p=b.y()(o,f);null!=p&&g.highlightPoint(j,f,!0),void 0!==o&&(void 0===d&&(d=o),void 0===h&&(h=b.xScale()(b.x()(o,f))),k.push({key:i.key,value:b.y()(o,f),color:s(i,i.seriesIndex)}))}),k.length>2){var l=b.yScale().invert(c.mouseY),m=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),r=.03*m,t=a.nearestValueIndex(k.map(function(a){return a.value}),l,r);null!==t&&(k[t].highlight=!0)}var u=i.tickFormat()(b.x()(d,f));p.tooltip.position({left:c.mouseX+q.left,top:c.mouseY+q.top}).chartContainer(J.parentNode).valueFormatter(function(a){return null==a?"N/A":j.tickFormat()(a)}).data({value:u,index:f,series:k})(),p.renderGuideLine(h)}),p.dispatch.on("elementMouseout",function(){g.clearHighlights()}),A.on("changeState",function(a){"undefined"!=typeof a.disabled&&o.forEach(function(b,c){b.disabled=a.disabled[c]}),b.update()})}),b}var c,d,e,f,g=a.models.line(),h=a.models.line(),i=a.models.axis(),j=a.models.axis(),k=a.models.axis(),l=a.models.axis(),m=a.models.legend(),n=d3.svg.brush(),o=a.models.tooltip(),p=a.interactiveGuideline(),q={top:30,right:30,bottom:30,left:60},r={top:0,right:30,bottom:20,left:60},s=a.utils.defaultColor(),t=null,u=null,v=50,w=!1,x=!0,y=null,z=null,A=d3.dispatch("brush","stateChange","changeState"),B=250,C=a.utils.state(),D=null;g.clipEdge(!0).duration(0),h.interactive(!1),i.orient("bottom").tickPadding(5),j.orient("left"),k.orient("bottom").tickPadding(5),l.orient("left"),o.valueFormatter(function(a,b){return j.tickFormat()(a,b)}).headerFormatter(function(a,b){return i.tickFormat()(a,b)});var E=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},F=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return g.dispatch.on("elementMouseover.tooltip",function(a){o.data(a).position(a.pos).hidden(!1)}),g.dispatch.on("elementMouseout.tooltip",function(){o.hidden(!0)}),b.dispatch=A,b.legend=m,b.lines=g,b.lines2=h,b.xAxis=i,b.yAxis=j,b.x2Axis=k,b.y2Axis=l,b.interactiveLayer=p,b.tooltip=o,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return t},set:function(a){t=a}},height:{get:function(){return u},set:function(a){u=a}},focusHeight:{get:function(){return v},set:function(a){v=a}},showLegend:{get:function(){return x},set:function(a){x=a}},brushExtent:{get:function(){return y},set:function(a){y=a}},defaultState:{get:function(){return D},set:function(a){D=a}},noData:{get:function(){return z},set:function(a){z=a}},tooltips:{get:function(){return o.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),o.enabled(!!b)}},tooltipContent:{get:function(){return o.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),o.contentGenerator(b)}},margin:{get:function(){return q},set:function(a){q.top=void 0!==a.top?a.top:q.top,q.right=void 0!==a.right?a.right:q.right,q.bottom=void 0!==a.bottom?a.bottom:q.bottom,q.left=void 0!==a.left?a.left:q.left}},color:{get:function(){return s},set:function(b){s=a.utils.getColor(b),m.color(s)}},interpolate:{get:function(){return g.interpolate()},set:function(a){g.interpolate(a),h.interpolate(a)}},xTickFormat:{get:function(){return i.tickFormat()},set:function(a){i.tickFormat(a),k.tickFormat(a)}},yTickFormat:{get:function(){return j.tickFormat()},set:function(a){j.tickFormat(a),l.tickFormat(a)}},duration:{get:function(){return B},set:function(a){B=a,j.duration(B),l.duration(B),i.duration(B),k.duration(B)}},x:{get:function(){return g.x()},set:function(a){g.x(a),h.x(a)}},y:{get:function(){return g.y()},set:function(a){g.y(a),h.y(a)}},useInteractiveGuideline:{get:function(){return w},set:function(a){w=a,w&&(g.interactive(!1),g.useVoronoi(!1))}}}),a.utils.inheritOptions(b,g),a.utils.initOptions(b),b},a.models.multiBar=function(){"use strict";function b(E){return C.reset(),E.each(function(b){var E=k-j.left-j.right,F=l-j.top-j.bottom;p=d3.select(this),a.utils.initSVG(p);var G=0;if(x&&b.length&&(x=[{values:b[0].values.map(function(a){return{x:a.x,y:0,series:a.series,size:.01}})}]),u){var H=d3.layout.stack().offset(v).values(function(a){return a.values}).y(r)(!b.length&&x?x:b);H.forEach(function(a,c){a.nonStackable?(b[c].nonStackableSeries=G++,H[c]=b[c]):c>0&&H[c-1].nonStackable&&H[c].values.map(function(a,b){a.y0-=H[c-1].values[b].y,a.y1=a.y0+a.y})}),b=H}b.forEach(function(a,b){a.values.forEach(function(c){c.series=b,c.key=a.key})}),u&&b[0].values.map(function(a,c){var d=0,e=0;b.map(function(a,f){if(!b[f].nonStackable){var g=a.values[c];g.size=Math.abs(g.y),g.y<0?(g.y1=e,e-=g.size):(g.y1=g.size+d,d+=g.size)}})});var I=d&&e?[]:b.map(function(a,b){return a.values.map(function(a,c){return{x:q(a,c),y:r(a,c),y0:a.y0,y1:a.y1,idx:b}})});m.domain(d||d3.merge(I).map(function(a){return a.x})).rangeBands(f||[0,E],A),n.domain(e||d3.extent(d3.merge(I).map(function(a){var c=a.y;return u&&!b[a.idx].nonStackable&&(c=a.y>0?a.y1:a.y1+a.y),c}).concat(s))).range(g||[F,0]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]-.01*m.domain()[0],m.domain()[1]+.01*m.domain()[1]]:[-1,1]),n.domain()[0]===n.domain()[1]&&n.domain(n.domain()[0]?[n.domain()[0]+.01*n.domain()[0],n.domain()[1]-.01*n.domain()[1]]:[-1,1]),h=h||m,i=i||n;var J=p.selectAll("g.nv-wrap.nv-multibar").data([b]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),L=K.append("defs"),M=K.append("g"),N=J.select("g");M.append("g").attr("class","nv-groups"),J.attr("transform","translate("+j.left+","+j.top+")"),L.append("clipPath").attr("id","nv-edge-clip-"+o).append("rect"),J.select("#nv-edge-clip-"+o+" rect").attr("width",E).attr("height",F),N.attr("clip-path",t?"url(#nv-edge-clip-"+o+")":"");var O=J.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a,b){return b});O.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);var P=C.transition(O.exit().selectAll("rect.nv-bar"),"multibarExit",Math.min(100,z)).attr("y",function(a){var c=i(0)||0;return u&&b[a.series]&&!b[a.series].nonStackable&&(c=i(a.y0)),c}).attr("height",0).remove();P.delay&&P.delay(function(a,b){var c=b*(z/(D+1))-b;return c}),O.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return w(a,b)}).style("stroke",function(a,b){return w(a,b)}),O.style("stroke-opacity",1).style("fill-opacity",.75);var Q=O.selectAll("rect.nv-bar").data(function(a){return x&&!b.length?x.values:a.values});Q.exit().remove();Q.enter().append("rect").attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(a,c,d){return u&&!b[d].nonStackable?0:d*m.rangeBand()/b.length}).attr("y",function(a,c,d){return i(u&&!b[d].nonStackable?a.y0:0)||0}).attr("height",0).attr("width",function(a,c,d){return m.rangeBand()/(u&&!b[d].nonStackable?1:b.length)}).attr("transform",function(a,b){return"translate("+m(q(a,b))+",0)"});Q.style("fill",function(a,b,c){return w(a,c,b)}).style("stroke",function(a,b,c){return w(a,c,b)}).on("mouseover",function(a,b){d3.select(this).classed("hover",!0),B.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),B.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){B.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){B.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}).on("dblclick",function(a,b){B.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),Q.attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(a,b){return"translate("+m(q(a,b))+",0)"}),y&&(c||(c=b.map(function(){return!0})),Q.style("fill",function(a,b,d){return d3.rgb(y(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}).style("stroke",function(a,b,d){return d3.rgb(y(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}));var R=Q.watchTransition(C,"multibar",Math.min(250,z)).delay(function(a,c){return c*z/b[0].values.length});u?R.attr("y",function(a,c,d){var e=0;return e=b[d].nonStackable?r(a,c)<0?n(0):n(0)-n(r(a,c))<-1?n(0)-1:n(r(a,c))||0:n(a.y1)}).attr("height",function(a,c,d){return b[d].nonStackable?Math.max(Math.abs(n(r(a,c))-n(0)),1)||0:Math.max(Math.abs(n(a.y+a.y0)-n(a.y0)),1)}).attr("x",function(a,c,d){var e=0;return b[d].nonStackable&&(e=a.series*m.rangeBand()/b.length,b.length!==G&&(e=b[d].nonStackableSeries*m.rangeBand()/(2*G))),e}).attr("width",function(a,c,d){if(b[d].nonStackable){var e=m.rangeBand()/G;return b.length!==G&&(e=m.rangeBand()/(2*G)),e}return m.rangeBand()}):R.attr("x",function(a){return a.series*m.rangeBand()/b.length}).attr("width",m.rangeBand()/b.length).attr("y",function(a,b){return r(a,b)<0?n(0):n(0)-n(r(a,b))<1?n(0)-1:n(r(a,b))||0}).attr("height",function(a,b){return Math.max(Math.abs(n(r(a,b))-n(0)),1)||0}),h=m.copy(),i=n.copy(),b[0]&&b[0].values&&(D=b[0].values.length)}),C.renderEnd("multibar immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=d3.scale.ordinal(),n=d3.scale.linear(),o=Math.floor(1e4*Math.random()),p=null,q=function(a){return a.x},r=function(a){return a.y},s=[0],t=!0,u=!1,v="zero",w=a.utils.defaultColor(),x=!1,y=null,z=500,A=.1,B=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),C=a.utils.renderWatch(B,z),D=0;return b.dispatch=B,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},x:{get:function(){return q},set:function(a){q=a}},y:{get:function(){return r},set:function(a){r=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceY:{get:function(){return s},set:function(a){s=a}},stacked:{get:function(){return u},set:function(a){u=a}},stackOffset:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return t},set:function(a){t=a}},disabled:{get:function(){return c},set:function(a){c=a}},id:{get:function(){return o},set:function(a){o=a}},hideable:{get:function(){return x},set:function(a){x=a}},groupSpacing:{get:function(){return A},set:function(a){A=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return z},set:function(a){z=a,C.reset(z)}},color:{get:function(){return w},set:function(b){w=a.utils.getColor(b)}},barColor:{get:function(){return y},set:function(b){y=b?a.utils.getColor(b):null}}}),a.utils.initOptions(b),b},a.models.multiBarChart=function(){"use strict";function b(j){return D.reset(),D.models(e),r&&D.models(f),s&&D.models(g),j.each(function(j){var z=d3.select(this);a.utils.initSVG(z);var D=a.utils.availableWidth(l,z,k),H=a.utils.availableHeight(m,z,k);if(b.update=function(){0===C?z.call(b):z.transition().duration(C).call(b)},b.container=this,x.setter(G(j),b.update).getter(F(j)).update(),x.disabled=j.map(function(a){return!!a.disabled}),!y){var I;y={};for(I in x)y[I]=x[I]instanceof Array?x[I].slice(0):x[I]}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,z),b;z.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale(); var J=z.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([j]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),L=J.select("g");if(K.append("g").attr("class","nv-x nv-axis"),K.append("g").attr("class","nv-y nv-axis"),K.append("g").attr("class","nv-barsWrap"),K.append("g").attr("class","nv-legendWrap"),K.append("g").attr("class","nv-controlsWrap"),q&&(h.width(D-B()),L.select(".nv-legendWrap").datum(j).call(h),k.top!=h.height()&&(k.top=h.height(),H=a.utils.availableHeight(m,z,k)),L.select(".nv-legendWrap").attr("transform","translate("+B()+","+-k.top+")")),o){var M=[{key:p.grouped||"Grouped",disabled:e.stacked()},{key:p.stacked||"Stacked",disabled:!e.stacked()}];i.width(B()).color(["#444","#444","#444"]),L.select(".nv-controlsWrap").datum(M).attr("transform","translate(0,"+-k.top+")").call(i)}J.attr("transform","translate("+k.left+","+k.top+")"),t&&L.select(".nv-y.nv-axis").attr("transform","translate("+D+",0)"),e.disabled(j.map(function(a){return a.disabled})).width(D).height(H).color(j.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!j[b].disabled}));var N=L.select(".nv-barsWrap").datum(j.filter(function(a){return!a.disabled}));if(N.call(e),r){f.scale(c)._ticks(a.utils.calcTicksX(D/100,j)).tickSize(-H,0),L.select(".nv-x.nv-axis").attr("transform","translate(0,"+d.range()[0]+")"),L.select(".nv-x.nv-axis").call(f);var O=L.select(".nv-x.nv-axis > g").selectAll("g");if(O.selectAll("line, text").style("opacity",1),v){var P=function(a,b){return"translate("+a+","+b+")"},Q=5,R=17;O.selectAll("text").attr("transform",function(a,b,c){return P(0,c%2==0?Q:R)});var S=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;L.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(a,b){return P(0,0===b||S%2!==0?R:Q)})}u&&O.filter(function(a,b){return b%Math.ceil(j[0].values.length/(D/100))!==0}).selectAll("text, line").style("opacity",0),w&&O.selectAll(".tick text").attr("transform","rotate("+w+" 0,0)").style("text-anchor",w>0?"start":"end"),L.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}s&&(g.scale(d)._ticks(a.utils.calcTicksY(H/36,j)).tickSize(-D,0),L.select(".nv-y.nv-axis").call(g)),h.dispatch.on("stateChange",function(a){for(var c in a)x[c]=a[c];A.stateChange(x),b.update()}),i.dispatch.on("legendClick",function(a){if(a.disabled){switch(M=M.map(function(a){return a.disabled=!0,a}),a.disabled=!1,a.key){case"Grouped":case p.grouped:e.stacked(!1);break;case"Stacked":case p.stacked:e.stacked(!0)}x.stacked=e.stacked(),A.stateChange(x),b.update()}}),A.on("changeState",function(a){"undefined"!=typeof a.disabled&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),x.disabled=a.disabled),"undefined"!=typeof a.stacked&&(e.stacked(a.stacked),x.stacked=a.stacked,E=a.stacked),b.update()})}),D.renderEnd("multibarchart immediate"),b}var c,d,e=a.models.multiBar(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.models.legend(),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=null,m=null,n=a.utils.defaultColor(),o=!0,p={},q=!0,r=!0,s=!0,t=!1,u=!0,v=!1,w=0,x=a.utils.state(),y=null,z=null,A=d3.dispatch("stateChange","changeState","renderEnd"),B=function(){return o?180:0},C=250;x.stacked=!1,e.stacked(!1),f.orient("bottom").tickPadding(7).showMaxMin(!1).tickFormat(function(a){return a}),g.orient(t?"right":"left").tickFormat(d3.format(",.1f")),j.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),i.updateState(!1);var D=a.utils.renderWatch(A),E=!1,F=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),stacked:E}}},G=function(a){return function(b){void 0!==b.stacked&&(E=b.stacked),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return e.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={key:a.data.key,value:b.y()(a.data),color:a.color},j.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){j.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){j.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=A,b.multibar=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.state=x,b.tooltip=j,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return l},set:function(a){l=a}},height:{get:function(){return m},set:function(a){m=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showControls:{get:function(){return o},set:function(a){o=a}},controlLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return y},set:function(a){y=a}},noData:{get:function(){return z},set:function(a){z=a}},reduceXTicks:{get:function(){return u},set:function(a){u=a}},rotateLabels:{get:function(){return w},set:function(a){w=a}},staggerLabels:{get:function(){return v},set:function(a){v=a}},tooltips:{get:function(){return j.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),j.enabled(!!b)}},tooltipContent:{get:function(){return j.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),j.contentGenerator(b)}},margin:{get:function(){return k},set:function(a){k.top=void 0!==a.top?a.top:k.top,k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return C},set:function(a){C=a,e.duration(C),f.duration(C),g.duration(C),D.reset(C)}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),h.color(n)}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,g.orient(t?"right":"left")}},barColor:{get:function(){return e.barColor},set:function(a){e.barColor(a),h.color(function(a,b){return d3.rgb("#ccc").darker(1.5*b).toString()})}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.multiBarHorizontal=function(){"use strict";function b(m){return E.reset(),m.each(function(b){var m=k-j.left-j.right,C=l-j.top-j.bottom;n=d3.select(this),a.utils.initSVG(n),w&&(b=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(r)(b)),b.forEach(function(a,b){a.values.forEach(function(c){c.series=b,c.key=a.key})}),w&&b[0].values.map(function(a,c){var d=0,e=0;b.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e-b.size,e-=b.size):(b.y1=d,d+=b.size)})});var F=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:q(a,b),y:r(a,b),y0:a.y0,y1:a.y1}})});o.domain(d||d3.merge(F).map(function(a){return a.x})).rangeBands(f||[0,C],A),p.domain(e||d3.extent(d3.merge(F).map(function(a){return w?a.y>0?a.y1+a.y:a.y1:a.y}).concat(t))),p.range(x&&!w?g||[p.domain()[0]<0?z:0,m-(p.domain()[1]>0?z:0)]:g||[0,m]),h=h||o,i=i||d3.scale.linear().domain(p.domain()).range([p(0),p(0)]);{var G=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([b]),H=G.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal"),I=(H.append("defs"),H.append("g"));G.select("g")}I.append("g").attr("class","nv-groups"),G.attr("transform","translate("+j.left+","+j.top+")");var J=G.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a,b){return b});J.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),J.exit().watchTransition(E,"multibarhorizontal: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),J.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return u(a,b)}).style("stroke",function(a,b){return u(a,b)}),J.watchTransition(E,"multibarhorizontal: groups").style("stroke-opacity",1).style("fill-opacity",.75);var K=J.selectAll("g.nv-bar").data(function(a){return a.values});K.exit().remove();var L=K.enter().append("g").attr("transform",function(a,c,d){return"translate("+i(w?a.y0:0)+","+(w?0:d*o.rangeBand()/b.length+o(q(a,c)))+")"});L.append("rect").attr("width",0).attr("height",o.rangeBand()/(w?1:b.length)),K.on("mouseover",function(a,b){d3.select(this).classed("hover",!0),D.elementMouseover({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),D.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mouseout",function(a,b){D.elementMouseout({data:a,index:b,color:d3.select(this).style("fill")})}).on("mousemove",function(a,b){D.elementMousemove({data:a,index:b,color:d3.select(this).style("fill")})}).on("click",function(a,b){D.elementClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}).on("dblclick",function(a,b){D.elementDblClick({data:a,index:b,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),s(b[0],0)&&(L.append("polyline"),K.select("polyline").attr("fill","none").attr("points",function(a,c){var d=s(a,c),e=.8*o.rangeBand()/(2*(w?1:b.length));d=d.length?d:[-Math.abs(d),Math.abs(d)],d=d.map(function(a){return p(a)-p(0)});var f=[[d[0],-e],[d[0],e],[d[0],0],[d[1],0],[d[1],-e],[d[1],e]];return f.map(function(a){return a.join(",")}).join(" ")}).attr("transform",function(a,c){var d=o.rangeBand()/(2*(w?1:b.length));return"translate("+(r(a,c)<0?0:p(r(a,c))-p(0))+", "+d+")"})),L.append("text"),x&&!w?(K.select("text").attr("text-anchor",function(a,b){return r(a,b)<0?"end":"start"}).attr("y",o.rangeBand()/(2*b.length)).attr("dy",".32em").text(function(a,b){var c=B(r(a,b)),d=s(a,b);return void 0===d?c:d.length?c+"+"+B(Math.abs(d[1]))+"-"+B(Math.abs(d[0])):c+"±"+B(Math.abs(d))}),K.watchTransition(E,"multibarhorizontal: bars").select("text").attr("x",function(a,b){return r(a,b)<0?-4:p(r(a,b))-p(0)+4})):K.selectAll("text").text(""),y&&!w?(L.append("text").classed("nv-bar-label",!0),K.select("text.nv-bar-label").attr("text-anchor",function(a,b){return r(a,b)<0?"start":"end"}).attr("y",o.rangeBand()/(2*b.length)).attr("dy",".32em").text(function(a,b){return q(a,b)}),K.watchTransition(E,"multibarhorizontal: bars").select("text.nv-bar-label").attr("x",function(a,b){return r(a,b)<0?p(0)-p(r(a,b))+4:-4})):K.selectAll("text.nv-bar-label").text(""),K.attr("class",function(a,b){return r(a,b)<0?"nv-bar negative":"nv-bar positive"}),v&&(c||(c=b.map(function(){return!0})),K.style("fill",function(a,b,d){return d3.rgb(v(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()}).style("stroke",function(a,b,d){return d3.rgb(v(a,b)).darker(c.map(function(a,b){return b}).filter(function(a,b){return!c[b]})[d]).toString()})),w?K.watchTransition(E,"multibarhorizontal: bars").attr("transform",function(a,b){return"translate("+p(a.y1)+","+o(q(a,b))+")"}).select("rect").attr("width",function(a,b){return Math.abs(p(r(a,b)+a.y0)-p(a.y0))}).attr("height",o.rangeBand()):K.watchTransition(E,"multibarhorizontal: bars").attr("transform",function(a,c){return"translate("+p(r(a,c)<0?r(a,c):0)+","+(a.series*o.rangeBand()/b.length+o(q(a,c)))+")"}).select("rect").attr("height",o.rangeBand()/b.length).attr("width",function(a,b){return Math.max(Math.abs(p(r(a,b))-p(0)),1)}),h=o.copy(),i=p.copy()}),E.renderEnd("multibarHorizontal immediate"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=null,o=d3.scale.ordinal(),p=d3.scale.linear(),q=function(a){return a.x},r=function(a){return a.y},s=function(a){return a.yErr},t=[0],u=a.utils.defaultColor(),v=null,w=!1,x=!1,y=!1,z=60,A=.1,B=d3.format(",.2f"),C=250,D=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),E=a.utils.renderWatch(D,C);return b.dispatch=D,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},x:{get:function(){return q},set:function(a){q=a}},y:{get:function(){return r},set:function(a){r=a}},yErr:{get:function(){return s},set:function(a){s=a}},xScale:{get:function(){return o},set:function(a){o=a}},yScale:{get:function(){return p},set:function(a){p=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceY:{get:function(){return t},set:function(a){t=a}},stacked:{get:function(){return w},set:function(a){w=a}},showValues:{get:function(){return x},set:function(a){x=a}},disabled:{get:function(){return c},set:function(a){c=a}},id:{get:function(){return m},set:function(a){m=a}},valueFormat:{get:function(){return B},set:function(a){B=a}},valuePadding:{get:function(){return z},set:function(a){z=a}},groupSpacing:{get:function(){return A},set:function(a){A=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},duration:{get:function(){return C},set:function(a){C=a,E.reset(C)}},color:{get:function(){return u},set:function(b){u=a.utils.getColor(b)}},barColor:{get:function(){return v},set:function(b){v=b?a.utils.getColor(b):null}}}),a.utils.initOptions(b),b},a.models.multiBarHorizontalChart=function(){"use strict";function b(j){return C.reset(),C.models(e),r&&C.models(f),s&&C.models(g),j.each(function(j){var w=d3.select(this);a.utils.initSVG(w);var C=a.utils.availableWidth(l,w,k),D=a.utils.availableHeight(m,w,k);if(b.update=function(){w.transition().duration(z).call(b)},b.container=this,t=e.stacked(),u.setter(B(j),b.update).getter(A(j)).update(),u.disabled=j.map(function(a){return!!a.disabled}),!v){var E;v={};for(E in u)v[E]=u[E]instanceof Array?u[E].slice(0):u[E]}if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,w),b;w.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var F=w.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([j]),G=F.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),H=F.select("g");if(G.append("g").attr("class","nv-x nv-axis"),G.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),G.append("g").attr("class","nv-barsWrap"),G.append("g").attr("class","nv-legendWrap"),G.append("g").attr("class","nv-controlsWrap"),q&&(h.width(C-y()),H.select(".nv-legendWrap").datum(j).call(h),k.top!=h.height()&&(k.top=h.height(),D=a.utils.availableHeight(m,w,k)),H.select(".nv-legendWrap").attr("transform","translate("+y()+","+-k.top+")")),o){var I=[{key:p.grouped||"Grouped",disabled:e.stacked()},{key:p.stacked||"Stacked",disabled:!e.stacked()}];i.width(y()).color(["#444","#444","#444"]),H.select(".nv-controlsWrap").datum(I).attr("transform","translate(0,"+-k.top+")").call(i)}F.attr("transform","translate("+k.left+","+k.top+")"),e.disabled(j.map(function(a){return a.disabled})).width(C).height(D).color(j.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!j[b].disabled}));var J=H.select(".nv-barsWrap").datum(j.filter(function(a){return!a.disabled}));if(J.transition().call(e),r){f.scale(c)._ticks(a.utils.calcTicksY(D/24,j)).tickSize(-C,0),H.select(".nv-x.nv-axis").call(f);var K=H.select(".nv-x.nv-axis").selectAll("g");K.selectAll("line, text")}s&&(g.scale(d)._ticks(a.utils.calcTicksX(C/100,j)).tickSize(-D,0),H.select(".nv-y.nv-axis").attr("transform","translate(0,"+D+")"),H.select(".nv-y.nv-axis").call(g)),H.select(".nv-zeroLine line").attr("x1",d(0)).attr("x2",d(0)).attr("y1",0).attr("y2",-D),h.dispatch.on("stateChange",function(a){for(var c in a)u[c]=a[c];x.stateChange(u),b.update()}),i.dispatch.on("legendClick",function(a){if(a.disabled){switch(I=I.map(function(a){return a.disabled=!0,a}),a.disabled=!1,a.key){case"Grouped":e.stacked(!1);break;case"Stacked":e.stacked(!0)}u.stacked=e.stacked(),x.stateChange(u),t=e.stacked(),b.update()}}),x.on("changeState",function(a){"undefined"!=typeof a.disabled&&(j.forEach(function(b,c){b.disabled=a.disabled[c]}),u.disabled=a.disabled),"undefined"!=typeof a.stacked&&(e.stacked(a.stacked),u.stacked=a.stacked,t=a.stacked),b.update()})}),C.renderEnd("multibar horizontal chart immediate"),b}var c,d,e=a.models.multiBarHorizontal(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend().height(30),i=a.models.legend().height(30),j=a.models.tooltip(),k={top:30,right:20,bottom:50,left:60},l=null,m=null,n=a.utils.defaultColor(),o=!0,p={},q=!0,r=!0,s=!0,t=!1,u=a.utils.state(),v=null,w=null,x=d3.dispatch("stateChange","changeState","renderEnd"),y=function(){return o?180:0},z=250;u.stacked=!1,e.stacked(t),f.orient("left").tickPadding(5).showMaxMin(!1).tickFormat(function(a){return a}),g.orient("bottom").tickFormat(d3.format(",.1f")),j.duration(0).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).headerFormatter(function(a,b){return f.tickFormat()(a,b)}),i.updateState(!1);var A=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),stacked:t}}},B=function(a){return function(b){void 0!==b.stacked&&(t=b.stacked),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},C=a.utils.renderWatch(x,z);return e.dispatch.on("elementMouseover.tooltip",function(a){a.value=b.x()(a.data),a.series={key:a.data.key,value:b.y()(a.data),color:a.color},j.data(a).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){j.hidden(!0)}),e.dispatch.on("elementMousemove.tooltip",function(){j.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=x,b.multibar=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.state=u,b.tooltip=j,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return l},set:function(a){l=a}},height:{get:function(){return m},set:function(a){m=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showControls:{get:function(){return o},set:function(a){o=a}},controlLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return v},set:function(a){v=a}},noData:{get:function(){return w},set:function(a){w=a}},tooltips:{get:function(){return j.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),j.enabled(!!b)}},tooltipContent:{get:function(){return j.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),j.contentGenerator(b)}},margin:{get:function(){return k},set:function(a){k.top=void 0!==a.top?a.top:k.top,k.right=void 0!==a.right?a.right:k.right,k.bottom=void 0!==a.bottom?a.bottom:k.bottom,k.left=void 0!==a.left?a.left:k.left}},duration:{get:function(){return z},set:function(a){z=a,C.reset(z),e.duration(z),f.duration(z),g.duration(z)}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),h.color(n)}},barColor:{get:function(){return e.barColor},set:function(a){e.barColor(a),h.color(function(a,b){return d3.rgb("#ccc").darker(1.5*b).toString()})}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.multiChart=function(){"use strict";function b(j){return j.each(function(j){function k(a){var b=2===j[a.seriesIndex].yAxis?z:y;a.value=a.point.x,a.series={value:a.point.y,color:a.point.color},B.duration(100).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).position(a.pos).hidden(!1)}function l(a){var b=2===j[a.seriesIndex].yAxis?z:y;a.point.x=v.x()(a.point),a.point.y=v.y()(a.point),B.duration(100).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).position(a.pos).hidden(!1)}function n(a){var b=2===j[a.data.series].yAxis?z:y;a.value=t.x()(a.data),a.series={value:t.y()(a.data),color:a.color},B.duration(0).valueFormatter(function(a,c){return b.tickFormat()(a,c)}).data(a).hidden(!1)}var C=d3.select(this);a.utils.initSVG(C),b.update=function(){C.transition().call(b)},b.container=this;var D=a.utils.availableWidth(g,C,e),E=a.utils.availableHeight(h,C,e),F=j.filter(function(a){return"line"==a.type&&1==a.yAxis}),G=j.filter(function(a){return"line"==a.type&&2==a.yAxis}),H=j.filter(function(a){return"bar"==a.type&&1==a.yAxis}),I=j.filter(function(a){return"bar"==a.type&&2==a.yAxis}),J=j.filter(function(a){return"area"==a.type&&1==a.yAxis}),K=j.filter(function(a){return"area"==a.type&&2==a.yAxis});if(!(j&&j.length&&j.filter(function(a){return a.values.length}).length))return a.utils.noData(b,C),b;C.selectAll(".nv-noData").remove();var L=j.filter(function(a){return!a.disabled&&1==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})}),M=j.filter(function(a){return!a.disabled&&2==a.yAxis}).map(function(a){return a.values.map(function(a){return{x:a.x,y:a.y}})});o.domain(d3.extent(d3.merge(L.concat(M)),function(a){return a.x})).range([0,D]);var N=C.selectAll("g.wrap.multiChart").data([j]),O=N.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");O.append("g").attr("class","nv-x nv-axis"),O.append("g").attr("class","nv-y1 nv-axis"),O.append("g").attr("class","nv-y2 nv-axis"),O.append("g").attr("class","lines1Wrap"),O.append("g").attr("class","lines2Wrap"),O.append("g").attr("class","bars1Wrap"),O.append("g").attr("class","bars2Wrap"),O.append("g").attr("class","stack1Wrap"),O.append("g").attr("class","stack2Wrap"),O.append("g").attr("class","legendWrap");var P=N.select("g"),Q=j.map(function(a,b){return j[b].color||f(a,b)});if(i){var R=A.align()?D/2:D,S=A.align()?R:0;A.width(R),A.color(Q),P.select(".legendWrap").datum(j.map(function(a){return a.originalKey=void 0===a.originalKey?a.key:a.originalKey,a.key=a.originalKey+(1==a.yAxis?"":" (right axis)"),a})).call(A),e.top!=A.height()&&(e.top=A.height(),E=a.utils.availableHeight(h,C,e)),P.select(".legendWrap").attr("transform","translate("+S+","+-e.top+")")}r.width(D).height(E).interpolate(m).color(Q.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&"line"==j[b].type})),s.width(D).height(E).interpolate(m).color(Q.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&"line"==j[b].type})),t.width(D).height(E).color(Q.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&"bar"==j[b].type})),u.width(D).height(E).color(Q.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&"bar"==j[b].type})),v.width(D).height(E).color(Q.filter(function(a,b){return!j[b].disabled&&1==j[b].yAxis&&"area"==j[b].type})),w.width(D).height(E).color(Q.filter(function(a,b){return!j[b].disabled&&2==j[b].yAxis&&"area"==j[b].type})),P.attr("transform","translate("+e.left+","+e.top+")");var T=P.select(".lines1Wrap").datum(F.filter(function(a){return!a.disabled})),U=P.select(".bars1Wrap").datum(H.filter(function(a){return!a.disabled})),V=P.select(".stack1Wrap").datum(J.filter(function(a){return!a.disabled})),W=P.select(".lines2Wrap").datum(G.filter(function(a){return!a.disabled})),X=P.select(".bars2Wrap").datum(I.filter(function(a){return!a.disabled})),Y=P.select(".stack2Wrap").datum(K.filter(function(a){return!a.disabled})),Z=J.length?J.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[],$=K.length?K.map(function(a){return a.values}).reduce(function(a,b){return a.map(function(a,c){return{x:a.x,y:a.y+b[c].y}})}).concat([{x:0,y:0}]):[];p.domain(c||d3.extent(d3.merge(L).concat(Z),function(a){return a.y})).range([0,E]),q.domain(d||d3.extent(d3.merge(M).concat($),function(a){return a.y})).range([0,E]),r.yDomain(p.domain()),t.yDomain(p.domain()),v.yDomain(p.domain()),s.yDomain(q.domain()),u.yDomain(q.domain()),w.yDomain(q.domain()),J.length&&d3.transition(V).call(v),K.length&&d3.transition(Y).call(w),H.length&&d3.transition(U).call(t),I.length&&d3.transition(X).call(u),F.length&&d3.transition(T).call(r),G.length&&d3.transition(W).call(s),x._ticks(a.utils.calcTicksX(D/100,j)).tickSize(-E,0),P.select(".nv-x.nv-axis").attr("transform","translate(0,"+E+")"),d3.transition(P.select(".nv-x.nv-axis")).call(x),y._ticks(a.utils.calcTicksY(E/36,j)).tickSize(-D,0),d3.transition(P.select(".nv-y1.nv-axis")).call(y),z._ticks(a.utils.calcTicksY(E/36,j)).tickSize(-D,0),d3.transition(P.select(".nv-y2.nv-axis")).call(z),P.select(".nv-y1.nv-axis").classed("nv-disabled",L.length?!1:!0).attr("transform","translate("+o.range()[0]+",0)"),P.select(".nv-y2.nv-axis").classed("nv-disabled",M.length?!1:!0).attr("transform","translate("+o.range()[1]+",0)"),A.dispatch.on("stateChange",function(){b.update()}),r.dispatch.on("elementMouseover.tooltip",k),s.dispatch.on("elementMouseover.tooltip",k),r.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),s.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),v.dispatch.on("elementMouseover.tooltip",l),w.dispatch.on("elementMouseover.tooltip",l),v.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),w.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),t.dispatch.on("elementMouseover.tooltip",n),u.dispatch.on("elementMouseover.tooltip",n),t.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),u.dispatch.on("elementMouseout.tooltip",function(){B.hidden(!0)}),t.dispatch.on("elementMousemove.tooltip",function(){B.position({top:d3.event.pageY,left:d3.event.pageX})()}),u.dispatch.on("elementMousemove.tooltip",function(){B.position({top:d3.event.pageY,left:d3.event.pageX})()})}),b}var c,d,e={top:30,right:20,bottom:50,left:60},f=a.utils.defaultColor(),g=null,h=null,i=!0,j=null,k=function(a){return a.x},l=function(a){return a.y},m="monotone",n=!0,o=d3.scale.linear(),p=d3.scale.linear(),q=d3.scale.linear(),r=a.models.line().yScale(p),s=a.models.line().yScale(q),t=a.models.multiBar().stacked(!1).yScale(p),u=a.models.multiBar().stacked(!1).yScale(q),v=a.models.stackedArea().yScale(p),w=a.models.stackedArea().yScale(q),x=a.models.axis().scale(o).orient("bottom").tickPadding(5),y=a.models.axis().scale(p).orient("left"),z=a.models.axis().scale(q).orient("right"),A=a.models.legend().height(30),B=a.models.tooltip(),C=d3.dispatch();return b.dispatch=C,b.lines1=r,b.lines2=s,b.bars1=t,b.bars2=u,b.stack1=v,b.stack2=w,b.xAxis=x,b.yAxis1=y,b.yAxis2=z,b.tooltip=B,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},showLegend:{get:function(){return i},set:function(a){i=a}},yDomain1:{get:function(){return c},set:function(a){c=a}},yDomain2:{get:function(){return d},set:function(a){d=a}},noData:{get:function(){return j},set:function(a){j=a}},interpolate:{get:function(){return m},set:function(a){m=a}},tooltips:{get:function(){return B.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),B.enabled(!!b)}},tooltipContent:{get:function(){return B.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),B.contentGenerator(b)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},color:{get:function(){return f},set:function(b){f=a.utils.getColor(b)}},x:{get:function(){return k},set:function(a){k=a,r.x(a),s.x(a),t.x(a),u.x(a),v.x(a),w.x(a)}},y:{get:function(){return l},set:function(a){l=a,r.y(a),s.y(a),v.y(a),w.y(a),t.y(a),u.y(a)}},useVoronoi:{get:function(){return n},set:function(a){n=a,r.useVoronoi(a),s.useVoronoi(a),v.useVoronoi(a),w.useVoronoi(a)}}}),a.utils.initOptions(b),b},a.models.ohlcBar=function(){"use strict";function b(y){return y.each(function(b){k=d3.select(this);var y=a.utils.availableWidth(h,k,g),A=a.utils.availableHeight(i,k,g);a.utils.initSVG(k);var B=y/b[0].values.length*.9;l.domain(c||d3.extent(b[0].values.map(n).concat(t))),l.range(v?e||[.5*y/b[0].values.length,y*(b[0].values.length-.5)/b[0].values.length]:e||[5+B/2,y-B/2-5]),m.domain(d||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(f||[A,0]),l.domain()[0]===l.domain()[1]&&l.domain(l.domain()[0]?[l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]:[-1,1]);var C=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([b[0].values]),D=C.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),E=D.append("defs"),F=D.append("g"),G=C.select("g");F.append("g").attr("class","nv-ticks"),C.attr("transform","translate("+g.left+","+g.top+")"),k.on("click",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:j})}),E.append("clipPath").attr("id","nv-chart-clip-path-"+j).append("rect"),C.select("#nv-chart-clip-path-"+j+" rect").attr("width",y).attr("height",A),G.attr("clip-path",w?"url(#nv-chart-clip-path-"+j+")":"");var H=C.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});H.exit().remove(),H.enter().append("path").attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}).attr("d",function(a,b){return"m0,0l0,"+(m(p(a,b))-m(r(a,b)))+"l"+-B/2+",0l"+B/2+",0l0,"+(m(s(a,b))-m(p(a,b)))+"l0,"+(m(q(a,b))-m(s(a,b)))+"l"+B/2+",0l"+-B/2+",0z"}).attr("transform",function(a,b){return"translate("+l(n(a,b))+","+m(r(a,b))+")"}).attr("fill",function(){return x[0]}).attr("stroke",function(){return x[0]}).attr("x",0).attr("y",function(a,b){return m(Math.max(0,o(a,b)))}).attr("height",function(a,b){return Math.abs(m(o(a,b))-m(0))}),H.attr("class",function(a,b,c){return(p(a,b)>q(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}),d3.transition(H).attr("transform",function(a,b){return"translate("+l(n(a,b))+","+m(r(a,b))+")"}).attr("d",function(a,c){var d=y/b[0].values.length*.9;return"m0,0l0,"+(m(p(a,c))-m(r(a,c)))+"l"+-d/2+",0l"+d/2+",0l0,"+(m(s(a,c))-m(p(a,c)))+"l0,"+(m(q(a,c))-m(s(a,c)))+"l"+d/2+",0l"+-d/2+",0z"})}),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=Math.floor(1e4*Math.random()),k=null,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");return b.highlightPoint=function(a,c){b.clearHighlights(),k.select(".nv-ohlcBar .nv-tick-0-"+a).classed("hover",c)},b.clearHighlights=function(){k.select(".nv-ohlcBar .nv-tick.hover").classed("hover",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return j},set:function(a){j=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return g},set:function(a){g.top=void 0!=a.top?a.top:g.top,g.right=void 0!=a.right?a.right:g.right,g.bottom=void 0!=a.bottom?a.bottom:g.bottom,g.left=void 0!=a.left?a.left:g.left }},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.parallelCoordinates=function(){"use strict";function b(p){return p.each(function(b){function p(a){return F(h.map(function(b){if(isNaN(a[b])||isNaN(parseFloat(a[b]))){var c=g[b].domain(),d=g[b].range(),e=c[0]-(c[1]-c[0])/9;if(J.indexOf(b)<0){var h=d3.scale.linear().domain([e,c[1]]).range([x-12,d[1]]);g[b].brush.y(h),J.push(b)}return[f(b),g[b](e)]}return J.length>0?(D.style("display","inline"),E.style("display","inline")):(D.style("display","none"),E.style("display","none")),[f(b),g[b](a[b])]}))}function q(){var a=h.filter(function(a){return!g[a].brush.empty()}),b=a.map(function(a){return g[a].brush.extent()});k=[],a.forEach(function(a,c){k[c]={dimension:a,extent:b[c]}}),l=[],M.style("display",function(c){var d=a.every(function(a,d){return isNaN(c[a])&&b[d][0]==g[a].brush.y().domain()[0]?!0:b[d][0]<=c[a]&&c[a]<=b[d][1]});return d&&l.push(c),d?null:"none"}),o.brush({filters:k,active:l})}function r(a){m[a]=this.parentNode.__origin__=f(a),L.attr("visibility","hidden")}function s(a){m[a]=Math.min(w,Math.max(0,this.parentNode.__origin__+=d3.event.x)),M.attr("d",p),h.sort(function(a,b){return u(a)-u(b)}),f.domain(h),N.attr("transform",function(a){return"translate("+u(a)+")"})}function t(a){delete this.parentNode.__origin__,delete m[a],d3.select(this.parentNode).attr("transform","translate("+f(a)+")"),M.attr("d",p),L.attr("d",p).attr("visibility",null)}function u(a){var b=m[a];return null==b?f(a):b}var v=d3.select(this),w=a.utils.availableWidth(d,v,c),x=a.utils.availableHeight(e,v,c);a.utils.initSVG(v),l=b,f.rangePoints([0,w],1).domain(h);var y={};h.forEach(function(a){var c=d3.extent(b,function(b){return+b[a]});return y[a]=!1,void 0===c[0]&&(y[a]=!0,c[0]=0,c[1]=0),c[0]===c[1]&&(c[0]=c[0]-1,c[1]=c[1]+1),g[a]=d3.scale.linear().domain(c).range([.9*(x-12),0]),g[a].brush=d3.svg.brush().y(g[a]).on("brush",q),"name"!=a});var z=v.selectAll("g.nv-wrap.nv-parallelCoordinates").data([b]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinates"),B=A.append("g"),C=z.select("g");B.append("g").attr("class","nv-parallelCoordinates background"),B.append("g").attr("class","nv-parallelCoordinates foreground"),B.append("g").attr("class","nv-parallelCoordinates missingValuesline"),z.attr("transform","translate("+c.left+","+c.top+")");var D,E,F=d3.svg.line().interpolate("cardinal").tension(n),G=d3.svg.axis().orient("left"),H=d3.behavior.drag().on("dragstart",r).on("drag",s).on("dragend",t),I=f.range()[1]-f.range()[0],J=[],K=[0+I/2,x-12,w-I/2,x-12];D=z.select(".missingValuesline").selectAll("line").data([K]),D.enter().append("line"),D.exit().remove(),D.attr("x1",function(a){return a[0]}).attr("y1",function(a){return a[1]}).attr("x2",function(a){return a[2]}).attr("y2",function(a){return a[3]}),E=z.select(".missingValuesline").selectAll("text").data(["undefined values"]),E.append("text").data(["undefined values"]),E.enter().append("text"),E.exit().remove(),E.attr("y",x).attr("x",w-92-I/2).text(function(a){return a});var L=z.select(".background").selectAll("path").data(b);L.enter().append("path"),L.exit().remove(),L.attr("d",p);var M=z.select(".foreground").selectAll("path").data(b);M.enter().append("path"),M.exit().remove(),M.attr("d",p).attr("stroke",j),M.on("mouseover",function(a,b){d3.select(this).classed("hover",!0),o.elementMouseover({label:a.name,data:a.data,index:b,pos:[d3.mouse(this.parentNode)[0],d3.mouse(this.parentNode)[1]]})}),M.on("mouseout",function(a,b){d3.select(this).classed("hover",!1),o.elementMouseout({label:a.name,data:a.data,index:b})});var N=C.selectAll(".dimension").data(h),O=N.enter().append("g").attr("class","nv-parallelCoordinates dimension");O.append("g").attr("class","nv-parallelCoordinates nv-axis"),O.append("g").attr("class","nv-parallelCoordinates-brush"),O.append("text").attr("class","nv-parallelCoordinates nv-label"),N.attr("transform",function(a){return"translate("+f(a)+",0)"}),N.exit().remove(),N.select(".nv-label").style("cursor","move").attr("dy","-1em").attr("text-anchor","middle").text(String).on("mouseover",function(a){o.elementMouseover({dim:a,pos:[d3.mouse(this.parentNode.parentNode)[0],d3.mouse(this.parentNode.parentNode)[1]]})}).on("mouseout",function(a){o.elementMouseout({dim:a})}).call(H),N.select(".nv-axis").each(function(a,b){d3.select(this).call(G.scale(g[a]).tickFormat(d3.format(i[b])))}),N.select(".nv-parallelCoordinates-brush").each(function(a){d3.select(this).call(g[a].brush)}).selectAll("rect").attr("x",-8).attr("width",16)}),b}var c={top:30,right:0,bottom:10,left:0},d=null,e=null,f=d3.scale.ordinal(),g={},h=[],i=[],j=a.utils.defaultColor(),k=[],l=[],m=[],n=1,o=d3.dispatch("brush","elementMouseover","elementMouseout");return b.dispatch=o,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},dimensionNames:{get:function(){return h},set:function(a){h=a}},dimensionFormats:{get:function(){return i},set:function(a){i=a}},lineTension:{get:function(){return n},set:function(a){n=a}},dimensions:{get:function(){return h},set:function(b){a.deprecated("dimensions","use dimensionNames instead"),h=b}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.pie=function(){"use strict";function b(E){return D.reset(),E.each(function(b){function E(a,b){a.endAngle=isNaN(a.endAngle)?0:a.endAngle,a.startAngle=isNaN(a.startAngle)?0:a.startAngle,p||(a.innerRadius=0);var c=d3.interpolate(this._current,a);return this._current=c(0),function(a){return B[b](c(a))}}var F=d-c.left-c.right,G=e-c.top-c.bottom,H=Math.min(F,G)/2,I=[],J=[];if(i=d3.select(this),0===z.length)for(var K=H-H/5,L=y*H,M=0;Mc)return"";if("function"==typeof n)d=n(a,b,{key:f(a.data),value:g(a.data),percent:k(c)});else switch(n){case"key":d=f(a.data);break;case"value":d=k(g(a.data));break;case"percent":d=d3.format("%")(c)}return d})}}),D.renderEnd("pie immediate"),b}var c={top:0,right:0,bottom:0,left:0},d=500,e=500,f=function(a){return a.x},g=function(a){return a.y},h=Math.floor(1e4*Math.random()),i=null,j=a.utils.defaultColor(),k=d3.format(",.2f"),l=!0,m=!1,n="key",o=.02,p=!1,q=!1,r=!0,s=0,t=!1,u=!1,v=!1,w=!1,x=0,y=.5,z=[],A=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),B=[],C=[],D=a.utils.renderWatch(A);return b.dispatch=A,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{arcsRadius:{get:function(){return z},set:function(a){z=a}},width:{get:function(){return d},set:function(a){d=a}},height:{get:function(){return e},set:function(a){e=a}},showLabels:{get:function(){return l},set:function(a){l=a}},title:{get:function(){return q},set:function(a){q=a}},titleOffset:{get:function(){return s},set:function(a){s=a}},labelThreshold:{get:function(){return o},set:function(a){o=a}},valueFormat:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return h},set:function(a){h=a}},endAngle:{get:function(){return w},set:function(a){w=a}},startAngle:{get:function(){return u},set:function(a){u=a}},padAngle:{get:function(){return v},set:function(a){v=a}},cornerRadius:{get:function(){return x},set:function(a){x=a}},donutRatio:{get:function(){return y},set:function(a){y=a}},labelsOutside:{get:function(){return m},set:function(a){m=a}},labelSunbeamLayout:{get:function(){return t},set:function(a){t=a}},donut:{get:function(){return p},set:function(a){p=a}},growOnHover:{get:function(){return r},set:function(a){r=a}},pieLabelsOutside:{get:function(){return m},set:function(b){m=b,a.deprecated("pieLabelsOutside","use labelsOutside instead")}},donutLabelsOutside:{get:function(){return m},set:function(b){m=b,a.deprecated("donutLabelsOutside","use labelsOutside instead")}},labelFormat:{get:function(){return k},set:function(b){k=b,a.deprecated("labelFormat","use valueFormat instead")}},margin:{get:function(){return c},set:function(a){c.top="undefined"!=typeof a.top?a.top:c.top,c.right="undefined"!=typeof a.right?a.right:c.right,c.bottom="undefined"!=typeof a.bottom?a.bottom:c.bottom,c.left="undefined"!=typeof a.left?a.left:c.left}},y:{get:function(){return g},set:function(a){g=d3.functor(a)}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}},labelType:{get:function(){return n},set:function(a){n=a||"key"}}}),a.utils.initOptions(b),b},a.models.pieChart=function(){"use strict";function b(e){return q.reset(),q.models(c),e.each(function(e){var k=d3.select(this);a.utils.initSVG(k);var n=a.utils.availableWidth(g,k,f),o=a.utils.availableHeight(h,k,f);if(b.update=function(){k.transition().call(b)},b.container=this,l.setter(s(e),b.update).getter(r(e)).update(),l.disabled=e.map(function(a){return!!a.disabled}),!m){var q;m={};for(q in l)m[q]=l[q]instanceof Array?l[q].slice(0):l[q]}if(!e||!e.length)return a.utils.noData(b,k),b;k.selectAll(".nv-noData").remove();var t=k.selectAll("g.nv-wrap.nv-pieChart").data([e]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),v=t.select("g");if(u.append("g").attr("class","nv-pieWrap"),u.append("g").attr("class","nv-legendWrap"),i)if("top"===j)d.width(n).key(c.x()),t.select(".nv-legendWrap").datum(e).call(d),f.top!=d.height()&&(f.top=d.height(),o=a.utils.availableHeight(h,k,f)),t.select(".nv-legendWrap").attr("transform","translate(0,"+-f.top+")");else if("right"===j){var w=a.models.legend().width();w>n/2&&(w=n/2),d.height(o).key(c.x()),d.width(w),n-=d.width(),t.select(".nv-legendWrap").datum(e).call(d).attr("transform","translate("+n+",0)")}t.attr("transform","translate("+f.left+","+f.top+")"),c.width(n).height(o);var x=v.select(".nv-pieWrap").datum([e]);d3.transition(x).call(c),d.dispatch.on("stateChange",function(a){for(var c in a)l[c]=a[c];p.stateChange(l),b.update()}),p.on("changeState",function(a){"undefined"!=typeof a.disabled&&(e.forEach(function(b,c){b.disabled=a.disabled[c]}),l.disabled=a.disabled),b.update()})}),q.renderEnd("pieChart immediate"),b}var c=a.models.pie(),d=a.models.legend(),e=a.models.tooltip(),f={top:30,right:20,bottom:20,left:20},g=null,h=null,i=!0,j="top",k=a.utils.defaultColor(),l=a.utils.state(),m=null,n=null,o=250,p=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd");e.headerEnabled(!1).duration(0).valueFormatter(function(a,b){return c.valueFormat()(a,b)});var q=a.utils.renderWatch(p),r=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},s=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color},e.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(){e.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(){e.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.legend=d,b.dispatch=p,b.pie=c,b.tooltip=e,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{noData:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return i},set:function(a){i=a}},legendPosition:{get:function(){return j},set:function(a){j=a}},defaultState:{get:function(){return m},set:function(a){m=a}},tooltips:{get:function(){return e.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),e.enabled(!!b)}},tooltipContent:{get:function(){return e.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),e.contentGenerator(b)}},color:{get:function(){return k},set:function(a){k=a,d.color(k),c.color(k)}},duration:{get:function(){return o},set:function(a){o=a,q.reset(o)}},margin:{get:function(){return f},set:function(a){f.top=void 0!==a.top?a.top:f.top,f.right=void 0!==a.right?a.right:f.right,f.bottom=void 0!==a.bottom?a.bottom:f.bottom,f.left=void 0!==a.left?a.left:f.left}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.scatter=function(){"use strict";function b(N){return P.reset(),N.each(function(b){function N(){if(O=!1,!w)return!1;if(M===!0){var a=d3.merge(b.map(function(a,b){return a.values.map(function(a,c){var d=p(a,c),e=q(a,c);return[m(d)+1e-4*Math.random(),n(e)+1e-4*Math.random(),b,c,a]}).filter(function(a,b){return x(a[4],b)})}));if(0==a.length)return!1;a.length<3&&(a.push([m.range()[0]-20,n.range()[0]-20,null,null]),a.push([m.range()[1]+20,n.range()[1]+20,null,null]),a.push([m.range()[0]-20,n.range()[0]+20,null,null]),a.push([m.range()[1]+20,n.range()[1]-20,null,null]));var c=d3.geom.polygon([[-10,-10],[-10,i+10],[h+10,i+10],[h+10,-10]]),d=d3.geom.voronoi(a).map(function(b,d){return{data:c.clip(b),series:a[d][2],point:a[d][3]}});U.select(".nv-point-paths").selectAll("path").remove();var e=U.select(".nv-point-paths").selectAll("path").data(d),f=e.enter().append("svg:path").attr("d",function(a){return a&&a.data&&0!==a.data.length?"M"+a.data.join(",")+"Z":"M 0 0"}).attr("id",function(a,b){return"nv-path-"+b}).attr("clip-path",function(a,b){return"url(#nv-clip-"+b+")"});C&&f.style("fill",d3.rgb(230,230,230)).style("fill-opacity",.4).style("stroke-opacity",1).style("stroke",d3.rgb(200,200,200)),B&&(U.select(".nv-point-clips").selectAll("clipPath").remove(),U.select(".nv-point-clips").selectAll("clipPath").data(a).enter().append("svg:clipPath").attr("id",function(a,b){return"nv-clip-"+b}).append("svg:circle").attr("cx",function(a){return a[0]}).attr("cy",function(a){return a[1]}).attr("r",D));var k=function(a,c){if(O)return 0;var d=b[a.series];if(void 0!==d){var e=d.values[a.point];e.color=j(d,a.series),e.x=p(e),e.y=q(e);var f=l.node().getBoundingClientRect(),h=window.pageYOffset||document.documentElement.scrollTop,i=window.pageXOffset||document.documentElement.scrollLeft,k={left:m(p(e,a.point))+f.left+i+g.left+10,top:n(q(e,a.point))+f.top+h+g.top+10};c({point:e,series:d,pos:k,seriesIndex:a.series,pointIndex:a.point})}};e.on("click",function(a){k(a,L.elementClick)}).on("dblclick",function(a){k(a,L.elementDblClick)}).on("mouseover",function(a){k(a,L.elementMouseover)}).on("mouseout",function(a){k(a,L.elementMouseout)})}else U.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementClick({point:e,series:d,pos:[m(p(e,c))+g.left,n(q(e,c))+g.top],seriesIndex:a.series,pointIndex:c})}).on("dblclick",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementDblClick({point:e,series:d,pos:[m(p(e,c))+g.left,n(q(e,c))+g.top],seriesIndex:a.series,pointIndex:c})}).on("mouseover",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementMouseover({point:e,series:d,pos:[m(p(e,c))+g.left,n(q(e,c))+g.top],seriesIndex:a.series,pointIndex:c,color:j(a,c)})}).on("mouseout",function(a,c){if(O||!b[a.series])return 0;var d=b[a.series],e=d.values[c];L.elementMouseout({point:e,series:d,seriesIndex:a.series,pointIndex:c,color:j(a,c)})})}l=d3.select(this);var R=a.utils.availableWidth(h,l,g),S=a.utils.availableHeight(i,l,g);a.utils.initSVG(l),b.forEach(function(a,b){a.values.forEach(function(a){a.series=b})});var T=E&&F&&I?[]:d3.merge(b.map(function(a){return a.values.map(function(a,b){return{x:p(a,b),y:q(a,b),size:r(a,b)}})}));m.domain(E||d3.extent(T.map(function(a){return a.x}).concat(t))),m.range(y&&b[0]?G||[(R*z+R)/(2*b[0].values.length),R-R*(1+z)/(2*b[0].values.length)]:G||[0,R]),n.domain(F||d3.extent(T.map(function(a){return a.y}).concat(u))).range(H||[S,0]),o.domain(I||d3.extent(T.map(function(a){return a.size}).concat(v))).range(J||Q),K=m.domain()[0]===m.domain()[1]||n.domain()[0]===n.domain()[1],m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]-.01*m.domain()[0],m.domain()[1]+.01*m.domain()[1]]:[-1,1]),n.domain()[0]===n.domain()[1]&&n.domain(n.domain()[0]?[n.domain()[0]-.01*n.domain()[0],n.domain()[1]+.01*n.domain()[1]]:[-1,1]),isNaN(m.domain()[0])&&m.domain([-1,1]),isNaN(n.domain()[0])&&n.domain([-1,1]),c=c||m,d=d||n,e=e||o;var U=l.selectAll("g.nv-wrap.nv-scatter").data([b]),V=U.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+k),W=V.append("defs"),X=V.append("g"),Y=U.select("g");U.classed("nv-single-point",K),X.append("g").attr("class","nv-groups"),X.append("g").attr("class","nv-point-paths"),V.append("g").attr("class","nv-point-clips"),U.attr("transform","translate("+g.left+","+g.top+")"),W.append("clipPath").attr("id","nv-edge-clip-"+k).append("rect"),U.select("#nv-edge-clip-"+k+" rect").attr("width",R).attr("height",S>0?S:0),Y.attr("clip-path",A?"url(#nv-edge-clip-"+k+")":""),O=!0;var Z=U.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});Z.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),Z.exit().remove(),Z.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}),Z.watchTransition(P,"scatter: groups").style("fill",function(a,b){return j(a,b)}).style("stroke",function(a,b){return j(a,b)}).style("stroke-opacity",1).style("fill-opacity",.5);var $=Z.selectAll("path.nv-point").data(function(a){return a.values.map(function(a,b){return[a,b]}).filter(function(a,b){return x(a[0],b)})});$.enter().append("path").style("fill",function(a){return a.color}).style("stroke",function(a){return a.color}).attr("transform",function(a){return"translate("+c(p(a[0],a[1]))+","+d(q(a[0],a[1]))+")"}).attr("d",a.utils.symbol().type(function(a){return s(a[0])}).size(function(a){return o(r(a[0],a[1]))})),$.exit().remove(),Z.exit().selectAll("path.nv-point").watchTransition(P,"scatter exit").attr("transform",function(a){return"translate("+m(p(a[0],a[1]))+","+n(q(a[0],a[1]))+")"}).remove(),$.each(function(a){d3.select(this).classed("nv-point",!0).classed("nv-point-"+a[1],!0).classed("nv-noninteractive",!w).classed("hover",!1)}),$.watchTransition(P,"scatter points").attr("transform",function(a){return"translate("+m(p(a[0],a[1]))+","+n(q(a[0],a[1]))+")"}).attr("d",a.utils.symbol().type(function(a){return s(a[0])}).size(function(a){return o(r(a[0],a[1]))})),clearTimeout(f),f=setTimeout(N,300),c=m.copy(),d=n.copy(),e=o.copy()}),P.renderEnd("scatter immediate"),b}var c,d,e,f,g={top:0,right:0,bottom:0,left:0},h=null,i=null,j=a.utils.defaultColor(),k=Math.floor(1e5*Math.random()),l=null,m=d3.scale.linear(),n=d3.scale.linear(),o=d3.scale.linear(),p=function(a){return a.x},q=function(a){return a.y},r=function(a){return a.size||1},s=function(a){return a.shape||"circle"},t=[],u=[],v=[],w=!0,x=function(a){return!a.notActive},y=!1,z=.1,A=!1,B=!0,C=!1,D=function(){return 25},E=null,F=null,G=null,H=null,I=null,J=null,K=!1,L=d3.dispatch("elementClick","elementDblClick","elementMouseover","elementMouseout","renderEnd"),M=!0,N=250,O=!1,P=a.utils.renderWatch(L,N),Q=[16,256];return b.dispatch=L,b.options=a.utils.optionsFunc.bind(b),b._calls=new function(){this.clearHighlights=function(){return a.dom.write(function(){l.selectAll(".nv-point.hover").classed("hover",!1)}),null},this.highlightPoint=function(b,c,d){a.dom.write(function(){l.select(" .nv-series-"+b+" .nv-point-"+c).classed("hover",d)})}},L.on("elementMouseover.point",function(a){w&&b._calls.highlightPoint(a.seriesIndex,a.pointIndex,!0)}),L.on("elementMouseout.point",function(a){w&&b._calls.highlightPoint(a.seriesIndex,a.pointIndex,!1)}),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},pointScale:{get:function(){return o},set:function(a){o=a}},xDomain:{get:function(){return E},set:function(a){E=a}},yDomain:{get:function(){return F},set:function(a){F=a}},pointDomain:{get:function(){return I},set:function(a){I=a}},xRange:{get:function(){return G},set:function(a){G=a}},yRange:{get:function(){return H},set:function(a){H=a}},pointRange:{get:function(){return J},set:function(a){J=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},forcePoint:{get:function(){return v},set:function(a){v=a}},interactive:{get:function(){return w},set:function(a){w=a}},pointActive:{get:function(){return x},set:function(a){x=a}},padDataOuter:{get:function(){return z},set:function(a){z=a}},padData:{get:function(){return y},set:function(a){y=a}},clipEdge:{get:function(){return A},set:function(a){A=a}},clipVoronoi:{get:function(){return B},set:function(a){B=a}},clipRadius:{get:function(){return D},set:function(a){D=a}},showVoronoi:{get:function(){return C},set:function(a){C=a}},id:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return p},set:function(a){p=d3.functor(a)}},y:{get:function(){return q},set:function(a){q=d3.functor(a)}},pointSize:{get:function(){return r},set:function(a){r=d3.functor(a)}},pointShape:{get:function(){return s},set:function(a){s=d3.functor(a)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},duration:{get:function(){return N},set:function(a){N=a,P.reset(N)}},color:{get:function(){return j},set:function(b){j=a.utils.getColor(b)}},useVoronoi:{get:function(){return M},set:function(a){M=a,M===!1&&(B=!1)}}}),a.utils.initOptions(b),b},a.models.scatterChart=function(){"use strict";function b(z){return D.reset(),D.models(c),t&&D.models(d),u&&D.models(e),q&&D.models(g),r&&D.models(h),z.each(function(z){m=d3.select(this),a.utils.initSVG(m);var G=a.utils.availableWidth(k,m,j),H=a.utils.availableHeight(l,m,j);if(b.update=function(){0===A?m.call(b):m.transition().duration(A).call(b)},b.container=this,w.setter(F(z),b.update).getter(E(z)).update(),w.disabled=z.map(function(a){return!!a.disabled}),!x){var I;x={};for(I in w)x[I]=w[I]instanceof Array?w[I].slice(0):w[I]}if(!(z&&z.length&&z.filter(function(a){return a.values.length}).length))return a.utils.noData(b,m),D.renderEnd("scatter immediate"),b;m.selectAll(".nv-noData").remove(),o=c.xScale(),p=c.yScale();var J=m.selectAll("g.nv-wrap.nv-scatterChart").data([z]),K=J.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+c.id()),L=K.append("g"),M=J.select("g");if(L.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none"),L.append("g").attr("class","nv-x nv-axis"),L.append("g").attr("class","nv-y nv-axis"),L.append("g").attr("class","nv-scatterWrap"),L.append("g").attr("class","nv-regressionLinesWrap"),L.append("g").attr("class","nv-distWrap"),L.append("g").attr("class","nv-legendWrap"),v&&M.select(".nv-y.nv-axis").attr("transform","translate("+G+",0)"),s){var N=G;f.width(N),J.select(".nv-legendWrap").datum(z).call(f),j.top!=f.height()&&(j.top=f.height(),H=a.utils.availableHeight(l,m,j)),J.select(".nv-legendWrap").attr("transform","translate(0,"+-j.top+")")}J.attr("transform","translate("+j.left+","+j.top+")"),c.width(G).height(H).color(z.map(function(a,b){return a.color=a.color||n(a,b),a.color}).filter(function(a,b){return!z[b].disabled})),J.select(".nv-scatterWrap").datum(z.filter(function(a){return!a.disabled})).call(c),J.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+c.id()+")");var O=J.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(a){return a});O.enter().append("g").attr("class","nv-regLines");var P=O.selectAll(".nv-regLine").data(function(a){return[a]});P.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0),P.filter(function(a){return a.intercept&&a.slope}).watchTransition(D,"scatterPlusLineChart: regline").attr("x1",o.range()[0]).attr("x2",o.range()[1]).attr("y1",function(a){return p(o.domain()[0]*a.slope+a.intercept)}).attr("y2",function(a){return p(o.domain()[1]*a.slope+a.intercept)}).style("stroke",function(a,b,c){return n(a,c)}).style("stroke-opacity",function(a){return a.disabled||"undefined"==typeof a.slope||"undefined"==typeof a.intercept?0:1}),t&&(d.scale(o)._ticks(a.utils.calcTicksX(G/100,z)).tickSize(-H,0),M.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(d)),u&&(e.scale(p)._ticks(a.utils.calcTicksY(H/36,z)).tickSize(-G,0),M.select(".nv-y.nv-axis").call(e)),q&&(g.getData(c.x()).scale(o).width(G).color(z.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!z[b].disabled})),L.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),M.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(z.filter(function(a){return!a.disabled})).call(g)),r&&(h.getData(c.y()).scale(p).width(H).color(z.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!z[b].disabled})),L.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),M.select(".nv-distributionY").attr("transform","translate("+(v?G:-h.size())+",0)").datum(z.filter(function(a){return!a.disabled})).call(h)),f.dispatch.on("stateChange",function(a){for(var c in a)w[c]=a[c];y.stateChange(w),b.update()}),y.on("changeState",function(a){"undefined"!=typeof a.disabled&&(z.forEach(function(b,c){b.disabled=a.disabled[c]}),w.disabled=a.disabled),b.update()}),c.dispatch.on("elementMouseout.tooltip",function(a){i.hidden(!0),m.select(".nv-chart-"+c.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",0),m.select(".nv-chart-"+c.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",h.size())}),c.dispatch.on("elementMouseover.tooltip",function(a){m.select(".nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",a.pos.top-H-j.top),m.select(".nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.pos.left+g.size()-j.left),i.position(a.pos).data(a).hidden(!1)}),B=o.copy(),C=p.copy()}),D.renderEnd("scatter with line immediate"),b}var c=a.models.scatter(),d=a.models.axis(),e=a.models.axis(),f=a.models.legend(),g=a.models.distribution(),h=a.models.distribution(),i=a.models.tooltip(),j={top:30,right:20,bottom:50,left:75},k=null,l=null,m=null,n=a.utils.defaultColor(),o=c.xScale(),p=c.yScale(),q=!1,r=!1,s=!0,t=!0,u=!0,v=!1,w=a.utils.state(),x=null,y=d3.dispatch("stateChange","changeState","renderEnd"),z=null,A=250;c.xScale(o).yScale(p),d.orient("bottom").tickPadding(10),e.orient(v?"right":"left").tickPadding(10),g.axis("x"),h.axis("y"),i.headerFormatter(function(a,b){return d.tickFormat()(a,b)}).valueFormatter(function(a,b){return e.tickFormat()(a,b)});var B,C,D=a.utils.renderWatch(y,A),E=function(a){return function(){return{active:a.map(function(a){return!a.disabled})}}},F=function(a){return function(b){void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};return b.dispatch=y,b.scatter=c,b.legend=f,b.xAxis=d,b.yAxis=e,b.distX=g,b.distY=h,b.tooltip=i,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},container:{get:function(){return m},set:function(a){m=a}},showDistX:{get:function(){return q},set:function(a){q=a}},showDistY:{get:function(){return r},set:function(a){r=a}},showLegend:{get:function(){return s},set:function(a){s=a}},showXAxis:{get:function(){return t},set:function(a){t=a}},showYAxis:{get:function(){return u},set:function(a){u=a}},defaultState:{get:function(){return x},set:function(a){x=a}},noData:{get:function(){return z},set:function(a){z=a}},duration:{get:function(){return A},set:function(a){A=a}},tooltips:{get:function(){return i.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),i.enabled(!!b) }},tooltipContent:{get:function(){return i.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),i.contentGenerator(b)}},tooltipXContent:{get:function(){return i.contentGenerator()},set:function(){a.deprecated("tooltipContent","This option is removed, put values into main tooltip.")}},tooltipYContent:{get:function(){return i.contentGenerator()},set:function(){a.deprecated("tooltipContent","This option is removed, put values into main tooltip.")}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},rightAlignYAxis:{get:function(){return v},set:function(a){v=a,e.orient(a?"right":"left")}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),f.color(n),g.color(n),h.color(n)}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.sparkline=function(){"use strict";function b(k){return k.each(function(b){var k=h-g.left-g.right,q=i-g.top-g.bottom;j=d3.select(this),a.utils.initSVG(j),l.domain(c||d3.extent(b,n)).range(e||[0,k]),m.domain(d||d3.extent(b,o)).range(f||[q,0]);{var r=j.selectAll("g.nv-wrap.nv-sparkline").data([b]),s=r.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");s.append("g"),r.select("g")}r.attr("transform","translate("+g.left+","+g.top+")");var t=r.selectAll("path").data(function(a){return[a]});t.enter().append("path"),t.exit().remove(),t.style("stroke",function(a,b){return a.color||p(a,b)}).attr("d",d3.svg.line().x(function(a,b){return l(n(a,b))}).y(function(a,b){return m(o(a,b))}));var u=r.selectAll("circle.nv-point").data(function(a){function b(b){if(-1!=b){var c=a[b];return c.pointIndex=b,c}return null}var c=a.map(function(a,b){return o(a,b)}),d=b(c.lastIndexOf(m.domain()[1])),e=b(c.indexOf(m.domain()[0])),f=b(c.length-1);return[e,d,f].filter(function(a){return null!=a})});u.enter().append("circle"),u.exit().remove(),u.attr("cx",function(a){return l(n(a,a.pointIndex))}).attr("cy",function(a){return m(o(a,a.pointIndex))}).attr("r",2).attr("class",function(a){return n(a,a.pointIndex)==l.domain()[1]?"nv-point nv-currentValue":o(a,a.pointIndex)==m.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),b}var c,d,e,f,g={top:2,right:0,bottom:2,left:0},h=400,i=32,j=null,k=!0,l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=a.utils.getColor(["#000"]);return b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return i},set:function(a){i=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},animate:{get:function(){return k},set:function(a){k=a}},x:{get:function(){return n},set:function(a){n=d3.functor(a)}},y:{get:function(){return o},set:function(a){o=d3.functor(a)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},color:{get:function(){return p},set:function(b){p=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.sparklinePlus=function(){"use strict";function b(p){return p.each(function(p){function q(){if(!j){var a=z.selectAll(".nv-hoverValue").data(i),b=a.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);a.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),a.attr("transform",function(a){return"translate("+c(e.x()(p[a],a))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),i.length&&(b.append("line").attr("x1",0).attr("y1",-f.top).attr("x2",0).attr("y2",u),b.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-f.top).attr("text-anchor","end").attr("dy",".9em"),z.select(".nv-hoverValue .nv-xValue").text(k(e.x()(p[i[0]],i[0]))),b.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-f.top).attr("text-anchor","start").attr("dy",".9em"),z.select(".nv-hoverValue .nv-yValue").text(l(e.y()(p[i[0]],i[0]))))}}function r(){function a(a,b){for(var c=Math.abs(e.x()(a[0],0)-b),d=0,f=0;fc;++c){for(b=0,d=0;bb;b++)a[b][c][1]/=d;else for(b=0;e>b;b++)a[b][c][1]=0}for(c=0;f>c;++c)g[c]=0;return g}}),u.renderEnd("stackedArea immediate"),b}var c,d,e={top:0,right:0,bottom:0,left:0},f=960,g=500,h=a.utils.defaultColor(),i=Math.floor(1e5*Math.random()),j=null,k=function(a){return a.x},l=function(a){return a.y},m="stack",n="zero",o="default",p="linear",q=!1,r=a.models.scatter(),s=250,t=d3.dispatch("areaClick","areaMouseover","areaMouseout","renderEnd","elementClick","elementMouseover","elementMouseout");r.pointSize(2.2).pointDomain([2.2,2.2]);var u=a.utils.renderWatch(t,s);return b.dispatch=t,b.scatter=r,r.dispatch.on("elementClick",function(){t.elementClick.apply(this,arguments)}),r.dispatch.on("elementMouseover",function(){t.elementMouseover.apply(this,arguments)}),r.dispatch.on("elementMouseout",function(){t.elementMouseout.apply(this,arguments)}),b.interpolate=function(a){return arguments.length?(p=a,b):p},b.duration=function(a){return arguments.length?(s=a,u.reset(s),r.duration(s),b):s},b.dispatch=t,b.scatter=r,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return f},set:function(a){f=a}},height:{get:function(){return g},set:function(a){g=a}},clipEdge:{get:function(){return q},set:function(a){q=a}},offset:{get:function(){return n},set:function(a){n=a}},order:{get:function(){return o},set:function(a){o=a}},interpolate:{get:function(){return p},set:function(a){p=a}},x:{get:function(){return k},set:function(a){k=d3.functor(a)}},y:{get:function(){return l},set:function(a){l=d3.functor(a)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},color:{get:function(){return h},set:function(b){h=a.utils.getColor(b)}},style:{get:function(){return m},set:function(a){switch(m=a){case"stack":b.offset("zero"),b.order("default");break;case"stream":b.offset("wiggle"),b.order("inside-out");break;case"stream-center":b.offset("silhouette"),b.order("inside-out");break;case"expand":b.offset("expand"),b.order("default");break;case"stack_percent":b.offset(b.d3_stackedOffset_stackPercent),b.order("default")}}},duration:{get:function(){return s},set:function(a){s=a,u.reset(s),r.duration(s)}}}),a.utils.inheritOptions(b,r),a.utils.initOptions(b),b},a.models.stackedAreaChart=function(){"use strict";function b(k){return F.reset(),F.models(e),r&&F.models(f),s&&F.models(g),k.each(function(k){var x=d3.select(this),F=this;a.utils.initSVG(x);var K=a.utils.availableWidth(m,x,l),L=a.utils.availableHeight(n,x,l);if(b.update=function(){x.transition().duration(C).call(b)},b.container=this,v.setter(I(k),b.update).getter(H(k)).update(),v.disabled=k.map(function(a){return!!a.disabled}),!w){var M;w={};for(M in v)w[M]=v[M]instanceof Array?v[M].slice(0):v[M]}if(!(k&&k.length&&k.filter(function(a){return a.values.length}).length))return a.utils.noData(b,x),b;x.selectAll(".nv-noData").remove(),c=e.xScale(),d=e.yScale();var N=x.selectAll("g.nv-wrap.nv-stackedAreaChart").data([k]),O=N.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),P=N.select("g");if(O.append("rect").style("opacity",0),O.append("g").attr("class","nv-x nv-axis"),O.append("g").attr("class","nv-y nv-axis"),O.append("g").attr("class","nv-stackedWrap"),O.append("g").attr("class","nv-legendWrap"),O.append("g").attr("class","nv-controlsWrap"),O.append("g").attr("class","nv-interactive"),P.select("rect").attr("width",K).attr("height",L),q){var Q=p?K-z:K;h.width(Q),P.select(".nv-legendWrap").datum(k).call(h),l.top!=h.height()&&(l.top=h.height(),L=a.utils.availableHeight(n,x,l)),P.select(".nv-legendWrap").attr("transform","translate("+(K-Q)+","+-l.top+")")}if(p){var R=[{key:B.stacked||"Stacked",metaKey:"Stacked",disabled:"stack"!=e.style(),style:"stack"},{key:B.stream||"Stream",metaKey:"Stream",disabled:"stream"!=e.style(),style:"stream"},{key:B.expanded||"Expanded",metaKey:"Expanded",disabled:"expand"!=e.style(),style:"expand"},{key:B.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:"stack_percent"!=e.style(),style:"stack_percent"}];z=A.length/3*260,R=R.filter(function(a){return-1!==A.indexOf(a.metaKey)}),i.width(z).color(["#444","#444","#444"]),P.select(".nv-controlsWrap").datum(R).call(i),l.top!=Math.max(i.height(),h.height())&&(l.top=Math.max(i.height(),h.height()),L=a.utils.availableHeight(n,x,l)),P.select(".nv-controlsWrap").attr("transform","translate(0,"+-l.top+")")}N.attr("transform","translate("+l.left+","+l.top+")"),t&&P.select(".nv-y.nv-axis").attr("transform","translate("+K+",0)"),u&&(j.width(K).height(L).margin({left:l.left,top:l.top}).svgContainer(x).xScale(c),N.select(".nv-interactive").call(j)),e.width(K).height(L);var S=P.select(".nv-stackedWrap").datum(k);if(S.transition().call(e),r&&(f.scale(c)._ticks(a.utils.calcTicksX(K/100,k)).tickSize(-L,0),P.select(".nv-x.nv-axis").attr("transform","translate(0,"+L+")"),P.select(".nv-x.nv-axis").transition().duration(0).call(f)),s){var T;if(T="wiggle"===e.offset()?0:a.utils.calcTicksY(L/36,k),g.scale(d)._ticks(T).tickSize(-K,0),"expand"===e.style()||"stack_percent"===e.style()){var U=g.tickFormat();D&&U===J||(D=U),g.tickFormat(J)}else D&&(g.tickFormat(D),D=null);P.select(".nv-y.nv-axis").transition().duration(0).call(g)}e.dispatch.on("areaClick.toggle",function(a){k.forEach(1===k.filter(function(a){return!a.disabled}).length?function(a){a.disabled=!1}:function(b,c){b.disabled=c!=a.seriesIndex}),v.disabled=k.map(function(a){return!!a.disabled}),y.stateChange(v),b.update()}),h.dispatch.on("stateChange",function(a){for(var c in a)v[c]=a[c];y.stateChange(v),b.update()}),i.dispatch.on("legendClick",function(a){a.disabled&&(R=R.map(function(a){return a.disabled=!0,a}),a.disabled=!1,e.style(a.style),v.style=e.style(),y.stateChange(v),b.update())}),j.dispatch.on("elementMousemove",function(c){e.clearHighlights();var d,g,h,i=[];if(k.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(f,j){g=a.interactiveBisect(f.values,c.pointXValue,b.x());var k=f.values[g],l=b.y()(k,g);if(null!=l&&e.highlightPoint(j,g,!0),"undefined"!=typeof k){"undefined"==typeof d&&(d=k),"undefined"==typeof h&&(h=b.xScale()(b.x()(k,g)));var m="expand"==e.style()?k.display.y:b.y()(k,g);i.push({key:f.key,value:m,color:o(f,f.seriesIndex),stackedValue:k.display})}}),i.reverse(),i.length>2){var m=b.yScale().invert(c.mouseY),n=null;i.forEach(function(a,b){m=Math.abs(m);var c=Math.abs(a.stackedValue.y0),d=Math.abs(a.stackedValue.y);return m>=c&&d+c>=m?void(n=b):void 0}),null!=n&&(i[n].highlight=!0)}var p=f.tickFormat()(b.x()(d,g)),q=j.tooltip.valueFormatter();"expand"===e.style()||"stack_percent"===e.style()?(E||(E=q),q=d3.format(".1%")):E&&(q=E,E=null),j.tooltip.position({left:h+l.left,top:c.mouseY+l.top}).chartContainer(F.parentNode).valueFormatter(q).data({value:p,series:i})(),j.renderGuideLine(h)}),j.dispatch.on("elementMouseout",function(){e.clearHighlights()}),y.on("changeState",function(a){"undefined"!=typeof a.disabled&&k.length===a.disabled.length&&(k.forEach(function(b,c){b.disabled=a.disabled[c]}),v.disabled=a.disabled),"undefined"!=typeof a.style&&(e.style(a.style),G=a.style),b.update()})}),F.renderEnd("stacked Area chart immediate"),b}var c,d,e=a.models.stackedArea(),f=a.models.axis(),g=a.models.axis(),h=a.models.legend(),i=a.models.legend(),j=a.interactiveGuideline(),k=a.models.tooltip(),l={top:30,right:25,bottom:50,left:60},m=null,n=null,o=a.utils.defaultColor(),p=!0,q=!0,r=!0,s=!0,t=!1,u=!1,v=a.utils.state(),w=null,x=null,y=d3.dispatch("stateChange","changeState","renderEnd"),z=250,A=["Stacked","Stream","Expanded"],B={},C=250;v.style=e.style(),f.orient("bottom").tickPadding(7),g.orient(t?"right":"left"),k.headerFormatter(function(a,b){return f.tickFormat()(a,b)}).valueFormatter(function(a,b){return g.tickFormat()(a,b)}),j.tooltip.headerFormatter(function(a,b){return f.tickFormat()(a,b)}).valueFormatter(function(a,b){return g.tickFormat()(a,b)});var D=null,E=null;i.updateState(!1);var F=a.utils.renderWatch(y),G=e.style(),H=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),style:e.style()}}},I=function(a){return function(b){void 0!==b.style&&(G=b.style),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}},J=d3.format("%");return e.dispatch.on("elementMouseover.tooltip",function(a){a.point.x=e.x()(a.point),a.point.y=e.y()(a.point),k.data(a).position(a.pos).hidden(!1)}),e.dispatch.on("elementMouseout.tooltip",function(){k.hidden(!0)}),b.dispatch=y,b.stacked=e,b.legend=h,b.controls=i,b.xAxis=f,b.yAxis=g,b.interactiveLayer=j,b.tooltip=k,b.dispatch=y,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},showLegend:{get:function(){return q},set:function(a){q=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},defaultState:{get:function(){return w},set:function(a){w=a}},noData:{get:function(){return x},set:function(a){x=a}},showControls:{get:function(){return p},set:function(a){p=a}},controlLabels:{get:function(){return B},set:function(a){B=a}},controlOptions:{get:function(){return A},set:function(a){A=a}},tooltips:{get:function(){return k.enabled()},set:function(b){a.deprecated("tooltips","use chart.tooltip.enabled() instead"),k.enabled(!!b)}},tooltipContent:{get:function(){return k.contentGenerator()},set:function(b){a.deprecated("tooltipContent","use chart.tooltip.contentGenerator() instead"),k.contentGenerator(b)}},margin:{get:function(){return l},set:function(a){l.top=void 0!==a.top?a.top:l.top,l.right=void 0!==a.right?a.right:l.right,l.bottom=void 0!==a.bottom?a.bottom:l.bottom,l.left=void 0!==a.left?a.left:l.left}},duration:{get:function(){return C},set:function(a){C=a,F.reset(C),e.duration(C),f.duration(C),g.duration(C)}},color:{get:function(){return o},set:function(b){o=a.utils.getColor(b),h.color(o),e.color(o)}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,g.orient(t?"right":"left")}},useInteractiveGuideline:{get:function(){return u},set:function(a){u=!!a,b.interactive(!a),b.useVoronoi(!a),e.scatter.interactive(!a)}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.sunburst=function(){"use strict";function b(u){return t.reset(),u.each(function(b){function t(a){a.x0=a.x,a.dx0=a.dx}function u(a){var b=d3.interpolate(p.domain(),[a.x,a.x+a.dx]),c=d3.interpolate(q.domain(),[a.y,1]),d=d3.interpolate(q.range(),[a.y?20:0,y]);return function(a,e){return e?function(){return s(a)}:function(e){return p.domain(b(e)),q.domain(c(e)).range(d(e)),s(a)}}}l=d3.select(this);var v,w=a.utils.availableWidth(g,l,f),x=a.utils.availableHeight(h,l,f),y=Math.min(w,x)/2;a.utils.initSVG(l);var z=l.selectAll(".nv-wrap.nv-sunburst").data(b),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-sunburst nv-chart-"+k),B=A.selectAll("nv-sunburst");z.attr("transform","translate("+w/2+","+x/2+")"),l.on("click",function(a,b){o.chartClick({data:a,index:b,pos:d3.event,id:k})}),q.range([0,y]),c=c||b,e=b[0],r.value(j[i]||j.count),v=B.data(r.nodes).enter().append("path").attr("d",s).style("fill",function(a){return m((a.children?a:a.parent).name)}).style("stroke","#FFF").on("click",function(a){d!==c&&c!==a&&(d=c),c=a,v.transition().duration(n).attrTween("d",u(a))}).each(t).on("dblclick",function(a){d.parent==a&&v.transition().duration(n).attrTween("d",u(e))}).each(t).on("mouseover",function(a){d3.select(this).classed("hover",!0).style("opacity",.8),o.elementMouseover({data:a,color:d3.select(this).style("fill")})}).on("mouseout",function(a){d3.select(this).classed("hover",!1).style("opacity",1),o.elementMouseout({data:a})}).on("mousemove",function(a){o.elementMousemove({data:a})})}),t.renderEnd("sunburst immediate"),b}var c,d,e,f={top:0,right:0,bottom:0,left:0},g=null,h=null,i="count",j={count:function(){return 1},size:function(a){return a.size}},k=Math.floor(1e4*Math.random()),l=null,m=a.utils.defaultColor(),n=500,o=d3.dispatch("chartClick","elementClick","elementDblClick","elementMousemove","elementMouseover","elementMouseout","renderEnd"),p=d3.scale.linear().range([0,2*Math.PI]),q=d3.scale.sqrt(),r=d3.layout.partition().sort(null).value(function(){return 1}),s=d3.svg.arc().startAngle(function(a){return Math.max(0,Math.min(2*Math.PI,p(a.x)))}).endAngle(function(a){return Math.max(0,Math.min(2*Math.PI,p(a.x+a.dx)))}).innerRadius(function(a){return Math.max(0,q(a.y))}).outerRadius(function(a){return Math.max(0,q(a.y+a.dy))}),t=a.utils.renderWatch(o);return b.dispatch=o,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return g},set:function(a){g=a}},height:{get:function(){return h},set:function(a){h=a}},mode:{get:function(){return i},set:function(a){i=a}},id:{get:function(){return k},set:function(a){k=a}},duration:{get:function(){return n},set:function(a){n=a}},margin:{get:function(){return f},set:function(a){f.top=void 0!=a.top?a.top:f.top,f.right=void 0!=a.right?a.right:f.right,f.bottom=void 0!=a.bottom?a.bottom:f.bottom,f.left=void 0!=a.left?a.left:f.left}},color:{get:function(){return m},set:function(b){m=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.sunburstChart=function(){"use strict";function b(d){return m.reset(),m.models(c),d.each(function(d){var h=d3.select(this);a.utils.initSVG(h);var i=a.utils.availableWidth(f,h,e),j=a.utils.availableHeight(g,h,e);if(b.update=function(){0===k?h.call(b):h.transition().duration(k).call(b)},b.container=this,!d||!d.length)return a.utils.noData(b,h),b;h.selectAll(".nv-noData").remove();var l=h.selectAll("g.nv-wrap.nv-sunburstChart").data(d),m=l.enter().append("g").attr("class","nvd3 nv-wrap nv-sunburstChart").append("g"),n=l.select("g");m.append("g").attr("class","nv-sunburstWrap"),l.attr("transform","translate("+e.left+","+e.top+")"),c.width(i).height(j);var o=n.select(".nv-sunburstWrap").datum(d);d3.transition(o).call(c)}),m.renderEnd("sunburstChart immediate"),b}var c=a.models.sunburst(),d=a.models.tooltip(),e={top:30,right:20,bottom:20,left:20},f=null,g=null,h=a.utils.defaultColor(),i=(Math.round(1e5*Math.random()),null),j=null,k=250,l=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState","renderEnd"),m=a.utils.renderWatch(l);return d.headerEnabled(!1).duration(0).valueFormatter(function(a){return a}),c.dispatch.on("elementMouseover.tooltip",function(a){a.series={key:a.data.name,value:a.data.size,color:a.color},d.data(a).hidden(!1)}),c.dispatch.on("elementMouseout.tooltip",function(){d.hidden(!0)}),c.dispatch.on("elementMousemove.tooltip",function(){d.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=l,b.sunburst=c,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{noData:{get:function(){return j},set:function(a){j=a}},defaultState:{get:function(){return i},set:function(a){i=a}},color:{get:function(){return h},set:function(a){h=a,c.color(h)}},duration:{get:function(){return k},set:function(a){k=a,m.reset(k),c.duration(k)}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.version="1.8.1"}();PKs[QdRR.Report/Html/Renderer/Template/js/popper.min.jsnu[/* Copyright (C) Federico Zivolo 2020 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=e.ownerDocument.defaultView,n=o.getComputedStyle(e,null);return t?n[t]:n}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll|overlay)/.test(r+s+p)?e:n(o(e))}function i(e){return e&&e.referenceNode?e.referenceNode:e}function r(e){return 11===e?re:10===e?pe:re||pe}function p(e){if(!e)return document.documentElement;for(var o=r(10)?document.body:null,n=e.offsetParent||null;n===o&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TH','TD','TABLE'].indexOf(n.nodeName)&&'static'===t(n,'position')?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||p(e.firstElementChild)===e)}function d(e){return null===e.parentNode?e:d(e.parentNode)}function a(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);var l=r.commonAncestorContainer;if(e!==l&&t!==l||n.contains(i))return s(l)?l:p(l);var f=d(e);return f.host?a(f.host,t):a(e,d(t).host)}function l(e){var t=1=o.clientWidth&&n>=o.clientHeight}),l=0a[e]&&!t.escapeWithReference&&(n=Q(f[o],a[e]-('right'===e?f.width:f.height))),ae({},o,n)}};return l.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';f=le({},f,m[t](e))}),e.offsets.popper=f,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,n=t.reference,i=e.placement.split('-')[0],r=Z,p=-1!==['top','bottom'].indexOf(i),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]r(n[s])&&(e.offsets.popper[d]=r(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var n;if(!K(e.instance.modifiers,'arrow','keepTogether'))return e;var i=o.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!i)return e;}else if(!e.instance.popper.contains(i))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',c=a?'bottom':'right',u=S(i)[l];d[c]-us[c]&&(e.offsets.popper[m]+=d[m]+u-s[c]),e.offsets.popper=g(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f]),E=parseFloat(w['border'+f+'Width']),v=b-e.offsets.popper[m]-y-E;return v=ee(Q(s[l]-u,v),0),e.arrowElement=i,e.offsets.arrow=(n={},ae(n,m,$(v)),ae(n,h,''),n),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split('-')[0],i=T(n),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case ce.FLIP:p=[n,i];break;case ce.CLOCKWISE:p=G(n);break;case ce.COUNTERCLOCKWISE:p=G(n,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(n!==s||p.length===d+1)return e;n=e.placement.split('-')[0],i=T(n);var a=e.offsets.popper,l=e.offsets.reference,f=Z,m='left'===n&&f(a.right)>f(l.left)||'right'===n&&f(a.left)f(l.top)||'bottom'===n&&f(a.top)f(o.right),g=f(a.top)f(o.bottom),b='left'===n&&h||'right'===n&&c||'top'===n&&g||'bottom'===n&&u,w=-1!==['top','bottom'].indexOf(n),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u),E=!!t.flipVariationsByContent&&(w&&'start'===r&&c||w&&'end'===r&&h||!w&&'start'===r&&u||!w&&'end'===r&&g),v=y||E;(m||b||v)&&(e.flipped=!0,(m||b)&&(n=p[d+1]),v&&(r=z(r)),e.placement=n+(r?'-'+r:''),e.offsets.popper=le({},e.offsets.popper,C(e.instance.popper,e.offsets.reference,e.placement)),e=P(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport',flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],n=e.offsets,i=n.popper,r=n.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return i[p?'left':'top']=r[o]-(s?i[p?'width':'height']:0),e.placement=T(t),e.offsets.popper=g(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!K(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=D(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.rightwindow.devicePixelRatio||!fe),c='bottom'===o?'top':'bottom',g='right'===n?'left':'right',b=B('transform');if(d='bottom'==c?'HTML'===l.nodeName?-l.clientHeight+h.bottom:-f.height+h.bottom:h.top,s='right'==g?'HTML'===l.nodeName?-l.clientWidth+h.right:-f.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[g]=0,m.willChange='transform';else{var w='bottom'==c?-1:1,y='right'==g?-1:1;m[c]=d*w,m[g]=s*y,m.willChange=c+', '+g}var E={"x-placement":e.placement};return e.attributes=le({},E,e.attributes),e.styles=le({},m,e.styles),e.arrowStyles=le({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return V(e.instance.popper,e.styles),j(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&V(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,n,i){var r=L(i,t,e,o.positionFixed),p=O(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),V(t,{position:o.positionFixed?'fixed':'absolute'}),o},gpuAcceleration:void 0}}},ge}); //# sourceMappingURL=popper.min.js.map PKs[b(Report/Html/Renderer/Template/js/file.jsnu[ $(function() { var $window = $(window) , $top_link = $('#toplink') , $body = $('body, html') , offset = $('#code').offset().top , hidePopover = function ($target) { $target.data('popover-hover', false); setTimeout(function () { if (!$target.data('popover-hover')) { $target.popover('hide'); } }, 300); }; $top_link.hide().click(function(event) { event.preventDefault(); $body.animate({scrollTop:0}, 800); }); $window.scroll(function() { if($window.scrollTop() > offset) { $top_link.fadeIn(); } else { $top_link.fadeOut(); } }).scroll(); $('.popin') .popover({trigger: 'manual'}) .on({ 'mouseenter.popover': function () { var $target = $(this); var $container = $target.children().first(); $target.data('popover-hover', true); // popover already displayed if ($target.next('.popover').length) { return; } // show the popover $container.popover('show'); // register mouse events on the popover $target.next('.popover:not(.popover-initialized)') .on({ 'mouseenter': function () { $target.data('popover-hover', true); }, 'mouseleave': function () { hidePopover($container); } }) .addClass('popover-initialized'); }, 'mouseleave.popover': function () { hidePopover($(this).children().first()); } }); }); PKs[hbPP*Report/Html/Renderer/Template/js/d3.min.jsnu[!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function f(n){return(n+="")===bo||n[0]===_o?_o+n:n}function s(n){return(n+="")[0]===_o?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(s(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=wo.length;r>e;++e){var i=wo[e]+t;if(i in n)return i}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,i=-1,u=r.length;++ie;e++)for(var i,u=n[e],o=0,a=u.length;a>o;o++)(i=u[o])&&t(i,o,e);return n}function Z(n){return ko(n,qo),n}function V(n){var t,e;return function(r,i,u){var o,a=n[u].update,l=a.length;for(u!=e&&(e=u,t=0),i>=t&&(t=i+1);!(o=a[t])&&++t0&&(n=n.slice(0,a));var c=To.get(n);return c&&(n=c,l=B),a?t?i:r:t?b:u}function $(n,t){return function(e){var r=ao.event;ao.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ao.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Do,i="click"+r,u=ao.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ro&&(Ro="onselectstart"in e?!1:x(e.style,"userSelect")),Ro){var o=n(e).style,a=o[Ro];o[Ro]="none"}return function(n){if(u.on(r,null),Ro&&(o[Ro]=a),n){var t=function(){u.on(i,null)};u.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Po){var u=t(n);if(u.scrollX||u.scrollY){r=ao.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Po=!(o.f||o.e),r.remove()}}return Po?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return ao.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?Fo:Math.acos(n)}function tn(n){return n>1?Io:-1>n?-Io:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function on(n){return(n=Math.sin(n/2))*n}function an(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?u+(o-u)*n/60:180>n?o:240>n?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,u=2*e-o,new mn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=Sn((n=ao.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function sn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Yo)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof fn?sn(n.h,n.c,n.l):Sn((n=mn(n)).r,n.g,n.b):new hn(n,t,e)}function pn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=vn(i)*na,r=vn(r)*ta,u=vn(u)*ea,new mn(yn(3.2404542*i-1.5371385*r-.4985314*u),yn(-.969266*i+1.8760108*r+.041556*u),yn(.0556434*i-.2040259*r+1.0572252*u))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Zo,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function yn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mn(n,t,e){return this instanceof mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mn?new mn(n.r,n.g,n.b):_n(""+n,mn,cn):new mn(n,t,e)}function Mn(n){return new mn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Nn(i[0]),Nn(i[1]),Nn(i[2]))}return(u=ua.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o=o>>4|o,a=240&u,a=a>>4|a,l=15&u,l=l<<4|l):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function wn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=.5>l?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=l>0&&1>l?0:r),new ln(r,i,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/na),i=dn((.2126729*n+.7151522*t+.072175*e)/ta),u=dn((.0193339*n+.119192*t+.9503041*e)/ea);return hn(116*i-16,500*(r-i),200*(i-u))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function i(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(u,l)}catch(r){return void o.error.call(u,r)}o.load.call(u,n)}else o.error.call(u,l)}var u={},o=ao.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(n){var t=ao.event;ao.event=n;try{o.progress.call(u,l)}finally{ao.event=t}},u.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",u):t},u.responseType=function(n){return arguments.length?(c=n,u):c},u.response=function(n){return e=n,u},["get","post"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(co(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),l.setRequestHeader)for(var f in a)l.setRequestHeader(f,a[f]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&u.on("error",i).on("load",function(n){i(null,n)}),o.beforesend.call(u,l),l.send(null==r?null:r),u},u.abort=function(){return l.abort(),u},ao.rebind(u,o,"on"),null==r?u:u.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var i=e+t,u={c:n,t:i,n:null};return aa?aa.n=u:oa=u,aa=u,la||(ca=clearTimeout(ca),la=1,fa(Tn)),u}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(ca),ca=setTimeout(Tn,t)),la=0):(la=1,fa(Tn))}function Rn(){for(var n=Date.now(),t=oa;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=oa,e=1/0;t;)t.c?(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r&&e?function(n,t){for(var i=n.length,u=[],o=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),u.push(n.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:m;return function(n){var e=ha.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,v="",d="",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),p){case"n":s=!0,p="g";break;case"%":g=100,d="%",p="f";break;case"p":g=100,d="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+p.toLowerCase());case"c":m=!1;case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===l&&(v=i[0],d=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=pa.get(p)||Fn;var M=c&&s;return function(n){var e=d;if(y&&n%1)return"";var i=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>g){var l=ao.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=g;n=p(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=m?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&s&&(x=u(x,1/0));var S=v.length+x.length+b.length+(M?0:i.length),k=f>S?new Array(S=f-S+1).join(r):"";return M&&(x=u(k+x,k.length?f-b.length:1/0)),i+=v,n=x+b,("<"===o?i+n+k:">"===o?k+i+n:"^"===o?k.substring(0,S>>=1)+i+n+k.substring(S):i+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=u(e,1);return r-t>t-e?e:r}function i(e){return t(e=n(new va(e-1)),1),e}function u(n,e){return t(n=new va(+n),e),n}function o(n,r,u){var o=i(n),a=[];if(u>1)for(;r>o;)e(o)%u||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{va=Hn;var r=new Hn;return r._=n,o(r,t,e)}finally{va=Date}}n.floor=n,n.round=r,n.ceil=i,n.offset=u,n.range=o;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(i),l.offset=In(u),l.range=a,n}function In(n){return function(t,e){try{va=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{va=Date}}}function Yn(n){function t(n){function t(t){for(var e,i,u,o=[],a=-1,l=0;++aa;){if(r>=c)return-1;if(i=t.charCodeAt(a++),37===i){if(o=t.charAt(a++),u=C[o in ya?t.charAt(a++):o],!u||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function f(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var s=n.dateTime,h=n.date,p=n.time,g=n.periods,v=n.days,d=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{va=Hn;var t=new va;return t._=n,r(t)}finally{va=Date}}var r=t(n);return e.parse=function(n){try{va=Hn;var t=r.parse(n);return t&&t._}finally{va=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=ao.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(y),k=Xn(y),N=Vn(m),E=Xn(m);g.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(s),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+ga.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(ga.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(ga.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:at,"%":function(){return"%"}},C={a:r,A:i,b:u,B:o,c:a,d:tt,e:tt,H:rt,I:rt,j:et,L:ot,m:nt,M:it,p:f,S:ut,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",i=(r?-n:n)+"",u=i.length;return r+(e>u?new Array(e-u+1).join(t)+i:i)}function Vn(n){return new RegExp("^(?:"+n.map(ao.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e68?1900:2e3)}function nt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function it(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ot(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function at(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=xo(t)/60|0,i=xo(t)%60;return e+Zn(r,"0",2)+Zn(i,"0",2)}function lt(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,l=Math.cos(t),c=Math.sin(t),f=u*c,s=i*l+f*Math.cos(a),h=f*o*Math.sin(a);ka.add(Math.atan2(h,s)),r=n,i=l,u=c}var t,e,r,i,u;Na.point=function(o,a){Na.point=n,r=(t=o)*Yo,i=Math.cos(a=(e=a)*Yo/2+Fo/4),u=Math.sin(a)},Na.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function yt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function mt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return xo(n[0]-t[0])a;++a)i.point((e=n[a])[0],e[1]);return void i.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,u.push(l),o.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,u.push(l),o.push(c)}}),o.sort(t),qt(u),qt(o),u.length){for(var a=0,l=e,c=o.length;c>a;++a)o[a].e=l=!l;for(var f,s,h=u[0];;){for(var p=h,g=!0;p.v;)if((p=p.n)===h)return;f=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(g)for(var a=0,c=f.length;c>a;++a)i.point((s=f[a])[0],s[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(g){f=p.p.z;for(var a=f.length-1;a>=0;--a)i.point((s=f[a])[0],s[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,f=p.z,g=!g}while(!p.v);i.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r0){for(b||(u.polygonStart(),b=!0),u.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Dt))}var p,g,v,d=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:l,lineEnd:c,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=l,m.lineEnd=c,p=ao.merge(p);var n=Ot(y,g);p.length?(b||(u.polygonStart(),b=!0),Lt(p,Ut,n,e,u)):n&&(b||(u.polygonStart(),b=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),b&&(u.polygonEnd(),b=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},M=Pt(),x=t(M),b=!1;return m}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Io-Uo:Io-n[1])-((t=t.x)[0]<0?t[1]-Io-Uo:Io-t[1])}function jt(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?Fo:-Fo,l=xo(u-e);xo(l-Fo)0?Io:-Io),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&l>=Fo&&(xo(e-i)Uo?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function Ht(n,t,e,r){var i;if(null==n)i=e*Io,r.point(-Fo,i),r.point(0,i),r.point(Fo,i),r.point(Fo,0),r.point(Fo,-i),r.point(0,-i),r.point(-Fo,-i),r.point(-Fo,0),r.point(-Fo,i);else if(xo(n[0]-t[0])>Uo){var u=n[0]a;++a){var c=t[a],f=c.length;if(f)for(var s=c[0],h=s[0],p=s[1]/2+Fo/4,g=Math.sin(p),v=Math.cos(p),d=1;;){d===f&&(d=0),n=c[d];var y=n[0],m=n[1]/2+Fo/4,M=Math.sin(m),x=Math.cos(m),b=y-h,_=b>=0?1:-1,w=_*b,S=w>Fo,k=g*M;if(ka.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),u+=S?b+_*Ho:b,S^h>=e^y>=e){var N=mt(dt(s),dt(n));bt(N);var E=mt(i,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=y,g=M,v=x,s=n}}return(-Uo>u||Uo>u&&-Uo>ka)^1&o}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>u}function e(n){var e,u,l,c,f;return{lineStart:function(){c=l=!1,f=1},point:function(s,h){var p,g=[s,h],v=t(s,h),d=o?v?0:i(s,h):v?i(s+(0>s?Fo:-Fo),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(p=r(e,g),(wt(e,p)||wt(g,p))&&(g[0]+=Uo,g[1]+=Uo,v=t(g[0],g[1]))),v!==l)f=0,v?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&o^v){var y;d&u||!(y=r(g,e,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!v||e&&wt(e,g)||n.point(g[0],g[1]),e=g,l=v,u=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return f|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),i=dt(t),o=[1,0,0],a=mt(r,i),l=yt(a,a),c=a[0],f=l-c*c;if(!f)return!e&&n;var s=u*l/f,h=-u*c/f,p=mt(o,a),g=xt(o,s),v=xt(a,h);Mt(g,v);var d=p,y=yt(g,d),m=yt(d,d),M=y*y-m*(yt(g,g)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-y-x)/m);if(Mt(b,g),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=xo(E-Fo)E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(xo(b[0]-w)Fo^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-y+x)/m);return Mt(z,g),[b,_t(z)]}}}function i(t,e){var r=o?n:Fo-n,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),o=u>0,a=xo(u)>Uo,l=ve(n,6*Yo);return Rt(t,e,l,o?[0,-n]:[-Fo,n-Fo])}function Yt(n,t,e,r){return function(i){var u,o=i.a,a=i.b,l=o.x,c=o.y,f=a.x,s=a.y,h=0,p=1,g=f-l,v=s-c;if(u=n-l,g||!(u>0)){if(u/=g,0>g){if(h>u)return;p>u&&(p=u)}else if(g>0){if(u>p)return;u>h&&(h=u)}if(u=e-l,g||!(0>u)){if(u/=g,0>g){if(u>p)return;u>h&&(h=u)}else if(g>0){if(h>u)return;p>u&&(p=u)}if(u=t-c,v||!(u>0)){if(u/=v,0>v){if(h>u)return;p>u&&(p=u)}else if(v>0){if(u>p)return;u>h&&(h=u)}if(u=r-c,v||!(0>u)){if(u/=v,0>v){if(u>p)return;u>h&&(h=u)}else if(v>0){if(h>u)return;p>u&&(p=u)}return h>0&&(i.a={x:l+h*g,y:c+h*v}),1>p&&(i.b={x:l+p*g,y:c+p*v}),i}}}}}}function Zt(n,t,e,r){function i(r,i){return xo(r[0]-n)0?0:3:xo(r[0]-e)0?2:1:xo(r[1]-t)0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function l(n){for(var t=0,e=d.length,r=n[1],i=0;e>i;++i)for(var u,o=1,a=d[i],l=a.length,c=a[0];l>o;++o)u=a[o],c[1]<=r?u[1]>r&&Q(c,u,n)>0&&++t:u[1]<=r&&Q(c,u,n)<0&&--t,c=u;return 0!==t}function c(u,a,l,c){var f=0,s=0;if(null==u||(f=i(u,l))!==(s=i(a,l))||o(u,a)<0^l>0){do c.point(0===f||3===f?n:e,f>1?r:t);while((f=(f+l+4)%4)!==s)}else c.point(a[0],a[1])}function f(i,u){return i>=n&&e>=i&&u>=t&&r>=u}function s(n,t){f(n,t)&&a.point(n,t)}function h(){C.point=g,d&&d.push(y=[]),S=!0,w=!1,b=_=NaN}function p(){v&&(g(m,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=s,w&&a.lineEnd()}function g(n,t){n=Math.max(-Ha,Math.min(Ha,n)),t=Math.max(-Ha,Math.min(Ha,t));var e=f(n,t);if(d&&y.push([n,t]),S)m=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,y,m,M,x,b,_,w,S,k,N=a,E=Pt(),A=Yt(n,t,e,r),C={point:s,lineStart:h,lineEnd:p,polygonStart:function(){a=E,v=[],d=[],k=!0},polygonEnd:function(){a=N,v=ao.merge(v);var t=l([n,r]),e=k&&t,i=v.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&Lt(v,u,t,c,a),a.polygonEnd()),v=d=y=null}};return C}}function Vt(n){var t=0,e=Fo/3,r=ae(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Fo/180,e=n[1]*Fo/180):[t/Fo*180,e/Fo*180]},i}function Xt(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function $t(){function n(n,t){Ia+=i*n-r*t,r=n,i=t}var t,e,r,i;$a.point=function(u,o){$a.point=n,t=r=u,e=i=o},$a.lineEnd=function(){n(t,e)}}function Bt(n,t){Ya>n&&(Ya=n),n>Va&&(Va=n),Za>t&&(Za=t),t>Xa&&(Xa=t)}function Wt(){function n(n,t){o.push("M",n,",",t,u)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function i(){o.push("Z")}var u=Jt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Jt(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Ca+=n,za+=t,++La}function Kt(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);qa+=o*(t+n)/2,Ta+=o*(e+r)/2,Ra+=o,Gt(t=n,e=r)}var t,e;Wa.point=function(r,i){Wa.point=n,Gt(t=r,e=i)}}function Qt(){Wa.point=Gt}function ne(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);qa+=o*(r+n)/2,Ta+=o*(i+t)/2,Ra+=o,o=i*n-r*t,Da+=o*(r+n),Pa+=o*(i+t),Ua+=3*o,Gt(r=n,i=t)}var t,e,r,i;Wa.point=function(u,o){Wa.point=n,Gt(t=r=u,e=i=o)},Wa.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Ho)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function ee(n){function t(n){return(a?r:e)(n)}function e(t){return ue(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=u,t.lineStart()}function u(e,r){var u=dt([e,r]),o=n(e,r);i(M,x,m,b,_,w,M=o[0],x=o[1],m=e,b=u[0],_=u[1],w=u[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function l(){ r(),S.point=c,S.lineEnd=f}function c(n,t){u(s=n,h=t),p=M,g=x,v=b,d=_,y=w,S.point=u}function f(){i(M,x,m,b,_,w,p,g,s,v,d,y,a,t),S.lineEnd=o,o()}var s,h,p,g,v,d,y,m,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,l,c,f,s,h,p,g,v,d,y){var m=f-t,M=s-e,x=m*m+M*M;if(x>4*u&&d--){var b=a+p,_=l+g,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=xo(xo(w)-1)u||xo((m*z+M*L)/x-.5)>.3||o>a*p+l*g+c*v)&&(i(t,e,r,a,l,c,A,C,N,b/=S,_/=S,w,d,y),y.point(A,C),i(A,C,N,b,_,w,f,s,h,p,g,v,d,y))}}var u=.5,o=Math.cos(30*Yo),a=16;return t.precision=function(n){return arguments.length?(a=(u=n*n)>0&&16,t):Math.sqrt(u)},t}function re(n){var t=ee(function(t,e){return n([t*Zo,e*Zo])});return function(n){return le(t(n))}}function ie(n){this.stream=n}function ue(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function oe(n){return ae(function(){return n})()}function ae(n){function t(n){return n=a(n[0]*Yo,n[1]*Yo),[n[0]*h+l,c-n[1]*h]}function e(n){return n=a.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Zo,n[1]*Zo]}function r(){a=Ct(o=se(y,M,x),u);var n=u(v,d);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,l,c,f,s=ee(function(n,t){return n=u(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,y=0,M=0,x=0,b=Fa,_=m,w=null,S=null;return t.stream=function(n){return f&&(f.valid=!1),f=le(b(o,s(_(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fa):It((w=+n)*Yo),i()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):m,i()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*Yo,d=n[1]%360*Yo,r()):[v*Zo,d*Zo]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Yo,M=n[1]%360*Yo,x=n.length>2?n[2]%360*Yo:0,r()):[y*Zo,M*Zo,x*Zo]},ao.rebind(t,s,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function le(n){return ue(n,function(t,e){n.point(t*Yo,e*Yo)})}function ce(n,t){return[n,t]}function fe(n,t){return[n>Fo?n-Ho:-Fo>n?n+Ho:n,t]}function se(n,t,e){return n?t||e?Ct(pe(n),ge(t,e)):pe(n):t||e?ge(t,e):fe}function he(n){return function(t,e){return t+=n,[t>Fo?t-Ho:-Fo>t?t+Ho:t,e]}}function pe(n){var t=he(n);return t.invert=he(-n),t}function ge(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*r+a*i;return[Math.atan2(l*u-f*o,a*r-c*i),tn(f*u+l*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*u-l*o;return[Math.atan2(l*u+c*o,a*r+f*i),tn(f*r-a*i)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var l=o*t;null!=i?(i=de(e,i),u=de(e,u),(o>0?u>i:i>u)&&(i+=o*Ho)):(i=n+o*Ho,u=n-.5*l);for(var c,f=i;o>0?f>u:u>f;f-=l)a.point((c=_t([e,-r*Math.cos(f),-r*Math.sin(f)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Uo)%(2*Math.PI)}function ye(n,t,e){var r=ao.range(n,t-Uo,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function me(n,t,e){var r=ao.range(n,t-Uo,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var i=Math.cos(t),u=Math.sin(t),o=Math.cos(r),a=Math.sin(r),l=i*Math.cos(n),c=i*Math.sin(n),f=o*Math.cos(e),s=o*Math.sin(e),h=2*Math.asin(Math.sqrt(on(r-t)+i*o*on(e-n))),p=1/Math.sin(h),g=h?function(n){var t=Math.sin(n*=h)*p,e=Math.sin(h-n)*p,r=e*l+t*f,i=e*c+t*s,o=e*u+t*a;return[Math.atan2(i,r)*Zo,Math.atan2(o,Math.sqrt(r*r+i*i))*Zo]}:function(){return[n*Zo,t*Zo]};return g.distance=h,g}function _e(){function n(n,i){var u=Math.sin(i*=Yo),o=Math.cos(i),a=xo((n*=Yo)-t),l=Math.cos(a);Ja+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*u-e*o*l)*a),e*u+r*o*l),t=n,e=u,r=o}var t,e,r;Ga.point=function(i,u){t=i*Yo,e=Math.sin(u*=Yo),r=Math.cos(u),Ga.point=n},Ga.lineEnd=function(){Ga.point=Ga.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),i=Math.cos(e),u=n(r*i);return[u*i*Math.sin(t),u*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),i=t(r),u=Math.sin(i),o=Math.cos(i);return[Math.atan2(n*u,r*o),Math.asin(r&&e*u/r)]},e}function Se(n,t){function e(n,t){o>0?-Io+Uo>t&&(t=-Io+Uo):t>Io-Uo&&(t=Io-Uo);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Fo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=K(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-Io]},e):Ne}function ke(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return xo(i)i;i++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,l=n[1],c=e[1],f=t[1]-l,s=r[1]-c,h=(a*(l-c)-s*(i-u))/(s*o-a*f);return[i+h*o,l+h*f]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),ol.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];je(n);for(var l=u;l.circle&&xo(e-l.circle.x)f;++f)c=a[f],l=a[f-1],nr(c.edge,l.site,c.site,i);l=a[0],c=a[s-1],c.edge=Ke(l.site,c.site,null,i),$e(l),$e(c)}function He(n){for(var t,e,r,i,u=n.x,o=n.y,a=ol._;a;)if(r=Oe(a,o)-u,r>Uo)a=a.L;else{if(i=u-Ie(a,o),!(i>Uo)){r>-Uo?(t=a.P,e=a):i>-Uo?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=Ue(n);if(ol.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),ol.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,f=c.x,s=c.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,M=v*v+d*d,x={x:(d*m-p*M)/y+f,y:(h*M-v*m)/y+s};nr(e.edge,c,g,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,g,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-(1/0);e=o.site;var a=e.x,l=e.y,c=l-t;if(!c)return a;var f=a-r,s=1/u-1/c,h=f/c;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*c)-l+c/2+i-u/2)))/s+r:(r+a)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,i,u,o,a,l,c,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=ul,d=v.length;d--;)if(u=v[d],u&&u.prepare())for(a=u.edges,l=a.length,o=0;l>o;)f=a[o].end(),r=f.x,i=f.y,c=a[++o%l].start(),t=c.x,e=c.y,(xo(r-t)>Uo||xo(i-e)>Uo)&&(a.splice(o,0,new tr(Qe(u.site,f,xo(r-s)Uo?{x:s,y:xo(t-s)Uo?{x:xo(e-g)Uo?{x:h,y:xo(t-h)Uo?{x:xo(e-p)=-jo)){var p=l*l+c*c,g=f*f+s*s,v=(s*p-c*g)/h,d=(l*g-f*p)/h,s=d+a,y=fl.pop()||new Xe;y.arc=n,y.site=i,y.x=v+o,y.y=s+Math.sqrt(v*v+d*d),y.cy=s,n.circle=y;for(var m=null,M=ll._;M;)if(y.yd||d>=a)return;if(h>g){if(u){if(u.y>=c)return}else u={x:d,y:l};e={x:d,y:c}}else{if(u){if(u.yr||r>1)if(h>g){if(u){if(u.y>=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.yp){if(u){if(u.x>=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.xu||s>o||r>h||i>p)){if(g=n.point){var g,v=t-n.x,d=e-n.y,y=v*v+d*d;if(l>y){var m=Math.sqrt(l=y);r=t-m,i=e-m,u=t+m,o=e+m,a=g}}for(var M=n.nodes,x=.5*(f+h),b=.5*(s+p),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,f,s,x,b);break;case 1:c(n,x,s,h,b);break;case 2:c(n,f,b,x,p);break;case 3:c(n,x,b,h,p)}}}(n,r,i,u,o),a}function vr(n,t){n=ao.rgb(n),t=ao.rgb(t);var e=n.r,r=n.g,i=n.b,u=t.r-e,o=t.g-r,a=t.b-i;return function(n){return"#"+bn(Math.round(e+u*n))+bn(Math.round(r+o*n))+bn(Math.round(i+a*n))}}function dr(n,t){var e,r={},i={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function yr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mr(n,t){var e,r,i,u=hl.lastIndex=pl.lastIndex=0,o=-1,a=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=pl.exec(t));)(i=r.index)>u&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:yr(e,r)})),u=pl.lastIndex;return ur;++r)a[(e=l[r]).i]=e.x(n);return a.join("")})}function Mr(n,t){for(var e,r=ao.interpolators.length;--r>=0&&!(e=ao.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(Mr(n[e],t[e]));for(;u>e;++e)i[e]=n[e];for(;o>e;++e)i[e]=t[e];return function(n){for(e=0;a>e;++e)i[e]=r[e](n);return i}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Io)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Ho*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Ho/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=ao.hcl(n),t=ao.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return sn(e+u*n,r+o*n,i+a*n)+""}}function Dr(n,t){n=ao.hsl(n),t=ao.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return cn(e+u*n,r+o*n,i+a*n)+""}}function Pr(n,t){n=ao.lab(n),t=ao.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return pn(e+u*n,r+o*n,i+a*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),i=Fr(t,e),u=Hr(Or(e,t,-i))||0;t[0]*e[1]180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:yr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:yr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:i-4,x:yr(n[0],t[0])},{i:i-2,x:yr(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=ao.transform(n),t=ao.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i=0;)e.push(i[r])}function oi(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++oe;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function yi(n){return n.reduce(mi,0)}function mi(n,t){return n+t[1]}function Mi(n,t){return xi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function bi(n){return[ao.min(n),ao.max(n)]}function _i(n,t){return n.value-t.value}function wi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Si(n,t){n._pack_next=t,t._pack_prev=n}function ki(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function Ni(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,u,o,a,l,c,f=1/0,s=-(1/0),h=1/0,p=-(1/0);if(e.forEach(Ei),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(u=e[2],zi(r,i,u),t(u),wi(r,u),r._pack_prev=u,wi(u,i),i=r._pack_next,o=3;c>o;o++){zi(r,i,u=e[o]);var g=0,v=1,d=1;for(a=i._pack_next;a!==i;a=a._pack_next,v++)if(ki(a,u)){g=1;break}if(1==g)for(l=r._pack_prev;l!==a._pack_prev&&!ki(l,u);l=l._pack_prev,d++);g?(d>v||v==d&&i.ro;o++)u=e[o],u.x-=y,u.y-=m,M=Math.max(M,u.r+Math.sqrt(u.x*u.x+u.y*u.y));n.r=M,e.forEach(Ai)}}function Ei(n){n._pack_next=n._pack_prev=n}function Ai(n){delete n._pack_next,delete n._pack_prev}function Ci(n,t,e,r){var i=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,i)for(var u=-1,o=i.length;++u=0;)t=i[u],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pi(n,t,e){return n.a.parent===t.parent?n.a:e}function Ui(n){return 1+ao.max(n,function(n){return n.y})}function ji(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fi(n){var t=n.children;return t&&t.length?Fi(t[0]):n}function Hi(n){var t,e=n.children;return e&&(t=e.length)?Hi(e[t-1]):n}function Oi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Ii(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return 0>i&&(e+=i/2,i=0),0>u&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Yi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zi(n){return n.rangeExtent?n.rangeExtent():Yi(n.range())}function Vi(n,t,e,r){var i=e(n[0],n[1]),u=r(t[0],t[1]);return function(n){return u(i(n))}}function Xi(n,t){var e,r=0,i=n.length-1,u=n[r],o=n[i];return u>o&&(e=r,r=i,i=e,e=u,u=o,o=e),n[r]=t.floor(u),n[i]=t.ceil(o),n}function $i(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bi(n,t,e,r){var i=[],u=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]2?Bi:Vi,l=r?Wr:Br;return o=i(n,t,l,e),a=i(t,n,l,Mr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Ur)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return Qi(n,t)},u.tickFormat=function(t,e){return nu(n,t,e)},u.nice=function(t){return Gi(n,t),i()},u.copy=function(){return Wi(n,t,e,r)},i()}function Ji(n,t){return ao.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gi(n,t){return Xi(n,$i(Ki(n,t)[2])),Xi(n,$i(Ki(n,t)[2])),n}function Ki(n,t){null==t&&(t=10);var e=Yi(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return.15>=u?i*=10:.35>=u?i*=5:.75>=u&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Qi(n,t){return ao.range.apply(ao,Ki(n,t))}function nu(n,t,e){var r=Ki(n,t);if(e){var i=ha.exec(e);if(i.shift(),"s"===i[8]){var u=ao.formatPrefix(Math.max(xo(r[0]),xo(r[1])));return i[7]||(i[7]="."+tu(u.scale(r[2]))),i[8]="f",e=ao.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+eu(i[8],r)),e=i.join("")}else e=",."+tu(r[2])+"f";return ao.format(e)}function tu(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function eu(n,t){var e=tu(t[2]);return n in kl?Math.abs(e-tu(Math.max(xo(t[0]),xo(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ru(n,t,e,r){function i(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Xi(r.map(i),e?Math:El);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=Yi(r),o=[],a=n[0],l=n[1],c=Math.floor(i(a)),f=Math.ceil(i(l)),s=t%1?2:t;if(isFinite(f-c)){if(e){for(;f>c;c++)for(var h=1;s>h;h++)o.push(u(c)*h);o.push(u(c))}else for(o.push(u(c));c++0;h--)o.push(u(c)*h);for(c=0;o[c]l;f--);o=o.slice(c,f)}return o},o.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=ao.format(e));var r=Math.max(1,t*n/o.ticks().length);return function(n){var o=n/u(Math.round(i(n)));return t-.5>o*t&&(o*=t),r>=o?e(n):""}},o.copy=function(){return ru(n.copy(),t,e,r)},Ji(o,n)}function iu(n,t,e){function r(t){return n(i(t))}var i=uu(t),u=uu(1/t);return r.invert=function(t){return u(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(i)),r):e},r.ticks=function(n){return Qi(e,n)},r.tickFormat=function(n,t){return nu(e,n,t)},r.nice=function(n){return r.domain(Gi(e,n))},r.exponent=function(o){return arguments.length?(i=uu(t=o),u=uu(1/t),n.domain(e.map(i)),r):t},r.copy=function(){return iu(n.copy(),t,e)},Ji(r,n)}function uu(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ou(n,t){function e(e){return u[((i.get(e)||("range"===t.t?i.set(e,n.push(e)):NaN))-1)%u.length]}function r(t,e){return ao.range(n.length).map(function(n){return t+e*n})}var i,u,o;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new c;for(var u,o=-1,a=r.length;++oe?[NaN,NaN]:[e>0?a[e-1]:n[0],et?NaN:t/u+n,[t,t+1/u]},r.copy=function(){return lu(n,t,e)},i()}function cu(n,t){function e(e){return e>=e?t[ao.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return cu(n,t)},e}function fu(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qi(n,t)},t.tickFormat=function(t,e){return nu(n,t,e)},t.copy=function(){return fu(n)},t}function su(){return 0}function hu(n){return n.innerRadius}function pu(n){return n.outerRadius}function gu(n){return n.startAngle}function vu(n){return n.endAngle}function du(n){return n&&n.padAngle}function yu(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function mu(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),l=a*o,c=-a*u,f=n[0]+l,s=n[1]+c,h=t[0]+l,p=t[1]+c,g=(f+h)/2,v=(s+p)/2,d=h-f,y=p-s,m=d*d+y*y,M=e-r,x=f*p-h*s,b=(0>y?-1:1)*Math.sqrt(Math.max(0,M*M*m-x*x)),_=(x*y-d*b)/m,w=(-x*d-y*b)/m,S=(x*y+d*b)/m,k=(-x*d+y*b)/m,N=_-g,E=w-v,A=S-g,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mu(n){function t(t){function o(){c.push("M",u(n(f),a))}for(var l,c=[],f=[],s=-1,h=t.length,p=En(e),g=En(r);++s1?n.join("L"):n+"Z"}function bu(n){return n.join("L")+"Z"}function _u(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1&&i.push("H",r[0]),i.join("")}function wu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1){a=t[1],u=n[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var c=2;c9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r));for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function Fu(n){return n.length<3?xu(n):n[0]+Au(n,ju(n))}function Hu(n){for(var t,e,r,i=-1,u=n.length;++i=t?o(n-t):void(f.c=o)}function o(e){var i=g.active,u=g[i];u&&(u.timer.c=null,u.timer.t=NaN,--g.count,delete g[i],u.event&&u.event.interrupt.call(n,n.__data__,u.index));for(var o in g)if(r>+o){var c=g[o];c.timer.c=null,c.timer.t=NaN,--g.count,delete g[o]}f.c=a,qn(function(){return f.c&&a(e||1)&&(f.c=null,f.t=NaN),1},0,l),g.active=r,v.event&&v.event.start.call(n,n.__data__,t),p=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&p.push(r)}),h=v.ease,s=v.duration}function a(i){for(var u=i/s,o=h(u),a=p.length;a>0;)p[--a].call(n,o);return u>=1?(v.event&&v.event.end.call(n,n.__data__,t),--g.count?delete g[r]:delete n[e],1):void 0}var l,f,s,h,p,g=n[e]||(n[e]={active:0,count:0}),v=g[r];v||(l=i.time,f=qn(u,0,l),v=g[r]={tween:new c,time:l,timer:f,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++g.count)}function no(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function to(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function eo(n){return n.toISOString()}function ro(n,t,e){function r(t){return n(t)}function i(n,e){var r=n[1]-n[0],i=r/e,u=ao.bisect(Kl,i);return u==Kl.length?[t.year,Ki(n.map(function(n){return n/31536e6}),e)[2]]:u?t[i/Kl[u-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=io(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=io(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yi(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],io(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ro(n.copy(),t,e)},Ji(r,n)}function io(n){return new Date(n)}function uo(n){return JSON.parse(n.responseText)}function oo(n){var t=fo.createRange();return t.selectNode(fo.body),t.createContextualFragment(n.responseText)}var ao={version:"3.5.17"},lo=[].slice,co=function(n){return lo.call(n)},fo=this.document;if(fo)try{co(fo.documentElement.childNodes)[0].nodeType}catch(so){co=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(ho){var po=this.Element.prototype,go=po.setAttribute,vo=po.setAttributeNS,yo=this.CSSStyleDeclaration.prototype,mo=yo.setProperty;po.setAttribute=function(n,t){go.call(this,n,t+"")},po.setAttributeNS=function(n,t,e){vo.call(this,n,t,e+"")},yo.setProperty=function(n,t,e){mo.call(this,n,t+"",e)}}ao.ascending=e,ao.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},ao.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e},ao.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e},ao.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u=r){e=i=r;break}for(;++ur&&(e=r),r>i&&(i=r))}else{for(;++u=r){e=i=r;break}for(;++ur&&(e=r),r>i&&(i=r))}return[e,i]},ao.sum=function(n,t){var e,r=0,u=n.length,o=-1;if(1===arguments.length)for(;++o1?l/(f-1):void 0},ao.deviation=function(){var n=ao.variance.apply(this,arguments);return n?Math.sqrt(n):n};var Mo=u(e);ao.bisectLeft=Mo.left,ao.bisect=ao.bisectRight=Mo.right,ao.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},ao.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,2>u&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},ao.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ao.pairs=function(n){for(var t,e=0,r=n.length-1,i=n[0],u=new Array(0>r?0:r);r>e;)u[e]=[t=i,i=n[++e]];return u},ao.transpose=function(n){if(!(i=n.length))return[];for(var t=-1,e=ao.min(n,o),r=new Array(e);++t=0;)for(r=n[i],t=r.length;--t>=0;)e[--o]=r[t];return e};var xo=Math.abs;ao.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,i=[],u=a(xo(e)),o=-1;if(n*=u,t*=u,e*=u,0>e)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)=u.length)return r?r.call(i,o):e?o.sort(e):o;for(var l,f,s,h,p=-1,g=o.length,v=u[a++],d=new c;++p=u.length)return n;var r=[],i=o[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],o=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(ao.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return o[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},ao.set=function(n){var t=new y;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(y,{has:h,add:function(n){return this._[f(n+="")]=!0,n},remove:p,values:g,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,s(t))}}),ao.behavior={},ao.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ao.event=null,ao.requote=function(n){return n.replace(So,"\\$&")};var So=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ko={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},No=function(n,t){return t.querySelector(n)},Eo=function(n,t){return t.querySelectorAll(n)},Ao=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ao=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(No=function(n,t){return Sizzle(n,t)[0]||null},Eo=Sizzle,Ao=Sizzle.matchesSelector),ao.selection=function(){return ao.select(fo.documentElement)};var Co=ao.selection.prototype=[];Co.select=function(n){var t,e,r,i,u=[];n=A(n);for(var o=-1,a=this.length;++o=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),Lo.hasOwnProperty(e)?{space:Lo[e],local:n}:n}},Co.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ao.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Co.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,i=-1;if(t=e.classList){for(;++ii){if("string"!=typeof n){2>i&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>i){var u=this.node();return t(u).getComputedStyle(u,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Co.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Co.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Co.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Co.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Co.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Co.remove=function(){return this.each(F)},Co.data=function(n,t){function e(n,e){var r,i,u,o=n.length,s=e.length,h=Math.min(o,s),p=new Array(s),g=new Array(s),v=new Array(o);if(t){var d,y=new c,m=new Array(o);for(r=-1;++rr;++r)g[r]=H(e[r]);for(;o>r;++r)v[r]=n[r]}g.update=p,g.parentNode=p.parentNode=v.parentNode=n.parentNode,a.push(g),l.push(p),f.push(v)}var r,i,u=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++uu;u++){i.push(t=[]),t.parentNode=(e=this[u]).parentNode;for(var a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return E(i)},Co.order=function(){for(var n=-1,t=this.length;++n=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},Co.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++tn;n++)for(var e=this[n],r=0,i=e.length;i>r;r++){var u=e[r];if(u)return u}return null},Co.size=function(){var n=0;return Y(this,function(){++n}),n};var qo=[];ao.selection.enter=Z,ao.selection.enter.prototype=qo,qo.append=Co.append,qo.empty=Co.empty,qo.node=Co.node,qo.call=Co.call,qo.size=Co.size,qo.select=function(n){for(var t,e,r,i,u,o=[],a=-1,l=this.length;++ar){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var To=ao.map({mouseenter:"mouseover",mouseleave:"mouseout"});fo&&To.forEach(function(n){"on"+n in fo&&To.remove(n)});var Ro,Do=0;ao.mouse=function(n){return J(n,k())};var Po=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ao.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,i=0,u=t.length;u>i;++i)if((r=t[i]).identifier===e)return J(n,r)},ao.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",o)}function e(n,t,e,u,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],g|=n|e,M=r,p({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(y.on(u+d,null).on(o+d,null),m(g),p({type:"dragend"}))}var c,f=this,s=ao.event.target.correspondingElement||ao.event.target,h=f.parentNode,p=r.of(f,arguments),g=0,v=n(),d=".drag"+(null==v?"":"-"+v),y=ao.select(e(s)).on(u+d,a).on(o+d,l),m=W(s),M=t(h,v);i?(c=i.apply(f,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],p({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),i=null,u=e(b,ao.mouse,t,"mousemove","mouseup"),o=e(G,ao.touch,m,"touchmove","touchend");return n.origin=function(t){return arguments.length?(i=t,n):i},ao.rebind(n,r,"on")},ao.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?co(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Uo=1e-6,jo=Uo*Uo,Fo=Math.PI,Ho=2*Fo,Oo=Ho-Uo,Io=Fo/2,Yo=Fo/180,Zo=180/Fo,Vo=Math.SQRT2,Xo=2,$o=4;ao.interpolateZoom=function(n,t){var e,r,i=n[0],u=n[1],o=n[2],a=t[0],l=t[1],c=t[2],f=a-i,s=l-u,h=f*f+s*s;if(jo>h)r=Math.log(c/o)/Vo,e=function(n){return[i+n*f,u+n*s,o*Math.exp(Vo*n*r)]};else{var p=Math.sqrt(h),g=(c*c-o*o+$o*h)/(2*o*Xo*p),v=(c*c-o*o-$o*h)/(2*c*Xo*p),d=Math.log(Math.sqrt(g*g+1)-g),y=Math.log(Math.sqrt(v*v+1)-v);r=(y-d)/Vo,e=function(n){var t=n*r,e=rn(d),a=o/(Xo*p)*(e*un(Vo*t+d)-en(d));return[i+a*f,u+a*s,o*e/rn(Vo*t+d)]}}return e.duration=1e3*r,e},ao.behavior.zoom=function(){function n(n){n.on(L,s).on(Wo+".zoom",p).on("dblclick.zoom",g).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function i(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function o(t,e,r,o){t.__chart__={x:k.x,y:k.y,k:k.k},i(Math.pow(2,o)),u(d=e,r),t=ao.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function f(n){--z||(n({type:"zoomend"}),d=null)}function s(){function n(){a=1,u(ao.mouse(i),h),c(o)}function r(){s.on(q,null).on(T,null),p(a),f(o)}var i=this,o=D.of(i,arguments),a=0,s=ao.select(t(i)).on(q,n).on(T,r),h=e(ao.mouse(i)),p=W(i);Il.call(i),l(o)}function h(){function n(){var n=ao.touches(g);return p=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=ao.event.target;ao.select(t).on(x,r).on(b,a),_.push(t);for(var e=ao.event.changedTouches,i=0,u=e.length;u>i;++i)d[e[i].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var f=l[0];o(g,f,d[f.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var f=l[0],s=l[1],h=f[0]-s[0],p=f[1]-s[1];y=h*h+p*p}}function r(){var n,t,e,r,o=ao.touches(g);Il.call(g);for(var a=0,l=o.length;l>a;++a,r=null)if(e=o[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var f=(f=e[0]-n[0])*f+(f=e[1]-n[1])*f,s=y&&Math.sqrt(f/y);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],i(s*p)}M=null,u(n,t),c(v)}function a(){if(ao.event.touches.length){for(var t=ao.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var i in d)return void n()}ao.selectAll(_).on(m,null),w.on(L,s).on(R,h),N(),f(v)}var p,g=this,v=D.of(g,arguments),d={},y=0,m=".zoom-"+ao.event.changedTouches[0].identifier,x="touchmove"+m,b="touchend"+m,_=[],w=ao.select(g),N=W(g);t(),l(v),w.on(L,null).on(R,t)}function p(){var n=D.of(this,arguments);m?clearTimeout(m):(Il.call(this),v=e(d=y||ao.mouse(this)),l(n)),m=setTimeout(function(){m=null,f(n)},50),S(),i(Math.pow(2,.002*Bo())*k.k),u(d,v),c(n)}function g(){var n=ao.mouse(this),t=Math.log(k.k)/Math.LN2;o(this,n,e(n),ao.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,y,m,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Jo,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Wo||(Wo="onwheel"in fo?(Bo=function(){return-ao.event.deltaY*(ao.event.deltaMode?120:1)},"wheel"):"onmousewheel"in fo?(Bo=function(){return ao.event.wheelDelta},"mousewheel"):(Bo=function(){return-ao.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?ao.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],i=d?d[0]:e/2,u=d?d[1]:r/2,o=ao.interpolateZoom([(i-k.x)/k.k,(u-k.y)/k.k,e/k.k],[(i-t.x)/t.k,(u-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:i-r[0]*a,y:u-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){f(n)}).each("end.zoom",function(){f(n)}):(this.__chart__=k,l(n),c(n),f(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},i(+t),a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Jo:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(y=t&&[+t[0],+t[1]],n):y},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},ao.rebind(n,D,"on")};var Bo,Wo,Jo=[0,1/0];ao.color=an,an.prototype.toString=function(){return this.rgb()+""},ao.hsl=ln;var Go=ln.prototype=new an;Go.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Go.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Go.rgb=function(){return cn(this.h,this.s,this.l)},ao.hcl=fn;var Ko=fn.prototype=new an;Ko.brighter=function(n){return new fn(this.h,this.c,Math.min(100,this.l+Qo*(arguments.length?n:1)))},Ko.darker=function(n){return new fn(this.h,this.c,Math.max(0,this.l-Qo*(arguments.length?n:1)))},Ko.rgb=function(){return sn(this.h,this.c,this.l).rgb()},ao.lab=hn;var Qo=18,na=.95047,ta=1,ea=1.08883,ra=hn.prototype=new an;ra.brighter=function(n){return new hn(Math.min(100,this.l+Qo*(arguments.length?n:1)),this.a,this.b)},ra.darker=function(n){return new hn(Math.max(0,this.l-Qo*(arguments.length?n:1)),this.a,this.b)},ra.rgb=function(){return pn(this.l,this.a,this.b)},ao.rgb=mn;var ia=mn.prototype=new an;ia.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,i=30;return t||e||r?(t&&i>t&&(t=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new mn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mn(i,i,i)},ia.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mn(n*this.r,n*this.g,n*this.b)},ia.hsl=function(){return wn(this.r,this.g,this.b)},ia.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var ua=ao.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ua.forEach(function(n,t){ua.set(n,Mn(t))}),ao.functor=En,ao.xhr=An(m),ao.dsv=function(n,t){function e(n,e,u){arguments.length<3&&(u=e,e=null);var o=Cn(n,t,null==e?r:i(e),u);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:i(n)):e},o}function r(n){return e.parse(n.responseText)}function i(n){return function(t){return e.parse(t.responseText,n)}}function u(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var i=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(i(n),e)}:i})},e.parseRows=function(n,t){function e(){if(f>=c)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++f;){var r=n.charCodeAt(f++),a=1;if(10===r)i=!0;else if(13===r)i=!0,10===n.charCodeAt(f)&&(++f,++a);else if(r!==l)continue;return n.slice(t,f-a)}return n.slice(t)}for(var r,i,u={},o={},a=[],c=n.length,f=0,s=0;(r=e())!==o;){for(var h=[];r!==u&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,s++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new y,i=[];return t.forEach(function(n){for(var t in n)r.has(t)||i.push(r.add(t))}),[i.map(o).join(n)].concat(t.map(function(t){return i.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(u).join("\n")},e},ao.csv=ao.dsv(",","text/csv"),ao.tsv=ao.dsv(" ","text/tab-separated-values");var oa,aa,la,ca,fa=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ao.timer=function(){qn.apply(this,arguments)},ao.timer.flush=function(){Rn(),Dn()},ao.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var sa=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);ao.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=ao.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),sa[8+e/3]};var ha=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,pa=ao.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ao.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),ga=ao.time={},va=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){da.setUTCDate.apply(this._,arguments)},setDay:function(){da.setUTCDay.apply(this._,arguments)},setFullYear:function(){da.setUTCFullYear.apply(this._,arguments)},setHours:function(){da.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){da.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){da.setUTCMinutes.apply(this._,arguments)},setMonth:function(){da.setUTCMonth.apply(this._,arguments)},setSeconds:function(){da.setUTCSeconds.apply(this._,arguments)},setTime:function(){da.setTime.apply(this._,arguments)}};var da=Date.prototype;ga.year=On(function(n){return n=ga.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ga.years=ga.year.range,ga.years.utc=ga.year.utc.range,ga.day=On(function(n){var t=new va(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ga.days=ga.day.range,ga.days.utc=ga.day.utc.range,ga.dayOfYear=function(n){var t=ga.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ga[n]=On(function(n){return(n=ga.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ga.year(n).getDay();return Math.floor((ga.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ga[n+"s"]=e.range,ga[n+"s"].utc=e.utc.range,ga[n+"OfYear"]=function(n){var e=ga.year(n).getDay();return Math.floor((ga.dayOfYear(n)+(e+t)%7)/7)}}),ga.week=ga.sunday,ga.weeks=ga.sunday.range,ga.weeks.utc=ga.sunday.utc.range,ga.weekOfYear=ga.sundayOfYear;var ya={"-":"",_:" ",0:"0"},ma=/^\s*\d+/,Ma=/^%/;ao.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xa=ao.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"], shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ao.format=xa.numberFormat,ao.geo={},ft.prototype={s:0,t:0,add:function(n){st(n,this.t,ba),st(ba.s,this.s,this),this.s?this.t+=ba.t:this.s=ba.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ba=new ft;ao.geo.stream=function(n,t){n&&_a.hasOwnProperty(n.type)?_a[n.type](n,t):ht(n,t)};var _a={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++rn?4*Fo+n:n,Na.lineStart=Na.lineEnd=Na.point=b}};ao.geo.bounds=function(){function n(n,t){M.push(x=[f=n,h=n]),s>t&&(s=t),t>p&&(p=t)}function t(t,e){var r=dt([t*Yo,e*Yo]);if(y){var i=mt(y,r),u=[i[1],-i[0],0],o=mt(u,i);bt(o),o=_t(o);var l=t-g,c=l>0?1:-1,v=o[0]*Zo*c,d=xo(l)>180;if(d^(v>c*g&&c*t>v)){var m=o[1]*Zo;m>p&&(p=m)}else if(v=(v+360)%360-180,d^(v>c*g&&c*t>v)){var m=-o[1]*Zo;s>m&&(s=m)}else s>e&&(s=e),e>p&&(p=e);d?g>t?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(f>t&&(f=t),t>h&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){b.point=t}function r(){x[0]=f,x[1]=h,b.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=xo(r)>180?r+(r>0?360:-360):r}else v=n,d=e;Na.point(n,e),t(n,e)}function u(){Na.lineStart()}function o(){i(v,d),Na.lineEnd(),xo(m)>Uo&&(f=-(h=180)),x[0]=f,x[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nka?(f=-(h=180),s=-(p=90)):m>Uo?p=90:-Uo>m&&(s=-90),x[0]=f,x[1]=h}};return function(n){p=h=-(f=s=1/0),M=[],ao.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,i=M[0],u=[i];t>r;++r)e=M[r],c(e[0],i)||c(e[1],i)?(a(i[0],e[1])>a(i[0],i[1])&&(i[1]=e[1]),a(e[0],i[1])>a(i[0],i[1])&&(i[0]=e[0])):u.push(i=e);for(var o,e,g=-(1/0),t=u.length-1,r=0,i=u[t];t>=r;i=e,++r)e=u[r],(o=a(i[1],e[0]))>g&&(g=o,f=e[0],h=i[1])}return M=x=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),ao.geo.centroid=function(n){Ea=Aa=Ca=za=La=qa=Ta=Ra=Da=Pa=Ua=0,ao.geo.stream(n,ja);var t=Da,e=Pa,r=Ua,i=t*t+e*e+r*r;return jo>i&&(t=qa,e=Ta,r=Ra,Uo>Aa&&(t=Ca,e=za,r=La),i=t*t+e*e+r*r,jo>i)?[NaN,NaN]:[Math.atan2(e,t)*Zo,tn(r/Math.sqrt(i))*Zo]};var Ea,Aa,Ca,za,La,qa,Ta,Ra,Da,Pa,Ua,ja={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){ja.lineStart=At},polygonEnd:function(){ja.lineStart=Nt}},Fa=Rt(zt,jt,Ht,[-Fo,-Fo/2]),Ha=1e9;ao.geo.clipExtent=function(){var n,t,e,r,i,u,o={stream:function(n){return i&&(i.valid=!1),i=u(n),i.valid=!0,i},extent:function(a){return arguments.length?(u=Zt(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ao.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,ao.geo.albers=function(){return ao.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ao.geo.albersUsa=function(){function n(n){var u=n[0],o=n[1];return t=null,e(u,o),t||(r(u,o),t)||i(u,o),t}var t,e,r,i,u=ao.geo.albers(),o=ao.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ao.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=u.scale(),e=u.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var c=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*c,s-.238*c],[f+.455*c,s+.238*c]]).stream(l).point,r=o.translate([f-.307*c,s+.201*c]).clipExtent([[f-.425*c+Uo,s+.12*c+Uo],[f-.214*c-Uo,s+.234*c-Uo]]).stream(l).point,i=a.translate([f-.205*c,s+.212*c]).clipExtent([[f-.214*c+Uo,s+.166*c+Uo],[f-.115*c-Uo,s+.234*c-Uo]]).stream(l).point,n},n.scale(1070)};var Oa,Ia,Ya,Za,Va,Xa,$a={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Ia=0,$a.lineStart=$t},polygonEnd:function(){$a.lineStart=$a.lineEnd=$a.point=b,Oa+=xo(Ia/2)}},Ba={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wa={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wa.lineStart=ne},polygonEnd:function(){Wa.point=Gt,Wa.lineStart=Kt,Wa.lineEnd=Qt}};ao.geo.path=function(){function n(n){return n&&("function"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),ao.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return Oa=0,ao.geo.stream(n,i($a)),Oa},n.centroid=function(n){return Ca=za=La=qa=Ta=Ra=Da=Pa=Ua=0,ao.geo.stream(n,i(Wa)),Ua?[Da/Ua,Pa/Ua]:Ra?[qa/Ra,Ta/Ra]:La?[Ca/La,za/La]:[NaN,NaN]},n.bounds=function(n){return Va=Xa=-(Ya=Za=1/0),ao.geo.stream(n,i(Ba)),[[Ya,Za],[Va,Xa]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||re(n):m,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Wt:new te(n),"function"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(ao.geo.albersUsa()).context(null)},ao.geo.transform=function(n){return{stream:function(t){var e=new ie(t);for(var r in n)e[r]=n[r];return e}}},ie.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ao.geo.projection=oe,ao.geo.projectionMutator=ae,(ao.geo.equirectangular=function(){return oe(ce)}).raw=ce.invert=ce,ao.geo.rotation=function(n){function t(t){return t=n(t[0]*Yo,t[1]*Yo),t[0]*=Zo,t[1]*=Zo,t}return n=se(n[0]%360*Yo,n[1]*Yo,n.length>2?n[2]*Yo:0),t.invert=function(t){return t=n.invert(t[0]*Yo,t[1]*Yo),t[0]*=Zo,t[1]*=Zo,t},t},fe.invert=ce,ao.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=se(-n[0]*Yo,-n[1]*Yo,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Zo,n[1]*=Zo}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Yo,i*Yo),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Yo,(i=+r)*Yo),n):i},n.angle(90)},ao.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Yo,i=n[1]*Yo,u=t[1]*Yo,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=c*f-l*s*a)*e),l*f+c*s*a)},ao.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ao.range(Math.ceil(u/d)*d,i,d).map(h).concat(ao.range(Math.ceil(c/y)*y,l,y).map(p)).concat(ao.range(Math.ceil(r/g)*g,e,g).filter(function(n){return xo(n%d)>Uo}).map(f)).concat(ao.range(Math.ceil(a/v)*v,o,v).filter(function(n){return xo(n%y)>Uo}).map(s))}var e,r,i,u,o,a,l,c,f,s,h,p,g=10,v=g,d=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],u>i&&(t=u,u=i,i=t),c>l&&(t=c,c=l,l=t),n.precision(m)):[[u,c],[i,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],y=+t[1],n):[d,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],n):[g,v]},n.precision=function(t){return arguments.length?(m=+t,f=ye(a,o,90),s=me(r,e,m),h=ye(c,l,90),p=me(u,i,m),n):m},n.majorExtent([[-180,-90+Uo],[180,90-Uo]]).minorExtent([[-180,-80-Uo],[180,80+Uo]])},ao.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=Me,i=xe;return n.distance=function(){return ao.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},ao.geo.interpolate=function(n,t){return be(n[0]*Yo,n[1]*Yo,t[0]*Yo,t[1]*Yo)},ao.geo.length=function(n){return Ja=0,ao.geo.stream(n,Ga),Ja};var Ja,Ga={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ka=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ao.geo.azimuthalEqualArea=function(){return oe(Ka)}).raw=Ka;var Qa=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},m);(ao.geo.azimuthalEquidistant=function(){return oe(Qa)}).raw=Qa,(ao.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(ao.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(ao.geo.gnomonic=function(){return oe(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Io]},(ao.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(ao.geo.orthographic=function(){return oe(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ao.geo.stereographic=function(){return oe(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Io]},(ao.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,ao.geom={},ao.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=En(e),u=En(r),o=n.length,a=[],l=[];for(t=0;o>t;t++)a.push([+i.call(this,n[t],t),+u.call(this,n[t],t),t]);for(a.sort(qe),t=0;o>t;t++)l.push([a[t][0],-a[t][1]]);var c=Le(a),f=Le(l),s=f[0]===c[0],h=f[f.length-1]===c[c.length-1],p=[];for(t=c.length-1;t>=0;--t)p.push(n[a[c[t]][2]]);for(t=+s;t=r&&c.x<=u&&c.y>=i&&c.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[];f.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/Uo)*Uo,y:Math.round(o(n,t)/Uo)*Uo,i:t}})}var r=Ce,i=ze,u=r,o=i,a=sl;return n?t(n):(t.links=function(n){return ar(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ar(e(n)).cells.forEach(function(e,r){for(var i,u,o=e.site,a=e.edges.sort(Ve),l=-1,c=a.length,f=a[c-1].edge,s=f.l===o?f.r:f.l;++l=c,h=r>=f,p=h<<1|s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]=hr()),s?i=c:a=c,h?o=f:l=f,u(n,t,e,r,i,o,a,l)}var f,s,h,p,g,v,d,y,m,M=En(a),x=En(l);if(null!=t)v=t,d=e,y=r,m=i;else if(y=m=-(v=d=1/0),s=[],h=[],g=n.length,o)for(p=0;g>p;++p)f=n[p],f.xy&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;g>p;++p){var b=+M(f=n[p],p),_=+x(f,p);v>b&&(v=b),d>_&&(d=_),b>y&&(y=b),_>m&&(m=_),s.push(b),h.push(_)}var w=y-v,S=m-d;w>S?m=d+w:y=v+S;var k=hr();if(k.add=function(n){u(k,n,+M(n,++p),+x(n,p),v,d,y,m)},k.visit=function(n){pr(n,k,v,d,y,m)},k.find=function(n){return gr(k,n[0],n[1],v,d,y,m)},p=-1,null==t){for(;++p=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||gl,r=dl.get(r)||m,br(r(e.apply(null,lo.call(arguments,1))))},ao.interpolateHcl=Rr,ao.interpolateHsl=Dr,ao.interpolateLab=Pr,ao.interpolateRound=Ur,ao.transform=function(n){var t=fo.createElementNS(ao.ns.prefix.svg,"g");return(ao.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:yl)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var yl={a:1,b:0,c:0,d:1,e:0,f:0};ao.interpolateTransform=$r,ao.layout={},ao.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++ea*a/y){if(v>l){var c=t.charge/l;n.px-=u*c,n.py-=o*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=u*c,n.py-=o*c}}return!t.charge}}function t(n){n.px=ao.event.x,n.py=ao.event.y,l.resume()}var e,r,i,u,o,a,l={},c=ao.dispatch("start","tick","end"),f=[1,1],s=.9,h=ml,p=Ml,g=-30,v=xl,d=.1,y=.64,M=[],x=[];return l.tick=function(){if((i*=.99)<.005)return e=null,c.end({type:"end",alpha:i=0}),!0;var t,r,l,h,p,v,y,m,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,p=l.target,m=p.x-h.x,b=p.y-h.y,(v=m*m+b*b)&&(v=i*o[r]*((v=Math.sqrt(v))-u[r])/v,m*=v,b*=v,p.x-=m*(y=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=b*y,h.x+=m*(y=1-y),h.y+=b*y);if((y=i*d)&&(m=f[0]/2,b=f[1]/2,r=-1,y))for(;++r<_;)l=M[r],l.x+=(m-l.x)*y,l.y+=(b-l.y)*y;if(g)for(ri(t=ao.geom.quadtree(M),i,a),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*s,l.y-=(l.py-(l.py=l.y))*s);c.tick({type:"tick",alpha:i})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(f=n,l):f},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.friction=function(n){return arguments.length?(s=+n,l):s},l.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(y=n*n,l):Math.sqrt(y)},l.alpha=function(n){return arguments.length?(n=+n,i?n>0?i=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=qn(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;i>l;++l)e[l]=[];for(l=0;c>l;++l){var u=x[l];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var o,a=e[t],l=-1,f=a.length;++lt;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;i>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",s)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof h)for(t=0;c>t;++t)u[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)u[t]=h;if(o=[],"function"==typeof p)for(t=0;c>t;++t)o[t]=+p.call(this,x[t],t);else for(t=0;c>t;++t)o[t]=p;if(a=[],"function"==typeof g)for(t=0;i>t;++t)a[t]=+g.call(this,M[t],t);else for(t=0;i>t;++t)a[t]=g;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=ao.behavior.drag().origin(m).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",ni)),arguments.length?void this.on("mouseover.force",ti).on("mouseout.force",ei).call(r):r},ao.rebind(l,c,"on")};var ml=20,Ml=1,xl=1/0;ao.layout.hierarchy=function(){function n(i){var u,o=[i],a=[];for(i.depth=0;null!=(u=o.pop());)if(a.push(u),(c=e.call(n,u,u.depth))&&(l=c.length)){for(var l,c,f;--l>=0;)o.push(f=c[l]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=c}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return oi(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=ci,e=ai,r=li;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(ui(t,function(n){n.children&&(n.value=0)}),oi(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ao.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++cs?-1:1),g=ao.sum(c),v=g?(s-l*p)/g:0,d=ao.range(l),y=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(o[n],o[t])}),d.forEach(function(n){y[n]={data:o[n],value:a=c[n],startAngle:f,endAngle:f+=a*v+p,padAngle:h}}),y}var t=Number,e=bl,r=0,i=Ho,u=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(i=t,n):i},n.padAngle=function(t){return arguments.length?(u=t,n):u},n};var bl={};ao.layout.stack=function(){function n(a,l){if(!(h=a.length))return a;var c=a.map(function(e,r){return t.call(n,e,r)}),f=c.map(function(t){return t.map(function(t,e){return[u.call(n,t,e),o.call(n,t,e)]})}),s=e.call(n,f,l);c=ao.permute(c,s),f=ao.permute(f,s);var h,p,g,v,d=r.call(n,f,l),y=c[0].length;for(g=0;y>g;++g)for(i.call(n,c[0][g],v=d[g],f[0][g][1]),p=1;h>p;++p)i.call(n,c[p][g],v+=f[p-1][g][1],f[p][g][1]);return a}var t=m,e=gi,r=vi,i=pi,u=si,o=hi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||gi,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vi,n):r},n.x=function(t){return arguments.length?(u=t,n):u},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(i=t,n):i},n};var _l=ao.map({"inside-out":function(n){var t,e,r=n.length,i=n.map(di),u=n.map(yi),o=ao.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,l=0,c=[],f=[];for(t=0;r>t;++t)e=o[t],l>a?(a+=u[e],c.push(e)):(l+=u[e],f.push(e));return f.reverse().concat(c)},reverse:function(n){return ao.range(n.length).reverse()},"default":gi}),wl=ao.map({silhouette:function(n){var t,e,r,i=n.length,u=n[0].length,o=[],a=0,l=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;u>e;++e)l[e]=(a-o[e])/2;return l},wiggle:function(n){var t,e,r,i,u,o,a,l,c,f=n.length,s=n[0],h=s.length,p=[];for(p[0]=l=c=0,e=1;h>e;++e){for(t=0,i=0;f>t;++t)i+=n[t][e][1];for(t=0,u=0,a=s[e][0]-s[e-1][0];f>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;u+=o*n[t][e][1]}p[e]=l-=i?u/i*a:0,c>l&&(c=l)}for(e=0;h>e;++e)p[e]-=c;return p},expand:function(n){var t,e,r,i=n.length,u=n[0].length,o=1/i,a=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];if(r)for(t=0;i>t;t++)n[t][e][1]/=r;else for(t=0;i>t;t++)n[t][e][1]=o}for(e=0;u>e;++e)a[e]=0;return a},zero:vi});ao.layout.histogram=function(){function n(n,u){for(var o,a,l=[],c=n.map(e,this),f=r.call(this,c,u),s=i.call(this,f,c,u),u=-1,h=c.length,p=s.length-1,g=t?1:1/h;++u0)for(u=-1;++u=f[0]&&a<=f[1]&&(o=l[ao.bisect(s,a,1,p)-1],o.y+=g,o.push(n[u]));return l}var t=!0,e=Number,r=bi,i=Mi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return xi(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ao.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],l=i[0],c=i[1],f=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,oi(a,function(n){n.r=+f(n.value)}),oi(a,Ni),r){var s=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;oi(a,function(n){n.r+=s}),oi(a,Ni),oi(a,function(n){n.r-=s})}return Ci(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}var t,e=ao.layout.hierarchy().sort(_i),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},ii(n,e)},ao.layout.tree=function(){function n(n,i){var f=o.call(this,n,i),s=f[0],h=t(s);if(oi(h,e),h.parent.m=-h.z,ui(h,r),c)ui(s,u);else{var p=s,g=s,v=s;ui(s,function(n){n.xg.x&&(g=n),n.depth>v.depth&&(v=n)});var d=a(p,g)/2-p.x,y=l[0]/(g.x+a(g,p)/2+d),m=l[1]/(v.depth||1);ui(s,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return f}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;a>o;++o)r.push((u[o]=i={_:u[o],parent:t,children:(i=u[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Di(n);var u=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-u):n.z=u}else r&&(n.z=r.z+a(n._,r._));n.parent.A=i(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function i(n,t,e){if(t){for(var r,i=n,u=n,o=t,l=i.parent.children[0],c=i.m,f=u.m,s=o.m,h=l.m;o=Ti(o),i=qi(i),o&&i;)l=qi(l),u=Ti(u),u.a=n,r=o.z+s-i.z-c+a(o._,i._),r>0&&(Ri(Pi(o,n,e),n,r),c+=r,f+=r),s+=o.m,c+=i.m,h+=l.m,f+=u.m;o&&!Ti(u)&&(u.t=o,u.m+=s-f),i&&!qi(l)&&(l.t=i,l.m+=c-h,e=n)}return e}function u(n){n.x*=l[0],n.y=n.depth*l[1]}var o=ao.layout.hierarchy().sort(null).value(null),a=Li,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(c=null==(l=t)?u:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:u,n):c?l:null},ii(n,o)},ao.layout.cluster=function(){function n(n,u){var o,a=t.call(this,n,u),l=a[0],c=0;oi(l,function(n){var t=n.children;t&&t.length?(n.x=ji(t),n.y=Ui(t)):(n.x=o?c+=e(n,o):0,n.y=0,o=n)});var f=Fi(l),s=Hi(l),h=f.x-e(f,s)/2,p=s.x+e(s,f)/2;return oi(l,i?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),a}var t=ao.layout.hierarchy().sort(null).value(null),e=Li,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},ii(n,t)},ao.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++it?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var u=e.children;if(u&&u.length){var o,a,l,c=s(e),f=[],h=u.slice(),g=1/0,v="slice"===p?c.dx:"dice"===p?c.dy:"slice-dice"===p?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),f.area=0;(l=h.length)>0;)f.push(o=h[l-1]),f.area+=o.area,"squarify"!==p||(a=r(f,v))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,v,c,!1),v=Math.min(c.dx,c.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,v,c,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),l=[];for(n(a,o.dx*o.dy/t.value),l.area=0;u=a.pop();)l.push(u),l.area+=u.area,null!=u.z&&(i(l,u.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++oe&&(u=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,c=e.y,f=t?l(n.area/t):0; if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++ue.dx)&&(f=e.dx);++ue&&(t=1),1>e&&(n=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=ao.random.normal.apply(ao,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ao.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ao.scale={};var Sl={floor:m,ceil:m};ao.scale.linear=function(){return Wi([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};ao.scale.log=function(){return ru(ao.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=ao.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ao.scale.pow=function(){return iu(ao.scale.linear(),1,[0,1])},ao.scale.sqrt=function(){return ao.scale.pow().exponent(.5)},ao.scale.ordinal=function(){return ou([],{t:"range",a:[[]]})},ao.scale.category10=function(){return ao.scale.ordinal().range(Al)},ao.scale.category20=function(){return ao.scale.ordinal().range(Cl)},ao.scale.category20b=function(){return ao.scale.ordinal().range(zl)},ao.scale.category20c=function(){return ao.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);ao.scale.quantile=function(){return au([],[])},ao.scale.quantize=function(){return lu(0,1,[0,1])},ao.scale.threshold=function(){return cu([.5],[0,1])},ao.scale.identity=function(){return fu([0,1])},ao.svg={},ao.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),f=o.apply(this,arguments)-Io,s=a.apply(this,arguments)-Io,h=Math.abs(s-f),p=f>s?0:1;if(n>c&&(g=c,c=n,n=g),h>=Oo)return t(c,p)+(n?t(n,1-p):"")+"Z";var g,v,d,y,m,M,x,b,_,w,S,k,N=0,E=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(d=u===ql?Math.sqrt(n*n+c*c):+u.apply(this,arguments),p||(E*=-1),c&&(E=tn(d/c*Math.sin(y))),n&&(N=tn(d/n*Math.sin(y)))),c){m=c*Math.cos(f+E),M=c*Math.sin(f+E),x=c*Math.cos(s-E),b=c*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Fo?0:1;if(E&&yu(m,M,x,b)===p^C){var z=(f+s)/2;m=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else m=M=0;if(n){_=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var L=Math.abs(f-s+2*N)<=Fo?0:1;if(N&&yu(_,w,S,k)===1-p^L){var q=(f+s)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Uo&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){v=c>n^p?0:1;var T=g,R=g;if(Fo>h){var D=null==S?[_,w]:null==x?[m,M]:Re([m,M],[S,k],[x,b],[_,w]),P=m-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(g,(n-O)/(H-1)),T=Math.min(g,(c-O)/(H+1))}if(null!=x){var I=mu(null==S?[_,w]:[S,k],[m,M],c,T,p),Y=mu([x,b],[_,w],c,T,p);g===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-p^yu(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",p," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",m,",",M);if(null!=S){var Z=mu([m,M],[S,k],n,-R,p),V=mu([_,w],null==x?[m,M]:[x,b],n,-R,p);g===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",p^yu(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-p," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",m,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",p," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-p," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hu,r=pu,i=su,u=ql,o=gu,a=vu,l=du;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(i=En(t),n):i},n.padRadius=function(t){return arguments.length?(u=t==ql?ql:En(t),n):u},n.startAngle=function(t){return arguments.length?(o=En(t),n):o},n.endAngle=function(t){return arguments.length?(a=En(t),n):a},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Io;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";ao.svg.line=function(){return Mu(m)};var Tl=ao.map({linear:xu,"linear-closed":bu,step:_u,"step-before":wu,"step-after":Su,basis:zu,"basis-open":Lu,"basis-closed":qu,bundle:Tu,cardinal:Eu,"cardinal-open":ku,"cardinal-closed":Nu,monotone:Fu});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];ao.svg.line.radial=function(){var n=Mu(Hu);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wu.reverse=Su,Su.reverse=wu,ao.svg.area=function(){return Ou(m)},ao.svg.area.radial=function(){var n=Ou(Hu);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ao.svg.chord=function(){function n(n,a){var l=t(this,u,n,a),c=t(this,o,n,a);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?i(l.r,l.p1,l.r,l.p0):i(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var i=t.call(n,e,r),u=a.call(n,i,r),o=l.call(n,i,r)-Io,f=c.call(n,i,r)-Io;return{r:u,a0:o,a1:f,p0:[u*Math.cos(o),u*Math.sin(o)],p1:[u*Math.cos(f),u*Math.sin(f)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Fo)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var u=Me,o=xe,a=Iu,l=gu,c=vu;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},ao.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,l=[u,{x:u.x,y:a},{x:o.x,y:a},o];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yu;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ao.svg.diagonal.radial=function(){var n=ao.svg.diagonal(),t=Yu,e=n.projection;return n.projection=function(n){return arguments.length?e(Zu(t=n)):t},n},ao.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$u)(e.call(this,n,r))}var t=Xu,e=Vu;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=ao.map({circle:$u,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ao.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Yo);Co.transition=function(n){for(var t,e,r=Hl||++Zl,i=Ku(n),u=[],o=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},a=-1,l=this.length;++au;u++){i.push(t=[]);for(var e=this[u],a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return Wu(i,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(i){i[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function u(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?$r:Mr,a=ao.ns.qualify(n);return Ju(this,"attr."+n,t,a.local?u:i)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(i));return r&&function(n){this.setAttribute(i,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(i.space,i.local));return r&&function(n){this.setAttributeNS(i.space,i.local,r(n))}}var i=ao.ns.qualify(n);return this.tween("attr."+n,i.local?r:e)},Yl.style=function(n,e,r){function i(){this.style.removeProperty(n)}function u(e){return null==e?i:(e+="",function(){var i,u=t(this).getComputedStyle(this,null).getPropertyValue(n);return u!==e&&(i=Mr(u,e),function(t){this.style.setProperty(n,i(t),r)})})}var o=arguments.length;if(3>o){if("string"!=typeof n){2>o&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ju(this,"style."+n,e,u)},Yl.styleTween=function(n,e,r){function i(i,u){var o=e.call(this,i,u,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,i)},Yl.text=function(n){return Ju(this,"text",n,Gu)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ao.ease.apply(ao,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,i,u){r[e][t].delay=+n.call(r,r.__data__,i,u)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,i,u){r[e][t].duration=Math.max(1,n.call(r,r.__data__,i,u))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Ol,u=Hl;try{Hl=e,Y(this,function(t,i,u){Ol=t[r][e],n.call(t,t.__data__,i,u)})}finally{Ol=i,Hl=u}}else Y(this,function(i){var u=i[r][e];(u.event||(u.event=ao.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,i=this.id,u=++Zl,o=this.namespace,a=[],l=0,c=this.length;c>l;l++){a.push(n=[]);for(var t=this[l],f=0,s=t.length;s>f;f++)(e=t[f])&&(r=e[o][i],Qu(e,f,o,u,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wu(a,o,u)},ao.svg.axis=function(){function n(n){n.each(function(){var n,c=ao.select(this),f=this.__chart__||e,s=this.__chart__=e.copy(),h=null==l?s.ticks?s.ticks.apply(s,a):s.domain():l,p=null==t?s.tickFormat?s.tickFormat.apply(s,a):m:t,g=c.selectAll(".tick").data(h,s),v=g.enter().insert("g",".domain").attr("class","tick").style("opacity",Uo),d=ao.transition(g.exit()).style("opacity",Uo).remove(),y=ao.transition(g.order()).style("opacity",1),M=Math.max(i,0)+o,x=Zi(s),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),ao.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=y.select("line"),C=g.select("text").text(p),z=v.select("text"),L=y.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=no,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*u+"V0H"+x[1]+"V"+q*u)):(n=to,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*u+","+x[0]+"H0V"+x[1]+"H"+q*u)),E.attr(N,q*i),z.attr(k,q*M),A.attr(S,0).attr(N,q*i),L.attr(w,0).attr(k,q*M),s.rangeBand){var T=s,R=T.rangeBand()/2;f=s=function(n){return T(n)+R}}else f.rangeBand?f=s:d.call(n,s,f);v.call(n,f,s),y.call(n,s,s)})}var t,e=ao.scale.linear(),r=Vl,i=6,u=6,o=3,a=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(a=co(arguments),n):a},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(i=+t,u=+arguments[e-1],n):i},n.innerTickSize=function(t){return arguments.length?(i=+t,n):i},n.outerTickSize=function(t){return arguments.length?(u=+t,n):u},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};ao.svg.brush=function(){function n(t){t.each(function(){var t=ao.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=t.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=t.selectAll(".resize").data(v,m);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var l,s=ao.transition(t),h=ao.transition(o);c&&(l=Zi(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(s)),f&&(l=Zi(f),h.attr("y",l[0]).attr("height",l[1]-l[0]),i(s)),e(s)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function i(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){32==ao.event.keyCode&&(C||(M=null,L[0]-=s[1],L[1]-=h[1],C=2),S())}function v(){32==ao.event.keyCode&&2==C&&(L[0]+=s[1],L[1]+=h[1],C=0,S())}function d(){var n=ao.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ao.event.altKey?(M||(M=[(s[0]+s[1])/2,(h[0]+h[1])/2]),L[0]=s[+(n[0]f?(i=r,r=f):i=f),v[0]!=r||v[1]!=i?(e?a=null:o=null,v[0]=r,v[1]=i,!0):void 0}function m(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ao.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=ao.select(ao.event.target),w=l.of(b,arguments),k=ao.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&f,C=_.classed("extent"),z=W(b),L=ao.mouse(b),q=ao.select(t(b)).on("keydown.brush",u).on("keyup.brush",v);if(ao.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",m):q.on("mousemove.brush",d).on("mouseup.brush",m),k.interrupt().selectAll("*").interrupt(),C)L[0]=s[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[s[1-T]-L[0],h[1-R]-L[1]],L[0]=s[T],L[1]=h[R]}else ao.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),ao.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var o,a,l=N(n,"brushstart","brush","brushend"),c=null,f=null,s=[0,0],h=[0,0],p=!0,g=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:s,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Hl?ao.select(this).transition().each("start.brush",function(){o=e.i,a=e.j,s=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(s,t.x),r=xr(h,t.y);return o=a=null,function(i){s=t.x=e(i),h=t.y=r(i),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,a=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!f],n):c},n.y=function(t){return arguments.length?(f=t,v=Bl[!c<<1|!f],n):f},n.clamp=function(t){return arguments.length?(c&&f?(p=!!t[0],g=!!t[1]):c?p=!!t:f&&(g=!!t),n):c&&f?[p,g]:c?p:f?g:null},n.extent=function(t){var e,r,i,u,l;return arguments.length?(c&&(e=t[0],r=t[1],f&&(e=e[0],r=r[0]),o=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),e==s[0]&&r==s[1]||(s=[e,r])),f&&(i=t[0],u=t[1],c&&(i=i[1],u=u[1]),a=[i,u],f.invert&&(i=f(i),u=f(u)),i>u&&(l=i,i=u,u=l),i==h[0]&&u==h[1]||(h=[i,u])),n):(c&&(o?(e=o[0],r=o[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),f&&(a?(i=a[0],u=a[1]):(i=h[0],u=h[1],f.invert&&(i=f.invert(i),u=f.invert(u)),i>u&&(l=i,i=u,u=l))),c&&f?[[e,i],[r,u]]:c?[e,r]:f&&[i,u])},n.clear=function(){return n.empty()||(s=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!f&&h[0]==h[1]},ao.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=ga.format=xa.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?eo:Gl,eo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},eo.toString=Gl.toString,ga.second=On(function(n){return new va(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ga.seconds=ga.second.range,ga.seconds.utc=ga.second.utc.range,ga.minute=On(function(n){return new va(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ga.minutes=ga.minute.range,ga.minutes.utc=ga.minute.utc.range,ga.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new va(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ga.hours=ga.hour.range,ga.hours.utc=ga.hour.utc.range,ga.month=On(function(n){return n=ga.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ga.months=ga.month.range,ga.months.utc=ga.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[ga.second,1],[ga.second,5],[ga.second,15],[ga.second,30],[ga.minute,1],[ga.minute,5],[ga.minute,15],[ga.minute,30],[ga.hour,1],[ga.hour,3],[ga.hour,6],[ga.hour,12],[ga.day,1],[ga.day,2],[ga.week,1],[ga.month,1],[ga.month,3],[ga.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return ao.range(Math.ceil(n/e)*e,+t,e).map(io)},floor:m,ceil:m};Ql.year=ga.year,ga.scale=function(){return ro(ao.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=ga.year.utc,ga.scale.utc=function(){return ro(ao.scale.linear(),ec,rc)},ao.text=An(function(n){return n.responseText}),ao.json=function(n,t){return Cn(n,"application/json",uo,t)},ao.html=function(n,t){return Cn(n,"text/html",oo,t)},ao.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=ao,define(ao)):"object"==typeof module&&module.exports?module.exports=ao:this.d3=ao}();PKs[O}'';Report/Html/Renderer/Template/coverage_bar_branch.html.distnu[
{{percent}}% covered ({{level}})
PKs[Ն1Report/Html/Renderer/Template/directory.html.distnu[ Code Coverage for {{full_path}}
{{items}}
 
Code Coverage
 
Lines
Functions and Methods
Classes and Traits

Legend

Low: 0% to {{low_upper_bound}}% Medium: {{low_upper_bound}}% to {{high_lower_bound}}% High: {{high_lower_bound}}% to 100%

Generated by php-code-coverage {{version}} using {{runtime}}{{generator}} at {{date}}.

PKs[㉞ 3Report/Html/Renderer/Template/file_branch.html.distnu[ Code Coverage for {{full_path}}
{{items}}
 
Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
{{lines}} {{structure}}
PKs[dsAA6Report/Html/Renderer/Template/directory_item.html.distnu[ {{icon}}{{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
{{methods_bar}}
{{methods_tested_percent}}
{{methods_number}}
{{classes_bar}}
{{classes_tested_percent}}
{{classes_number}}
PKs[Z6Report/Html/Renderer/Template/icons/file-directory.svgnu[PKs[QUU001Report/Html/Renderer/Template/icons/file-code.svgnu[PKs[yĎk:Report/Html/Renderer/Template/method_item_branch.html.distnu[ {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
{{branches_bar}}
{{branches_executed_percent}}
{{branches_number}}
{{paths_bar}}
{{paths_executed_percent}}
{{paths_number}}
{{methods_bar}}
{{methods_tested_percent}}
{{methods_number}}
{{crap}} PKs[j*P P ,Report/Html/Renderer/Template/file.html.distnu[ Code Coverage for {{full_path}}
{{items}}
 
Code Coverage
 
Lines
Functions and Methods
Classes and Traits
{{lines}} {{structure}}
PKs[df ee-Report/Html/Renderer/Template/lines.html.distnu[ {{lines}}
PKs[j׫3Report/Html/Renderer/Template/method_item.html.distnu[ {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
{{methods_bar}}
{{methods_tested_percent}}
{{methods_number}}
{{crap}} PKs[-ll8Report/Html/Renderer/Template/file_item_branch.html.distnu[ {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
{{branches_bar}}
{{branches_executed_percent}}
{{branches_number}}
{{paths_bar}}
{{paths_executed_percent}}
{{paths_number}}
{{methods_bar}}
{{methods_tested_percent}}
{{methods_number}}
{{crap}} {{classes_bar}}
{{classes_tested_percent}}
{{classes_number}}
PKs[h2+0Report/Html/Renderer/Template/branches.html.distnu[

Branches

Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once. Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement always has an else as part of its logical flow even if you didn't write one.

{{branches}} PKs[o"Report/Html/Renderer/Directory.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Html; use function count; use function sprintf; use function str_repeat; use SebastianBergmann\CodeCoverage\FileCouldNotBeWrittenException; use SebastianBergmann\CodeCoverage\Node\AbstractNode as Node; use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; use SebastianBergmann\Template\Exception; use SebastianBergmann\Template\Template; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Directory extends Renderer { public function render(DirectoryNode $node, string $file): void { $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'directory_branch.html' : 'directory.html'); $template = new Template($templateName, '{{', '}}'); $this->setCommonTemplateVariables($template, $node); $items = $this->renderItem($node, true); foreach ($node->directories() as $item) { $items .= $this->renderItem($item); } foreach ($node->files() as $item) { $items .= $this->renderItem($item); } $template->setVar( [ 'id' => $node->id(), 'items' => $items, ] ); try { $template->renderTo($file); } catch (Exception $e) { throw new FileCouldNotBeWrittenException( $e->getMessage(), $e->getCode(), $e ); } } private function renderItem(Node $node, bool $total = false): string { $data = [ 'numClasses' => $node->numberOfClassesAndTraits(), 'numTestedClasses' => $node->numberOfTestedClassesAndTraits(), 'numMethods' => $node->numberOfFunctionsAndMethods(), 'numTestedMethods' => $node->numberOfTestedFunctionsAndMethods(), 'linesExecutedPercent' => $node->percentageOfExecutedLines()->asFloat(), 'linesExecutedPercentAsString' => $node->percentageOfExecutedLines()->asString(), 'numExecutedLines' => $node->numberOfExecutedLines(), 'numExecutableLines' => $node->numberOfExecutableLines(), 'branchesExecutedPercent' => $node->percentageOfExecutedBranches()->asFloat(), 'branchesExecutedPercentAsString' => $node->percentageOfExecutedBranches()->asString(), 'numExecutedBranches' => $node->numberOfExecutedBranches(), 'numExecutableBranches' => $node->numberOfExecutableBranches(), 'pathsExecutedPercent' => $node->percentageOfExecutedPaths()->asFloat(), 'pathsExecutedPercentAsString' => $node->percentageOfExecutedPaths()->asString(), 'numExecutedPaths' => $node->numberOfExecutedPaths(), 'numExecutablePaths' => $node->numberOfExecutablePaths(), 'testedMethodsPercent' => $node->percentageOfTestedFunctionsAndMethods()->asFloat(), 'testedMethodsPercentAsString' => $node->percentageOfTestedFunctionsAndMethods()->asString(), 'testedClassesPercent' => $node->percentageOfTestedClassesAndTraits()->asFloat(), 'testedClassesPercentAsString' => $node->percentageOfTestedClassesAndTraits()->asString(), ]; if ($total) { $data['name'] = 'Total'; } else { $up = str_repeat('../', count($node->pathAsArray()) - 2); $data['icon'] = sprintf('', $up); if ($node instanceof DirectoryNode) { $data['name'] = sprintf( '%s', $node->name(), $node->name() ); $data['icon'] = sprintf('', $up); } elseif ($this->hasBranchCoverage) { $data['name'] = sprintf( '%s [line] [branch] [path]', $node->name(), $node->name(), $node->name(), $node->name() ); } else { $data['name'] = sprintf( '%s', $node->name(), $node->name() ); } } $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'directory_item_branch.html' : 'directory_item.html'); return $this->renderItemTemplate( new Template($templateName, '{{', '}}'), $data ); } } PKs[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Html; use const ENT_COMPAT; use const ENT_HTML401; use const ENT_SUBSTITUTE; use const T_ABSTRACT; use const T_ARRAY; use const T_AS; use const T_BREAK; use const T_CALLABLE; use const T_CASE; use const T_CATCH; use const T_CLASS; use const T_CLONE; use const T_COMMENT; use const T_CONST; use const T_CONTINUE; use const T_DECLARE; use const T_DEFAULT; use const T_DO; use const T_DOC_COMMENT; use const T_ECHO; use const T_ELSE; use const T_ELSEIF; use const T_EMPTY; use const T_ENDDECLARE; use const T_ENDFOR; use const T_ENDFOREACH; use const T_ENDIF; use const T_ENDSWITCH; use const T_ENDWHILE; use const T_EVAL; use const T_EXIT; use const T_EXTENDS; use const T_FINAL; use const T_FINALLY; use const T_FOR; use const T_FOREACH; use const T_FUNCTION; use const T_GLOBAL; use const T_GOTO; use const T_HALT_COMPILER; use const T_IF; use const T_IMPLEMENTS; use const T_INCLUDE; use const T_INCLUDE_ONCE; use const T_INLINE_HTML; use const T_INSTANCEOF; use const T_INSTEADOF; use const T_INTERFACE; use const T_ISSET; use const T_LIST; use const T_NAMESPACE; use const T_NEW; use const T_PRINT; use const T_PRIVATE; use const T_PROTECTED; use const T_PUBLIC; use const T_REQUIRE; use const T_REQUIRE_ONCE; use const T_RETURN; use const T_STATIC; use const T_SWITCH; use const T_THROW; use const T_TRAIT; use const T_TRY; use const T_UNSET; use const T_USE; use const T_VAR; use const T_WHILE; use const T_YIELD; use const T_YIELD_FROM; use function array_key_exists; use function array_keys; use function array_merge; use function array_pop; use function array_unique; use function count; use function explode; use function file_get_contents; use function htmlspecialchars; use function is_string; use function ksort; use function range; use function sort; use function sprintf; use function str_ends_with; use function str_replace; use function token_get_all; use function trim; use SebastianBergmann\CodeCoverage\FileCouldNotBeWrittenException; use SebastianBergmann\CodeCoverage\Node\File as FileNode; use SebastianBergmann\CodeCoverage\Util\Percentage; use SebastianBergmann\Template\Exception; use SebastianBergmann\Template\Template; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class File extends Renderer { /** * @psalm-var array */ private const KEYWORD_TOKENS = [ T_ABSTRACT => true, T_ARRAY => true, T_AS => true, T_BREAK => true, T_CALLABLE => true, T_CASE => true, T_CATCH => true, T_CLASS => true, T_CLONE => true, T_CONST => true, T_CONTINUE => true, T_DECLARE => true, T_DEFAULT => true, T_DO => true, T_ECHO => true, T_ELSE => true, T_ELSEIF => true, T_EMPTY => true, T_ENDDECLARE => true, T_ENDFOR => true, T_ENDFOREACH => true, T_ENDIF => true, T_ENDSWITCH => true, T_ENDWHILE => true, T_ENUM => true, T_EVAL => true, T_EXIT => true, T_EXTENDS => true, T_FINAL => true, T_FINALLY => true, T_FN => true, T_FOR => true, T_FOREACH => true, T_FUNCTION => true, T_GLOBAL => true, T_GOTO => true, T_HALT_COMPILER => true, T_IF => true, T_IMPLEMENTS => true, T_INCLUDE => true, T_INCLUDE_ONCE => true, T_INSTANCEOF => true, T_INSTEADOF => true, T_INTERFACE => true, T_ISSET => true, T_LIST => true, T_MATCH => true, T_NAMESPACE => true, T_NEW => true, T_PRINT => true, T_PRIVATE => true, T_PROTECTED => true, T_PUBLIC => true, T_READONLY => true, T_REQUIRE => true, T_REQUIRE_ONCE => true, T_RETURN => true, T_STATIC => true, T_SWITCH => true, T_THROW => true, T_TRAIT => true, T_TRY => true, T_UNSET => true, T_USE => true, T_VAR => true, T_WHILE => true, T_YIELD => true, T_YIELD_FROM => true, ]; private static array $formattedSourceCache = []; private int $htmlSpecialCharsFlags = ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE; public function render(FileNode $node, string $file): void { $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'file_branch.html' : 'file.html'); $template = new Template($templateName, '{{', '}}'); $this->setCommonTemplateVariables($template, $node); $template->setVar( [ 'items' => $this->renderItems($node), 'lines' => $this->renderSourceWithLineCoverage($node), 'legend' => '

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

', 'structure' => '', ] ); try { $template->renderTo($file . '.html'); } catch (Exception $e) { throw new FileCouldNotBeWrittenException( $e->getMessage(), $e->getCode(), $e ); } if ($this->hasBranchCoverage) { $template->setVar( [ 'items' => $this->renderItems($node), 'lines' => $this->renderSourceWithBranchCoverage($node), 'legend' => '

Fully coveredPartially coveredNot covered

', 'structure' => $this->renderBranchStructure($node), ] ); try { $template->renderTo($file . '_branch.html'); } catch (Exception $e) { throw new FileCouldNotBeWrittenException( $e->getMessage(), $e->getCode(), $e ); } $template->setVar( [ 'items' => $this->renderItems($node), 'lines' => $this->renderSourceWithPathCoverage($node), 'legend' => '

Fully coveredPartially coveredNot covered

', 'structure' => $this->renderPathStructure($node), ] ); try { $template->renderTo($file . '_path.html'); } catch (Exception $e) { throw new FileCouldNotBeWrittenException( $e->getMessage(), $e->getCode(), $e ); } } } private function renderItems(FileNode $node): string { $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'file_item_branch.html' : 'file_item.html'); $template = new Template($templateName, '{{', '}}'); $methodTemplateName = $this->templatePath . ($this->hasBranchCoverage ? 'method_item_branch.html' : 'method_item.html'); $methodItemTemplate = new Template( $methodTemplateName, '{{', '}}' ); $items = $this->renderItemTemplate( $template, [ 'name' => 'Total', 'numClasses' => $node->numberOfClassesAndTraits(), 'numTestedClasses' => $node->numberOfTestedClassesAndTraits(), 'numMethods' => $node->numberOfFunctionsAndMethods(), 'numTestedMethods' => $node->numberOfTestedFunctionsAndMethods(), 'linesExecutedPercent' => $node->percentageOfExecutedLines()->asFloat(), 'linesExecutedPercentAsString' => $node->percentageOfExecutedLines()->asString(), 'numExecutedLines' => $node->numberOfExecutedLines(), 'numExecutableLines' => $node->numberOfExecutableLines(), 'branchesExecutedPercent' => $node->percentageOfExecutedBranches()->asFloat(), 'branchesExecutedPercentAsString' => $node->percentageOfExecutedBranches()->asString(), 'numExecutedBranches' => $node->numberOfExecutedBranches(), 'numExecutableBranches' => $node->numberOfExecutableBranches(), 'pathsExecutedPercent' => $node->percentageOfExecutedPaths()->asFloat(), 'pathsExecutedPercentAsString' => $node->percentageOfExecutedPaths()->asString(), 'numExecutedPaths' => $node->numberOfExecutedPaths(), 'numExecutablePaths' => $node->numberOfExecutablePaths(), 'testedMethodsPercent' => $node->percentageOfTestedFunctionsAndMethods()->asFloat(), 'testedMethodsPercentAsString' => $node->percentageOfTestedFunctionsAndMethods()->asString(), 'testedClassesPercent' => $node->percentageOfTestedClassesAndTraits()->asFloat(), 'testedClassesPercentAsString' => $node->percentageOfTestedClassesAndTraits()->asString(), 'crap' => 'CRAP', ] ); $items .= $this->renderFunctionItems( $node->functions(), $methodItemTemplate ); $items .= $this->renderTraitOrClassItems( $node->traits(), $template, $methodItemTemplate ); $items .= $this->renderTraitOrClassItems( $node->classes(), $template, $methodItemTemplate ); return $items; } private function renderTraitOrClassItems(array $items, Template $template, Template $methodItemTemplate): string { $buffer = ''; if (empty($items)) { return $buffer; } foreach ($items as $name => $item) { $numMethods = 0; $numTestedMethods = 0; foreach ($item['methods'] as $method) { if ($method['executableLines'] > 0) { $numMethods++; if ($method['executedLines'] === $method['executableLines']) { $numTestedMethods++; } } } if ($item['executableLines'] > 0) { $numClasses = 1; $numTestedClasses = $numTestedMethods === $numMethods ? 1 : 0; $linesExecutedPercentAsString = Percentage::fromFractionAndTotal( $item['executedLines'], $item['executableLines'] )->asString(); $branchesExecutedPercentAsString = Percentage::fromFractionAndTotal( $item['executedBranches'], $item['executableBranches'] )->asString(); $pathsExecutedPercentAsString = Percentage::fromFractionAndTotal( $item['executedPaths'], $item['executablePaths'] )->asString(); } else { $numClasses = 0; $numTestedClasses = 0; $linesExecutedPercentAsString = 'n/a'; $branchesExecutedPercentAsString = 'n/a'; $pathsExecutedPercentAsString = 'n/a'; } $testedMethodsPercentage = Percentage::fromFractionAndTotal( $numTestedMethods, $numMethods ); $testedClassesPercentage = Percentage::fromFractionAndTotal( $numTestedMethods === $numMethods ? 1 : 0, 1 ); $buffer .= $this->renderItemTemplate( $template, [ 'name' => $this->abbreviateClassName($name), 'numClasses' => $numClasses, 'numTestedClasses' => $numTestedClasses, 'numMethods' => $numMethods, 'numTestedMethods' => $numTestedMethods, 'linesExecutedPercent' => Percentage::fromFractionAndTotal( $item['executedLines'], $item['executableLines'], )->asFloat(), 'linesExecutedPercentAsString' => $linesExecutedPercentAsString, 'numExecutedLines' => $item['executedLines'], 'numExecutableLines' => $item['executableLines'], 'branchesExecutedPercent' => Percentage::fromFractionAndTotal( $item['executedBranches'], $item['executableBranches'], )->asFloat(), 'branchesExecutedPercentAsString' => $branchesExecutedPercentAsString, 'numExecutedBranches' => $item['executedBranches'], 'numExecutableBranches' => $item['executableBranches'], 'pathsExecutedPercent' => Percentage::fromFractionAndTotal( $item['executedPaths'], $item['executablePaths'] )->asFloat(), 'pathsExecutedPercentAsString' => $pathsExecutedPercentAsString, 'numExecutedPaths' => $item['executedPaths'], 'numExecutablePaths' => $item['executablePaths'], 'testedMethodsPercent' => $testedMethodsPercentage->asFloat(), 'testedMethodsPercentAsString' => $testedMethodsPercentage->asString(), 'testedClassesPercent' => $testedClassesPercentage->asFloat(), 'testedClassesPercentAsString' => $testedClassesPercentage->asString(), 'crap' => $item['crap'], ] ); foreach ($item['methods'] as $method) { $buffer .= $this->renderFunctionOrMethodItem( $methodItemTemplate, $method, ' ' ); } } return $buffer; } private function renderFunctionItems(array $functions, Template $template): string { if (empty($functions)) { return ''; } $buffer = ''; foreach ($functions as $function) { $buffer .= $this->renderFunctionOrMethodItem( $template, $function ); } return $buffer; } private function renderFunctionOrMethodItem(Template $template, array $item, string $indent = ''): string { $numMethods = 0; $numTestedMethods = 0; if ($item['executableLines'] > 0) { $numMethods = 1; if ($item['executedLines'] === $item['executableLines']) { $numTestedMethods = 1; } } $executedLinesPercentage = Percentage::fromFractionAndTotal( $item['executedLines'], $item['executableLines'] ); $executedBranchesPercentage = Percentage::fromFractionAndTotal( $item['executedBranches'], $item['executableBranches'] ); $executedPathsPercentage = Percentage::fromFractionAndTotal( $item['executedPaths'], $item['executablePaths'] ); $testedMethodsPercentage = Percentage::fromFractionAndTotal( $numTestedMethods, 1 ); return $this->renderItemTemplate( $template, [ 'name' => sprintf( '%s%s', $indent, $item['startLine'], htmlspecialchars($item['signature'], $this->htmlSpecialCharsFlags), $item['functionName'] ?? $item['methodName'] ), 'numMethods' => $numMethods, 'numTestedMethods' => $numTestedMethods, 'linesExecutedPercent' => $executedLinesPercentage->asFloat(), 'linesExecutedPercentAsString' => $executedLinesPercentage->asString(), 'numExecutedLines' => $item['executedLines'], 'numExecutableLines' => $item['executableLines'], 'branchesExecutedPercent' => $executedBranchesPercentage->asFloat(), 'branchesExecutedPercentAsString' => $executedBranchesPercentage->asString(), 'numExecutedBranches' => $item['executedBranches'], 'numExecutableBranches' => $item['executableBranches'], 'pathsExecutedPercent' => $executedPathsPercentage->asFloat(), 'pathsExecutedPercentAsString' => $executedPathsPercentage->asString(), 'numExecutedPaths' => $item['executedPaths'], 'numExecutablePaths' => $item['executablePaths'], 'testedMethodsPercent' => $testedMethodsPercentage->asFloat(), 'testedMethodsPercentAsString' => $testedMethodsPercentage->asString(), 'crap' => $item['crap'], ] ); } private function renderSourceWithLineCoverage(FileNode $node): string { $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); $coverageData = $node->lineCoverageData(); $testData = $node->testData(); $codeLines = $this->loadFile($node->pathAsString()); $lines = ''; $i = 1; foreach ($codeLines as $line) { $trClass = ''; $popoverContent = ''; $popoverTitle = ''; if (array_key_exists($i, $coverageData)) { $numTests = ($coverageData[$i] ? count($coverageData[$i]) : 0); if ($coverageData[$i] === null) { $trClass = 'warning'; } elseif ($numTests === 0) { $trClass = 'danger'; } else { if ($numTests > 1) { $popoverTitle = $numTests . ' tests cover line ' . $i; } else { $popoverTitle = '1 test covers line ' . $i; } $lineCss = 'covered-by-large-tests'; $popoverContent = '
    '; foreach ($coverageData[$i] as $test) { if ($lineCss === 'covered-by-large-tests' && $testData[$test]['size'] === 'medium') { $lineCss = 'covered-by-medium-tests'; } elseif ($testData[$test]['size'] === 'small') { $lineCss = 'covered-by-small-tests'; } $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); } $popoverContent .= '
'; $trClass = $lineCss . ' popin'; } } $popover = ''; if (!empty($popoverTitle)) { $popover = sprintf( ' data-title="%s" data-content="%s" data-placement="top" data-html="true"', $popoverTitle, htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) ); } $lines .= $this->renderLine($singleLineTemplate, $i, $line, $trClass, $popover); $i++; } $linesTemplate->setVar(['lines' => $lines]); return $linesTemplate->render(); } private function renderSourceWithBranchCoverage(FileNode $node): string { $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); $functionCoverageData = $node->functionCoverageData(); $testData = $node->testData(); $codeLines = $this->loadFile($node->pathAsString()); $lineData = []; /** @var int $line */ foreach (array_keys($codeLines) as $line) { $lineData[$line + 1] = [ 'includedInBranches' => 0, 'includedInHitBranches' => 0, 'tests' => [], ]; } foreach ($functionCoverageData as $method) { foreach ($method['branches'] as $branch) { foreach (range($branch['line_start'], $branch['line_end']) as $line) { if (!isset($lineData[$line])) { // blank line at end of file is sometimes included here continue; } $lineData[$line]['includedInBranches']++; if ($branch['hit']) { $lineData[$line]['includedInHitBranches']++; $lineData[$line]['tests'] = array_unique(array_merge($lineData[$line]['tests'], $branch['hit'])); } } } } $lines = ''; $i = 1; /** @var string $line */ foreach ($codeLines as $line) { $trClass = ''; $popover = ''; if ($lineData[$i]['includedInBranches'] > 0) { $lineCss = 'success'; if ($lineData[$i]['includedInHitBranches'] === 0) { $lineCss = 'danger'; } elseif ($lineData[$i]['includedInHitBranches'] !== $lineData[$i]['includedInBranches']) { $lineCss = 'warning'; } $popoverContent = '
    '; if (count($lineData[$i]['tests']) === 1) { $popoverTitle = '1 test covers line ' . $i; } else { $popoverTitle = count($lineData[$i]['tests']) . ' tests cover line ' . $i; } $popoverTitle .= '. These are covering ' . $lineData[$i]['includedInHitBranches'] . ' out of the ' . $lineData[$i]['includedInBranches'] . ' code branches.'; foreach ($lineData[$i]['tests'] as $test) { $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); } $popoverContent .= '
'; $trClass = $lineCss . ' popin'; $popover = sprintf( ' data-title="%s" data-content="%s" data-placement="top" data-html="true"', $popoverTitle, htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) ); } $lines .= $this->renderLine($singleLineTemplate, $i, $line, $trClass, $popover); $i++; } $linesTemplate->setVar(['lines' => $lines]); return $linesTemplate->render(); } private function renderSourceWithPathCoverage(FileNode $node): string { $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); $functionCoverageData = $node->functionCoverageData(); $testData = $node->testData(); $codeLines = $this->loadFile($node->pathAsString()); $lineData = []; /** @var int $line */ foreach (array_keys($codeLines) as $line) { $lineData[$line + 1] = [ 'includedInPaths' => [], 'includedInHitPaths' => [], 'tests' => [], ]; } foreach ($functionCoverageData as $method) { foreach ($method['paths'] as $pathId => $path) { foreach ($path['path'] as $branchTaken) { foreach (range($method['branches'][$branchTaken]['line_start'], $method['branches'][$branchTaken]['line_end']) as $line) { if (!isset($lineData[$line])) { continue; } $lineData[$line]['includedInPaths'][] = $pathId; if ($path['hit']) { $lineData[$line]['includedInHitPaths'][] = $pathId; $lineData[$line]['tests'] = array_unique(array_merge($lineData[$line]['tests'], $path['hit'])); } } } } } $lines = ''; $i = 1; /** @var string $line */ foreach ($codeLines as $line) { $trClass = ''; $popover = ''; $includedInPathsCount = count(array_unique($lineData[$i]['includedInPaths'])); $includedInHitPathsCount = count(array_unique($lineData[$i]['includedInHitPaths'])); if ($includedInPathsCount > 0) { $lineCss = 'success'; if ($includedInHitPathsCount === 0) { $lineCss = 'danger'; } elseif ($includedInHitPathsCount !== $includedInPathsCount) { $lineCss = 'warning'; } $popoverContent = '
    '; if (count($lineData[$i]['tests']) === 1) { $popoverTitle = '1 test covers line ' . $i; } else { $popoverTitle = count($lineData[$i]['tests']) . ' tests cover line ' . $i; } $popoverTitle .= '. These are covering ' . $includedInHitPathsCount . ' out of the ' . $includedInPathsCount . ' code paths.'; foreach ($lineData[$i]['tests'] as $test) { $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); } $popoverContent .= '
'; $trClass = $lineCss . ' popin'; $popover = sprintf( ' data-title="%s" data-content="%s" data-placement="top" data-html="true"', $popoverTitle, htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) ); } $lines .= $this->renderLine($singleLineTemplate, $i, $line, $trClass, $popover); $i++; } $linesTemplate->setVar(['lines' => $lines]); return $linesTemplate->render(); } private function renderBranchStructure(FileNode $node): string { $branchesTemplate = new Template($this->templatePath . 'branches.html.dist', '{{', '}}'); $coverageData = $node->functionCoverageData(); $testData = $node->testData(); $codeLines = $this->loadFile($node->pathAsString()); $branches = ''; ksort($coverageData); foreach ($coverageData as $methodName => $methodData) { if (!$methodData['branches']) { continue; } $branchStructure = ''; foreach ($methodData['branches'] as $branch) { $branchStructure .= $this->renderBranchLines($branch, $codeLines, $testData); } if ($branchStructure !== '') { // don't show empty branches $branches .= '
' . $this->abbreviateMethodName($methodName) . '
' . "\n"; $branches .= $branchStructure; } } $branchesTemplate->setVar(['branches' => $branches]); return $branchesTemplate->render(); } private function renderBranchLines(array $branch, array $codeLines, array $testData): string { $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); $lines = ''; $branchLines = range($branch['line_start'], $branch['line_end']); sort($branchLines); // sometimes end_line < start_line /** @var int $line */ foreach ($branchLines as $line) { if (!isset($codeLines[$line])) { // blank line at end of file is sometimes included here continue; } $popoverContent = ''; $popoverTitle = ''; $numTests = count($branch['hit']); if ($numTests === 0) { $trClass = 'danger'; } else { $lineCss = 'covered-by-large-tests'; $popoverContent = '
    '; if ($numTests > 1) { $popoverTitle = $numTests . ' tests cover this branch'; } else { $popoverTitle = '1 test covers this branch'; } foreach ($branch['hit'] as $test) { if ($lineCss === 'covered-by-large-tests' && $testData[$test]['size'] === 'medium') { $lineCss = 'covered-by-medium-tests'; } elseif ($testData[$test]['size'] === 'small') { $lineCss = 'covered-by-small-tests'; } $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); } $trClass = $lineCss . ' popin'; } $popover = ''; if (!empty($popoverTitle)) { $popover = sprintf( ' data-title="%s" data-content="%s" data-placement="top" data-html="true"', $popoverTitle, htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) ); } $lines .= $this->renderLine($singleLineTemplate, $line, $codeLines[$line - 1], $trClass, $popover); } if ($lines === '') { return ''; } $linesTemplate->setVar(['lines' => $lines]); return $linesTemplate->render(); } private function renderPathStructure(FileNode $node): string { $pathsTemplate = new Template($this->templatePath . 'paths.html.dist', '{{', '}}'); $coverageData = $node->functionCoverageData(); $testData = $node->testData(); $codeLines = $this->loadFile($node->pathAsString()); $paths = ''; ksort($coverageData); foreach ($coverageData as $methodName => $methodData) { if (!$methodData['paths']) { continue; } $pathStructure = ''; if (count($methodData['paths']) > 100) { $pathStructure .= '

    ' . count($methodData['paths']) . ' is too many paths to sensibly render, consider refactoring your code to bring this number down.

    '; continue; } foreach ($methodData['paths'] as $path) { $pathStructure .= $this->renderPathLines($path, $methodData['branches'], $codeLines, $testData); } if ($pathStructure !== '') { $paths .= '
    ' . $this->abbreviateMethodName($methodName) . '
    ' . "\n"; $paths .= $pathStructure; } } $pathsTemplate->setVar(['paths' => $paths]); return $pathsTemplate->render(); } private function renderPathLines(array $path, array $branches, array $codeLines, array $testData): string { $linesTemplate = new Template($this->templatePath . 'lines.html.dist', '{{', '}}'); $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); $lines = ''; $first = true; foreach ($path['path'] as $branchId) { if ($first) { $first = false; } else { $lines .= '  ' . "\n"; } $branchLines = range($branches[$branchId]['line_start'], $branches[$branchId]['line_end']); sort($branchLines); // sometimes end_line < start_line /** @var int $line */ foreach ($branchLines as $line) { if (!isset($codeLines[$line])) { // blank line at end of file is sometimes included here continue; } $popoverContent = ''; $popoverTitle = ''; $numTests = count($path['hit']); if ($numTests === 0) { $trClass = 'danger'; } else { $lineCss = 'covered-by-large-tests'; $popoverContent = '
      '; if ($numTests > 1) { $popoverTitle = $numTests . ' tests cover this path'; } else { $popoverTitle = '1 test covers this path'; } foreach ($path['hit'] as $test) { if ($lineCss === 'covered-by-large-tests' && $testData[$test]['size'] === 'medium') { $lineCss = 'covered-by-medium-tests'; } elseif ($testData[$test]['size'] === 'small') { $lineCss = 'covered-by-small-tests'; } $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); } $trClass = $lineCss . ' popin'; } $popover = ''; if (!empty($popoverTitle)) { $popover = sprintf( ' data-title="%s" data-content="%s" data-placement="top" data-html="true"', $popoverTitle, htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) ); } $lines .= $this->renderLine($singleLineTemplate, $line, $codeLines[$line - 1], $trClass, $popover); } } if ($lines === '') { return ''; } $linesTemplate->setVar(['lines' => $lines]); return $linesTemplate->render(); } private function renderLine(Template $template, int $lineNumber, string $lineContent, string $class, string $popover): string { $template->setVar( [ 'lineNumber' => $lineNumber, 'lineContent' => $lineContent, 'class' => $class, 'popover' => $popover, ] ); return $template->render(); } private function loadFile(string $file): array { if (isset(self::$formattedSourceCache[$file])) { return self::$formattedSourceCache[$file]; } $buffer = file_get_contents($file); $tokens = token_get_all($buffer); $result = ['']; $i = 0; $stringFlag = false; $fileEndsWithNewLine = str_ends_with($buffer, "\n"); unset($buffer); foreach ($tokens as $j => $token) { if (is_string($token)) { if ($token === '"' && $tokens[$j - 1] !== '\\') { $result[$i] .= sprintf( '%s', htmlspecialchars($token, $this->htmlSpecialCharsFlags) ); $stringFlag = !$stringFlag; } else { $result[$i] .= sprintf( '%s', htmlspecialchars($token, $this->htmlSpecialCharsFlags) ); } continue; } [$token, $value] = $token; $value = str_replace( ["\t", ' '], ['    ', ' '], htmlspecialchars($value, $this->htmlSpecialCharsFlags) ); if ($value === "\n") { $result[++$i] = ''; } else { $lines = explode("\n", $value); foreach ($lines as $jj => $line) { $line = trim($line); if ($line !== '') { if ($stringFlag) { $colour = 'string'; } else { $colour = 'default'; if ($this->isInlineHtml($token)) { $colour = 'html'; } elseif ($this->isComment($token)) { $colour = 'comment'; } elseif ($this->isKeyword($token)) { $colour = 'keyword'; } } $result[$i] .= sprintf( '%s', $colour, $line ); } if (isset($lines[$jj + 1])) { $result[++$i] = ''; } } } } if ($fileEndsWithNewLine) { unset($result[count($result) - 1]); } self::$formattedSourceCache[$file] = $result; return $result; } private function abbreviateClassName(string $className): string { $tmp = explode('\\', $className); if (count($tmp) > 1) { $className = sprintf( '%s', $className, array_pop($tmp) ); } return $className; } private function abbreviateMethodName(string $methodName): string { $parts = explode('->', $methodName); if (count($parts) === 2) { return $this->abbreviateClassName($parts[0]) . '->' . $parts[1]; } return $methodName; } private function createPopoverContentForTest(string $test, array $testData): string { $testCSS = ''; switch ($testData['status']) { case 'success': $testCSS = match ($testData['size']) { 'small' => ' class="covered-by-small-tests"', 'medium' => ' class="covered-by-medium-tests"', // no break default => ' class="covered-by-large-tests"', }; break; case 'failure': $testCSS = ' class="danger"'; break; } return sprintf( '%s', $testCSS, htmlspecialchars($test, $this->htmlSpecialCharsFlags) ); } private function isComment(int $token): bool { return $token === T_COMMENT || $token === T_DOC_COMMENT; } private function isInlineHtml(int $token): bool { return $token === T_INLINE_HTML; } private function isKeyword(int $token): bool { return isset(self::KEYWORD_TOKENS[$token]); } } PKs[Q''Report/Html/Renderer.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Html; use function array_pop; use function count; use function sprintf; use function str_repeat; use function substr_count; use SebastianBergmann\CodeCoverage\Node\AbstractNode; use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; use SebastianBergmann\CodeCoverage\Node\File as FileNode; use SebastianBergmann\CodeCoverage\Report\Thresholds; use SebastianBergmann\CodeCoverage\Version; use SebastianBergmann\Environment\Runtime; use SebastianBergmann\Template\Template; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ abstract class Renderer { protected string $templatePath; protected string $generator; protected string $date; protected Thresholds $thresholds; protected bool $hasBranchCoverage; protected string $version; public function __construct(string $templatePath, string $generator, string $date, Thresholds $thresholds, bool $hasBranchCoverage) { $this->templatePath = $templatePath; $this->generator = $generator; $this->date = $date; $this->thresholds = $thresholds; $this->version = Version::id(); $this->hasBranchCoverage = $hasBranchCoverage; } protected function renderItemTemplate(Template $template, array $data): string { $numSeparator = ' / '; if (isset($data['numClasses']) && $data['numClasses'] > 0) { $classesLevel = $this->colorLevel($data['testedClassesPercent']); $classesNumber = $data['numTestedClasses'] . $numSeparator . $data['numClasses']; $classesBar = $this->coverageBar( $data['testedClassesPercent'] ); } else { $classesLevel = ''; $classesNumber = '0' . $numSeparator . '0'; $classesBar = ''; $data['testedClassesPercentAsString'] = 'n/a'; } if ($data['numMethods'] > 0) { $methodsLevel = $this->colorLevel($data['testedMethodsPercent']); $methodsNumber = $data['numTestedMethods'] . $numSeparator . $data['numMethods']; $methodsBar = $this->coverageBar( $data['testedMethodsPercent'] ); } else { $methodsLevel = ''; $methodsNumber = '0' . $numSeparator . '0'; $methodsBar = ''; $data['testedMethodsPercentAsString'] = 'n/a'; } if ($data['numExecutableLines'] > 0) { $linesLevel = $this->colorLevel($data['linesExecutedPercent']); $linesNumber = $data['numExecutedLines'] . $numSeparator . $data['numExecutableLines']; $linesBar = $this->coverageBar( $data['linesExecutedPercent'] ); } else { $linesLevel = ''; $linesNumber = '0' . $numSeparator . '0'; $linesBar = ''; $data['linesExecutedPercentAsString'] = 'n/a'; } if ($data['numExecutablePaths'] > 0) { $pathsLevel = $this->colorLevel($data['pathsExecutedPercent']); $pathsNumber = $data['numExecutedPaths'] . $numSeparator . $data['numExecutablePaths']; $pathsBar = $this->coverageBar( $data['pathsExecutedPercent'] ); } else { $pathsLevel = ''; $pathsNumber = '0' . $numSeparator . '0'; $pathsBar = ''; $data['pathsExecutedPercentAsString'] = 'n/a'; } if ($data['numExecutableBranches'] > 0) { $branchesLevel = $this->colorLevel($data['branchesExecutedPercent']); $branchesNumber = $data['numExecutedBranches'] . $numSeparator . $data['numExecutableBranches']; $branchesBar = $this->coverageBar( $data['branchesExecutedPercent'] ); } else { $branchesLevel = ''; $branchesNumber = '0' . $numSeparator . '0'; $branchesBar = ''; $data['branchesExecutedPercentAsString'] = 'n/a'; } $template->setVar( [ 'icon' => $data['icon'] ?? '', 'crap' => $data['crap'] ?? '', 'name' => $data['name'], 'lines_bar' => $linesBar, 'lines_executed_percent' => $data['linesExecutedPercentAsString'], 'lines_level' => $linesLevel, 'lines_number' => $linesNumber, 'paths_bar' => $pathsBar, 'paths_executed_percent' => $data['pathsExecutedPercentAsString'], 'paths_level' => $pathsLevel, 'paths_number' => $pathsNumber, 'branches_bar' => $branchesBar, 'branches_executed_percent' => $data['branchesExecutedPercentAsString'], 'branches_level' => $branchesLevel, 'branches_number' => $branchesNumber, 'methods_bar' => $methodsBar, 'methods_tested_percent' => $data['testedMethodsPercentAsString'], 'methods_level' => $methodsLevel, 'methods_number' => $methodsNumber, 'classes_bar' => $classesBar, 'classes_tested_percent' => $data['testedClassesPercentAsString'] ?? '', 'classes_level' => $classesLevel, 'classes_number' => $classesNumber, ] ); return $template->render(); } protected function setCommonTemplateVariables(Template $template, AbstractNode $node): void { $template->setVar( [ 'id' => $node->id(), 'full_path' => $node->pathAsString(), 'path_to_root' => $this->pathToRoot($node), 'breadcrumbs' => $this->breadcrumbs($node), 'date' => $this->date, 'version' => $this->version, 'runtime' => $this->runtimeString(), 'generator' => $this->generator, 'low_upper_bound' => $this->thresholds->lowUpperBound(), 'high_lower_bound' => $this->thresholds->highLowerBound(), ] ); } protected function breadcrumbs(AbstractNode $node): string { $breadcrumbs = ''; $path = $node->pathAsArray(); $pathToRoot = []; $max = count($path); if ($node instanceof FileNode) { $max--; } for ($i = 0; $i < $max; $i++) { $pathToRoot[] = str_repeat('../', $i); } foreach ($path as $step) { if ($step !== $node) { $breadcrumbs .= $this->inactiveBreadcrumb( $step, array_pop($pathToRoot) ); } else { $breadcrumbs .= $this->activeBreadcrumb($step); } } return $breadcrumbs; } protected function activeBreadcrumb(AbstractNode $node): string { $buffer = sprintf( ' ' . "\n", $node->name() ); if ($node instanceof DirectoryNode) { $buffer .= ' ' . "\n"; } return $buffer; } protected function inactiveBreadcrumb(AbstractNode $node, string $pathToRoot): string { return sprintf( ' ' . "\n", $pathToRoot, $node->name() ); } protected function pathToRoot(AbstractNode $node): string { $id = $node->id(); $depth = substr_count($id, '/'); if ($id !== 'index' && $node instanceof DirectoryNode) { $depth++; } return str_repeat('../', $depth); } protected function coverageBar(float $percent): string { $level = $this->colorLevel($percent); $templateName = $this->templatePath . ($this->hasBranchCoverage ? 'coverage_bar_branch.html' : 'coverage_bar.html'); $template = new Template( $templateName, '{{', '}}' ); $template->setVar(['level' => $level, 'percent' => sprintf('%.2F', $percent)]); return $template->render(); } protected function colorLevel(float $percent): string { if ($percent <= $this->thresholds->lowUpperBound()) { return 'danger'; } if ($percent > $this->thresholds->lowUpperBound() && $percent < $this->thresholds->highLowerBound()) { return 'warning'; } return 'success'; } private function runtimeString(): string { $runtime = new Runtime; return sprintf( '%s %s', $runtime->getVendorUrl(), $runtime->getName(), $runtime->getVersion() ); } } PKs['qReport/Html/Colors.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Html; /** * @psalm-immutable */ final class Colors { private readonly string $successLow; private readonly string $successMedium; private readonly string $successHigh; private readonly string $warning; private readonly string $danger; public static function default(): self { return new self('#dff0d8', '#c3e3b5', '#99cb84', '#fcf8e3', '#f2dede'); } public static function from(string $successLow, string $successMedium, string $successHigh, string $warning, string $danger): self { return new self($successLow, $successMedium, $successHigh, $warning, $danger); } private function __construct(string $successLow, string $successMedium, string $successHigh, string $warning, string $danger) { $this->successLow = $successLow; $this->successMedium = $successMedium; $this->successHigh = $successHigh; $this->warning = $warning; $this->danger = $danger; } public function successLow(): string { return $this->successLow; } public function successMedium(): string { return $this->successMedium; } public function successHigh(): string { return $this->successHigh; } public function warning(): string { return $this->warning; } public function danger(): string { return $this->danger; } } PKs[?ں Report/Xml/Project.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use DOMDocument; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Project extends Node { public function __construct(string $directory) { $this->init(); $this->setProjectSourceDirectory($directory); } public function projectSourceDirectory(): string { return $this->contextNode()->getAttribute('source'); } public function buildInformation(): BuildInformation { $buildNode = $this->dom()->getElementsByTagNameNS( 'https://schema.phpunit.de/coverage/1.0', 'build' )->item(0); if (!$buildNode) { $buildNode = $this->dom()->documentElement->appendChild( $this->dom()->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'build' ) ); } return new BuildInformation($buildNode); } public function tests(): Tests { $testsNode = $this->contextNode()->getElementsByTagNameNS( 'https://schema.phpunit.de/coverage/1.0', 'tests' )->item(0); if (!$testsNode) { $testsNode = $this->contextNode()->appendChild( $this->dom()->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'tests' ) ); } return new Tests($testsNode); } public function asDom(): DOMDocument { return $this->dom(); } private function init(): void { $dom = new DOMDocument; $dom->loadXML(''); $this->setContextNode( $dom->getElementsByTagNameNS( 'https://schema.phpunit.de/coverage/1.0', 'project' )->item(0) ); } private function setProjectSourceDirectory(string $name): void { $this->contextNode()->setAttribute('source', $name); } } PKs[ǹ>>Report/Xml/Method.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use DOMElement; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Method { private readonly DOMElement $contextNode; public function __construct(DOMElement $context, string $name) { $this->contextNode = $context; $this->setName($name); } public function setSignature(string $signature): void { $this->contextNode->setAttribute('signature', $signature); } public function setLines(string $start, ?string $end = null): void { $this->contextNode->setAttribute('start', $start); if ($end !== null) { $this->contextNode->setAttribute('end', $end); } } public function setTotals(string $executable, string $executed, string $coverage): void { $this->contextNode->setAttribute('executable', $executable); $this->contextNode->setAttribute('executed', $executed); $this->contextNode->setAttribute('coverage', $coverage); } public function setCrap(string $crap): void { $this->contextNode->setAttribute('crap', $crap); } private function setName(string $name): void { $this->contextNode->setAttribute('name', $name); } } PKs[YۑReport/Xml/Node.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use DOMDocument; use DOMElement; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ abstract class Node { private DOMDocument $dom; private DOMElement $contextNode; public function __construct(DOMElement $context) { $this->setContextNode($context); } public function dom(): DOMDocument { return $this->dom; } public function totals(): Totals { $totalsContainer = $this->contextNode()->firstChild; if (!$totalsContainer) { $totalsContainer = $this->contextNode()->appendChild( $this->dom->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'totals' ) ); } return new Totals($totalsContainer); } public function addDirectory(string $name): Directory { $dirNode = $this->dom()->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'directory' ); $dirNode->setAttribute('name', $name); $this->contextNode()->appendChild($dirNode); return new Directory($dirNode); } public function addFile(string $name, string $href): File { $fileNode = $this->dom()->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'file' ); $fileNode->setAttribute('name', $name); $fileNode->setAttribute('href', $href); $this->contextNode()->appendChild($fileNode); return new File($fileNode); } protected function setContextNode(DOMElement $context): void { $this->dom = $context->ownerDocument; $this->contextNode = $context; } protected function contextNode(): DOMElement { return $this->contextNode; } } PKs[ˎ"{ttReport/Xml/Source.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use DOMElement; use TheSeer\Tokenizer\NamespaceUri; use TheSeer\Tokenizer\Tokenizer; use TheSeer\Tokenizer\XMLSerializer; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Source { private readonly DOMElement $context; public function __construct(DOMElement $context) { $this->context = $context; } public function setSourceCode(string $source): void { $context = $this->context; $tokens = (new Tokenizer)->parse($source); $srcDom = (new XMLSerializer(new NamespaceUri($context->namespaceURI)))->toDom($tokens); $context->parentNode->replaceChild( $context->ownerDocument->importNode($srcDom->documentElement, true), $context ); } } PKs[U C#C#Report/Xml/Facade.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use const DIRECTORY_SEPARATOR; use const PHP_EOL; use function count; use function dirname; use function file_get_contents; use function file_put_contents; use function is_array; use function is_dir; use function is_file; use function is_writable; use function libxml_clear_errors; use function libxml_get_errors; use function libxml_use_internal_errors; use function sprintf; use function strlen; use function substr; use DateTimeImmutable; use DOMDocument; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\Driver\PathExistsButIsNotDirectoryException; use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException; use SebastianBergmann\CodeCoverage\Node\AbstractNode; use SebastianBergmann\CodeCoverage\Node\Directory as DirectoryNode; use SebastianBergmann\CodeCoverage\Node\File as FileNode; use SebastianBergmann\CodeCoverage\Util\Filesystem as DirectoryUtil; use SebastianBergmann\CodeCoverage\Version; use SebastianBergmann\CodeCoverage\XmlException; use SebastianBergmann\Environment\Runtime; final class Facade { private string $target; private Project $project; private readonly string $phpUnitVersion; public function __construct(string $version) { $this->phpUnitVersion = $version; } /** * @throws XmlException */ public function process(CodeCoverage $coverage, string $target): void { if (substr($target, -1, 1) !== DIRECTORY_SEPARATOR) { $target .= DIRECTORY_SEPARATOR; } $this->target = $target; $this->initTargetDirectory($target); $report = $coverage->getReport(); $this->project = new Project( $coverage->getReport()->name() ); $this->setBuildInformation(); $this->processTests($coverage->getTests()); $this->processDirectory($report, $this->project); $this->saveDocument($this->project->asDom(), 'index'); } private function setBuildInformation(): void { $buildNode = $this->project->buildInformation(); $buildNode->setRuntimeInformation(new Runtime); $buildNode->setBuildTime(new DateTimeImmutable); $buildNode->setGeneratorVersions($this->phpUnitVersion, Version::id()); } /** * @throws PathExistsButIsNotDirectoryException * @throws WriteOperationFailedException */ private function initTargetDirectory(string $directory): void { if (is_file($directory)) { if (!is_dir($directory)) { throw new PathExistsButIsNotDirectoryException($directory); } if (!is_writable($directory)) { throw new WriteOperationFailedException($directory); } } DirectoryUtil::createDirectory($directory); } /** * @throws XmlException */ private function processDirectory(DirectoryNode $directory, Node $context): void { $directoryName = $directory->name(); if ($this->project->projectSourceDirectory() === $directoryName) { $directoryName = '/'; } $directoryObject = $context->addDirectory($directoryName); $this->setTotals($directory, $directoryObject->totals()); foreach ($directory->directories() as $node) { $this->processDirectory($node, $directoryObject); } foreach ($directory->files() as $node) { $this->processFile($node, $directoryObject); } } /** * @throws XmlException */ private function processFile(FileNode $file, Directory $context): void { $fileObject = $context->addFile( $file->name(), $file->id() . '.xml' ); $this->setTotals($file, $fileObject->totals()); $path = substr( $file->pathAsString(), strlen($this->project->projectSourceDirectory()) ); $fileReport = new Report($path); $this->setTotals($file, $fileReport->totals()); foreach ($file->classesAndTraits() as $unit) { $this->processUnit($unit, $fileReport); } foreach ($file->functions() as $function) { $this->processFunction($function, $fileReport); } foreach ($file->lineCoverageData() as $line => $tests) { if (!is_array($tests) || count($tests) === 0) { continue; } $coverage = $fileReport->lineCoverage((string) $line); foreach ($tests as $test) { $coverage->addTest($test); } $coverage->finalize(); } $fileReport->source()->setSourceCode( file_get_contents($file->pathAsString()) ); $this->saveDocument($fileReport->asDom(), $file->id()); } private function processUnit(array $unit, Report $report): void { if (isset($unit['className'])) { $unitObject = $report->classObject($unit['className']); } else { $unitObject = $report->traitObject($unit['traitName']); } $unitObject->setLines( $unit['startLine'], $unit['executableLines'], $unit['executedLines'] ); $unitObject->setCrap((float) $unit['crap']); $unitObject->setNamespace($unit['namespace']); foreach ($unit['methods'] as $method) { $methodObject = $unitObject->addMethod($method['methodName']); $methodObject->setSignature($method['signature']); $methodObject->setLines((string) $method['startLine'], (string) $method['endLine']); $methodObject->setCrap($method['crap']); $methodObject->setTotals( (string) $method['executableLines'], (string) $method['executedLines'], (string) $method['coverage'] ); } } private function processFunction(array $function, Report $report): void { $functionObject = $report->functionObject($function['functionName']); $functionObject->setSignature($function['signature']); $functionObject->setLines((string) $function['startLine']); $functionObject->setCrap($function['crap']); $functionObject->setTotals((string) $function['executableLines'], (string) $function['executedLines'], (string) $function['coverage']); } private function processTests(array $tests): void { $testsObject = $this->project->tests(); foreach ($tests as $test => $result) { $testsObject->addTest($test, $result); } } private function setTotals(AbstractNode $node, Totals $totals): void { $loc = $node->linesOfCode(); $totals->setNumLines( $loc['linesOfCode'], $loc['commentLinesOfCode'], $loc['nonCommentLinesOfCode'], $node->numberOfExecutableLines(), $node->numberOfExecutedLines() ); $totals->setNumClasses( $node->numberOfClasses(), $node->numberOfTestedClasses() ); $totals->setNumTraits( $node->numberOfTraits(), $node->numberOfTestedTraits() ); $totals->setNumMethods( $node->numberOfMethods(), $node->numberOfTestedMethods() ); $totals->setNumFunctions( $node->numberOfFunctions(), $node->numberOfTestedFunctions() ); } private function targetDirectory(): string { return $this->target; } /** * @throws XmlException */ private function saveDocument(DOMDocument $document, string $name): void { $filename = sprintf('%s/%s.xml', $this->targetDirectory(), $name); $document->formatOutput = true; $document->preserveWhiteSpace = false; $this->initTargetDirectory(dirname($filename)); file_put_contents($filename, $this->documentAsString($document)); } /** * @throws XmlException * * @see https://bugs.php.net/bug.php?id=79191 */ private function documentAsString(DOMDocument $document): string { $xmlErrorHandling = libxml_use_internal_errors(true); $xml = $document->saveXML(); if ($xml === false) { $message = 'Unable to generate the XML'; foreach (libxml_get_errors() as $error) { $message .= PHP_EOL . $error->message; } throw new XmlException($message); } libxml_clear_errors(); libxml_use_internal_errors($xmlErrorHandling); return $xml; } } PKs[Report/Xml/Totals.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use function sprintf; use DOMElement; use DOMNode; use SebastianBergmann\CodeCoverage\Util\Percentage; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Totals { private readonly DOMNode $container; private readonly DOMElement $linesNode; private readonly DOMElement $methodsNode; private readonly DOMElement $functionsNode; private readonly DOMElement $classesNode; private readonly DOMElement $traitsNode; public function __construct(DOMElement $container) { $this->container = $container; $dom = $container->ownerDocument; $this->linesNode = $dom->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'lines' ); $this->methodsNode = $dom->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'methods' ); $this->functionsNode = $dom->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'functions' ); $this->classesNode = $dom->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'classes' ); $this->traitsNode = $dom->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'traits' ); $container->appendChild($this->linesNode); $container->appendChild($this->methodsNode); $container->appendChild($this->functionsNode); $container->appendChild($this->classesNode); $container->appendChild($this->traitsNode); } public function container(): DOMNode { return $this->container; } public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed): void { $this->linesNode->setAttribute('total', (string) $loc); $this->linesNode->setAttribute('comments', (string) $cloc); $this->linesNode->setAttribute('code', (string) $ncloc); $this->linesNode->setAttribute('executable', (string) $executable); $this->linesNode->setAttribute('executed', (string) $executed); $this->linesNode->setAttribute( 'percent', $executable === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($executed, $executable)->asFloat()) ); } public function setNumClasses(int $count, int $tested): void { $this->classesNode->setAttribute('count', (string) $count); $this->classesNode->setAttribute('tested', (string) $tested); $this->classesNode->setAttribute( 'percent', $count === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($tested, $count)->asFloat()) ); } public function setNumTraits(int $count, int $tested): void { $this->traitsNode->setAttribute('count', (string) $count); $this->traitsNode->setAttribute('tested', (string) $tested); $this->traitsNode->setAttribute( 'percent', $count === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($tested, $count)->asFloat()) ); } public function setNumMethods(int $count, int $tested): void { $this->methodsNode->setAttribute('count', (string) $count); $this->methodsNode->setAttribute('tested', (string) $tested); $this->methodsNode->setAttribute( 'percent', $count === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($tested, $count)->asFloat()) ); } public function setNumFunctions(int $count, int $tested): void { $this->functionsNode->setAttribute('count', (string) $count); $this->functionsNode->setAttribute('tested', (string) $tested); $this->functionsNode->setAttribute( 'percent', $count === 0 ? '0' : sprintf('%01.2F', Percentage::fromFractionAndTotal($tested, $count)->asFloat()) ); } } PKs[Report/Xml/Directory.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Directory extends Node { } PKs[ 9k  Report/Xml/File.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use DOMDocument; use DOMElement; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ class File { private readonly DOMDocument $dom; private readonly DOMElement $contextNode; public function __construct(DOMElement $context) { $this->dom = $context->ownerDocument; $this->contextNode = $context; } public function totals(): Totals { $totalsContainer = $this->contextNode->firstChild; if (!$totalsContainer) { $totalsContainer = $this->contextNode->appendChild( $this->dom->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'totals' ) ); } return new Totals($totalsContainer); } public function lineCoverage(string $line): Coverage { $coverage = $this->contextNode->getElementsByTagNameNS( 'https://schema.phpunit.de/coverage/1.0', 'coverage' )->item(0); if (!$coverage) { $coverage = $this->contextNode->appendChild( $this->dom->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'coverage' ) ); } $lineNode = $coverage->appendChild( $this->dom->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'line' ) ); return new Coverage($lineNode, $line); } protected function contextNode(): DOMElement { return $this->contextNode; } protected function dom(): DOMDocument { return $this->dom; } } PKs[-Report/Xml/Tests.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use DOMElement; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * * @psalm-import-type TestType from \SebastianBergmann\CodeCoverage\CodeCoverage */ final class Tests { private readonly DOMElement $contextNode; public function __construct(DOMElement $context) { $this->contextNode = $context; } /** * @param TestType $result */ public function addTest(string $test, array $result): void { $node = $this->contextNode->appendChild( $this->contextNode->ownerDocument->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'test' ) ); $node->setAttribute('name', $test); $node->setAttribute('size', $result['size']); $node->setAttribute('status', $result['status']); } } PKs[pHHReport/Xml/Unit.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use DOMElement; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Unit { private readonly DOMElement $contextNode; public function __construct(DOMElement $context, string $name) { $this->contextNode = $context; $this->setName($name); } public function setLines(int $start, int $executable, int $executed): void { $this->contextNode->setAttribute('start', (string) $start); $this->contextNode->setAttribute('executable', (string) $executable); $this->contextNode->setAttribute('executed', (string) $executed); } public function setCrap(float $crap): void { $this->contextNode->setAttribute('crap', (string) $crap); } public function setNamespace(string $namespace): void { $node = $this->contextNode->getElementsByTagNameNS( 'https://schema.phpunit.de/coverage/1.0', 'namespace' )->item(0); if (!$node) { $node = $this->contextNode->appendChild( $this->contextNode->ownerDocument->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'namespace' ) ); } $node->setAttribute('name', $namespace); } public function addMethod(string $name): Method { $node = $this->contextNode->appendChild( $this->contextNode->ownerDocument->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'method' ) ); return new Method($node, $name); } private function setName(string $name): void { $this->contextNode->setAttribute('name', $name); } } PKs[}4Report/Xml/Coverage.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use DOMElement; use SebastianBergmann\CodeCoverage\ReportAlreadyFinalizedException; use XMLWriter; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Coverage { private readonly XMLWriter $writer; private readonly DOMElement $contextNode; private bool $finalized = false; public function __construct(DOMElement $context, string $line) { $this->contextNode = $context; $this->writer = new XMLWriter; $this->writer->openMemory(); $this->writer->startElementNS(null, $context->nodeName, 'https://schema.phpunit.de/coverage/1.0'); $this->writer->writeAttribute('nr', $line); } /** * @throws ReportAlreadyFinalizedException */ public function addTest(string $test): void { if ($this->finalized) { throw new ReportAlreadyFinalizedException; } $this->writer->startElement('covered'); $this->writer->writeAttribute('by', $test); $this->writer->endElement(); } public function finalize(): void { $this->writer->endElement(); $fragment = $this->contextNode->ownerDocument->createDocumentFragment(); $fragment->appendXML($this->writer->outputMemory()); $this->contextNode->parentNode->replaceChild( $fragment, $this->contextNode ); $this->finalized = true; } } PKs[0 0 Report/Xml/Report.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use function basename; use function dirname; use DOMDocument; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Report extends File { public function __construct(string $name) { $dom = new DOMDocument; $dom->loadXML(''); $contextNode = $dom->getElementsByTagNameNS( 'https://schema.phpunit.de/coverage/1.0', 'file' )->item(0); parent::__construct($contextNode); $this->setName($name); } public function asDom(): DOMDocument { return $this->dom(); } public function functionObject($name): Method { $node = $this->contextNode()->appendChild( $this->dom()->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'function' ) ); return new Method($node, $name); } public function classObject($name): Unit { return $this->unitObject('class', $name); } public function traitObject($name): Unit { return $this->unitObject('trait', $name); } public function source(): Source { $source = $this->contextNode()->getElementsByTagNameNS( 'https://schema.phpunit.de/coverage/1.0', 'source' )->item(0); if (!$source) { $source = $this->contextNode()->appendChild( $this->dom()->createElementNS( 'https://schema.phpunit.de/coverage/1.0', 'source' ) ); } return new Source($source); } private function setName(string $name): void { $this->contextNode()->setAttribute('name', basename($name)); $this->contextNode()->setAttribute('path', dirname($name)); } private function unitObject(string $tagName, $name): Unit { $node = $this->contextNode()->appendChild( $this->dom()->createElementNS( 'https://schema.phpunit.de/coverage/1.0', $tagName ) ); return new Unit($node, $name); } } PKs[k k Report/Xml/BuildInformation.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report\Xml; use function phpversion; use DateTimeImmutable; use DOMElement; use SebastianBergmann\Environment\Runtime; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class BuildInformation { private readonly DOMElement $contextNode; public function __construct(DOMElement $contextNode) { $this->contextNode = $contextNode; } public function setRuntimeInformation(Runtime $runtime): void { $runtimeNode = $this->nodeByName('runtime'); $runtimeNode->setAttribute('name', $runtime->getName()); $runtimeNode->setAttribute('version', $runtime->getVersion()); $runtimeNode->setAttribute('url', $runtime->getVendorUrl()); $driverNode = $this->nodeByName('driver'); if ($runtime->hasXdebug()) { $driverNode->setAttribute('name', 'xdebug'); $driverNode->setAttribute('version', phpversion('xdebug')); } if ($runtime->hasPCOV()) { $driverNode->setAttribute('name', 'pcov'); $driverNode->setAttribute('version', phpversion('pcov')); } } public function setBuildTime(DateTimeImmutable $date): void { $this->contextNode->setAttribute('time', $date->format('D M j G:i:s T Y')); } public function setGeneratorVersions(string $phpUnitVersion, string $coverageVersion): void { $this->contextNode->setAttribute('phpunit', $phpUnitVersion); $this->contextNode->setAttribute('coverage', $coverageVersion); } private function nodeByName(string $name): DOMElement { $node = $this->contextNode->getElementsByTagNameNS( 'https://schema.phpunit.de/coverage/1.0', $name )->item(0); if (!$node) { $node = $this->contextNode->appendChild( $this->contextNode->ownerDocument->createElementNS( 'https://schema.phpunit.de/coverage/1.0', $name ) ); } return $node; } } PKs[7EEReport/Crap4j.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report; use function date; use function dirname; use function file_put_contents; use function htmlspecialchars; use function is_string; use function round; use function strpos; use DOMDocument; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException; use SebastianBergmann\CodeCoverage\Node\File; use SebastianBergmann\CodeCoverage\Util\Filesystem; final class Crap4j { private readonly int $threshold; public function __construct(int $threshold = 30) { $this->threshold = $threshold; } /** * @throws WriteOperationFailedException */ public function process(CodeCoverage $coverage, ?string $target = null, ?string $name = null): string { $document = new DOMDocument('1.0', 'UTF-8'); $document->formatOutput = true; $root = $document->createElement('crap_result'); $document->appendChild($root); $project = $document->createElement('project', is_string($name) ? $name : ''); $root->appendChild($project); $root->appendChild($document->createElement('timestamp', date('Y-m-d H:i:s'))); $stats = $document->createElement('stats'); $methodsNode = $document->createElement('methods'); $report = $coverage->getReport(); unset($coverage); $fullMethodCount = 0; $fullCrapMethodCount = 0; $fullCrapLoad = 0; $fullCrap = 0; foreach ($report as $item) { $namespace = 'global'; if (!$item instanceof File) { continue; } $file = $document->createElement('file'); $file->setAttribute('name', $item->pathAsString()); $classes = $item->classesAndTraits(); foreach ($classes as $className => $class) { foreach ($class['methods'] as $methodName => $method) { $crapLoad = $this->crapLoad((float) $method['crap'], $method['ccn'], $method['coverage']); $fullCrap += $method['crap']; $fullCrapLoad += $crapLoad; $fullMethodCount++; if ($method['crap'] >= $this->threshold) { $fullCrapMethodCount++; } $methodNode = $document->createElement('method'); if (!empty($class['namespace'])) { $namespace = $class['namespace']; } $methodNode->appendChild($document->createElement('package', $namespace)); $methodNode->appendChild($document->createElement('className', $className)); $methodNode->appendChild($document->createElement('methodName', $methodName)); $methodNode->appendChild($document->createElement('methodSignature', htmlspecialchars($method['signature']))); $methodNode->appendChild($document->createElement('fullMethod', htmlspecialchars($method['signature']))); $methodNode->appendChild($document->createElement('crap', (string) $this->roundValue((float) $method['crap']))); $methodNode->appendChild($document->createElement('complexity', (string) $method['ccn'])); $methodNode->appendChild($document->createElement('coverage', (string) $this->roundValue($method['coverage']))); $methodNode->appendChild($document->createElement('crapLoad', (string) round($crapLoad))); $methodsNode->appendChild($methodNode); } } } $stats->appendChild($document->createElement('name', 'Method Crap Stats')); $stats->appendChild($document->createElement('methodCount', (string) $fullMethodCount)); $stats->appendChild($document->createElement('crapMethodCount', (string) $fullCrapMethodCount)); $stats->appendChild($document->createElement('crapLoad', (string) round($fullCrapLoad))); $stats->appendChild($document->createElement('totalCrap', (string) $fullCrap)); $crapMethodPercent = 0; if ($fullMethodCount > 0) { $crapMethodPercent = $this->roundValue((100 * $fullCrapMethodCount) / $fullMethodCount); } $stats->appendChild($document->createElement('crapMethodPercent', (string) $crapMethodPercent)); $root->appendChild($stats); $root->appendChild($methodsNode); $buffer = $document->saveXML(); if ($target !== null) { if (!strpos($target, '://') !== false) { Filesystem::createDirectory(dirname($target)); } if (@file_put_contents($target, $buffer) === false) { throw new WriteOperationFailedException($target); } } return $buffer; } private function crapLoad(float $crapValue, int $cyclomaticComplexity, float $coveragePercent): float { $crapLoad = 0; if ($crapValue >= $this->threshold) { $crapLoad += $cyclomaticComplexity * (1.0 - $coveragePercent / 100); $crapLoad += $cyclomaticComplexity / $this->threshold; } return $crapLoad; } private function roundValue(float $value): float { return round($value, 2); } } PKs[" , ,Report/Text.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report; use const PHP_EOL; use function array_map; use function date; use function ksort; use function max; use function sprintf; use function str_pad; use function strlen; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\Node\File; use SebastianBergmann\CodeCoverage\Util\Percentage; final class Text { /** * @var string */ private const COLOR_GREEN = "\x1b[30;42m"; /** * @var string */ private const COLOR_YELLOW = "\x1b[30;43m"; /** * @var string */ private const COLOR_RED = "\x1b[37;41m"; /** * @var string */ private const COLOR_HEADER = "\x1b[1;37;40m"; /** * @var string */ private const COLOR_RESET = "\x1b[0m"; private readonly Thresholds $thresholds; private readonly bool $showUncoveredFiles; private readonly bool $showOnlySummary; public function __construct(Thresholds $thresholds, bool $showUncoveredFiles = false, bool $showOnlySummary = false) { $this->thresholds = $thresholds; $this->showUncoveredFiles = $showUncoveredFiles; $this->showOnlySummary = $showOnlySummary; } public function process(CodeCoverage $coverage, bool $showColors = false): string { $hasBranchCoverage = !empty($coverage->getData(true)->functionCoverage()); $output = PHP_EOL . PHP_EOL; $report = $coverage->getReport(); $colors = [ 'header' => '', 'classes' => '', 'methods' => '', 'lines' => '', 'branches' => '', 'paths' => '', 'reset' => '', ]; if ($showColors) { $colors['classes'] = $this->coverageColor( $report->numberOfTestedClassesAndTraits(), $report->numberOfClassesAndTraits() ); $colors['methods'] = $this->coverageColor( $report->numberOfTestedMethods(), $report->numberOfMethods() ); $colors['lines'] = $this->coverageColor( $report->numberOfExecutedLines(), $report->numberOfExecutableLines() ); $colors['branches'] = $this->coverageColor( $report->numberOfExecutedBranches(), $report->numberOfExecutableBranches() ); $colors['paths'] = $this->coverageColor( $report->numberOfExecutedPaths(), $report->numberOfExecutablePaths() ); $colors['reset'] = self::COLOR_RESET; $colors['header'] = self::COLOR_HEADER; } $classes = sprintf( ' Classes: %6s (%d/%d)', Percentage::fromFractionAndTotal( $report->numberOfTestedClassesAndTraits(), $report->numberOfClassesAndTraits() )->asString(), $report->numberOfTestedClassesAndTraits(), $report->numberOfClassesAndTraits() ); $methods = sprintf( ' Methods: %6s (%d/%d)', Percentage::fromFractionAndTotal( $report->numberOfTestedMethods(), $report->numberOfMethods(), )->asString(), $report->numberOfTestedMethods(), $report->numberOfMethods() ); $paths = ''; $branches = ''; if ($hasBranchCoverage) { $paths = sprintf( ' Paths: %6s (%d/%d)', Percentage::fromFractionAndTotal( $report->numberOfExecutedPaths(), $report->numberOfExecutablePaths(), )->asString(), $report->numberOfExecutedPaths(), $report->numberOfExecutablePaths() ); $branches = sprintf( ' Branches: %6s (%d/%d)', Percentage::fromFractionAndTotal( $report->numberOfExecutedBranches(), $report->numberOfExecutableBranches(), )->asString(), $report->numberOfExecutedBranches(), $report->numberOfExecutableBranches() ); } $lines = sprintf( ' Lines: %6s (%d/%d)', Percentage::fromFractionAndTotal( $report->numberOfExecutedLines(), $report->numberOfExecutableLines(), )->asString(), $report->numberOfExecutedLines(), $report->numberOfExecutableLines() ); $padding = max(array_map('strlen', [$classes, $methods, $lines])); if ($this->showOnlySummary) { $title = 'Code Coverage Report Summary:'; $padding = max($padding, strlen($title)); $output .= $this->format($colors['header'], $padding, $title); } else { $date = date(' Y-m-d H:i:s'); $title = 'Code Coverage Report:'; $output .= $this->format($colors['header'], $padding, $title); $output .= $this->format($colors['header'], $padding, $date); $output .= $this->format($colors['header'], $padding, ''); $output .= $this->format($colors['header'], $padding, ' Summary:'); } $output .= $this->format($colors['classes'], $padding, $classes); $output .= $this->format($colors['methods'], $padding, $methods); if ($hasBranchCoverage) { $output .= $this->format($colors['paths'], $padding, $paths); $output .= $this->format($colors['branches'], $padding, $branches); } $output .= $this->format($colors['lines'], $padding, $lines); if ($this->showOnlySummary) { return $output . PHP_EOL; } $classCoverage = []; foreach ($report as $item) { if (!$item instanceof File) { continue; } $classes = $item->classesAndTraits(); foreach ($classes as $className => $class) { $classExecutableLines = 0; $classExecutedLines = 0; $classExecutableBranches = 0; $classExecutedBranches = 0; $classExecutablePaths = 0; $classExecutedPaths = 0; $coveredMethods = 0; $classMethods = 0; foreach ($class['methods'] as $method) { if ($method['executableLines'] == 0) { continue; } $classMethods++; $classExecutableLines += $method['executableLines']; $classExecutedLines += $method['executedLines']; $classExecutableBranches += $method['executableBranches']; $classExecutedBranches += $method['executedBranches']; $classExecutablePaths += $method['executablePaths']; $classExecutedPaths += $method['executedPaths']; if ($method['coverage'] == 100) { $coveredMethods++; } } $classCoverage[$className] = [ 'namespace' => $class['namespace'], 'className' => $className, 'methodsCovered' => $coveredMethods, 'methodCount' => $classMethods, 'statementsCovered' => $classExecutedLines, 'statementCount' => $classExecutableLines, 'branchesCovered' => $classExecutedBranches, 'branchesCount' => $classExecutableBranches, 'pathsCovered' => $classExecutedPaths, 'pathsCount' => $classExecutablePaths, ]; } } ksort($classCoverage); $methodColor = ''; $pathsColor = ''; $branchesColor = ''; $linesColor = ''; $resetColor = ''; foreach ($classCoverage as $fullQualifiedPath => $classInfo) { if ($this->showUncoveredFiles || $classInfo['statementsCovered'] != 0) { if ($showColors) { $methodColor = $this->coverageColor($classInfo['methodsCovered'], $classInfo['methodCount']); $pathsColor = $this->coverageColor($classInfo['pathsCovered'], $classInfo['pathsCount']); $branchesColor = $this->coverageColor($classInfo['branchesCovered'], $classInfo['branchesCount']); $linesColor = $this->coverageColor($classInfo['statementsCovered'], $classInfo['statementCount']); $resetColor = $colors['reset']; } $output .= PHP_EOL . $fullQualifiedPath . PHP_EOL . ' ' . $methodColor . 'Methods: ' . $this->printCoverageCounts($classInfo['methodsCovered'], $classInfo['methodCount'], 2) . $resetColor . ' '; if ($hasBranchCoverage) { $output .= ' ' . $pathsColor . 'Paths: ' . $this->printCoverageCounts($classInfo['pathsCovered'], $classInfo['pathsCount'], 3) . $resetColor . ' ' . ' ' . $branchesColor . 'Branches: ' . $this->printCoverageCounts($classInfo['branchesCovered'], $classInfo['branchesCount'], 3) . $resetColor . ' '; } $output .= ' ' . $linesColor . 'Lines: ' . $this->printCoverageCounts($classInfo['statementsCovered'], $classInfo['statementCount'], 3) . $resetColor; } } return $output . PHP_EOL; } private function coverageColor(int $numberOfCoveredElements, int $totalNumberOfElements): string { $coverage = Percentage::fromFractionAndTotal( $numberOfCoveredElements, $totalNumberOfElements ); if ($coverage->asFloat() >= $this->thresholds->highLowerBound()) { return self::COLOR_GREEN; } if ($coverage->asFloat() > $this->thresholds->lowUpperBound()) { return self::COLOR_YELLOW; } return self::COLOR_RED; } private function printCoverageCounts(int $numberOfCoveredElements, int $totalNumberOfElements, int $precision): string { $format = '%' . $precision . 's'; return Percentage::fromFractionAndTotal( $numberOfCoveredElements, $totalNumberOfElements )->asFixedWidthString() . ' (' . sprintf($format, $numberOfCoveredElements) . '/' . sprintf($format, $totalNumberOfElements) . ')'; } private function format(string $color, int $padding, string|false $string): string { $reset = $color ? self::COLOR_RESET : ''; return $color . str_pad((string) $string, $padding) . $reset . PHP_EOL; } } PKs[,#I22Report/Cobertura.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Report; use function basename; use function count; use function dirname; use function file_put_contents; use function preg_match; use function range; use function str_replace; use function strpos; use function time; use DOMImplementation; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException; use SebastianBergmann\CodeCoverage\Node\File; use SebastianBergmann\CodeCoverage\Util\Filesystem; final class Cobertura { /** * @throws WriteOperationFailedException */ public function process(CodeCoverage $coverage, ?string $target = null): string { $time = (string) time(); $report = $coverage->getReport(); $implementation = new DOMImplementation; $documentType = $implementation->createDocumentType( 'coverage', '', 'http://cobertura.sourceforge.net/xml/coverage-04.dtd' ); $document = $implementation->createDocument('', '', $documentType); $document->xmlVersion = '1.0'; $document->encoding = 'UTF-8'; $document->formatOutput = true; $coverageElement = $document->createElement('coverage'); $linesValid = $report->numberOfExecutableLines(); $linesCovered = $report->numberOfExecutedLines(); $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); $coverageElement->setAttribute('line-rate', (string) $lineRate); $branchesValid = $report->numberOfExecutableBranches(); $branchesCovered = $report->numberOfExecutedBranches(); $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); $coverageElement->setAttribute('branch-rate', (string) $branchRate); $coverageElement->setAttribute('lines-covered', (string) $report->numberOfExecutedLines()); $coverageElement->setAttribute('lines-valid', (string) $report->numberOfExecutableLines()); $coverageElement->setAttribute('branches-covered', (string) $report->numberOfExecutedBranches()); $coverageElement->setAttribute('branches-valid', (string) $report->numberOfExecutableBranches()); $coverageElement->setAttribute('complexity', ''); $coverageElement->setAttribute('version', '0.4'); $coverageElement->setAttribute('timestamp', $time); $document->appendChild($coverageElement); $sourcesElement = $document->createElement('sources'); $coverageElement->appendChild($sourcesElement); $sourceElement = $document->createElement('source', $report->pathAsString()); $sourcesElement->appendChild($sourceElement); $packagesElement = $document->createElement('packages'); $coverageElement->appendChild($packagesElement); $complexity = 0; foreach ($report as $item) { if (!$item instanceof File) { continue; } $packageElement = $document->createElement('package'); $packageComplexity = 0; $packageElement->setAttribute('name', str_replace($report->pathAsString() . DIRECTORY_SEPARATOR, '', $item->pathAsString())); $linesValid = $item->numberOfExecutableLines(); $linesCovered = $item->numberOfExecutedLines(); $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); $packageElement->setAttribute('line-rate', (string) $lineRate); $branchesValid = $item->numberOfExecutableBranches(); $branchesCovered = $item->numberOfExecutedBranches(); $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); $packageElement->setAttribute('branch-rate', (string) $branchRate); $packageElement->setAttribute('complexity', ''); $packagesElement->appendChild($packageElement); $classesElement = $document->createElement('classes'); $packageElement->appendChild($classesElement); $classes = $item->classesAndTraits(); $coverageData = $item->lineCoverageData(); foreach ($classes as $className => $class) { $complexity += $class['ccn']; $packageComplexity += $class['ccn']; if (!empty($class['package']['namespace'])) { $className = $class['package']['namespace'] . '\\' . $className; } $linesValid = $class['executableLines']; $linesCovered = $class['executedLines']; $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); $branchesValid = $class['executableBranches']; $branchesCovered = $class['executedBranches']; $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); $classElement = $document->createElement('class'); $classElement->setAttribute('name', $className); $classElement->setAttribute('filename', str_replace($report->pathAsString() . DIRECTORY_SEPARATOR, '', $item->pathAsString())); $classElement->setAttribute('line-rate', (string) $lineRate); $classElement->setAttribute('branch-rate', (string) $branchRate); $classElement->setAttribute('complexity', (string) $class['ccn']); $classesElement->appendChild($classElement); $methodsElement = $document->createElement('methods'); $classElement->appendChild($methodsElement); $classLinesElement = $document->createElement('lines'); $classElement->appendChild($classLinesElement); foreach ($class['methods'] as $methodName => $method) { if ($method['executableLines'] === 0) { continue; } preg_match("/\((.*?)\)/", $method['signature'], $signature); $linesValid = $method['executableLines']; $linesCovered = $method['executedLines']; $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); $branchesValid = $method['executableBranches']; $branchesCovered = $method['executedBranches']; $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); $methodElement = $document->createElement('method'); $methodElement->setAttribute('name', $methodName); $methodElement->setAttribute('signature', $signature[1]); $methodElement->setAttribute('line-rate', (string) $lineRate); $methodElement->setAttribute('branch-rate', (string) $branchRate); $methodElement->setAttribute('complexity', (string) $method['ccn']); $methodLinesElement = $document->createElement('lines'); $methodElement->appendChild($methodLinesElement); foreach (range($method['startLine'], $method['endLine']) as $line) { if (!isset($coverageData[$line])) { continue; } $methodLineElement = $document->createElement('line'); $methodLineElement->setAttribute('number', (string) $line); $methodLineElement->setAttribute('hits', (string) count($coverageData[$line])); $methodLinesElement->appendChild($methodLineElement); $classLineElement = $methodLineElement->cloneNode(); $classLinesElement->appendChild($classLineElement); } $methodsElement->appendChild($methodElement); } } if ($item->numberOfFunctions() === 0) { $packageElement->setAttribute('complexity', (string) $packageComplexity); continue; } $functionsComplexity = 0; $functionsLinesValid = 0; $functionsLinesCovered = 0; $functionsBranchesValid = 0; $functionsBranchesCovered = 0; $classElement = $document->createElement('class'); $classElement->setAttribute('name', basename($item->pathAsString())); $classElement->setAttribute('filename', str_replace($report->pathAsString() . DIRECTORY_SEPARATOR, '', $item->pathAsString())); $methodsElement = $document->createElement('methods'); $classElement->appendChild($methodsElement); $classLinesElement = $document->createElement('lines'); $classElement->appendChild($classLinesElement); $functions = $item->functions(); foreach ($functions as $functionName => $function) { if ($function['executableLines'] === 0) { continue; } $complexity += $function['ccn']; $packageComplexity += $function['ccn']; $functionsComplexity += $function['ccn']; $linesValid = $function['executableLines']; $linesCovered = $function['executedLines']; $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); $functionsLinesValid += $linesValid; $functionsLinesCovered += $linesCovered; $branchesValid = $function['executableBranches']; $branchesCovered = $function['executedBranches']; $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); $functionsBranchesValid += $branchesValid; $functionsBranchesCovered += $branchesValid; $methodElement = $document->createElement('method'); $methodElement->setAttribute('name', $functionName); $methodElement->setAttribute('signature', $function['signature']); $methodElement->setAttribute('line-rate', (string) $lineRate); $methodElement->setAttribute('branch-rate', (string) $branchRate); $methodElement->setAttribute('complexity', (string) $function['ccn']); $methodLinesElement = $document->createElement('lines'); $methodElement->appendChild($methodLinesElement); foreach (range($function['startLine'], $function['endLine']) as $line) { if (!isset($coverageData[$line])) { continue; } $methodLineElement = $document->createElement('line'); $methodLineElement->setAttribute('number', (string) $line); $methodLineElement->setAttribute('hits', (string) count($coverageData[$line])); $methodLinesElement->appendChild($methodLineElement); $classLineElement = $methodLineElement->cloneNode(); $classLinesElement->appendChild($classLineElement); } $methodsElement->appendChild($methodElement); } $packageElement->setAttribute('complexity', (string) $packageComplexity); if ($functionsLinesValid === 0) { continue; } $lineRate = $functionsLinesCovered / $functionsLinesValid; $branchRate = $functionsBranchesValid === 0 ? 0 : ($functionsBranchesCovered / $functionsBranchesValid); $classElement->setAttribute('line-rate', (string) $lineRate); $classElement->setAttribute('branch-rate', (string) $branchRate); $classElement->setAttribute('complexity', (string) $functionsComplexity); $classesElement->appendChild($classElement); } $coverageElement->setAttribute('complexity', (string) $complexity); $buffer = $document->saveXML(); if ($target !== null) { if (!strpos($target, '://') !== false) { Filesystem::createDirectory(dirname($target)); } if (@file_put_contents($target, $buffer) === false) { throw new WriteOperationFailedException($target); } } return $buffer; } } PKs[r!!Data/RawCodeCoverageData.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Data; use function array_diff; use function array_diff_key; use function array_flip; use function array_intersect; use function array_intersect_key; use function count; use function explode; use function file_get_contents; use function in_array; use function is_file; use function range; use function trim; use SebastianBergmann\CodeCoverage\Driver\Driver; use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * * @psalm-import-type XdebugFunctionsCoverageType from \SebastianBergmann\CodeCoverage\Driver\XdebugDriver * @psalm-import-type XdebugCodeCoverageWithoutPathCoverageType from \SebastianBergmann\CodeCoverage\Driver\XdebugDriver * @psalm-import-type XdebugCodeCoverageWithPathCoverageType from \SebastianBergmann\CodeCoverage\Driver\XdebugDriver */ final class RawCodeCoverageData { /** * @var array> */ private static array $emptyLineCache = []; /** * @psalm-var XdebugCodeCoverageWithoutPathCoverageType */ private array $lineCoverage; /** * @psalm-var array */ private array $functionCoverage; /** * @psalm-param XdebugCodeCoverageWithoutPathCoverageType $rawCoverage */ public static function fromXdebugWithoutPathCoverage(array $rawCoverage): self { return new self($rawCoverage, []); } /** * @psalm-param XdebugCodeCoverageWithPathCoverageType $rawCoverage */ public static function fromXdebugWithPathCoverage(array $rawCoverage): self { $lineCoverage = []; $functionCoverage = []; foreach ($rawCoverage as $file => $fileCoverageData) { $lineCoverage[$file] = $fileCoverageData['lines']; $functionCoverage[$file] = $fileCoverageData['functions']; } return new self($lineCoverage, $functionCoverage); } public static function fromUncoveredFile(string $filename, FileAnalyser $analyser): self { $lineCoverage = []; foreach ($analyser->executableLinesIn($filename) as $line => $branch) { $lineCoverage[$line] = Driver::LINE_NOT_EXECUTED; } return new self([$filename => $lineCoverage], []); } /** * @psalm-param XdebugCodeCoverageWithoutPathCoverageType $lineCoverage * @psalm-param array $functionCoverage */ private function __construct(array $lineCoverage, array $functionCoverage) { $this->lineCoverage = $lineCoverage; $this->functionCoverage = $functionCoverage; $this->skipEmptyLines(); } public function clear(): void { $this->lineCoverage = $this->functionCoverage = []; } /** * @psalm-return XdebugCodeCoverageWithoutPathCoverageType */ public function lineCoverage(): array { return $this->lineCoverage; } /** * @psalm-return array */ public function functionCoverage(): array { return $this->functionCoverage; } public function removeCoverageDataForFile(string $filename): void { unset($this->lineCoverage[$filename], $this->functionCoverage[$filename]); } /** * @param int[] $lines */ public function keepLineCoverageDataOnlyForLines(string $filename, array $lines): void { if (!isset($this->lineCoverage[$filename])) { return; } $this->lineCoverage[$filename] = array_intersect_key( $this->lineCoverage[$filename], array_flip($lines) ); } /** * @param int[] $linesToBranchMap */ public function markExecutableLineByBranch(string $filename, array $linesToBranchMap): void { if (!isset($this->lineCoverage[$filename])) { return; } $linesByBranch = []; foreach ($linesToBranchMap as $line => $branch) { $linesByBranch[$branch][] = $line; } foreach ($this->lineCoverage[$filename] as $line => $lineStatus) { if (!isset($linesToBranchMap[$line])) { continue; } $branch = $linesToBranchMap[$line]; if (!isset($linesByBranch[$branch])) { continue; } foreach ($linesByBranch[$branch] as $lineInBranch) { $this->lineCoverage[$filename][$lineInBranch] = $lineStatus; } if (Driver::LINE_EXECUTED === $lineStatus) { unset($linesByBranch[$branch]); } } } /** * @param int[] $lines */ public function keepFunctionCoverageDataOnlyForLines(string $filename, array $lines): void { if (!isset($this->functionCoverage[$filename])) { return; } foreach ($this->functionCoverage[$filename] as $functionName => $functionData) { foreach ($functionData['branches'] as $branchId => $branch) { if (count(array_diff(range($branch['line_start'], $branch['line_end']), $lines)) > 0) { unset($this->functionCoverage[$filename][$functionName]['branches'][$branchId]); foreach ($functionData['paths'] as $pathId => $path) { if (in_array($branchId, $path['path'], true)) { unset($this->functionCoverage[$filename][$functionName]['paths'][$pathId]); } } } } } } /** * @param int[] $lines */ public function removeCoverageDataForLines(string $filename, array $lines): void { if (empty($lines)) { return; } if (!isset($this->lineCoverage[$filename])) { return; } $this->lineCoverage[$filename] = array_diff_key( $this->lineCoverage[$filename], array_flip($lines) ); if (isset($this->functionCoverage[$filename])) { foreach ($this->functionCoverage[$filename] as $functionName => $functionData) { foreach ($functionData['branches'] as $branchId => $branch) { if (count(array_intersect($lines, range($branch['line_start'], $branch['line_end']))) > 0) { unset($this->functionCoverage[$filename][$functionName]['branches'][$branchId]); foreach ($functionData['paths'] as $pathId => $path) { if (in_array($branchId, $path['path'], true)) { unset($this->functionCoverage[$filename][$functionName]['paths'][$pathId]); } } } } } } } /** * At the end of a file, the PHP interpreter always sees an implicit return. Where this occurs in a file that has * e.g. a class definition, that line cannot be invoked from a test and results in confusing coverage. This engine * implementation detail therefore needs to be masked which is done here by simply ensuring that all empty lines * are skipped over for coverage purposes. * * @see https://github.com/sebastianbergmann/php-code-coverage/issues/799 */ private function skipEmptyLines(): void { foreach ($this->lineCoverage as $filename => $coverage) { foreach ($this->getEmptyLinesForFile($filename) as $emptyLine) { unset($this->lineCoverage[$filename][$emptyLine]); } } } private function getEmptyLinesForFile(string $filename): array { if (!isset(self::$emptyLineCache[$filename])) { self::$emptyLineCache[$filename] = []; if (is_file($filename)) { $sourceLines = explode("\n", file_get_contents($filename)); foreach ($sourceLines as $line => $source) { if (trim($source) === '') { self::$emptyLineCache[$filename][] = ($line + 1); } } } } return self::$emptyLineCache[$filename]; } } PKs[uG''"Data/ProcessedCodeCoverageData.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Data; use function array_key_exists; use function array_keys; use function array_merge; use function array_unique; use function count; use function is_array; use function ksort; use SebastianBergmann\CodeCoverage\Driver\Driver; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * * @psalm-import-type XdebugFunctionCoverageType from \SebastianBergmann\CodeCoverage\Driver\XdebugDriver * * @psalm-type TestIdType = string */ final class ProcessedCodeCoverageData { /** * Line coverage data. * An array of filenames, each having an array of linenumbers, each executable line having an array of testcase ids. * * @psalm-var array>> */ private array $lineCoverage = []; /** * Function coverage data. * Maintains base format of raw data (@see https://xdebug.org/docs/code_coverage), but each 'hit' entry is an array * of testcase ids. * * @psalm-var array, * out: array, * out_hit: array, * }>, * paths: array, * hit: list, * }>, * hit: list * }>> */ private array $functionCoverage = []; public function initializeUnseenData(RawCodeCoverageData $rawData): void { foreach ($rawData->lineCoverage() as $file => $lines) { if (!isset($this->lineCoverage[$file])) { $this->lineCoverage[$file] = []; foreach ($lines as $k => $v) { $this->lineCoverage[$file][$k] = $v === Driver::LINE_NOT_EXECUTABLE ? null : []; } } } foreach ($rawData->functionCoverage() as $file => $functions) { foreach ($functions as $functionName => $functionData) { if (isset($this->functionCoverage[$file][$functionName])) { $this->initPreviouslySeenFunction($file, $functionName, $functionData); } else { $this->initPreviouslyUnseenFunction($file, $functionName, $functionData); } } } } public function markCodeAsExecutedByTestCase(string $testCaseId, RawCodeCoverageData $executedCode): void { foreach ($executedCode->lineCoverage() as $file => $lines) { foreach ($lines as $k => $v) { if ($v === Driver::LINE_EXECUTED) { $this->lineCoverage[$file][$k][] = $testCaseId; } } } foreach ($executedCode->functionCoverage() as $file => $functions) { foreach ($functions as $functionName => $functionData) { foreach ($functionData['branches'] as $branchId => $branchData) { if ($branchData['hit'] === Driver::BRANCH_HIT) { $this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'][] = $testCaseId; } } foreach ($functionData['paths'] as $pathId => $pathData) { if ($pathData['hit'] === Driver::BRANCH_HIT) { $this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'][] = $testCaseId; } } } } } public function setLineCoverage(array $lineCoverage): void { $this->lineCoverage = $lineCoverage; } public function lineCoverage(): array { ksort($this->lineCoverage); return $this->lineCoverage; } public function setFunctionCoverage(array $functionCoverage): void { $this->functionCoverage = $functionCoverage; } public function functionCoverage(): array { ksort($this->functionCoverage); return $this->functionCoverage; } public function coveredFiles(): array { ksort($this->lineCoverage); return array_keys($this->lineCoverage); } public function renameFile(string $oldFile, string $newFile): void { $this->lineCoverage[$newFile] = $this->lineCoverage[$oldFile]; if (isset($this->functionCoverage[$oldFile])) { $this->functionCoverage[$newFile] = $this->functionCoverage[$oldFile]; } unset($this->lineCoverage[$oldFile], $this->functionCoverage[$oldFile]); } public function merge(self $newData): void { foreach ($newData->lineCoverage as $file => $lines) { if (!isset($this->lineCoverage[$file])) { $this->lineCoverage[$file] = $lines; continue; } // we should compare the lines if any of two contains data $compareLineNumbers = array_unique( array_merge( array_keys($this->lineCoverage[$file]), array_keys($newData->lineCoverage[$file]) ) ); foreach ($compareLineNumbers as $line) { $thatPriority = $this->priorityForLine($newData->lineCoverage[$file], $line); $thisPriority = $this->priorityForLine($this->lineCoverage[$file], $line); if ($thatPriority > $thisPriority) { $this->lineCoverage[$file][$line] = $newData->lineCoverage[$file][$line]; } elseif ($thatPriority === $thisPriority && is_array($this->lineCoverage[$file][$line])) { $this->lineCoverage[$file][$line] = array_unique( array_merge($this->lineCoverage[$file][$line], $newData->lineCoverage[$file][$line]) ); } } } foreach ($newData->functionCoverage as $file => $functions) { if (!isset($this->functionCoverage[$file])) { $this->functionCoverage[$file] = $functions; continue; } foreach ($functions as $functionName => $functionData) { if (isset($this->functionCoverage[$file][$functionName])) { $this->initPreviouslySeenFunction($file, $functionName, $functionData); } else { $this->initPreviouslyUnseenFunction($file, $functionName, $functionData); } foreach ($functionData['branches'] as $branchId => $branchData) { $this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'] = array_unique(array_merge($this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'], $branchData['hit'])); } foreach ($functionData['paths'] as $pathId => $pathData) { $this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'] = array_unique(array_merge($this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'], $pathData['hit'])); } } } } /** * Determine the priority for a line. * * 1 = the line is not set * 2 = the line has not been tested * 3 = the line is dead code * 4 = the line has been tested * * During a merge, a higher number is better. */ private function priorityForLine(array $data, int $line): int { if (!array_key_exists($line, $data)) { return 1; } if (is_array($data[$line]) && count($data[$line]) === 0) { return 2; } if ($data[$line] === null) { return 3; } return 4; } /** * For a function we have never seen before, copy all data over and simply init the 'hit' array. * * @psalm-param XdebugFunctionCoverageType $functionData */ private function initPreviouslyUnseenFunction(string $file, string $functionName, array $functionData): void { $this->functionCoverage[$file][$functionName] = $functionData; foreach (array_keys($functionData['branches']) as $branchId) { $this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'] = []; } foreach (array_keys($functionData['paths']) as $pathId) { $this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'] = []; } } /** * For a function we have seen before, only copy over and init the 'hit' array for any unseen branches and paths. * Techniques such as mocking and where the contents of a file are different vary during tests (e.g. compiling * containers) mean that the functions inside a file cannot be relied upon to be static. * * @psalm-param XdebugFunctionCoverageType $functionData */ private function initPreviouslySeenFunction(string $file, string $functionName, array $functionData): void { foreach ($functionData['branches'] as $branchId => $branchData) { if (!isset($this->functionCoverage[$file][$functionName]['branches'][$branchId])) { $this->functionCoverage[$file][$functionName]['branches'][$branchId] = $branchData; $this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'] = []; } } foreach ($functionData['paths'] as $pathId => $pathData) { if (!isset($this->functionCoverage[$file][$functionName]['paths'][$pathId])) { $this->functionCoverage[$file][$functionName]['paths'][$pathId] = $pathData; $this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'] = []; } } } } PKs[(iB%%Node/Directory.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Node; use function array_merge; use function count; use IteratorAggregate; use RecursiveIteratorIterator; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * * @psalm-import-type LinesOfCodeType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser */ final class Directory extends AbstractNode implements IteratorAggregate { /** * @var list */ private array $children = []; /** * @var list */ private array $directories = []; /** * @var list */ private array $files = []; private ?array $classes = null; private ?array $traits = null; private ?array $functions = null; /** * @psalm-var null|LinesOfCodeType */ private ?array $linesOfCode = null; private int $numFiles = -1; private int $numExecutableLines = -1; private int $numExecutedLines = -1; private int $numExecutableBranches = -1; private int $numExecutedBranches = -1; private int $numExecutablePaths = -1; private int $numExecutedPaths = -1; private int $numClasses = -1; private int $numTestedClasses = -1; private int $numTraits = -1; private int $numTestedTraits = -1; private int $numMethods = -1; private int $numTestedMethods = -1; private int $numFunctions = -1; private int $numTestedFunctions = -1; public function count(): int { if ($this->numFiles === -1) { $this->numFiles = 0; foreach ($this->children as $child) { $this->numFiles += count($child); } } return $this->numFiles; } public function getIterator(): RecursiveIteratorIterator { return new RecursiveIteratorIterator( new Iterator($this), RecursiveIteratorIterator::SELF_FIRST ); } public function addDirectory(string $name): self { $directory = new self($name, $this); $this->children[] = $directory; $this->directories[] = &$this->children[count($this->children) - 1]; return $directory; } public function addFile(File $file): void { $this->children[] = $file; $this->files[] = &$this->children[count($this->children) - 1]; $this->numExecutableLines = -1; $this->numExecutedLines = -1; } public function directories(): array { return $this->directories; } public function files(): array { return $this->files; } public function children(): array { return $this->children; } public function classes(): array { if ($this->classes === null) { $this->classes = []; foreach ($this->children as $child) { $this->classes = array_merge( $this->classes, $child->classes() ); } } return $this->classes; } public function traits(): array { if ($this->traits === null) { $this->traits = []; foreach ($this->children as $child) { $this->traits = array_merge( $this->traits, $child->traits() ); } } return $this->traits; } public function functions(): array { if ($this->functions === null) { $this->functions = []; foreach ($this->children as $child) { $this->functions = array_merge( $this->functions, $child->functions() ); } } return $this->functions; } /** * @psalm-return LinesOfCodeType */ public function linesOfCode(): array { if ($this->linesOfCode === null) { $this->linesOfCode = [ 'linesOfCode' => 0, 'commentLinesOfCode' => 0, 'nonCommentLinesOfCode' => 0, ]; foreach ($this->children as $child) { $childLinesOfCode = $child->linesOfCode(); $this->linesOfCode['linesOfCode'] += $childLinesOfCode['linesOfCode']; $this->linesOfCode['commentLinesOfCode'] += $childLinesOfCode['commentLinesOfCode']; $this->linesOfCode['nonCommentLinesOfCode'] += $childLinesOfCode['nonCommentLinesOfCode']; } } return $this->linesOfCode; } public function numberOfExecutableLines(): int { if ($this->numExecutableLines === -1) { $this->numExecutableLines = 0; foreach ($this->children as $child) { $this->numExecutableLines += $child->numberOfExecutableLines(); } } return $this->numExecutableLines; } public function numberOfExecutedLines(): int { if ($this->numExecutedLines === -1) { $this->numExecutedLines = 0; foreach ($this->children as $child) { $this->numExecutedLines += $child->numberOfExecutedLines(); } } return $this->numExecutedLines; } public function numberOfExecutableBranches(): int { if ($this->numExecutableBranches === -1) { $this->numExecutableBranches = 0; foreach ($this->children as $child) { $this->numExecutableBranches += $child->numberOfExecutableBranches(); } } return $this->numExecutableBranches; } public function numberOfExecutedBranches(): int { if ($this->numExecutedBranches === -1) { $this->numExecutedBranches = 0; foreach ($this->children as $child) { $this->numExecutedBranches += $child->numberOfExecutedBranches(); } } return $this->numExecutedBranches; } public function numberOfExecutablePaths(): int { if ($this->numExecutablePaths === -1) { $this->numExecutablePaths = 0; foreach ($this->children as $child) { $this->numExecutablePaths += $child->numberOfExecutablePaths(); } } return $this->numExecutablePaths; } public function numberOfExecutedPaths(): int { if ($this->numExecutedPaths === -1) { $this->numExecutedPaths = 0; foreach ($this->children as $child) { $this->numExecutedPaths += $child->numberOfExecutedPaths(); } } return $this->numExecutedPaths; } public function numberOfClasses(): int { if ($this->numClasses === -1) { $this->numClasses = 0; foreach ($this->children as $child) { $this->numClasses += $child->numberOfClasses(); } } return $this->numClasses; } public function numberOfTestedClasses(): int { if ($this->numTestedClasses === -1) { $this->numTestedClasses = 0; foreach ($this->children as $child) { $this->numTestedClasses += $child->numberOfTestedClasses(); } } return $this->numTestedClasses; } public function numberOfTraits(): int { if ($this->numTraits === -1) { $this->numTraits = 0; foreach ($this->children as $child) { $this->numTraits += $child->numberOfTraits(); } } return $this->numTraits; } public function numberOfTestedTraits(): int { if ($this->numTestedTraits === -1) { $this->numTestedTraits = 0; foreach ($this->children as $child) { $this->numTestedTraits += $child->numberOfTestedTraits(); } } return $this->numTestedTraits; } public function numberOfMethods(): int { if ($this->numMethods === -1) { $this->numMethods = 0; foreach ($this->children as $child) { $this->numMethods += $child->numberOfMethods(); } } return $this->numMethods; } public function numberOfTestedMethods(): int { if ($this->numTestedMethods === -1) { $this->numTestedMethods = 0; foreach ($this->children as $child) { $this->numTestedMethods += $child->numberOfTestedMethods(); } } return $this->numTestedMethods; } public function numberOfFunctions(): int { if ($this->numFunctions === -1) { $this->numFunctions = 0; foreach ($this->children as $child) { $this->numFunctions += $child->numberOfFunctions(); } } return $this->numFunctions; } public function numberOfTestedFunctions(): int { if ($this->numTestedFunctions === -1) { $this->numTestedFunctions = 0; foreach ($this->children as $child) { $this->numTestedFunctions += $child->numberOfTestedFunctions(); } } return $this->numTestedFunctions; } } PKs[\9Node/CrapIndex.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Node; use function sprintf; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class CrapIndex { private readonly int $cyclomaticComplexity; private readonly float $codeCoverage; public function __construct(int $cyclomaticComplexity, float $codeCoverage) { $this->cyclomaticComplexity = $cyclomaticComplexity; $this->codeCoverage = $codeCoverage; } public function asString(): string { if ($this->codeCoverage === 0.0) { return (string) ($this->cyclomaticComplexity ** 2 + $this->cyclomaticComplexity); } if ($this->codeCoverage >= 95) { return (string) $this->cyclomaticComplexity; } return sprintf( '%01.2F', $this->cyclomaticComplexity ** 2 * (1 - $this->codeCoverage / 100) ** 3 + $this->cyclomaticComplexity ); } } PKs[~|PaPa Node/File.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Node; use function array_filter; use function count; use function range; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * * @psalm-import-type CodeUnitFunctionType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor * @psalm-import-type CodeUnitMethodType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor * @psalm-import-type CodeUnitClassType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor * @psalm-import-type CodeUnitTraitType from \SebastianBergmann\CodeCoverage\StaticAnalysis\CodeUnitFindingVisitor * @psalm-import-type LinesOfCodeType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser * @psalm-import-type LinesType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser * * @psalm-type ProcessedFunctionType = array{ * functionName: string, * namespace: string, * signature: string, * startLine: int, * endLine: int, * executableLines: int, * executedLines: int, * executableBranches: int, * executedBranches: int, * executablePaths: int, * executedPaths: int, * ccn: int, * coverage: int|float, * crap: int|string, * link: string * } * @psalm-type ProcessedMethodType = array{ * methodName: string, * visibility: string, * signature: string, * startLine: int, * endLine: int, * executableLines: int, * executedLines: int, * executableBranches: int, * executedBranches: int, * executablePaths: int, * executedPaths: int, * ccn: int, * coverage: float|int, * crap: int|string, * link: string * } * @psalm-type ProcessedClassType = array{ * className: string, * namespace: string, * methods: array, * startLine: int, * executableLines: int, * executedLines: int, * executableBranches: int, * executedBranches: int, * executablePaths: int, * executedPaths: int, * ccn: int, * coverage: int|float, * crap: int|string, * link: string * } * @psalm-type ProcessedTraitType = array{ * traitName: string, * namespace: string, * methods: array, * startLine: int, * executableLines: int, * executedLines: int, * executableBranches: int, * executedBranches: int, * executablePaths: int, * executedPaths: int, * ccn: int, * coverage: float|int, * crap: int|string, * link: string * } */ final class File extends AbstractNode { /** * @psalm-var array> */ private array $lineCoverageData; private array $functionCoverageData; private readonly array $testData; private int $numExecutableLines = 0; private int $numExecutedLines = 0; private int $numExecutableBranches = 0; private int $numExecutedBranches = 0; private int $numExecutablePaths = 0; private int $numExecutedPaths = 0; /** * @psalm-var array */ private array $classes = []; /** * @psalm-var array */ private array $traits = []; /** * @psalm-var array */ private array $functions = []; /** * @psalm-var LinesOfCodeType */ private readonly array $linesOfCode; private ?int $numClasses = null; private int $numTestedClasses = 0; private ?int $numTraits = null; private int $numTestedTraits = 0; private ?int $numMethods = null; private ?int $numTestedMethods = null; private ?int $numTestedFunctions = null; /** * @var array */ private array $codeUnitsByLine = []; /** * @psalm-param array> $lineCoverageData * @psalm-param LinesOfCodeType $linesOfCode * @psalm-param array $classes * @psalm-param array $traits * @psalm-param array $functions */ public function __construct(string $name, AbstractNode $parent, array $lineCoverageData, array $functionCoverageData, array $testData, array $classes, array $traits, array $functions, array $linesOfCode) { parent::__construct($name, $parent); $this->lineCoverageData = $lineCoverageData; $this->functionCoverageData = $functionCoverageData; $this->testData = $testData; $this->linesOfCode = $linesOfCode; $this->calculateStatistics($classes, $traits, $functions); } public function count(): int { return 1; } /** * @psalm-return array> */ public function lineCoverageData(): array { return $this->lineCoverageData; } public function functionCoverageData(): array { return $this->functionCoverageData; } public function testData(): array { return $this->testData; } public function classes(): array { return $this->classes; } public function traits(): array { return $this->traits; } public function functions(): array { return $this->functions; } public function linesOfCode(): array { return $this->linesOfCode; } public function numberOfExecutableLines(): int { return $this->numExecutableLines; } public function numberOfExecutedLines(): int { return $this->numExecutedLines; } public function numberOfExecutableBranches(): int { return $this->numExecutableBranches; } public function numberOfExecutedBranches(): int { return $this->numExecutedBranches; } public function numberOfExecutablePaths(): int { return $this->numExecutablePaths; } public function numberOfExecutedPaths(): int { return $this->numExecutedPaths; } public function numberOfClasses(): int { if ($this->numClasses === null) { $this->numClasses = 0; foreach ($this->classes as $class) { foreach ($class['methods'] as $method) { if ($method['executableLines'] > 0) { $this->numClasses++; continue 2; } } } } return $this->numClasses; } public function numberOfTestedClasses(): int { return $this->numTestedClasses; } public function numberOfTraits(): int { if ($this->numTraits === null) { $this->numTraits = 0; foreach ($this->traits as $trait) { foreach ($trait['methods'] as $method) { if ($method['executableLines'] > 0) { $this->numTraits++; continue 2; } } } } return $this->numTraits; } public function numberOfTestedTraits(): int { return $this->numTestedTraits; } public function numberOfMethods(): int { if ($this->numMethods === null) { $this->numMethods = 0; foreach ($this->classes as $class) { foreach ($class['methods'] as $method) { if ($method['executableLines'] > 0) { $this->numMethods++; } } } foreach ($this->traits as $trait) { foreach ($trait['methods'] as $method) { if ($method['executableLines'] > 0) { $this->numMethods++; } } } } return $this->numMethods; } public function numberOfTestedMethods(): int { if ($this->numTestedMethods === null) { $this->numTestedMethods = 0; foreach ($this->classes as $class) { foreach ($class['methods'] as $method) { if ($method['executableLines'] > 0 && $method['coverage'] === 100) { $this->numTestedMethods++; } } } foreach ($this->traits as $trait) { foreach ($trait['methods'] as $method) { if ($method['executableLines'] > 0 && $method['coverage'] === 100) { $this->numTestedMethods++; } } } } return $this->numTestedMethods; } public function numberOfFunctions(): int { return count($this->functions); } public function numberOfTestedFunctions(): int { if ($this->numTestedFunctions === null) { $this->numTestedFunctions = 0; foreach ($this->functions as $function) { if ($function['executableLines'] > 0 && $function['coverage'] === 100) { $this->numTestedFunctions++; } } } return $this->numTestedFunctions; } /** * @psalm-param array $classes * @psalm-param array $traits * @psalm-param array $functions */ private function calculateStatistics(array $classes, array $traits, array $functions): void { foreach (range(1, $this->linesOfCode['linesOfCode']) as $lineNumber) { $this->codeUnitsByLine[$lineNumber] = []; } $this->processClasses($classes); $this->processTraits($traits); $this->processFunctions($functions); foreach (range(1, $this->linesOfCode['linesOfCode']) as $lineNumber) { if (isset($this->lineCoverageData[$lineNumber])) { foreach ($this->codeUnitsByLine[$lineNumber] as &$codeUnit) { $codeUnit['executableLines']++; } unset($codeUnit); $this->numExecutableLines++; if (count($this->lineCoverageData[$lineNumber]) > 0) { foreach ($this->codeUnitsByLine[$lineNumber] as &$codeUnit) { $codeUnit['executedLines']++; } unset($codeUnit); $this->numExecutedLines++; } } } foreach ($this->traits as &$trait) { foreach ($trait['methods'] as &$method) { $methodLineCoverage = $method['executableLines'] ? ($method['executedLines'] / $method['executableLines']) * 100 : 100; $methodBranchCoverage = $method['executableBranches'] ? ($method['executedBranches'] / $method['executableBranches']) * 100 : 0; $methodPathCoverage = $method['executablePaths'] ? ($method['executedPaths'] / $method['executablePaths']) * 100 : 0; $method['coverage'] = $methodBranchCoverage ?: $methodLineCoverage; $method['crap'] = (new CrapIndex($method['ccn'], $methodPathCoverage ?: $methodLineCoverage))->asString(); $trait['ccn'] += $method['ccn']; } unset($method); $traitLineCoverage = $trait['executableLines'] ? ($trait['executedLines'] / $trait['executableLines']) * 100 : 100; $traitBranchCoverage = $trait['executableBranches'] ? ($trait['executedBranches'] / $trait['executableBranches']) * 100 : 0; $traitPathCoverage = $trait['executablePaths'] ? ($trait['executedPaths'] / $trait['executablePaths']) * 100 : 0; $trait['coverage'] = $traitBranchCoverage ?: $traitLineCoverage; $trait['crap'] = (new CrapIndex($trait['ccn'], $traitPathCoverage ?: $traitLineCoverage))->asString(); if ($trait['executableLines'] > 0 && $trait['coverage'] === 100) { $this->numTestedClasses++; } } unset($trait); foreach ($this->classes as &$class) { foreach ($class['methods'] as &$method) { $methodLineCoverage = $method['executableLines'] ? ($method['executedLines'] / $method['executableLines']) * 100 : 100; $methodBranchCoverage = $method['executableBranches'] ? ($method['executedBranches'] / $method['executableBranches']) * 100 : 0; $methodPathCoverage = $method['executablePaths'] ? ($method['executedPaths'] / $method['executablePaths']) * 100 : 0; $method['coverage'] = $methodBranchCoverage ?: $methodLineCoverage; $method['crap'] = (new CrapIndex($method['ccn'], $methodPathCoverage ?: $methodLineCoverage))->asString(); $class['ccn'] += $method['ccn']; } unset($method); $classLineCoverage = $class['executableLines'] ? ($class['executedLines'] / $class['executableLines']) * 100 : 100; $classBranchCoverage = $class['executableBranches'] ? ($class['executedBranches'] / $class['executableBranches']) * 100 : 0; $classPathCoverage = $class['executablePaths'] ? ($class['executedPaths'] / $class['executablePaths']) * 100 : 0; $class['coverage'] = $classBranchCoverage ?: $classLineCoverage; $class['crap'] = (new CrapIndex($class['ccn'], $classPathCoverage ?: $classLineCoverage))->asString(); if ($class['executableLines'] > 0 && $class['coverage'] === 100) { $this->numTestedClasses++; } } unset($class); foreach ($this->functions as &$function) { $functionLineCoverage = $function['executableLines'] ? ($function['executedLines'] / $function['executableLines']) * 100 : 100; $functionBranchCoverage = $function['executableBranches'] ? ($function['executedBranches'] / $function['executableBranches']) * 100 : 0; $functionPathCoverage = $function['executablePaths'] ? ($function['executedPaths'] / $function['executablePaths']) * 100 : 0; $function['coverage'] = $functionBranchCoverage ?: $functionLineCoverage; $function['crap'] = (new CrapIndex($function['ccn'], $functionPathCoverage ?: $functionLineCoverage))->asString(); if ($function['coverage'] === 100) { $this->numTestedFunctions++; } } } /** * @psalm-param array $classes */ private function processClasses(array $classes): void { $link = $this->id() . '.html#'; foreach ($classes as $className => $class) { $this->classes[$className] = [ 'className' => $className, 'namespace' => $class['namespace'], 'methods' => [], 'startLine' => $class['startLine'], 'executableLines' => 0, 'executedLines' => 0, 'executableBranches' => 0, 'executedBranches' => 0, 'executablePaths' => 0, 'executedPaths' => 0, 'ccn' => 0, 'coverage' => 0, 'crap' => 0, 'link' => $link . $class['startLine'], ]; foreach ($class['methods'] as $methodName => $method) { $methodData = $this->newMethod($className, $methodName, $method, $link); $this->classes[$className]['methods'][$methodName] = $methodData; $this->classes[$className]['executableBranches'] += $methodData['executableBranches']; $this->classes[$className]['executedBranches'] += $methodData['executedBranches']; $this->classes[$className]['executablePaths'] += $methodData['executablePaths']; $this->classes[$className]['executedPaths'] += $methodData['executedPaths']; $this->numExecutableBranches += $methodData['executableBranches']; $this->numExecutedBranches += $methodData['executedBranches']; $this->numExecutablePaths += $methodData['executablePaths']; $this->numExecutedPaths += $methodData['executedPaths']; foreach (range($method['startLine'], $method['endLine']) as $lineNumber) { $this->codeUnitsByLine[$lineNumber] = [ &$this->classes[$className], &$this->classes[$className]['methods'][$methodName], ]; } } } } /** * @psalm-param array $traits */ private function processTraits(array $traits): void { $link = $this->id() . '.html#'; foreach ($traits as $traitName => $trait) { $this->traits[$traitName] = [ 'traitName' => $traitName, 'namespace' => $trait['namespace'], 'methods' => [], 'startLine' => $trait['startLine'], 'executableLines' => 0, 'executedLines' => 0, 'executableBranches' => 0, 'executedBranches' => 0, 'executablePaths' => 0, 'executedPaths' => 0, 'ccn' => 0, 'coverage' => 0, 'crap' => 0, 'link' => $link . $trait['startLine'], ]; foreach ($trait['methods'] as $methodName => $method) { $methodData = $this->newMethod($traitName, $methodName, $method, $link); $this->traits[$traitName]['methods'][$methodName] = $methodData; $this->traits[$traitName]['executableBranches'] += $methodData['executableBranches']; $this->traits[$traitName]['executedBranches'] += $methodData['executedBranches']; $this->traits[$traitName]['executablePaths'] += $methodData['executablePaths']; $this->traits[$traitName]['executedPaths'] += $methodData['executedPaths']; $this->numExecutableBranches += $methodData['executableBranches']; $this->numExecutedBranches += $methodData['executedBranches']; $this->numExecutablePaths += $methodData['executablePaths']; $this->numExecutedPaths += $methodData['executedPaths']; foreach (range($method['startLine'], $method['endLine']) as $lineNumber) { $this->codeUnitsByLine[$lineNumber] = [ &$this->traits[$traitName], &$this->traits[$traitName]['methods'][$methodName], ]; } } } } /** * @psalm-param array $functions */ private function processFunctions(array $functions): void { $link = $this->id() . '.html#'; foreach ($functions as $functionName => $function) { $this->functions[$functionName] = [ 'functionName' => $functionName, 'namespace' => $function['namespace'], 'signature' => $function['signature'], 'startLine' => $function['startLine'], 'endLine' => $function['endLine'], 'executableLines' => 0, 'executedLines' => 0, 'executableBranches' => 0, 'executedBranches' => 0, 'executablePaths' => 0, 'executedPaths' => 0, 'ccn' => $function['ccn'], 'coverage' => 0, 'crap' => 0, 'link' => $link . $function['startLine'], ]; foreach (range($function['startLine'], $function['endLine']) as $lineNumber) { $this->codeUnitsByLine[$lineNumber] = [&$this->functions[$functionName]]; } if (isset($this->functionCoverageData[$functionName]['branches'])) { $this->functions[$functionName]['executableBranches'] = count( $this->functionCoverageData[$functionName]['branches'] ); $this->functions[$functionName]['executedBranches'] = count( array_filter( $this->functionCoverageData[$functionName]['branches'], static function (array $branch) { return (bool) $branch['hit']; } ) ); } if (isset($this->functionCoverageData[$functionName]['paths'])) { $this->functions[$functionName]['executablePaths'] = count( $this->functionCoverageData[$functionName]['paths'] ); $this->functions[$functionName]['executedPaths'] = count( array_filter( $this->functionCoverageData[$functionName]['paths'], static function (array $path) { return (bool) $path['hit']; } ) ); } $this->numExecutableBranches += $this->functions[$functionName]['executableBranches']; $this->numExecutedBranches += $this->functions[$functionName]['executedBranches']; $this->numExecutablePaths += $this->functions[$functionName]['executablePaths']; $this->numExecutedPaths += $this->functions[$functionName]['executedPaths']; } } /** * @psalm-param CodeUnitMethodType $method * * @psalm-return ProcessedMethodType */ private function newMethod(string $className, string $methodName, array $method, string $link): array { $methodData = [ 'methodName' => $methodName, 'visibility' => $method['visibility'], 'signature' => $method['signature'], 'startLine' => $method['startLine'], 'endLine' => $method['endLine'], 'executableLines' => 0, 'executedLines' => 0, 'executableBranches' => 0, 'executedBranches' => 0, 'executablePaths' => 0, 'executedPaths' => 0, 'ccn' => $method['ccn'], 'coverage' => 0, 'crap' => 0, 'link' => $link . $method['startLine'], ]; $key = $className . '->' . $methodName; if (isset($this->functionCoverageData[$key]['branches'])) { $methodData['executableBranches'] = count( $this->functionCoverageData[$key]['branches'] ); $methodData['executedBranches'] = count( array_filter( $this->functionCoverageData[$key]['branches'], static function (array $branch) { return (bool) $branch['hit']; } ) ); } if (isset($this->functionCoverageData[$key]['paths'])) { $methodData['executablePaths'] = count( $this->functionCoverageData[$key]['paths'] ); $methodData['executedPaths'] = count( array_filter( $this->functionCoverageData[$key]['paths'], static function (array $path) { return (bool) $path['hit']; } ) ); } return $methodData; } } PKs[UmSSNode/Builder.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Node; use const DIRECTORY_SEPARATOR; use function array_shift; use function basename; use function count; use function dirname; use function explode; use function implode; use function is_file; use function str_ends_with; use function str_replace; use function str_starts_with; use function substr; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\Data\ProcessedCodeCoverageData; use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * * @psalm-import-type TestType from \SebastianBergmann\CodeCoverage\CodeCoverage */ final class Builder { private readonly FileAnalyser $analyser; public function __construct(FileAnalyser $analyser) { $this->analyser = $analyser; } public function build(CodeCoverage $coverage): Directory { $data = clone $coverage->getData(); // clone because path munging is destructive to the original data $commonPath = $this->reducePaths($data); $root = new Directory( $commonPath, null ); $this->addItems( $root, $this->buildDirectoryStructure($data), $coverage->getTests() ); return $root; } /** * @psalm-param array $tests */ private function addItems(Directory $root, array $items, array $tests): void { foreach ($items as $key => $value) { $key = (string) $key; if (str_ends_with($key, '/f')) { $key = substr($key, 0, -2); $filename = $root->pathAsString() . DIRECTORY_SEPARATOR . $key; if (is_file($filename)) { $root->addFile( new File( $key, $root, $value['lineCoverage'], $value['functionCoverage'], $tests, $this->analyser->classesIn($filename), $this->analyser->traitsIn($filename), $this->analyser->functionsIn($filename), $this->analyser->linesOfCodeFor($filename) ) ); } } else { $child = $root->addDirectory($key); $this->addItems($child, $value, $tests); } } } /** * Builds an array representation of the directory structure. * * For instance, * * * Array * ( * [Money.php] => Array * ( * ... * ) * * [MoneyBag.php] => Array * ( * ... * ) * ) * * * is transformed into * * * Array * ( * [.] => Array * ( * [Money.php] => Array * ( * ... * ) * * [MoneyBag.php] => Array * ( * ... * ) * ) * ) * * * @psalm-return array, functionCoverage: array>}>> */ private function buildDirectoryStructure(ProcessedCodeCoverageData $data): array { $result = []; foreach ($data->coveredFiles() as $originalPath) { $path = explode(DIRECTORY_SEPARATOR, $originalPath); $pointer = &$result; $max = count($path); for ($i = 0; $i < $max; $i++) { $type = ''; if ($i === ($max - 1)) { $type = '/f'; } $pointer = &$pointer[$path[$i] . $type]; } $pointer = [ 'lineCoverage' => $data->lineCoverage()[$originalPath] ?? [], 'functionCoverage' => $data->functionCoverage()[$originalPath] ?? [], ]; } return $result; } /** * Reduces the paths by cutting the longest common start path. * * For instance, * * * Array * ( * [/home/sb/Money/Money.php] => Array * ( * ... * ) * * [/home/sb/Money/MoneyBag.php] => Array * ( * ... * ) * ) * * * is reduced to * * * Array * ( * [Money.php] => Array * ( * ... * ) * * [MoneyBag.php] => Array * ( * ... * ) * ) * */ private function reducePaths(ProcessedCodeCoverageData $coverage): string { if (empty($coverage->coveredFiles())) { return '.'; } $commonPath = ''; $paths = $coverage->coveredFiles(); if (count($paths) === 1) { $commonPath = dirname($paths[0]) . DIRECTORY_SEPARATOR; $coverage->renameFile($paths[0], basename($paths[0])); return $commonPath; } $max = count($paths); for ($i = 0; $i < $max; $i++) { // strip phar:// prefixes if (str_starts_with($paths[$i], 'phar://')) { $paths[$i] = substr($paths[$i], 7); $paths[$i] = str_replace('/', DIRECTORY_SEPARATOR, $paths[$i]); } $paths[$i] = explode(DIRECTORY_SEPARATOR, $paths[$i]); if (empty($paths[$i][0])) { $paths[$i][0] = DIRECTORY_SEPARATOR; } } $done = false; $max = count($paths); while (!$done) { for ($i = 0; $i < $max - 1; $i++) { if (!isset($paths[$i][0]) || !isset($paths[$i + 1][0]) || $paths[$i][0] !== $paths[$i + 1][0]) { $done = true; break; } } if (!$done) { $commonPath .= $paths[0][0]; if ($paths[0][0] !== DIRECTORY_SEPARATOR) { $commonPath .= DIRECTORY_SEPARATOR; } for ($i = 0; $i < $max; $i++) { array_shift($paths[$i]); } } } $original = $coverage->coveredFiles(); $max = count($original); for ($i = 0; $i < $max; $i++) { $coverage->renameFile($original[$i], implode(DIRECTORY_SEPARATOR, $paths[$i])); } return substr($commonPath, 0, -1); } } PKs[bIqqNode/Iterator.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Node; use function count; use RecursiveIterator; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage */ final class Iterator implements RecursiveIterator { private int $position; /** * @var list */ private readonly array $nodes; public function __construct(Directory $node) { $this->nodes = $node->children(); } /** * Rewinds the Iterator to the first element. */ public function rewind(): void { $this->position = 0; } /** * Checks if there is a current element after calls to rewind() or next(). */ public function valid(): bool { return $this->position < count($this->nodes); } /** * Returns the key of the current element. */ public function key(): int { return $this->position; } /** * Returns the current element. */ public function current(): ?AbstractNode { return $this->valid() ? $this->nodes[$this->position] : null; } /** * Moves forward to next element. */ public function next(): void { $this->position++; } /** * Returns the sub iterator for the current element. */ public function getChildren(): self { return new self($this->nodes[$this->position]); } /** * Checks whether the current element has children. */ public function hasChildren(): bool { return $this->nodes[$this->position] instanceof Directory; } } PKs[)(jjNode/AbstractNode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CodeCoverage\Node; use const DIRECTORY_SEPARATOR; use function array_merge; use function str_ends_with; use function str_replace; use function substr; use Countable; use SebastianBergmann\CodeCoverage\Util\Percentage; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage * * @psalm-import-type LinesOfCodeType from \SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser * @psalm-import-type ProcessedFunctionType from \SebastianBergmann\CodeCoverage\Node\File * @psalm-import-type ProcessedClassType from \SebastianBergmann\CodeCoverage\Node\File * @psalm-import-type ProcessedTraitType from \SebastianBergmann\CodeCoverage\Node\File */ abstract class AbstractNode implements Countable { private readonly string $name; private string $pathAsString; private array $pathAsArray; private readonly ?AbstractNode $parent; private string $id; public function __construct(string $name, self $parent = null) { if (str_ends_with($name, DIRECTORY_SEPARATOR)) { $name = substr($name, 0, -1); } $this->name = $name; $this->parent = $parent; $this->processId(); $this->processPath(); } public function name(): string { return $this->name; } public function id(): string { return $this->id; } public function pathAsString(): string { return $this->pathAsString; } public function pathAsArray(): array { return $this->pathAsArray; } public function parent(): ?self { return $this->parent; } public function percentageOfTestedClasses(): Percentage { return Percentage::fromFractionAndTotal( $this->numberOfTestedClasses(), $this->numberOfClasses(), ); } public function percentageOfTestedTraits(): Percentage { return Percentage::fromFractionAndTotal( $this->numberOfTestedTraits(), $this->numberOfTraits(), ); } public function percentageOfTestedClassesAndTraits(): Percentage { return Percentage::fromFractionAndTotal( $this->numberOfTestedClassesAndTraits(), $this->numberOfClassesAndTraits(), ); } public function percentageOfTestedFunctions(): Percentage { return Percentage::fromFractionAndTotal( $this->numberOfTestedFunctions(), $this->numberOfFunctions(), ); } public function percentageOfTestedMethods(): Percentage { return Percentage::fromFractionAndTotal( $this->numberOfTestedMethods(), $this->numberOfMethods(), ); } public function percentageOfTestedFunctionsAndMethods(): Percentage { return Percentage::fromFractionAndTotal( $this->numberOfTestedFunctionsAndMethods(), $this->numberOfFunctionsAndMethods(), ); } public function percentageOfExecutedLines(): Percentage { return Percentage::fromFractionAndTotal( $this->numberOfExecutedLines(), $this->numberOfExecutableLines(), ); } public function percentageOfExecutedBranches(): Percentage { return Percentage::fromFractionAndTotal( $this->numberOfExecutedBranches(), $this->numberOfExecutableBranches() ); } public function percentageOfExecutedPaths(): Percentage { return Percentage::fromFractionAndTotal( $this->numberOfExecutedPaths(), $this->numberOfExecutablePaths() ); } public function numberOfClassesAndTraits(): int { return $this->numberOfClasses() + $this->numberOfTraits(); } public function numberOfTestedClassesAndTraits(): int { return $this->numberOfTestedClasses() + $this->numberOfTestedTraits(); } public function classesAndTraits(): array { return array_merge($this->classes(), $this->traits()); } public function numberOfFunctionsAndMethods(): int { return $this->numberOfFunctions() + $this->numberOfMethods(); } public function numberOfTestedFunctionsAndMethods(): int { return $this->numberOfTestedFunctions() + $this->numberOfTestedMethods(); } /** * @psalm-return array */ abstract public function classes(): array; /** * @psalm-return array */ abstract public function traits(): array; /** * @psalm-return array */ abstract public function functions(): array; /** * @psalm-return LinesOfCodeType */ abstract public function linesOfCode(): array; abstract public function numberOfExecutableLines(): int; abstract public function numberOfExecutedLines(): int; abstract public function numberOfExecutableBranches(): int; abstract public function numberOfExecutedBranches(): int; abstract public function numberOfExecutablePaths(): int; abstract public function numberOfExecutedPaths(): int; abstract public function numberOfClasses(): int; abstract public function numberOfTestedClasses(): int; abstract public function numberOfTraits(): int; abstract public function numberOfTestedTraits(): int; abstract public function numberOfMethods(): int; abstract public function numberOfTestedMethods(): int; abstract public function numberOfFunctions(): int; abstract public function numberOfTestedFunctions(): int; private function processId(): void { if ($this->parent === null) { $this->id = 'index'; return; } $parentId = $this->parent->id(); if ($parentId === 'index') { $this->id = str_replace(':', '_', $this->name); } else { $this->id = $parentId . '/' . $this->name; } } private function processPath(): void { if ($this->parent === null) { $this->pathAsArray = [$this]; $this->pathAsString = $this->name; return; } $this->pathAsArray = $this->parent->pathAsArray(); $this->pathAsString = $this->parent->pathAsString() . DIRECTORY_SEPARATOR . $this->name; $this->pathAsArray[] = $this; } } PKs[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann; use function end; use function explode; use function fclose; use function is_dir; use function is_resource; use function proc_close; use function proc_open; use function stream_get_contents; use function substr_count; use function trim; final class Version { private readonly string $version; public function __construct(string $release, string $path) { $this->version = $this->generate($release, $path); } public function asString(): string { return $this->version; } private function generate(string $release, string $path): string { if (substr_count($release, '.') + 1 === 3) { $version = $release; } else { $version = $release . '-dev'; } $git = $this->getGitInformation($path); if (!$git) { return $version; } if (substr_count($release, '.') + 1 === 3) { return $git; } $git = explode('-', $git); return $release . '-' . end($git); } private function getGitInformation(string $path): bool|string { if (!is_dir($path . DIRECTORY_SEPARATOR . '.git')) { return false; } $process = proc_open( 'git describe --tags', [ 1 => ['pipe', 'w'], 2 => ['pipe', 'w'], ], $pipes, $path ); if (!is_resource($process)) { return false; } $result = trim(stream_get_contents($pipes[1])); fclose($pipes[1]); fclose($pipes[2]); $returnCode = proc_close($process); if ($returnCode !== 0) { return false; } return $result; } } PKs[52exceptions/OptionDoesNotAllowArgumentException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CliParser; use function sprintf; use RuntimeException; final class OptionDoesNotAllowArgumentException extends RuntimeException implements Exception { public function __construct(string $option) { parent::__construct( sprintf( 'Option "%s" does not allow an argument', $option ) ); } } PKs[zz%exceptions/UnknownOptionException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CliParser; use function sprintf; use RuntimeException; final class UnknownOptionException extends RuntimeException implements Exception { public function __construct(string $option) { parent::__construct( sprintf( 'Unknown option "%s"', $option ) ); } } PKs[='exceptions/AmbiguousOptionException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CliParser; use function sprintf; use RuntimeException; final class AmbiguousOptionException extends RuntimeException implements Exception { public function __construct(string $option) { parent::__construct( sprintf( 'Option "%s" is ambiguous', $option ) ); } } PKs[CPexceptions/error_lognu[[19-Nov-2025 13:26:22 UTC] PHP Fatal error: Uncaught Error: Interface "SebastianBergmann\CliParser\Exception" not found in /home/fluxyjvi/public_html/project/vendor/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php on line 15 [19-Nov-2025 19:39:36 UTC] PHP Fatal error: Uncaught Error: Interface "SebastianBergmann\CliParser\Exception" not found in /home/fluxyjvi/public_html/project/vendor/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php on line 15 [20-Nov-2025 01:37:41 UTC] PHP Fatal error: Uncaught Error: Interface "SebastianBergmann\CliParser\Exception" not found in /home/fluxyjvi/public_html/project/vendor/sebastian/cli-parser/src/exceptions/UnknownOptionException.php:15 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/sebastian/cli-parser/src/exceptions/UnknownOptionException.php on line 15 PKs[w~5exceptions/RequiredOptionArgumentMissingException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\CliParser; use function sprintf; use RuntimeException; final class RequiredOptionArgumentMissingException extends RuntimeException implements Exception { public function __construct(string $option) { parent::__construct( sprintf( 'Required argument for option "%s" is missing', $option ) ); } } PKt[jE Restorer.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\GlobalState; use function array_diff; use function array_key_exists; use function array_keys; use function array_merge; use function in_array; use function is_array; use ReflectionClass; use ReflectionProperty; final class Restorer { public function restoreGlobalVariables(Snapshot $snapshot): void { $superGlobalArrays = $snapshot->superGlobalArrays(); foreach ($superGlobalArrays as $superGlobalArray) { $this->restoreSuperGlobalArray($snapshot, $superGlobalArray); } $globalVariables = $snapshot->globalVariables(); foreach (array_keys($GLOBALS) as $key) { if ($key !== 'GLOBALS' && !in_array($key, $superGlobalArrays, true) && !$snapshot->excludeList()->isGlobalVariableExcluded($key)) { if (array_key_exists($key, $globalVariables)) { $GLOBALS[$key] = $globalVariables[$key]; } else { unset($GLOBALS[$key]); } } } } public function restoreStaticProperties(Snapshot $snapshot): void { $current = new Snapshot($snapshot->excludeList(), false, false, false, false, true, false, false, false, false); $newClasses = array_diff($current->classes(), $snapshot->classes()); unset($current); foreach ($snapshot->staticProperties() as $className => $staticProperties) { foreach ($staticProperties as $name => $value) { $reflector = new ReflectionProperty($className, $name); $reflector->setValue(null, $value); } } foreach ($newClasses as $className) { $class = new ReflectionClass($className); $defaults = $class->getDefaultProperties(); foreach ($class->getProperties() as $property) { if (!$property->isStatic()) { continue; } $name = $property->getName(); if ($snapshot->excludeList()->isStaticPropertyExcluded($className, $name)) { continue; } if (!isset($defaults[$name])) { continue; } $property->setValue(null, $defaults[$name]); } } } private function restoreSuperGlobalArray(Snapshot $snapshot, string $superGlobalArray): void { $superGlobalVariables = $snapshot->superGlobalVariables(); if (isset($GLOBALS[$superGlobalArray], $superGlobalVariables[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])) { $keys = array_keys( array_merge( $GLOBALS[$superGlobalArray], $superGlobalVariables[$superGlobalArray] ) ); foreach ($keys as $key) { if (isset($superGlobalVariables[$superGlobalArray][$key])) { $GLOBALS[$superGlobalArray][$key] = $superGlobalVariables[$superGlobalArray][$key]; } else { unset($GLOBALS[$superGlobalArray][$key]); } } } } } PKt[G ExcludeList.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\GlobalState; use function in_array; use function strpos; use ReflectionClass; final class ExcludeList { private array $globalVariables = []; private array $classes = []; private array $classNamePrefixes = []; private array $parentClasses = []; private array $interfaces = []; private array $staticProperties = []; public function addGlobalVariable(string $variableName): void { $this->globalVariables[$variableName] = true; } public function addClass(string $className): void { $this->classes[] = $className; } public function addSubclassesOf(string $className): void { $this->parentClasses[] = $className; } public function addImplementorsOf(string $interfaceName): void { $this->interfaces[] = $interfaceName; } public function addClassNamePrefix(string $classNamePrefix): void { $this->classNamePrefixes[] = $classNamePrefix; } public function addStaticProperty(string $className, string $propertyName): void { if (!isset($this->staticProperties[$className])) { $this->staticProperties[$className] = []; } $this->staticProperties[$className][$propertyName] = true; } public function isGlobalVariableExcluded(string $variableName): bool { return isset($this->globalVariables[$variableName]); } /** * @psalm-param class-string $className */ public function isStaticPropertyExcluded(string $className, string $propertyName): bool { if (in_array($className, $this->classes, true)) { return true; } foreach ($this->classNamePrefixes as $prefix) { if (strpos($className, $prefix) === 0) { return true; } } $class = new ReflectionClass($className); foreach ($this->parentClasses as $type) { if ($class->isSubclassOf($type)) { return true; } } foreach ($this->interfaces as $type) { if ($class->implementsInterface($type)) { return true; } } return isset($this->staticProperties[$className][$propertyName]); } } PKt[KP; ; CodeExporter.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\GlobalState; use const PHP_EOL; use function is_array; use function is_scalar; use function serialize; use function sprintf; use function var_export; final class CodeExporter { public function constants(Snapshot $snapshot): string { $result = ''; foreach ($snapshot->constants() as $name => $value) { $result .= sprintf( 'if (!defined(\'%s\')) define(\'%s\', %s);' . "\n", $name, $name, $this->exportVariable($value) ); } return $result; } public function globalVariables(Snapshot $snapshot): string { $result = <<<'EOT' call_user_func( function () { foreach (array_keys($GLOBALS) as $key) { unset($GLOBALS[$key]); } } ); EOT; foreach ($snapshot->globalVariables() as $name => $value) { $result .= sprintf( '$GLOBALS[%s] = %s;' . PHP_EOL, $this->exportVariable($name), $this->exportVariable($value) ); } return $result; } public function iniSettings(Snapshot $snapshot): string { $result = ''; foreach ($snapshot->iniSettings() as $key => $value) { $result .= sprintf( '@ini_set(%s, %s);' . "\n", $this->exportVariable($key), $this->exportVariable($value) ); } return $result; } private function exportVariable(mixed $variable): string { if (is_scalar($variable) || null === $variable || (is_array($variable) && $this->arrayOnlyContainsScalars($variable))) { return var_export($variable, true); } return 'unserialize(' . var_export(serialize($variable), true) . ')'; } private function arrayOnlyContainsScalars(array $array): bool { $result = true; foreach ($array as $element) { if (is_array($element)) { $result = $this->arrayOnlyContainsScalars($element); } elseif (!is_scalar($element) && null !== $element) { $result = false; } if ($result === false) { break; } } return $result; } } PKt[}'f(f( Snapshot.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\GlobalState; use function array_keys; use function array_merge; use function array_reverse; use function assert; use function func_get_args; use function get_declared_classes; use function get_declared_interfaces; use function get_declared_traits; use function get_defined_constants; use function get_defined_functions; use function get_included_files; use function in_array; use function ini_get_all; use function is_array; use function is_object; use function is_resource; use function is_scalar; use function serialize; use function unserialize; use ReflectionClass; use SebastianBergmann\ObjectReflector\ObjectReflector; use SebastianBergmann\RecursionContext\Context; use Throwable; /** * A snapshot of global state. */ class Snapshot { private ExcludeList $excludeList; private array $globalVariables = []; private array $superGlobalArrays = []; private array $superGlobalVariables = []; private array $staticProperties = []; private array $iniSettings = []; private array $includedFiles = []; private array $constants = []; private array $functions = []; private array $interfaces = []; private array $classes = []; private array $traits = []; public function __construct(ExcludeList $excludeList = null, bool $includeGlobalVariables = true, bool $includeStaticProperties = true, bool $includeConstants = true, bool $includeFunctions = true, bool $includeClasses = true, bool $includeInterfaces = true, bool $includeTraits = true, bool $includeIniSettings = true, bool $includeIncludedFiles = true) { $this->excludeList = $excludeList ?: new ExcludeList; if ($includeConstants) { $this->snapshotConstants(); } if ($includeFunctions) { $this->snapshotFunctions(); } if ($includeClasses || $includeStaticProperties) { $this->snapshotClasses(); } if ($includeInterfaces) { $this->snapshotInterfaces(); } if ($includeGlobalVariables) { $this->setupSuperGlobalArrays(); $this->snapshotGlobals(); } if ($includeStaticProperties) { $this->snapshotStaticProperties(); } if ($includeIniSettings) { $this->iniSettings = ini_get_all(null, false); } if ($includeIncludedFiles) { $this->includedFiles = get_included_files(); } if ($includeTraits) { $this->traits = get_declared_traits(); } } public function excludeList(): ExcludeList { return $this->excludeList; } public function globalVariables(): array { return $this->globalVariables; } public function superGlobalVariables(): array { return $this->superGlobalVariables; } public function superGlobalArrays(): array { return $this->superGlobalArrays; } public function staticProperties(): array { return $this->staticProperties; } public function iniSettings(): array { return $this->iniSettings; } public function includedFiles(): array { return $this->includedFiles; } public function constants(): array { return $this->constants; } public function functions(): array { return $this->functions; } public function interfaces(): array { return $this->interfaces; } public function classes(): array { return $this->classes; } public function traits(): array { return $this->traits; } private function snapshotConstants(): void { $constants = get_defined_constants(true); if (isset($constants['user'])) { $this->constants = $constants['user']; } } private function snapshotFunctions(): void { $functions = get_defined_functions(); $this->functions = $functions['user']; } private function snapshotClasses(): void { foreach (array_reverse(get_declared_classes()) as $className) { $class = new ReflectionClass($className); if (!$class->isUserDefined()) { break; } $this->classes[] = $className; } $this->classes = array_reverse($this->classes); } private function snapshotInterfaces(): void { foreach (array_reverse(get_declared_interfaces()) as $interfaceName) { $class = new ReflectionClass($interfaceName); if (!$class->isUserDefined()) { break; } $this->interfaces[] = $interfaceName; } $this->interfaces = array_reverse($this->interfaces); } private function snapshotGlobals(): void { $superGlobalArrays = $this->superGlobalArrays(); foreach ($superGlobalArrays as $superGlobalArray) { $this->snapshotSuperGlobalArray($superGlobalArray); } foreach (array_keys($GLOBALS) as $key) { if ($key !== 'GLOBALS' && !in_array($key, $superGlobalArrays, true) && $this->canBeSerialized($GLOBALS[$key]) && !$this->excludeList->isGlobalVariableExcluded($key)) { /* @noinspection UnserializeExploitsInspection */ $this->globalVariables[$key] = unserialize(serialize($GLOBALS[$key])); } } } private function snapshotSuperGlobalArray(string $superGlobalArray): void { $this->superGlobalVariables[$superGlobalArray] = []; if (isset($GLOBALS[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])) { foreach ($GLOBALS[$superGlobalArray] as $key => $value) { /* @noinspection UnserializeExploitsInspection */ $this->superGlobalVariables[$superGlobalArray][$key] = unserialize(serialize($value)); } } } private function snapshotStaticProperties(): void { foreach ($this->classes as $className) { $class = new ReflectionClass($className); $snapshot = []; foreach ($class->getProperties() as $property) { if ($property->isStatic()) { $name = $property->getName(); if ($this->excludeList->isStaticPropertyExcluded($className, $name)) { continue; } if (!$property->isInitialized()) { continue; } $value = $property->getValue(); if ($this->canBeSerialized($value)) { /* @noinspection UnserializeExploitsInspection */ $snapshot[$name] = unserialize(serialize($value)); } } } if (!empty($snapshot)) { $this->staticProperties[$className] = $snapshot; } } } private function setupSuperGlobalArrays(): void { $this->superGlobalArrays = [ '_ENV', '_POST', '_GET', '_COOKIE', '_SERVER', '_FILES', '_REQUEST', ]; } private function canBeSerialized(mixed $variable): bool { if (is_scalar($variable) || $variable === null) { return true; } if (is_resource($variable)) { return false; } foreach ($this->enumerateObjectsAndResources($variable) as $value) { if (is_resource($value)) { return false; } if (is_object($value)) { $class = new ReflectionClass($value); if ($class->isAnonymous()) { return false; } try { @serialize($value); } catch (Throwable $t) { return false; } } } return true; } private function enumerateObjectsAndResources(mixed $variable): array { if (isset(func_get_args()[1])) { $processed = func_get_args()[1]; } else { $processed = new Context; } assert($processed instanceof Context); $result = []; if ($processed->contains($variable)) { return $result; } $array = $variable; /* @noinspection UnusedFunctionResultInspection */ $processed->add($variable); if (is_array($variable)) { foreach ($array as $element) { if (!is_array($element) && !is_object($element) && !is_resource($element)) { continue; } if (!is_resource($element)) { /** @noinspection SlowArrayOperationsInLoopInspection */ $result = array_merge( $result, $this->enumerateObjectsAndResources($element, $processed) ); } else { $result[] = $element; } } } else { $result[] = $variable; foreach ((new ObjectReflector)->getProperties($variable) as $value) { if (!is_array($value) && !is_object($value) && !is_resource($value)) { continue; } if (!is_resource($value)) { /** @noinspection SlowArrayOperationsInLoopInspection */ $result = array_merge( $result, $this->enumerateObjectsAndResources($value, $processed) ); } else { $result[] = $value; } } } return $result; } } PKt[{b$ $ Arguments/ArgumentReducers.phpnu[ */ public $argumentReducers = []; /** * @param array> $argumentReducers */ public static function create(array $argumentReducers): self { return new self(array_map( function ($argumentReducer) { /** @var $argumentReducer ArgumentReducer|class-string */ return $argumentReducer instanceof ArgumentReducer ? $argumentReducer : new $argumentReducer(); }, $argumentReducers )); } public static function default(array $extra = []): self { return new self(static::defaultReducers($extra)); } public static function minimal(array $extra = []): self { return new self(static::minimalReducers($extra)); } /** * @param array $argumentReducers */ protected function __construct(array $argumentReducers) { $this->argumentReducers = $argumentReducers; } protected static function defaultReducers(array $extra = []): array { return array_merge($extra, [ new BaseTypeArgumentReducer(), new ArrayArgumentReducer(), new StdClassArgumentReducer(), new EnumArgumentReducer(), new ClosureArgumentReducer(), new SensitiveParameterArrayReducer(), new DateTimeArgumentReducer(), new DateTimeZoneArgumentReducer(), new SymphonyRequestArgumentReducer(), new StringableArgumentReducer(), ]); } protected static function minimalReducers(array $extra = []): array { return array_merge($extra, [ new BaseTypeArgumentReducer(), new MinimalArrayArgumentReducer(), new EnumArgumentReducer(), new ClosureArgumentReducer(), new SensitiveParameterArrayReducer(), ]); } } PKt[1E5Arguments/ReducedArgument/VariadicReducedArgument.phpnu[ $item) { if (! $item instanceof ReducedArgument) { throw new Exception('VariadicReducedArgument must be an array of ReducedArgument'); } $value[$key] = $item->value; } parent::__construct($value, 'array'); } } PKt[/Arguments/ReducedArgument/UnReducedArgument.phpnu[originalType = $originalType; $this->value = $value; } } PKt[،'ee5Arguments/ReducedArgument/ReducedArgumentContract.phpnu[name, get_class($argument), ); } } PKt[8abb2Arguments/Reducers/MinimalArrayArgumentReducer.phpnu[getName(), get_class($argument), ); } } PKt[ݩ-5Arguments/Reducers/SymphonyRequestArgumentReducer.phpnu[getMethod()} {$argument->getUri()}", get_class($argument), ); } } PKt[ D5Arguments/Reducers/SensitiveParameterArrayReducer.phpnu[getValue()).')', get_class($argument) ); } } PKt[Lk.Arguments/Reducers/DateTimeArgumentReducer.phpnu[format('d M Y H:i:s e'), get_class($argument), ); } } PKt[XR-Arguments/Reducers/ClosureArgumentReducer.phpnu[getFileName() && $reflection->getStartLine() && $reflection->getEndLine()) { return new ReducedArgument( "{$reflection->getFileName()}:{$reflection->getStartLine()}-{$reflection->getEndLine()}", 'Closure' ); } return new ReducedArgument("{$reflection->getFileName()}", 'Closure'); } } PKt[1K.Arguments/Reducers/BaseTypeArgumentReducer.phpnu[reduceArgumentPayloadAction = new ReduceArgumentPayloadAction(ArgumentReducers::minimal()); } public function execute($argument): ReducedArgumentContract { if (! is_array($argument)) { return UnReducedArgument::create(); } return $this->reduceArgument($argument, 'array'); } protected function reduceArgument(array $argument, string $originalType): ReducedArgumentContract { foreach ($argument as $key => $value) { $argument[$key] = $this->reduceArgumentPayloadAction->reduce( $value, true )->value; } if (count($argument) > $this->maxArraySize) { return new TruncatedReducedArgument( array_slice($argument, 0, $this->maxArraySize), 'array' ); } return new ReducedArgument($argument, $originalType); } } PKt[R  &Arguments/Reducers/ArgumentReducer.phpnu[getName(), $parameter->isPassedByReference(), $parameter->isVariadic(), $parameter->isDefaultValueAvailable(), $parameter->isDefaultValueAvailable() ? $parameter->getDefaultValue() : null, ); } public static function fromNonReflectableParameter( int $index ): self { return new self( "arg{$index}", false, ); } public function __construct( string $name, bool $passedByReference = false, bool $isVariadic = false, bool $hasDefaultValue = false, $defaultValue = null, bool $defaultValueUsed = false, bool $truncated = false, $reducedValue = null, ?string $originalType = null ) { $this->originalType = $originalType; $this->reducedValue = $reducedValue; $this->truncated = $truncated; $this->defaultValueUsed = $defaultValueUsed; $this->defaultValue = $defaultValue; $this->hasDefaultValue = $hasDefaultValue; $this->isVariadic = $isVariadic; $this->passedByReference = $passedByReference; $this->name = $name; if ($this->isVariadic) { $this->defaultValue = []; } } public function setReducedArgument( ReducedArgument $reducedArgument ): self { $this->reducedValue = $reducedArgument->value; $this->originalType = $reducedArgument->originalType; if ($reducedArgument instanceof TruncatedReducedArgument) { $this->truncated = true; } return $this; } public function defaultValueUsed(): self { $this->defaultValueUsed = true; $this->originalType = get_debug_type($this->defaultValue); return $this; } public function toArray(): array { return [ 'name' => $this->name, 'value' => $this->defaultValueUsed ? $this->defaultValue : $this->reducedValue, 'original_type' => $this->originalType, 'passed_by_reference' => $this->passedByReference, 'is_variadic' => $this->isVariadic, 'truncated' => $this->truncated, ]; } } PKt[rǶ)Arguments/ReduceArgumentPayloadAction.phpnu[argumentReducers = $argumentReducers; } public function reduce($argument, bool $includeObjectType = false): ReducedArgument { foreach ($this->argumentReducers->argumentReducers as $reducer) { $reduced = $reducer->execute($argument); if ($reduced instanceof ReducedArgument) { return $reduced; } } if (gettype($argument) === 'object' && $includeObjectType) { return new ReducedArgument( 'object ('.get_class($argument).')', get_debug_type($argument), ); } if (gettype($argument) === 'object') { return new ReducedArgument('object', get_debug_type($argument), ); } return new ReducedArgument( $argument, get_debug_type($argument), ); } } PKt[#Arguments/ReduceArgumentsAction.phpnu[argumentReducers = $argumentReducers; $this->reduceArgumentPayloadAction = new ReduceArgumentPayloadAction($argumentReducers); } public function execute( ?string $class, ?string $method, ?array $frameArguments ): ?array { try { if ($frameArguments === null) { return null; } $parameters = $this->getParameters($class, $method); if ($parameters === null) { $arguments = []; foreach ($frameArguments as $index => $argument) { $arguments[$index] = ProvidedArgument::fromNonReflectableParameter($index) ->setReducedArgument($this->reduceArgumentPayloadAction->reduce($argument)) ->toArray(); } return $arguments; } $arguments = array_map( function ($argument) { return $this->reduceArgumentPayloadAction->reduce($argument); }, $frameArguments, ); $argumentsCount = count($arguments); $hasVariadicParameter = false; foreach ($parameters as $index => $parameter) { if ($index + 1 > $argumentsCount) { $parameter->defaultValueUsed(); } elseif ($parameter->isVariadic) { $parameter->setReducedArgument(new VariadicReducedArgument(array_slice($arguments, $index))); $hasVariadicParameter = true; } else { $parameter->setReducedArgument($arguments[$index]); } $parameters[$index] = $parameter->toArray(); } if ($this->moreArgumentsProvidedThanParameters($arguments, $parameters, $hasVariadicParameter)) { for ($i = count($parameters); $i < count($arguments); $i++) { $parameters[$i] = ProvidedArgument::fromNonReflectableParameter(count($parameters)) ->setReducedArgument($arguments[$i]) ->toArray(); } } return $parameters; } catch (Throwable $e) { return null; } } /** @return null|Array<\Spatie\Backtrace\Arguments\ProvidedArgument> */ protected function getParameters( ?string $class, ?string $method ): ?array { try { $reflection = $class !== null ? new ReflectionMethod($class, $method) : new ReflectionFunction($method); } catch (ReflectionException $e) { return null; } return array_map( function (ReflectionParameter $reflectionParameter) { return ProvidedArgument::fromReflectionParameter($reflectionParameter); }, $reflection->getParameters(), ); } protected function moreArgumentsProvidedThanParameters( array $arguments, array $parameters, bool $hasVariadicParameter ): bool { return count($arguments) > count($parameters) && ! $hasVariadicParameter; } } PKt[1File.phpnu[file = new SplFileObject($path); } public function numberOfLines(): int { $this->file->seek(PHP_INT_MAX); return $this->file->key() + 1; } public function getLine(int $lineNumber = null): string { if (is_null($lineNumber)) { return $this->getNextLine(); } $this->file->seek($lineNumber - 1); return $this->file->current(); } public function getNextLine(): string { $this->file->next(); return $this->file->current(); } } PKt[,7CodeSnippet.phpnu[surroundingLine = $surroundingLine; return $this; } public function snippetLineCount(int $snippetLineCount): self { $this->snippetLineCount = $snippetLineCount; return $this; } public function get(string $fileName): array { if (! file_exists($fileName)) { return []; } try { $file = new File($fileName); [$startLineNumber, $endLineNumber] = $this->getBounds($file->numberOfLines()); $code = []; $line = $file->getLine($startLineNumber); $currentLineNumber = $startLineNumber; while ($currentLineNumber <= $endLineNumber) { $code[$currentLineNumber] = rtrim(substr($line, 0, 250)); $line = $file->getNextLine(); $currentLineNumber++; } return $code; } catch (RuntimeException $exception) { return []; } } public function getAsString(string $fileName): string { $snippet = $this->get($fileName); $snippetStrings = array_map(function (string $line, string $number) { return "{$number} {$line}"; }, $snippet, array_keys($snippet)); return implode(PHP_EOL, $snippetStrings); } protected function getBounds(int $totalNumberOfLineInFile): array { $startLine = max($this->surroundingLine - floor($this->snippetLineCount / 2), 1); $endLine = $startLine + ($this->snippetLineCount - 1); if ($endLine > $totalNumberOfLineInFile) { $endLine = $totalNumberOfLineInFile; $startLine = max($endLine - ($this->snippetLineCount - 1), 1); } return [$startLine, $endLine]; } } PKt[CC Backtrace.phpnu[|ArgumentReducer>|ArgumentReducers|null */ protected $argumentReducers = null; /** @var bool */ protected $withObject = false; /** @var string|null */ protected $applicationPath; /** @var int */ protected $offset = 0; /** @var int */ protected $limit = 0; /** @var \Closure|null */ protected $startingFromFrameClosure = null; /** @var \Throwable|null */ protected $throwable = null; public static function create(): self { return new static(); } public static function createForThrowable(Throwable $throwable): self { return (new static())->forThrowable($throwable); } protected function forThrowable(Throwable $throwable): self { $this->throwable = $throwable; return $this; } public function withArguments( bool $withArguments = true ): self { $this->withArguments = $withArguments; return $this; } /** * @param array|ArgumentReducer>|ArgumentReducers|null $argumentReducers * * @return $this */ public function reduceArguments( $argumentReducers = null ): self { $this->reduceArguments = true; $this->argumentReducers = $argumentReducers; return $this; } public function withObject(): self { $this->withObject = true; return $this; } public function applicationPath(string $applicationPath): self { $this->applicationPath = rtrim($applicationPath, '/'); return $this; } public function offset(int $offset): self { $this->offset = $offset; return $this; } public function limit(int $limit): self { $this->limit = $limit; return $this; } public function startingFromFrame(Closure $startingFromFrameClosure) { $this->startingFromFrameClosure = $startingFromFrameClosure; return $this; } /** * @return \Spatie\Backtrace\Frame[] */ public function frames(): array { $rawFrames = $this->getRawFrames(); return $this->toFrameObjects($rawFrames); } public function firstApplicationFrameIndex(): ?int { foreach ($this->frames() as $index => $frame) { if ($frame->applicationFrame) { return $index; } } return null; } protected function getRawFrames(): array { if ($this->throwable) { return $this->throwable->getTrace(); } $options = null; if (! $this->withArguments) { $options = $options | DEBUG_BACKTRACE_IGNORE_ARGS; } if ($this->withObject()) { $options = $options | DEBUG_BACKTRACE_PROVIDE_OBJECT; } $limit = $this->limit; if ($limit !== 0) { $limit += 3; } return debug_backtrace($options, $limit); } /** * @return \Spatie\Backtrace\Frame[] */ protected function toFrameObjects(array $rawFrames): array { $currentFile = $this->throwable ? $this->throwable->getFile() : ''; $currentLine = $this->throwable ? $this->throwable->getLine() : 0; $arguments = $this->withArguments ? [] : null; $frames = []; $reduceArgumentsAction = new ReduceArgumentsAction($this->resolveArgumentReducers()); foreach ($rawFrames as $rawFrame) { $frames[] = new Frame( $currentFile, $currentLine, $arguments, $rawFrame['function'] ?? null, $rawFrame['class'] ?? null, $this->isApplicationFrame($currentFile) ); $arguments = $this->withArguments ? $rawFrame['args'] ?? null : null; if ($this->reduceArguments) { $arguments = $reduceArgumentsAction->execute( $rawFrame['class'] ?? null, $rawFrame['function'] ?? null, $arguments ); } $currentFile = $rawFrame['file'] ?? 'unknown'; $currentLine = $rawFrame['line'] ?? 0; } $frames[] = new Frame( $currentFile, $currentLine, [], '[top]' ); $frames = $this->removeBacktracePackageFrames($frames); if ($closure = $this->startingFromFrameClosure) { $frames = $this->startAtFrameFromClosure($frames, $closure); } $frames = array_slice($frames, $this->offset, $this->limit === 0 ? PHP_INT_MAX : $this->limit); return array_values($frames); } protected function isApplicationFrame(string $frameFilename): bool { $relativeFile = str_replace('\\', DIRECTORY_SEPARATOR, $frameFilename); if (! empty($this->applicationPath)) { $relativeFile = array_reverse(explode($this->applicationPath ?? '', $frameFilename, 2))[0]; } if (strpos($relativeFile, DIRECTORY_SEPARATOR.'vendor') === 0) { return false; } return true; } protected function removeBacktracePackageFrames(array $frames): array { return $this->startAtFrameFromClosure($frames, function (Frame $frame) { return $frame->class !== static::class; }); } /** * @param \Spatie\Backtrace\Frame[] $frames * @param \Closure $closure * * @return array */ protected function startAtFrameFromClosure(array $frames, Closure $closure): array { foreach ($frames as $i => $frame) { $foundStartingFrame = $closure($frame); if ($foundStartingFrame) { return $frames; } unset($frames[$i]); } return $frames; } protected function resolveArgumentReducers(): ArgumentReducers { if ($this->argumentReducers === null) { return ArgumentReducers::default(); } if ($this->argumentReducers instanceof ArgumentReducers) { return $this->argumentReducers; } return ArgumentReducers::create($this->argumentReducers); } } PKt[pCacheException.phpnu[ */ interface Authentication { /** * Alter the request to add the authentication credentials. * * To do that, the implementation might use pre-stored credentials or do * separate HTTP requests to obtain a valid token. * * @param RequestInterface $request The request without authentication information * * @return RequestInterface The request with added authentication information */ public function authenticate(RequestInterface $request); } PKt[rdWzz CookieJar.phpnu[ */ final class CookieJar implements \Countable, \IteratorAggregate { /** * @var \SplObjectStorage */ private $cookies; public function __construct() { $this->cookies = new \SplObjectStorage(); } /** * Checks if there is a cookie. * * @return bool */ public function hasCookie(Cookie $cookie) { return $this->cookies->contains($cookie); } /** * Adds a cookie. */ public function addCookie(Cookie $cookie) { if (!$this->hasCookie($cookie)) { $cookies = $this->getMatchingCookies($cookie); foreach ($cookies as $matchingCookie) { if ($cookie->getValue() !== $matchingCookie->getValue() || $cookie->getMaxAge() > $matchingCookie->getMaxAge()) { $this->removeCookie($matchingCookie); continue; } } if ($cookie->hasValue()) { $this->cookies->attach($cookie); } } } /** * Removes a cookie. */ public function removeCookie(Cookie $cookie) { $this->cookies->detach($cookie); } /** * Returns the cookies. * * @return Cookie[] */ public function getCookies() { $match = function ($matchCookie) { return true; }; return $this->findMatchingCookies($match); } /** * Returns all matching cookies. * * @return Cookie[] */ public function getMatchingCookies(Cookie $cookie) { $match = function ($matchCookie) use ($cookie) { return $matchCookie->match($cookie); }; return $this->findMatchingCookies($match); } /** * Finds matching cookies based on a callable. * * @return Cookie[] */ private function findMatchingCookies(callable $match) { $cookies = []; foreach ($this->cookies as $cookie) { if ($match($cookie)) { $cookies[] = $cookie; } } return $cookies; } /** * Checks if there are cookies. * * @return bool */ public function hasCookies() { return $this->cookies->count() > 0; } /** * Sets the cookies and removes any previous one. * * @param Cookie[] $cookies */ public function setCookies(array $cookies) { $this->clear(); $this->addCookies($cookies); } /** * Adds some cookies. * * @param Cookie[] $cookies */ public function addCookies(array $cookies) { foreach ($cookies as $cookie) { $this->addCookie($cookie); } } /** * Removes some cookies. * * @param Cookie[] $cookies */ public function removeCookies(array $cookies) { foreach ($cookies as $cookie) { $this->removeCookie($cookie); } } /** * Removes cookies which match the given parameters. * * Null means that parameter should not be matched * * @param string|null $name * @param string|null $domain * @param string|null $path */ public function removeMatchingCookies($name = null, $domain = null, $path = null) { $match = function ($cookie) use ($name, $domain, $path) { $match = true; if (isset($name)) { $match = $match && ($cookie->getName() === $name); } if (isset($domain)) { $match = $match && $cookie->matchDomain($domain); } if (isset($path)) { $match = $match && $cookie->matchPath($path); } return $match; }; $cookies = $this->findMatchingCookies($match); $this->removeCookies($cookies); } /** * Removes all cookies. */ public function clear() { $this->cookies = new \SplObjectStorage(); } /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function count() { return $this->cookies->count(); } /** * {@inheritdoc} */ #[\ReturnTypeWillChange] public function getIterator() { return clone $this->cookies; } } PKt[I filters.phpnu[ */ class Chunk extends \php_user_filter { public function filter($in, $out, &$consumed, $closing): int { while ($bucket = stream_bucket_make_writeable($in)) { $lenbucket = stream_bucket_new($this->stream, dechex($bucket->datalen)."\r\n"); stream_bucket_append($out, $lenbucket); $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); $lenbucket = stream_bucket_new($this->stream, "\r\n"); stream_bucket_append($out, $lenbucket); } return PSFS_PASS_ON; } } PKt[:TEncoding/ChunkStream.phpnu[ */ class ChunkStream extends FilteredStream { protected function readFilter(): string { return 'chunk'; } protected function writeFilter(): string { return 'dechunk'; } protected function fill(): void { parent::fill(); if ($this->stream->eof()) { $this->buffer .= "0\r\n\r\n"; } } } PKt[ʌAAEncoding/DeflateStream.phpnu[ */ class DeflateStream extends FilteredStream { /** * @param int $level */ public function __construct(StreamInterface $stream, $level = -1) { parent::__construct($stream, ['window' => -15, 'level' => $level]); // @deprecated will be removed in 2.0 $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => -15]); } /** * {@inheritdoc} */ protected function readFilter(): string { return 'zlib.deflate'; } /** * {@inheritdoc} */ protected function writeFilter(): string { return 'zlib.inflate'; } } PKt[FEncoding/GzipDecodeStream.phpnu[ */ class GzipDecodeStream extends FilteredStream { /** * @param int $level */ public function __construct(StreamInterface $stream, $level = -1) { if (!extension_loaded('zlib')) { throw new \RuntimeException('The zlib extension must be enabled to use this stream'); } parent::__construct($stream, ['window' => 31]); // @deprecated will be removed in 2.0 $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 31, 'level' => $level]); } /** * {@inheritdoc} */ protected function readFilter(): string { return 'zlib.inflate'; } /** * {@inheritdoc} */ protected function writeFilter(): string { return 'zlib.deflate'; } } PKt[ٍEncoding/InflateStream.phpnu[ */ class InflateStream extends FilteredStream { /** * @param int $level */ public function __construct(StreamInterface $stream, $level = -1) { if (!extension_loaded('zlib')) { throw new \RuntimeException('The zlib extension must be enabled to use this stream'); } parent::__construct($stream, ['window' => -15]); // @deprecated will be removed in 2.0 $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => -15, 'level' => $level]); } protected function readFilter(): string { return 'zlib.inflate'; } protected function writeFilter(): string { return 'zlib.deflate'; } } PKt[ VVEncoding/FilteredStream.phpnu[ */ abstract class FilteredStream implements StreamInterface { use StreamDecorator { rewind as private doRewind; seek as private doSeek; } public const BUFFER_SIZE = 8192; /** * @var callable */ protected $readFilterCallback; /** * @var resource * * @deprecated since version 1.5, will be removed in 2.0 */ protected $readFilter; /** * @var callable * * @deprecated since version 1.5, will be removed in 2.0 */ protected $writeFilterCallback; /** * @var resource * * @deprecated since version 1.5, will be removed in 2.0 */ protected $writeFilter; /** * Internal buffer. * * @var string */ protected $buffer = ''; /** * @param mixed|null $readFilterOptions * @param mixed|null $writeFilterOptions deprecated since 1.5, will be removed in 2.0 */ public function __construct(StreamInterface $stream, $readFilterOptions = null, $writeFilterOptions = null) { if (null !== $readFilterOptions) { $this->readFilterCallback = Filter\fun($this->readFilter(), $readFilterOptions); } else { $this->readFilterCallback = Filter\fun($this->readFilter()); } if (null !== $writeFilterOptions) { $this->writeFilterCallback = Filter\fun($this->writeFilter(), $writeFilterOptions); @trigger_error('The $writeFilterOptions argument is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED); } else { $this->writeFilterCallback = Filter\fun($this->writeFilter()); } $this->stream = $stream; } public function read(int $length): string { if (strlen($this->buffer) >= $length) { $read = substr($this->buffer, 0, $length); $this->buffer = substr($this->buffer, $length); return $read; } if ($this->stream->eof()) { $buffer = $this->buffer; $this->buffer = ''; return $buffer; } $read = $this->buffer; $this->buffer = ''; $this->fill(); return $read.$this->read($length - strlen($read)); } public function eof(): bool { return $this->stream->eof() && '' === $this->buffer; } /** * Buffer is filled by reading underlying stream. * * Callback is reading once more even if the stream is ended. * This allow to get last data in the PHP buffer otherwise this * bug is present : https://bugs.php.net/bug.php?id=48725 */ protected function fill(): void { $readFilterCallback = $this->readFilterCallback; $this->buffer .= $readFilterCallback($this->stream->read(self::BUFFER_SIZE)); if ($this->stream->eof()) { $this->buffer .= $readFilterCallback(); } } /** * {@inheritdoc} */ public function getContents(): string { $buffer = ''; while (!$this->eof()) { $buf = $this->read(self::BUFFER_SIZE); // Using a loose equality here to match on '' and false. if (null == $buf) { break; } $buffer .= $buf; } return $buffer; } /** * Always returns null because we can't tell the size of a stream when we filter. */ public function getSize(): ?int { return null; } public function __toString(): string { return $this->getContents(); } /** * Filtered streams are not seekable. * * We would need to buffer and process everything to allow seeking. */ public function isSeekable(): bool { return false; } /** * Filtered streams are not seekable and can thus not be rewound. */ public function rewind(): void { @trigger_error('Filtered streams are not seekable. This method will start raising an exception in the next major version', E_USER_DEPRECATED); $this->doRewind(); } /** * Filtered streams are not seekable. */ public function seek(int $offset, int $whence = SEEK_SET): void { @trigger_error('Filtered streams are not seekable. This method will start raising an exception in the next major version', E_USER_DEPRECATED); $this->doSeek($offset, $whence); } /** * Returns the read filter name. * * @deprecated since version 1.5, will be removed in 2.0 */ public function getReadFilter(): string { @trigger_error('The '.__CLASS__.'::'.__METHOD__.' method is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED); return $this->readFilter(); } /** * Returns the write filter name. */ abstract protected function readFilter(): string; /** * Returns the write filter name. * * @deprecated since version 1.5, will be removed in 2.0 */ public function getWriteFilter(): string { @trigger_error('The '.__CLASS__.'::'.__METHOD__.' method is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED); return $this->writeFilter(); } /** * Returns the write filter name. */ abstract protected function writeFilter(): string; } PKt[cAEncoding/DecompressStream.phpnu[ */ class DecompressStream extends FilteredStream { /** * @param int $level */ public function __construct(StreamInterface $stream, $level = -1) { if (!extension_loaded('zlib')) { throw new \RuntimeException('The zlib extension must be enabled to use this stream'); } parent::__construct($stream, ['window' => 15]); // @deprecated will be removed in 2.0 $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 15, 'level' => $level]); } protected function readFilter(): string { return 'zlib.inflate'; } protected function writeFilter(): string { return 'zlib.deflate'; } } PKt[?#=Encoding/GzipEncodeStream.phpnu[ */ class GzipEncodeStream extends FilteredStream { /** * @param int $level */ public function __construct(StreamInterface $stream, $level = -1) { if (!extension_loaded('zlib')) { throw new \RuntimeException('The zlib extension must be enabled to use this stream'); } parent::__construct($stream, ['window' => 31, 'level' => $level]); // @deprecated will be removed in 2.0 $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 31]); } /** * {@inheritdoc} */ protected function readFilter(): string { return 'zlib.deflate'; } /** * {@inheritdoc} */ protected function writeFilter(): string { return 'zlib.inflate'; } } PKt[,Encoding/CompressStream.phpnu[ */ class CompressStream extends FilteredStream { /** * @param int $level */ public function __construct(StreamInterface $stream, $level = -1) { if (!extension_loaded('zlib')) { throw new \RuntimeException('The zlib extension must be enabled to use this stream'); } parent::__construct($stream, ['window' => 15, 'level' => $level]); // @deprecated will be removed in 2.0 $this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 15]); } protected function readFilter(): string { return 'zlib.deflate'; } protected function writeFilter(): string { return 'zlib.inflate'; } } PKt[_NEncoding/DechunkStream.phpnu[ */ class DechunkStream extends FilteredStream { protected function readFilter(): string { return 'dechunk'; } protected function writeFilter(): string { return 'chunk'; } } PKt[y&Exception/UnexpectedValueException.phpnu[ */ trait RequestDecorator { use MessageDecorator { getMessage as getRequest; } /** * Exchanges the underlying request with another. */ public function withRequest(RequestInterface $request): RequestInterface { $new = clone $this; $new->message = $request; return $new; } public function getRequestTarget(): string { return $this->message->getRequestTarget(); } public function withRequestTarget(string $requestTarget): RequestInterface { $new = clone $this; $new->message = $this->message->withRequestTarget($requestTarget); return $new; } public function getMethod(): string { return $this->message->getMethod(); } public function withMethod(string $method): RequestInterface { $new = clone $this; $new->message = $this->message->withMethod($method); return $new; } public function getUri(): UriInterface { return $this->message->getUri(); } public function withUri(UriInterface $uri, bool $preserveHost = false): RequestInterface { $new = clone $this; $new->message = $this->message->withUri($uri, $preserveHost); return $new; } } PKt[ؤDecorator/ResponseDecorator.phpnu[ */ trait ResponseDecorator { use MessageDecorator { getMessage as getResponse; } /** * Exchanges the underlying response with another. */ public function withResponse(ResponseInterface $response): ResponseInterface { $new = clone $this; $new->message = $response; return $new; } public function getStatusCode(): int { return $this->message->getStatusCode(); } public function withStatus(int $code, string $reasonPhrase = ''): ResponseInterface { $new = clone $this; $new->message = $this->message->withStatus($code, $reasonPhrase); return $new; } public function getReasonPhrase(): string { return $this->message->getReasonPhrase(); } } PKt[kDecorator/MessageDecorator.phpnu[ */ trait MessageDecorator { /** * @var MessageInterface */ private $message; /** * Returns the decorated message. * * Since the underlying Message is immutable as well * exposing it is not an issue, because it's state cannot be altered */ public function getMessage(): MessageInterface { return $this->message; } public function getProtocolVersion(): string { return $this->message->getProtocolVersion(); } public function withProtocolVersion(string $version): MessageInterface { $new = clone $this; $new->message = $this->message->withProtocolVersion($version); return $new; } public function getHeaders(): array { return $this->message->getHeaders(); } public function hasHeader(string $header): bool { return $this->message->hasHeader($header); } public function getHeader(string $header): array { return $this->message->getHeader($header); } public function getHeaderLine(string $header): string { return $this->message->getHeaderLine($header); } public function withHeader(string $header, $value): MessageInterface { $new = clone $this; $new->message = $this->message->withHeader($header, $value); return $new; } public function withAddedHeader(string $header, $value): MessageInterface { $new = clone $this; $new->message = $this->message->withAddedHeader($header, $value); return $new; } public function withoutHeader(string $header): MessageInterface { $new = clone $this; $new->message = $this->message->withoutHeader($header); return $new; } public function getBody(): StreamInterface { return $this->message->getBody(); } public function withBody(StreamInterface $body): MessageInterface { $new = clone $this; $new->message = $this->message->withBody($body); return $new; } } PKt[JDecorator/StreamDecorator.phpnu[ */ trait StreamDecorator { /** * @var StreamInterface */ protected $stream; public function __toString(): string { return $this->stream->__toString(); } public function close(): void { $this->stream->close(); } public function detach() { return $this->stream->detach(); } public function getSize(): ?int { return $this->stream->getSize(); } public function tell(): int { return $this->stream->tell(); } public function eof(): bool { return $this->stream->eof(); } public function isSeekable(): bool { return $this->stream->isSeekable(); } public function seek(int $offset, int $whence = SEEK_SET): void { $this->stream->seek($offset, $whence); } public function rewind(): void { $this->stream->rewind(); } public function isWritable(): bool { return $this->stream->isWritable(); } public function write(string $string): int { return $this->stream->write($string); } public function isReadable(): bool { return $this->stream->isReadable(); } public function read(int $length): string { return $this->stream->read($length); } public function getContents(): string { return $this->stream->getContents(); } public function getMetadata(string $key = null) { return $this->stream->getMetadata($key); } } PKt[^ZxRequestMatcher.phpnu[ */ interface RequestMatcher { /** * Decides whether the rule(s) implemented by the strategy matches the supplied request. * * @param RequestInterface $request The PSR7 request to check for a match * * @return bool true if the request matches, false otherwise */ public function matches(RequestInterface $request); } PKt[++ Cookie.phpnu[ * * @see http://tools.ietf.org/search/rfc6265 */ final class Cookie { /** * @var string */ private $name; /** * @var string|null */ private $value; /** * @var int|null */ private $maxAge; /** * @var string|null */ private $domain; /** * @var string */ private $path; /** * @var bool */ private $secure; /** * @var bool */ private $httpOnly; /** * Expires attribute is HTTP 1.0 only and should be avoided. * * @var \DateTime|null */ private $expires; /** * @param string $name * @param string|null $value * @param int|null $maxAge * @param string|null $domain * @param string|null $path * @param bool $secure * @param bool $httpOnly * @param \DateTime|null $expires Expires attribute is HTTP 1.0 only and should be avoided. * * @throws \InvalidArgumentException if name, value or max age is not valid */ public function __construct( $name, $value = null, $maxAge = null, $domain = null, $path = null, $secure = false, $httpOnly = false, \DateTime $expires = null ) { $this->validateName($name); $this->validateValue($value); $this->validateMaxAge($maxAge); $this->name = $name; $this->value = $value; $this->maxAge = $maxAge; $this->expires = $expires; $this->domain = $this->normalizeDomain($domain); $this->path = $this->normalizePath($path); $this->secure = (bool) $secure; $this->httpOnly = (bool) $httpOnly; } /** * Creates a new cookie without any attribute validation. * * @param string $name * @param string|null $value * @param int $maxAge * @param string|null $domain * @param string|null $path * @param bool $secure * @param bool $httpOnly * @param \DateTime|null $expires Expires attribute is HTTP 1.0 only and should be avoided. */ public static function createWithoutValidation( $name, $value = null, $maxAge = null, $domain = null, $path = null, $secure = false, $httpOnly = false, \DateTime $expires = null ) { $cookie = new self('name', null, null, $domain, $path, $secure, $httpOnly, $expires); $cookie->name = $name; $cookie->value = $value; $cookie->maxAge = $maxAge; return $cookie; } /** * Returns the name. * * @return string */ public function getName() { return $this->name; } /** * Returns the value. * * @return string|null */ public function getValue() { return $this->value; } /** * Checks if there is a value. * * @return bool */ public function hasValue() { return isset($this->value); } /** * Sets the value. * * @param string|null $value * * @return Cookie */ public function withValue($value) { $this->validateValue($value); $new = clone $this; $new->value = $value; return $new; } /** * Returns the max age. * * @return int|null */ public function getMaxAge() { return $this->maxAge; } /** * Checks if there is a max age. * * @return bool */ public function hasMaxAge() { return isset($this->maxAge); } /** * Sets the max age. * * @param int|null $maxAge * * @return Cookie */ public function withMaxAge($maxAge) { $this->validateMaxAge($maxAge); $new = clone $this; $new->maxAge = $maxAge; return $new; } /** * Returns the expiration time. * * @return \DateTime|null */ public function getExpires() { return $this->expires; } /** * Checks if there is an expiration time. * * @return bool */ public function hasExpires() { return isset($this->expires); } /** * Sets the expires. * * @return Cookie */ public function withExpires(\DateTime $expires = null) { $new = clone $this; $new->expires = $expires; return $new; } /** * Checks if the cookie is expired. * * @return bool */ public function isExpired() { return isset($this->expires) and $this->expires < new \DateTime(); } /** * Returns the domain. * * @return string|null */ public function getDomain() { return $this->domain; } /** * Checks if there is a domain. * * @return bool */ public function hasDomain() { return isset($this->domain); } /** * Sets the domain. * * @param string|null $domain * * @return Cookie */ public function withDomain($domain) { $new = clone $this; $new->domain = $this->normalizeDomain($domain); return $new; } /** * Checks whether this cookie is meant for this domain. * * @see http://tools.ietf.org/html/rfc6265#section-5.1.3 * * @param string $domain * * @return bool */ public function matchDomain($domain) { // Domain is not set or exact match if (!$this->hasDomain() || 0 === strcasecmp($domain, $this->domain)) { return true; } // Domain is not an IP address if (filter_var($domain, FILTER_VALIDATE_IP)) { return false; } return (bool) preg_match(sprintf('/\b%s$/i', preg_quote($this->domain)), $domain); } /** * Returns the path. * * @return string */ public function getPath() { return $this->path; } /** * Sets the path. * * @param string|null $path * * @return Cookie */ public function withPath($path) { $new = clone $this; $new->path = $this->normalizePath($path); return $new; } /** * Checks whether this cookie is meant for this path. * * @see http://tools.ietf.org/html/rfc6265#section-5.1.4 * * @param string $path * * @return bool */ public function matchPath($path) { return $this->path === $path || (0 === strpos($path, rtrim($this->path, '/').'/')); } /** * Checks whether this cookie may only be sent over HTTPS. * * @return bool */ public function isSecure() { return $this->secure; } /** * Sets whether this cookie should only be sent over HTTPS. * * @param bool $secure * * @return Cookie */ public function withSecure($secure) { $new = clone $this; $new->secure = (bool) $secure; return $new; } /** * Check whether this cookie may not be accessed through Javascript. * * @return bool */ public function isHttpOnly() { return $this->httpOnly; } /** * Sets whether this cookie may not be accessed through Javascript. * * @param bool $httpOnly * * @return Cookie */ public function withHttpOnly($httpOnly) { $new = clone $this; $new->httpOnly = (bool) $httpOnly; return $new; } /** * Checks if this cookie represents the same cookie as $cookie. * * This does not compare the values, only name, domain and path. * * @return bool */ public function match(self $cookie) { return $this->name === $cookie->name && $this->domain === $cookie->domain and $this->path === $cookie->path; } /** * Validates cookie attributes. * * @return bool */ public function isValid() { try { $this->validateName($this->name); $this->validateValue($this->value); $this->validateMaxAge($this->maxAge); } catch (\InvalidArgumentException $e) { return false; } return true; } /** * Validates the name attribute. * * @see http://tools.ietf.org/search/rfc2616#section-2.2 * * @param string $name * * @throws \InvalidArgumentException if the name is empty or contains invalid characters */ private function validateName($name) { if (strlen($name) < 1) { throw new \InvalidArgumentException('The name cannot be empty'); } // Name attribute is a token as per spec in RFC 2616 if (preg_match('/[\x00-\x20\x22\x28-\x29\x2C\x2F\x3A-\x40\x5B-\x5D\x7B\x7D\x7F]/', $name)) { throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name)); } } /** * Validates a value. * * @see http://tools.ietf.org/html/rfc6265#section-4.1.1 * * @param string|null $value * * @throws \InvalidArgumentException if the value contains invalid characters */ private function validateValue($value) { if (isset($value)) { if (preg_match('/[^\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/', $value)) { throw new \InvalidArgumentException(sprintf('The cookie value "%s" contains invalid characters.', $value)); } } } /** * Validates a Max-Age attribute. * * @param int|null $maxAge * * @throws \InvalidArgumentException if the Max-Age is not an empty or integer value */ private function validateMaxAge($maxAge) { if (isset($maxAge)) { if (!is_int($maxAge)) { throw new \InvalidArgumentException('Max-Age must be integer'); } } } /** * Remove the leading '.' and lowercase the domain as per spec in RFC 6265. * * @see http://tools.ietf.org/html/rfc6265#section-4.1.2.3 * @see http://tools.ietf.org/html/rfc6265#section-5.1.3 * @see http://tools.ietf.org/html/rfc6265#section-5.2.3 * * @param string|null $domain * * @return string */ private function normalizeDomain($domain) { if (isset($domain)) { $domain = ltrim(strtolower($domain), '.'); } return $domain; } /** * Processes path as per spec in RFC 6265. * * @see http://tools.ietf.org/html/rfc6265#section-5.1.4 * @see http://tools.ietf.org/html/rfc6265#section-5.2.4 * * @param string|null $path * * @return string */ private function normalizePath($path) { $path = rtrim($path, '/'); if (empty($path) or '/' !== substr($path, 0, 1)) { $path = '/'; } return $path; } } PKt[~PFormatter/SimpleFormatter.phpnu[ * @author Márk Sági-Kazár */ class SimpleFormatter implements Formatter { /** * {@inheritdoc} */ public function formatRequest(RequestInterface $request) { return sprintf( '%s %s %s', $request->getMethod(), $request->getUri()->__toString(), $request->getProtocolVersion() ); } /** * {@inheritdoc} */ public function formatResponse(ResponseInterface $response) { return sprintf( '%s %s %s', $response->getStatusCode(), $response->getReasonPhrase(), $response->getProtocolVersion() ); } /** * Formats a response in context of its request. * * @return string */ public function formatResponseForRequest(ResponseInterface $response, RequestInterface $request) { return $this->formatResponse($response); } } PKt[e>G  "Formatter/CurlCommandFormatter.phpnu[ */ class CurlCommandFormatter implements Formatter { /** * {@inheritdoc} */ public function formatRequest(RequestInterface $request) { $command = sprintf('curl %s', escapeshellarg((string) $request->getUri()->withFragment(''))); if ('1.0' === $request->getProtocolVersion()) { $command .= ' --http1.0'; } elseif ('2.0' === $request->getProtocolVersion()) { $command .= ' --http2'; } $method = strtoupper($request->getMethod()); if ('HEAD' === $method) { $command .= ' --head'; } elseif ('GET' !== $method) { $command .= ' --request '.$method; } $command .= $this->getHeadersAsCommandOptions($request); $body = $request->getBody(); if ($body->getSize() > 0) { // escapeshellarg argument max length on Windows, but longer body in curl command would be impractical anyways if ($body->getSize() > 8192) { $data = '[too long stream omitted]'; } elseif ($body->isSeekable()) { $data = $body->__toString(); $body->rewind(); // all non-printable ASCII characters and except for \t, \r, \n if (preg_match('/([\x00-\x09\x0C\x0E-\x1F\x7F])/', $data)) { $data = '[binary stream omitted]'; } } else { $data = '[non-seekable stream omitted]'; } $escapedData = @escapeshellarg($data); if (empty($escapedData)) { $escapedData = 'We couldn\'t not escape the data properly'; } $command .= sprintf(' --data %s', $escapedData); } return $command; } /** * {@inheritdoc} */ public function formatResponse(ResponseInterface $response) { return ''; } /** * Formats a response in context of its request. * * @return string */ public function formatResponseForRequest(ResponseInterface $response, RequestInterface $request) { return $this->formatResponse($response); } /** * @return string */ private function getHeadersAsCommandOptions(RequestInterface $request) { $command = ''; foreach ($request->getHeaders() as $name => $values) { if ('host' === strtolower($name) && $values[0] === $request->getUri()->getHost()) { continue; } if ('user-agent' === strtolower($name)) { $command .= sprintf(' -A %s', escapeshellarg($values[0])); continue; } $command .= sprintf(' -H %s', escapeshellarg($name.': '.$request->getHeaderLine($name))); } return $command; } } PKt[`Ri &Formatter/FullHttpMessageFormatter.phpnu[ */ class FullHttpMessageFormatter implements Formatter { /** * The maximum length of the body. * * @var int|null */ private $maxBodyLength; /** * @var string */ private $binaryDetectionRegex; /** * @param int|null $maxBodyLength * @param string $binaryDetectionRegex By default, this is all non-printable ASCII characters and except for \t, \r, \n */ public function __construct($maxBodyLength = 1000, string $binaryDetectionRegex = '/([\x00-\x09\x0C\x0E-\x1F\x7F])/') { $this->maxBodyLength = $maxBodyLength; $this->binaryDetectionRegex = $binaryDetectionRegex; } /** * {@inheritdoc} */ public function formatRequest(RequestInterface $request) { $message = sprintf( "%s %s HTTP/%s\n", $request->getMethod(), $request->getRequestTarget(), $request->getProtocolVersion() ); foreach ($request->getHeaders() as $name => $values) { $message .= $name.': '.implode(', ', $values)."\n"; } return $this->addBody($request, $message); } /** * {@inheritdoc} */ public function formatResponse(ResponseInterface $response) { $message = sprintf( "HTTP/%s %s %s\n", $response->getProtocolVersion(), $response->getStatusCode(), $response->getReasonPhrase() ); foreach ($response->getHeaders() as $name => $values) { $message .= $name.': '.implode(', ', $values)."\n"; } return $this->addBody($response, $message); } /** * Formats a response in context of its request. * * @return string */ public function formatResponseForRequest(ResponseInterface $response, RequestInterface $request) { return $this->formatResponse($response); } /** * Add the message body if the stream is seekable. * * @param string $message * * @return string */ private function addBody(MessageInterface $request, $message) { $message .= "\n"; $stream = $request->getBody(); if (!$stream->isSeekable() || 0 === $this->maxBodyLength) { // Do not read the stream return $message; } $data = $stream->__toString(); $stream->rewind(); if (preg_match($this->binaryDetectionRegex, $data)) { return $message.'[binary stream omitted]'; } if (null === $this->maxBodyLength) { return $message.$data; } return $message.mb_substr($data, 0, $this->maxBodyLength); } } PKt[8j Authentication/AutoBasicAuth.phpnu[ */ final class AutoBasicAuth implements Authentication { /** * Whether user info should be removed from the URI. * * @var bool */ private $shouldRemoveUserInfo; /** * @param bool|true $shouldRremoveUserInfo */ public function __construct($shouldRremoveUserInfo = true) { $this->shouldRemoveUserInfo = (bool) $shouldRremoveUserInfo; } /** * {@inheritdoc} */ public function authenticate(RequestInterface $request) { $uri = $request->getUri(); $userInfo = $uri->getUserInfo(); if (!empty($userInfo)) { if ($this->shouldRemoveUserInfo) { $request = $request->withUri($uri->withUserInfo('')); } $request = $request->withHeader('Authorization', sprintf('Basic %s', base64_encode($userInfo))); } return $request; } } PKt[)@++Authentication/Matching.phpnu[ * * @deprecated since since version 1.2, and will be removed in 2.0. Use {@link RequestConditional} instead. */ final class Matching implements Authentication { /** * @var Authentication */ private $authentication; /** * @var CallbackRequestMatcher */ private $matcher; public function __construct(Authentication $authentication, callable $matcher = null) { if (is_null($matcher)) { $matcher = function () { return true; }; } $this->authentication = $authentication; $this->matcher = new CallbackRequestMatcher($matcher); } /** * {@inheritdoc} */ public function authenticate(RequestInterface $request) { if ($this->matcher->matches($request)) { return $this->authentication->authenticate($request); } return $request; } /** * Creates a matching authentication for an URL. * * @param string $url * * @return self */ public static function createUrlMatcher(Authentication $authentication, $url) { $matcher = function (RequestInterface $request) use ($url) { return preg_match($url, $request->getRequestTarget()); }; return new static($authentication, $matcher); } } PKt[ׇTAuthentication/Bearer.phpnu[ */ final class Bearer implements Authentication { /** * @var string */ private $token; /** * @param string $token */ public function __construct($token) { $this->token = $token; } /** * {@inheritdoc} */ public function authenticate(RequestInterface $request) { $header = sprintf('Bearer %s', $this->token); return $request->withHeader('Authorization', $header); } } PKt[dAuthentication/Wsse.phpnu[ */ final class Wsse implements Authentication { /** * @var string */ private $username; /** * @var string */ private $password; /** * @var string */ private $hashAlgorithm; /** * @param string $username * @param string $password * @param string $hashAlgorithm To use a better hashing algorithm than the weak sha1, pass the algorithm to use, e.g. "sha512" */ public function __construct($username, $password, $hashAlgorithm = 'sha1') { $this->username = $username; $this->password = $password; if (false === in_array($hashAlgorithm, hash_algos())) { throw new \InvalidArgumentException(sprintf('Unaccepted hashing algorithm: %s', $hashAlgorithm)); } $this->hashAlgorithm = $hashAlgorithm; } /** * {@inheritdoc} */ public function authenticate(RequestInterface $request) { $nonce = substr(md5(uniqid(uniqid().'_', true)), 0, 16); $created = date('c'); $digest = base64_encode(hash($this->hashAlgorithm, base64_decode($nonce).$created.$this->password, true)); $wsse = sprintf( 'UsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s"', $this->username, $digest, $nonce, $created ); return $request ->withHeader('Authorization', 'WSSE profile="UsernameToken"') ->withHeader('X-WSSE', $wsse) ; } } PKt[(Am%Authentication/RequestConditional.phpnu[ */ final class RequestConditional implements Authentication { /** * @var RequestMatcher */ private $requestMatcher; /** * @var Authentication */ private $authentication; public function __construct(RequestMatcher $requestMatcher, Authentication $authentication) { $this->requestMatcher = $requestMatcher; $this->authentication = $authentication; } /** * {@inheritdoc} */ public function authenticate(RequestInterface $request) { if ($this->requestMatcher->matches($request)) { return $this->authentication->authenticate($request); } return $request; } } PKt[g||Authentication/Header.phpnu[name = $name; $this->value = $value; } /** * {@inheritdoc} */ public function authenticate(RequestInterface $request) { return $request->withHeader($this->name, $this->value); } } PKt[?BAuthentication/Chain.phpnu[ */ final class Chain implements Authentication { /** * @var Authentication[] */ private $authenticationChain = []; /** * @param Authentication[] $authenticationChain */ public function __construct(array $authenticationChain = []) { foreach ($authenticationChain as $authentication) { if (!$authentication instanceof Authentication) { throw new \InvalidArgumentException( 'Members of the authentication chain must be of type Http\Message\Authentication' ); } } $this->authenticationChain = $authenticationChain; } /** * {@inheritdoc} */ public function authenticate(RequestInterface $request) { foreach ($this->authenticationChain as $authentication) { $request = $authentication->authenticate($request); } return $request; } } PKt[sNNAuthentication/QueryParam.phpnu[ */ final class QueryParam implements Authentication { /** * @var array */ private $params = []; public function __construct(array $params) { $this->params = $params; } /** * {@inheritdoc} */ public function authenticate(RequestInterface $request) { $uri = $request->getUri(); $query = $uri->getQuery(); $params = []; parse_str($query, $params); $params = array_merge($params, $this->params); $query = http_build_query($params, '', '&'); $uri = $uri->withQuery($query); return $request->withUri($uri); } } PKt[ Authentication/BasicAuth.phpnu[ */ final class BasicAuth implements Authentication { /** * @var string */ private $username; /** * @var string */ private $password; /** * @param string $username * @param string $password */ public function __construct($username, $password) { $this->username = $username; $this->password = $password; } /** * {@inheritdoc} */ public function authenticate(RequestInterface $request) { $header = sprintf('Basic %s', base64_encode(sprintf('%s:%s', $this->username, $this->password))); return $request->withHeader('Authorization', $header); } } PKt[5v88!RequestMatcher/RequestMatcher.phpnu[ * @author Joel Wurtz */ final class RequestMatcher implements RequestMatcherInterface { /** * @var string */ private $path; /** * @var string */ private $host; /** * @var array */ private $methods = []; /** * @var string[] */ private $schemes = []; /** * The regular expressions used for path or host must be specified without delimiter. * You do not need to escape the forward slash / to match it. * * @param string|null $path Regular expression for the path * @param string|null $host Regular expression for the hostname * @param string|string[]|null $methods Method or list of methods to match * @param string|string[]|null $schemes Scheme or list of schemes to match (e.g. http or https) */ public function __construct($path = null, $host = null, $methods = [], $schemes = []) { $this->path = $path; $this->host = $host; $this->methods = array_map('strtoupper', (array) $methods); $this->schemes = array_map('strtolower', (array) $schemes); } /** * {@inheritdoc} * * @api */ public function matches(RequestInterface $request) { if ($this->schemes && !in_array($request->getUri()->getScheme(), $this->schemes)) { return false; } if ($this->methods && !in_array($request->getMethod(), $this->methods)) { return false; } if (null !== $this->path && !preg_match('{'.$this->path.'}', rawurldecode($request->getUri()->getPath()))) { return false; } if (null !== $this->host && !preg_match('{'.$this->host.'}i', $request->getUri()->getHost())) { return false; } return true; } } PKt[&RequestMatcher/RegexRequestMatcher.phpnu[ * * @deprecated since version 1.2 and will be removed in 2.0. Use {@link RequestMatcher} instead. */ final class RegexRequestMatcher implements RequestMatcher { /** * Matching regex. * * @var string */ private $regex; /** * @param string $regex */ public function __construct($regex) { $this->regex = $regex; } /** * {@inheritdoc} */ public function matches(RequestInterface $request) { return (bool) preg_match($this->regex, (string) $request->getUri()); } } PKt[Ymm)RequestMatcher/CallbackRequestMatcher.phpnu[ */ final class CallbackRequestMatcher implements RequestMatcher { /** * @var callable */ private $callback; public function __construct(callable $callback) { $this->callback = $callback; } /** * {@inheritdoc} */ public function matches(RequestInterface $request) { return (bool) call_user_func($this->callback, $request); } } PKt[%StreamFactory/GuzzleStreamFactory.phpnu[ * * @deprecated This will be removed in php-http/message2.0. Consider using the official Guzzle PSR-17 factory */ final class GuzzleStreamFactory implements StreamFactory { /** * {@inheritdoc} */ public function createStream($body = null) { if (class_exists(Utils::class)) { return Utils::streamFor($body); } // legacy support for guzzle/psr7 1.* return \GuzzleHttp\Psr7\stream_for($body); } } PKt[ݜ6(StreamFactory/DiactorosStreamFactory.phpnu[ * * @deprecated This will be removed in php-http/message2.0. Consider using the official Diactoros PSR-17 factory */ final class DiactorosStreamFactory implements StreamFactory { /** * {@inheritdoc} */ public function createStream($body = null) { if ($body instanceof StreamInterface) { return $body; } if (is_resource($body)) { if (class_exists(LaminasStream::class)) { return new LaminasStream($body); } return new ZendStream($body); } if (class_exists(LaminasStream::class)) { $stream = new LaminasStream('php://memory', 'rw'); } else { $stream = new ZendStream('php://memory', 'rw'); } if (null !== $body && '' !== $body) { $stream->write((string) $body); } return $stream; } } PKt[ j?#StreamFactory/SlimStreamFactory.phpnu[ * * @deprecated This will be removed in php-http/message2.0. Consider using the official Slim PSR-17 factory */ final class SlimStreamFactory implements StreamFactory { /** * {@inheritdoc} */ public function createStream($body = null) { if ($body instanceof StreamInterface) { return $body; } if (is_resource($body)) { return new Stream($body); } $resource = fopen('php://memory', 'r+'); $stream = new Stream($resource); if (null !== $body && '' !== $body) { $stream->write((string) $body); } return $stream; } } PKt[<&&Stream/BufferedStream.phpnu[stream = $stream; $this->size = $stream->getSize(); if ($useFileBuffer) { $this->resource = fopen('php://temp/maxmemory:'.$memoryBuffer, 'rw+'); } else { $this->resource = fopen('php://memory', 'rw+'); } if (false === $this->resource) { throw new \RuntimeException('Cannot create a resource over temp or memory implementation'); } } public function __toString(): string { try { $this->rewind(); return $this->getContents(); } catch (\Throwable $throwable) { return ''; } } public function close(): void { if (null === $this->resource) { throw new \RuntimeException('Cannot close on a detached stream'); } $this->stream->close(); fclose($this->resource); } public function detach() { if (null === $this->resource) { return null; } // Force reading the remaining data of the stream $this->getContents(); $resource = $this->resource; $this->stream->close(); $this->stream = null; $this->resource = null; return $resource; } public function getSize(): ?int { if (null === $this->resource) { return null; } if (null === $this->size && $this->stream->eof()) { return $this->written; } return $this->size; } public function tell(): int { if (null === $this->resource) { throw new \RuntimeException('Cannot tell on a detached stream'); } $tell = ftell($this->resource); if (false === $tell) { throw new \RuntimeException('ftell failed'); } return $tell; } public function eof(): bool { if (null === $this->resource) { throw new \RuntimeException('Cannot call eof on a detached stream'); } // We are at the end only when both our resource and underlying stream are at eof return $this->stream->eof() && (ftell($this->resource) === $this->written); } public function isSeekable(): bool { return null !== $this->resource; } public function seek(int $offset, int $whence = SEEK_SET): void { if (null === $this->resource) { throw new \RuntimeException('Cannot seek on a detached stream'); } fseek($this->resource, $offset, $whence); } public function rewind(): void { if (null === $this->resource) { throw new \RuntimeException('Cannot rewind on a detached stream'); } rewind($this->resource); } public function isWritable(): bool { return false; } public function write(string $string): int { throw new \RuntimeException('Cannot write on this stream'); } public function isReadable(): bool { return null !== $this->resource; } public function read(int $length): string { if (null === $this->resource) { throw new \RuntimeException('Cannot read on a detached stream'); } if ($length < 0) { throw new \InvalidArgumentException('Can not read a negative amount of bytes'); } $read = ''; // First read from the resource if (ftell($this->resource) !== $this->written) { $read = fread($this->resource, $length); } if (false === $read) { throw new \RuntimeException('Failed to read from resource'); } $bytesRead = strlen($read); if ($bytesRead < $length) { $streamRead = $this->stream->read($length - $bytesRead); // Write on the underlying stream what we read $this->written += fwrite($this->resource, $streamRead); $read .= $streamRead; } return $read; } public function getContents(): string { if (null === $this->resource) { throw new \RuntimeException('Cannot read on a detached stream'); } $read = ''; while (!$this->eof()) { $read .= $this->read(8192); } return $read; } public function getMetadata(?string $key = null) { if (null === $this->resource) { if (null === $key) { return []; } return null; } $metadata = stream_get_meta_data($this->resource); if (null === $key) { return $metadata; } if (!array_key_exists($key, $metadata)) { return null; } return $metadata[$key]; } } PKt[/Q11Builder/ResponseBuilder.phpnu[response = $response; } /** * Return response. * * @return ResponseInterface */ public function getResponse() { return $this->response; } /** * Add headers represented by an array of header lines. * * @param string[] $headers response headers as array of header lines * * @return $this * * @throws \UnexpectedValueException for invalid header values * @throws \InvalidArgumentException for invalid status code arguments */ public function setHeadersFromArray(array $headers) { $status = array_shift($headers); $this->setStatus($status); foreach ($headers as $headerLine) { $headerLine = trim($headerLine); if ('' === $headerLine) { continue; } $this->addHeader($headerLine); } return $this; } /** * Add headers represented by a single string. * * @param string $headers response headers as single string * * @return $this * * @throws \InvalidArgumentException if $headers is not a string on object with __toString() * @throws \UnexpectedValueException for invalid header values */ public function setHeadersFromString($headers) { if (!(is_string($headers) || (is_object($headers) && method_exists($headers, '__toString'))) ) { throw new \InvalidArgumentException( sprintf( '%s expects parameter 1 to be a string, %s given', __METHOD__, is_object($headers) ? get_class($headers) : gettype($headers) ) ); } $this->setHeadersFromArray(explode("\r\n", $headers)); return $this; } /** * Set response status from a status string. * * @param string $statusLine response status as a string * * @return $this * * @throws \InvalidArgumentException for invalid status line */ public function setStatus($statusLine) { $parts = explode(' ', $statusLine, 3); if (count($parts) < 2 || 0 !== strpos(strtolower($parts[0]), 'http/')) { throw new \InvalidArgumentException( sprintf('"%s" is not a valid HTTP status line', $statusLine) ); } $reasonPhrase = count($parts) > 2 ? $parts[2] : ''; $this->response = $this->response ->withStatus((int) $parts[1], $reasonPhrase) ->withProtocolVersion(substr($parts[0], 5)); return $this; } /** * Add header represented by a string. * * @param string $headerLine response header as a string * * @return $this * * @throws \InvalidArgumentException for invalid header names or values */ public function addHeader($headerLine) { $parts = explode(':', $headerLine, 2); if (2 !== count($parts)) { throw new \InvalidArgumentException( sprintf('"%s" is not a valid HTTP header line', $headerLine) ); } $name = trim($parts[0]); $value = trim($parts[1]); if ($this->response->hasHeader($name)) { $this->response = $this->response->withAddedHeader($name, $value); } else { $this->response = $this->response->withHeader($name, $value); } return $this; } } PKt[GOA'MessageFactory/GuzzleMessageFactory.phpnu[ * * @deprecated This will be removed in php-http/message2.0. Consider using the official Guzzle PSR-17 factory */ final class GuzzleMessageFactory implements MessageFactory { /** * {@inheritdoc} */ public function createRequest( $method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1' ) { return new Request( $method, $uri, $headers, $body, $protocolVersion ); } /** * {@inheritdoc} */ public function createResponse( $statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $protocolVersion = '1.1' ) { return new Response( $statusCode, $headers, $body, $protocolVersion, $reasonPhrase ); } } PKt[ Y%MessageFactory/SlimMessageFactory.phpnu[ * * @deprecated This will be removed in php-http/message2.0. Consider using the official Slim PSR-17 factory */ final class SlimMessageFactory implements MessageFactory { /** * @var SlimStreamFactory */ private $streamFactory; /** * @var SlimUriFactory */ private $uriFactory; public function __construct() { $this->streamFactory = new SlimStreamFactory(); $this->uriFactory = new SlimUriFactory(); } /** * {@inheritdoc} */ public function createRequest( $method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1' ) { return (new Request( $method, $this->uriFactory->createUri($uri), new Headers($headers), [], [], $this->streamFactory->createStream($body), [] ))->withProtocolVersion($protocolVersion); } /** * {@inheritdoc} */ public function createResponse( $statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $protocolVersion = '1.1' ) { return (new Response( $statusCode, new Headers($headers), $this->streamFactory->createStream($body) ))->withProtocolVersion($protocolVersion); } } PKt[U\ *MessageFactory/DiactorosMessageFactory.phpnu[ * * @deprecated This will be removed in php-http/message2.0. Consider using the official Diactoros PSR-17 factory */ final class DiactorosMessageFactory implements MessageFactory { /** * @var DiactorosStreamFactory */ private $streamFactory; public function __construct() { $this->streamFactory = new DiactorosStreamFactory(); } /** * {@inheritdoc} */ public function createRequest( $method, $uri, array $headers = [], $body = null, $protocolVersion = '1.1' ) { if (class_exists(LaminasRequest::class)) { return (new LaminasRequest( $uri, $method, $this->streamFactory->createStream($body), $headers ))->withProtocolVersion($protocolVersion); } return (new ZendRequest( $uri, $method, $this->streamFactory->createStream($body), $headers ))->withProtocolVersion($protocolVersion); } /** * {@inheritdoc} */ public function createResponse( $statusCode = 200, $reasonPhrase = null, array $headers = [], $body = null, $protocolVersion = '1.1' ) { if (class_exists(LaminasResponse::class)) { return (new LaminasResponse( $this->streamFactory->createStream($body), $statusCode, $headers ))->withProtocolVersion($protocolVersion); } return (new ZendResponse( $this->streamFactory->createStream($body), $statusCode, $headers ))->withProtocolVersion($protocolVersion); } } PKt[jH Formatter.phpnu[ * * The formatResponseForRequest method will be added to this interface in the next major version, replacing the formatRequest method. * Meanwhile, callers SHOULD check the formatter for the existence of formatResponseForRequest and call that if available. * * @method string formatResponseForRequest(ResponseInterface $response, RequestInterface $request) Formats a response in context of its request. */ interface Formatter { /** * Formats a request. * * @return string */ public function formatRequest(RequestInterface $request); /** * @deprecated since 1.13, use formatResponseForRequest() instead * * Formats a response. * * @return string */ public function formatResponse(ResponseInterface $response); } PKt[8UriFactory/GuzzleUriFactory.phpnu[ * * @deprecated This will be removed in php-http/message2.0. Consider using the official Guzzle PSR-17 factory */ final class GuzzleUriFactory implements UriFactory { /** * {@inheritdoc} */ public function createUri($uri) { if (class_exists(Utils::class)) { return Utils::uriFor($uri); } return uri_for($uri); } } PKt[#zUriFactory/SlimUriFactory.phpnu[ * * @deprecated This will be removed in php-http/message2.0. Consider using the official Slim PSR-17 factory */ final class SlimUriFactory implements UriFactory { /** * {@inheritdoc} */ public function createUri($uri) { if ($uri instanceof UriInterface) { return $uri; } if (is_string($uri)) { return Uri::createFromString($uri); } throw new \InvalidArgumentException('URI must be a string or UriInterface'); } } PKt[Tʷ"UriFactory/DiactorosUriFactory.phpnu[ * * @deprecated This will be removed in php-http/message2.0. Consider using the official Diactoros PSR-17 factory */ final class DiactorosUriFactory implements UriFactory { /** * {@inheritdoc} */ public function createUri($uri) { if ($uri instanceof UriInterface) { return $uri; } elseif (is_string($uri)) { if (class_exists(LaminasUri::class)) { return new LaminasUri($uri); } return new ZendUri($uri); } throw new \InvalidArgumentException('URI must be a string or UriInterface'); } } PKt[Twilio/VersionInfo.phpnu[ $value) { if ($value !== self::NONE && $value !== self::ARRAY_NONE) { $result[$key] = $value; } } return $result; } public function __construct(array $options) { $this->options = []; foreach ($options as $key => $value) { $this->options[\strtolower($key)] = $value; } } /** * (PHP 5 >= 5.0.0)
      * Whether a offset exists * @link http://php.net/manual/en/arrayaccess.offsetexists.php * @param mixed $offset

      * An offset to check for. *

      * @return bool true on success or false on failure. *

      *

      * The return value will be casted to boolean if non-boolean was returned. */ public function offsetExists($offset): bool { return true; } /** * (PHP 5 >= 5.0.0)
      * Offset to retrieve * @link http://php.net/manual/en/arrayaccess.offsetget.php * @param mixed $offset

      * The offset to retrieve. *

      * @return mixed Can return all value types. */ #[\ReturnTypeWillChange] public function offsetGet($offset) { $offset = \strtolower($offset); return \array_key_exists($offset, $this->options) ? $this->options[$offset] : self::NONE; } /** * (PHP 5 >= 5.0.0)
      * Offset to set * @link http://php.net/manual/en/arrayaccess.offsetset.php * @param mixed $offset

      * The offset to assign the value to. *

      * @param mixed $value

      * The value to set. *

      * @return void */ public function offsetSet($offset, $value): void { $this->options[\strtolower($offset)] = $value; } /** * (PHP 5 >= 5.0.0)
      * Offset to unset * @link http://php.net/manual/en/arrayaccess.offsetunset.php * @param mixed $offset

      * The offset to unset. *

      * @return void */ public function offsetUnset($offset): void { unset($this->options[$offset]); } } PKt[5a(v44Twilio/InstanceContext.phpnu[version = $version; } public function __toString(): string { return '[InstanceContext]'; } } PKt[DpL^^*Twilio/Exceptions/DeserializeException.phpnu[statusCode = $statusCode; $this->moreInfo = $moreInfo; $this->details = $details; parent::__construct($message, $code); } /** * Get the HTTP Status Code of the RestException * @return int HTTP Status Code */ public function getStatusCode(): int { return $this->statusCode; } /** * Get more information of the RestException * @return string More error information */ public function getMoreInfo(): string { return $this->moreInfo; } /** * Get the details of the RestException * @return exception details */ public function getDetails(): array { return $this->details; } } PKt[4;TT%Twilio/Exceptions/TwilioException.phpnu[version = $version; } public function __toString(): string { return '[ListResource]'; } } PKt[(|rqqTwilio/Page.phpnu[processResponse($response); $this->version = $version; $this->payload = $payload; $this->solution = []; $this->records = new \ArrayIterator($this->loadPage()); } protected function processResponse(Response $response) { if ($response->getStatusCode() !== 200 && !$this->isPagingEol($response->getContent())) { $message = '[HTTP ' . $response->getStatusCode() . '] Unable to fetch page'; $code = $response->getStatusCode(); $content = $response->getContent(); $details = []; $moreInfo = ''; if (\is_array($content)) { $message .= isset($content['message']) ? ': ' . $content['message'] : ''; $code = $content['code'] ?? $code; $moreInfo = $content['more_info'] ?? ''; $details = $content['details'] ?? [] ; } throw new RestException($message, $code, $response->getStatusCode(), $moreInfo, $details); } return $response->getContent(); } protected function isPagingEol(?array $content): bool { return $content !== null && \array_key_exists('code', $content) && $content['code'] === 20006; } protected function hasMeta(string $key): bool { return \array_key_exists('meta', $this->payload) && \array_key_exists($key, $this->payload['meta']); } protected function getMeta(string $key, string $default = null): ?string { return $this->hasMeta($key) ? $this->payload['meta'][$key] : $default; } protected function loadPage(): array { $key = $this->getMeta('key'); if ($key) { return $this->payload[$key]; } $keys = \array_keys($this->payload); $key = \array_diff($keys, self::$metaKeys); $key = \array_values($key); if (\count($key) === 1) { return $this->payload[$key[0]]; } // handle end of results error code if ($this->isPagingEol($this->payload)) { return []; } throw new DeserializeException('Page Records can not be deserialized'); } public function getPreviousPageUrl(): ?string { if ($this->hasMeta('previous_page_url')) { return $this->getMeta('previous_page_url'); } else if (\array_key_exists('previous_page_uri', $this->payload) && $this->payload['previous_page_uri']) { return $this->getVersion()->getDomain()->absoluteUrl($this->payload['previous_page_uri']); } return null; } public function getNextPageUrl(): ?string { if ($this->hasMeta('next_page_url')) { return $this->getMeta('next_page_url'); } else if (\array_key_exists('next_page_uri', $this->payload) && $this->payload['next_page_uri']) { return $this->getVersion()->getDomain()->absoluteUrl($this->payload['next_page_uri']); } return null; } public function nextPage(): ?Page { if (!$this->getNextPageUrl()) { return null; } $response = $this->getVersion()->getDomain()->getClient()->request('GET', $this->getNextPageUrl()); return new static($this->getVersion(), $response, $this->solution); } public function previousPage(): ?Page { if (!$this->getPreviousPageUrl()) { return null; } $response = $this->getVersion()->getDomain()->getClient()->request('GET', $this->getPreviousPageUrl()); return new static($this->getVersion(), $response, $this->solution); } /** * (PHP 5 >= 5.0.0)
      * Return the current element * @link http://php.net/manual/en/iterator.current.php * @return mixed Can return any type. */ #[\ReturnTypeWillChange] public function current() { return $this->buildInstance($this->records->current()); } /** * (PHP 5 >= 5.0.0)
      * Move forward to next element * @link http://php.net/manual/en/iterator.next.php * @return void Any returned value is ignored. */ public function next(): void { $this->records->next(); } /** * (PHP 5 >= 5.0.0)
      * Return the key of the current element * @link http://php.net/manual/en/iterator.key.php * @return mixed scalar on success, or null on failure. */ #[\ReturnTypeWillChange] public function key() { return $this->records->key(); } /** * (PHP 5 >= 5.0.0)
      * Checks if current position is valid * @link http://php.net/manual/en/iterator.valid.php * @return bool The return value will be casted to boolean and then evaluated. * Returns true on success or false on failure. */ public function valid(): bool { return $this->records->valid(); } /** * (PHP 5 >= 5.0.0)
      * Rewind the Iterator to the first element * @link http://php.net/manual/en/iterator.rewind.php * @return void Any returned value is ignored. */ public function rewind(): void { $this->records->rewind(); } public function getVersion(): Version { return $this->version; } public function __toString(): string { return '[Page]'; } } PKt[MTwilio/Options.phpnu[options); } } PKt[=nEETwilio/Domain.phpnu[client = $client; $this->baseUrl = ''; } /** * Translate version relative URIs into absolute URLs * * @param string $uri Version relative URI * @return string Absolute URL for this domain */ public function absoluteUrl(string $uri): string { return \implode('/', [\trim($this->baseUrl, '/'), \trim($uri, '/')]); } /** * Make an HTTP request to the domain * * @param string $method HTTP Method to make the request with * @param string $uri Relative uri to make a request to * @param array $params Query string arguments * @param array $data Post form data * @param array $headers HTTP headers to send with the request * @param string $user User to authenticate as * @param string $password Password * @param int $timeout Request timeout * @return Response the response for the request */ public function request(string $method, string $uri, array $params = [], array $data = [], array $headers = [], string $user = null, string $password = null, int $timeout = null): Response { $url = $this->absoluteUrl($uri); return $this->client->request( $method, $url, $params, $data, $headers, $user, $password, $timeout ); } public function getClient(): Client { return $this->client; } public function __toString(): string { return '[Domain]'; } } PKt[vl Twilio/Jwt/Grants/VoiceGrant.phpnu[incomingAllow; } /** * Set whether incoming is allowed * * @param bool $incomingAllow whether incoming is allowed * * @return $this updated grant */ public function setIncomingAllow(bool $incomingAllow): self { $this->incomingAllow = $incomingAllow; return $this; } /** * Returns the outgoing application sid * * @return string the outgoing application sid */ public function getOutgoingApplicationSid(): string { return $this->outgoingApplicationSid; } /** * Set the outgoing application sid of the grant * * @param string $outgoingApplicationSid outgoing application sid of grant * * @return $this updated grant */ public function setOutgoingApplicationSid(string $outgoingApplicationSid): self { $this->outgoingApplicationSid = $outgoingApplicationSid; return $this; } /** * Returns the outgoing application params * * @return array the outgoing application params */ public function getOutgoingApplicationParams(): array { return $this->outgoingApplicationParams; } /** * Set the outgoing application of the the grant * * @param string $sid outgoing application sid of the grant * @param array $params params to pass the the application * * @return $this updated grant */ public function setOutgoingApplication(string $sid, array $params): self { $this->outgoingApplicationSid = $sid; $this->outgoingApplicationParams = $params; return $this; } /** * Returns the push credential sid * * @return string the push credential sid */ public function getPushCredentialSid(): string { return $this->pushCredentialSid; } /** * Set the push credential sid * * @param string $pushCredentialSid * * @return $this updated grant */ public function setPushCredentialSid(string $pushCredentialSid): self { $this->pushCredentialSid = $pushCredentialSid; return $this; } /** * Returns the endpoint id * * @return string the endpoint id */ public function getEndpointId(): string { return $this->endpointId; } /** * Set the endpoint id * * @param string $endpointId endpoint id * * @return $this updated grant */ public function setEndpointId(string $endpointId): self { $this->endpointId = $endpointId; return $this; } /** * Returns the grant type * * @return string type of the grant */ public function getGrantKey(): string { return 'voice'; } /** * Returns the grant data * * @return array data of the grant */ public function getPayload(): array { $payload = []; if ($this->incomingAllow === true) { $incoming = []; $incoming['allow'] = true; $payload['incoming'] = $incoming; } if ($this->outgoingApplicationSid) { $outgoing = []; $outgoing['application_sid'] = $this->outgoingApplicationSid; if ($this->outgoingApplicationParams) { $outgoing['params'] = $this->outgoingApplicationParams; } $payload['outgoing'] = $outgoing; } if ($this->pushCredentialSid) { $payload['push_credential_sid'] = $this->pushCredentialSid; } if ($this->endpointId) { $payload['endpoint_id'] = $this->endpointId; } return $payload; } } PKt[#Twilio/Jwt/Grants/PlaybackGrant.phpnu[grant; } /** * Set the playback grant that will allow access to a stream * * @param array $grant playback grant from Twilio API * @return $this updated grant */ public function setGrant(array $grant): self { $this->grant = $grant; return $this; } /** * Returns the grant type * * @return string type of the grant */ public function getGrantKey(): string { return 'player'; } /** * Returns the grant data * * @return array data of the grant */ public function getPayload(): array { $payload = []; if ($this->grant) { $payload = $this->grant; } return $payload; } } PKt[0 Twilio/Jwt/Grants/SyncGrant.phpnu[serviceSid; } /** * Set the service sid of this grant * * @param string $serviceSid service sid of the grant * * @return $this updated grant */ public function setServiceSid(string $serviceSid): self { $this->serviceSid = $serviceSid; return $this; } /** * Returns the endpoint id of the grant * * @return string the endpoint id */ public function getEndpointId(): string { return $this->endpointId; } /** * Set the endpoint id of the grant * * @param string $endpointId endpoint id of the grant * * @return $this updated grant */ public function setEndpointId(string $endpointId): self { $this->endpointId = $endpointId; return $this; } /** * Returns the deployment role sid of the grant * * @return string the deployment role sid */ public function getDeploymentRoleSid(): string { return $this->deploymentRoleSid; } /** * Set the role sid of the grant * * @param string $deploymentRoleSid role sid of the grant * * @return $this updated grant */ public function setDeploymentRoleSid(string $deploymentRoleSid): self { $this->deploymentRoleSid = $deploymentRoleSid; return $this; } /** * Returns the push credential sid of the grant * * @return string the push credential sid */ public function getPushCredentialSid(): string { return $this->pushCredentialSid; } /** * Set the credential sid of the grant * * @param string $pushCredentialSid push credential sid of the grant * * @return $this updated grant */ public function setPushCredentialSid(string $pushCredentialSid): self { $this->pushCredentialSid = $pushCredentialSid; return $this; } /** * Returns the grant type * * @return string type of the grant */ public function getGrantKey(): string { return 'data_sync'; } /** * Returns the grant data * * @return array data of the grant */ public function getPayload(): array { $payload = []; if ($this->serviceSid) { $payload['service_sid'] = $this->serviceSid; } if ($this->endpointId) { $payload['endpoint_id'] = $this->endpointId; } if ($this->deploymentRoleSid) { $payload['deployment_role_sid'] = $this->deploymentRoleSid; } if ($this->pushCredentialSid) { $payload['push_credential_sid'] = $this->pushCredentialSid; } return $payload; } } PKt[ o;IITwilio/Jwt/Grants/Grant.phpnu[serviceSid; } /** * Set the service sid of this grant * * @param string $serviceSid service sid of the grant * * @return $this updated grant */ public function setServiceSid(string $serviceSid): self { $this->serviceSid = $serviceSid; return $this; } /** * Returns the endpoint id of the grant * * @return string the endpoint id */ public function getEndpointId(): string { return $this->endpointId; } /** * Set the endpoint id of the grant * * @param string $endpointId endpoint id of the grant * * @return $this updated grant */ public function setEndpointId(string $endpointId): self { $this->endpointId = $endpointId; return $this; } /** * Returns the deployment role sid of the grant * * @return string the deployment role sid */ public function getDeploymentRoleSid(): string { return $this->deploymentRoleSid; } /** * Set the role sid of the grant * * @param string $deploymentRoleSid role sid of the grant * * @return $this updated grant */ public function setDeploymentRoleSid(string $deploymentRoleSid): self { $this->deploymentRoleSid = $deploymentRoleSid; return $this; } /** * Returns the push credential sid of the grant * * @return string the push credential sid */ public function getPushCredentialSid(): string { return $this->pushCredentialSid; } /** * Set the credential sid of the grant * * @param string $pushCredentialSid push credential sid of the grant * * @return $this updated grant */ public function setPushCredentialSid(string $pushCredentialSid): self { $this->pushCredentialSid = $pushCredentialSid; return $this; } /** * Returns the grant type * * @return string type of the grant */ public function getGrantKey(): string { return 'chat'; } /** * Returns the grant data * * @return array data of the grant */ public function getPayload(): array { $payload = []; if ($this->serviceSid) { $payload['service_sid'] = $this->serviceSid; } if ($this->endpointId) { $payload['endpoint_id'] = $this->endpointId; } if ($this->deploymentRoleSid) { $payload['deployment_role_sid'] = $this->deploymentRoleSid; } if ($this->pushCredentialSid) { $payload['push_credential_sid'] = $this->pushCredentialSid; } return $payload; } } PKt[f( Twilio/Jwt/Grants/VideoGrant.phpnu[room; } /** * Set the room to allow access to in the grant * * @param string $roomSidOrName room sid or name * @return $this updated grant */ public function setRoom(string $roomSidOrName): self { $this->room = $roomSidOrName; return $this; } /** * Returns the grant type * * @return string type of the grant */ public function getGrantKey(): string { return 'video'; } /** * Returns the grant data * * @return array data of the grant */ public function getPayload(): array { $payload = []; if ($this->room) { $payload['room'] = $this->room; } return $payload; } } PKt[ytt%Twilio/Jwt/Grants/TaskRouterGrant.phpnu[workspaceSid; } /** * Set the workspace sid of this grant * * @param string $workspaceSid workspace sid of the grant * * @return $this updated grant */ public function setWorkspaceSid(string $workspaceSid): self { $this->workspaceSid = $workspaceSid; return $this; } /** * Returns the worker sid * * @return string the worker sid */ public function getWorkerSid(): string { return $this->workerSid; } /** * Set the worker sid of this grant * * @param string $workerSid worker sid of the grant * * @return $this updated grant */ public function setWorkerSid(string $workerSid): self { $this->workerSid = $workerSid; return $this; } /** * Returns the role * * @return string the role */ public function getRole(): string { return $this->role; } /** * Set the role of this grant * * @param string $role role of the grant * * @return $this updated grant */ public function setRole(string $role): self { $this->role = $role; return $this; } /** * Returns the grant type * * @return string type of the grant */ public function getGrantKey(): string { return 'task_router'; } /** * Returns the grant data * * @return array data of the grant */ public function getPayload(): array { $payload = []; if ($this->workspaceSid) { $payload['workspace_sid'] = $this->workspaceSid; } if ($this->workerSid) { $payload['worker_sid'] = $this->workerSid; } if ($this->role) { $payload['role'] = $this->role; } return $payload; } } PKt[5oTwilio/Jwt/Client/ScopeURI.phpnu[:? * * For example: * scope:client:incoming?name=jonas */ class ScopeURI { public $service; public $privilege; public $params; public function __construct(string $service, string $privilege, array $params = []) { $this->service = $service; $this->privilege = $privilege; $this->params = $params; } public function toString(): string { $uri = "scope:{$this->service}:{$this->privilege}"; if (\count($this->params)) { $uri .= '?' . \http_build_query($this->params, '', '&'); } return $uri; } /** * Parse a scope URI into a ScopeURI object * * @param string $uri The scope URI * @return ScopeURI The parsed scope uri * @throws \UnexpectedValueException */ public static function parse(string $uri): ScopeURI { if (\strpos($uri, 'scope:') !== 0) { throw new \UnexpectedValueException( 'Not a scope URI according to scheme'); } $parts = \explode('?', $uri, 1); $params = null; if (\count($parts) > 1) { \parse_str($parts[1], $params); } $parts = \explode(':', $parts[0], 2); if (\count($parts) !== 3) { throw new \UnexpectedValueException( 'Not enough parts for scope URI'); } [$scheme, $service, $privilege] = $parts; return new ScopeURI($service, $privilege, $params); } } PKt[wCTwilio/Jwt/AccessToken.phpnu[signingKeySid = $signingKeySid; $this->accountSid = $accountSid; $this->secret = $secret; $this->ttl = $ttl; $this->region = $region; if ($identity !== null) { $this->identity = $identity; } $this->grants = []; $this->customClaims = []; } /** * Set the identity of this access token * * @param string $identity identity of the grant * * @return $this updated access token */ public function setIdentity(string $identity): self { $this->identity = $identity; return $this; } /** * Returns the identity of the grant * * @return string the identity */ public function getIdentity(): string { return $this->identity; } /** * Set the nbf of this access token * * @param int $nbf nbf in epoch seconds of the grant * * @return $this updated access token */ public function setNbf(int $nbf): self { $this->nbf = $nbf; return $this; } /** * Returns the nbf of the grant * * @return int the nbf in epoch seconds */ public function getNbf(): int { return $this->nbf; } /** * Set the region of this access token * * @param string $region Home region of the account sid in this access token * * @return $this updated access token */ public function setRegion(string $region): self { $this->region = $region; return $this; } /** * Returns the region of this access token * * @return string Home region of the account sid in this access token */ public function getRegion(): string { return $this->region; } /** * Add a grant to the access token * * @param Grant $grant to be added * * @return $this the updated access token */ public function addGrant(Grant $grant): self { $this->grants[] = $grant; return $this; } /** * Allows to set custom claims, which then will be encoded into JWT payload. * * @param string $name * @param string $value */ public function addClaim(string $name, string $value): void { $this->customClaims[$name] = $value; } public function toJWT(string $algorithm = 'HS256'): string { $header = [ 'cty' => 'twilio-fpa;v=1', 'typ' => 'JWT' ]; if ($this->region) { $header['twr'] = $this->region; } $now = \time(); $grants = []; if ($this->identity) { $grants['identity'] = $this->identity; } foreach ($this->grants as $grant) { $payload = $grant->getPayload(); if (empty($payload)) { $payload = \json_decode('{}'); } $grants[$grant->getGrantKey()] = $payload; } if (empty($grants)) { $grants = \json_decode('{}'); } $payload = \array_merge($this->customClaims, [ 'jti' => $this->signingKeySid . '-' . $now, 'iss' => $this->signingKeySid, 'sub' => $this->accountSid, 'exp' => $now + $this->ttl, 'grants' => $grants ]); if ($this->nbf !== null) { $payload['nbf'] = $this->nbf; } return JWT::encode($payload, $this->secret, $algorithm, $header); } public function __toString(): string { return $this->toJWT(); } } PKt[i娯Twilio/Jwt/ClientToken.phpnu[accountSid = $accountSid; $this->authToken = $authToken; $this->scopes = []; $this->clientName = false; $this->customClaims = []; } /** * If the user of this token should be allowed to accept incoming * connections then configure the TwilioCapability through this method and * specify the client name. * * @param string $clientName * @throws \InvalidArgumentException */ public function allowClientIncoming(string $clientName): void { // clientName must be a non-zero length alphanumeric string if (\preg_match('/\W/', $clientName)) { throw new \InvalidArgumentException( 'Only alphanumeric characters allowed in client name.'); } if ($clientName === '') { throw new \InvalidArgumentException( 'Client name must not be a zero length string.'); } $this->clientName = $clientName; $this->allow('client', 'incoming', ['clientName' => $clientName]); } /** * Allow the user of this token to make outgoing connections. * * @param string $appSid the application to which this token grants access * @param mixed[] $appParams signed parameters that the user of this token * cannot overwrite. */ public function allowClientOutgoing(string $appSid, array $appParams = []): void { $this->allow('client', 'outgoing', [ 'appSid' => $appSid, 'appParams' => \http_build_query($appParams, '', '&') ]); } /** * Allow the user of this token to access their event stream. * * @param mixed[] $filters key/value filters to apply to the event stream */ public function allowEventStream(array $filters = []): void { $this->allow('stream', 'subscribe', [ 'path' => '/2010-04-01/Events', 'params' => \http_build_query($filters, '', '&'), ]); } /** * Allows to set custom claims, which then will be encoded into JWT payload. * * @param string $name * @param string $value */ public function addClaim(string $name, string $value): void { $this->customClaims[$name] = $value; } /** * Generates a new token based on the credentials and permissions that * previously has been granted to this token. * * @param int $ttl the expiration time of the token (in seconds). Default * value is 3600 (1hr) * @return string the newly generated token that is valid for $ttl seconds */ public function generateToken(int $ttl = 3600): string { $payload = \array_merge($this->customClaims, [ 'scope' => [], 'iss' => $this->accountSid, 'exp' => \time() + $ttl, ]); $scopeStrings = []; foreach ($this->scopes as $scope) { if ($scope->privilege === 'outgoing' && $this->clientName) { $scope->params['clientName'] = $this->clientName; } $scopeStrings[] = $scope->toString(); } $payload['scope'] = \implode(' ', $scopeStrings); return JWT::encode($payload, $this->authToken, 'HS256'); } protected function allow(string $service, string $privilege, array $params): void { $this->scopes[] = new ScopeURI($service, $privilege, $params); } } PKt[NxTwilio/Jwt/JWT.phpnu[ */ class JWT { /** * @param string $jwt The JWT * @param string|null $key The secret key * @param bool $verify Don't skip verification process * @return object The JWT's payload as a PHP object * @throws \DomainException * @throws \UnexpectedValueException */ public static function decode(string $jwt, string $key = null, bool $verify = true) { $tks = \explode('.', $jwt); if (\count($tks) !== 3) { throw new \UnexpectedValueException('Wrong number of segments'); } list($headb64, $payloadb64, $cryptob64) = $tks; if (null === ($header = self::jsonDecode(self::urlsafeB64Decode($headb64))) ) { throw new \UnexpectedValueException('Invalid segment encoding'); } if (null === $payload = self::jsonDecode(self::urlsafeB64Decode($payloadb64)) ) { throw new \UnexpectedValueException('Invalid segment encoding'); } $sig = self::urlsafeB64Decode($cryptob64); if ($verify) { if (empty($header->alg)) { throw new \DomainException('Empty algorithm'); } if (!hash_equals($sig, self::sign("$headb64.$payloadb64", $key, $header->alg))) { throw new \UnexpectedValueException('Signature verification failed'); } } return $payload; } /** * @param string $jwt The JWT * @return object The JWT's header as a PHP object * @throws \UnexpectedValueException */ public static function getHeader(string $jwt) { $tks = \explode('.', $jwt); if (\count($tks) !== 3) { throw new \UnexpectedValueException('Wrong number of segments'); } list($headb64) = $tks; if (null === ($header = self::jsonDecode(self::urlsafeB64Decode($headb64))) ) { throw new \UnexpectedValueException('Invalid segment encoding'); } return $header; } /** * @param object|array $payload PHP object or array * @param string $key The secret key * @param string $algo The signing algorithm * @param array $additionalHeaders Additional keys/values to add to the header * * @return string A JWT */ public static function encode($payload, string $key, string $algo = 'HS256', array $additionalHeaders = []): string { $header = ['typ' => 'JWT', 'alg' => $algo]; $header += $additionalHeaders; $segments = []; $segments[] = self::urlsafeB64Encode(self::jsonEncode($header)); $segments[] = self::urlsafeB64Encode(self::jsonEncode($payload)); $signing_input = \implode('.', $segments); $signature = self::sign($signing_input, $key, $algo); $segments[] = self::urlsafeB64Encode($signature); return \implode('.', $segments); } /** * @param string $msg The message to sign * @param string $key The secret key * @param string $method The signing algorithm * @return string An encrypted message * @throws \DomainException */ public static function sign(string $msg, string $key, string $method = 'HS256'): string { $methods = [ 'HS256' => 'sha256', 'HS384' => 'sha384', 'HS512' => 'sha512', ]; if (empty($methods[$method])) { throw new \DomainException('Algorithm not supported'); } return \hash_hmac($methods[$method], $msg, $key, true); } /** * @param string $input JSON string * @return object Object representation of JSON string * @throws \DomainException */ public static function jsonDecode(string $input) { $obj = \json_decode($input); if (\function_exists('json_last_error') && $errno = \json_last_error()) { self::handleJsonError($errno); } else if ($obj === null && $input !== 'null') { throw new \DomainException('Null result with non-null input'); } return $obj; } /** * @param object|array $input A PHP object or array * @return string JSON representation of the PHP object or array * @throws \DomainException */ public static function jsonEncode($input): string { $json = \json_encode($input); if (\function_exists('json_last_error') && $errno = \json_last_error()) { self::handleJsonError($errno); } else if ($json === 'null' && $input !== null) { throw new \DomainException('Null result with non-null input'); } return $json; } /** * @param string $input A base64 encoded string * * @return string A decoded string */ public static function urlsafeB64Decode(string $input): string { $padLen = 4 - \strlen($input) % 4; $input .= \str_repeat('=', $padLen); return \base64_decode(\strtr($input, '-_', '+/')); } /** * @param string $input Anything really * * @return string The base64 encode of what you passed in */ public static function urlsafeB64Encode(string $input): string { return \str_replace('=', '', \strtr(\base64_encode($input), '+/', '-_')); } /** * @param int $errno An error number from json_last_error() * * @throws \DomainException */ private static function handleJsonError(int $errno): void { $messages = [ JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON' ]; throw new \DomainException($messages[$errno] ?? 'Unknown JSON error: ' . $errno); } } PKt[d  )Twilio/Jwt/TaskRouter/CapabilityToken.phpnu[ * @license http://creativecommons.org/licenses/MIT/ MIT */ class CapabilityToken { protected $accountSid; protected $authToken; private $friendlyName; /** @var Policy[] $policies */ private $policies; protected $baseUrl = 'https://taskrouter.twilio.com/v1'; protected $baseWsUrl = 'https://event-bridge.twilio.com/v1/wschannels'; protected $version = 'v1'; protected $workspaceSid; protected $channelId; protected $resourceUrl; protected $required = ['required' => true]; protected $optional = ['required' => false]; public function __construct(string $accountSid, string $authToken, string $workspaceSid, string $channelId, string $resourceUrl = null, string $overrideBaseUrl = null, string $overrideBaseWSUrl = null) { $this->accountSid = $accountSid; $this->authToken = $authToken; $this->friendlyName = $channelId; $this->policies = []; $this->workspaceSid = $workspaceSid; $this->channelId = $channelId; if (isset($overrideBaseUrl)) { $this->baseUrl = $overrideBaseUrl; } if (isset($overrideBaseWSUrl)) { $this->baseWsUrl = $overrideBaseWSUrl; } $this->baseUrl .= '/Workspaces/' . $workspaceSid; $this->validateJWT(); if (!isset($resourceUrl)) { $this->setupResource(); } //add permissions to GET and POST to the event-bridge channel $this->allow($this->baseWsUrl . '/' . $this->accountSid . '/' . $this->channelId, 'GET', null, null); $this->allow($this->baseWsUrl . '/' . $this->accountSid . '/' . $this->channelId, 'POST', null, null); //add permissions to fetch the instance resource $this->allow($this->resourceUrl, 'GET', null, null); } protected function setupResource(): void { } public function addPolicyDeconstructed(string $url, string $method, ?array $queryFilter = [], ?array $postFilter = [], bool $allow = true): Policy { $policy = new Policy($url, $method, $queryFilter, $postFilter, $allow); $this->policies[] = $policy; return $policy; } public function allow(string $url, string $method, ?array $queryFilter = [], ?array $postFilter = []): void { $this->addPolicyDeconstructed($url, $method, $queryFilter, $postFilter, true); } public function deny(string $url, string $method, array $queryFilter = [], array $postFilter = []): void { $this->addPolicyDeconstructed($url, $method, $queryFilter, $postFilter, false); } private function validateJWT(): void { if (!isset($this->accountSid) || \strpos($this->accountSid, 'AC') !== 0) { throw new \Exception('Invalid AccountSid provided: ' . $this->accountSid); } if (!isset($this->workspaceSid) || \strpos($this->workspaceSid, 'WS') !== 0) { throw new \Exception('Invalid WorkspaceSid provided: ' . $this->workspaceSid); } if (!isset($this->channelId)) { throw new \Exception('ChannelId not provided'); } $prefix = \substr($this->channelId, 0, 2); if ($prefix !== 'WS' && $prefix !== 'WK' && $prefix !== 'WQ') { throw new \Exception("Invalid ChannelId provided: " . $this->channelId); } } public function allowFetchSubresources(): void { $method = 'GET'; $queryFilter = []; $postFilter = []; $this->allow($this->resourceUrl . '/**', $method, $queryFilter, $postFilter); } public function allowUpdates(): void { $method = 'POST'; $queryFilter = []; $postFilter = []; $this->allow($this->resourceUrl, $method, $queryFilter, $postFilter); } public function allowUpdatesSubresources(): void { $method = 'POST'; $queryFilter = []; $postFilter = []; $this->allow($this->resourceUrl . '/**', $method, $queryFilter, $postFilter); } public function allowDelete(): void { $method = 'DELETE'; $queryFilter = []; $postFilter = []; $this->allow($this->resourceUrl, $method, $queryFilter, $postFilter); } public function allowDeleteSubresources(): void { $method = 'DELETE'; $queryFilter = []; $postFilter = []; $this->allow($this->resourceUrl . '/**', $method, $queryFilter, $postFilter); } public function generateToken(int $ttl = 3600, array $extraAttributes = []): string { $payload = [ 'version' => $this->version, 'friendly_name' => $this->friendlyName, 'iss' => $this->accountSid, 'exp' => \time() + $ttl, 'account_sid' => $this->accountSid, 'channel' => $this->channelId, 'workspace_sid' => $this->workspaceSid ]; if (\strpos($this->channelId, 'WK') === 0) { $payload['worker_sid'] = $this->channelId; } else if (\strpos($this->channelId, 'WQ') === 0) { $payload['taskqueue_sid'] = $this->channelId; } foreach ($extraAttributes as $key => $value) { $payload[$key] = $value; } $policyStrings = []; foreach ($this->policies as $policy) { $policyStrings[] = $policy->toArray(); } $payload['policies'] = $policyStrings; return JWT::encode($payload, $this->authToken, 'HS256'); } } PKt[Ⱦk Twilio/Jwt/TaskRouter/Policy.phpnu[ * @license http://creativecommons.org/licenses/MIT/ MIT */ class Policy { private $url; private $method; private $queryFilter; private $postFilter; private $allow; public function __construct(string $url, string $method, ?array $queryFilter = [], ?array $postFilter = [], bool $allow = true) { $this->url = $url; $this->method = $method; $this->queryFilter = $queryFilter; $this->postFilter = $postFilter; $this->allow = $allow; } public function addQueryFilter($queryFilter): void { $this->queryFilter[] = $queryFilter; } public function addPostFilter($postFilter): void { $this->postFilter[] = $postFilter; } public function toArray(): array { $policy_array = ['url' => $this->url, 'method' => $this->method, 'allow' => $this->allow]; if ($this->queryFilter !== null) { if (\count($this->queryFilter) > 0) { $policy_array['query_filter'] = $this->queryFilter; } else { $policy_array['query_filter'] = new \stdClass(); } } if ($this->postFilter !== null) { if (\count($this->postFilter) > 0) { $policy_array['post_filter'] = $this->postFilter; } else { $policy_array['post_filter'] = new \stdClass(); } } return $policy_array; } } PKt[|Y88*Twilio/Jwt/TaskRouter/WorkerCapability.phpnu[ * @license http://creativecommons.org/licenses/MIT/ MIT */ class WorkerCapability extends CapabilityToken { private $tasksUrl; private $workerReservationsUrl; private $activityUrl; public function __construct(string $accountSid, string $authToken, string $workspaceSid, string $workerSid, string $overrideBaseUrl = null, string $overrideBaseWSUrl = null) { parent::__construct($accountSid, $authToken, $workspaceSid, $workerSid, null, $overrideBaseUrl, $overrideBaseWSUrl); $this->tasksUrl = $this->baseUrl . '/Tasks/**'; $this->activityUrl = $this->baseUrl . '/Activities'; $this->workerReservationsUrl = $this->resourceUrl . '/Reservations/**'; //add permissions to fetch the list of activities, tasks, and worker reservations $this->allow($this->activityUrl, 'GET', null, null); $this->allow($this->tasksUrl, 'GET', null, null); $this->allow($this->workerReservationsUrl, 'GET', null, null); } protected function setupResource(): void { $this->resourceUrl = $this->baseUrl . '/Workers/' . $this->channelId; } public function allowActivityUpdates(): void { $method = 'POST'; $queryFilter = []; $postFilter = ['ActivitySid' => $this->required]; $this->allow($this->resourceUrl, $method, $queryFilter, $postFilter); } public function allowReservationUpdates(): void { $method = 'POST'; $queryFilter = []; $postFilter = []; $this->allow($this->tasksUrl, $method, $queryFilter, $postFilter); $this->allow($this->workerReservationsUrl, $method, $queryFilter, $postFilter); } } PKt[C;  -Twilio/Jwt/TaskRouter/WorkspaceCapability.phpnu[resourceUrl = $this->baseUrl; } } PKt[XWu-Twilio/Jwt/TaskRouter/TaskQueueCapability.phpnu[ * @license http://creativecommons.org/licenses/MIT/ MIT */ class TaskQueueCapability extends CapabilityToken { public function __construct(string $accountSid, string $authToken, string $workspaceSid, string $taskQueueSid, string $overrideBaseUrl = null, string $overrideBaseWSUrl = null) { parent::__construct($accountSid, $authToken, $workspaceSid, $taskQueueSid, null, $overrideBaseUrl, $overrideBaseWSUrl); } protected function setupResource(): void { $this->resourceUrl = $this->baseUrl . '/TaskQueues/' . $this->channelId; } } PKt[[  Twilio/autoload.phpnu[. */ /** * SplClassLoader implementation that implements the technical interoperability * standards for PHP 5.3 namespaces and class names. * * http://groups.google.com/group/php-standards/web/psr-0-final-proposal?pli=1 * * // Example which loads classes for the Doctrine Common package in the * // Doctrine\Common namespace. * $classLoader = new SplClassLoader('Doctrine\Common', '/path/to/doctrine'); * $classLoader->register(); * * @license http://www.opensource.org/licenses/mit-license.html MIT License * @author Jonathan H. Wage * @author Roman S. Borschel * @author Matthew Weier O'Phinney * @author Kris Wallsmith * @author Fabien Potencier */ class SplClassLoader { private $_fileExtension = '.php'; private $_namespace; private $_includePath; private $_namespaceSeparator = '\\'; /** * Creates a new SplClassLoader that loads classes of the * specified namespace. * * @param string $ns The namespace to use. * @param string $includePath The include path to search */ public function __construct($ns = null, $includePath = null) { $this->_namespace = $ns; $this->_includePath = $includePath; } /** * Sets the namespace separator used by classes in the namespace of this class loader. * * @param string $sep The separator to use. */ public function setNamespaceSeparator($sep): void { $this->_namespaceSeparator = $sep; } /** * Gets the namespace separator used by classes in the namespace of this class loader. * * @return string The separator to use. */ public function getNamespaceSeparator(): string { return $this->_namespaceSeparator; } /** * Sets the base include path for all class files in the namespace of this class loader. * * @param string $includePath */ public function setIncludePath($includePath): void { $this->_includePath = $includePath; } /** * Gets the base include path for all class files in the namespace of this class loader. * * @return string $includePath */ public function getIncludePath(): string { return $this->_includePath; } /** * Sets the file extension of class files in the namespace of this class loader. * * @param string $fileExtension */ public function setFileExtension($fileExtension): void { $this->_fileExtension = $fileExtension; } /** * Gets the file extension of class files in the namespace of this class loader. * * @return string $fileExtension */ public function getFileExtension(): string { return $this->_fileExtension; } /** * Installs this class loader on the SPL autoload stack. */ public function register(): void { \spl_autoload_register([$this, 'loadClass']); } /** * Uninstalls this class loader from the SPL autoloader stack. */ public function unregister(): void { \spl_autoload_unregister([$this, 'loadClass']); } /** * Loads the given class or interface. * * @param string $className The name of the class to load. * @return void */ public function loadClass($className): void { if (null === $this->_namespace || $this->_namespace . $this->_namespaceSeparator === \substr($className, 0, \strlen($this->_namespace . $this->_namespaceSeparator))) { $fileName = ''; $namespace = ''; if (false !== ($lastNsPos = \strripos($className, $this->_namespaceSeparator))) { $namespace = \substr($className, 0, $lastNsPos); $className = \substr($className, $lastNsPos + 1); $fileName = \str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; } $fileName .= \str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension; require ($this->_includePath !== null ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName; } } } $twilioClassLoader = new SplClassLoader('Twilio', \realpath(__DIR__ . DIRECTORY_SEPARATOR . '..')); $twilioClassLoader->register(); PKt[VQQTwilio/Deserialize.phpnu[page = $page; $this->firstPage = $page; $this->limit = $limit; $this->currentRecord = 1; $this->pageLimit = $pageLimit; $this->currentPage = 1; } /** * (PHP 5 >= 5.0.0)
      * Return the current element * @link http://php.net/manual/en/iterator.current.php * @return mixed Can return any type. */ #[\ReturnTypeWillChange] public function current() { return $this->page->current(); } /** * (PHP 5 >= 5.0.0)
      * Move forward to next element * @link http://php.net/manual/en/iterator.next.php * @return void Any returned value is ignored. */ public function next(): void { $this->page->next(); $this->currentRecord++; if ($this->overLimit()) { return; } if (!$this->page->valid()) { if ($this->overPageLimit()) { return; } $this->page = $this->page->nextPage(); $this->currentPage++; } } /** * (PHP 5 >= 5.0.0)
      * Return the key of the current element * @link http://php.net/manual/en/iterator.key.php * @return mixed scalar on success, or null on failure. */ #[\ReturnTypeWillChange] public function key() { return $this->currentRecord; } /** * (PHP 5 >= 5.0.0)
      * Checks if current position is valid * @link http://php.net/manual/en/iterator.valid.php * @return bool The return value will be casted to boolean and then evaluated. * Returns true on success or false on failure. */ public function valid(): bool { return $this->page && $this->page->valid() && !$this->overLimit() && !$this->overPageLimit(); } /** * (PHP 5 >= 5.0.0)
      * Rewind the Iterator to the first element * @link http://php.net/manual/en/iterator.rewind.php * @return void Any returned value is ignored. */ public function rewind(): void { $this->page = $this->firstPage; $this->page->rewind(); $this->currentPage = 1; $this->currentRecord = 1; } protected function overLimit(): bool { return ($this->limit !== null && $this->limit !== Values::NONE && $this->limit < $this->currentRecord); } protected function overPageLimit(): bool { return ($this->pageLimit !== null && $this->pageLimit !== Values::NONE && $this->pageLimit < $this->currentPage); } } PKt[y3^CTwilio/TwiML/GenericNode.phpnu[name = $name; $this->value = $value; } } PKt[1GGTwilio/TwiML/FaxResponse.phpnu[nest(new Fax\Receive($attributes)); } }PKt[x kkTwilio/TwiML/VoiceResponse.phpnu[nest(new Voice\Connect($attributes)); } /** * Add Dial child. * * @param string $number Phone number to dial * @param array $attributes Optional attributes * @return Voice\Dial Child element. */ public function dial($number = null, $attributes = []): Voice\Dial { return $this->nest(new Voice\Dial($number, $attributes)); } /** * Add Echo child. * * @return Voice\Echo_ Child element. */ public function echo_(): Voice\Echo_ { return $this->nest(new Voice\Echo_()); } /** * Add Enqueue child. * * @param string $name Friendly name * @param array $attributes Optional attributes * @return Voice\Enqueue Child element. */ public function enqueue($name = null, $attributes = []): Voice\Enqueue { return $this->nest(new Voice\Enqueue($name, $attributes)); } /** * Add Gather child. * * @param array $attributes Optional attributes * @return Voice\Gather Child element. */ public function gather($attributes = []): Voice\Gather { return $this->nest(new Voice\Gather($attributes)); } /** * Add Hangup child. * * @return Voice\Hangup Child element. */ public function hangup(): Voice\Hangup { return $this->nest(new Voice\Hangup()); } /** * Add Leave child. * * @return Voice\Leave Child element. */ public function leave(): Voice\Leave { return $this->nest(new Voice\Leave()); } /** * Add Pause child. * * @param array $attributes Optional attributes * @return Voice\Pause Child element. */ public function pause($attributes = []): Voice\Pause { return $this->nest(new Voice\Pause($attributes)); } /** * Add Play child. * * @param string $url Media URL * @param array $attributes Optional attributes * @return Voice\Play Child element. */ public function play($url = null, $attributes = []): Voice\Play { return $this->nest(new Voice\Play($url, $attributes)); } /** * Add Queue child. * * @param string $name Queue name * @param array $attributes Optional attributes * @return Voice\Queue Child element. */ public function queue($name, $attributes = []): Voice\Queue { return $this->nest(new Voice\Queue($name, $attributes)); } /** * Add Record child. * * @param array $attributes Optional attributes * @return Voice\Record Child element. */ public function record($attributes = []): Voice\Record { return $this->nest(new Voice\Record($attributes)); } /** * Add Redirect child. * * @param string $url Redirect URL * @param array $attributes Optional attributes * @return Voice\Redirect Child element. */ public function redirect($url, $attributes = []): Voice\Redirect { return $this->nest(new Voice\Redirect($url, $attributes)); } /** * Add Reject child. * * @param array $attributes Optional attributes * @return Voice\Reject Child element. */ public function reject($attributes = []): Voice\Reject { return $this->nest(new Voice\Reject($attributes)); } /** * Add Say child. * * @param string $message Message to say * @param array $attributes Optional attributes * @return Voice\Say Child element. */ public function say($message, $attributes = []): Voice\Say { return $this->nest(new Voice\Say($message, $attributes)); } /** * Add Sms child. * * @param string $message Message body * @param array $attributes Optional attributes * @return Voice\Sms Child element. */ public function sms($message, $attributes = []): Voice\Sms { return $this->nest(new Voice\Sms($message, $attributes)); } /** * Add Pay child. * * @param array $attributes Optional attributes * @return Voice\Pay Child element. */ public function pay($attributes = []): Voice\Pay { return $this->nest(new Voice\Pay($attributes)); } /** * Add Prompt child. * * @param array $attributes Optional attributes * @return Voice\Prompt Child element. */ public function prompt($attributes = []): Voice\Prompt { return $this->nest(new Voice\Prompt($attributes)); } /** * Add Start child. * * @param array $attributes Optional attributes * @return Voice\Start Child element. */ public function start($attributes = []): Voice\Start { return $this->nest(new Voice\Start($attributes)); } /** * Add Stop child. * * @return Voice\Stop Child element. */ public function stop(): Voice\Stop { return $this->nest(new Voice\Stop()); } /** * Add Refer child. * * @param array $attributes Optional attributes * @return Voice\Refer Child element. */ public function refer($attributes = []): Voice\Refer { return $this->nest(new Voice\Refer($attributes)); } }PKt[lTwilio/TwiML/Messaging/Body.phpnu[nest(new Body($message)); } /** * Add Media child. * * @param string $url Media URL * @return Media Child element. */ public function media($url): Media { return $this->nest(new Media($url)); } /** * Add To attribute. * * @param string $to Phone Number to send Message to */ public function setTo($to): self { return $this->setAttribute('to', $to); } /** * Add From attribute. * * @param string $from Phone Number to send Message from */ public function setFrom($from): self { return $this->setAttribute('from', $from); } /** * Add Action attribute. * * @param string $action Action URL */ public function setAction($action): self { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param string $method Action URL Method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add StatusCallback attribute. * * @param string $statusCallback Status callback URL. Deprecated in favor of * action. */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } }PKt[+d#Twilio/TwiML/Messaging/Redirect.phpnu[setAttribute('method', $method); } }PKt[DF N}} Twilio/TwiML/Messaging/Media.phpnu[setAttribute('action', $action); } /** * Add Method attribute. * * @param string $method Receive action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add MediaType attribute. * * @param string $mediaType The media type used to store media in the fax media * store */ public function setMediaType($mediaType): self { return $this->setAttribute('mediaType', $mediaType); } /** * Add PageSize attribute. * * @param string $pageSize What size to interpret received pages as */ public function setPageSize($pageSize): self { return $this->setAttribute('pageSize', $pageSize); } /** * Add StoreMedia attribute. * * @param bool $storeMedia Whether or not to store received media in the fax * media store */ public function setStoreMedia($storeMedia): self { return $this->setAttribute('storeMedia', $storeMedia); } }PKt[t Twilio/TwiML/TwiML.phpnu[name = $name; $this->attributes = $attributes; $this->children = []; if ($value !== null) { $this->children[] = $value; } } /** * Add a TwiML element. * * @param TwiML|string $twiml TwiML element to add * @return TwiML $this */ public function append($twiml): TwiML { $this->children[] = $twiml; return $this; } /** * Add a TwiML element. * * @param TwiML $twiml TwiML element to add * @return TwiML added TwiML element */ public function nest(TwiML $twiml): TwiML { $this->children[] = $twiml; return $twiml; } /** * Set TwiML attribute. * * @param string $key name of attribute * @param string $value value of attribute * @return static $this */ public function setAttribute(string $key, string $value): TwiML { $this->attributes[$key] = $value; return $this; } /** * @param string $name XML element name * @param string $value XML value * @param array $attributes XML attributes * @return TwiML */ public function addChild(string $name, string $value = null, array $attributes = []): TwiML { return $this->nest(new GenericNode($name, $value, $attributes)); } /** * Convert TwiML to XML string. * * @return string TwiML XML representation */ public function asXML(): string { return (string)$this; } /** * Convert TwiML to XML string. * * @return string TwiML XML representation */ public function __toString(): string { return $this->xml()->saveXML(); } /** * Build TwiML element. * * @param TwiML $twiml TwiML element to convert to XML * @param DOMDocument $document XML document for the element * @return DOMElement $element */ private function buildElement(TwiML $twiml, DOMDocument $document): DOMElement { $element = $document->createElement($twiml->name); foreach ($twiml->attributes as $name => $value) { if (\is_bool($value)) { $value = ($value === true) ? 'true' : 'false'; } $element->setAttribute($name, $value); } foreach ($twiml->children as $child) { if (\is_string($child)) { $element->appendChild($document->createTextNode($child)); } else { $element->appendChild($this->buildElement($child, $document)); } } return $element; } /** * Build XML element. * * @return DOMDocument Build TwiML element */ private function xml(): DOMDocument { $document = new DOMDocument('1.0', 'UTF-8'); $document->appendChild($this->buildElement($this, $document)); return $document; } } PKt[ZUzzTwilio/TwiML/Video/Room.phpnu[nest(new Messaging\Message($body, $attributes)); } /** * Add Redirect child. * * @param string $url Redirect URL * @param array $attributes Optional attributes * @return Messaging\Redirect Child element. */ public function redirect($url, $attributes = []): Messaging\Redirect { return $this->nest(new Messaging\Redirect($url, $attributes)); } }PKt[g\Twilio/TwiML/Voice/Queue.phpnu[setAttribute('url', $url); } /** * Add Method attribute. * * @param string $method Action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add ReservationSid attribute. * * @param string $reservationSid TaskRouter Reservation SID */ public function setReservationSid($reservationSid): self { return $this->setAttribute('reservationSid', $reservationSid); } /** * Add PostWorkActivitySid attribute. * * @param string $postWorkActivitySid TaskRouter Activity SID */ public function setPostWorkActivitySid($postWorkActivitySid): self { return $this->setAttribute('postWorkActivitySid', $postWorkActivitySid); } }PKt[Gz+Twilio/TwiML/Voice/Identity.phpnu[setAttribute('alias', $alias); } }PKt[Qx #Twilio/TwiML/Voice/SsmlEmphasis.phpnu[nest(new SsmlBreak($attributes)); } /** * Add Emphasis child. * * @param string $words Words to emphasize * @param array $attributes Optional attributes * @return SsmlEmphasis Child element. */ public function emphasis($words, $attributes = []): SsmlEmphasis { return $this->nest(new SsmlEmphasis($words, $attributes)); } /** * Add Lang child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlLang Child element. */ public function lang($words, $attributes = []): SsmlLang { return $this->nest(new SsmlLang($words, $attributes)); } /** * Add Phoneme child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlPhoneme Child element. */ public function phoneme($words, $attributes = []): SsmlPhoneme { return $this->nest(new SsmlPhoneme($words, $attributes)); } /** * Add Prosody child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlProsody Child element. */ public function prosody($words, $attributes = []): SsmlProsody { return $this->nest(new SsmlProsody($words, $attributes)); } /** * Add Say-As child. * * @param string $words Words to be interpreted * @param array $attributes Optional attributes * @return SsmlSayAs Child element. */ public function say_As($words, $attributes = []): SsmlSayAs { return $this->nest(new SsmlSayAs($words, $attributes)); } /** * Add Sub child. * * @param string $words Words to be substituted * @param array $attributes Optional attributes * @return SsmlSub Child element. */ public function sub($words, $attributes = []): SsmlSub { return $this->nest(new SsmlSub($words, $attributes)); } /** * Add W child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlW Child element. */ public function w($words, $attributes = []): SsmlW { return $this->nest(new SsmlW($words, $attributes)); } /** * Add Level attribute. * * @param string $level Specify the degree of emphasis */ public function setLevel($level): self { return $this->setAttribute('level', $level); } }PKt[x>N8  #Twilio/TwiML/Voice/Conversation.phpnu[setAttribute('serviceInstanceSid', $serviceInstanceSid); } /** * Add InboundAutocreation attribute. * * @param bool $inboundAutocreation Inbound autocreation */ public function setInboundAutocreation($inboundAutocreation): self { return $this->setAttribute('inboundAutocreation', $inboundAutocreation); } /** * Add RoutingAssignmentTimeout attribute. * * @param int $routingAssignmentTimeout Routing assignment timeout */ public function setRoutingAssignmentTimeout($routingAssignmentTimeout): self { return $this->setAttribute('routingAssignmentTimeout', $routingAssignmentTimeout); } /** * Add InboundTimeout attribute. * * @param int $inboundTimeout Inbound timeout */ public function setInboundTimeout($inboundTimeout): self { return $this->setAttribute('inboundTimeout', $inboundTimeout); } /** * Add Url attribute. * * @param string $url TwiML URL */ public function setUrl($url): self { return $this->setAttribute('url', $url); } /** * Add Method attribute. * * @param string $method TwiML URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add Record attribute. * * @param string $record Record */ public function setRecord($record): self { return $this->setAttribute('record', $record); } /** * Add Trim attribute. * * @param string $trim Trim */ public function setTrim($trim): self { return $this->setAttribute('trim', $trim); } /** * Add RecordingStatusCallback attribute. * * @param string $recordingStatusCallback Recording status callback URL */ public function setRecordingStatusCallback($recordingStatusCallback): self { return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback); } /** * Add RecordingStatusCallbackMethod attribute. * * @param string $recordingStatusCallbackMethod Recording status callback URL * method */ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self { return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod); } /** * Add RecordingStatusCallbackEvent attribute. * * @param string[] $recordingStatusCallbackEvent Recording status callback * events */ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self { return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent); } /** * Add StatusCallback attribute. * * @param string $statusCallback Status callback URL */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param string $statusCallbackMethod Status callback URL method */ public function setStatusCallbackMethod($statusCallbackMethod): self { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } /** * Add StatusCallbackEvent attribute. * * @param string[] $statusCallbackEvent Events to call status callback URL */ public function setStatusCallbackEvent($statusCallbackEvent): self { return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent); } }PKt[2RfTwilio/TwiML/Voice/Sms.phpnu[setAttribute('to', $to); } /** * Add From attribute. * * @param string $from Number to send message from */ public function setFrom($from): self { return $this->setAttribute('from', $from); } /** * Add Action attribute. * * @param string $action Action URL */ public function setAction($action): self { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param string $method Action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add StatusCallback attribute. * * @param string $statusCallback Status callback URL */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } }PKt[;fTwilio/TwiML/Voice/Client.phpnu[nest(new Identity($clientIdentity)); } /** * Add Parameter child. * * @param array $attributes Optional attributes * @return Parameter Child element. */ public function parameter($attributes = []): Parameter { return $this->nest(new Parameter($attributes)); } /** * Add Url attribute. * * @param string $url Client URL */ public function setUrl($url): self { return $this->setAttribute('url', $url); } /** * Add Method attribute. * * @param string $method Client URL Method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add StatusCallbackEvent attribute. * * @param string[] $statusCallbackEvent Events to trigger status callback */ public function setStatusCallbackEvent($statusCallbackEvent): self { return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent); } /** * Add StatusCallback attribute. * * @param string $statusCallback Status Callback URL */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param string $statusCallbackMethod Status Callback URL Method */ public function setStatusCallbackMethod($statusCallbackMethod): self { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } }PKt[Ioo o Twilio/TwiML/Voice/SsmlW.phpnu[nest(new SsmlBreak($attributes)); } /** * Add Emphasis child. * * @param string $words Words to emphasize * @param array $attributes Optional attributes * @return SsmlEmphasis Child element. */ public function emphasis($words, $attributes = []): SsmlEmphasis { return $this->nest(new SsmlEmphasis($words, $attributes)); } /** * Add Phoneme child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlPhoneme Child element. */ public function phoneme($words, $attributes = []): SsmlPhoneme { return $this->nest(new SsmlPhoneme($words, $attributes)); } /** * Add Prosody child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlProsody Child element. */ public function prosody($words, $attributes = []): SsmlProsody { return $this->nest(new SsmlProsody($words, $attributes)); } /** * Add Say-As child. * * @param string $words Words to be interpreted * @param array $attributes Optional attributes * @return SsmlSayAs Child element. */ public function say_As($words, $attributes = []): SsmlSayAs { return $this->nest(new SsmlSayAs($words, $attributes)); } /** * Add Sub child. * * @param string $words Words to be substituted * @param array $attributes Optional attributes * @return SsmlSub Child element. */ public function sub($words, $attributes = []): SsmlSub { return $this->nest(new SsmlSub($words, $attributes)); } /** * Add Role attribute. * * @param string $role Customize the pronunciation of words by specifying the * word’s part of speech or alternate meaning */ public function setRole($role): self { return $this->setAttribute('role', $role); } }PKt[{N]]Twilio/TwiML/Voice/Enqueue.phpnu[nest(new Task($body, $attributes)); } /** * Add Action attribute. * * @param string $action Action URL */ public function setAction($action): self { return $this->setAttribute('action', $action); } /** * Add MaxQueueSize attribute. * * @param int $maxQueueSize Maximum size of queue */ public function setMaxQueueSize($maxQueueSize): self { return $this->setAttribute('maxQueueSize', $maxQueueSize); } /** * Add Method attribute. * * @param string $method Action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add WaitUrl attribute. * * @param string $waitUrl Wait URL */ public function setWaitUrl($waitUrl): self { return $this->setAttribute('waitUrl', $waitUrl); } /** * Add WaitUrlMethod attribute. * * @param string $waitUrlMethod Wait URL method */ public function setWaitUrlMethod($waitUrlMethod): self { return $this->setAttribute('waitUrlMethod', $waitUrlMethod); } /** * Add WorkflowSid attribute. * * @param string $workflowSid TaskRouter Workflow SID */ public function setWorkflowSid($workflowSid): self { return $this->setAttribute('workflowSid', $workflowSid); } }PKt[tN N Twilio/TwiML/Voice/SsmlS.phpnu[nest(new SsmlBreak($attributes)); } /** * Add Emphasis child. * * @param string $words Words to emphasize * @param array $attributes Optional attributes * @return SsmlEmphasis Child element. */ public function emphasis($words, $attributes = []): SsmlEmphasis { return $this->nest(new SsmlEmphasis($words, $attributes)); } /** * Add Lang child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlLang Child element. */ public function lang($words, $attributes = []): SsmlLang { return $this->nest(new SsmlLang($words, $attributes)); } /** * Add Phoneme child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlPhoneme Child element. */ public function phoneme($words, $attributes = []): SsmlPhoneme { return $this->nest(new SsmlPhoneme($words, $attributes)); } /** * Add Prosody child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlProsody Child element. */ public function prosody($words, $attributes = []): SsmlProsody { return $this->nest(new SsmlProsody($words, $attributes)); } /** * Add Say-As child. * * @param string $words Words to be interpreted * @param array $attributes Optional attributes * @return SsmlSayAs Child element. */ public function say_As($words, $attributes = []): SsmlSayAs { return $this->nest(new SsmlSayAs($words, $attributes)); } /** * Add Sub child. * * @param string $words Words to be substituted * @param array $attributes Optional attributes * @return SsmlSub Child element. */ public function sub($words, $attributes = []): SsmlSub { return $this->nest(new SsmlSub($words, $attributes)); } /** * Add W child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlW Child element. */ public function w($words, $attributes = []): SsmlW { return $this->nest(new SsmlW($words, $attributes)); } }PKt[+llTwilio/TwiML/Voice/Play.phpnu[setAttribute('loop', $loop); } /** * Add Digits attribute. * * @param string $digits Play DTMF tones for digits */ public function setDigits($digits): self { return $this->setAttribute('digits', $digits); } }PKt[oTwilio/TwiML/Voice/Say.phpnu[nest(new SsmlBreak($attributes)); } /** * Add Emphasis child. * * @param string $words Words to emphasize * @param array $attributes Optional attributes * @return SsmlEmphasis Child element. */ public function emphasis($words, $attributes = []): SsmlEmphasis { return $this->nest(new SsmlEmphasis($words, $attributes)); } /** * Add Lang child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlLang Child element. */ public function lang($words, $attributes = []): SsmlLang { return $this->nest(new SsmlLang($words, $attributes)); } /** * Add P child. * * @param string $words Words to speak * @return SsmlP Child element. */ public function p($words): SsmlP { return $this->nest(new SsmlP($words)); } /** * Add Phoneme child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlPhoneme Child element. */ public function phoneme($words, $attributes = []): SsmlPhoneme { return $this->nest(new SsmlPhoneme($words, $attributes)); } /** * Add Prosody child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlProsody Child element. */ public function prosody($words, $attributes = []): SsmlProsody { return $this->nest(new SsmlProsody($words, $attributes)); } /** * Add S child. * * @param string $words Words to speak * @return SsmlS Child element. */ public function s($words): SsmlS { return $this->nest(new SsmlS($words)); } /** * Add Say-As child. * * @param string $words Words to be interpreted * @param array $attributes Optional attributes * @return SsmlSayAs Child element. */ public function say_As($words, $attributes = []): SsmlSayAs { return $this->nest(new SsmlSayAs($words, $attributes)); } /** * Add Sub child. * * @param string $words Words to be substituted * @param array $attributes Optional attributes * @return SsmlSub Child element. */ public function sub($words, $attributes = []): SsmlSub { return $this->nest(new SsmlSub($words, $attributes)); } /** * Add W child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlW Child element. */ public function w($words, $attributes = []): SsmlW { return $this->nest(new SsmlW($words, $attributes)); } /** * Add Voice attribute. * * @param string $voice Voice to use */ public function setVoice($voice): self { return $this->setAttribute('voice', $voice); } /** * Add Loop attribute. * * @param int $loop Times to loop message */ public function setLoop($loop): self { return $this->setAttribute('loop', $loop); } /** * Add Language attribute. * * @param string $language Message language */ public function setLanguage($language): self { return $this->setAttribute('language', $language); } }PKt[ʟJJTwilio/TwiML/Voice/Leave.phpnu[setAttribute('strength', $strength); } /** * Add Time attribute. * * @param string $time Set a pause to a specific length of time in seconds or * milliseconds, available values: [number]s, [number]ms */ public function setTime($time): self { return $this->setAttribute('time', $time); } }PKt[I ]zzTwilio/TwiML/Voice/Sim.phpnu[nest(new Config($attributes)); } /** * Add Parameter child. * * @param array $attributes Optional attributes * @return Parameter Child element. */ public function parameter($attributes = []): Parameter { return $this->nest(new Parameter($attributes)); } /** * Add ConnectorName attribute. * * @param string $connectorName Defines the conversation profile Dialogflow * needs to use */ public function setConnectorName($connectorName): self { return $this->setAttribute('connectorName', $connectorName); } /** * Add Language attribute. * * @param string $language Language to be used by Dialogflow to transcribe * speech */ public function setLanguage($language): self { return $this->setAttribute('language', $language); } /** * Add SentimentAnalysis attribute. * * @param bool $sentimentAnalysis Whether sentiment analysis needs to be * enabled or not */ public function setSentimentAnalysis($sentimentAnalysis): self { return $this->setAttribute('sentimentAnalysis', $sentimentAnalysis); } /** * Add StatusCallback attribute. * * @param string $statusCallback URL to post status callbacks from Twilio */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param string $statusCallbackMethod HTTP method to use when requesting the * status callback URL */ public function setStatusCallbackMethod($statusCallbackMethod): self { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } }PKt[VTwilio/TwiML/Voice/ReferSip.phpnu[nest(new Stream($attributes)); } /** * Add Siprec child. * * @param array $attributes Optional attributes * @return Siprec Child element. */ public function siprec($attributes = []): Siprec { return $this->nest(new Siprec($attributes)); } }PKt[:aaTwilio/TwiML/Voice/Siprec.phpnu[nest(new Parameter($attributes)); } /** * Add Name attribute. * * @param string $name Friendly name given to SIPREC */ public function setName($name): self { return $this->setAttribute('name', $name); } /** * Add ConnectorName attribute. * * @param string $connectorName Unique name for Connector */ public function setConnectorName($connectorName): self { return $this->setAttribute('connectorName', $connectorName); } /** * Add Track attribute. * * @param string $track Track to be streamed to remote service */ public function setTrack($track): self { return $this->setAttribute('track', $track); } }PKt[GTwilio/TwiML/Voice/Gather.phpnu[nest(new Say($message, $attributes)); } /** * Add Pause child. * * @param array $attributes Optional attributes * @return Pause Child element. */ public function pause($attributes = []): Pause { return $this->nest(new Pause($attributes)); } /** * Add Play child. * * @param string $url Media URL * @param array $attributes Optional attributes * @return Play Child element. */ public function play($url = null, $attributes = []): Play { return $this->nest(new Play($url, $attributes)); } /** * Add Input attribute. * * @param string[] $input Input type Twilio should accept */ public function setInput($input): self { return $this->setAttribute('input', $input); } /** * Add Action attribute. * * @param string $action Action URL */ public function setAction($action): self { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param string $method Action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add Timeout attribute. * * @param int $timeout Time to wait to gather input */ public function setTimeout($timeout): self { return $this->setAttribute('timeout', $timeout); } /** * Add SpeechTimeout attribute. * * @param string $speechTimeout Time to wait to gather speech input and it * should be either auto or a positive integer. */ public function setSpeechTimeout($speechTimeout): self { return $this->setAttribute('speechTimeout', $speechTimeout); } /** * Add MaxSpeechTime attribute. * * @param int $maxSpeechTime Max allowed time for speech input */ public function setMaxSpeechTime($maxSpeechTime): self { return $this->setAttribute('maxSpeechTime', $maxSpeechTime); } /** * Add ProfanityFilter attribute. * * @param bool $profanityFilter Profanity Filter on speech */ public function setProfanityFilter($profanityFilter): self { return $this->setAttribute('profanityFilter', $profanityFilter); } /** * Add FinishOnKey attribute. * * @param string $finishOnKey Finish gather on key */ public function setFinishOnKey($finishOnKey): self { return $this->setAttribute('finishOnKey', $finishOnKey); } /** * Add NumDigits attribute. * * @param int $numDigits Number of digits to collect */ public function setNumDigits($numDigits): self { return $this->setAttribute('numDigits', $numDigits); } /** * Add PartialResultCallback attribute. * * @param string $partialResultCallback Partial result callback URL */ public function setPartialResultCallback($partialResultCallback): self { return $this->setAttribute('partialResultCallback', $partialResultCallback); } /** * Add PartialResultCallbackMethod attribute. * * @param string $partialResultCallbackMethod Partial result callback URL method */ public function setPartialResultCallbackMethod($partialResultCallbackMethod): self { return $this->setAttribute('partialResultCallbackMethod', $partialResultCallbackMethod); } /** * Add Language attribute. * * @param string $language Language to use */ public function setLanguage($language): self { return $this->setAttribute('language', $language); } /** * Add Hints attribute. * * @param string $hints Speech recognition hints */ public function setHints($hints): self { return $this->setAttribute('hints', $hints); } /** * Add BargeIn attribute. * * @param bool $bargeIn Stop playing media upon speech */ public function setBargeIn($bargeIn): self { return $this->setAttribute('bargeIn', $bargeIn); } /** * Add Debug attribute. * * @param bool $debug Allow debug for gather */ public function setDebug($debug): self { return $this->setAttribute('debug', $debug); } /** * Add ActionOnEmptyResult attribute. * * @param bool $actionOnEmptyResult Force webhook to the action URL event if * there is no input */ public function setActionOnEmptyResult($actionOnEmptyResult): self { return $this->setAttribute('actionOnEmptyResult', $actionOnEmptyResult); } /** * Add SpeechModel attribute. * * @param string $speechModel Specify the model that is best suited for your * use case */ public function setSpeechModel($speechModel): self { return $this->setAttribute('speechModel', $speechModel); } /** * Add Enhanced attribute. * * @param bool $enhanced Use enhanced speech model */ public function setEnhanced($enhanced): self { return $this->setAttribute('enhanced', $enhanced); } }PKt[%"Twilio/TwiML/Voice/SsmlPhoneme.phpnu[setAttribute('alphabet', $alphabet); } /** * Add Ph attribute. * * @param string $ph Specifiy the phonetic symbols for pronunciation */ public function setPh($ph): self { return $this->setAttribute('ph', $ph); } }PKt[qLLTwilio/TwiML/Voice/Config.phpnu[setAttribute('name', $name); } /** * Add Value attribute. * * @param string $value The value of the custom config */ public function setValue($value): self { return $this->setAttribute('value', $value); } }PKt[33Twilio/TwiML/Voice/Room.phpnu[setAttribute('participantIdentity', $participantIdentity); } }PKt[h Twilio/TwiML/Voice/Record.phpnu[setAttribute('action', $action); } /** * Add Method attribute. * * @param string $method Action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add Timeout attribute. * * @param int $timeout Timeout to begin recording */ public function setTimeout($timeout): self { return $this->setAttribute('timeout', $timeout); } /** * Add FinishOnKey attribute. * * @param string $finishOnKey Finish recording on key */ public function setFinishOnKey($finishOnKey): self { return $this->setAttribute('finishOnKey', $finishOnKey); } /** * Add MaxLength attribute. * * @param int $maxLength Max time to record in seconds */ public function setMaxLength($maxLength): self { return $this->setAttribute('maxLength', $maxLength); } /** * Add PlayBeep attribute. * * @param bool $playBeep Play beep */ public function setPlayBeep($playBeep): self { return $this->setAttribute('playBeep', $playBeep); } /** * Add Trim attribute. * * @param string $trim Trim the recording */ public function setTrim($trim): self { return $this->setAttribute('trim', $trim); } /** * Add RecordingStatusCallback attribute. * * @param string $recordingStatusCallback Status callback URL */ public function setRecordingStatusCallback($recordingStatusCallback): self { return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback); } /** * Add RecordingStatusCallbackMethod attribute. * * @param string $recordingStatusCallbackMethod Status callback URL method */ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self { return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod); } /** * Add RecordingStatusCallbackEvent attribute. * * @param string[] $recordingStatusCallbackEvent Recording status callback * events */ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self { return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent); } /** * Add Transcribe attribute. * * @param bool $transcribe Transcribe the recording */ public function setTranscribe($transcribe): self { return $this->setAttribute('transcribe', $transcribe); } /** * Add TranscribeCallback attribute. * * @param string $transcribeCallback Transcribe callback URL */ public function setTranscribeCallback($transcribeCallback): self { return $this->setAttribute('transcribeCallback', $transcribeCallback); } }PKt[e ||Twilio/TwiML/Voice/Stream.phpnu[nest(new Parameter($attributes)); } /** * Add Name attribute. * * @param string $name Friendly name given to the Stream */ public function setName($name): self { return $this->setAttribute('name', $name); } /** * Add ConnectorName attribute. * * @param string $connectorName Unique name for Stream Connector */ public function setConnectorName($connectorName): self { return $this->setAttribute('connectorName', $connectorName); } /** * Add Url attribute. * * @param string $url URL of the remote service where the Stream is routed */ public function setUrl($url): self { return $this->setAttribute('url', $url); } /** * Add Track attribute. * * @param string $track Track to be streamed to remote service */ public function setTrack($track): self { return $this->setAttribute('track', $track); } /** * Add StatusCallback attribute. * * @param string $statusCallback Status Callback URL */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param string $statusCallbackMethod Status Callback URL method */ public function setStatusCallbackMethod($statusCallbackMethod): self { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } }PKt[Twilio/TwiML/Voice/Number.phpnu[setAttribute('sendDigits', $sendDigits); } /** * Add Url attribute. * * @param string $url TwiML URL */ public function setUrl($url): self { return $this->setAttribute('url', $url); } /** * Add Method attribute. * * @param string $method TwiML URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add StatusCallbackEvent attribute. * * @param string[] $statusCallbackEvent Events to call status callback */ public function setStatusCallbackEvent($statusCallbackEvent): self { return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent); } /** * Add StatusCallback attribute. * * @param string $statusCallback Status callback URL */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param string $statusCallbackMethod Status callback URL method */ public function setStatusCallbackMethod($statusCallbackMethod): self { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } /** * Add Byoc attribute. * * @param string $byoc BYOC trunk SID (Beta) */ public function setByoc($byoc): self { return $this->setAttribute('byoc', $byoc); } /** * Add MachineDetection attribute. * * @param string $machineDetection Enable machine detection or end of greeting * detection */ public function setMachineDetection($machineDetection): self { return $this->setAttribute('machineDetection', $machineDetection); } /** * Add AmdStatusCallbackMethod attribute. * * @param string $amdStatusCallbackMethod HTTP Method to use with * amd_status_callback */ public function setAmdStatusCallbackMethod($amdStatusCallbackMethod): self { return $this->setAttribute('amdStatusCallbackMethod', $amdStatusCallbackMethod); } /** * Add AmdStatusCallback attribute. * * @param string $amdStatusCallback The URL we should call to send amd status * information to your application */ public function setAmdStatusCallback($amdStatusCallback): self { return $this->setAttribute('amdStatusCallback', $amdStatusCallback); } /** * Add MachineDetectionTimeout attribute. * * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection */ public function setMachineDetectionTimeout($machineDetectionTimeout): self { return $this->setAttribute('machineDetectionTimeout', $machineDetectionTimeout); } /** * Add MachineDetectionSpeechThreshold attribute. * * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity */ public function setMachineDetectionSpeechThreshold($machineDetectionSpeechThreshold): self { return $this->setAttribute('machineDetectionSpeechThreshold', $machineDetectionSpeechThreshold); } /** * Add MachineDetectionSpeechEndThreshold attribute. * * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity */ public function setMachineDetectionSpeechEndThreshold($machineDetectionSpeechEndThreshold): self { return $this->setAttribute('machineDetectionSpeechEndThreshold', $machineDetectionSpeechEndThreshold); } /** * Add MachineDetectionSilenceTimeout attribute. * * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence */ public function setMachineDetectionSilenceTimeout($machineDetectionSilenceTimeout): self { return $this->setAttribute('machineDetectionSilenceTimeout', $machineDetectionSilenceTimeout); } }PKt[P!Twilio/TwiML/Voice/Conference.phpnu[setAttribute('muted', $muted); } /** * Add Beep attribute. * * @param string $beep Play beep when joining */ public function setBeep($beep): self { return $this->setAttribute('beep', $beep); } /** * Add StartConferenceOnEnter attribute. * * @param bool $startConferenceOnEnter Start the conference on enter */ public function setStartConferenceOnEnter($startConferenceOnEnter): self { return $this->setAttribute('startConferenceOnEnter', $startConferenceOnEnter); } /** * Add EndConferenceOnExit attribute. * * @param bool $endConferenceOnExit End the conferenceon exit */ public function setEndConferenceOnExit($endConferenceOnExit): self { return $this->setAttribute('endConferenceOnExit', $endConferenceOnExit); } /** * Add WaitUrl attribute. * * @param string $waitUrl Wait URL */ public function setWaitUrl($waitUrl): self { return $this->setAttribute('waitUrl', $waitUrl); } /** * Add WaitMethod attribute. * * @param string $waitMethod Wait URL method */ public function setWaitMethod($waitMethod): self { return $this->setAttribute('waitMethod', $waitMethod); } /** * Add MaxParticipants attribute. * * @param int $maxParticipants Maximum number of participants */ public function setMaxParticipants($maxParticipants): self { return $this->setAttribute('maxParticipants', $maxParticipants); } /** * Add Record attribute. * * @param string $record Record the conference */ public function setRecord($record): self { return $this->setAttribute('record', $record); } /** * Add Region attribute. * * @param string $region Conference region */ public function setRegion($region): self { return $this->setAttribute('region', $region); } /** * Add Coach attribute. * * @param string $coach Call coach */ public function setCoach($coach): self { return $this->setAttribute('coach', $coach); } /** * Add Trim attribute. * * @param string $trim Trim the conference recording */ public function setTrim($trim): self { return $this->setAttribute('trim', $trim); } /** * Add StatusCallbackEvent attribute. * * @param string[] $statusCallbackEvent Events to call status callback URL */ public function setStatusCallbackEvent($statusCallbackEvent): self { return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent); } /** * Add StatusCallback attribute. * * @param string $statusCallback Status callback URL */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param string $statusCallbackMethod Status callback URL method */ public function setStatusCallbackMethod($statusCallbackMethod): self { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } /** * Add RecordingStatusCallback attribute. * * @param string $recordingStatusCallback Recording status callback URL */ public function setRecordingStatusCallback($recordingStatusCallback): self { return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback); } /** * Add RecordingStatusCallbackMethod attribute. * * @param string $recordingStatusCallbackMethod Recording status callback URL * method */ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self { return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod); } /** * Add RecordingStatusCallbackEvent attribute. * * @param string[] $recordingStatusCallbackEvent Recording status callback * events */ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self { return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent); } /** * Add EventCallbackUrl attribute. * * @param string $eventCallbackUrl Event callback URL */ public function setEventCallbackUrl($eventCallbackUrl): self { return $this->setAttribute('eventCallbackUrl', $eventCallbackUrl); } /** * Add JitterBufferSize attribute. * * @param string $jitterBufferSize Size of jitter buffer for participant */ public function setJitterBufferSize($jitterBufferSize): self { return $this->setAttribute('jitterBufferSize', $jitterBufferSize); } /** * Add ParticipantLabel attribute. * * @param string $participantLabel A label for participant */ public function setParticipantLabel($participantLabel): self { return $this->setAttribute('participantLabel', $participantLabel); } }PKt[3ŐTwilio/TwiML/Voice/Task.phpnu[setAttribute('priority', $priority); } /** * Add Timeout attribute. * * @param int $timeout Timeout associated with task */ public function setTimeout($timeout): self { return $this->setAttribute('timeout', $timeout); } }PKt[6ljTwilio/TwiML/Voice/Reject.phpnu[nest(new Parameter($attributes)); } /** * Add Reason attribute. * * @param string $reason Rejection reason */ public function setReason($reason): self { return $this->setAttribute('reason', $reason); } }PKt[&N0%Twilio/TwiML/Voice/ApplicationSid.phpnu[nest(new Client($identity, $attributes)); } /** * Add Conference child. * * @param string $name Conference name * @param array $attributes Optional attributes * @return Conference Child element. */ public function conference($name, $attributes = []): Conference { return $this->nest(new Conference($name, $attributes)); } /** * Add Number child. * * @param string $phoneNumber Phone Number to dial * @param array $attributes Optional attributes * @return Number Child element. */ public function number($phoneNumber, $attributes = []): Number { return $this->nest(new Number($phoneNumber, $attributes)); } /** * Add Queue child. * * @param string $name Queue name * @param array $attributes Optional attributes * @return Queue Child element. */ public function queue($name, $attributes = []): Queue { return $this->nest(new Queue($name, $attributes)); } /** * Add Sim child. * * @param string $simSid SIM SID * @return Sim Child element. */ public function sim($simSid): Sim { return $this->nest(new Sim($simSid)); } /** * Add Sip child. * * @param string $sipUrl SIP URL * @param array $attributes Optional attributes * @return Sip Child element. */ public function sip($sipUrl, $attributes = []): Sip { return $this->nest(new Sip($sipUrl, $attributes)); } /** * Add Application child. * * @param string $applicationSid Application sid * @param array $attributes Optional attributes * @return Application Child element. */ public function application($applicationSid = null, $attributes = []): Application { return $this->nest(new Application($applicationSid, $attributes)); } /** * Add Action attribute. * * @param string $action Action URL */ public function setAction($action): self { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param string $method Action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add Timeout attribute. * * @param int $timeout Time to wait for answer */ public function setTimeout($timeout): self { return $this->setAttribute('timeout', $timeout); } /** * Add HangupOnStar attribute. * * @param bool $hangupOnStar Hangup call on star press */ public function setHangupOnStar($hangupOnStar): self { return $this->setAttribute('hangupOnStar', $hangupOnStar); } /** * Add TimeLimit attribute. * * @param int $timeLimit Max time length */ public function setTimeLimit($timeLimit): self { return $this->setAttribute('timeLimit', $timeLimit); } /** * Add CallerId attribute. * * @param string $callerId Caller ID to display */ public function setCallerId($callerId): self { return $this->setAttribute('callerId', $callerId); } /** * Add Record attribute. * * @param string $record Record the call */ public function setRecord($record): self { return $this->setAttribute('record', $record); } /** * Add Trim attribute. * * @param string $trim Trim the recording */ public function setTrim($trim): self { return $this->setAttribute('trim', $trim); } /** * Add RecordingStatusCallback attribute. * * @param string $recordingStatusCallback Recording status callback URL */ public function setRecordingStatusCallback($recordingStatusCallback): self { return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback); } /** * Add RecordingStatusCallbackMethod attribute. * * @param string $recordingStatusCallbackMethod Recording status callback URL * method */ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self { return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod); } /** * Add RecordingStatusCallbackEvent attribute. * * @param string[] $recordingStatusCallbackEvent Recording status callback * events */ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self { return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent); } /** * Add AnswerOnBridge attribute. * * @param bool $answerOnBridge Preserve the ringing behavior of the inbound * call until the Dialed call picks up */ public function setAnswerOnBridge($answerOnBridge): self { return $this->setAttribute('answerOnBridge', $answerOnBridge); } /** * Add RingTone attribute. * * @param string $ringTone Ringtone allows you to override the ringback tone * that Twilio will play back to the caller while * executing the Dial */ public function setRingTone($ringTone): self { return $this->setAttribute('ringTone', $ringTone); } /** * Add RecordingTrack attribute. * * @param string $recordingTrack To indicate which audio track should be * recorded */ public function setRecordingTrack($recordingTrack): self { return $this->setAttribute('recordingTrack', $recordingTrack); } /** * Add Sequential attribute. * * @param bool $sequential Used to determine if child TwiML nouns should be * dialed in order, one after the other (sequential) or * dial all at once (parallel). Default is false, * parallel */ public function setSequential($sequential): self { return $this->setAttribute('sequential', $sequential); } /** * Add ReferUrl attribute. * * @param string $referUrl Webhook that will receive future SIP REFER requests */ public function setReferUrl($referUrl): self { return $this->setAttribute('referUrl', $referUrl); } /** * Add ReferMethod attribute. * * @param string $referMethod The HTTP method to use for the refer Webhook */ public function setReferMethod($referMethod): self { return $this->setAttribute('referMethod', $referMethod); } }PKt[a͙Twilio/TwiML/Voice/Sip.phpnu[setAttribute('username', $username); } /** * Add Password attribute. * * @param string $password SIP Password */ public function setPassword($password): self { return $this->setAttribute('password', $password); } /** * Add Url attribute. * * @param string $url Action URL */ public function setUrl($url): self { return $this->setAttribute('url', $url); } /** * Add Method attribute. * * @param string $method Action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add StatusCallbackEvent attribute. * * @param string[] $statusCallbackEvent Status callback events */ public function setStatusCallbackEvent($statusCallbackEvent): self { return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent); } /** * Add StatusCallback attribute. * * @param string $statusCallback Status callback URL */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param string $statusCallbackMethod Status callback URL method */ public function setStatusCallbackMethod($statusCallbackMethod): self { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } /** * Add MachineDetection attribute. * * @param string $machineDetection Enable machine detection or end of greeting * detection */ public function setMachineDetection($machineDetection): self { return $this->setAttribute('machineDetection', $machineDetection); } /** * Add AmdStatusCallbackMethod attribute. * * @param string $amdStatusCallbackMethod HTTP Method to use with * amd_status_callback */ public function setAmdStatusCallbackMethod($amdStatusCallbackMethod): self { return $this->setAttribute('amdStatusCallbackMethod', $amdStatusCallbackMethod); } /** * Add AmdStatusCallback attribute. * * @param string $amdStatusCallback The URL we should call to send amd status * information to your application */ public function setAmdStatusCallback($amdStatusCallback): self { return $this->setAttribute('amdStatusCallback', $amdStatusCallback); } /** * Add MachineDetectionTimeout attribute. * * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection */ public function setMachineDetectionTimeout($machineDetectionTimeout): self { return $this->setAttribute('machineDetectionTimeout', $machineDetectionTimeout); } /** * Add MachineDetectionSpeechThreshold attribute. * * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity */ public function setMachineDetectionSpeechThreshold($machineDetectionSpeechThreshold): self { return $this->setAttribute('machineDetectionSpeechThreshold', $machineDetectionSpeechThreshold); } /** * Add MachineDetectionSpeechEndThreshold attribute. * * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity */ public function setMachineDetectionSpeechEndThreshold($machineDetectionSpeechEndThreshold): self { return $this->setAttribute('machineDetectionSpeechEndThreshold', $machineDetectionSpeechEndThreshold); } /** * Add MachineDetectionSilenceTimeout attribute. * * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence */ public function setMachineDetectionSilenceTimeout($machineDetectionSilenceTimeout): self { return $this->setAttribute('machineDetectionSilenceTimeout', $machineDetectionSilenceTimeout); } }PKt[t% % Twilio/TwiML/Voice/SsmlP.phpnu[nest(new SsmlBreak($attributes)); } /** * Add Emphasis child. * * @param string $words Words to emphasize * @param array $attributes Optional attributes * @return SsmlEmphasis Child element. */ public function emphasis($words, $attributes = []): SsmlEmphasis { return $this->nest(new SsmlEmphasis($words, $attributes)); } /** * Add Lang child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlLang Child element. */ public function lang($words, $attributes = []): SsmlLang { return $this->nest(new SsmlLang($words, $attributes)); } /** * Add Phoneme child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlPhoneme Child element. */ public function phoneme($words, $attributes = []): SsmlPhoneme { return $this->nest(new SsmlPhoneme($words, $attributes)); } /** * Add Prosody child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlProsody Child element. */ public function prosody($words, $attributes = []): SsmlProsody { return $this->nest(new SsmlProsody($words, $attributes)); } /** * Add S child. * * @param string $words Words to speak * @return SsmlS Child element. */ public function s($words): SsmlS { return $this->nest(new SsmlS($words)); } /** * Add Say-As child. * * @param string $words Words to be interpreted * @param array $attributes Optional attributes * @return SsmlSayAs Child element. */ public function say_As($words, $attributes = []): SsmlSayAs { return $this->nest(new SsmlSayAs($words, $attributes)); } /** * Add Sub child. * * @param string $words Words to be substituted * @param array $attributes Optional attributes * @return SsmlSub Child element. */ public function sub($words, $attributes = []): SsmlSub { return $this->nest(new SsmlSub($words, $attributes)); } /** * Add W child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlW Child element. */ public function w($words, $attributes = []): SsmlW { return $this->nest(new SsmlW($words, $attributes)); } }PKt[/џTwilio/TwiML/Voice/Refer.phpnu[nest(new ReferSip($sipUrl)); } /** * Add Action attribute. * * @param string $action Action URL */ public function setAction($action): self { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param string $method Action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } }PKt[ߥ Twilio/TwiML/Voice/Autopilot.phpnu[setAttribute('method', $method); } }PKt[ABZZTwilio/TwiML/Voice/Pay.phpnu[nest(new Prompt($attributes)); } /** * Add Parameter child. * * @param array $attributes Optional attributes * @return Parameter Child element. */ public function parameter($attributes = []): Parameter { return $this->nest(new Parameter($attributes)); } /** * Add Input attribute. * * @param string $input Input type Twilio should accept */ public function setInput($input): self { return $this->setAttribute('input', $input); } /** * Add Action attribute. * * @param string $action Action URL */ public function setAction($action): self { return $this->setAttribute('action', $action); } /** * Add BankAccountType attribute. * * @param string $bankAccountType Bank account type for ach transactions. If * set, payment method attribute must be * provided and value should be set to * ach-debit. defaults to consumer-checking */ public function setBankAccountType($bankAccountType): self { return $this->setAttribute('bankAccountType', $bankAccountType); } /** * Add StatusCallback attribute. * * @param string $statusCallback Status callback URL */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param string $statusCallbackMethod Status callback method */ public function setStatusCallbackMethod($statusCallbackMethod): self { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } /** * Add Timeout attribute. * * @param int $timeout Time to wait to gather input */ public function setTimeout($timeout): self { return $this->setAttribute('timeout', $timeout); } /** * Add MaxAttempts attribute. * * @param int $maxAttempts Maximum number of allowed retries when gathering * input */ public function setMaxAttempts($maxAttempts): self { return $this->setAttribute('maxAttempts', $maxAttempts); } /** * Add SecurityCode attribute. * * @param bool $securityCode Prompt for security code */ public function setSecurityCode($securityCode): self { return $this->setAttribute('securityCode', $securityCode); } /** * Add PostalCode attribute. * * @param string $postalCode Prompt for postal code and it should be true/false * or default postal code */ public function setPostalCode($postalCode): self { return $this->setAttribute('postalCode', $postalCode); } /** * Add MinPostalCodeLength attribute. * * @param int $minPostalCodeLength Prompt for minimum postal code length */ public function setMinPostalCodeLength($minPostalCodeLength): self { return $this->setAttribute('minPostalCodeLength', $minPostalCodeLength); } /** * Add PaymentConnector attribute. * * @param string $paymentConnector Unique name for payment connector */ public function setPaymentConnector($paymentConnector): self { return $this->setAttribute('paymentConnector', $paymentConnector); } /** * Add PaymentMethod attribute. * * @param string $paymentMethod Payment method to be used. defaults to * credit-card */ public function setPaymentMethod($paymentMethod): self { return $this->setAttribute('paymentMethod', $paymentMethod); } /** * Add TokenType attribute. * * @param string $tokenType Type of token */ public function setTokenType($tokenType): self { return $this->setAttribute('tokenType', $tokenType); } /** * Add ChargeAmount attribute. * * @param string $chargeAmount Amount to process. If value is greater than 0 * then make the payment else create a payment token */ public function setChargeAmount($chargeAmount): self { return $this->setAttribute('chargeAmount', $chargeAmount); } /** * Add Currency attribute. * * @param string $currency Currency of the amount attribute */ public function setCurrency($currency): self { return $this->setAttribute('currency', $currency); } /** * Add Description attribute. * * @param string $description Details regarding the payment */ public function setDescription($description): self { return $this->setAttribute('description', $description); } /** * Add ValidCardTypes attribute. * * @param string[] $validCardTypes Comma separated accepted card types */ public function setValidCardTypes($validCardTypes): self { return $this->setAttribute('validCardTypes', $validCardTypes); } /** * Add Language attribute. * * @param string $language Language to use */ public function setLanguage($language): self { return $this->setAttribute('language', $language); } }PKt[gk Twilio/TwiML/Voice/SsmlSayAs.phpnu[setAttribute('interpret-as', $interpretAs); } /** * Add Format attribute. * * @param string $format Specify the format of the date when interpret-as is * set to date */ public function setFormat($format): self { return $this->setAttribute('format', $format); } }PKt[j`xxTwilio/TwiML/Voice/Pause.phpnu[setAttribute('length', $length); } }PKt[Eȸ33Twilio/TwiML/Voice/Start.phpnu[nest(new Stream($attributes)); } /** * Add Siprec child. * * @param array $attributes Optional attributes * @return Siprec Child element. */ public function siprec($attributes = []): Siprec { return $this->nest(new Siprec($attributes)); } /** * Add Action attribute. * * @param string $action Action URL */ public function setAction($action): self { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param string $method Action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } }PKt[I)xr r "Twilio/TwiML/Voice/Application.phpnu[nest(new ApplicationSid($sid)); } /** * Add Parameter child. * * @param array $attributes Optional attributes * @return Parameter Child element. */ public function parameter($attributes = []): Parameter { return $this->nest(new Parameter($attributes)); } /** * Add Url attribute. * * @param string $url TwiML URL */ public function setUrl($url): self { return $this->setAttribute('url', $url); } /** * Add Method attribute. * * @param string $method TwiML URL Method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } /** * Add StatusCallbackEvent attribute. * * @param string[] $statusCallbackEvent Events to trigger status callback */ public function setStatusCallbackEvent($statusCallbackEvent): self { return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent); } /** * Add StatusCallback attribute. * * @param string $statusCallback Status Callback URL */ public function setStatusCallback($statusCallback): self { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param string $statusCallbackMethod Status Callback URL Method */ public function setStatusCallbackMethod($statusCallbackMethod): self { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } /** * Add CustomerId attribute. * * @param string $customerId Identity of the customer calling application */ public function setCustomerId($customerId): self { return $this->setAttribute('customerId', $customerId); } /** * Add CopyParentTo attribute. * * @param bool $copyParentTo Copy parent call To field to called application * side, otherwise use the application sid as To field */ public function setCopyParentTo($copyParentTo): self { return $this->setAttribute('copyParentTo', $copyParentTo); } }PKt[q Twilio/TwiML/Voice/Connect.phpnu[nest(new Room($name, $attributes)); } /** * Add Autopilot child. * * @param string $name Autopilot assistant sid or unique name * @return Autopilot Child element. */ public function autopilot($name): Autopilot { return $this->nest(new Autopilot($name)); } /** * Add Stream child. * * @param array $attributes Optional attributes * @return Stream Child element. */ public function stream($attributes = []): Stream { return $this->nest(new Stream($attributes)); } /** * Add VirtualAgent child. * * @param array $attributes Optional attributes * @return VirtualAgent Child element. */ public function virtualAgent($attributes = []): VirtualAgent { return $this->nest(new VirtualAgent($attributes)); } /** * Add Conversation child. * * @param array $attributes Optional attributes * @return Conversation Child element. */ public function conversation($attributes = []): Conversation { return $this->nest(new Conversation($attributes)); } /** * Add Action attribute. * * @param string $action Action URL */ public function setAction($action): self { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param string $method Action URL method */ public function setMethod($method): self { return $this->setAttribute('method', $method); } }PKt[~ Twilio/TwiML/Voice/Prompt.phpnu[nest(new Say($message, $attributes)); } /** * Add Play child. * * @param string $url Media URL * @param array $attributes Optional attributes * @return Play Child element. */ public function play($url = null, $attributes = []): Play { return $this->nest(new Play($url, $attributes)); } /** * Add Pause child. * * @param array $attributes Optional attributes * @return Pause Child element. */ public function pause($attributes = []): Pause { return $this->nest(new Pause($attributes)); } /** * Add For_ attribute. * * @param string $for_ Name of the payment source data element */ public function setFor_($for_): self { return $this->setAttribute('for_', $for_); } /** * Add ErrorType attribute. * * @param string[] $errorType Type of error */ public function setErrorType($errorType): self { return $this->setAttribute('errorType', $errorType); } /** * Add CardType attribute. * * @param string[] $cardType Type of the credit card */ public function setCardType($cardType): self { return $this->setAttribute('cardType', $cardType); } /** * Add Attempt attribute. * * @param int[] $attempt Current attempt count */ public function setAttempt($attempt): self { return $this->setAttribute('attempt', $attempt); } /** * Add RequireMatchingInputs attribute. * * @param bool $requireMatchingInputs Require customer to input requested * information twice and verify matching. */ public function setRequireMatchingInputs($requireMatchingInputs): self { return $this->setAttribute('requireMatchingInputs', $requireMatchingInputs); } }PKt[XXTwilio/TwiML/Voice/Hangup.phpnu[nest(new Parameter($attributes)); } }PKt[+3[[ Twilio/TwiML/Voice/Parameter.phpnu[setAttribute('name', $name); } /** * Add Value attribute. * * @param string $value The value of the custom parameter */ public function setValue($value): self { return $this->setAttribute('value', $value); } }PKt[^G"Twilio/TwiML/Voice/SsmlProsody.phpnu[nest(new SsmlBreak($attributes)); } /** * Add Emphasis child. * * @param string $words Words to emphasize * @param array $attributes Optional attributes * @return SsmlEmphasis Child element. */ public function emphasis($words, $attributes = []): SsmlEmphasis { return $this->nest(new SsmlEmphasis($words, $attributes)); } /** * Add Lang child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlLang Child element. */ public function lang($words, $attributes = []): SsmlLang { return $this->nest(new SsmlLang($words, $attributes)); } /** * Add P child. * * @param string $words Words to speak * @return SsmlP Child element. */ public function p($words): SsmlP { return $this->nest(new SsmlP($words)); } /** * Add Phoneme child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlPhoneme Child element. */ public function phoneme($words, $attributes = []): SsmlPhoneme { return $this->nest(new SsmlPhoneme($words, $attributes)); } /** * Add Prosody child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlProsody Child element. */ public function prosody($words, $attributes = []): SsmlProsody { return $this->nest(new SsmlProsody($words, $attributes)); } /** * Add S child. * * @param string $words Words to speak * @return SsmlS Child element. */ public function s($words): SsmlS { return $this->nest(new SsmlS($words)); } /** * Add Say-As child. * * @param string $words Words to be interpreted * @param array $attributes Optional attributes * @return SsmlSayAs Child element. */ public function say_As($words, $attributes = []): SsmlSayAs { return $this->nest(new SsmlSayAs($words, $attributes)); } /** * Add Sub child. * * @param string $words Words to be substituted * @param array $attributes Optional attributes * @return SsmlSub Child element. */ public function sub($words, $attributes = []): SsmlSub { return $this->nest(new SsmlSub($words, $attributes)); } /** * Add W child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlW Child element. */ public function w($words, $attributes = []): SsmlW { return $this->nest(new SsmlW($words, $attributes)); } /** * Add Volume attribute. * * @param string $volume Specify the volume, available values: default, silent, * x-soft, soft, medium, loud, x-loud, +ndB, -ndB */ public function setVolume($volume): self { return $this->setAttribute('volume', $volume); } /** * Add Rate attribute. * * @param string $rate Specify the rate, available values: x-slow, slow, * medium, fast, x-fast, n% */ public function setRate($rate): self { return $this->setAttribute('rate', $rate); } /** * Add Pitch attribute. * * @param string $pitch Specify the pitch, available values: default, x-low, * low, medium, high, x-high, +n%, -n% */ public function setPitch($pitch): self { return $this->setAttribute('pitch', $pitch); } }PKt[R33Twilio/TwiML/Voice/SsmlLang.phpnu[nest(new SsmlBreak($attributes)); } /** * Add Emphasis child. * * @param string $words Words to emphasize * @param array $attributes Optional attributes * @return SsmlEmphasis Child element. */ public function emphasis($words, $attributes = []): SsmlEmphasis { return $this->nest(new SsmlEmphasis($words, $attributes)); } /** * Add Lang child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlLang Child element. */ public function lang($words, $attributes = []): SsmlLang { return $this->nest(new SsmlLang($words, $attributes)); } /** * Add P child. * * @param string $words Words to speak * @return SsmlP Child element. */ public function p($words): SsmlP { return $this->nest(new SsmlP($words)); } /** * Add Phoneme child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlPhoneme Child element. */ public function phoneme($words, $attributes = []): SsmlPhoneme { return $this->nest(new SsmlPhoneme($words, $attributes)); } /** * Add Prosody child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlProsody Child element. */ public function prosody($words, $attributes = []): SsmlProsody { return $this->nest(new SsmlProsody($words, $attributes)); } /** * Add S child. * * @param string $words Words to speak * @return SsmlS Child element. */ public function s($words): SsmlS { return $this->nest(new SsmlS($words)); } /** * Add Say-As child. * * @param string $words Words to be interpreted * @param array $attributes Optional attributes * @return SsmlSayAs Child element. */ public function say_As($words, $attributes = []): SsmlSayAs { return $this->nest(new SsmlSayAs($words, $attributes)); } /** * Add Sub child. * * @param string $words Words to be substituted * @param array $attributes Optional attributes * @return SsmlSub Child element. */ public function sub($words, $attributes = []): SsmlSub { return $this->nest(new SsmlSub($words, $attributes)); } /** * Add W child. * * @param string $words Words to speak * @param array $attributes Optional attributes * @return SsmlW Child element. */ public function w($words, $attributes = []): SsmlW { return $this->nest(new SsmlW($words, $attributes)); } /** * Add Xml:Lang attribute. * * @param string $xmlLang Specify the language */ public function setXmlLang($xmlLang): self { return $this->setAttribute('xml:Lang', $xmlLang); } }PKt[L+Twilio/InstanceResource.phpnu[version = $version; } public function toArray(): array { return $this->properties; } public function __toString(): string { return '[InstanceResource]'; } public function __isset($name): bool { return \array_key_exists($name, $this->properties); } } PKt[vaWTwilio/Serialize.phpnu[ $value) { if (\is_array($value)) { $result = self::flatten($value, $result, \array_merge($previous, [$key])); } else { $result[\implode('.', \array_merge($previous, [$key]))] = $value; } } return $result; } public static function prefixedCollapsibleMap($map, string $prefix): array { if ($map === null || $map === Values::NONE) { return []; } $flattened = self::flatten($map); $result = []; foreach ($flattened as $key => $value) { $result[$prefix . '.' . $key] = $value; } return $result; } public static function iso8601Date($dateTime): string { if ($dateTime === null || $dateTime === Values::NONE) { return Values::NONE; } if (\is_string($dateTime)) { return $dateTime; } $utcDate = clone $dateTime; $utcDate->setTimezone(new \DateTimeZone('+0000')); return $utcDate->format('Y-m-d'); } public static function iso8601DateTime($dateTime): string { if ($dateTime === null || $dateTime === Values::NONE) { return Values::NONE; } if (\is_string($dateTime)) { return $dateTime; } $utcDate = clone $dateTime; $utcDate->setTimezone(new \DateTimeZone('+0000')); return $utcDate->format('Y-m-d\TH:i:s\Z'); } public static function booleanToString($boolOrStr) { if ($boolOrStr === null || \is_string($boolOrStr)) { return $boolOrStr; } return $boolOrStr ? 'True' : 'False'; } public static function jsonObject($object) { if (\is_array($object)) { return \json_encode($object); } return $object; } public static function map($values, $map_func) { if (!\is_array($values)) { return $values; } return \array_map($map_func, $values); } } PKt[` C C Twilio/Rest/Bulkexports.phpnu[baseUrl = 'https://bulkexports.twilio.com'; } /** * @return V1 Version v1 of bulkexports */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getExports(): \Twilio\Rest\Bulkexports\V1\ExportList { return $this->v1->exports; } /** * @param string $resourceType The type of communication – Messages, Calls, * Conferences, and Participants */ protected function contextExports(string $resourceType): \Twilio\Rest\Bulkexports\V1\ExportContext { return $this->v1->exports($resourceType); } protected function getExportConfiguration(): \Twilio\Rest\Bulkexports\V1\ExportConfigurationList { return $this->v1->exportConfiguration; } /** * @param string $resourceType The type of communication – Messages, Calls, * Conferences, and Participants */ protected function contextExportConfiguration(string $resourceType): \Twilio\Rest\Bulkexports\V1\ExportConfigurationContext { return $this->v1->exportConfiguration($resourceType); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports]'; } }PKt[)$$.Twilio/Rest/Taskrouter/V1/WorkspaceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($sid) . ''; } /** * Fetch the WorkspaceInstance * * @return WorkspaceInstance Fetched WorkspaceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WorkspaceInstance { $payload = $this->version->fetch('GET', $this->uri); return new WorkspaceInstance($this->version, $payload, $this->solution['sid']); } /** * Update the WorkspaceInstance * * @param array|Options $options Optional Arguments * @return WorkspaceInstance Updated WorkspaceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WorkspaceInstance { $options = new Values($options); $data = Values::of([ 'DefaultActivitySid' => $options['defaultActivitySid'], 'EventCallbackUrl' => $options['eventCallbackUrl'], 'EventsFilter' => $options['eventsFilter'], 'FriendlyName' => $options['friendlyName'], 'MultiTaskEnabled' => Serialize::booleanToString($options['multiTaskEnabled']), 'TimeoutActivitySid' => $options['timeoutActivitySid'], 'PrioritizeQueueOrder' => $options['prioritizeQueueOrder'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WorkspaceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the WorkspaceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the activities */ protected function getActivities(): ActivityList { if (!$this->_activities) { $this->_activities = new ActivityList($this->version, $this->solution['sid']); } return $this->_activities; } /** * Access the events */ protected function getEvents(): EventList { if (!$this->_events) { $this->_events = new EventList($this->version, $this->solution['sid']); } return $this->_events; } /** * Access the tasks */ protected function getTasks(): TaskList { if (!$this->_tasks) { $this->_tasks = new TaskList($this->version, $this->solution['sid']); } return $this->_tasks; } /** * Access the taskQueues */ protected function getTaskQueues(): TaskQueueList { if (!$this->_taskQueues) { $this->_taskQueues = new TaskQueueList($this->version, $this->solution['sid']); } return $this->_taskQueues; } /** * Access the workers */ protected function getWorkers(): WorkerList { if (!$this->_workers) { $this->_workers = new WorkerList($this->version, $this->solution['sid']); } return $this->_workers; } /** * Access the workflows */ protected function getWorkflows(): WorkflowList { if (!$this->_workflows) { $this->_workflows = new WorkflowList($this->version, $this->solution['sid']); } return $this->_workflows; } /** * Access the statistics */ protected function getStatistics(): WorkspaceStatisticsList { if (!$this->_statistics) { $this->_statistics = new WorkspaceStatisticsList($this->version, $this->solution['sid']); } return $this->_statistics; } /** * Access the realTimeStatistics */ protected function getRealTimeStatistics(): WorkspaceRealTimeStatisticsList { if (!$this->_realTimeStatistics) { $this->_realTimeStatistics = new WorkspaceRealTimeStatisticsList( $this->version, $this->solution['sid'] ); } return $this->_realTimeStatistics; } /** * Access the cumulativeStatistics */ protected function getCumulativeStatistics(): WorkspaceCumulativeStatisticsList { if (!$this->_cumulativeStatistics) { $this->_cumulativeStatistics = new WorkspaceCumulativeStatisticsList( $this->version, $this->solution['sid'] ); } return $this->_cumulativeStatistics; } /** * Access the taskChannels */ protected function getTaskChannels(): TaskChannelList { if (!$this->_taskChannels) { $this->_taskChannels = new TaskChannelList($this->version, $this->solution['sid']); } return $this->_taskChannels; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkspaceContext ' . \implode(' ', $context) . ']'; } }PKt[c+Twilio/Rest/Taskrouter/V1/WorkspacePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkspaceInstance \Twilio\Rest\Taskrouter\V1\WorkspaceInstance */ public function buildInstance(array $payload): WorkspaceInstance { return new WorkspaceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkspacePage]'; } }PKt[-</Twilio/Rest/Taskrouter/V1/WorkspaceInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'defaultActivityName' => Values::array_get($payload, 'default_activity_name'), 'defaultActivitySid' => Values::array_get($payload, 'default_activity_sid'), 'eventCallbackUrl' => Values::array_get($payload, 'event_callback_url'), 'eventsFilter' => Values::array_get($payload, 'events_filter'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'multiTaskEnabled' => Values::array_get($payload, 'multi_task_enabled'), 'sid' => Values::array_get($payload, 'sid'), 'timeoutActivityName' => Values::array_get($payload, 'timeout_activity_name'), 'timeoutActivitySid' => Values::array_get($payload, 'timeout_activity_sid'), 'prioritizeQueueOrder' => Values::array_get($payload, 'prioritize_queue_order'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkspaceContext Context for this WorkspaceInstance */ protected function proxy(): WorkspaceContext { if (!$this->context) { $this->context = new WorkspaceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the WorkspaceInstance * * @return WorkspaceInstance Fetched WorkspaceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WorkspaceInstance { return $this->proxy()->fetch(); } /** * Update the WorkspaceInstance * * @param array|Options $options Optional Arguments * @return WorkspaceInstance Updated WorkspaceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WorkspaceInstance { return $this->proxy()->update($options); } /** * Delete the WorkspaceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the activities */ protected function getActivities(): ActivityList { return $this->proxy()->activities; } /** * Access the events */ protected function getEvents(): EventList { return $this->proxy()->events; } /** * Access the tasks */ protected function getTasks(): TaskList { return $this->proxy()->tasks; } /** * Access the taskQueues */ protected function getTaskQueues(): TaskQueueList { return $this->proxy()->taskQueues; } /** * Access the workers */ protected function getWorkers(): WorkerList { return $this->proxy()->workers; } /** * Access the workflows */ protected function getWorkflows(): WorkflowList { return $this->proxy()->workflows; } /** * Access the statistics */ protected function getStatistics(): WorkspaceStatisticsList { return $this->proxy()->statistics; } /** * Access the realTimeStatistics */ protected function getRealTimeStatistics(): WorkspaceRealTimeStatisticsList { return $this->proxy()->realTimeStatistics; } /** * Access the cumulativeStatistics */ protected function getCumulativeStatistics(): WorkspaceCumulativeStatisticsList { return $this->proxy()->cumulativeStatistics; } /** * Access the taskChannels */ protected function getTaskChannels(): TaskChannelList { return $this->proxy()->taskChannels; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkspaceInstance ' . \implode(' ', $context) . ']'; } }PKt[L+Twilio/Rest/Taskrouter/V1/WorkspaceList.phpnu[solution = []; $this->uri = '/Workspaces'; } /** * Streams WorkspaceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WorkspaceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WorkspaceInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of WorkspaceInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WorkspacePage Page of WorkspaceInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WorkspacePage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WorkspacePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WorkspaceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WorkspacePage Page of WorkspaceInstance */ public function getPage(string $targetUrl): WorkspacePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WorkspacePage($this->version, $response, $this->solution); } /** * Create the WorkspaceInstance * * @param string $friendlyName A string to describe the Workspace resource * @param array|Options $options Optional Arguments * @return WorkspaceInstance Created WorkspaceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): WorkspaceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'EventCallbackUrl' => $options['eventCallbackUrl'], 'EventsFilter' => $options['eventsFilter'], 'MultiTaskEnabled' => Serialize::booleanToString($options['multiTaskEnabled']), 'Template' => $options['template'], 'PrioritizeQueueOrder' => $options['prioritizeQueueOrder'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WorkspaceInstance($this->version, $payload); } /** * Constructs a WorkspaceContext * * @param string $sid The SID of the resource to fetch */ public function getContext(string $sid): WorkspaceContext { return new WorkspaceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkspaceList]'; } }PKt[??.Twilio/Rest/Taskrouter/V1/WorkspaceOptions.phpnu[options['defaultActivitySid'] = $defaultActivitySid; $this->options['eventCallbackUrl'] = $eventCallbackUrl; $this->options['eventsFilter'] = $eventsFilter; $this->options['friendlyName'] = $friendlyName; $this->options['multiTaskEnabled'] = $multiTaskEnabled; $this->options['timeoutActivitySid'] = $timeoutActivitySid; $this->options['prioritizeQueueOrder'] = $prioritizeQueueOrder; } /** * The SID of the Activity that will be used when new Workers are created in the Workspace. * * @param string $defaultActivitySid The SID of the Activity that will be used * when new Workers are created in the * Workspace * @return $this Fluent Builder */ public function setDefaultActivitySid(string $defaultActivitySid): self { $this->options['defaultActivitySid'] = $defaultActivitySid; return $this; } /** * The URL we should call when an event occurs. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. This parameter supports Twilio's [Webhooks (HTTP callbacks) Connection Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides). * * @param string $eventCallbackUrl The URL we should call when an event occurs * @return $this Fluent Builder */ public function setEventCallbackUrl(string $eventCallbackUrl): self { $this->options['eventCallbackUrl'] = $eventCallbackUrl; return $this; } /** * The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. * * @param string $eventsFilter The list of Workspace events for which to call * event_callback_url * @return $this Fluent Builder */ public function setEventsFilter(string $eventsFilter): self { $this->options['eventsFilter'] = $eventsFilter; return $this; } /** * A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`. * * @param string $friendlyName A string to describe the Workspace resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. However, all workspaces should be maintained as multi-tasking. There is no default when omitting this parameter. A multi-tasking Workspace can't be updated to single-tasking unless it is not a Flex Project and another (legacy) single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking). * * @param bool $multiTaskEnabled Whether multi-tasking is enabled * @return $this Fluent Builder */ public function setMultiTaskEnabled(bool $multiTaskEnabled): self { $this->options['multiTaskEnabled'] = $multiTaskEnabled; return $this; } /** * The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response. * * @param string $timeoutActivitySid The SID of the Activity that will be * assigned to a Worker when a Task * reservation times out without a response * @return $this Fluent Builder */ public function setTimeoutActivitySid(string $timeoutActivitySid): self { $this->options['timeoutActivitySid'] = $timeoutActivitySid; return $this; } /** * The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO`. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo). * * @param string $prioritizeQueueOrder The type of TaskQueue to prioritize when * Workers are receiving Tasks from both * types of TaskQueues * @return $this Fluent Builder */ public function setPrioritizeQueueOrder(string $prioritizeQueueOrder): self { $this->options['prioritizeQueueOrder'] = $prioritizeQueueOrder; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.UpdateWorkspaceOptions ' . $options . ']'; } } class ReadWorkspaceOptions extends Options { /** * @param string $friendlyName The friendly_name of the Workspace resources to * read */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * The `friendly_name` of the Workspace resources to read. For example `Customer Support` or `2014 Election Campaign`. * * @param string $friendlyName The friendly_name of the Workspace resources to * read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.ReadWorkspaceOptions ' . $options . ']'; } } class CreateWorkspaceOptions extends Options { /** * @param string $eventCallbackUrl The URL we should call when an event occurs * @param string $eventsFilter The list of Workspace events for which to call * event_callback_url * @param bool $multiTaskEnabled Whether multi-tasking is enabled * @param string $template An available template name * @param string $prioritizeQueueOrder The type of TaskQueue to prioritize when * Workers are receiving Tasks from both * types of TaskQueues */ public function __construct(string $eventCallbackUrl = Values::NONE, string $eventsFilter = Values::NONE, bool $multiTaskEnabled = Values::NONE, string $template = Values::NONE, string $prioritizeQueueOrder = Values::NONE) { $this->options['eventCallbackUrl'] = $eventCallbackUrl; $this->options['eventsFilter'] = $eventsFilter; $this->options['multiTaskEnabled'] = $multiTaskEnabled; $this->options['template'] = $template; $this->options['prioritizeQueueOrder'] = $prioritizeQueueOrder; } /** * The URL we should call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. This parameter supports Twilio's [Webhooks (HTTP callbacks) Connection Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides). * * @param string $eventCallbackUrl The URL we should call when an event occurs * @return $this Fluent Builder */ public function setEventCallbackUrl(string $eventCallbackUrl): self { $this->options['eventCallbackUrl'] = $eventCallbackUrl; return $this; } /** * The list of Workspace events for which to call event_callback_url. For example, if `EventsFilter=task.created, task.canceled, worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. * * @param string $eventsFilter The list of Workspace events for which to call * event_callback_url * @return $this Fluent Builder */ public function setEventsFilter(string $eventsFilter): self { $this->options['eventsFilter'] = $eventsFilter; return $this; } /** * Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. However, all workspaces should be created as multi-tasking. The default is `true`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking). * * @param bool $multiTaskEnabled Whether multi-tasking is enabled * @return $this Fluent Builder */ public function setMultiTaskEnabled(bool $multiTaskEnabled): self { $this->options['multiTaskEnabled'] = $multiTaskEnabled; return $this; } /** * An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter. * * @param string $template An available template name * @return $this Fluent Builder */ public function setTemplate(string $template): self { $this->options['template'] = $template; return $this; } /** * The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo). * * @param string $prioritizeQueueOrder The type of TaskQueue to prioritize when * Workers are receiving Tasks from both * types of TaskQueues * @return $this Fluent Builder */ public function setPrioritizeQueueOrder(string $prioritizeQueueOrder): self { $this->options['prioritizeQueueOrder'] = $prioritizeQueueOrder; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.CreateWorkspaceOptions ' . $options . ']'; } }PKt[}Q69Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assignmentActivitySid' => Values::array_get($payload, 'assignment_activity_sid'), 'assignmentActivityName' => Values::array_get($payload, 'assignment_activity_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'maxReservedWorkers' => Values::array_get($payload, 'max_reserved_workers'), 'reservationActivitySid' => Values::array_get($payload, 'reservation_activity_sid'), 'reservationActivityName' => Values::array_get($payload, 'reservation_activity_name'), 'sid' => Values::array_get($payload, 'sid'), 'targetWorkers' => Values::array_get($payload, 'target_workers'), 'taskOrder' => Values::array_get($payload, 'task_order'), 'url' => Values::array_get($payload, 'url'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskQueueContext Context for this TaskQueueInstance */ protected function proxy(): TaskQueueContext { if (!$this->context) { $this->context = new TaskQueueContext( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TaskQueueInstance * * @return TaskQueueInstance Fetched TaskQueueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskQueueInstance { return $this->proxy()->fetch(); } /** * Update the TaskQueueInstance * * @param array|Options $options Optional Arguments * @return TaskQueueInstance Updated TaskQueueInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskQueueInstance { return $this->proxy()->update($options); } /** * Delete the TaskQueueInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the statistics */ protected function getStatistics(): TaskQueueStatisticsList { return $this->proxy()->statistics; } /** * Access the realTimeStatistics */ protected function getRealTimeStatistics(): TaskQueueRealTimeStatisticsList { return $this->proxy()->realTimeStatistics; } /** * Access the cumulativeStatistics */ protected function getCumulativeStatistics(): TaskQueueCumulativeStatisticsList { return $this->proxy()->cumulativeStatistics; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskQueueInstance ' . \implode(' ', $context) . ']'; } }PKt[fb22Twilio/Rest/Taskrouter/V1/Workspace/WorkerPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkerInstance \Twilio\Rest\Taskrouter\V1\Workspace\WorkerInstance */ public function buildInstance(array $payload): WorkerInstance { return new WorkerInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkerPage]'; } }PKt[-N N TTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues/' . \rawurlencode($taskQueueSid) . '/RealTimeStatistics'; } /** * Fetch the TaskQueueRealTimeStatisticsInstance * * @param array|Options $options Optional Arguments * @return TaskQueueRealTimeStatisticsInstance Fetched * TaskQueueRealTimeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): TaskQueueRealTimeStatisticsInstance { $options = new Values($options); $params = Values::of(['TaskChannel' => $options['taskChannel'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new TaskQueueRealTimeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskQueueRealTimeStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[=WTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'avgTaskAcceptanceTime' => Values::array_get($payload, 'avg_task_acceptance_time'), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'reservationsCreated' => Values::array_get($payload, 'reservations_created'), 'reservationsAccepted' => Values::array_get($payload, 'reservations_accepted'), 'reservationsRejected' => Values::array_get($payload, 'reservations_rejected'), 'reservationsTimedOut' => Values::array_get($payload, 'reservations_timed_out'), 'reservationsCanceled' => Values::array_get($payload, 'reservations_canceled'), 'reservationsRescinded' => Values::array_get($payload, 'reservations_rescinded'), 'splitByWaitTime' => Values::array_get($payload, 'split_by_wait_time'), 'taskQueueSid' => Values::array_get($payload, 'task_queue_sid'), 'waitDurationUntilAccepted' => Values::array_get($payload, 'wait_duration_until_accepted'), 'waitDurationUntilCanceled' => Values::array_get($payload, 'wait_duration_until_canceled'), 'waitDurationInQueueUntilAccepted' => Values::array_get($payload, 'wait_duration_in_queue_until_accepted'), 'tasksCanceled' => Values::array_get($payload, 'tasks_canceled'), 'tasksCompleted' => Values::array_get($payload, 'tasks_completed'), 'tasksDeleted' => Values::array_get($payload, 'tasks_deleted'), 'tasksEntered' => Values::array_get($payload, 'tasks_entered'), 'tasksMoved' => Values::array_get($payload, 'tasks_moved'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskQueueCumulativeStatisticsContext Context for this * TaskQueueCumulativeStatisticsInstance */ protected function proxy(): TaskQueueCumulativeStatisticsContext { if (!$this->context) { $this->context = new TaskQueueCumulativeStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } return $this->context; } /** * Fetch the TaskQueueCumulativeStatisticsInstance * * @param array|Options $options Optional Arguments * @return TaskQueueCumulativeStatisticsInstance Fetched * TaskQueueCumulativeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): TaskQueueCumulativeStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskQueueCumulativeStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[PS""VTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsOptions.phpnu[options['endDate'] = $endDate; $this->options['minutes'] = $minutes; $this->options['startDate'] = $startDate; $this->options['taskChannel'] = $taskChannel; $this->options['splitByWaitTime'] = $splitByWaitTime; } /** * Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * * @param \DateTime $endDate Only calculate statistics from on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Only calculate statistics since this many minutes in the past. The default is 15 minutes. * * @param int $minutes Only calculate statistics since this many minutes in the * past * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only calculate statistics from on or after this * date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate cumulative statistics on this * TaskChannel * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. TaskRouter will calculate statistics on up to 10,000 Tasks/Reservations for any given threshold. * * @param string $splitByWaitTime A comma separated list of values that * describes the thresholds, in seconds, to * calculate statistics on * @return $this Fluent Builder */ public function setSplitByWaitTime(string $splitByWaitTime): self { $this->options['splitByWaitTime'] = $splitByWaitTime; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchTaskQueueCumulativeStatisticsOptions ' . $options . ']'; } }PKt[gITwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ]; } /** * Constructs a TaskQueueStatisticsContext */ public function getContext(): TaskQueueStatisticsContext { return new TaskQueueStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueueStatisticsList]'; } }PKt[V&݃MTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsOptions.phpnu[options['endDate'] = $endDate; $this->options['friendlyName'] = $friendlyName; $this->options['minutes'] = $minutes; $this->options['startDate'] = $startDate; $this->options['taskChannel'] = $taskChannel; $this->options['splitByWaitTime'] = $splitByWaitTime; } /** * Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * * @param \DateTime $endDate Only calculate statistics from on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * The `friendly_name` of the TaskQueue statistics to read. * * @param string $friendlyName The friendly_name of the TaskQueue statistics to * read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Only calculate statistics since this many minutes in the past. The default is 15 minutes. * * @param int $minutes Only calculate statistics since this many minutes in the * past * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only calculate statistics from on or after this * date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate statistics on this TaskChannel. * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. * * @param string $splitByWaitTime A comma separated list of values that * describes the thresholds to calculate * statistics on * @return $this Fluent Builder */ public function setSplitByWaitTime(string $splitByWaitTime): self { $this->options['splitByWaitTime'] = $splitByWaitTime; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.ReadTaskQueuesStatisticsOptions ' . $options . ']'; } }PKt[9{ VTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues/' . \rawurlencode($taskQueueSid) . '/CumulativeStatistics'; } /** * Fetch the TaskQueueCumulativeStatisticsInstance * * @param array|Options $options Optional Arguments * @return TaskQueueCumulativeStatisticsInstance Fetched * TaskQueueCumulativeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): TaskQueueCumulativeStatisticsInstance { $options = new Values($options); $params = Values::of([ 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'Minutes' => $options['minutes'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'TaskChannel' => $options['taskChannel'], 'SplitByWaitTime' => $options['splitByWaitTime'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new TaskQueueCumulativeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskQueueCumulativeStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[Ȼv  LTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues/' . \rawurlencode($taskQueueSid) . '/Statistics'; } /** * Fetch the TaskQueueStatisticsInstance * * @param array|Options $options Optional Arguments * @return TaskQueueStatisticsInstance Fetched TaskQueueStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): TaskQueueStatisticsInstance { $options = new Values($options); $params = Values::of([ 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'Minutes' => $options['minutes'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'TaskChannel' => $options['taskChannel'], 'SplitByWaitTime' => $options['splitByWaitTime'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new TaskQueueStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskQueueStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[JTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskQueuesStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueuesStatisticsInstance */ public function buildInstance(array $payload): TaskQueuesStatisticsInstance { return new TaskQueuesStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueuesStatisticsPage]'; } }PKt[SFQTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ]; } /** * Constructs a TaskQueueRealTimeStatisticsContext */ public function getContext(): TaskQueueRealTimeStatisticsContext { return new TaskQueueRealTimeStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueueRealTimeStatisticsList]'; } }PKt[XSTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ]; } /** * Constructs a TaskQueueCumulativeStatisticsContext */ public function getContext(): TaskQueueCumulativeStatisticsContext { return new TaskQueueCumulativeStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueueCumulativeStatisticsList]'; } }PKt[5$JTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues/Statistics'; } /** * Streams TaskQueuesStatisticsInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TaskQueuesStatisticsInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TaskQueuesStatisticsInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TaskQueuesStatisticsInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TaskQueuesStatisticsPage Page of TaskQueuesStatisticsInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TaskQueuesStatisticsPage { $options = new Values($options); $params = Values::of([ 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'FriendlyName' => $options['friendlyName'], 'Minutes' => $options['minutes'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'TaskChannel' => $options['taskChannel'], 'SplitByWaitTime' => $options['splitByWaitTime'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TaskQueuesStatisticsPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TaskQueuesStatisticsInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TaskQueuesStatisticsPage Page of TaskQueuesStatisticsInstance */ public function getPage(string $targetUrl): TaskQueuesStatisticsPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TaskQueuesStatisticsPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueuesStatisticsList]'; } }PKt[MTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'cumulative' => Values::array_get($payload, 'cumulative'), 'realtime' => Values::array_get($payload, 'realtime'), 'taskQueueSid' => Values::array_get($payload, 'task_queue_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskQueueStatisticsContext Context for this * TaskQueueStatisticsInstance */ protected function proxy(): TaskQueueStatisticsContext { if (!$this->context) { $this->context = new TaskQueueStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } return $this->context; } /** * Fetch the TaskQueueStatisticsInstance * * @param array|Options $options Optional Arguments * @return TaskQueueStatisticsInstance Fetched TaskQueueStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): TaskQueueStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskQueueStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[Dj)\LTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsOptions.phpnu[options['endDate'] = $endDate; $this->options['minutes'] = $minutes; $this->options['startDate'] = $startDate; $this->options['taskChannel'] = $taskChannel; $this->options['splitByWaitTime'] = $splitByWaitTime; } /** * Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * * @param \DateTime $endDate Only calculate statistics from on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Only calculate statistics since this many minutes in the past. The default is 15 minutes. * * @param int $minutes Only calculate statistics since this many minutes in the * past * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only calculate statistics from on or after this * date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only calculate real-time and cumulative statistics for the specified TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate real-time and cumulative * statistics for the specified TaskChannel * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. * * @param string $splitByWaitTime A comma separated list of values that * describes the thresholds to calculate * statistics on * @return $this Fluent Builder */ public function setSplitByWaitTime(string $splitByWaitTime): self { $this->options['splitByWaitTime'] = $splitByWaitTime; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchTaskQueueStatisticsOptions ' . $options . ']'; } }PKt[;UTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'activityStatistics' => Values::array_get($payload, 'activity_statistics'), 'longestTaskWaitingAge' => Values::array_get($payload, 'longest_task_waiting_age'), 'longestTaskWaitingSid' => Values::array_get($payload, 'longest_task_waiting_sid'), 'longestRelativeTaskAgeInQueue' => Values::array_get($payload, 'longest_relative_task_age_in_queue'), 'longestRelativeTaskSidInQueue' => Values::array_get($payload, 'longest_relative_task_sid_in_queue'), 'taskQueueSid' => Values::array_get($payload, 'task_queue_sid'), 'tasksByPriority' => Values::array_get($payload, 'tasks_by_priority'), 'tasksByStatus' => Values::array_get($payload, 'tasks_by_status'), 'totalAvailableWorkers' => Values::array_get($payload, 'total_available_workers'), 'totalEligibleWorkers' => Values::array_get($payload, 'total_eligible_workers'), 'totalTasks' => Values::array_get($payload, 'total_tasks'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskQueueRealTimeStatisticsContext Context for this * TaskQueueRealTimeStatisticsInstance */ protected function proxy(): TaskQueueRealTimeStatisticsContext { if (!$this->context) { $this->context = new TaskQueueRealTimeStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } return $this->context; } /** * Fetch the TaskQueueRealTimeStatisticsInstance * * @param array|Options $options Optional Arguments * @return TaskQueueRealTimeStatisticsInstance Fetched * TaskQueueRealTimeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): TaskQueueRealTimeStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskQueueRealTimeStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[ˡQTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskQueueRealTimeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsInstance */ public function buildInstance(array $payload): TaskQueueRealTimeStatisticsInstance { return new TaskQueueRealTimeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueueRealTimeStatisticsPage]'; } }PKt["^qqITwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskQueueStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsInstance */ public function buildInstance(array $payload): TaskQueueStatisticsInstance { return new TaskQueueStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueueStatisticsPage]'; } }PKt[ՁtnTTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsOptions.phpnu[options['taskChannel'] = $taskChannel; } /** * The TaskChannel for which to fetch statistics. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel The TaskChannel for which to fetch statistics * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchTaskQueueRealTimeStatisticsOptions ' . $options . ']'; } }PKt[XNTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'cumulative' => Values::array_get($payload, 'cumulative'), 'realtime' => Values::array_get($payload, 'realtime'), 'taskQueueSid' => Values::array_get($payload, 'task_queue_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), ]; $this->solution = ['workspaceSid' => $workspaceSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueuesStatisticsInstance]'; } }PKt[f9CϭSTwilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskQueueCumulativeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsInstance */ public function buildInstance(array $payload): TaskQueueCumulativeStatisticsInstance { return new TaskQueueCumulativeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskQueueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueueCumulativeStatisticsPage]'; } }PKt[\DD@Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkerChannelInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelInstance */ public function buildInstance(array $payload): WorkerChannelInstance { return new WorkerChannelInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkerChannelPage]'; } }PKt[Vϧ HTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsInstance.phpnu[properties = [ 'realtime' => Values::array_get($payload, 'realtime'), 'cumulative' => Values::array_get($payload, 'cumulative'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkersStatisticsContext Context for this WorkersStatisticsInstance */ protected function proxy(): WorkersStatisticsContext { if (!$this->context) { $this->context = new WorkersStatisticsContext($this->version, $this->solution['workspaceSid']); } return $this->context; } /** * Fetch the WorkersStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkersStatisticsInstance Fetched WorkersStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkersStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkersStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[(+nnNTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkersCumulativeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsInstance */ public function buildInstance(array $payload): WorkersCumulativeStatisticsInstance { return new WorkersCumulativeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkersCumulativeStatisticsPage]'; } }PKt[u FTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($workerSid) . '/Statistics'; } /** * Fetch the WorkerStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkerStatisticsInstance Fetched WorkerStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkerStatisticsInstance { $options = new Values($options); $params = Values::of([ 'Minutes' => $options['minutes'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'TaskChannel' => $options['taskChannel'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new WorkerStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkerStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[4Mx  PTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'activityStatistics' => Values::array_get($payload, 'activity_statistics'), 'totalWorkers' => Values::array_get($payload, 'total_workers'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkersRealTimeStatisticsContext Context for this * WorkersRealTimeStatisticsInstance */ protected function proxy(): WorkersRealTimeStatisticsContext { if (!$this->context) { $this->context = new WorkersRealTimeStatisticsContext( $this->version, $this->solution['workspaceSid'] ); } return $this->context; } /** * Fetch the WorkersRealTimeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkersRealTimeStatisticsInstance Fetched * WorkersRealTimeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkersRealTimeStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkersRealTimeStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[ ֈ  GTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/Statistics'; } /** * Fetch the WorkersStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkersStatisticsInstance Fetched WorkersStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkersStatisticsInstance { $options = new Values($options); $params = Values::of([ 'Minutes' => $options['minutes'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'TaskQueueSid' => $options['taskQueueSid'], 'TaskQueueName' => $options['taskQueueName'], 'FriendlyName' => $options['friendlyName'], 'TaskChannel' => $options['taskChannel'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new WorkersStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkersStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[/֜CTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, ]; } /** * Constructs a WorkerStatisticsContext */ public function getContext(): WorkerStatisticsContext { return new WorkerStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['workerSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkerStatisticsList]'; } }PKt[RbbLTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkersRealTimeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsInstance */ public function buildInstance(array $payload): WorkersRealTimeStatisticsInstance { return new WorkersRealTimeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkersRealTimeStatisticsPage]'; } }PKt[A=o GTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'cumulative' => Values::array_get($payload, 'cumulative'), 'workerSid' => Values::array_get($payload, 'worker_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkerStatisticsContext Context for this WorkerStatisticsInstance */ protected function proxy(): WorkerStatisticsContext { if (!$this->context) { $this->context = new WorkerStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['workerSid'] ); } return $this->context; } /** * Fetch the WorkerStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkerStatisticsInstance Fetched WorkerStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkerStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkerStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[ɈCCBTwilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'reservationStatus' => Values::array_get($payload, 'reservation_status'), 'sid' => Values::array_get($payload, 'sid'), 'taskSid' => Values::array_get($payload, 'task_sid'), 'workerName' => Values::array_get($payload, 'worker_name'), 'workerSid' => Values::array_get($payload, 'worker_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ReservationContext Context for this ReservationInstance */ protected function proxy(): ReservationContext { if (!$this->context) { $this->context = new ReservationContext( $this->version, $this->solution['workspaceSid'], $this->solution['workerSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ReservationInstance * * @return ReservationInstance Fetched ReservationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ReservationInstance { return $this->proxy()->fetch(); } /** * Update the ReservationInstance * * @param array|Options $options Optional Arguments * @return ReservationInstance Updated ReservationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ReservationInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.ReservationInstance ' . \implode(' ', $context) . ']'; } }PKt[; ; QTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/CumulativeStatistics'; } /** * Fetch the WorkersCumulativeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkersCumulativeStatisticsInstance Fetched * WorkersCumulativeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkersCumulativeStatisticsInstance { $options = new Values($options); $params = Values::of([ 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'Minutes' => $options['minutes'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'TaskChannel' => $options['taskChannel'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new WorkersCumulativeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkersCumulativeStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[|MMATwilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.phpnu[options['reservationStatus'] = $reservationStatus; } /** * Returns the list of reservations for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`. * * @param string $reservationStatus Returns the list of reservations for a * worker with a specified ReservationStatus * @return $this Fluent Builder */ public function setReservationStatus(string $reservationStatus): self { $this->options['reservationStatus'] = $reservationStatus; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.ReadReservationOptions ' . $options . ']'; } } class UpdateReservationOptions extends Options { /** * @param string $reservationStatus The new status of the reservation * @param string $workerActivitySid The new worker activity SID if rejecting a * reservation * @param string $instruction The assignment instruction for the reservation * @param string $dequeuePostWorkActivitySid The SID of the Activity resource * to start after executing a Dequeue * instruction * @param string $dequeueFrom The caller ID of the call to the worker when * executing a Dequeue instruction * @param string $dequeueRecord Whether to record both legs of a call when * executing a Dequeue instruction * @param int $dequeueTimeout The timeout for call when executing a Dequeue * instruction * @param string $dequeueTo The contact URI of the worker when executing a * Dequeue instruction * @param string $dequeueStatusCallbackUrl The callback URL for completed call * event when executing a Dequeue * instruction * @param string $callFrom The Caller ID of the outbound call when executing a * Call instruction * @param string $callRecord Whether to record both legs of a call when * executing a Call instruction * @param int $callTimeout The timeout for a call when executing a Call * instruction * @param string $callTo The contact URI of the worker when executing a Call * instruction * @param string $callUrl TwiML URI executed on answering the worker's leg as a * result of the Call instruction * @param string $callStatusCallbackUrl The URL to call for the completed call * event when executing a Call instruction * @param bool $callAccept Whether to accept a reservation when executing a * Call instruction * @param string $redirectCallSid The Call SID of the call parked in the queue * when executing a Redirect instruction * @param bool $redirectAccept Whether the reservation should be accepted when * executing a Redirect instruction * @param string $redirectUrl TwiML URI to redirect the call to when executing * the Redirect instruction * @param string $to The Contact URI of the worker when executing a Conference * instruction * @param string $from The caller ID of the call to the worker when executing a * Conference instruction * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param string[] $statusCallbackEvent The call progress events that we will * send to status_callback * @param int $timeout The timeout for a call when executing a Conference * instruction * @param bool $record Whether to record the participant and their conferences * @param bool $muted Whether to mute the agent * @param string $beep Whether to play a notification beep when the participant * joins * @param bool $startConferenceOnEnter Whether the conference starts when the * participant joins the conference * @param bool $endConferenceOnExit Whether to end the conference when the * agent leaves * @param string $waitUrl URL that hosts pre-conference hold music * @param string $waitMethod The HTTP method we should use to call `wait_url` * @param bool $earlyMedia Whether agents can hear the state of the outbound * call * @param int $maxParticipants The maximum number of agent conference * participants * @param string $conferenceStatusCallback The callback URL for conference * events * @param string $conferenceStatusCallbackMethod HTTP method for requesting * `conference_status_callback` * URL * @param string[] $conferenceStatusCallbackEvent The conference status events * that we will send to * conference_status_callback * @param string $conferenceRecord Whether to record the conference the * participant is joining * @param string $conferenceTrim Whether to trim leading and trailing silence * from your recorded conference audio files * @param string $recordingChannels Specify `mono` or `dual` recording channels * @param string $recordingStatusCallback The URL that we should call using the * `recording_status_callback_method` * when the recording status changes * @param string $recordingStatusCallbackMethod The HTTP method we should use * when we call * `recording_status_callback` * @param string $conferenceRecordingStatusCallback The URL we should call * using the * `conference_recording_status_callback_method` when the conference recording is available * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we * should use to call * `conference_recording_status_callback` * @param string $region The region where we should mix the conference audio * @param string $sipAuthUsername The SIP username used for authentication * @param string $sipAuthPassword The SIP password for authentication * @param string[] $dequeueStatusCallbackEvent The call progress events sent * via webhooks as a result of a * Dequeue instruction * @param string $postWorkActivitySid The new worker activity SID after * executing a Conference instruction * @param bool $endConferenceOnCustomerExit Whether to end the conference when * the customer leaves * @param bool $beepOnCustomerEntrance Whether to play a notification beep when * the customer joins * @param string $ifMatch The If-Match HTTP request header */ public function __construct(string $reservationStatus = Values::NONE, string $workerActivitySid = Values::NONE, string $instruction = Values::NONE, string $dequeuePostWorkActivitySid = Values::NONE, string $dequeueFrom = Values::NONE, string $dequeueRecord = Values::NONE, int $dequeueTimeout = Values::NONE, string $dequeueTo = Values::NONE, string $dequeueStatusCallbackUrl = Values::NONE, string $callFrom = Values::NONE, string $callRecord = Values::NONE, int $callTimeout = Values::NONE, string $callTo = Values::NONE, string $callUrl = Values::NONE, string $callStatusCallbackUrl = Values::NONE, bool $callAccept = Values::NONE, string $redirectCallSid = Values::NONE, bool $redirectAccept = Values::NONE, string $redirectUrl = Values::NONE, string $to = Values::NONE, string $from = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, array $statusCallbackEvent = Values::ARRAY_NONE, int $timeout = Values::NONE, bool $record = Values::NONE, bool $muted = Values::NONE, string $beep = Values::NONE, bool $startConferenceOnEnter = Values::NONE, bool $endConferenceOnExit = Values::NONE, string $waitUrl = Values::NONE, string $waitMethod = Values::NONE, bool $earlyMedia = Values::NONE, int $maxParticipants = Values::NONE, string $conferenceStatusCallback = Values::NONE, string $conferenceStatusCallbackMethod = Values::NONE, array $conferenceStatusCallbackEvent = Values::ARRAY_NONE, string $conferenceRecord = Values::NONE, string $conferenceTrim = Values::NONE, string $recordingChannels = Values::NONE, string $recordingStatusCallback = Values::NONE, string $recordingStatusCallbackMethod = Values::NONE, string $conferenceRecordingStatusCallback = Values::NONE, string $conferenceRecordingStatusCallbackMethod = Values::NONE, string $region = Values::NONE, string $sipAuthUsername = Values::NONE, string $sipAuthPassword = Values::NONE, array $dequeueStatusCallbackEvent = Values::ARRAY_NONE, string $postWorkActivitySid = Values::NONE, bool $endConferenceOnCustomerExit = Values::NONE, bool $beepOnCustomerEntrance = Values::NONE, string $ifMatch = Values::NONE) { $this->options['reservationStatus'] = $reservationStatus; $this->options['workerActivitySid'] = $workerActivitySid; $this->options['instruction'] = $instruction; $this->options['dequeuePostWorkActivitySid'] = $dequeuePostWorkActivitySid; $this->options['dequeueFrom'] = $dequeueFrom; $this->options['dequeueRecord'] = $dequeueRecord; $this->options['dequeueTimeout'] = $dequeueTimeout; $this->options['dequeueTo'] = $dequeueTo; $this->options['dequeueStatusCallbackUrl'] = $dequeueStatusCallbackUrl; $this->options['callFrom'] = $callFrom; $this->options['callRecord'] = $callRecord; $this->options['callTimeout'] = $callTimeout; $this->options['callTo'] = $callTo; $this->options['callUrl'] = $callUrl; $this->options['callStatusCallbackUrl'] = $callStatusCallbackUrl; $this->options['callAccept'] = $callAccept; $this->options['redirectCallSid'] = $redirectCallSid; $this->options['redirectAccept'] = $redirectAccept; $this->options['redirectUrl'] = $redirectUrl; $this->options['to'] = $to; $this->options['from'] = $from; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['statusCallbackEvent'] = $statusCallbackEvent; $this->options['timeout'] = $timeout; $this->options['record'] = $record; $this->options['muted'] = $muted; $this->options['beep'] = $beep; $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; $this->options['endConferenceOnExit'] = $endConferenceOnExit; $this->options['waitUrl'] = $waitUrl; $this->options['waitMethod'] = $waitMethod; $this->options['earlyMedia'] = $earlyMedia; $this->options['maxParticipants'] = $maxParticipants; $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; $this->options['conferenceRecord'] = $conferenceRecord; $this->options['conferenceTrim'] = $conferenceTrim; $this->options['recordingChannels'] = $recordingChannels; $this->options['recordingStatusCallback'] = $recordingStatusCallback; $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; $this->options['region'] = $region; $this->options['sipAuthUsername'] = $sipAuthUsername; $this->options['sipAuthPassword'] = $sipAuthPassword; $this->options['dequeueStatusCallbackEvent'] = $dequeueStatusCallbackEvent; $this->options['postWorkActivitySid'] = $postWorkActivitySid; $this->options['endConferenceOnCustomerExit'] = $endConferenceOnCustomerExit; $this->options['beepOnCustomerEntrance'] = $beepOnCustomerEntrance; $this->options['ifMatch'] = $ifMatch; } /** * The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`. * * @param string $reservationStatus The new status of the reservation * @return $this Fluent Builder */ public function setReservationStatus(string $reservationStatus): self { $this->options['reservationStatus'] = $reservationStatus; return $this; } /** * The new worker activity SID if rejecting a reservation. * * @param string $workerActivitySid The new worker activity SID if rejecting a * reservation * @return $this Fluent Builder */ public function setWorkerActivitySid(string $workerActivitySid): self { $this->options['workerActivitySid'] = $workerActivitySid; return $this; } /** * The assignment instruction for the reservation. * * @param string $instruction The assignment instruction for the reservation * @return $this Fluent Builder */ public function setInstruction(string $instruction): self { $this->options['instruction'] = $instruction; return $this; } /** * The SID of the Activity resource to start after executing a Dequeue instruction. * * @param string $dequeuePostWorkActivitySid The SID of the Activity resource * to start after executing a Dequeue * instruction * @return $this Fluent Builder */ public function setDequeuePostWorkActivitySid(string $dequeuePostWorkActivitySid): self { $this->options['dequeuePostWorkActivitySid'] = $dequeuePostWorkActivitySid; return $this; } /** * The caller ID of the call to the worker when executing a Dequeue instruction. * * @param string $dequeueFrom The caller ID of the call to the worker when * executing a Dequeue instruction * @return $this Fluent Builder */ public function setDequeueFrom(string $dequeueFrom): self { $this->options['dequeueFrom'] = $dequeueFrom; return $this; } /** * Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. * * @param string $dequeueRecord Whether to record both legs of a call when * executing a Dequeue instruction * @return $this Fluent Builder */ public function setDequeueRecord(string $dequeueRecord): self { $this->options['dequeueRecord'] = $dequeueRecord; return $this; } /** * The timeout for call when executing a Dequeue instruction. * * @param int $dequeueTimeout The timeout for call when executing a Dequeue * instruction * @return $this Fluent Builder */ public function setDequeueTimeout(int $dequeueTimeout): self { $this->options['dequeueTimeout'] = $dequeueTimeout; return $this; } /** * The contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. * * @param string $dequeueTo The contact URI of the worker when executing a * Dequeue instruction * @return $this Fluent Builder */ public function setDequeueTo(string $dequeueTo): self { $this->options['dequeueTo'] = $dequeueTo; return $this; } /** * The callback URL for completed call event when executing a Dequeue instruction. * * @param string $dequeueStatusCallbackUrl The callback URL for completed call * event when executing a Dequeue * instruction * @return $this Fluent Builder */ public function setDequeueStatusCallbackUrl(string $dequeueStatusCallbackUrl): self { $this->options['dequeueStatusCallbackUrl'] = $dequeueStatusCallbackUrl; return $this; } /** * The Caller ID of the outbound call when executing a Call instruction. * * @param string $callFrom The Caller ID of the outbound call when executing a * Call instruction * @return $this Fluent Builder */ public function setCallFrom(string $callFrom): self { $this->options['callFrom'] = $callFrom; return $this; } /** * Whether to record both legs of a call when executing a Call instruction. * * @param string $callRecord Whether to record both legs of a call when * executing a Call instruction * @return $this Fluent Builder */ public function setCallRecord(string $callRecord): self { $this->options['callRecord'] = $callRecord; return $this; } /** * The timeout for a call when executing a Call instruction. * * @param int $callTimeout The timeout for a call when executing a Call * instruction * @return $this Fluent Builder */ public function setCallTimeout(int $callTimeout): self { $this->options['callTimeout'] = $callTimeout; return $this; } /** * The contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. * * @param string $callTo The contact URI of the worker when executing a Call * instruction * @return $this Fluent Builder */ public function setCallTo(string $callTo): self { $this->options['callTo'] = $callTo; return $this; } /** * TwiML URI executed on answering the worker's leg as a result of the Call instruction. * * @param string $callUrl TwiML URI executed on answering the worker's leg as a * result of the Call instruction * @return $this Fluent Builder */ public function setCallUrl(string $callUrl): self { $this->options['callUrl'] = $callUrl; return $this; } /** * The URL to call for the completed call event when executing a Call instruction. * * @param string $callStatusCallbackUrl The URL to call for the completed call * event when executing a Call instruction * @return $this Fluent Builder */ public function setCallStatusCallbackUrl(string $callStatusCallbackUrl): self { $this->options['callStatusCallbackUrl'] = $callStatusCallbackUrl; return $this; } /** * Whether to accept a reservation when executing a Call instruction. * * @param bool $callAccept Whether to accept a reservation when executing a * Call instruction * @return $this Fluent Builder */ public function setCallAccept(bool $callAccept): self { $this->options['callAccept'] = $callAccept; return $this; } /** * The Call SID of the call parked in the queue when executing a Redirect instruction. * * @param string $redirectCallSid The Call SID of the call parked in the queue * when executing a Redirect instruction * @return $this Fluent Builder */ public function setRedirectCallSid(string $redirectCallSid): self { $this->options['redirectCallSid'] = $redirectCallSid; return $this; } /** * Whether the reservation should be accepted when executing a Redirect instruction. * * @param bool $redirectAccept Whether the reservation should be accepted when * executing a Redirect instruction * @return $this Fluent Builder */ public function setRedirectAccept(bool $redirectAccept): self { $this->options['redirectAccept'] = $redirectAccept; return $this; } /** * TwiML URI to redirect the call to when executing the Redirect instruction. * * @param string $redirectUrl TwiML URI to redirect the call to when executing * the Redirect instruction * @return $this Fluent Builder */ public function setRedirectUrl(string $redirectUrl): self { $this->options['redirectUrl'] = $redirectUrl; return $this; } /** * The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. * * @param string $to The Contact URI of the worker when executing a Conference * instruction * @return $this Fluent Builder */ public function setTo(string $to): self { $this->options['to'] = $to; return $this; } /** * The caller ID of the call to the worker when executing a Conference instruction. * * @param string $from The caller ID of the call to the worker when executing a * Conference instruction * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`. * * @param string[] $statusCallbackEvent The call progress events that we will * send to status_callback * @return $this Fluent Builder */ public function setStatusCallbackEvent(array $statusCallbackEvent): self { $this->options['statusCallbackEvent'] = $statusCallbackEvent; return $this; } /** * The timeout for a call when executing a Conference instruction. * * @param int $timeout The timeout for a call when executing a Conference * instruction * @return $this Fluent Builder */ public function setTimeout(int $timeout): self { $this->options['timeout'] = $timeout; return $this; } /** * Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. * * @param bool $record Whether to record the participant and their conferences * @return $this Fluent Builder */ public function setRecord(bool $record): self { $this->options['record'] = $record; return $this; } /** * Whether the agent is muted in the conference. Defaults to `false`. * * @param bool $muted Whether to mute the agent * @return $this Fluent Builder */ public function setMuted(bool $muted): self { $this->options['muted'] = $muted; return $this; } /** * Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. * * @param string $beep Whether to play a notification beep when the participant * joins * @return $this Fluent Builder */ public function setBeep(string $beep): self { $this->options['beep'] = $beep; return $this; } /** * Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. * * @param bool $startConferenceOnEnter Whether the conference starts when the * participant joins the conference * @return $this Fluent Builder */ public function setStartConferenceOnEnter(bool $startConferenceOnEnter): self { $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; return $this; } /** * Whether to end the conference when the agent leaves. * * @param bool $endConferenceOnExit Whether to end the conference when the * agent leaves * @return $this Fluent Builder */ public function setEndConferenceOnExit(bool $endConferenceOnExit): self { $this->options['endConferenceOnExit'] = $endConferenceOnExit; return $this; } /** * The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * * @param string $waitUrl URL that hosts pre-conference hold music * @return $this Fluent Builder */ public function setWaitUrl(string $waitUrl): self { $this->options['waitUrl'] = $waitUrl; return $this; } /** * The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. * * @param string $waitMethod The HTTP method we should use to call `wait_url` * @return $this Fluent Builder */ public function setWaitMethod(string $waitMethod): self { $this->options['waitMethod'] = $waitMethod; return $this; } /** * Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`. * * @param bool $earlyMedia Whether agents can hear the state of the outbound * call * @return $this Fluent Builder */ public function setEarlyMedia(bool $earlyMedia): self { $this->options['earlyMedia'] = $earlyMedia; return $this; } /** * The maximum number of participants allowed in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. * * @param int $maxParticipants The maximum number of agent conference * participants * @return $this Fluent Builder */ public function setMaxParticipants(int $maxParticipants): self { $this->options['maxParticipants'] = $maxParticipants; return $this; } /** * The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. * * @param string $conferenceStatusCallback The callback URL for conference * events * @return $this Fluent Builder */ public function setConferenceStatusCallback(string $conferenceStatusCallback): self { $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; return $this; } /** * The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $conferenceStatusCallbackMethod HTTP method for requesting * `conference_status_callback` * URL * @return $this Fluent Builder */ public function setConferenceStatusCallbackMethod(string $conferenceStatusCallbackMethod): self { $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; return $this; } /** * The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`. * * @param string[] $conferenceStatusCallbackEvent The conference status events * that we will send to * conference_status_callback * @return $this Fluent Builder */ public function setConferenceStatusCallbackEvent(array $conferenceStatusCallbackEvent): self { $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; return $this; } /** * Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. * * @param string $conferenceRecord Whether to record the conference the * participant is joining * @return $this Fluent Builder */ public function setConferenceRecord(string $conferenceRecord): self { $this->options['conferenceRecord'] = $conferenceRecord; return $this; } /** * Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. * * @param string $conferenceTrim Whether to trim leading and trailing silence * from your recorded conference audio files * @return $this Fluent Builder */ public function setConferenceTrim(string $conferenceTrim): self { $this->options['conferenceTrim'] = $conferenceTrim; return $this; } /** * The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. * * @param string $recordingChannels Specify `mono` or `dual` recording channels * @return $this Fluent Builder */ public function setRecordingChannels(string $recordingChannels): self { $this->options['recordingChannels'] = $recordingChannels; return $this; } /** * The URL that we should call using the `recording_status_callback_method` when the recording status changes. * * @param string $recordingStatusCallback The URL that we should call using the * `recording_status_callback_method` * when the recording status changes * @return $this Fluent Builder */ public function setRecordingStatusCallback(string $recordingStatusCallback): self { $this->options['recordingStatusCallback'] = $recordingStatusCallback; return $this; } /** * The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $recordingStatusCallbackMethod The HTTP method we should use * when we call * `recording_status_callback` * @return $this Fluent Builder */ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self { $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; return $this; } /** * The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. * * @param string $conferenceRecordingStatusCallback The URL we should call * using the * `conference_recording_status_callback_method` when the conference recording is available * @return $this Fluent Builder */ public function setConferenceRecordingStatusCallback(string $conferenceRecordingStatusCallback): self { $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; return $this; } /** * The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we * should use to call * `conference_recording_status_callback` * @return $this Fluent Builder */ public function setConferenceRecordingStatusCallbackMethod(string $conferenceRecordingStatusCallbackMethod): self { $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; return $this; } /** * The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. * * @param string $region The region where we should mix the conference audio * @return $this Fluent Builder */ public function setRegion(string $region): self { $this->options['region'] = $region; return $this; } /** * The SIP username used for authentication. * * @param string $sipAuthUsername The SIP username used for authentication * @return $this Fluent Builder */ public function setSipAuthUsername(string $sipAuthUsername): self { $this->options['sipAuthUsername'] = $sipAuthUsername; return $this; } /** * The SIP password for authentication. * * @param string $sipAuthPassword The SIP password for authentication * @return $this Fluent Builder */ public function setSipAuthPassword(string $sipAuthPassword): self { $this->options['sipAuthPassword'] = $sipAuthPassword; return $this; } /** * The call progress events sent via webhooks as a result of a Dequeue instruction. * * @param string[] $dequeueStatusCallbackEvent The call progress events sent * via webhooks as a result of a * Dequeue instruction * @return $this Fluent Builder */ public function setDequeueStatusCallbackEvent(array $dequeueStatusCallbackEvent): self { $this->options['dequeueStatusCallbackEvent'] = $dequeueStatusCallbackEvent; return $this; } /** * The new worker activity SID after executing a Conference instruction. * * @param string $postWorkActivitySid The new worker activity SID after * executing a Conference instruction * @return $this Fluent Builder */ public function setPostWorkActivitySid(string $postWorkActivitySid): self { $this->options['postWorkActivitySid'] = $postWorkActivitySid; return $this; } /** * Whether to end the conference when the customer leaves. * * @param bool $endConferenceOnCustomerExit Whether to end the conference when * the customer leaves * @return $this Fluent Builder */ public function setEndConferenceOnCustomerExit(bool $endConferenceOnCustomerExit): self { $this->options['endConferenceOnCustomerExit'] = $endConferenceOnCustomerExit; return $this; } /** * Whether to play a notification beep when the customer joins. * * @param bool $beepOnCustomerEntrance Whether to play a notification beep when * the customer joins * @return $this Fluent Builder */ public function setBeepOnCustomerEntrance(bool $beepOnCustomerEntrance): self { $this->options['beepOnCustomerEntrance'] = $beepOnCustomerEntrance; return $this; } /** * The If-Match HTTP request header * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.UpdateReservationOptions ' . $options . ']'; } }PKt[ދLTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; } /** * Constructs a WorkersRealTimeStatisticsContext */ public function getContext(): WorkersRealTimeStatisticsContext { return new WorkersRealTimeStatisticsContext($this->version, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkersRealTimeStatisticsList]'; } }PKt[ OTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsOptions.phpnu[options['taskChannel'] = $taskChannel; } /** * Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate real-time statistics on this * TaskChannel * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchWorkersRealTimeStatisticsOptions ' . $options . ']'; } }PKt[glDTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkersStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsInstance */ public function buildInstance(array $payload): WorkersStatisticsInstance { return new WorkersStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkersStatisticsPage]'; } }PKt[9o!66OTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/RealTimeStatistics'; } /** * Fetch the WorkersRealTimeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkersRealTimeStatisticsInstance Fetched * WorkersRealTimeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkersRealTimeStatisticsInstance { $options = new Values($options); $params = Values::of(['TaskChannel' => $options['taskChannel'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new WorkersRealTimeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkersRealTimeStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[>!xyyGTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsOptions.phpnu[options['minutes'] = $minutes; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['taskQueueSid'] = $taskQueueSid; $this->options['taskQueueName'] = $taskQueueName; $this->options['friendlyName'] = $friendlyName; $this->options['taskChannel'] = $taskChannel; } /** * Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. * * @param int $minutes Only calculate statistics since this many minutes in the * past * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only calculate statistics from on or after this * date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * * @param \DateTime $endDate Only calculate statistics from this date and time * and earlier * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * The SID of the TaskQueue for which to fetch Worker statistics. * * @param string $taskQueueSid The SID of the TaskQueue for which to fetch * Worker statistics * @return $this Fluent Builder */ public function setTaskQueueSid(string $taskQueueSid): self { $this->options['taskQueueSid'] = $taskQueueSid; return $this; } /** * The `friendly_name` of the TaskQueue for which to fetch Worker statistics. * * @param string $taskQueueName The friendly_name of the TaskQueue for which to * fetch Worker statistics * @return $this Fluent Builder */ public function setTaskQueueName(string $taskQueueName): self { $this->options['taskQueueName'] = $taskQueueName; return $this; } /** * Only include Workers with `friendly_name` values that match this parameter. * * @param string $friendlyName Only include Workers with `friendly_name` values * that match this parameter * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate statistics on this TaskChannel * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchWorkersStatisticsOptions ' . $options . ']'; } }PKt[.uRTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'activityDurations' => Values::array_get($payload, 'activity_durations'), 'reservationsCreated' => Values::array_get($payload, 'reservations_created'), 'reservationsAccepted' => Values::array_get($payload, 'reservations_accepted'), 'reservationsRejected' => Values::array_get($payload, 'reservations_rejected'), 'reservationsTimedOut' => Values::array_get($payload, 'reservations_timed_out'), 'reservationsCanceled' => Values::array_get($payload, 'reservations_canceled'), 'reservationsRescinded' => Values::array_get($payload, 'reservations_rescinded'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkersCumulativeStatisticsContext Context for this * WorkersCumulativeStatisticsInstance */ protected function proxy(): WorkersCumulativeStatisticsContext { if (!$this->context) { $this->context = new WorkersCumulativeStatisticsContext( $this->version, $this->solution['workspaceSid'] ); } return $this->context; } /** * Fetch the WorkersCumulativeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkersCumulativeStatisticsInstance Fetched * WorkersCumulativeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkersCumulativeStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkersCumulativeStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[ЗQTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsOptions.phpnu[options['endDate'] = $endDate; $this->options['minutes'] = $minutes; $this->options['startDate'] = $startDate; $this->options['taskChannel'] = $taskChannel; } /** * Only calculate statistics from this date and time and earlier, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $endDate Only calculate statistics from on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. * * @param int $minutes Only calculate statistics since this many minutes in the * past * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only calculate statistics from on or after this * date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate cumulative statistics on this * TaskChannel * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchWorkersCumulativeStatisticsOptions ' . $options . ']'; } }PKt[/l}}DTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; } /** * Constructs a WorkersStatisticsContext */ public function getContext(): WorkersStatisticsContext { return new WorkersStatisticsContext($this->version, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkersStatisticsList]'; } }PKt[NTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; } /** * Constructs a WorkersCumulativeStatisticsContext */ public function getContext(): WorkersCumulativeStatisticsContext { return new WorkersCumulativeStatisticsContext($this->version, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkersCumulativeStatisticsList]'; } }PKt[Gy CTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelOptions.phpnu[options['capacity'] = $capacity; $this->options['available'] = $available; } /** * The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created. * * @param int $capacity The total number of Tasks that the Worker should handle * for the TaskChannel type * @return $this Fluent Builder */ public function setCapacity(int $capacity): self { $this->options['capacity'] = $capacity; return $this; } /** * Whether the WorkerChannel is available. Set to `false` to prevent the Worker from receiving any new Tasks of this TaskChannel type. * * @param bool $available Whether the WorkerChannel is available * @return $this Fluent Builder */ public function setAvailable(bool $available): self { $this->options['available'] = $available; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.UpdateWorkerChannelOptions ' . $options . ']'; } }PKt[t CTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, 'sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($workerSid) . '/Channels/' . \rawurlencode($sid) . ''; } /** * Fetch the WorkerChannelInstance * * @return WorkerChannelInstance Fetched WorkerChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WorkerChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new WorkerChannelInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid'], $this->solution['sid'] ); } /** * Update the WorkerChannelInstance * * @param array|Options $options Optional Arguments * @return WorkerChannelInstance Updated WorkerChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WorkerChannelInstance { $options = new Values($options); $data = Values::of([ 'Capacity' => $options['capacity'], 'Available' => Serialize::booleanToString($options['available']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WorkerChannelInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkerChannelContext ' . \implode(' ', $context) . ']'; } }PKt[:eOOFTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsOptions.phpnu[options['minutes'] = $minutes; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['taskChannel'] = $taskChannel; } /** * Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. * * @param int $minutes Only calculate statistics since this many minutes in the * past * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only calculate statistics from on or after this * date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate statistics on this TaskChannel * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchWorkerStatisticsOptions ' . $options . ']'; } }PKt[VVCTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkerStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsInstance */ public function buildInstance(array $payload): WorkerStatisticsInstance { return new WorkerStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkerStatisticsPage]'; } }PKt[-^@Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelList.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($workerSid) . '/Channels'; } /** * Streams WorkerChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WorkerChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WorkerChannelInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of WorkerChannelInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WorkerChannelPage Page of WorkerChannelInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WorkerChannelPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WorkerChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WorkerChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WorkerChannelPage Page of WorkerChannelInstance */ public function getPage(string $targetUrl): WorkerChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WorkerChannelPage($this->version, $response, $this->solution); } /** * Constructs a WorkerChannelContext * * @param string $sid The SID of the to fetch */ public function getContext(string $sid): WorkerChannelContext { return new WorkerChannelContext( $this->version, $this->solution['workspaceSid'], $this->solution['workerSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkerChannelList]'; } }PKt[<>Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationList.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($workerSid) . '/Reservations'; } /** * Streams ReservationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ReservationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ReservationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ReservationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ReservationPage Page of ReservationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ReservationPage { $options = new Values($options); $params = Values::of([ 'ReservationStatus' => $options['reservationStatus'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ReservationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ReservationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ReservationPage Page of ReservationInstance */ public function getPage(string $targetUrl): ReservationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ReservationPage($this->version, $response, $this->solution); } /** * Constructs a ReservationContext * * @param string $sid The SID of the WorkerReservation resource to fetch */ public function getContext(string $sid): ReservationContext { return new ReservationContext( $this->version, $this->solution['workspaceSid'], $this->solution['workerSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.ReservationList]'; } }PKt[!r/DTwilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assignedTasks' => Values::array_get($payload, 'assigned_tasks'), 'available' => Values::array_get($payload, 'available'), 'availableCapacityPercentage' => Values::array_get($payload, 'available_capacity_percentage'), 'configuredCapacity' => Values::array_get($payload, 'configured_capacity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'sid' => Values::array_get($payload, 'sid'), 'taskChannelSid' => Values::array_get($payload, 'task_channel_sid'), 'taskChannelUniqueName' => Values::array_get($payload, 'task_channel_unique_name'), 'workerSid' => Values::array_get($payload, 'worker_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkerChannelContext Context for this WorkerChannelInstance */ protected function proxy(): WorkerChannelContext { if (!$this->context) { $this->context = new WorkerChannelContext( $this->version, $this->solution['workspaceSid'], $this->solution['workerSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the WorkerChannelInstance * * @return WorkerChannelInstance Fetched WorkerChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WorkerChannelInstance { return $this->proxy()->fetch(); } /** * Update the WorkerChannelInstance * * @param array|Options $options Optional Arguments * @return WorkerChannelInstance Updated WorkerChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WorkerChannelInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkerChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[\,p88>Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ReservationInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationInstance */ public function buildInstance(array $payload): ReservationInstance { return new ReservationInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.ReservationPage]'; } }PKt[_ATwilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, 'sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($workerSid) . '/Reservations/' . \rawurlencode($sid) . ''; } /** * Fetch the ReservationInstance * * @return ReservationInstance Fetched ReservationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ReservationInstance { $payload = $this->version->fetch('GET', $this->uri); return new ReservationInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid'], $this->solution['sid'] ); } /** * Update the ReservationInstance * * @param array|Options $options Optional Arguments * @return ReservationInstance Updated ReservationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ReservationInstance { $options = new Values($options); $data = Values::of([ 'ReservationStatus' => $options['reservationStatus'], 'WorkerActivitySid' => $options['workerActivitySid'], 'Instruction' => $options['instruction'], 'DequeuePostWorkActivitySid' => $options['dequeuePostWorkActivitySid'], 'DequeueFrom' => $options['dequeueFrom'], 'DequeueRecord' => $options['dequeueRecord'], 'DequeueTimeout' => $options['dequeueTimeout'], 'DequeueTo' => $options['dequeueTo'], 'DequeueStatusCallbackUrl' => $options['dequeueStatusCallbackUrl'], 'CallFrom' => $options['callFrom'], 'CallRecord' => $options['callRecord'], 'CallTimeout' => $options['callTimeout'], 'CallTo' => $options['callTo'], 'CallUrl' => $options['callUrl'], 'CallStatusCallbackUrl' => $options['callStatusCallbackUrl'], 'CallAccept' => Serialize::booleanToString($options['callAccept']), 'RedirectCallSid' => $options['redirectCallSid'], 'RedirectAccept' => Serialize::booleanToString($options['redirectAccept']), 'RedirectUrl' => $options['redirectUrl'], 'To' => $options['to'], 'From' => $options['from'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function($e) { return $e; }), 'Timeout' => $options['timeout'], 'Record' => Serialize::booleanToString($options['record']), 'Muted' => Serialize::booleanToString($options['muted']), 'Beep' => $options['beep'], 'StartConferenceOnEnter' => Serialize::booleanToString($options['startConferenceOnEnter']), 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']), 'WaitUrl' => $options['waitUrl'], 'WaitMethod' => $options['waitMethod'], 'EarlyMedia' => Serialize::booleanToString($options['earlyMedia']), 'MaxParticipants' => $options['maxParticipants'], 'ConferenceStatusCallback' => $options['conferenceStatusCallback'], 'ConferenceStatusCallbackMethod' => $options['conferenceStatusCallbackMethod'], 'ConferenceStatusCallbackEvent' => Serialize::map($options['conferenceStatusCallbackEvent'], function($e) { return $e; }), 'ConferenceRecord' => $options['conferenceRecord'], 'ConferenceTrim' => $options['conferenceTrim'], 'RecordingChannels' => $options['recordingChannels'], 'RecordingStatusCallback' => $options['recordingStatusCallback'], 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'], 'ConferenceRecordingStatusCallback' => $options['conferenceRecordingStatusCallback'], 'ConferenceRecordingStatusCallbackMethod' => $options['conferenceRecordingStatusCallbackMethod'], 'Region' => $options['region'], 'SipAuthUsername' => $options['sipAuthUsername'], 'SipAuthPassword' => $options['sipAuthPassword'], 'DequeueStatusCallbackEvent' => Serialize::map($options['dequeueStatusCallbackEvent'], function($e) { return $e; }), 'PostWorkActivitySid' => $options['postWorkActivitySid'], 'EndConferenceOnCustomerExit' => Serialize::booleanToString($options['endConferenceOnCustomerExit']), 'BeepOnCustomerEntrance' => Serialize::booleanToString($options['beepOnCustomerEntrance']), ]); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new ReservationInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.ReservationContext ' . \implode(' ', $context) . ']'; } }PKt[c?Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkspaceStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsInstance */ public function buildInstance(array $payload): WorkspaceStatisticsInstance { return new WorkspaceStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkspaceStatisticsPage]'; } }PKt[xo337Twilio/Rest/Taskrouter/V1/Workspace/WorkflowOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['assignmentCallbackUrl'] = $assignmentCallbackUrl; $this->options['fallbackAssignmentCallbackUrl'] = $fallbackAssignmentCallbackUrl; $this->options['configuration'] = $configuration; $this->options['taskReservationTimeout'] = $taskReservationTimeout; $this->options['reEvaluateTasks'] = $reEvaluateTasks; } /** * A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. * * @param string $friendlyName descriptive string that you create to describe * the Workflow resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. * * @param string $assignmentCallbackUrl The URL from your application that will * process task assignment events * @return $this Fluent Builder */ public function setAssignmentCallbackUrl(string $assignmentCallbackUrl): self { $this->options['assignmentCallbackUrl'] = $assignmentCallbackUrl; return $this; } /** * The URL that we should call when a call to the `assignment_callback_url` fails. * * @param string $fallbackAssignmentCallbackUrl The URL that we should call * when a call to the * `assignment_callback_url` fails * @return $this Fluent Builder */ public function setFallbackAssignmentCallbackUrl(string $fallbackAssignmentCallbackUrl): self { $this->options['fallbackAssignmentCallbackUrl'] = $fallbackAssignmentCallbackUrl; return $this; } /** * A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. * * @param string $configuration A JSON string that contains the rules to apply * to the Workflow * @return $this Fluent Builder */ public function setConfiguration(string $configuration): self { $this->options['configuration'] = $configuration; return $this; } /** * How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. * * @param int $taskReservationTimeout How long TaskRouter will wait for a * confirmation response from your * application after it assigns a Task to a * Worker * @return $this Fluent Builder */ public function setTaskReservationTimeout(int $taskReservationTimeout): self { $this->options['taskReservationTimeout'] = $taskReservationTimeout; return $this; } /** * Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again. * * @param string $reEvaluateTasks Whether or not to re-evaluate Tasks * @return $this Fluent Builder */ public function setReEvaluateTasks(string $reEvaluateTasks): self { $this->options['reEvaluateTasks'] = $reEvaluateTasks; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.UpdateWorkflowOptions ' . $options . ']'; } } class ReadWorkflowOptions extends Options { /** * @param string $friendlyName The friendly_name of the Workflow resources to * read */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * The `friendly_name` of the Workflow resources to read. * * @param string $friendlyName The friendly_name of the Workflow resources to * read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.ReadWorkflowOptions ' . $options . ']'; } } class CreateWorkflowOptions extends Options { /** * @param string $assignmentCallbackUrl The URL from your application that will * process task assignment events * @param string $fallbackAssignmentCallbackUrl The URL that we should call * when a call to the * `assignment_callback_url` fails * @param int $taskReservationTimeout How long TaskRouter will wait for a * confirmation response from your * application after it assigns a Task to a * Worker */ public function __construct(string $assignmentCallbackUrl = Values::NONE, string $fallbackAssignmentCallbackUrl = Values::NONE, int $taskReservationTimeout = Values::NONE) { $this->options['assignmentCallbackUrl'] = $assignmentCallbackUrl; $this->options['fallbackAssignmentCallbackUrl'] = $fallbackAssignmentCallbackUrl; $this->options['taskReservationTimeout'] = $taskReservationTimeout; } /** * The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. * * @param string $assignmentCallbackUrl The URL from your application that will * process task assignment events * @return $this Fluent Builder */ public function setAssignmentCallbackUrl(string $assignmentCallbackUrl): self { $this->options['assignmentCallbackUrl'] = $assignmentCallbackUrl; return $this; } /** * The URL that we should call when a call to the `assignment_callback_url` fails. * * @param string $fallbackAssignmentCallbackUrl The URL that we should call * when a call to the * `assignment_callback_url` fails * @return $this Fluent Builder */ public function setFallbackAssignmentCallbackUrl(string $fallbackAssignmentCallbackUrl): self { $this->options['fallbackAssignmentCallbackUrl'] = $fallbackAssignmentCallbackUrl; return $this; } /** * How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. * * @param int $taskReservationTimeout How long TaskRouter will wait for a * confirmation response from your * application after it assigns a Task to a * Worker * @return $this Fluent Builder */ public function setTaskReservationTimeout(int $taskReservationTimeout): self { $this->options['taskReservationTimeout'] = $taskReservationTimeout; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.CreateWorkflowOptions ' . $options . ']'; } }PKt[vx<<5Twilio/Rest/Taskrouter/V1/Workspace/WorkerOptions.phpnu[options['activityName'] = $activityName; $this->options['activitySid'] = $activitySid; $this->options['available'] = $available; $this->options['friendlyName'] = $friendlyName; $this->options['targetWorkersExpression'] = $targetWorkersExpression; $this->options['taskQueueName'] = $taskQueueName; $this->options['taskQueueSid'] = $taskQueueSid; $this->options['ordering'] = $ordering; } /** * The `activity_name` of the Worker resources to read. * * @param string $activityName The activity_name of the Worker resources to read * @return $this Fluent Builder */ public function setActivityName(string $activityName): self { $this->options['activityName'] = $activityName; return $this; } /** * The `activity_sid` of the Worker resources to read. * * @param string $activitySid The activity_sid of the Worker resources to read * @return $this Fluent Builder */ public function setActivitySid(string $activitySid): self { $this->options['activitySid'] = $activitySid; return $this; } /** * Whether to return only Worker resources that are available or unavailable. Can be `true`, `1`, or `yes` to return Worker resources that are available, and `false`, or any value returns the Worker resources that are not available. * * @param string $available Whether to return Worker resources that are * available or unavailable * @return $this Fluent Builder */ public function setAvailable(string $available): self { $this->options['available'] = $available; return $this; } /** * The `friendly_name` of the Worker resources to read. * * @param string $friendlyName The friendly_name of the Worker resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Filter by Workers that would match an expression on a TaskQueue. This is helpful for debugging which Workers would match a potential queue. * * @param string $targetWorkersExpression Filter by Workers that would match an * expression on a TaskQueue * @return $this Fluent Builder */ public function setTargetWorkersExpression(string $targetWorkersExpression): self { $this->options['targetWorkersExpression'] = $targetWorkersExpression; return $this; } /** * The `friendly_name` of the TaskQueue that the Workers to read are eligible for. * * @param string $taskQueueName The friendly_name of the TaskQueue that the * Workers to read are eligible for * @return $this Fluent Builder */ public function setTaskQueueName(string $taskQueueName): self { $this->options['taskQueueName'] = $taskQueueName; return $this; } /** * The SID of the TaskQueue that the Workers to read are eligible for. * * @param string $taskQueueSid The SID of the TaskQueue that the Workers to * read are eligible for * @return $this Fluent Builder */ public function setTaskQueueSid(string $taskQueueSid): self { $this->options['taskQueueSid'] = $taskQueueSid; return $this; } /** * Sorting parameter for Workers * * @param string $ordering Sorting parameter for Workers * @return $this Fluent Builder */ public function setOrdering(string $ordering): self { $this->options['ordering'] = $ordering; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.ReadWorkerOptions ' . $options . ']'; } } class CreateWorkerOptions extends Options { /** * @param string $activitySid The SID of a valid Activity that describes the * new Worker's initial state * @param string $attributes A valid JSON string that describes the new Worker */ public function __construct(string $activitySid = Values::NONE, string $attributes = Values::NONE) { $this->options['activitySid'] = $activitySid; $this->options['attributes'] = $attributes; } /** * The SID of a valid Activity that will describe the new Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. If not provided, the new Worker's initial state is the `default_activity_sid` configured on the Workspace. * * @param string $activitySid The SID of a valid Activity that describes the * new Worker's initial state * @return $this Fluent Builder */ public function setActivitySid(string $activitySid): self { $this->options['activitySid'] = $activitySid; return $this; } /** * A valid JSON string that describes the new Worker. For example: `{ "email": "Bob@example.com", "phone": "+5095551234" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. * * @param string $attributes A valid JSON string that describes the new Worker * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.CreateWorkerOptions ' . $options . ']'; } } class UpdateWorkerOptions extends Options { /** * @param string $activitySid The SID of the Activity that describes the * Worker's initial state * @param string $attributes The JSON string that describes the Worker * @param string $friendlyName A string to describe the Worker * @param bool $rejectPendingReservations Whether to reject the Worker's * pending reservations * @param string $ifMatch The If-Match HTTP request header */ public function __construct(string $activitySid = Values::NONE, string $attributes = Values::NONE, string $friendlyName = Values::NONE, bool $rejectPendingReservations = Values::NONE, string $ifMatch = Values::NONE) { $this->options['activitySid'] = $activitySid; $this->options['attributes'] = $attributes; $this->options['friendlyName'] = $friendlyName; $this->options['rejectPendingReservations'] = $rejectPendingReservations; $this->options['ifMatch'] = $ifMatch; } /** * The SID of a valid Activity that will describe the Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. * * @param string $activitySid The SID of the Activity that describes the * Worker's initial state * @return $this Fluent Builder */ public function setActivitySid(string $activitySid): self { $this->options['activitySid'] = $activitySid; return $this; } /** * The JSON string that describes the Worker. For example: `{ "email": "Bob@example.com", "phone": "+5095551234" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. * * @param string $attributes The JSON string that describes the Worker * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * A descriptive string that you create to describe the Worker. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the Worker * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether to reject the Worker's pending reservations. This option is only valid if the Worker's new [Activity](https://www.twilio.com/docs/taskrouter/api/activity) resource has its `availability` property set to `False`. * * @param bool $rejectPendingReservations Whether to reject the Worker's * pending reservations * @return $this Fluent Builder */ public function setRejectPendingReservations(bool $rejectPendingReservations): self { $this->options['rejectPendingReservations'] = $rejectPendingReservations; return $this; } /** * The If-Match HTTP request header * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.UpdateWorkerOptions ' . $options . ']'; } } class DeleteWorkerOptions extends Options { /** * @param string $ifMatch The If-Match HTTP request header */ public function __construct(string $ifMatch = Values::NONE) { $this->options['ifMatch'] = $ifMatch; } /** * The If-Match HTTP request header * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.DeleteWorkerOptions ' . $options . ']'; } }PKt[vTQQ7Twilio/Rest/Taskrouter/V1/Workspace/ActivityOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. * * @param string $friendlyName A string to describe the Activity resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.UpdateActivityOptions ' . $options . ']'; } } class ReadActivityOptions extends Options { /** * @param string $friendlyName The friendly_name of the Activity resources to * read * @param string $available Whether to return activities that are available or * unavailable */ public function __construct(string $friendlyName = Values::NONE, string $available = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['available'] = $available; } /** * The `friendly_name` of the Activity resources to read. * * @param string $friendlyName The friendly_name of the Activity resources to * read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable. * * @param string $available Whether to return activities that are available or * unavailable * @return $this Fluent Builder */ public function setAvailable(string $available): self { $this->options['available'] = $available; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.ReadActivityOptions ' . $options . ']'; } } class CreateActivityOptions extends Options { /** * @param bool $available Whether the Worker should be eligible to receive a * Task when it occupies the Activity */ public function __construct(bool $available = Values::NONE) { $this->options['available'] = $available; } /** * Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created. * * @param bool $available Whether the Worker should be eligible to receive a * Task when it occupies the Activity * @return $this Fluent Builder */ public function setAvailable(bool $available): self { $this->options['available'] = $available; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.CreateActivityOptions ' . $options . ']'; } }PKt[eX흎1Twilio/Rest/Taskrouter/V1/Workspace/EventList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Events'; } /** * Streams EventInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EventInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EventInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of EventInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EventPage Page of EventInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EventPage { $options = new Values($options); $params = Values::of([ 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'EventType' => $options['eventType'], 'Minutes' => $options['minutes'], 'ReservationSid' => $options['reservationSid'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'TaskQueueSid' => $options['taskQueueSid'], 'TaskSid' => $options['taskSid'], 'WorkerSid' => $options['workerSid'], 'WorkflowSid' => $options['workflowSid'], 'TaskChannel' => $options['taskChannel'], 'Sid' => $options['sid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EventPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EventInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EventPage Page of EventInstance */ public function getPage(string $targetUrl): EventPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EventPage($this->version, $response, $this->solution); } /** * Constructs a EventContext * * @param string $sid The SID of the resource to fetch */ public function getContext(string $sid): EventContext { return new EventContext($this->version, $this->solution['workspaceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.EventList]'; } }PKt[7JTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsOptions.phpnu[options['taskChannel'] = $taskChannel; } /** * Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate real-time statistics on this * TaskChannel * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchWorkspaceRealTimeStatisticsOptions ' . $options . ']'; } }PKt[%pW||3Twilio/Rest/Taskrouter/V1/Workspace/TaskContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Tasks/' . \rawurlencode($sid) . ''; } /** * Fetch the TaskInstance * * @return TaskInstance Fetched TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskInstance { $payload = $this->version->fetch('GET', $this->uri); return new TaskInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Update the TaskInstance * * @param array|Options $options Optional Arguments * @return TaskInstance Updated TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskInstance { $options = new Values($options); $data = Values::of([ 'Attributes' => $options['attributes'], 'AssignmentStatus' => $options['assignmentStatus'], 'Reason' => $options['reason'], 'Priority' => $options['priority'], 'TaskChannel' => $options['taskChannel'], ]); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new TaskInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Delete the TaskInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Access the reservations */ protected function getReservations(): ReservationList { if (!$this->_reservations) { $this->_reservations = new ReservationList( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->_reservations; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskContext ' . \implode(' ', $context) . ']'; } }PKt[RD11@Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'reservationStatus' => Values::array_get($payload, 'reservation_status'), 'sid' => Values::array_get($payload, 'sid'), 'taskSid' => Values::array_get($payload, 'task_sid'), 'workerName' => Values::array_get($payload, 'worker_name'), 'workerSid' => Values::array_get($payload, 'worker_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'workspaceSid' => $workspaceSid, 'taskSid' => $taskSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ReservationContext Context for this ReservationInstance */ protected function proxy(): ReservationContext { if (!$this->context) { $this->context = new ReservationContext( $this->version, $this->solution['workspaceSid'], $this->solution['taskSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ReservationInstance * * @return ReservationInstance Fetched ReservationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ReservationInstance { return $this->proxy()->fetch(); } /** * Update the ReservationInstance * * @param array|Options $options Optional Arguments * @return ReservationInstance Updated ReservationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ReservationInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.ReservationInstance ' . \implode(' ', $context) . ']'; } }PKt[a ?Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.phpnu[options['reservationStatus'] = $reservationStatus; $this->options['workerSid'] = $workerSid; } /** * Returns the list of reservations for a task with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, or `timeout`. * * @param string $reservationStatus Returns the list of reservations for a task * with a specified ReservationStatus * @return $this Fluent Builder */ public function setReservationStatus(string $reservationStatus): self { $this->options['reservationStatus'] = $reservationStatus; return $this; } /** * The SID of the reserved Worker resource to read. * * @param string $workerSid The SID of the reserved Worker resource to read * @return $this Fluent Builder */ public function setWorkerSid(string $workerSid): self { $this->options['workerSid'] = $workerSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.ReadReservationOptions ' . $options . ']'; } } class UpdateReservationOptions extends Options { /** * @param string $reservationStatus The new status of the reservation * @param string $workerActivitySid The new worker activity SID if rejecting a * reservation * @param string $instruction The assignment instruction for reservation * @param string $dequeuePostWorkActivitySid The SID of the Activity resource * to start after executing a Dequeue * instruction * @param string $dequeueFrom The Caller ID of the call to the worker when * executing a Dequeue instruction * @param string $dequeueRecord Whether to record both legs of a call when * executing a Dequeue instruction * @param int $dequeueTimeout Timeout for call when executing a Dequeue * instruction * @param string $dequeueTo The Contact URI of the worker when executing a * Dequeue instruction * @param string $dequeueStatusCallbackUrl The Callback URL for completed call * event when executing a Dequeue * instruction * @param string $callFrom The Caller ID of the outbound call when executing a * Call instruction * @param string $callRecord Whether to record both legs of a call when * executing a Call instruction * @param int $callTimeout Timeout for call when executing a Call instruction * @param string $callTo The Contact URI of the worker when executing a Call * instruction * @param string $callUrl TwiML URI executed on answering the worker's leg as a * result of the Call instruction * @param string $callStatusCallbackUrl The URL to call for the completed call * event when executing a Call instruction * @param bool $callAccept Whether to accept a reservation when executing a * Call instruction * @param string $redirectCallSid The Call SID of the call parked in the queue * when executing a Redirect instruction * @param bool $redirectAccept Whether the reservation should be accepted when * executing a Redirect instruction * @param string $redirectUrl TwiML URI to redirect the call to when executing * the Redirect instruction * @param string $to The Contact URI of the worker when executing a Conference * instruction * @param string $from The Caller ID of the call to the worker when executing a * Conference instruction * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param string[] $statusCallbackEvent The call progress events that we will * send to status_callback * @param int $timeout Timeout for call when executing a Conference instruction * @param bool $record Whether to record the participant and their conferences * @param bool $muted Whether to mute the agent * @param string $beep Whether to play a notification beep when the participant * joins * @param bool $startConferenceOnEnter Whether the conference starts when the * participant joins the conference * @param bool $endConferenceOnExit Whether to end the conference when the * agent leaves * @param string $waitUrl URL that hosts pre-conference hold music * @param string $waitMethod The HTTP method we should use to call `wait_url` * @param bool $earlyMedia Whether agents can hear the state of the outbound * call * @param int $maxParticipants The maximum number of agent conference * participants * @param string $conferenceStatusCallback The callback URL for conference * events * @param string $conferenceStatusCallbackMethod HTTP method for requesting * `conference_status_callback` * URL * @param string[] $conferenceStatusCallbackEvent The conference status events * that we will send to * conference_status_callback * @param string $conferenceRecord Whether to record the conference the * participant is joining * @param string $conferenceTrim How to trim leading and trailing silence from * your recorded conference audio files * @param string $recordingChannels Specify `mono` or `dual` recording channels * @param string $recordingStatusCallback The URL that we should call using the * `recording_status_callback_method` * when the recording status changes * @param string $recordingStatusCallbackMethod The HTTP method we should use * when we call * `recording_status_callback` * @param string $conferenceRecordingStatusCallback The URL we should call * using the * `conference_recording_status_callback_method` when the conference recording is available * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we * should use to call * `conference_recording_status_callback` * @param string $region The region where we should mix the conference audio * @param string $sipAuthUsername The SIP username used for authentication * @param string $sipAuthPassword The SIP password for authentication * @param string[] $dequeueStatusCallbackEvent The Call progress events sent * via webhooks as a result of a * Dequeue instruction * @param string $postWorkActivitySid The new worker activity SID after * executing a Conference instruction * @param string $supervisorMode The Supervisor mode when executing the * Supervise instruction * @param string $supervisor The Supervisor SID/URI when executing the * Supervise instruction * @param bool $endConferenceOnCustomerExit Whether to end the conference when * the customer leaves * @param bool $beepOnCustomerEntrance Whether to play a notification beep when * the customer joins * @param string $ifMatch The If-Match HTTP request header */ public function __construct(string $reservationStatus = Values::NONE, string $workerActivitySid = Values::NONE, string $instruction = Values::NONE, string $dequeuePostWorkActivitySid = Values::NONE, string $dequeueFrom = Values::NONE, string $dequeueRecord = Values::NONE, int $dequeueTimeout = Values::NONE, string $dequeueTo = Values::NONE, string $dequeueStatusCallbackUrl = Values::NONE, string $callFrom = Values::NONE, string $callRecord = Values::NONE, int $callTimeout = Values::NONE, string $callTo = Values::NONE, string $callUrl = Values::NONE, string $callStatusCallbackUrl = Values::NONE, bool $callAccept = Values::NONE, string $redirectCallSid = Values::NONE, bool $redirectAccept = Values::NONE, string $redirectUrl = Values::NONE, string $to = Values::NONE, string $from = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, array $statusCallbackEvent = Values::ARRAY_NONE, int $timeout = Values::NONE, bool $record = Values::NONE, bool $muted = Values::NONE, string $beep = Values::NONE, bool $startConferenceOnEnter = Values::NONE, bool $endConferenceOnExit = Values::NONE, string $waitUrl = Values::NONE, string $waitMethod = Values::NONE, bool $earlyMedia = Values::NONE, int $maxParticipants = Values::NONE, string $conferenceStatusCallback = Values::NONE, string $conferenceStatusCallbackMethod = Values::NONE, array $conferenceStatusCallbackEvent = Values::ARRAY_NONE, string $conferenceRecord = Values::NONE, string $conferenceTrim = Values::NONE, string $recordingChannels = Values::NONE, string $recordingStatusCallback = Values::NONE, string $recordingStatusCallbackMethod = Values::NONE, string $conferenceRecordingStatusCallback = Values::NONE, string $conferenceRecordingStatusCallbackMethod = Values::NONE, string $region = Values::NONE, string $sipAuthUsername = Values::NONE, string $sipAuthPassword = Values::NONE, array $dequeueStatusCallbackEvent = Values::ARRAY_NONE, string $postWorkActivitySid = Values::NONE, string $supervisorMode = Values::NONE, string $supervisor = Values::NONE, bool $endConferenceOnCustomerExit = Values::NONE, bool $beepOnCustomerEntrance = Values::NONE, string $ifMatch = Values::NONE) { $this->options['reservationStatus'] = $reservationStatus; $this->options['workerActivitySid'] = $workerActivitySid; $this->options['instruction'] = $instruction; $this->options['dequeuePostWorkActivitySid'] = $dequeuePostWorkActivitySid; $this->options['dequeueFrom'] = $dequeueFrom; $this->options['dequeueRecord'] = $dequeueRecord; $this->options['dequeueTimeout'] = $dequeueTimeout; $this->options['dequeueTo'] = $dequeueTo; $this->options['dequeueStatusCallbackUrl'] = $dequeueStatusCallbackUrl; $this->options['callFrom'] = $callFrom; $this->options['callRecord'] = $callRecord; $this->options['callTimeout'] = $callTimeout; $this->options['callTo'] = $callTo; $this->options['callUrl'] = $callUrl; $this->options['callStatusCallbackUrl'] = $callStatusCallbackUrl; $this->options['callAccept'] = $callAccept; $this->options['redirectCallSid'] = $redirectCallSid; $this->options['redirectAccept'] = $redirectAccept; $this->options['redirectUrl'] = $redirectUrl; $this->options['to'] = $to; $this->options['from'] = $from; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['statusCallbackEvent'] = $statusCallbackEvent; $this->options['timeout'] = $timeout; $this->options['record'] = $record; $this->options['muted'] = $muted; $this->options['beep'] = $beep; $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; $this->options['endConferenceOnExit'] = $endConferenceOnExit; $this->options['waitUrl'] = $waitUrl; $this->options['waitMethod'] = $waitMethod; $this->options['earlyMedia'] = $earlyMedia; $this->options['maxParticipants'] = $maxParticipants; $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; $this->options['conferenceRecord'] = $conferenceRecord; $this->options['conferenceTrim'] = $conferenceTrim; $this->options['recordingChannels'] = $recordingChannels; $this->options['recordingStatusCallback'] = $recordingStatusCallback; $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; $this->options['region'] = $region; $this->options['sipAuthUsername'] = $sipAuthUsername; $this->options['sipAuthPassword'] = $sipAuthPassword; $this->options['dequeueStatusCallbackEvent'] = $dequeueStatusCallbackEvent; $this->options['postWorkActivitySid'] = $postWorkActivitySid; $this->options['supervisorMode'] = $supervisorMode; $this->options['supervisor'] = $supervisor; $this->options['endConferenceOnCustomerExit'] = $endConferenceOnCustomerExit; $this->options['beepOnCustomerEntrance'] = $beepOnCustomerEntrance; $this->options['ifMatch'] = $ifMatch; } /** * The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, or `timeout`. * * @param string $reservationStatus The new status of the reservation * @return $this Fluent Builder */ public function setReservationStatus(string $reservationStatus): self { $this->options['reservationStatus'] = $reservationStatus; return $this; } /** * The new worker activity SID if rejecting a reservation. * * @param string $workerActivitySid The new worker activity SID if rejecting a * reservation * @return $this Fluent Builder */ public function setWorkerActivitySid(string $workerActivitySid): self { $this->options['workerActivitySid'] = $workerActivitySid; return $this; } /** * The assignment instruction for reservation. * * @param string $instruction The assignment instruction for reservation * @return $this Fluent Builder */ public function setInstruction(string $instruction): self { $this->options['instruction'] = $instruction; return $this; } /** * The SID of the Activity resource to start after executing a Dequeue instruction. * * @param string $dequeuePostWorkActivitySid The SID of the Activity resource * to start after executing a Dequeue * instruction * @return $this Fluent Builder */ public function setDequeuePostWorkActivitySid(string $dequeuePostWorkActivitySid): self { $this->options['dequeuePostWorkActivitySid'] = $dequeuePostWorkActivitySid; return $this; } /** * The Caller ID of the call to the worker when executing a Dequeue instruction. * * @param string $dequeueFrom The Caller ID of the call to the worker when * executing a Dequeue instruction * @return $this Fluent Builder */ public function setDequeueFrom(string $dequeueFrom): self { $this->options['dequeueFrom'] = $dequeueFrom; return $this; } /** * Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. * * @param string $dequeueRecord Whether to record both legs of a call when * executing a Dequeue instruction * @return $this Fluent Builder */ public function setDequeueRecord(string $dequeueRecord): self { $this->options['dequeueRecord'] = $dequeueRecord; return $this; } /** * Timeout for call when executing a Dequeue instruction. * * @param int $dequeueTimeout Timeout for call when executing a Dequeue * instruction * @return $this Fluent Builder */ public function setDequeueTimeout(int $dequeueTimeout): self { $this->options['dequeueTimeout'] = $dequeueTimeout; return $this; } /** * The Contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. * * @param string $dequeueTo The Contact URI of the worker when executing a * Dequeue instruction * @return $this Fluent Builder */ public function setDequeueTo(string $dequeueTo): self { $this->options['dequeueTo'] = $dequeueTo; return $this; } /** * The Callback URL for completed call event when executing a Dequeue instruction. * * @param string $dequeueStatusCallbackUrl The Callback URL for completed call * event when executing a Dequeue * instruction * @return $this Fluent Builder */ public function setDequeueStatusCallbackUrl(string $dequeueStatusCallbackUrl): self { $this->options['dequeueStatusCallbackUrl'] = $dequeueStatusCallbackUrl; return $this; } /** * The Caller ID of the outbound call when executing a Call instruction. * * @param string $callFrom The Caller ID of the outbound call when executing a * Call instruction * @return $this Fluent Builder */ public function setCallFrom(string $callFrom): self { $this->options['callFrom'] = $callFrom; return $this; } /** * Whether to record both legs of a call when executing a Call instruction or which leg to record. * * @param string $callRecord Whether to record both legs of a call when * executing a Call instruction * @return $this Fluent Builder */ public function setCallRecord(string $callRecord): self { $this->options['callRecord'] = $callRecord; return $this; } /** * Timeout for call when executing a Call instruction. * * @param int $callTimeout Timeout for call when executing a Call instruction * @return $this Fluent Builder */ public function setCallTimeout(int $callTimeout): self { $this->options['callTimeout'] = $callTimeout; return $this; } /** * The Contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. * * @param string $callTo The Contact URI of the worker when executing a Call * instruction * @return $this Fluent Builder */ public function setCallTo(string $callTo): self { $this->options['callTo'] = $callTo; return $this; } /** * TwiML URI executed on answering the worker's leg as a result of the Call instruction. * * @param string $callUrl TwiML URI executed on answering the worker's leg as a * result of the Call instruction * @return $this Fluent Builder */ public function setCallUrl(string $callUrl): self { $this->options['callUrl'] = $callUrl; return $this; } /** * The URL to call for the completed call event when executing a Call instruction. * * @param string $callStatusCallbackUrl The URL to call for the completed call * event when executing a Call instruction * @return $this Fluent Builder */ public function setCallStatusCallbackUrl(string $callStatusCallbackUrl): self { $this->options['callStatusCallbackUrl'] = $callStatusCallbackUrl; return $this; } /** * Whether to accept a reservation when executing a Call instruction. * * @param bool $callAccept Whether to accept a reservation when executing a * Call instruction * @return $this Fluent Builder */ public function setCallAccept(bool $callAccept): self { $this->options['callAccept'] = $callAccept; return $this; } /** * The Call SID of the call parked in the queue when executing a Redirect instruction. * * @param string $redirectCallSid The Call SID of the call parked in the queue * when executing a Redirect instruction * @return $this Fluent Builder */ public function setRedirectCallSid(string $redirectCallSid): self { $this->options['redirectCallSid'] = $redirectCallSid; return $this; } /** * Whether the reservation should be accepted when executing a Redirect instruction. * * @param bool $redirectAccept Whether the reservation should be accepted when * executing a Redirect instruction * @return $this Fluent Builder */ public function setRedirectAccept(bool $redirectAccept): self { $this->options['redirectAccept'] = $redirectAccept; return $this; } /** * TwiML URI to redirect the call to when executing the Redirect instruction. * * @param string $redirectUrl TwiML URI to redirect the call to when executing * the Redirect instruction * @return $this Fluent Builder */ public function setRedirectUrl(string $redirectUrl): self { $this->options['redirectUrl'] = $redirectUrl; return $this; } /** * The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. * * @param string $to The Contact URI of the worker when executing a Conference * instruction * @return $this Fluent Builder */ public function setTo(string $to): self { $this->options['to'] = $to; return $this; } /** * The Caller ID of the call to the worker when executing a Conference instruction. * * @param string $from The Caller ID of the call to the worker when executing a * Conference instruction * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`. * * @param string[] $statusCallbackEvent The call progress events that we will * send to status_callback * @return $this Fluent Builder */ public function setStatusCallbackEvent(array $statusCallbackEvent): self { $this->options['statusCallbackEvent'] = $statusCallbackEvent; return $this; } /** * Timeout for call when executing a Conference instruction. * * @param int $timeout Timeout for call when executing a Conference instruction * @return $this Fluent Builder */ public function setTimeout(int $timeout): self { $this->options['timeout'] = $timeout; return $this; } /** * Whether to record the participant and their conferences, including the time between conferences. The default is `false`. * * @param bool $record Whether to record the participant and their conferences * @return $this Fluent Builder */ public function setRecord(bool $record): self { $this->options['record'] = $record; return $this; } /** * Whether the agent is muted in the conference. The default is `false`. * * @param bool $muted Whether to mute the agent * @return $this Fluent Builder */ public function setMuted(bool $muted): self { $this->options['muted'] = $muted; return $this; } /** * Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. * * @param string $beep Whether to play a notification beep when the participant * joins * @return $this Fluent Builder */ public function setBeep(string $beep): self { $this->options['beep'] = $beep; return $this; } /** * Whether to start the conference when the participant joins, if it has not already started. The default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. * * @param bool $startConferenceOnEnter Whether the conference starts when the * participant joins the conference * @return $this Fluent Builder */ public function setStartConferenceOnEnter(bool $startConferenceOnEnter): self { $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; return $this; } /** * Whether to end the conference when the agent leaves. * * @param bool $endConferenceOnExit Whether to end the conference when the * agent leaves * @return $this Fluent Builder */ public function setEndConferenceOnExit(bool $endConferenceOnExit): self { $this->options['endConferenceOnExit'] = $endConferenceOnExit; return $this; } /** * The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * * @param string $waitUrl URL that hosts pre-conference hold music * @return $this Fluent Builder */ public function setWaitUrl(string $waitUrl): self { $this->options['waitUrl'] = $waitUrl; return $this; } /** * The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. * * @param string $waitMethod The HTTP method we should use to call `wait_url` * @return $this Fluent Builder */ public function setWaitMethod(string $waitMethod): self { $this->options['waitMethod'] = $waitMethod; return $this; } /** * Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`. * * @param bool $earlyMedia Whether agents can hear the state of the outbound * call * @return $this Fluent Builder */ public function setEarlyMedia(bool $earlyMedia): self { $this->options['earlyMedia'] = $earlyMedia; return $this; } /** * The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. * * @param int $maxParticipants The maximum number of agent conference * participants * @return $this Fluent Builder */ public function setMaxParticipants(int $maxParticipants): self { $this->options['maxParticipants'] = $maxParticipants; return $this; } /** * The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. * * @param string $conferenceStatusCallback The callback URL for conference * events * @return $this Fluent Builder */ public function setConferenceStatusCallback(string $conferenceStatusCallback): self { $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; return $this; } /** * The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $conferenceStatusCallbackMethod HTTP method for requesting * `conference_status_callback` * URL * @return $this Fluent Builder */ public function setConferenceStatusCallbackMethod(string $conferenceStatusCallbackMethod): self { $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; return $this; } /** * The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`. * * @param string[] $conferenceStatusCallbackEvent The conference status events * that we will send to * conference_status_callback * @return $this Fluent Builder */ public function setConferenceStatusCallbackEvent(array $conferenceStatusCallbackEvent): self { $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; return $this; } /** * Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. * * @param string $conferenceRecord Whether to record the conference the * participant is joining * @return $this Fluent Builder */ public function setConferenceRecord(string $conferenceRecord): self { $this->options['conferenceRecord'] = $conferenceRecord; return $this; } /** * How to trim the leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. * * @param string $conferenceTrim How to trim leading and trailing silence from * your recorded conference audio files * @return $this Fluent Builder */ public function setConferenceTrim(string $conferenceTrim): self { $this->options['conferenceTrim'] = $conferenceTrim; return $this; } /** * The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. * * @param string $recordingChannels Specify `mono` or `dual` recording channels * @return $this Fluent Builder */ public function setRecordingChannels(string $recordingChannels): self { $this->options['recordingChannels'] = $recordingChannels; return $this; } /** * The URL that we should call using the `recording_status_callback_method` when the recording status changes. * * @param string $recordingStatusCallback The URL that we should call using the * `recording_status_callback_method` * when the recording status changes * @return $this Fluent Builder */ public function setRecordingStatusCallback(string $recordingStatusCallback): self { $this->options['recordingStatusCallback'] = $recordingStatusCallback; return $this; } /** * The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $recordingStatusCallbackMethod The HTTP method we should use * when we call * `recording_status_callback` * @return $this Fluent Builder */ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self { $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; return $this; } /** * The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. * * @param string $conferenceRecordingStatusCallback The URL we should call * using the * `conference_recording_status_callback_method` when the conference recording is available * @return $this Fluent Builder */ public function setConferenceRecordingStatusCallback(string $conferenceRecordingStatusCallback): self { $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; return $this; } /** * The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we * should use to call * `conference_recording_status_callback` * @return $this Fluent Builder */ public function setConferenceRecordingStatusCallbackMethod(string $conferenceRecordingStatusCallbackMethod): self { $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; return $this; } /** * The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. * * @param string $region The region where we should mix the conference audio * @return $this Fluent Builder */ public function setRegion(string $region): self { $this->options['region'] = $region; return $this; } /** * The SIP username used for authentication. * * @param string $sipAuthUsername The SIP username used for authentication * @return $this Fluent Builder */ public function setSipAuthUsername(string $sipAuthUsername): self { $this->options['sipAuthUsername'] = $sipAuthUsername; return $this; } /** * The SIP password for authentication. * * @param string $sipAuthPassword The SIP password for authentication * @return $this Fluent Builder */ public function setSipAuthPassword(string $sipAuthPassword): self { $this->options['sipAuthPassword'] = $sipAuthPassword; return $this; } /** * The Call progress events sent via webhooks as a result of a Dequeue instruction. * * @param string[] $dequeueStatusCallbackEvent The Call progress events sent * via webhooks as a result of a * Dequeue instruction * @return $this Fluent Builder */ public function setDequeueStatusCallbackEvent(array $dequeueStatusCallbackEvent): self { $this->options['dequeueStatusCallbackEvent'] = $dequeueStatusCallbackEvent; return $this; } /** * The new worker activity SID after executing a Conference instruction. * * @param string $postWorkActivitySid The new worker activity SID after * executing a Conference instruction * @return $this Fluent Builder */ public function setPostWorkActivitySid(string $postWorkActivitySid): self { $this->options['postWorkActivitySid'] = $postWorkActivitySid; return $this; } /** * The Supervisor mode when executing the Supervise instruction. * * @param string $supervisorMode The Supervisor mode when executing the * Supervise instruction * @return $this Fluent Builder */ public function setSupervisorMode(string $supervisorMode): self { $this->options['supervisorMode'] = $supervisorMode; return $this; } /** * The Supervisor SID/URI when executing the Supervise instruction. * * @param string $supervisor The Supervisor SID/URI when executing the * Supervise instruction * @return $this Fluent Builder */ public function setSupervisor(string $supervisor): self { $this->options['supervisor'] = $supervisor; return $this; } /** * Whether to end the conference when the customer leaves. * * @param bool $endConferenceOnCustomerExit Whether to end the conference when * the customer leaves * @return $this Fluent Builder */ public function setEndConferenceOnCustomerExit(bool $endConferenceOnCustomerExit): self { $this->options['endConferenceOnCustomerExit'] = $endConferenceOnCustomerExit; return $this; } /** * Whether to play a notification beep when the customer joins. * * @param bool $beepOnCustomerEntrance Whether to play a notification beep when * the customer joins * @return $this Fluent Builder */ public function setBeepOnCustomerEntrance(bool $beepOnCustomerEntrance): self { $this->options['beepOnCustomerEntrance'] = $beepOnCustomerEntrance; return $this; } /** * The If-Match HTTP request header * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.UpdateReservationOptions ' . $options . ']'; } }PKt[2A22<Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationList.phpnu[solution = ['workspaceSid' => $workspaceSid, 'taskSid' => $taskSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Reservations'; } /** * Streams ReservationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ReservationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ReservationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ReservationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ReservationPage Page of ReservationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ReservationPage { $options = new Values($options); $params = Values::of([ 'ReservationStatus' => $options['reservationStatus'], 'WorkerSid' => $options['workerSid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ReservationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ReservationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ReservationPage Page of ReservationInstance */ public function getPage(string $targetUrl): ReservationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ReservationPage($this->version, $response, $this->solution); } /** * Constructs a ReservationContext * * @param string $sid The SID of the TaskReservation resource to fetch */ public function getContext(string $sid): ReservationContext { return new ReservationContext( $this->version, $this->solution['workspaceSid'], $this->solution['taskSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.ReservationList]'; } }PKt[ɖ922<Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ReservationInstance \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationInstance */ public function buildInstance(array $payload): ReservationInstance { return new ReservationInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.ReservationPage]'; } }PKt[]?Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'taskSid' => $taskSid, 'sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Reservations/' . \rawurlencode($sid) . ''; } /** * Fetch the ReservationInstance * * @return ReservationInstance Fetched ReservationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ReservationInstance { $payload = $this->version->fetch('GET', $this->uri); return new ReservationInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskSid'], $this->solution['sid'] ); } /** * Update the ReservationInstance * * @param array|Options $options Optional Arguments * @return ReservationInstance Updated ReservationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ReservationInstance { $options = new Values($options); $data = Values::of([ 'ReservationStatus' => $options['reservationStatus'], 'WorkerActivitySid' => $options['workerActivitySid'], 'Instruction' => $options['instruction'], 'DequeuePostWorkActivitySid' => $options['dequeuePostWorkActivitySid'], 'DequeueFrom' => $options['dequeueFrom'], 'DequeueRecord' => $options['dequeueRecord'], 'DequeueTimeout' => $options['dequeueTimeout'], 'DequeueTo' => $options['dequeueTo'], 'DequeueStatusCallbackUrl' => $options['dequeueStatusCallbackUrl'], 'CallFrom' => $options['callFrom'], 'CallRecord' => $options['callRecord'], 'CallTimeout' => $options['callTimeout'], 'CallTo' => $options['callTo'], 'CallUrl' => $options['callUrl'], 'CallStatusCallbackUrl' => $options['callStatusCallbackUrl'], 'CallAccept' => Serialize::booleanToString($options['callAccept']), 'RedirectCallSid' => $options['redirectCallSid'], 'RedirectAccept' => Serialize::booleanToString($options['redirectAccept']), 'RedirectUrl' => $options['redirectUrl'], 'To' => $options['to'], 'From' => $options['from'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function($e) { return $e; }), 'Timeout' => $options['timeout'], 'Record' => Serialize::booleanToString($options['record']), 'Muted' => Serialize::booleanToString($options['muted']), 'Beep' => $options['beep'], 'StartConferenceOnEnter' => Serialize::booleanToString($options['startConferenceOnEnter']), 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']), 'WaitUrl' => $options['waitUrl'], 'WaitMethod' => $options['waitMethod'], 'EarlyMedia' => Serialize::booleanToString($options['earlyMedia']), 'MaxParticipants' => $options['maxParticipants'], 'ConferenceStatusCallback' => $options['conferenceStatusCallback'], 'ConferenceStatusCallbackMethod' => $options['conferenceStatusCallbackMethod'], 'ConferenceStatusCallbackEvent' => Serialize::map($options['conferenceStatusCallbackEvent'], function($e) { return $e; }), 'ConferenceRecord' => $options['conferenceRecord'], 'ConferenceTrim' => $options['conferenceTrim'], 'RecordingChannels' => $options['recordingChannels'], 'RecordingStatusCallback' => $options['recordingStatusCallback'], 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'], 'ConferenceRecordingStatusCallback' => $options['conferenceRecordingStatusCallback'], 'ConferenceRecordingStatusCallbackMethod' => $options['conferenceRecordingStatusCallbackMethod'], 'Region' => $options['region'], 'SipAuthUsername' => $options['sipAuthUsername'], 'SipAuthPassword' => $options['sipAuthPassword'], 'DequeueStatusCallbackEvent' => Serialize::map($options['dequeueStatusCallbackEvent'], function($e) { return $e; }), 'PostWorkActivitySid' => $options['postWorkActivitySid'], 'SupervisorMode' => $options['supervisorMode'], 'Supervisor' => $options['supervisor'], 'EndConferenceOnCustomerExit' => Serialize::booleanToString($options['endConferenceOnCustomerExit']), 'BeepOnCustomerEntrance' => Serialize::booleanToString($options['beepOnCustomerEntrance']), ]); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new ReservationInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.ReservationContext ' . \implode(' ', $context) . ']'; } }PKt[p6Twilio/Rest/Taskrouter/V1/Workspace/WorkerInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'activityName' => Values::array_get($payload, 'activity_name'), 'activitySid' => Values::array_get($payload, 'activity_sid'), 'attributes' => Values::array_get($payload, 'attributes'), 'available' => Values::array_get($payload, 'available'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateStatusChanged' => Deserialize::dateTime(Values::array_get($payload, 'date_status_changed')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkerContext Context for this WorkerInstance */ protected function proxy(): WorkerContext { if (!$this->context) { $this->context = new WorkerContext( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the WorkerInstance * * @return WorkerInstance Fetched WorkerInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WorkerInstance { return $this->proxy()->fetch(); } /** * Update the WorkerInstance * * @param array|Options $options Optional Arguments * @return WorkerInstance Updated WorkerInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WorkerInstance { return $this->proxy()->update($options); } /** * Delete the WorkerInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Access the realTimeStatistics */ protected function getRealTimeStatistics(): WorkersRealTimeStatisticsList { return $this->proxy()->realTimeStatistics; } /** * Access the cumulativeStatistics */ protected function getCumulativeStatistics(): WorkersCumulativeStatisticsList { return $this->proxy()->cumulativeStatistics; } /** * Access the statistics */ protected function getStatistics(): WorkerStatisticsList { return $this->proxy()->statistics; } /** * Access the reservations */ protected function getReservations(): ReservationList { return $this->proxy()->reservations; } /** * Access the workerChannels */ protected function getWorkerChannels(): WorkerChannelList { return $this->proxy()->workerChannels; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkerInstance ' . \implode(' ', $context) . ']'; } }PKt[nrsii?Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; } /** * Constructs a WorkspaceStatisticsContext */ public function getContext(): WorkspaceStatisticsContext { return new WorkspaceStatisticsContext($this->version, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkspaceStatisticsList]'; } }PKt[4Twilio/Rest/Taskrouter/V1/Workspace/ActivityPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ActivityInstance \Twilio\Rest\Taskrouter\V1\Workspace\ActivityInstance */ public function buildInstance(array $payload): ActivityInstance { return new ActivityInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.ActivityPage]'; } }PKt[mgllITwilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkspaceCumulativeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsInstance */ public function buildInstance(array $payload): WorkspaceCumulativeStatisticsInstance { return new WorkspaceCumulativeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsPage]'; } }PKt[S3AAKTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'activityStatistics' => Values::array_get($payload, 'activity_statistics'), 'longestTaskWaitingAge' => Values::array_get($payload, 'longest_task_waiting_age'), 'longestTaskWaitingSid' => Values::array_get($payload, 'longest_task_waiting_sid'), 'tasksByPriority' => Values::array_get($payload, 'tasks_by_priority'), 'tasksByStatus' => Values::array_get($payload, 'tasks_by_status'), 'totalTasks' => Values::array_get($payload, 'total_tasks'), 'totalWorkers' => Values::array_get($payload, 'total_workers'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkspaceRealTimeStatisticsContext Context for this * WorkspaceRealTimeStatisticsInstance */ protected function proxy(): WorkspaceRealTimeStatisticsContext { if (!$this->context) { $this->context = new WorkspaceRealTimeStatisticsContext( $this->version, $this->solution['workspaceSid'] ); } return $this->context; } /** * Fetch the WorkspaceRealTimeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkspaceRealTimeStatisticsInstance Fetched * WorkspaceRealTimeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkspaceRealTimeStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkspaceRealTimeStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[MTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'avgTaskAcceptanceTime' => Values::array_get($payload, 'avg_task_acceptance_time'), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'reservationsCreated' => Values::array_get($payload, 'reservations_created'), 'reservationsAccepted' => Values::array_get($payload, 'reservations_accepted'), 'reservationsRejected' => Values::array_get($payload, 'reservations_rejected'), 'reservationsTimedOut' => Values::array_get($payload, 'reservations_timed_out'), 'reservationsCanceled' => Values::array_get($payload, 'reservations_canceled'), 'reservationsRescinded' => Values::array_get($payload, 'reservations_rescinded'), 'splitByWaitTime' => Values::array_get($payload, 'split_by_wait_time'), 'waitDurationUntilAccepted' => Values::array_get($payload, 'wait_duration_until_accepted'), 'waitDurationUntilCanceled' => Values::array_get($payload, 'wait_duration_until_canceled'), 'tasksCanceled' => Values::array_get($payload, 'tasks_canceled'), 'tasksCompleted' => Values::array_get($payload, 'tasks_completed'), 'tasksCreated' => Values::array_get($payload, 'tasks_created'), 'tasksDeleted' => Values::array_get($payload, 'tasks_deleted'), 'tasksMoved' => Values::array_get($payload, 'tasks_moved'), 'tasksTimedOutInWorkflow' => Values::array_get($payload, 'tasks_timed_out_in_workflow'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkspaceCumulativeStatisticsContext Context for this * WorkspaceCumulativeStatisticsInstance */ protected function proxy(): WorkspaceCumulativeStatisticsContext { if (!$this->context) { $this->context = new WorkspaceCumulativeStatisticsContext( $this->version, $this->solution['workspaceSid'] ); } return $this->context; } /** * Fetch the WorkspaceCumulativeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkspaceCumulativeStatisticsInstance Fetched * WorkspaceCumulativeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkspaceCumulativeStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[[]1Twilio/Rest/Taskrouter/V1/Workspace/EventPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EventInstance \Twilio\Rest\Taskrouter\V1\Workspace\EventInstance */ public function buildInstance(array $payload): EventInstance { return new EventInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.EventPage]'; } }PKt[224Twilio/Rest/Taskrouter/V1/Workspace/ActivityList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Activities'; } /** * Streams ActivityInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ActivityInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ActivityInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ActivityInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ActivityPage Page of ActivityInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ActivityPage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Available' => $options['available'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ActivityPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ActivityInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ActivityPage Page of ActivityInstance */ public function getPage(string $targetUrl): ActivityPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ActivityPage($this->version, $response, $this->solution); } /** * Create the ActivityInstance * * @param string $friendlyName A string to describe the Activity resource * @param array|Options $options Optional Arguments * @return ActivityInstance Created ActivityInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): ActivityInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Available' => Serialize::booleanToString($options['available']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ActivityInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Constructs a ActivityContext * * @param string $sid The SID of the resource to fetch */ public function getContext(string $sid): ActivityContext { return new ActivityContext($this->version, $this->solution['workspaceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.ActivityList]'; } }PKt[&6DD5Twilio/Rest/Taskrouter/V1/Workspace/WorkerContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($sid) . ''; } /** * Fetch the WorkerInstance * * @return WorkerInstance Fetched WorkerInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WorkerInstance { $payload = $this->version->fetch('GET', $this->uri); return new WorkerInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Update the WorkerInstance * * @param array|Options $options Optional Arguments * @return WorkerInstance Updated WorkerInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WorkerInstance { $options = new Values($options); $data = Values::of([ 'ActivitySid' => $options['activitySid'], 'Attributes' => $options['attributes'], 'FriendlyName' => $options['friendlyName'], 'RejectPendingReservations' => Serialize::booleanToString($options['rejectPendingReservations']), ]); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new WorkerInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Delete the WorkerInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Access the realTimeStatistics */ protected function getRealTimeStatistics(): WorkersRealTimeStatisticsList { if (!$this->_realTimeStatistics) { $this->_realTimeStatistics = new WorkersRealTimeStatisticsList( $this->version, $this->solution['workspaceSid'] ); } return $this->_realTimeStatistics; } /** * Access the cumulativeStatistics */ protected function getCumulativeStatistics(): WorkersCumulativeStatisticsList { if (!$this->_cumulativeStatistics) { $this->_cumulativeStatistics = new WorkersCumulativeStatisticsList( $this->version, $this->solution['workspaceSid'] ); } return $this->_cumulativeStatistics; } /** * Access the statistics */ protected function getStatistics(): WorkerStatisticsList { if (!$this->_statistics) { $this->_statistics = new WorkerStatisticsList( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->_statistics; } /** * Access the reservations */ protected function getReservations(): ReservationList { if (!$this->_reservations) { $this->_reservations = new ReservationList( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->_reservations; } /** * Access the workerChannels */ protected function getWorkerChannels(): WorkerChannelList { if (!$this->_workerChannels) { $this->_workerChannels = new WorkerChannelList( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->_workerChannels; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkerContext ' . \implode(' ', $context) . ']'; } }PKt[!5Twilio/Rest/Taskrouter/V1/Workspace/TaskQueuePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskQueueInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueInstance */ public function buildInstance(array $payload): TaskQueueInstance { return new TaskQueueInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueuePage]'; } }PKt[74Twilio/Rest/Taskrouter/V1/Workspace/TaskInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'age' => Values::array_get($payload, 'age'), 'assignmentStatus' => Values::array_get($payload, 'assignment_status'), 'attributes' => Values::array_get($payload, 'attributes'), 'addons' => Values::array_get($payload, 'addons'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'taskQueueEnteredDate' => Deserialize::dateTime(Values::array_get($payload, 'task_queue_entered_date')), 'priority' => Values::array_get($payload, 'priority'), 'reason' => Values::array_get($payload, 'reason'), 'sid' => Values::array_get($payload, 'sid'), 'taskQueueSid' => Values::array_get($payload, 'task_queue_sid'), 'taskQueueFriendlyName' => Values::array_get($payload, 'task_queue_friendly_name'), 'taskChannelSid' => Values::array_get($payload, 'task_channel_sid'), 'taskChannelUniqueName' => Values::array_get($payload, 'task_channel_unique_name'), 'timeout' => Values::array_get($payload, 'timeout'), 'workflowSid' => Values::array_get($payload, 'workflow_sid'), 'workflowFriendlyName' => Values::array_get($payload, 'workflow_friendly_name'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskContext Context for this TaskInstance */ protected function proxy(): TaskContext { if (!$this->context) { $this->context = new TaskContext( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TaskInstance * * @return TaskInstance Fetched TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskInstance { return $this->proxy()->fetch(); } /** * Update the TaskInstance * * @param array|Options $options Optional Arguments * @return TaskInstance Updated TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskInstance { return $this->proxy()->update($options); } /** * Delete the TaskInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Access the reservations */ protected function getReservations(): ReservationList { return $this->proxy()->reservations; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskInstance ' . \implode(' ', $context) . ']'; } }PKt[7@##;Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'channelOptimizedRouting' => Values::array_get($payload, 'channel_optimized_routing'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskChannelContext Context for this TaskChannelInstance */ protected function proxy(): TaskChannelContext { if (!$this->context) { $this->context = new TaskChannelContext( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TaskChannelInstance * * @return TaskChannelInstance Fetched TaskChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskChannelInstance { return $this->proxy()->fetch(); } /** * Update the TaskChannelInstance * * @param array|Options $options Optional Arguments * @return TaskChannelInstance Updated TaskChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskChannelInstance { return $this->proxy()->update($options); } /** * Delete the TaskChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[G2Twilio/Rest/Taskrouter/V1/Workspace/WorkerList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers'; } /** * Streams WorkerInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WorkerInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WorkerInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of WorkerInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WorkerPage Page of WorkerInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WorkerPage { $options = new Values($options); $params = Values::of([ 'ActivityName' => $options['activityName'], 'ActivitySid' => $options['activitySid'], 'Available' => $options['available'], 'FriendlyName' => $options['friendlyName'], 'TargetWorkersExpression' => $options['targetWorkersExpression'], 'TaskQueueName' => $options['taskQueueName'], 'TaskQueueSid' => $options['taskQueueSid'], 'Ordering' => $options['ordering'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WorkerPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WorkerInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WorkerPage Page of WorkerInstance */ public function getPage(string $targetUrl): WorkerPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WorkerPage($this->version, $response, $this->solution); } /** * Create the WorkerInstance * * @param string $friendlyName A string to describe the resource * @param array|Options $options Optional Arguments * @return WorkerInstance Created WorkerInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): WorkerInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'ActivitySid' => $options['activitySid'], 'Attributes' => $options['attributes'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WorkerInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Access the statistics */ protected function getStatistics(): WorkersStatisticsList { if (!$this->_statistics) { $this->_statistics = new WorkersStatisticsList($this->version, $this->solution['workspaceSid']); } return $this->_statistics; } /** * Constructs a WorkerContext * * @param string $sid The SID of the resource to fetch */ public function getContext(string $sid): WorkerContext { return new WorkerContext($this->version, $this->solution['workspaceSid'], $sid); } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkerList]'; } }PKt[FPP8Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues/' . \rawurlencode($sid) . ''; } /** * Fetch the TaskQueueInstance * * @return TaskQueueInstance Fetched TaskQueueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskQueueInstance { $payload = $this->version->fetch('GET', $this->uri); return new TaskQueueInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Update the TaskQueueInstance * * @param array|Options $options Optional Arguments * @return TaskQueueInstance Updated TaskQueueInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskQueueInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'TargetWorkers' => $options['targetWorkers'], 'ReservationActivitySid' => $options['reservationActivitySid'], 'AssignmentActivitySid' => $options['assignmentActivitySid'], 'MaxReservedWorkers' => $options['maxReservedWorkers'], 'TaskOrder' => $options['taskOrder'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TaskQueueInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Delete the TaskQueueInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the statistics */ protected function getStatistics(): TaskQueueStatisticsList { if (!$this->_statistics) { $this->_statistics = new TaskQueueStatisticsList( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->_statistics; } /** * Access the realTimeStatistics */ protected function getRealTimeStatistics(): TaskQueueRealTimeStatisticsList { if (!$this->_realTimeStatistics) { $this->_realTimeStatistics = new TaskQueueRealTimeStatisticsList( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->_realTimeStatistics; } /** * Access the cumulativeStatistics */ protected function getCumulativeStatistics(): TaskQueueCumulativeStatisticsList { if (!$this->_cumulativeStatistics) { $this->_cumulativeStatistics = new TaskQueueCumulativeStatisticsList( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->_cumulativeStatistics; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskQueueContext ' . \implode(' ', $context) . ']'; } }PKt[&JDu??8Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['targetWorkers'] = $targetWorkers; $this->options['reservationActivitySid'] = $reservationActivitySid; $this->options['assignmentActivitySid'] = $assignmentActivitySid; $this->options['maxReservedWorkers'] = $maxReservedWorkers; $this->options['taskOrder'] = $taskOrder; } /** * A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '"language" == "spanish"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below. * * @param string $targetWorkers A string describing the Worker selection * criteria for any Tasks that enter the TaskQueue * @return $this Fluent Builder */ public function setTargetWorkers(string $targetWorkers): self { $this->options['targetWorkers'] = $targetWorkers; return $this; } /** * The SID of the Activity to assign Workers when a task is reserved for them. * * @param string $reservationActivitySid The SID of the Activity to assign * Workers when a task is reserved for * them * @return $this Fluent Builder */ public function setReservationActivitySid(string $reservationActivitySid): self { $this->options['reservationActivitySid'] = $reservationActivitySid; return $this; } /** * The SID of the Activity to assign Workers when a task is assigned for them. * * @param string $assignmentActivitySid The SID of the Activity to assign * Workers when a task is assigned for them * @return $this Fluent Builder */ public function setAssignmentActivitySid(string $assignmentActivitySid): self { $this->options['assignmentActivitySid'] = $assignmentActivitySid; return $this; } /** * The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50. * * @param int $maxReservedWorkers The maximum number of Workers to create * reservations for the assignment of a task * while in the queue * @return $this Fluent Builder */ public function setMaxReservedWorkers(int $maxReservedWorkers): self { $this->options['maxReservedWorkers'] = $maxReservedWorkers; return $this; } /** * How Tasks will be assigned to Workers. Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the oldest task first and `LIFO` to assign the most recent task first. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo). * * @param string $taskOrder How Tasks will be assigned to Workers * @return $this Fluent Builder */ public function setTaskOrder(string $taskOrder): self { $this->options['taskOrder'] = $taskOrder; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.UpdateTaskQueueOptions ' . $options . ']'; } } class ReadTaskQueueOptions extends Options { /** * @param string $friendlyName The friendly_name of the TaskQueue resources to * read * @param string $evaluateWorkerAttributes The attributes of the Workers to read * @param string $workerSid The SID of the Worker with the TaskQueue resources * to read * @param string $ordering Sorting parameter for TaskQueues */ public function __construct(string $friendlyName = Values::NONE, string $evaluateWorkerAttributes = Values::NONE, string $workerSid = Values::NONE, string $ordering = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['evaluateWorkerAttributes'] = $evaluateWorkerAttributes; $this->options['workerSid'] = $workerSid; $this->options['ordering'] = $ordering; } /** * The `friendly_name` of the TaskQueue resources to read. * * @param string $friendlyName The friendly_name of the TaskQueue resources to * read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The attributes of the Workers to read. Returns the TaskQueues with Workers that match the attributes specified in this parameter. * * @param string $evaluateWorkerAttributes The attributes of the Workers to read * @return $this Fluent Builder */ public function setEvaluateWorkerAttributes(string $evaluateWorkerAttributes): self { $this->options['evaluateWorkerAttributes'] = $evaluateWorkerAttributes; return $this; } /** * The SID of the Worker with the TaskQueue resources to read. * * @param string $workerSid The SID of the Worker with the TaskQueue resources * to read * @return $this Fluent Builder */ public function setWorkerSid(string $workerSid): self { $this->options['workerSid'] = $workerSid; return $this; } /** * Sorting parameter for TaskQueues * * @param string $ordering Sorting parameter for TaskQueues * @return $this Fluent Builder */ public function setOrdering(string $ordering): self { $this->options['ordering'] = $ordering; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.ReadTaskQueueOptions ' . $options . ']'; } } class CreateTaskQueueOptions extends Options { /** * @param string $targetWorkers A string describing the Worker selection * criteria for any Tasks that enter the TaskQueue * @param int $maxReservedWorkers The maximum number of Workers to reserve * @param string $taskOrder How Tasks will be assigned to Workers * @param string $reservationActivitySid The SID of the Activity to assign * Workers when a task is reserved for * them * @param string $assignmentActivitySid The SID of the Activity to assign * Workers once a task is assigned to them */ public function __construct(string $targetWorkers = Values::NONE, int $maxReservedWorkers = Values::NONE, string $taskOrder = Values::NONE, string $reservationActivitySid = Values::NONE, string $assignmentActivitySid = Values::NONE) { $this->options['targetWorkers'] = $targetWorkers; $this->options['maxReservedWorkers'] = $maxReservedWorkers; $this->options['taskOrder'] = $taskOrder; $this->options['reservationActivitySid'] = $reservationActivitySid; $this->options['assignmentActivitySid'] = $assignmentActivitySid; } /** * A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'"language" == "spanish"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers). * * @param string $targetWorkers A string describing the Worker selection * criteria for any Tasks that enter the TaskQueue * @return $this Fluent Builder */ public function setTargetWorkers(string $targetWorkers): self { $this->options['targetWorkers'] = $targetWorkers; return $this; } /** * The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1. * * @param int $maxReservedWorkers The maximum number of Workers to reserve * @return $this Fluent Builder */ public function setMaxReservedWorkers(int $maxReservedWorkers): self { $this->options['maxReservedWorkers'] = $maxReservedWorkers; return $this; } /** * How Tasks will be assigned to Workers. Set this parameter to `LIFO` to assign most recently created Task first or FIFO to assign the oldest Task first. Default is `FIFO`. [Click here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo) to learn more. * * @param string $taskOrder How Tasks will be assigned to Workers * @return $this Fluent Builder */ public function setTaskOrder(string $taskOrder): self { $this->options['taskOrder'] = $taskOrder; return $this; } /** * The SID of the Activity to assign Workers when a task is reserved for them. * * @param string $reservationActivitySid The SID of the Activity to assign * Workers when a task is reserved for * them * @return $this Fluent Builder */ public function setReservationActivitySid(string $reservationActivitySid): self { $this->options['reservationActivitySid'] = $reservationActivitySid; return $this; } /** * The SID of the Activity to assign Workers when a task is assigned to them. * * @param string $assignmentActivitySid The SID of the Activity to assign * Workers once a task is assigned to them * @return $this Fluent Builder */ public function setAssignmentActivitySid(string $assignmentActivitySid): self { $this->options['assignmentActivitySid'] = $assignmentActivitySid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.CreateTaskQueueOptions ' . $options . ']'; } }PKt[iITwilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; } /** * Constructs a WorkspaceCumulativeStatisticsContext */ public function getContext(): WorkspaceCumulativeStatisticsContext { return new WorkspaceCumulativeStatisticsContext($this->version, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsList]'; } }PKt[Xi!!4Twilio/Rest/Taskrouter/V1/Workspace/EventOptions.phpnu[options['endDate'] = $endDate; $this->options['eventType'] = $eventType; $this->options['minutes'] = $minutes; $this->options['reservationSid'] = $reservationSid; $this->options['startDate'] = $startDate; $this->options['taskQueueSid'] = $taskQueueSid; $this->options['taskSid'] = $taskSid; $this->options['workerSid'] = $workerSid; $this->options['workflowSid'] = $workflowSid; $this->options['taskChannel'] = $taskChannel; $this->options['sid'] = $sid; } /** * Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * The type of Events to read. Returns only Events of the type specified. * * @param string $eventType The type of Events to read * @return $this Fluent Builder */ public function setEventType(string $eventType): self { $this->options['eventType'] = $eventType; return $this; } /** * The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted. * * @param int $minutes The period of events to read in minutes * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation. * * @param string $reservationSid The SID of the Reservation with the Events to * read * @return $this Fluent Builder */ public function setReservationSid(string $reservationSid): self { $this->options['reservationSid'] = $reservationSid; return $this; } /** * Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted. * * @param \DateTime $startDate Only include Events from on or after this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue. * * @param string $taskQueueSid The SID of the TaskQueue with the Events to read * @return $this Fluent Builder */ public function setTaskQueueSid(string $taskQueueSid): self { $this->options['taskQueueSid'] = $taskQueueSid; return $this; } /** * The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task. * * @param string $taskSid The SID of the Task with the Events to read * @return $this Fluent Builder */ public function setTaskSid(string $taskSid): self { $this->options['taskSid'] = $taskSid; return $this; } /** * The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker. * * @param string $workerSid The SID of the Worker with the Events to read * @return $this Fluent Builder */ public function setWorkerSid(string $workerSid): self { $this->options['workerSid'] = $workerSid; return $this; } /** * The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow. * * @param string $workflowSid The SID of the Worker with the Events to read * @return $this Fluent Builder */ public function setWorkflowSid(string $workflowSid): self { $this->options['workflowSid'] = $workflowSid; return $this; } /** * The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel. * * @param string $taskChannel The TaskChannel with the Events to read * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * The SID of the Event resource to read. * * @param string $sid The unique string that identifies the resource * @return $this Fluent Builder */ public function setSid(string $sid): self { $this->options['sid'] = $sid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.ReadEventOptions ' . $options . ']'; } }PKt[3X4Twilio/Rest/Taskrouter/V1/Workspace/EventContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Events/' . \rawurlencode($sid) . ''; } /** * Fetch the EventInstance * * @return EventInstance Fetched EventInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EventInstance { $payload = $this->version->fetch('GET', $this->uri); return new EventInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.EventContext ' . \implode(' ', $context) . ']'; } }PKt[ԊBTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Statistics'; } /** * Fetch the WorkspaceStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkspaceStatisticsInstance Fetched WorkspaceStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkspaceStatisticsInstance { $options = new Values($options); $params = Values::of([ 'Minutes' => $options['minutes'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'TaskChannel' => $options['taskChannel'], 'SplitByWaitTime' => $options['splitByWaitTime'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new WorkspaceStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkspaceStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[J@h4Twilio/Rest/Taskrouter/V1/Workspace/WorkflowList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workflows'; } /** * Streams WorkflowInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WorkflowInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WorkflowInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of WorkflowInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WorkflowPage Page of WorkflowInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WorkflowPage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WorkflowPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WorkflowInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WorkflowPage Page of WorkflowInstance */ public function getPage(string $targetUrl): WorkflowPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WorkflowPage($this->version, $response, $this->solution); } /** * Create the WorkflowInstance * * @param string $friendlyName descriptive string that you create to describe * the Workflow resource * @param string $configuration A JSON string that contains the rules to apply * to the Workflow * @param array|Options $options Optional Arguments * @return WorkflowInstance Created WorkflowInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $configuration, array $options = []): WorkflowInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Configuration' => $configuration, 'AssignmentCallbackUrl' => $options['assignmentCallbackUrl'], 'FallbackAssignmentCallbackUrl' => $options['fallbackAssignmentCallbackUrl'], 'TaskReservationTimeout' => $options['taskReservationTimeout'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WorkflowInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Constructs a WorkflowContext * * @param string $sid The SID of the resource */ public function getContext(string $sid): WorkflowContext { return new WorkflowContext($this->version, $this->solution['workspaceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkflowList]'; } }PKt[G%QQ3Twilio/Rest/Taskrouter/V1/Workspace/TaskOptions.phpnu[options['attributes'] = $attributes; $this->options['assignmentStatus'] = $assignmentStatus; $this->options['reason'] = $reason; $this->options['priority'] = $priority; $this->options['taskChannel'] = $taskChannel; $this->options['ifMatch'] = $ifMatch; } /** * The JSON string that describes the custom attributes of the task. * * @param string $attributes The JSON string that describes the custom * attributes of the task * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The new status of the task. Can be: `canceled`, to cancel a Task that is currently `pending` or `reserved`; `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to the completed state. * * @param string $assignmentStatus The new status of the task * @return $this Fluent Builder */ public function setAssignmentStatus(string $assignmentStatus): self { $this->options['assignmentStatus'] = $assignmentStatus; return $this; } /** * The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason. * * @param string $reason The reason that the Task was canceled or complete * @return $this Fluent Builder */ public function setReason(string $reason): self { $this->options['reason'] = $reason; return $this; } /** * The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647). * * @param int $priority The Task's new priority value * @return $this Fluent Builder */ public function setPriority(int $priority): self { $this->options['priority'] = $priority; return $this; } /** * When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel When MultiTasking is enabled, specify the * TaskChannel with the task to update * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * If provided, applies this mutation if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.UpdateTaskOptions ' . $options . ']'; } } class DeleteTaskOptions extends Options { /** * @param string $ifMatch The If-Match HTTP request header */ public function __construct(string $ifMatch = Values::NONE) { $this->options['ifMatch'] = $ifMatch; } /** * If provided, deletes this Task if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.DeleteTaskOptions ' . $options . ']'; } } class ReadTaskOptions extends Options { /** * @param int $priority The priority value of the Tasks to read * @param string[] $assignmentStatus Returns the list of all Tasks in the * Workspace with the specified * assignment_status * @param string $workflowSid The SID of the Workflow with the Tasks to read * @param string $workflowName The friendly name of the Workflow with the Tasks * to read * @param string $taskQueueSid The SID of the TaskQueue with the Tasks to read * @param string $taskQueueName The friendly_name of the TaskQueue with the * Tasks to read * @param string $evaluateTaskAttributes The task attributes of the Tasks to * read * @param string $ordering Controls the order of the Tasks returned * @param bool $hasAddons Whether to read Tasks with addons */ public function __construct(int $priority = Values::NONE, array $assignmentStatus = Values::ARRAY_NONE, string $workflowSid = Values::NONE, string $workflowName = Values::NONE, string $taskQueueSid = Values::NONE, string $taskQueueName = Values::NONE, string $evaluateTaskAttributes = Values::NONE, string $ordering = Values::NONE, bool $hasAddons = Values::NONE) { $this->options['priority'] = $priority; $this->options['assignmentStatus'] = $assignmentStatus; $this->options['workflowSid'] = $workflowSid; $this->options['workflowName'] = $workflowName; $this->options['taskQueueSid'] = $taskQueueSid; $this->options['taskQueueName'] = $taskQueueName; $this->options['evaluateTaskAttributes'] = $evaluateTaskAttributes; $this->options['ordering'] = $ordering; $this->options['hasAddons'] = $hasAddons; } /** * The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority. * * @param int $priority The priority value of the Tasks to read * @return $this Fluent Builder */ public function setPriority(int $priority): self { $this->options['priority'] = $priority; return $this; } /** * The `assignment_status` of the Tasks you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`. * * @param string[] $assignmentStatus Returns the list of all Tasks in the * Workspace with the specified * assignment_status * @return $this Fluent Builder */ public function setAssignmentStatus(array $assignmentStatus): self { $this->options['assignmentStatus'] = $assignmentStatus; return $this; } /** * The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID. * * @param string $workflowSid The SID of the Workflow with the Tasks to read * @return $this Fluent Builder */ public function setWorkflowSid(string $workflowSid): self { $this->options['workflowSid'] = $workflowSid; return $this; } /** * The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name. * * @param string $workflowName The friendly name of the Workflow with the Tasks * to read * @return $this Fluent Builder */ public function setWorkflowName(string $workflowName): self { $this->options['workflowName'] = $workflowName; return $this; } /** * The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID. * * @param string $taskQueueSid The SID of the TaskQueue with the Tasks to read * @return $this Fluent Builder */ public function setTaskQueueSid(string $taskQueueSid): self { $this->options['taskQueueSid'] = $taskQueueSid; return $this; } /** * The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name. * * @param string $taskQueueName The friendly_name of the TaskQueue with the * Tasks to read * @return $this Fluent Builder */ public function setTaskQueueName(string $taskQueueName): self { $this->options['taskQueueName'] = $taskQueueName; return $this; } /** * The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. * * @param string $evaluateTaskAttributes The task attributes of the Tasks to * read * @return $this Fluent Builder */ public function setEvaluateTaskAttributes(string $evaluateTaskAttributes): self { $this->options['evaluateTaskAttributes'] = $evaluateTaskAttributes; return $this; } /** * How to order the returned Task resources. y default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Multiple sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. * * @param string $ordering Controls the order of the Tasks returned * @return $this Fluent Builder */ public function setOrdering(string $ordering): self { $this->options['ordering'] = $ordering; return $this; } /** * Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. * * @param bool $hasAddons Whether to read Tasks with addons * @return $this Fluent Builder */ public function setHasAddons(bool $hasAddons): self { $this->options['hasAddons'] = $hasAddons; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.ReadTaskOptions ' . $options . ']'; } } class CreateTaskOptions extends Options { /** * @param int $timeout The amount of time in seconds the task can live before * being assigned * @param int $priority The priority to assign the new task and override the * default * @param string $taskChannel When MultiTasking is enabled specify the * TaskChannel by passing either its unique_name or * SID * @param string $workflowSid The SID of the Workflow that you would like to * handle routing for the new Task * @param string $attributes A URL-encoded JSON string describing the * attributes of the task */ public function __construct(int $timeout = Values::NONE, int $priority = Values::NONE, string $taskChannel = Values::NONE, string $workflowSid = Values::NONE, string $attributes = Values::NONE) { $this->options['timeout'] = $timeout; $this->options['priority'] = $priority; $this->options['taskChannel'] = $taskChannel; $this->options['workflowSid'] = $workflowSid; $this->options['attributes'] = $attributes; } /** * The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`. * * @param int $timeout The amount of time in seconds the task can live before * being assigned * @return $this Fluent Builder */ public function setTimeout(int $timeout): self { $this->options['timeout'] = $timeout; return $this; } /** * The priority to assign the new task and override the default. When supplied, the new Task will have this priority unless it matches a Workflow Target with a Priority set. When not supplied, the new Task will have the priority of the matching Workflow Target. Value can be 0 to 2^31^ (2,147,483,647). * * @param int $priority The priority to assign the new task and override the * default * @return $this Fluent Builder */ public function setPriority(int $priority): self { $this->options['priority'] = $priority; return $this; } /** * When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`. * * @param string $taskChannel When MultiTasking is enabled specify the * TaskChannel by passing either its unique_name or * SID * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional. * * @param string $workflowSid The SID of the Workflow that you would like to * handle routing for the new Task * @return $this Fluent Builder */ public function setWorkflowSid(string $workflowSid): self { $this->options['workflowSid'] = $workflowSid; return $this; } /** * A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ "task_type": "call", "twilio_call_sid": "CAxxx", "customer_ticket_number": "12345" }`. * * @param string $attributes A URL-encoded JSON string describing the * attributes of the task * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.CreateTaskOptions ' . $options . ']'; } }PKt[_  8Twilio/Rest/Taskrouter/V1/Workspace/WorkflowInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assignmentCallbackUrl' => Values::array_get($payload, 'assignment_callback_url'), 'configuration' => Values::array_get($payload, 'configuration'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'documentContentType' => Values::array_get($payload, 'document_content_type'), 'fallbackAssignmentCallbackUrl' => Values::array_get($payload, 'fallback_assignment_callback_url'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'taskReservationTimeout' => Values::array_get($payload, 'task_reservation_timeout'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkflowContext Context for this WorkflowInstance */ protected function proxy(): WorkflowContext { if (!$this->context) { $this->context = new WorkflowContext( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the WorkflowInstance * * @return WorkflowInstance Fetched WorkflowInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WorkflowInstance { return $this->proxy()->fetch(); } /** * Update the WorkflowInstance * * @param array|Options $options Optional Arguments * @return WorkflowInstance Updated WorkflowInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WorkflowInstance { return $this->proxy()->update($options); } /** * Delete the WorkflowInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the statistics */ protected function getStatistics(): WorkflowStatisticsList { return $this->proxy()->statistics; } /** * Access the realTimeStatistics */ protected function getRealTimeStatistics(): WorkflowRealTimeStatisticsList { return $this->proxy()->realTimeStatistics; } /** * Access the cumulativeStatistics */ protected function getCumulativeStatistics(): WorkflowCumulativeStatisticsList { return $this->proxy()->cumulativeStatistics; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkflowInstance ' . \implode(' ', $context) . ']'; } }PKt[Q(NN8Twilio/Rest/Taskrouter/V1/Workspace/ActivityInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'available' => Values::array_get($payload, 'available'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ActivityContext Context for this ActivityInstance */ protected function proxy(): ActivityContext { if (!$this->context) { $this->context = new ActivityContext( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ActivityInstance * * @return ActivityInstance Fetched ActivityInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ActivityInstance { return $this->proxy()->fetch(); } /** * Update the ActivityInstance * * @param array|Options $options Optional Arguments * @return ActivityInstance Updated ActivityInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ActivityInstance { return $this->proxy()->update($options); } /** * Delete the ActivityInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.ActivityInstance ' . \implode(' ', $context) . ']'; } }PKt[/;;BTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsOptions.phpnu[options['minutes'] = $minutes; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['taskChannel'] = $taskChannel; $this->options['splitByWaitTime'] = $splitByWaitTime; } /** * Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. * * @param int $minutes Only calculate statistics since this many minutes in the * past * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only calculate statistics from on or after this * date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * * @param \DateTime $endDate Only calculate statistics from this date and time * and earlier * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate statistics on this TaskChannel. * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. * * @param string $splitByWaitTime A comma separated list of values that * describes the thresholds to calculate * statistics on * @return $this Fluent Builder */ public function setSplitByWaitTime(string $splitByWaitTime): self { $this->options['splitByWaitTime'] = $splitByWaitTime; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchWorkspaceStatisticsOptions ' . $options . ']'; } }PKt[ :Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskChannels/' . \rawurlencode($sid) . ''; } /** * Fetch the TaskChannelInstance * * @return TaskChannelInstance Fetched TaskChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new TaskChannelInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Update the TaskChannelInstance * * @param array|Options $options Optional Arguments * @return TaskChannelInstance Updated TaskChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskChannelInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'ChannelOptimizedRouting' => Serialize::booleanToString($options['channelOptimizedRouting']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TaskChannelInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Delete the TaskChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.TaskChannelContext ' . \implode(' ', $context) . ']'; } }PKt[cKJJ7Twilio/Rest/Taskrouter/V1/Workspace/WorkflowContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workflows/' . \rawurlencode($sid) . ''; } /** * Fetch the WorkflowInstance * * @return WorkflowInstance Fetched WorkflowInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WorkflowInstance { $payload = $this->version->fetch('GET', $this->uri); return new WorkflowInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Update the WorkflowInstance * * @param array|Options $options Optional Arguments * @return WorkflowInstance Updated WorkflowInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WorkflowInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'AssignmentCallbackUrl' => $options['assignmentCallbackUrl'], 'FallbackAssignmentCallbackUrl' => $options['fallbackAssignmentCallbackUrl'], 'Configuration' => $options['configuration'], 'TaskReservationTimeout' => $options['taskReservationTimeout'], 'ReEvaluateTasks' => $options['reEvaluateTasks'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WorkflowInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Delete the WorkflowInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the statistics */ protected function getStatistics(): WorkflowStatisticsList { if (!$this->_statistics) { $this->_statistics = new WorkflowStatisticsList( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->_statistics; } /** * Access the realTimeStatistics */ protected function getRealTimeStatistics(): WorkflowRealTimeStatisticsList { if (!$this->_realTimeStatistics) { $this->_realTimeStatistics = new WorkflowRealTimeStatisticsList( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->_realTimeStatistics; } /** * Access the cumulativeStatistics */ protected function getCumulativeStatistics(): WorkflowCumulativeStatisticsList { if (!$this->_cumulativeStatistics) { $this->_cumulativeStatistics = new WorkflowCumulativeStatisticsList( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->_cumulativeStatistics; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkflowContext ' . \implode(' ', $context) . ']'; } }PKt[KTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'cumulative' => Values::array_get($payload, 'cumulative'), 'realtime' => Values::array_get($payload, 'realtime'), 'workflowSid' => Values::array_get($payload, 'workflow_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkflowStatisticsContext Context for this WorkflowStatisticsInstance */ protected function proxy(): WorkflowStatisticsContext { if (!$this->context) { $this->context = new WorkflowStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } return $this->context; } /** * Fetch the WorkflowStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkflowStatisticsInstance Fetched WorkflowStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkflowStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkflowStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[X!!RTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsOptions.phpnu[options['taskChannel'] = $taskChannel; } /** * Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate real-time statistics on this * TaskChannel * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchWorkflowRealTimeStatisticsOptions ' . $options . ']'; } }PKt[Un! TTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workflows/' . \rawurlencode($workflowSid) . '/CumulativeStatistics'; } /** * Fetch the WorkflowCumulativeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkflowCumulativeStatisticsInstance Fetched * WorkflowCumulativeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkflowCumulativeStatisticsInstance { $options = new Values($options); $params = Values::of([ 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'Minutes' => $options['minutes'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'TaskChannel' => $options['taskChannel'], 'SplitByWaitTime' => $options['splitByWaitTime'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new WorkflowCumulativeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkflowCumulativeStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[+nllTTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsOptions.phpnu[options['endDate'] = $endDate; $this->options['minutes'] = $minutes; $this->options['startDate'] = $startDate; $this->options['taskChannel'] = $taskChannel; $this->options['splitByWaitTime'] = $splitByWaitTime; } /** * Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. * * @param int $minutes Only calculate statistics since this many minutes in the * past * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only calculate statistics from on or after this * date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate cumulative statistics on this * TaskChannel * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate statistics on up to 10,000 Tasks for any given threshold. * * @param string $splitByWaitTime A comma separated list of values that * describes the thresholds, in seconds, to * calculate statistics on * @return $this Fluent Builder */ public function setSplitByWaitTime(string $splitByWaitTime): self { $this->options['splitByWaitTime'] = $splitByWaitTime; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchWorkflowCumulativeStatisticsOptions ' . $options . ']'; } }PKt[g{]$$OTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ]; } /** * Constructs a WorkflowRealTimeStatisticsContext */ public function getContext(): WorkflowRealTimeStatisticsContext { return new WorkflowRealTimeStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsList]'; } }PKt[OTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkflowRealTimeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsInstance */ public function buildInstance(array $payload): WorkflowRealTimeStatisticsInstance { return new WorkflowRealTimeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsPage]'; } }PKt[UTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'avgTaskAcceptanceTime' => Values::array_get($payload, 'avg_task_acceptance_time'), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'reservationsCreated' => Values::array_get($payload, 'reservations_created'), 'reservationsAccepted' => Values::array_get($payload, 'reservations_accepted'), 'reservationsRejected' => Values::array_get($payload, 'reservations_rejected'), 'reservationsTimedOut' => Values::array_get($payload, 'reservations_timed_out'), 'reservationsCanceled' => Values::array_get($payload, 'reservations_canceled'), 'reservationsRescinded' => Values::array_get($payload, 'reservations_rescinded'), 'splitByWaitTime' => Values::array_get($payload, 'split_by_wait_time'), 'waitDurationUntilAccepted' => Values::array_get($payload, 'wait_duration_until_accepted'), 'waitDurationUntilCanceled' => Values::array_get($payload, 'wait_duration_until_canceled'), 'tasksCanceled' => Values::array_get($payload, 'tasks_canceled'), 'tasksCompleted' => Values::array_get($payload, 'tasks_completed'), 'tasksEntered' => Values::array_get($payload, 'tasks_entered'), 'tasksDeleted' => Values::array_get($payload, 'tasks_deleted'), 'tasksMoved' => Values::array_get($payload, 'tasks_moved'), 'tasksTimedOutInWorkflow' => Values::array_get($payload, 'tasks_timed_out_in_workflow'), 'workflowSid' => Values::array_get($payload, 'workflow_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkflowCumulativeStatisticsContext Context for this * WorkflowCumulativeStatisticsInstance */ protected function proxy(): WorkflowCumulativeStatisticsContext { if (!$this->context) { $this->context = new WorkflowCumulativeStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } return $this->context; } /** * Fetch the WorkflowCumulativeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkflowCumulativeStatisticsInstance Fetched * WorkflowCumulativeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkflowCumulativeStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkflowCumulativeStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[=n< < JTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workflows/' . \rawurlencode($workflowSid) . '/Statistics'; } /** * Fetch the WorkflowStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkflowStatisticsInstance Fetched WorkflowStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkflowStatisticsInstance { $options = new Values($options); $params = Values::of([ 'Minutes' => $options['minutes'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'TaskChannel' => $options['taskChannel'], 'SplitByWaitTime' => $options['splitByWaitTime'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new WorkflowStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkflowStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[z RTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workflows/' . \rawurlencode($workflowSid) . '/RealTimeStatistics'; } /** * Fetch the WorkflowRealTimeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkflowRealTimeStatisticsInstance Fetched * WorkflowRealTimeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkflowRealTimeStatisticsInstance { $options = new Values($options); $params = Values::of(['TaskChannel' => $options['taskChannel'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new WorkflowRealTimeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[QTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkflowCumulativeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsInstance */ public function buildInstance(array $payload): WorkflowCumulativeStatisticsInstance { return new WorkflowCumulativeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkflowCumulativeStatisticsPage]'; } }PKt[w&&STwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'longestTaskWaitingAge' => Values::array_get($payload, 'longest_task_waiting_age'), 'longestTaskWaitingSid' => Values::array_get($payload, 'longest_task_waiting_sid'), 'tasksByPriority' => Values::array_get($payload, 'tasks_by_priority'), 'tasksByStatus' => Values::array_get($payload, 'tasks_by_status'), 'totalTasks' => Values::array_get($payload, 'total_tasks'), 'workflowSid' => Values::array_get($payload, 'workflow_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkflowRealTimeStatisticsContext Context for this * WorkflowRealTimeStatisticsInstance */ protected function proxy(): WorkflowRealTimeStatisticsContext { if (!$this->context) { $this->context = new WorkflowRealTimeStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } return $this->context; } /** * Fetch the WorkflowRealTimeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkflowRealTimeStatisticsInstance Fetched * WorkflowRealTimeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkflowRealTimeStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[ݵJTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsOptions.phpnu[options['minutes'] = $minutes; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['taskChannel'] = $taskChannel; $this->options['splitByWaitTime'] = $splitByWaitTime; } /** * Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. * * @param int $minutes Only calculate statistics since this many minutes in the * past * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only calculate statistics from on or after this * date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * * @param \DateTime $endDate Only calculate statistics from this date and time * and earlier * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate real-time statistics on this * TaskChannel. * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. * * @param string $splitByWaitTime A comma separated list of values that * describes the thresholds to calculate * statistics on * @return $this Fluent Builder */ public function setSplitByWaitTime(string $splitByWaitTime): self { $this->options['splitByWaitTime'] = $splitByWaitTime; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchWorkflowStatisticsOptions ' . $options . ']'; } }PKt[k ,00QTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ]; } /** * Constructs a WorkflowCumulativeStatisticsContext */ public function getContext(): WorkflowCumulativeStatisticsContext { return new WorkflowCumulativeStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkflowCumulativeStatisticsList]'; } }PKt[X!GTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ]; } /** * Constructs a WorkflowStatisticsContext */ public function getContext(): WorkflowStatisticsContext { return new WorkflowStatisticsContext( $this->version, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkflowStatisticsList]'; } }PKt[ hhGTwilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkflowStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsInstance */ public function buildInstance(array $payload): WorkflowStatisticsInstance { return new WorkflowStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['workflowSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkflowStatisticsPage]'; } }PKt[5Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues'; } /** * Streams TaskQueueInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TaskQueueInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TaskQueueInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TaskQueueInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TaskQueuePage Page of TaskQueueInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TaskQueuePage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'EvaluateWorkerAttributes' => $options['evaluateWorkerAttributes'], 'WorkerSid' => $options['workerSid'], 'Ordering' => $options['ordering'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TaskQueuePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TaskQueueInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TaskQueuePage Page of TaskQueueInstance */ public function getPage(string $targetUrl): TaskQueuePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TaskQueuePage($this->version, $response, $this->solution); } /** * Create the TaskQueueInstance * * @param string $friendlyName A string to describe the resource * @param array|Options $options Optional Arguments * @return TaskQueueInstance Created TaskQueueInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): TaskQueueInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'TargetWorkers' => $options['targetWorkers'], 'MaxReservedWorkers' => $options['maxReservedWorkers'], 'TaskOrder' => $options['taskOrder'], 'ReservationActivitySid' => $options['reservationActivitySid'], 'AssignmentActivitySid' => $options['assignmentActivitySid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TaskQueueInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Access the statistics */ protected function getStatistics(): TaskQueuesStatisticsList { if (!$this->_statistics) { $this->_statistics = new TaskQueuesStatisticsList($this->version, $this->solution['workspaceSid']); } return $this->_statistics; } /** * Constructs a TaskQueueContext * * @param string $sid The SID of the resource to */ public function getContext(string $sid): TaskQueueContext { return new TaskQueueContext($this->version, $this->solution['workspaceSid'], $sid); } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskQueueList]'; } }PKt[h5Twilio/Rest/Taskrouter/V1/Workspace/EventInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'actorSid' => Values::array_get($payload, 'actor_sid'), 'actorType' => Values::array_get($payload, 'actor_type'), 'actorUrl' => Values::array_get($payload, 'actor_url'), 'description' => Values::array_get($payload, 'description'), 'eventData' => Values::array_get($payload, 'event_data'), 'eventDate' => Deserialize::dateTime(Values::array_get($payload, 'event_date')), 'eventDateMs' => Values::array_get($payload, 'event_date_ms'), 'eventType' => Values::array_get($payload, 'event_type'), 'resourceSid' => Values::array_get($payload, 'resource_sid'), 'resourceType' => Values::array_get($payload, 'resource_type'), 'resourceUrl' => Values::array_get($payload, 'resource_url'), 'sid' => Values::array_get($payload, 'sid'), 'source' => Values::array_get($payload, 'source'), 'sourceIpAddress' => Values::array_get($payload, 'source_ip_address'), 'url' => Values::array_get($payload, 'url'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), ]; $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EventContext Context for this EventInstance */ protected function proxy(): EventContext { if (!$this->context) { $this->context = new EventContext( $this->version, $this->solution['workspaceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the EventInstance * * @return EventInstance Fetched EventInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EventInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.EventInstance ' . \implode(' ', $context) . ']'; } }PKt[0Twilio/Rest/Taskrouter/V1/Workspace/TaskList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Tasks'; } /** * Streams TaskInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TaskInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TaskInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TaskInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TaskPage Page of TaskInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TaskPage { $options = new Values($options); $params = Values::of([ 'Priority' => $options['priority'], 'AssignmentStatus' => Serialize::map($options['assignmentStatus'], function($e) { return $e; }), 'WorkflowSid' => $options['workflowSid'], 'WorkflowName' => $options['workflowName'], 'TaskQueueSid' => $options['taskQueueSid'], 'TaskQueueName' => $options['taskQueueName'], 'EvaluateTaskAttributes' => $options['evaluateTaskAttributes'], 'Ordering' => $options['ordering'], 'HasAddons' => Serialize::booleanToString($options['hasAddons']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TaskPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TaskInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TaskPage Page of TaskInstance */ public function getPage(string $targetUrl): TaskPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TaskPage($this->version, $response, $this->solution); } /** * Create the TaskInstance * * @param array|Options $options Optional Arguments * @return TaskInstance Created TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): TaskInstance { $options = new Values($options); $data = Values::of([ 'Timeout' => $options['timeout'], 'Priority' => $options['priority'], 'TaskChannel' => $options['taskChannel'], 'WorkflowSid' => $options['workflowSid'], 'Attributes' => $options['attributes'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TaskInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Constructs a TaskContext * * @param string $sid The SID of the resource to fetch */ public function getContext(string $sid): TaskContext { return new TaskContext($this->version, $this->solution['workspaceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskList]'; } }PKt[ы iiLTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsOptions.phpnu[options['endDate'] = $endDate; $this->options['minutes'] = $minutes; $this->options['startDate'] = $startDate; $this->options['taskChannel'] = $taskChannel; $this->options['splitByWaitTime'] = $splitByWaitTime; } /** * Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. * * @param int $minutes Only calculate statistics since this many minutes in the * past * @return $this Fluent Builder */ public function setMinutes(int $minutes): self { $this->options['minutes'] = $minutes; return $this; } /** * Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only calculate statistics from on or after this * date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. * * @param string $taskChannel Only calculate cumulative statistics on this * TaskChannel * @return $this Fluent Builder */ public function setTaskChannel(string $taskChannel): self { $this->options['taskChannel'] = $taskChannel; return $this; } /** * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate statistics on up to 10,000 Tasks for any given threshold. * * @param string $splitByWaitTime A comma separated list of values that * describes the thresholds, in seconds, to * calculate statistics on * @return $this Fluent Builder */ public function setSplitByWaitTime(string $splitByWaitTime): self { $this->options['splitByWaitTime'] = $splitByWaitTime; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.FetchWorkspaceCumulativeStatisticsOptions ' . $options . ']'; } }PKt[m4$ 7Twilio/Rest/Taskrouter/V1/Workspace/ActivityContext.phpnu[solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Activities/' . \rawurlencode($sid) . ''; } /** * Fetch the ActivityInstance * * @return ActivityInstance Fetched ActivityInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ActivityInstance { $payload = $this->version->fetch('GET', $this->uri); return new ActivityInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Update the ActivityInstance * * @param array|Options $options Optional Arguments * @return ActivityInstance Updated ActivityInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ActivityInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ActivityInstance( $this->version, $payload, $this->solution['workspaceSid'], $this->solution['sid'] ); } /** * Delete the ActivityInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.ActivityContext ' . \implode(' ', $context) . ']'; } }PKt[G G LTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/CumulativeStatistics'; } /** * Fetch the WorkspaceCumulativeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkspaceCumulativeStatisticsInstance Fetched * WorkspaceCumulativeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkspaceCumulativeStatisticsInstance { $options = new Values($options); $params = Values::of([ 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'Minutes' => $options['minutes'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'TaskChannel' => $options['taskChannel'], 'SplitByWaitTime' => $options['splitByWaitTime'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new WorkspaceCumulativeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[Z)GTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; } /** * Constructs a WorkspaceRealTimeStatisticsContext */ public function getContext(): WorkspaceRealTimeStatisticsContext { return new WorkspaceRealTimeStatisticsContext($this->version, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkspaceRealTimeStatisticsList]'; } }PKt[m``GTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkspaceRealTimeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsInstance */ public function buildInstance(array $payload): WorkspaceRealTimeStatisticsInstance { return new WorkspaceRealTimeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkspaceRealTimeStatisticsPage]'; } }PKt[,O7Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelList.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskChannels'; } /** * Streams TaskChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TaskChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TaskChannelInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of TaskChannelInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TaskChannelPage Page of TaskChannelInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TaskChannelPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TaskChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TaskChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TaskChannelPage Page of TaskChannelInstance */ public function getPage(string $targetUrl): TaskChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TaskChannelPage($this->version, $response, $this->solution); } /** * Create the TaskChannelInstance * * @param string $friendlyName A string to describe the Task Channel resource * @param string $uniqueName An application-defined string that uniquely * identifies the Task Channel * @param array|Options $options Optional Arguments * @return TaskChannelInstance Created TaskChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $uniqueName, array $options = []): TaskChannelInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'UniqueName' => $uniqueName, 'ChannelOptimizedRouting' => Serialize::booleanToString($options['channelOptimizedRouting']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TaskChannelInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Constructs a TaskChannelContext * * @param string $sid The SID of the Task Channel resource to fetch */ public function getContext(string $sid): TaskChannelContext { return new TaskChannelContext($this->version, $this->solution['workspaceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskChannelList]'; } }PKt[d1:Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['channelOptimizedRouting'] = $channelOptimizedRouting; } /** * A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the Task Channel resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. * * @param bool $channelOptimizedRouting Whether the TaskChannel should * prioritize Workers that have been idle * @return $this Fluent Builder */ public function setChannelOptimizedRouting(bool $channelOptimizedRouting): self { $this->options['channelOptimizedRouting'] = $channelOptimizedRouting; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.UpdateTaskChannelOptions ' . $options . ']'; } } class CreateTaskChannelOptions extends Options { /** * @param bool $channelOptimizedRouting Whether the Task Channel should * prioritize Workers that have been idle */ public function __construct(bool $channelOptimizedRouting = Values::NONE) { $this->options['channelOptimizedRouting'] = $channelOptimizedRouting; } /** * Whether the Task Channel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. * * @param bool $channelOptimizedRouting Whether the Task Channel should * prioritize Workers that have been idle * @return $this Fluent Builder */ public function setChannelOptimizedRouting(bool $channelOptimizedRouting): self { $this->options['channelOptimizedRouting'] = $channelOptimizedRouting; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Taskrouter.V1.CreateTaskChannelOptions ' . $options . ']'; } }PKt[:0Twilio/Rest/Taskrouter/V1/Workspace/TaskPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskInstance */ public function buildInstance(array $payload): TaskInstance { return new TaskInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskPage]'; } }PKt[p[7Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskChannelInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelInstance */ public function buildInstance(array $payload): TaskChannelInstance { return new TaskChannelInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.TaskChannelPage]'; } }PKt[GAJTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsContext.phpnu[solution = ['workspaceSid' => $workspaceSid, ]; $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/RealTimeStatistics'; } /** * Fetch the WorkspaceRealTimeStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkspaceRealTimeStatisticsInstance Fetched * WorkspaceRealTimeStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkspaceRealTimeStatisticsInstance { $options = new Values($options); $params = Values::of(['TaskChannel' => $options['taskChannel'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new WorkspaceRealTimeStatisticsInstance( $this->version, $payload, $this->solution['workspaceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkspaceRealTimeStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[ΐK CTwilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsInstance.phpnu[properties = [ 'realtime' => Values::array_get($payload, 'realtime'), 'cumulative' => Values::array_get($payload, 'cumulative'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'workspaceSid' => Values::array_get($payload, 'workspace_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['workspaceSid' => $workspaceSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WorkspaceStatisticsContext Context for this * WorkspaceStatisticsInstance */ protected function proxy(): WorkspaceStatisticsContext { if (!$this->context) { $this->context = new WorkspaceStatisticsContext($this->version, $this->solution['workspaceSid']); } return $this->context; } /** * Fetch the WorkspaceStatisticsInstance * * @param array|Options $options Optional Arguments * @return WorkspaceStatisticsInstance Fetched WorkspaceStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): WorkspaceStatisticsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Taskrouter.V1.WorkspaceStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[_4Twilio/Rest/Taskrouter/V1/Workspace/WorkflowPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WorkflowInstance \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowInstance */ public function buildInstance(array $payload): WorkflowInstance { return new WorkflowInstance($this->version, $payload, $this->solution['workspaceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1.WorkflowPage]'; } }PKt[vTwilio/Rest/Taskrouter/V1.phpnu[version = 'v1'; } protected function getWorkspaces(): WorkspaceList { if (!$this->_workspaces) { $this->_workspaces = new WorkspaceList($this); } return $this->_workspaces; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter.V1]'; } }PKt[T  Twilio/Rest/Numbers.phpnu[baseUrl = 'https://numbers.twilio.com'; } /** * @return V2 Version v2 of numbers */ protected function getV2(): V2 { if (!$this->_v2) { $this->_v2 = new V2($this); } return $this->_v2; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getRegulatoryCompliance(): \Twilio\Rest\Numbers\V2\RegulatoryComplianceList { return $this->v2->regulatoryCompliance; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers]'; } }PKt[(Twilio/Rest/Pricing/V1/MessagingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MessagingInstance \Twilio\Rest\Pricing\V1\MessagingInstance */ public function buildInstance(array $payload): MessagingInstance { return new MessagingInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.MessagingPage]'; } }PKt[m 6Twilio/Rest/Pricing/V1/PhoneNumber/CountryInstance.phpnu[properties = [ 'country' => Values::array_get($payload, 'country'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'phoneNumberPrices' => Values::array_get($payload, 'phone_number_prices'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['isoCountry' => $isoCountry ?: $this->properties['isoCountry'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CountryContext Context for this CountryInstance */ protected function proxy(): CountryContext { if (!$this->context) { $this->context = new CountryContext($this->version, $this->solution['isoCountry']); } return $this->context; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V1.CountryInstance ' . \implode(' ', $context) . ']'; } }PKt[t2Twilio/Rest/Pricing/V1/PhoneNumber/CountryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CountryInstance \Twilio\Rest\Pricing\V1\PhoneNumber\CountryInstance */ public function buildInstance(array $payload): CountryInstance { return new CountryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.CountryPage]'; } }PKt[L5Twilio/Rest/Pricing/V1/PhoneNumber/CountryContext.phpnu[solution = ['isoCountry' => $isoCountry, ]; $this->uri = '/PhoneNumbers/Countries/' . \rawurlencode($isoCountry) . ''; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { $payload = $this->version->fetch('GET', $this->uri); return new CountryInstance($this->version, $payload, $this->solution['isoCountry']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V1.CountryContext ' . \implode(' ', $context) . ']'; } }PKt[R2Twilio/Rest/Pricing/V1/PhoneNumber/CountryList.phpnu[solution = []; $this->uri = '/PhoneNumbers/Countries'; } /** * Streams CountryInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CountryInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CountryInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CountryInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CountryPage Page of CountryInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CountryPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CountryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CountryInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CountryPage Page of CountryInstance */ public function getPage(string $targetUrl): CountryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CountryPage($this->version, $response, $this->solution); } /** * Constructs a CountryContext * * @param string $isoCountry The ISO country code */ public function getContext(string $isoCountry): CountryContext { return new CountryContext($this->version, $isoCountry); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.CountryList]'; } }PKt[ғ) $Twilio/Rest/Pricing/V1/VoiceList.phpnu[solution = []; } /** * Access the numbers */ protected function getNumbers(): NumberList { if (!$this->_numbers) { $this->_numbers = new NumberList($this->version); } return $this->_numbers; } /** * Access the countries */ protected function getCountries(): CountryList { if (!$this->_countries) { $this->_countries = new CountryList($this->version); } return $this->_countries; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.VoiceList]'; } }PKt[rKX X (Twilio/Rest/Pricing/V1/MessagingList.phpnu[solution = []; } /** * Access the countries */ protected function getCountries(): CountryList { if (!$this->_countries) { $this->_countries = new CountryList($this->version); } return $this->_countries; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.MessagingList]'; } }PKt[䡔*Twilio/Rest/Pricing/V1/PhoneNumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PhoneNumberInstance \Twilio\Rest\Pricing\V1\PhoneNumberInstance */ public function buildInstance(array $payload): PhoneNumberInstance { return new PhoneNumberInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.PhoneNumberPage]'; } }PKt[Ez 4Twilio/Rest/Pricing/V1/Messaging/CountryInstance.phpnu[properties = [ 'country' => Values::array_get($payload, 'country'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'outboundSmsPrices' => Values::array_get($payload, 'outbound_sms_prices'), 'inboundSmsPrices' => Values::array_get($payload, 'inbound_sms_prices'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['isoCountry' => $isoCountry ?: $this->properties['isoCountry'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CountryContext Context for this CountryInstance */ protected function proxy(): CountryContext { if (!$this->context) { $this->context = new CountryContext($this->version, $this->solution['isoCountry']); } return $this->context; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V1.CountryInstance ' . \implode(' ', $context) . ']'; } }PKt[.Uܐ0Twilio/Rest/Pricing/V1/Messaging/CountryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CountryInstance \Twilio\Rest\Pricing\V1\Messaging\CountryInstance */ public function buildInstance(array $payload): CountryInstance { return new CountryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.CountryPage]'; } }PKt[5 3Twilio/Rest/Pricing/V1/Messaging/CountryContext.phpnu[solution = ['isoCountry' => $isoCountry, ]; $this->uri = '/Messaging/Countries/' . \rawurlencode($isoCountry) . ''; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { $payload = $this->version->fetch('GET', $this->uri); return new CountryInstance($this->version, $payload, $this->solution['isoCountry']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V1.CountryContext ' . \implode(' ', $context) . ']'; } }PKt[ 10Twilio/Rest/Pricing/V1/Messaging/CountryList.phpnu[solution = []; $this->uri = '/Messaging/Countries'; } /** * Streams CountryInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CountryInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CountryInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CountryInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CountryPage Page of CountryInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CountryPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CountryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CountryInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CountryPage Page of CountryInstance */ public function getPage(string $targetUrl): CountryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CountryPage($this->version, $response, $this->solution); } /** * Constructs a CountryContext * * @param string $isoCountry The ISO country code */ public function getContext(string $isoCountry): CountryContext { return new CountryContext($this->version, $isoCountry); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.CountryList]'; } }PKt[o pp$Twilio/Rest/Pricing/V1/VoicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return VoiceInstance \Twilio\Rest\Pricing\V1\VoiceInstance */ public function buildInstance(array $payload): VoiceInstance { return new VoiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.VoicePage]'; } }PKt[h(Twilio/Rest/Pricing/V1/VoiceInstance.phpnu[properties = [ 'name' => Values::array_get($payload, 'name'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.VoiceInstance]'; } }PKt[}+%b b *Twilio/Rest/Pricing/V1/PhoneNumberList.phpnu[solution = []; } /** * Access the countries */ protected function getCountries(): CountryList { if (!$this->_countries) { $this->_countries = new CountryList($this->version); } return $this->_countries; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.PhoneNumberList]'; } }PKt[,Twilio/Rest/Pricing/V1/MessagingInstance.phpnu[properties = [ 'name' => Values::array_get($payload, 'name'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.MessagingInstance]'; } }PKt[N6 0Twilio/Rest/Pricing/V1/Voice/CountryInstance.phpnu[properties = [ 'country' => Values::array_get($payload, 'country'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'outboundPrefixPrices' => Values::array_get($payload, 'outbound_prefix_prices'), 'inboundCallPrices' => Values::array_get($payload, 'inbound_call_prices'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['isoCountry' => $isoCountry ?: $this->properties['isoCountry'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CountryContext Context for this CountryInstance */ protected function proxy(): CountryContext { if (!$this->context) { $this->context = new CountryContext($this->version, $this->solution['isoCountry']); } return $this->context; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V1.CountryInstance ' . \implode(' ', $context) . ']'; } }PKt['(6,Twilio/Rest/Pricing/V1/Voice/CountryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CountryInstance \Twilio\Rest\Pricing\V1\Voice\CountryInstance */ public function buildInstance(array $payload): CountryInstance { return new CountryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.CountryPage]'; } }PKt[d9++Twilio/Rest/Pricing/V1/Voice/NumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NumberInstance \Twilio\Rest\Pricing\V1\Voice\NumberInstance */ public function buildInstance(array $payload): NumberInstance { return new NumberInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.NumberPage]'; } }PKt[2ԁ/Twilio/Rest/Pricing/V1/Voice/CountryContext.phpnu[solution = ['isoCountry' => $isoCountry, ]; $this->uri = '/Voice/Countries/' . \rawurlencode($isoCountry) . ''; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { $payload = $this->version->fetch('GET', $this->uri); return new CountryInstance($this->version, $payload, $this->solution['isoCountry']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V1.CountryContext ' . \implode(' ', $context) . ']'; } }PKt[gta,Twilio/Rest/Pricing/V1/Voice/CountryList.phpnu[solution = []; $this->uri = '/Voice/Countries'; } /** * Streams CountryInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CountryInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CountryInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CountryInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CountryPage Page of CountryInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CountryPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CountryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CountryInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CountryPage Page of CountryInstance */ public function getPage(string $targetUrl): CountryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CountryPage($this->version, $response, $this->solution); } /** * Constructs a CountryContext * * @param string $isoCountry The ISO country code */ public function getContext(string $isoCountry): CountryContext { return new CountryContext($this->version, $isoCountry); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.CountryList]'; } }PKt[ +Twilio/Rest/Pricing/V1/Voice/NumberList.phpnu[solution = []; } /** * Constructs a NumberContext * * @param string $number The phone number to fetch */ public function getContext(string $number): NumberContext { return new NumberContext($this->version, $number); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.NumberList]'; } }PKt[H.Twilio/Rest/Pricing/V1/Voice/NumberContext.phpnu[solution = ['number' => $number, ]; $this->uri = '/Voice/Numbers/' . \rawurlencode($number) . ''; } /** * Fetch the NumberInstance * * @return NumberInstance Fetched NumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NumberInstance { $payload = $this->version->fetch('GET', $this->uri); return new NumberInstance($this->version, $payload, $this->solution['number']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V1.NumberContext ' . \implode(' ', $context) . ']'; } }PKt[]/ /Twilio/Rest/Pricing/V1/Voice/NumberInstance.phpnu[properties = [ 'number' => Values::array_get($payload, 'number'), 'country' => Values::array_get($payload, 'country'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'outboundCallPrice' => Values::array_get($payload, 'outbound_call_price'), 'inboundCallPrice' => Values::array_get($payload, 'inbound_call_price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['number' => $number ?: $this->properties['number'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NumberContext Context for this NumberInstance */ protected function proxy(): NumberContext { if (!$this->context) { $this->context = new NumberContext($this->version, $this->solution['number']); } return $this->context; } /** * Fetch the NumberInstance * * @return NumberInstance Fetched NumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NumberInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V1.NumberInstance ' . \implode(' ', $context) . ']'; } }PKt[.Twilio/Rest/Pricing/V1/PhoneNumberInstance.phpnu[properties = [ 'name' => Values::array_get($payload, 'name'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1.PhoneNumberInstance]'; } }PKt[K Twilio/Rest/Pricing/V1.phpnu[version = 'v1'; } protected function getMessaging(): MessagingList { if (!$this->_messaging) { $this->_messaging = new MessagingList($this); } return $this->_messaging; } protected function getPhoneNumbers(): PhoneNumberList { if (!$this->_phoneNumbers) { $this->_phoneNumbers = new PhoneNumberList($this); } return $this->_phoneNumbers; } protected function getVoice(): VoiceList { if (!$this->_voice) { $this->_voice = new VoiceList($this); } return $this->_voice; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V1]'; } }PKt[ *Twilio/Rest/Pricing/V2/CountryInstance.phpnu[properties = [ 'country' => Values::array_get($payload, 'country'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'terminatingPrefixPrices' => Values::array_get($payload, 'terminating_prefix_prices'), 'originatingCallPrices' => Values::array_get($payload, 'originating_call_prices'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['isoCountry' => $isoCountry ?: $this->properties['isoCountry'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CountryContext Context for this CountryInstance */ protected function proxy(): CountryContext { if (!$this->context) { $this->context = new CountryContext($this->version, $this->solution['isoCountry']); } return $this->context; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V2.CountryInstance ' . \implode(' ', $context) . ']'; } }PKt[_n||&Twilio/Rest/Pricing/V2/CountryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CountryInstance \Twilio\Rest\Pricing\V2\CountryInstance */ public function buildInstance(array $payload): CountryInstance { return new CountryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.CountryPage]'; } }PKt[^ $Twilio/Rest/Pricing/V2/VoiceList.phpnu[solution = []; } /** * Access the countries */ protected function getCountries(): CountryList { if (!$this->_countries) { $this->_countries = new CountryList($this->version); } return $this->_countries; } /** * Access the numbers */ protected function getNumbers(): NumberList { if (!$this->_numbers) { $this->_numbers = new NumberList($this->version); } return $this->_numbers; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.VoiceList]'; } }PKt[F vv%Twilio/Rest/Pricing/V2/NumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NumberInstance \Twilio\Rest\Pricing\V2\NumberInstance */ public function buildInstance(array $payload): NumberInstance { return new NumberInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.NumberPage]'; } }PKt[=E55)Twilio/Rest/Pricing/V2/CountryContext.phpnu[solution = ['isoCountry' => $isoCountry, ]; $this->uri = '/Trunking/Countries/' . \rawurlencode($isoCountry) . ''; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { $payload = $this->version->fetch('GET', $this->uri); return new CountryInstance($this->version, $payload, $this->solution['isoCountry']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V2.CountryContext ' . \implode(' ', $context) . ']'; } }PKt[DHH&Twilio/Rest/Pricing/V2/CountryList.phpnu[solution = []; $this->uri = '/Trunking/Countries'; } /** * Streams CountryInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CountryInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CountryInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CountryInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CountryPage Page of CountryInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CountryPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CountryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CountryInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CountryPage Page of CountryInstance */ public function getPage(string $targetUrl): CountryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CountryPage($this->version, $response, $this->solution); } /** * Constructs a CountryContext * * @param string $isoCountry The ISO country code of the pricing information to * fetch */ public function getContext(string $isoCountry): CountryContext { return new CountryContext($this->version, $isoCountry); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.CountryList]'; } }PKt[Mpp$Twilio/Rest/Pricing/V2/VoicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return VoiceInstance \Twilio\Rest\Pricing\V2\VoiceInstance */ public function buildInstance(array $payload): VoiceInstance { return new VoiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.VoicePage]'; } }PKt[U[[(Twilio/Rest/Pricing/V2/NumberOptions.phpnu[options['originationNumber'] = $originationNumber; } /** * The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number. * * @param string $originationNumber The origination number for which to fetch * pricing information * @return $this Fluent Builder */ public function setOriginationNumber(string $originationNumber): self { $this->options['originationNumber'] = $originationNumber; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Pricing.V2.FetchNumberOptions ' . $options . ']'; } }PKt[_g(Twilio/Rest/Pricing/V2/VoiceInstance.phpnu[properties = [ 'name' => Values::array_get($payload, 'name'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.VoiceInstance]'; } }PKt[ Vw99%Twilio/Rest/Pricing/V2/NumberList.phpnu[solution = []; } /** * Constructs a NumberContext * * @param string $destinationNumber The destination number for which to fetch * pricing information */ public function getContext(string $destinationNumber): NumberContext { return new NumberContext($this->version, $destinationNumber); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.NumberList]'; } }PKt[ZVLL(Twilio/Rest/Pricing/V2/NumberContext.phpnu[solution = ['destinationNumber' => $destinationNumber, ]; $this->uri = '/Trunking/Numbers/' . \rawurlencode($destinationNumber) . ''; } /** * Fetch the NumberInstance * * @param array|Options $options Optional Arguments * @return NumberInstance Fetched NumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): NumberInstance { $options = new Values($options); $params = Values::of(['OriginationNumber' => $options['originationNumber'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new NumberInstance($this->version, $payload, $this->solution['destinationNumber']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V2.NumberContext ' . \implode(' ', $context) . ']'; } }PKt[s\ 0Twilio/Rest/Pricing/V2/Voice/CountryInstance.phpnu[properties = [ 'country' => Values::array_get($payload, 'country'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'outboundPrefixPrices' => Values::array_get($payload, 'outbound_prefix_prices'), 'inboundCallPrices' => Values::array_get($payload, 'inbound_call_prices'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['isoCountry' => $isoCountry ?: $this->properties['isoCountry'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CountryContext Context for this CountryInstance */ protected function proxy(): CountryContext { if (!$this->context) { $this->context = new CountryContext($this->version, $this->solution['isoCountry']); } return $this->context; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V2.CountryInstance ' . \implode(' ', $context) . ']'; } }PKt[2v5,Twilio/Rest/Pricing/V2/Voice/CountryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CountryInstance \Twilio\Rest\Pricing\V2\Voice\CountryInstance */ public function buildInstance(array $payload): CountryInstance { return new CountryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.CountryPage]'; } }PKt[>+Twilio/Rest/Pricing/V2/Voice/NumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NumberInstance \Twilio\Rest\Pricing\V2\Voice\NumberInstance */ public function buildInstance(array $payload): NumberInstance { return new NumberInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.NumberPage]'; } }PKt[Gs88/Twilio/Rest/Pricing/V2/Voice/CountryContext.phpnu[solution = ['isoCountry' => $isoCountry, ]; $this->uri = '/Voice/Countries/' . \rawurlencode($isoCountry) . ''; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { $payload = $this->version->fetch('GET', $this->uri); return new CountryInstance($this->version, $payload, $this->solution['isoCountry']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V2.CountryContext ' . \implode(' ', $context) . ']'; } }PKt[ 7GKK,Twilio/Rest/Pricing/V2/Voice/CountryList.phpnu[solution = []; $this->uri = '/Voice/Countries'; } /** * Streams CountryInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CountryInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CountryInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CountryInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CountryPage Page of CountryInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CountryPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CountryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CountryInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CountryPage Page of CountryInstance */ public function getPage(string $targetUrl): CountryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CountryPage($this->version, $response, $this->solution); } /** * Constructs a CountryContext * * @param string $isoCountry The ISO country code of the pricing information to * fetch */ public function getContext(string $isoCountry): CountryContext { return new CountryContext($this->version, $isoCountry); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.CountryList]'; } }PKt[l1aa.Twilio/Rest/Pricing/V2/Voice/NumberOptions.phpnu[options['originationNumber'] = $originationNumber; } /** * The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number. * * @param string $originationNumber The origination number for which to fetch * pricing information * @return $this Fluent Builder */ public function setOriginationNumber(string $originationNumber): self { $this->options['originationNumber'] = $originationNumber; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Pricing.V2.FetchNumberOptions ' . $options . ']'; } }PKt[ ??+Twilio/Rest/Pricing/V2/Voice/NumberList.phpnu[solution = []; } /** * Constructs a NumberContext * * @param string $destinationNumber The destination number for which to fetch * pricing information */ public function getContext(string $destinationNumber): NumberContext { return new NumberContext($this->version, $destinationNumber); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2.NumberList]'; } }PKt[iA]OO.Twilio/Rest/Pricing/V2/Voice/NumberContext.phpnu[solution = ['destinationNumber' => $destinationNumber, ]; $this->uri = '/Voice/Numbers/' . \rawurlencode($destinationNumber) . ''; } /** * Fetch the NumberInstance * * @param array|Options $options Optional Arguments * @return NumberInstance Fetched NumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): NumberInstance { $options = new Values($options); $params = Values::of(['OriginationNumber' => $options['originationNumber'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new NumberInstance($this->version, $payload, $this->solution['destinationNumber']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V2.NumberContext ' . \implode(' ', $context) . ']'; } }PKt[Dxhjj/Twilio/Rest/Pricing/V2/Voice/NumberInstance.phpnu[properties = [ 'destinationNumber' => Values::array_get($payload, 'destination_number'), 'originationNumber' => Values::array_get($payload, 'origination_number'), 'country' => Values::array_get($payload, 'country'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'outboundCallPrices' => Values::array_get($payload, 'outbound_call_prices'), 'inboundCallPrice' => Values::array_get($payload, 'inbound_call_price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'destinationNumber' => $destinationNumber ?: $this->properties['destinationNumber'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NumberContext Context for this NumberInstance */ protected function proxy(): NumberContext { if (!$this->context) { $this->context = new NumberContext($this->version, $this->solution['destinationNumber']); } return $this->context; } /** * Fetch the NumberInstance * * @param array|Options $options Optional Arguments * @return NumberInstance Fetched NumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): NumberInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V2.NumberInstance ' . \implode(' ', $context) . ']'; } }PKt[騥)Twilio/Rest/Pricing/V2/NumberInstance.phpnu[properties = [ 'destinationNumber' => Values::array_get($payload, 'destination_number'), 'originationNumber' => Values::array_get($payload, 'origination_number'), 'country' => Values::array_get($payload, 'country'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'terminatingPrefixPrices' => Values::array_get($payload, 'terminating_prefix_prices'), 'originatingCallPrice' => Values::array_get($payload, 'originating_call_price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'destinationNumber' => $destinationNumber ?: $this->properties['destinationNumber'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NumberContext Context for this NumberInstance */ protected function proxy(): NumberContext { if (!$this->context) { $this->context = new NumberContext($this->version, $this->solution['destinationNumber']); } return $this->context; } /** * Fetch the NumberInstance * * @param array|Options $options Optional Arguments * @return NumberInstance Fetched NumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): NumberInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Pricing.V2.NumberInstance ' . \implode(' ', $context) . ']'; } }PKt[$) ) Twilio/Rest/Pricing/V2.phpnu[version = 'v2'; } protected function getCountries(): CountryList { if (!$this->_countries) { $this->_countries = new CountryList($this); } return $this->_countries; } protected function getNumbers(): NumberList { if (!$this->_numbers) { $this->_numbers = new NumberList($this); } return $this->_numbers; } protected function getVoice(): VoiceList { if (!$this->_voice) { $this->_voice = new VoiceList($this); } return $this->_voice; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing.V2]'; } }PKt[ [ [ Twilio/Rest/Lookups.phpnu[baseUrl = 'https://lookups.twilio.com'; } /** * @return V1 Version v1 of lookups */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * @return V2 Version v2 of lookups */ protected function getV2(): V2 { if (!$this->_v2) { $this->_v2 = new V2($this); } return $this->_v2; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getPhoneNumbers(): \Twilio\Rest\Lookups\V1\PhoneNumberList { return $this->v1->phoneNumbers; } /** * @param string $phoneNumber The phone number to fetch in E.164 format */ protected function contextPhoneNumbers(string $phoneNumber): \Twilio\Rest\Lookups\V1\PhoneNumberContext { return $this->v1->phoneNumbers($phoneNumber); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Lookups]'; } }PKt[4 ϗ.Twilio/Rest/Proxy/V1/Service/ShortCodeList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/ShortCodes'; } /** * Create the ShortCodeInstance * * @param string $sid The SID of a Twilio ShortCode resource * @return ShortCodeInstance Created ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $sid): ShortCodeInstance { $data = Values::of(['Sid' => $sid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams ShortCodeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ShortCodeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ShortCodeInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ShortCodeInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ShortCodePage Page of ShortCodeInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ShortCodePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ShortCodePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ShortCodeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ShortCodePage Page of ShortCodeInstance */ public function getPage(string $targetUrl): ShortCodePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ShortCodePage($this->version, $response, $this->solution); } /** * Constructs a ShortCodeContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ShortCodeContext { return new ShortCodeContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.ShortCodeList]'; } }PKt[dCҫ0Twilio/Rest/Proxy/V1/Service/SessionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateStarted' => Deserialize::dateTime(Values::array_get($payload, 'date_started')), 'dateEnded' => Deserialize::dateTime(Values::array_get($payload, 'date_ended')), 'dateLastInteraction' => Deserialize::dateTime(Values::array_get($payload, 'date_last_interaction')), 'dateExpiry' => Deserialize::dateTime(Values::array_get($payload, 'date_expiry')), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'status' => Values::array_get($payload, 'status'), 'closedReason' => Values::array_get($payload, 'closed_reason'), 'ttl' => Values::array_get($payload, 'ttl'), 'mode' => Values::array_get($payload, 'mode'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SessionContext Context for this SessionInstance */ protected function proxy(): SessionContext { if (!$this->context) { $this->context = new SessionContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SessionInstance * * @return SessionInstance Fetched SessionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SessionInstance { return $this->proxy()->fetch(); } /** * Delete the SessionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the SessionInstance * * @param array|Options $options Optional Arguments * @return SessionInstance Updated SessionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SessionInstance { return $this->proxy()->update($options); } /** * Access the interactions */ protected function getInteractions(): InteractionList { return $this->proxy()->interactions; } /** * Access the participants */ protected function getParticipants(): ParticipantList { return $this->proxy()->participants; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.SessionInstance ' . \implode(' ', $context) . ']'; } }PKt[]aQ..0Twilio/Rest/Proxy/V1/Service/PhoneNumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PhoneNumberInstance \Twilio\Rest\Proxy\V1\Service\PhoneNumberInstance */ public function buildInstance(array $payload): PhoneNumberInstance { return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.PhoneNumberPage]'; } }PKt[^o"".Twilio/Rest/Proxy/V1/Service/ShortCodePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ShortCodeInstance \Twilio\Rest\Proxy\V1\Service\ShortCodeInstance */ public function buildInstance(array $payload): ShortCodeInstance { return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.ShortCodePage]'; } }PKt[u 3Twilio/Rest/Proxy/V1/Service/PhoneNumberContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/PhoneNumbers/' . \rawurlencode($sid) . ''; } /** * Delete the PhoneNumberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the PhoneNumberInstance * * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PhoneNumberInstance { $payload = $this->version->fetch('GET', $this->uri); return new PhoneNumberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Update the PhoneNumberInstance * * @param array|Options $options Optional Arguments * @return PhoneNumberInstance Updated PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): PhoneNumberInstance { $options = new Values($options); $data = Values::of(['IsReserved' => Serialize::booleanToString($options['isReserved']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new PhoneNumberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.PhoneNumberContext ' . \implode(' ', $context) . ']'; } }PKt[+|8Twilio/Rest/Proxy/V1/Service/Session/ParticipantList.phpnu[solution = ['serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Participants'; } /** * Streams ParticipantInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ParticipantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ParticipantInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ParticipantInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ParticipantPage Page of ParticipantInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ParticipantPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ParticipantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ParticipantInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ParticipantPage Page of ParticipantInstance */ public function getPage(string $targetUrl): ParticipantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ParticipantPage($this->version, $response, $this->solution); } /** * Create the ParticipantInstance * * @param string $identifier The phone number of the Participant * @param array|Options $options Optional Arguments * @return ParticipantInstance Created ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identifier, array $options = []): ParticipantInstance { $options = new Values($options); $data = Values::of([ 'Identifier' => $identifier, 'FriendlyName' => $options['friendlyName'], 'ProxyIdentifier' => $options['proxyIdentifier'], 'ProxyIdentifierSid' => $options['proxyIdentifierSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ParticipantInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid'] ); } /** * Constructs a ParticipantContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ParticipantContext { return new ParticipantContext( $this->version, $this->solution['serviceSid'], $this->solution['sessionSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.ParticipantList]'; } }PKt[> $$<Twilio/Rest/Proxy/V1/Service/Session/ParticipantInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'sessionSid' => Values::array_get($payload, 'session_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'identifier' => Values::array_get($payload, 'identifier'), 'proxyIdentifier' => Values::array_get($payload, 'proxy_identifier'), 'proxyIdentifierSid' => Values::array_get($payload, 'proxy_identifier_sid'), 'dateDeleted' => Deserialize::dateTime(Values::array_get($payload, 'date_deleted')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ParticipantContext Context for this ParticipantInstance */ protected function proxy(): ParticipantContext { if (!$this->context) { $this->context = new ParticipantContext( $this->version, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { return $this->proxy()->fetch(); } /** * Delete the ParticipantInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the messageInteractions */ protected function getMessageInteractions(): MessageInteractionList { return $this->proxy()->messageInteractions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.ParticipantInstance ' . \implode(' ', $context) . ']'; } }PKt[P Kğ NTwilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionContext.phpnu[solution = [ 'serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'participantSid' => $participantSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Participants/' . \rawurlencode($participantSid) . '/MessageInteractions/' . \rawurlencode($sid) . ''; } /** * Fetch the MessageInteractionInstance * * @return MessageInteractionInstance Fetched MessageInteractionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInteractionInstance { $payload = $this->version->fetch('GET', $this->uri); return new MessageInteractionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['participantSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.MessageInteractionContext ' . \implode(' ', $context) . ']'; } }PKt[WZKTwilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionList.phpnu[solution = [ 'serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'participantSid' => $participantSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Participants/' . \rawurlencode($participantSid) . '/MessageInteractions'; } /** * Create the MessageInteractionInstance * * @param array|Options $options Optional Arguments * @return MessageInteractionInstance Created MessageInteractionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): MessageInteractionInstance { $options = new Values($options); $data = Values::of([ 'Body' => $options['body'], 'MediaUrl' => Serialize::map($options['mediaUrl'], function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MessageInteractionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['participantSid'] ); } /** * Streams MessageInteractionInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MessageInteractionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MessageInteractionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of MessageInteractionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MessageInteractionPage Page of MessageInteractionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MessageInteractionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MessageInteractionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MessageInteractionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MessageInteractionPage Page of MessageInteractionInstance */ public function getPage(string $targetUrl): MessageInteractionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MessageInteractionPage($this->version, $response, $this->solution); } /** * Constructs a MessageInteractionContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): MessageInteractionContext { return new MessageInteractionContext( $this->version, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['participantSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.MessageInteractionList]'; } }PKt[KTwilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MessageInteractionInstance \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionInstance */ public function buildInstance(array $payload): MessageInteractionInstance { return new MessageInteractionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['participantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.MessageInteractionPage]'; } }PKt[m/kNTwilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionOptions.phpnu[options['body'] = $body; $this->options['mediaUrl'] = $mediaUrl; } /** * The message to send to the participant * * @param string $body Message body * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * Reserved. Not currently supported. * * @param string[] $mediaUrl Reserved * @return $this Fluent Builder */ public function setMediaUrl(array $mediaUrl): self { $this->options['mediaUrl'] = $mediaUrl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Proxy.V1.CreateMessageInteractionOptions ' . $options . ']'; } }PKt[&V^OTwilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'sessionSid' => Values::array_get($payload, 'session_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'data' => Values::array_get($payload, 'data'), 'type' => Values::array_get($payload, 'type'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'inboundParticipantSid' => Values::array_get($payload, 'inbound_participant_sid'), 'inboundResourceSid' => Values::array_get($payload, 'inbound_resource_sid'), 'inboundResourceStatus' => Values::array_get($payload, 'inbound_resource_status'), 'inboundResourceType' => Values::array_get($payload, 'inbound_resource_type'), 'inboundResourceUrl' => Values::array_get($payload, 'inbound_resource_url'), 'outboundParticipantSid' => Values::array_get($payload, 'outbound_participant_sid'), 'outboundResourceSid' => Values::array_get($payload, 'outbound_resource_sid'), 'outboundResourceStatus' => Values::array_get($payload, 'outbound_resource_status'), 'outboundResourceType' => Values::array_get($payload, 'outbound_resource_type'), 'outboundResourceUrl' => Values::array_get($payload, 'outbound_resource_url'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'participantSid' => $participantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MessageInteractionContext Context for this MessageInteractionInstance */ protected function proxy(): MessageInteractionContext { if (!$this->context) { $this->context = new MessageInteractionContext( $this->version, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['participantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the MessageInteractionInstance * * @return MessageInteractionInstance Fetched MessageInteractionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInteractionInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.MessageInteractionInstance ' . \implode(' ', $context) . ']'; } }PKt[ _U::<Twilio/Rest/Proxy/V1/Service/Session/InteractionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'sessionSid' => Values::array_get($payload, 'session_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'data' => Values::array_get($payload, 'data'), 'type' => Values::array_get($payload, 'type'), 'inboundParticipantSid' => Values::array_get($payload, 'inbound_participant_sid'), 'inboundResourceSid' => Values::array_get($payload, 'inbound_resource_sid'), 'inboundResourceStatus' => Values::array_get($payload, 'inbound_resource_status'), 'inboundResourceType' => Values::array_get($payload, 'inbound_resource_type'), 'inboundResourceUrl' => Values::array_get($payload, 'inbound_resource_url'), 'outboundParticipantSid' => Values::array_get($payload, 'outbound_participant_sid'), 'outboundResourceSid' => Values::array_get($payload, 'outbound_resource_sid'), 'outboundResourceStatus' => Values::array_get($payload, 'outbound_resource_status'), 'outboundResourceType' => Values::array_get($payload, 'outbound_resource_type'), 'outboundResourceUrl' => Values::array_get($payload, 'outbound_resource_url'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InteractionContext Context for this InteractionInstance */ protected function proxy(): InteractionContext { if (!$this->context) { $this->context = new InteractionContext( $this->version, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the InteractionInstance * * @return InteractionInstance Fetched InteractionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InteractionInstance { return $this->proxy()->fetch(); } /** * Delete the InteractionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.InteractionInstance ' . \implode(' ', $context) . ']'; } }PKt[_??;Twilio/Rest/Proxy/V1/Service/Session/ParticipantContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Participants/' . \rawurlencode($sid) . ''; } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { $payload = $this->version->fetch('GET', $this->uri); return new ParticipantInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['sid'] ); } /** * Delete the ParticipantInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the messageInteractions */ protected function getMessageInteractions(): MessageInteractionList { if (!$this->_messageInteractions) { $this->_messageInteractions = new MessageInteractionList( $this->version, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['sid'] ); } return $this->_messageInteractions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.ParticipantContext ' . \implode(' ', $context) . ']'; } }PKt[BʘM M ;Twilio/Rest/Proxy/V1/Service/Session/ParticipantOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['proxyIdentifier'] = $proxyIdentifier; $this->options['proxyIdentifierSid'] = $proxyIdentifierSid; } /** * The string that you assigned to describe the participant. This value must be 255 characters or fewer. **This value should not have PII.** * * @param string $friendlyName The string that you assigned to describe the * participant * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool. * * @param string $proxyIdentifier The proxy phone number to use for the * Participant * @return $this Fluent Builder */ public function setProxyIdentifier(string $proxyIdentifier): self { $this->options['proxyIdentifier'] = $proxyIdentifier; return $this; } /** * The SID of the Proxy Identifier to assign to the Participant. * * @param string $proxyIdentifierSid The Proxy Identifier Sid * @return $this Fluent Builder */ public function setProxyIdentifierSid(string $proxyIdentifierSid): self { $this->options['proxyIdentifierSid'] = $proxyIdentifierSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Proxy.V1.CreateParticipantOptions ' . $options . ']'; } }PKt[@ ;Twilio/Rest/Proxy/V1/Service/Session/InteractionContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Interactions/' . \rawurlencode($sid) . ''; } /** * Fetch the InteractionInstance * * @return InteractionInstance Fetched InteractionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InteractionInstance { $payload = $this->version->fetch('GET', $this->uri); return new InteractionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['sid'] ); } /** * Delete the InteractionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.InteractionContext ' . \implode(' ', $context) . ']'; } }PKt[}8Twilio/Rest/Proxy/V1/Service/Session/ParticipantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ParticipantInstance \Twilio\Rest\Proxy\V1\Service\Session\ParticipantInstance */ public function buildInstance(array $payload): ParticipantInstance { return new ParticipantInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.ParticipantPage]'; } }PKt[ D8Twilio/Rest/Proxy/V1/Service/Session/InteractionList.phpnu[solution = ['serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Interactions'; } /** * Streams InteractionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InteractionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InteractionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of InteractionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InteractionPage Page of InteractionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InteractionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new InteractionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InteractionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InteractionPage Page of InteractionInstance */ public function getPage(string $targetUrl): InteractionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InteractionPage($this->version, $response, $this->solution); } /** * Constructs a InteractionContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): InteractionContext { return new InteractionContext( $this->version, $this->solution['serviceSid'], $this->solution['sessionSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.InteractionList]'; } }PKt[,ڗ8Twilio/Rest/Proxy/V1/Service/Session/InteractionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InteractionInstance \Twilio\Rest\Proxy\V1\Service\Session\InteractionInstance */ public function buildInstance(array $payload): InteractionInstance { return new InteractionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.InteractionPage]'; } }PKt[Z 1Twilio/Rest/Proxy/V1/Service/ShortCodeContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/ShortCodes/' . \rawurlencode($sid) . ''; } /** * Delete the ShortCodeInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the ShortCodeInstance * * @return ShortCodeInstance Fetched ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ShortCodeInstance { $payload = $this->version->fetch('GET', $this->uri); return new ShortCodeInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Update the ShortCodeInstance * * @param array|Options $options Optional Arguments * @return ShortCodeInstance Updated ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ShortCodeInstance { $options = new Values($options); $data = Values::of(['IsReserved' => Serialize::booleanToString($options['isReserved']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ShortCodeInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.ShortCodeContext ' . \implode(' ', $context) . ']'; } }PKt[{Y0Twilio/Rest/Proxy/V1/Service/PhoneNumberList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/PhoneNumbers'; } /** * Create the PhoneNumberInstance * * @param array|Options $options Optional Arguments * @return PhoneNumberInstance Created PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): PhoneNumberInstance { $options = new Values($options); $data = Values::of([ 'Sid' => $options['sid'], 'PhoneNumber' => $options['phoneNumber'], 'IsReserved' => Serialize::booleanToString($options['isReserved']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams PhoneNumberInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads PhoneNumberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return PhoneNumberInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of PhoneNumberInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return PhoneNumberPage Page of PhoneNumberInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): PhoneNumberPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new PhoneNumberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of PhoneNumberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return PhoneNumberPage Page of PhoneNumberInstance */ public function getPage(string $targetUrl): PhoneNumberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new PhoneNumberPage($this->version, $response, $this->solution); } /** * Constructs a PhoneNumberContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): PhoneNumberContext { return new PhoneNumberContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.PhoneNumberList]'; } }PKt[[,Twilio/Rest/Proxy/V1/Service/SessionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SessionInstance \Twilio\Rest\Proxy\V1\Service\SessionInstance */ public function buildInstance(array $payload): SessionInstance { return new SessionInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.SessionPage]'; } }PKt[|>/Twilio/Rest/Proxy/V1/Service/SessionContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sid) . ''; } /** * Fetch the SessionInstance * * @return SessionInstance Fetched SessionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SessionInstance { $payload = $this->version->fetch('GET', $this->uri); return new SessionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the SessionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the SessionInstance * * @param array|Options $options Optional Arguments * @return SessionInstance Updated SessionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SessionInstance { $options = new Values($options); $data = Values::of([ 'DateExpiry' => Serialize::iso8601DateTime($options['dateExpiry']), 'Ttl' => $options['ttl'], 'Status' => $options['status'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SessionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the interactions */ protected function getInteractions(): InteractionList { if (!$this->_interactions) { $this->_interactions = new InteractionList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_interactions; } /** * Access the participants */ protected function getParticipants(): ParticipantList { if (!$this->_participants) { $this->_participants = new ParticipantList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_participants; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.SessionContext ' . \implode(' ', $context) . ']'; } }PKt[i ,,,Twilio/Rest/Proxy/V1/Service/SessionList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions'; } /** * Streams SessionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SessionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SessionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SessionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SessionPage Page of SessionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SessionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SessionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SessionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SessionPage Page of SessionInstance */ public function getPage(string $targetUrl): SessionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SessionPage($this->version, $response, $this->solution); } /** * Create the SessionInstance * * @param array|Options $options Optional Arguments * @return SessionInstance Created SessionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): SessionInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'DateExpiry' => Serialize::iso8601DateTime($options['dateExpiry']), 'Ttl' => $options['ttl'], 'Mode' => $options['mode'], 'Status' => $options['status'], 'Participants' => Serialize::map($options['participants'], function($e) { return Serialize::jsonObject($e); }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SessionInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Constructs a SessionContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): SessionContext { return new SessionContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.SessionList]'; } }PKt[䒠-1Twilio/Rest/Proxy/V1/Service/ShortCodeOptions.phpnu[options['isReserved'] = $isReserved; } /** * Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information. * * @param bool $isReserved Whether the short code should be reserved for manual * assignment to participants only * @return $this Fluent Builder */ public function setIsReserved(bool $isReserved): self { $this->options['isReserved'] = $isReserved; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Proxy.V1.UpdateShortCodeOptions ' . $options . ']'; } }PKt[(/Twilio/Rest/Proxy/V1/Service/SessionOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['dateExpiry'] = $dateExpiry; $this->options['ttl'] = $ttl; $this->options['mode'] = $mode; $this->options['status'] = $status; $this->options['participants'] = $participants; } /** * An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.** * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value. * * @param \DateTime $dateExpiry The ISO 8601 date when the Session should expire * @return $this Fluent Builder */ public function setDateExpiry(\DateTime $dateExpiry): self { $this->options['dateExpiry'] = $dateExpiry; return $this; } /** * The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. * * @param int $ttl When the session will expire * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * The Mode of the Session. Can be: `message-only`, `voice-only`, or `voice-and-message` and the default value is `voice-and-message`. * * @param string $mode The Mode of the Session * @return $this Fluent Builder */ public function setMode(string $mode): self { $this->options['mode'] = $mode; return $this; } /** * The initial status of the Session. Can be: `open`, `in-progress`, `closed`, `failed`, or `unknown`. The default is `open` on create. * * @param string $status Session status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The Participant objects to include in the new session. * * @param array[] $participants The Participant objects to include in the new * session * @return $this Fluent Builder */ public function setParticipants(array $participants): self { $this->options['participants'] = $participants; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Proxy.V1.CreateSessionOptions ' . $options . ']'; } } class UpdateSessionOptions extends Options { /** * @param \DateTime $dateExpiry The ISO 8601 date when the Session should expire * @param int $ttl When the session will expire * @param string $status The new status of the resource */ public function __construct(\DateTime $dateExpiry = Values::NONE, int $ttl = Values::NONE, string $status = Values::NONE) { $this->options['dateExpiry'] = $dateExpiry; $this->options['ttl'] = $ttl; $this->options['status'] = $status; } /** * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value. * * @param \DateTime $dateExpiry The ISO 8601 date when the Session should expire * @return $this Fluent Builder */ public function setDateExpiry(\DateTime $dateExpiry): self { $this->options['dateExpiry'] = $dateExpiry; return $this; } /** * The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. * * @param int $ttl When the session will expire * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * The new status of the resource. Can be: `in-progress` to re-open a session or `closed` to close a session. * * @param string $status The new status of the resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Proxy.V1.UpdateSessionOptions ' . $options . ']'; } }PKt[!''4Twilio/Rest/Proxy/V1/Service/PhoneNumberInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'url' => Values::array_get($payload, 'url'), 'isReserved' => Values::array_get($payload, 'is_reserved'), 'inUse' => Values::array_get($payload, 'in_use'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PhoneNumberContext Context for this PhoneNumberInstance */ protected function proxy(): PhoneNumberContext { if (!$this->context) { $this->context = new PhoneNumberContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the PhoneNumberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the PhoneNumberInstance * * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PhoneNumberInstance { return $this->proxy()->fetch(); } /** * Update the PhoneNumberInstance * * @param array|Options $options Optional Arguments * @return PhoneNumberInstance Updated PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): PhoneNumberInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.PhoneNumberInstance ' . \implode(' ', $context) . ']'; } }PKt[` c223Twilio/Rest/Proxy/V1/Service/PhoneNumberOptions.phpnu[options['sid'] = $sid; $this->options['phoneNumber'] = $phoneNumber; $this->options['isReserved'] = $isReserved; } /** * The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service. * * @param string $sid The SID of a Twilio IncomingPhoneNumber resource * @return $this Fluent Builder */ public function setSid(string $sid): self { $this->options['sid'] = $sid; return $this; } /** * The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. * * @param string $phoneNumber The phone number in E.164 format * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information. * * @param bool $isReserved Whether the new phone number should be reserved * @return $this Fluent Builder */ public function setIsReserved(bool $isReserved): self { $this->options['isReserved'] = $isReserved; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Proxy.V1.CreatePhoneNumberOptions ' . $options . ']'; } } class UpdatePhoneNumberOptions extends Options { /** * @param bool $isReserved Whether the new phone number should be reserved */ public function __construct(bool $isReserved = Values::NONE) { $this->options['isReserved'] = $isReserved; } /** * Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information. * * @param bool $isReserved Whether the new phone number should be reserved * @return $this Fluent Builder */ public function setIsReserved(bool $isReserved): self { $this->options['isReserved'] = $isReserved; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Proxy.V1.UpdatePhoneNumberOptions ' . $options . ']'; } }PKt[z2Twilio/Rest/Proxy/V1/Service/ShortCodeInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'shortCode' => Values::array_get($payload, 'short_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'url' => Values::array_get($payload, 'url'), 'isReserved' => Values::array_get($payload, 'is_reserved'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ShortCodeContext Context for this ShortCodeInstance */ protected function proxy(): ShortCodeContext { if (!$this->context) { $this->context = new ShortCodeContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the ShortCodeInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the ShortCodeInstance * * @return ShortCodeInstance Fetched ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ShortCodeInstance { return $this->proxy()->fetch(); } /** * Update the ShortCodeInstance * * @param array|Options $options Optional Arguments * @return ShortCodeInstance Updated ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ShortCodeInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.ShortCodeInstance ' . \implode(' ', $context) . ']'; } }PKt[P(Twilio/Rest/Proxy/V1/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatInstanceSid' => Values::array_get($payload, 'chat_instance_sid'), 'callbackUrl' => Values::array_get($payload, 'callback_url'), 'defaultTtl' => Values::array_get($payload, 'default_ttl'), 'numberSelectionBehavior' => Values::array_get($payload, 'number_selection_behavior'), 'geoMatchLevel' => Values::array_get($payload, 'geo_match_level'), 'interceptCallbackUrl' => Values::array_get($payload, 'intercept_callback_url'), 'outOfSessionCallbackUrl' => Values::array_get($payload, 'out_of_session_callback_url'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Access the sessions */ protected function getSessions(): SessionList { return $this->proxy()->sessions; } /** * Access the phoneNumbers */ protected function getPhoneNumbers(): PhoneNumberList { return $this->proxy()->phoneNumbers; } /** * Access the shortCodes */ protected function getShortCodes(): ShortCodeList { return $this->proxy()->shortCodes; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[V88$Twilio/Rest/Proxy/V1/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Create the ServiceInstance * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param array|Options $options Optional Arguments * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $uniqueName, array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $uniqueName, 'DefaultTtl' => $options['defaultTtl'], 'CallbackUrl' => $options['callbackUrl'], 'GeoMatchLevel' => $options['geoMatchLevel'], 'NumberSelectionBehavior' => $options['numberSelectionBehavior'], 'InterceptCallbackUrl' => $options['interceptCallbackUrl'], 'OutOfSessionCallbackUrl' => $options['outOfSessionCallbackUrl'], 'ChatInstanceSid' => $options['chatInstanceSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Constructs a ServiceContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.ServiceList]'; } }PKt[4'Twilio/Rest/Proxy/V1/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'DefaultTtl' => $options['defaultTtl'], 'CallbackUrl' => $options['callbackUrl'], 'GeoMatchLevel' => $options['geoMatchLevel'], 'NumberSelectionBehavior' => $options['numberSelectionBehavior'], 'InterceptCallbackUrl' => $options['interceptCallbackUrl'], 'OutOfSessionCallbackUrl' => $options['outOfSessionCallbackUrl'], 'ChatInstanceSid' => $options['chatInstanceSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the sessions */ protected function getSessions(): SessionList { if (!$this->_sessions) { $this->_sessions = new SessionList($this->version, $this->solution['sid']); } return $this->_sessions; } /** * Access the phoneNumbers */ protected function getPhoneNumbers(): PhoneNumberList { if (!$this->_phoneNumbers) { $this->_phoneNumbers = new PhoneNumberList($this->version, $this->solution['sid']); } return $this->_phoneNumbers; } /** * Access the shortCodes */ protected function getShortCodes(): ShortCodeList { if (!$this->_shortCodes) { $this->_shortCodes = new ShortCodeList($this->version, $this->solution['sid']); } return $this->_shortCodes; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Proxy.V1.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[]N(D(D'Twilio/Rest/Proxy/V1/ServiceOptions.phpnu[options['defaultTtl'] = $defaultTtl; $this->options['callbackUrl'] = $callbackUrl; $this->options['geoMatchLevel'] = $geoMatchLevel; $this->options['numberSelectionBehavior'] = $numberSelectionBehavior; $this->options['interceptCallbackUrl'] = $interceptCallbackUrl; $this->options['outOfSessionCallbackUrl'] = $outOfSessionCallbackUrl; $this->options['chatInstanceSid'] = $chatInstanceSid; } /** * The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value. * * @param int $defaultTtl Default TTL for a Session, in seconds * @return $this Fluent Builder */ public function setDefaultTtl(int $defaultTtl): self { $this->options['defaultTtl'] = $defaultTtl; return $this; } /** * The URL we should call when the interaction status changes. * * @param string $callbackUrl The URL we should call when the interaction * status changes * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * Where a proxy number must be located relative to the participant identifier. Can be: `country`, `area-code`, or `extended-area-code`. The default value is `country` and more specific areas than `country` are only available in North America. * * @param string $geoMatchLevel Where a proxy number must be located relative * to the participant identifier * @return $this Fluent Builder */ public function setGeoMatchLevel(string $geoMatchLevel): self { $this->options['geoMatchLevel'] = $geoMatchLevel; return $this; } /** * The preference for Proxy Number selection in the Service instance. Can be: `prefer-sticky` or `avoid-sticky` and the default is `prefer-sticky`. `prefer-sticky` means that we will try and select the same Proxy Number for a given participant if they have previous [Sessions](https://www.twilio.com/docs/proxy/api/session), but we will not fail if that Proxy Number cannot be used. `avoid-sticky` means that we will try to use different Proxy Numbers as long as that is possible within a given pool rather than try and use a previously assigned number. * * @param string $numberSelectionBehavior The preference for Proxy Number * selection for the Service instance * @return $this Fluent Builder */ public function setNumberSelectionBehavior(string $numberSelectionBehavior): self { $this->options['numberSelectionBehavior'] = $numberSelectionBehavior; return $this; } /** * The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. * * @param string $interceptCallbackUrl The URL we call on each interaction * @return $this Fluent Builder */ public function setInterceptCallbackUrl(string $interceptCallbackUrl): self { $this->options['interceptCallbackUrl'] = $interceptCallbackUrl; return $this; } /** * The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. * * @param string $outOfSessionCallbackUrl The URL we call when an inbound call * or SMS action occurs on a closed or * non-existent Session * @return $this Fluent Builder */ public function setOutOfSessionCallbackUrl(string $outOfSessionCallbackUrl): self { $this->options['outOfSessionCallbackUrl'] = $outOfSessionCallbackUrl; return $this; } /** * The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship. * * @param string $chatInstanceSid The SID of the Chat Service Instance * @return $this Fluent Builder */ public function setChatInstanceSid(string $chatInstanceSid): self { $this->options['chatInstanceSid'] = $chatInstanceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Proxy.V1.CreateServiceOptions ' . $options . ']'; } } class UpdateServiceOptions extends Options { /** * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param int $defaultTtl Default TTL for a Session, in seconds * @param string $callbackUrl The URL we should call when the interaction * status changes * @param string $geoMatchLevel Where a proxy number must be located relative * to the participant identifier * @param string $numberSelectionBehavior The preference for Proxy Number * selection for the Service instance * @param string $interceptCallbackUrl The URL we call on each interaction * @param string $outOfSessionCallbackUrl The URL we call when an inbound call * or SMS action occurs on a closed or * non-existent Session * @param string $chatInstanceSid The SID of the Chat Service Instance */ public function __construct(string $uniqueName = Values::NONE, int $defaultTtl = Values::NONE, string $callbackUrl = Values::NONE, string $geoMatchLevel = Values::NONE, string $numberSelectionBehavior = Values::NONE, string $interceptCallbackUrl = Values::NONE, string $outOfSessionCallbackUrl = Values::NONE, string $chatInstanceSid = Values::NONE) { $this->options['uniqueName'] = $uniqueName; $this->options['defaultTtl'] = $defaultTtl; $this->options['callbackUrl'] = $callbackUrl; $this->options['geoMatchLevel'] = $geoMatchLevel; $this->options['numberSelectionBehavior'] = $numberSelectionBehavior; $this->options['interceptCallbackUrl'] = $interceptCallbackUrl; $this->options['outOfSessionCallbackUrl'] = $outOfSessionCallbackUrl; $this->options['chatInstanceSid'] = $chatInstanceSid; } /** * An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.** * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value. * * @param int $defaultTtl Default TTL for a Session, in seconds * @return $this Fluent Builder */ public function setDefaultTtl(int $defaultTtl): self { $this->options['defaultTtl'] = $defaultTtl; return $this; } /** * The URL we should call when the interaction status changes. * * @param string $callbackUrl The URL we should call when the interaction * status changes * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * Where a proxy number must be located relative to the participant identifier. Can be: `country`, `area-code`, or `extended-area-code`. The default value is `country` and more specific areas than `country` are only available in North America. * * @param string $geoMatchLevel Where a proxy number must be located relative * to the participant identifier * @return $this Fluent Builder */ public function setGeoMatchLevel(string $geoMatchLevel): self { $this->options['geoMatchLevel'] = $geoMatchLevel; return $this; } /** * The preference for Proxy Number selection in the Service instance. Can be: `prefer-sticky` or `avoid-sticky` and the default is `prefer-sticky`. `prefer-sticky` means that we will try and select the same Proxy Number for a given participant if they have previous [Sessions](https://www.twilio.com/docs/proxy/api/session), but we will not fail if that Proxy Number cannot be used. `avoid-sticky` means that we will try to use different Proxy Numbers as long as that is possible within a given pool rather than try and use a previously assigned number. * * @param string $numberSelectionBehavior The preference for Proxy Number * selection for the Service instance * @return $this Fluent Builder */ public function setNumberSelectionBehavior(string $numberSelectionBehavior): self { $this->options['numberSelectionBehavior'] = $numberSelectionBehavior; return $this; } /** * The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. * * @param string $interceptCallbackUrl The URL we call on each interaction * @return $this Fluent Builder */ public function setInterceptCallbackUrl(string $interceptCallbackUrl): self { $this->options['interceptCallbackUrl'] = $interceptCallbackUrl; return $this; } /** * The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. * * @param string $outOfSessionCallbackUrl The URL we call when an inbound call * or SMS action occurs on a closed or * non-existent Session * @return $this Fluent Builder */ public function setOutOfSessionCallbackUrl(string $outOfSessionCallbackUrl): self { $this->options['outOfSessionCallbackUrl'] = $outOfSessionCallbackUrl; return $this; } /** * The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship. * * @param string $chatInstanceSid The SID of the Chat Service Instance * @return $this Fluent Builder */ public function setChatInstanceSid(string $chatInstanceSid): self { $this->options['chatInstanceSid'] = $chatInstanceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Proxy.V1.UpdateServiceOptions ' . $options . ']'; } }PKt[Z$Twilio/Rest/Proxy/V1/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\Proxy\V1\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1.ServicePage]'; } }PKt[śTwilio/Rest/Proxy/V1.phpnu[version = 'v1'; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy.V1]'; } }PKt[ Twilio/Rest/Insights.phpnu[baseUrl = 'https://insights.twilio.com'; } /** * @return V1 Version v1 of insights */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getSettings(): \Twilio\Rest\Insights\V1\SettingList { return $this->v1->settings; } protected function contextSettings(): \Twilio\Rest\Insights\V1\SettingContext { return $this->v1->settings(); } protected function getCalls(): \Twilio\Rest\Insights\V1\CallList { return $this->v1->calls; } /** * @param string $sid The sid */ protected function contextCalls(string $sid): \Twilio\Rest\Insights\V1\CallContext { return $this->v1->calls($sid); } protected function getCallSummaries(): \Twilio\Rest\Insights\V1\CallSummariesList { return $this->v1->callSummaries; } protected function getConferences(): \Twilio\Rest\Insights\V1\ConferenceList { return $this->v1->conferences; } /** * @param string $conferenceSid Conference SID. */ protected function contextConferences(string $conferenceSid): \Twilio\Rest\Insights\V1\ConferenceContext { return $this->v1->conferences($conferenceSid); } protected function getRooms(): \Twilio\Rest\Insights\V1\RoomList { return $this->v1->rooms; } /** * @param string $roomSid The SID of the Room resource. */ protected function contextRooms(string $roomSid): \Twilio\Rest\Insights\V1\RoomContext { return $this->v1->rooms($roomSid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights]'; } }PKt[6Twilio/Rest/Bulkexports/V1/ExportConfigurationList.phpnu[solution = []; } /** * Constructs a ExportConfigurationContext * * @param string $resourceType The type of communication – Messages, Calls, * Conferences, and Participants */ public function getContext(string $resourceType): ExportConfigurationContext { return new ExportConfigurationContext($this->version, $resourceType); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.ExportConfigurationList]'; } }PKt[@? 9Twilio/Rest/Bulkexports/V1/ExportConfigurationContext.phpnu[solution = ['resourceType' => $resourceType, ]; $this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Configuration'; } /** * Fetch the ExportConfigurationInstance * * @return ExportConfigurationInstance Fetched ExportConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExportConfigurationInstance { $payload = $this->version->fetch('GET', $this->uri); return new ExportConfigurationInstance($this->version, $payload, $this->solution['resourceType']); } /** * Update the ExportConfigurationInstance * * @param array|Options $options Optional Arguments * @return ExportConfigurationInstance Updated ExportConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ExportConfigurationInstance { $options = new Values($options); $data = Values::of([ 'Enabled' => Serialize::booleanToString($options['enabled']), 'WebhookUrl' => $options['webhookUrl'], 'WebhookMethod' => $options['webhookMethod'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ExportConfigurationInstance($this->version, $payload, $this->solution['resourceType']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Bulkexports.V1.ExportConfigurationContext ' . \implode(' ', $context) . ']'; } }PKt[{kx5)Twilio/Rest/Bulkexports/V1/ExportPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExportInstance \Twilio\Rest\Bulkexports\V1\ExportInstance */ public function buildInstance(array $payload): ExportInstance { return new ExportInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.ExportPage]'; } }PKt[C:Twilio/Rest/Bulkexports/V1/ExportConfigurationInstance.phpnu[properties = [ 'enabled' => Values::array_get($payload, 'enabled'), 'webhookUrl' => Values::array_get($payload, 'webhook_url'), 'webhookMethod' => Values::array_get($payload, 'webhook_method'), 'resourceType' => Values::array_get($payload, 'resource_type'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['resourceType' => $resourceType ?: $this->properties['resourceType'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ExportConfigurationContext Context for this * ExportConfigurationInstance */ protected function proxy(): ExportConfigurationContext { if (!$this->context) { $this->context = new ExportConfigurationContext($this->version, $this->solution['resourceType']); } return $this->context; } /** * Fetch the ExportConfigurationInstance * * @return ExportConfigurationInstance Fetched ExportConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExportConfigurationInstance { return $this->proxy()->fetch(); } /** * Update the ExportConfigurationInstance * * @param array|Options $options Optional Arguments * @return ExportConfigurationInstance Updated ExportConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ExportConfigurationInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Bulkexports.V1.ExportConfigurationInstance ' . \implode(' ', $context) . ']'; } }PKt[0O O -Twilio/Rest/Bulkexports/V1/ExportInstance.phpnu[properties = [ 'resourceType' => Values::array_get($payload, 'resource_type'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['resourceType' => $resourceType ?: $this->properties['resourceType'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ExportContext Context for this ExportInstance */ protected function proxy(): ExportContext { if (!$this->context) { $this->context = new ExportContext($this->version, $this->solution['resourceType']); } return $this->context; } /** * Fetch the ExportInstance * * @return ExportInstance Fetched ExportInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExportInstance { return $this->proxy()->fetch(); } /** * Access the days */ protected function getDays(): DayList { return $this->proxy()->days; } /** * Access the exportCustomJobs */ protected function getExportCustomJobs(): ExportCustomJobList { return $this->proxy()->exportCustomJobs; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Bulkexports.V1.ExportInstance ' . \implode(' ', $context) . ']'; } }PKt[++" " 9Twilio/Rest/Bulkexports/V1/ExportConfigurationOptions.phpnu[options['enabled'] = $enabled; $this->options['webhookUrl'] = $webhookUrl; $this->options['webhookMethod'] = $webhookMethod; } /** * If true, Twilio will automatically generate every day's file when the day is over. * * @param bool $enabled Whether files are automatically generated * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * Stores the URL destination for the method specified in webhook_method. * * @param string $webhookUrl URL targeted at export * @return $this Fluent Builder */ public function setWebhookUrl(string $webhookUrl): self { $this->options['webhookUrl'] = $webhookUrl; return $this; } /** * Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url * * @param string $webhookMethod Whether to GET or POST to the webhook url * @return $this Fluent Builder */ public function setWebhookMethod(string $webhookMethod): self { $this->options['webhookMethod'] = $webhookMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Bulkexports.V1.UpdateExportConfigurationOptions ' . $options . ']'; } }PKt[Bs s )Twilio/Rest/Bulkexports/V1/ExportList.phpnu[solution = []; } /** * Access the jobs */ protected function getJobs(): JobList { if (!$this->_jobs) { $this->_jobs = new JobList($this->version); } return $this->_jobs; } /** * Constructs a ExportContext * * @param string $resourceType The type of communication – Messages, Calls, * Conferences, and Participants */ public function getContext(string $resourceType): ExportContext { return new ExportContext($this->version, $resourceType); } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.ExportList]'; } }PKt[URR,Twilio/Rest/Bulkexports/V1/ExportContext.phpnu[solution = ['resourceType' => $resourceType, ]; $this->uri = '/Exports/' . \rawurlencode($resourceType) . ''; } /** * Fetch the ExportInstance * * @return ExportInstance Fetched ExportInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExportInstance { $payload = $this->version->fetch('GET', $this->uri); return new ExportInstance($this->version, $payload, $this->solution['resourceType']); } /** * Access the days */ protected function getDays(): DayList { if (!$this->_days) { $this->_days = new DayList($this->version, $this->solution['resourceType']); } return $this->_days; } /** * Access the exportCustomJobs */ protected function getExportCustomJobs(): ExportCustomJobList { if (!$this->_exportCustomJobs) { $this->_exportCustomJobs = new ExportCustomJobList($this->version, $this->solution['resourceType']); } return $this->_exportCustomJobs; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Bulkexports.V1.ExportContext ' . \implode(' ', $context) . ']'; } }PKt[rl~~-Twilio/Rest/Bulkexports/V1/Export/JobPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return JobInstance \Twilio\Rest\Bulkexports\V1\Export\JobInstance */ public function buildInstance(array $payload): JobInstance { return new JobInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.JobPage]'; } }PKt[{"=%%0Twilio/Rest/Bulkexports/V1/Export/JobContext.phpnu[solution = ['jobSid' => $jobSid, ]; $this->uri = '/Exports/Jobs/' . \rawurlencode($jobSid) . ''; } /** * Fetch the JobInstance * * @return JobInstance Fetched JobInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): JobInstance { $payload = $this->version->fetch('GET', $this->uri); return new JobInstance($this->version, $payload, $this->solution['jobSid']); } /** * Delete the JobInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Bulkexports.V1.JobContext ' . \implode(' ', $context) . ']'; } }PKt[ND-Twilio/Rest/Bulkexports/V1/Export/DayPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DayInstance \Twilio\Rest\Bulkexports\V1\Export\DayInstance */ public function buildInstance(array $payload): DayInstance { return new DayInstance($this->version, $payload, $this->solution['resourceType']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.DayPage]'; } }PKt[ ]9Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExportCustomJobInstance \Twilio\Rest\Bulkexports\V1\Export\ExportCustomJobInstance */ public function buildInstance(array $payload): ExportCustomJobInstance { return new ExportCustomJobInstance($this->version, $payload, $this->solution['resourceType']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.ExportCustomJobPage]'; } }PKt[+21Twilio/Rest/Bulkexports/V1/Export/JobInstance.phpnu[properties = [ 'resourceType' => Values::array_get($payload, 'resource_type'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'details' => Values::array_get($payload, 'details'), 'startDay' => Values::array_get($payload, 'start_day'), 'endDay' => Values::array_get($payload, 'end_day'), 'jobSid' => Values::array_get($payload, 'job_sid'), 'webhookUrl' => Values::array_get($payload, 'webhook_url'), 'webhookMethod' => Values::array_get($payload, 'webhook_method'), 'email' => Values::array_get($payload, 'email'), 'url' => Values::array_get($payload, 'url'), 'jobQueuePosition' => Values::array_get($payload, 'job_queue_position'), 'estimatedCompletionTime' => Values::array_get($payload, 'estimated_completion_time'), ]; $this->solution = ['jobSid' => $jobSid ?: $this->properties['jobSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return JobContext Context for this JobInstance */ protected function proxy(): JobContext { if (!$this->context) { $this->context = new JobContext($this->version, $this->solution['jobSid']); } return $this->context; } /** * Fetch the JobInstance * * @return JobInstance Fetched JobInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): JobInstance { return $this->proxy()->fetch(); } /** * Delete the JobInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Bulkexports.V1.JobInstance ' . \implode(' ', $context) . ']'; } }PKt[r|-Twilio/Rest/Bulkexports/V1/Export/JobList.phpnu[solution = []; } /** * Constructs a JobContext * * @param string $jobSid The unique string that that we created to identify the * Bulk Export job */ public function getContext(string $jobSid): JobContext { return new JobContext($this->version, $jobSid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.JobList]'; } }PKt[//<Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobOptions.phpnu[options['webhookUrl'] = $webhookUrl; $this->options['webhookMethod'] = $webhookMethod; $this->options['email'] = $email; } /** * The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. If you set neither webhook nor email, you will have to check your job's status manually. * * @param string $webhookUrl The optional webhook url called on completion of * the job. If this is supplied, `WebhookMethod` must * also be supplied. * @return $this Fluent Builder */ public function setWebhookUrl(string $webhookUrl): self { $this->options['webhookUrl'] = $webhookUrl; return $this; } /** * This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. * * @param string $webhookMethod This is the method used to call the webhook on * completion of the job. If this is supplied, * `WebhookUrl` must also be supplied. * @return $this Fluent Builder */ public function setWebhookMethod(string $webhookMethod): self { $this->options['webhookMethod'] = $webhookMethod; return $this; } /** * The optional email to send the completion notification to. You can set both webhook, and email, or one or the other. If you set neither, the job will run but you will have to query to determine your job's status. * * @param string $email The optional email to send the completion notification * to * @return $this Fluent Builder */ public function setEmail(string $email): self { $this->options['email'] = $email; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Bulkexports.V1.CreateExportCustomJobOptions ' . $options . ']'; } }PKt[&KK9Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobList.phpnu[solution = ['resourceType' => $resourceType, ]; $this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Jobs'; } /** * Streams ExportCustomJobInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ExportCustomJobInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ExportCustomJobInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ExportCustomJobInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ExportCustomJobPage Page of ExportCustomJobInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ExportCustomJobPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ExportCustomJobPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ExportCustomJobInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ExportCustomJobPage Page of ExportCustomJobInstance */ public function getPage(string $targetUrl): ExportCustomJobPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ExportCustomJobPage($this->version, $response, $this->solution); } /** * Create the ExportCustomJobInstance * * @param string $startDay The start day for the custom export specified as a * string in the format of yyyy-mm-dd * @param string $endDay The end day for the custom export specified as a * string in the format of yyyy-mm-dd. End day is * inclusive and must be 2 days earlier than the current * UTC day. * @param string $friendlyName The friendly name specified when creating the job * @param array|Options $options Optional Arguments * @return ExportCustomJobInstance Created ExportCustomJobInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $startDay, string $endDay, string $friendlyName, array $options = []): ExportCustomJobInstance { $options = new Values($options); $data = Values::of([ 'StartDay' => $startDay, 'EndDay' => $endDay, 'FriendlyName' => $friendlyName, 'WebhookUrl' => $options['webhookUrl'], 'WebhookMethod' => $options['webhookMethod'], 'Email' => $options['email'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ExportCustomJobInstance($this->version, $payload, $this->solution['resourceType']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.ExportCustomJobList]'; } }PKt[.7q q =Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobInstance.phpnu[properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'resourceType' => Values::array_get($payload, 'resource_type'), 'startDay' => Values::array_get($payload, 'start_day'), 'endDay' => Values::array_get($payload, 'end_day'), 'webhookUrl' => Values::array_get($payload, 'webhook_url'), 'webhookMethod' => Values::array_get($payload, 'webhook_method'), 'email' => Values::array_get($payload, 'email'), 'jobSid' => Values::array_get($payload, 'job_sid'), 'details' => Values::array_get($payload, 'details'), 'jobQueuePosition' => Values::array_get($payload, 'job_queue_position'), 'estimatedCompletionTime' => Values::array_get($payload, 'estimated_completion_time'), ]; $this->solution = ['resourceType' => $resourceType, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.ExportCustomJobInstance]'; } }PKt[9c-Twilio/Rest/Bulkexports/V1/Export/DayList.phpnu[solution = ['resourceType' => $resourceType, ]; $this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Days'; } /** * Streams DayInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DayInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DayInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DayInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DayPage Page of DayInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DayPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DayPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DayInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DayPage Page of DayInstance */ public function getPage(string $targetUrl): DayPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DayPage($this->version, $response, $this->solution); } /** * Constructs a DayContext * * @param string $day The date of the data in the file */ public function getContext(string $day): DayContext { return new DayContext($this->version, $this->solution['resourceType'], $day); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.DayList]'; } }PKt[+q0Twilio/Rest/Bulkexports/V1/Export/DayContext.phpnu[solution = ['resourceType' => $resourceType, 'day' => $day, ]; $this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Days/' . \rawurlencode($day) . ''; } /** * Fetch the DayInstance * * @return DayInstance Fetched DayInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DayInstance { $payload = $this->version->fetch('GET', $this->uri); return new DayInstance( $this->version, $payload, $this->solution['resourceType'], $this->solution['day'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Bulkexports.V1.DayContext ' . \implode(' ', $context) . ']'; } }PKt[DxA A 1Twilio/Rest/Bulkexports/V1/Export/DayInstance.phpnu[properties = [ 'redirectTo' => Values::array_get($payload, 'redirect_to'), 'day' => Values::array_get($payload, 'day'), 'size' => Values::array_get($payload, 'size'), 'createDate' => Values::array_get($payload, 'create_date'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'resourceType' => Values::array_get($payload, 'resource_type'), ]; $this->solution = ['resourceType' => $resourceType, 'day' => $day ?: $this->properties['day'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DayContext Context for this DayInstance */ protected function proxy(): DayContext { if (!$this->context) { $this->context = new DayContext( $this->version, $this->solution['resourceType'], $this->solution['day'] ); } return $this->context; } /** * Fetch the DayInstance * * @return DayInstance Fetched DayInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DayInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Bulkexports.V1.DayInstance ' . \implode(' ', $context) . ']'; } }PKt[Ve/6Twilio/Rest/Bulkexports/V1/ExportConfigurationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExportConfigurationInstance \Twilio\Rest\Bulkexports\V1\ExportConfigurationInstance */ public function buildInstance(array $payload): ExportConfigurationInstance { return new ExportConfigurationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1.ExportConfigurationPage]'; } }PKt[u% Twilio/Rest/Bulkexports/V1.phpnu[version = 'v1'; } protected function getExports(): ExportList { if (!$this->_exports) { $this->_exports = new ExportList($this); } return $this->_exports; } protected function getExportConfiguration(): ExportConfigurationList { if (!$this->_exportConfiguration) { $this->_exportConfiguration = new ExportConfigurationList($this); } return $this->_exportConfiguration; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Bulkexports.V1]'; } }PKt[Twilio/Rest/Client.phpnu[environment = $environment ?: \getenv(); $this->username = $this->getArg($username, self::ENV_ACCOUNT_SID); $this->password = $this->getArg($password, self::ENV_AUTH_TOKEN); $this->region = $this->getArg($region, self::ENV_REGION); $this->edge = $this->getArg(null, self::ENV_EDGE); $this->logLevel = $this->getArg(null, self::ENV_LOG); $this->userAgentExtensions = $userAgentExtensions ?: []; if (!$this->username || !$this->password) { throw new ConfigurationException('Credentials are required to create a Client'); } $this->accountSid = $accountSid ?: $this->username; if ($httpClient) { $this->httpClient = $httpClient; } else { $this->httpClient = new CurlClient(); } } /** * Determines argument value accounting for environment variables. * * @param string $arg The constructor argument * @param string $envVar The environment variable name * @return ?string Argument value */ public function getArg(?string $arg, string $envVar): ?string { if ($arg) { return $arg; } if (\array_key_exists($envVar, $this->environment)) { return $this->environment[$envVar]; } return null; } /** * Makes a request to the Twilio API using the configured http client * Authentication information is automatically added if none is provided * * @param string $method HTTP Method * @param string $uri Fully qualified url * @param string[] $params Query string parameters * @param string[] $data POST body data * @param string[] $headers HTTP Headers * @param string $username User for Authentication * @param string $password Password for Authentication * @param int $timeout Timeout in seconds * @return \Twilio\Http\Response Response from the Twilio API */ public function request(string $method, string $uri, array $params = [], array $data = [], array $headers = [], string $username = null, string $password = null, int $timeout = null): \Twilio\Http\Response { $username = $username ?: $this->username; $password = $password ?: $this->password; $logLevel = (getenv('DEBUG_HTTP_TRAFFIC') === 'true' ? 'debug' : $this->getLogLevel()); $headers['User-Agent'] = 'twilio-php/' . VersionInfo::string() . ' (' . php_uname("s") . ' ' . php_uname("m") . ')' . ' PHP/' . PHP_VERSION; $headers['Accept-Charset'] = 'utf-8'; if ($this->userAgentExtensions) { $headers['User-Agent'] .= ' ' . implode(' ', $this->userAgentExtensions); } if (!\array_key_exists('Accept', $headers)) { $headers['Accept'] = 'application/json'; } $uri = $this->buildUri($uri); if ($logLevel === 'debug') { error_log('-- BEGIN Twilio API Request --'); error_log('Request Method: ' . $method); $u = parse_url($uri); if (isset($u['path'])) { error_log('Request URL: ' . $u['path']); } if (isset($u['query']) && strlen($u['query']) > 0) { error_log('Query Params: ' . $u['query']); } error_log('Request Headers: '); foreach ($headers as $key => $value) { if (strpos(strtolower($key), 'authorization') === false) { error_log("$key: $value"); } } error_log('-- END Twilio API Request --'); } $response = $this->getHttpClient()->request( $method, $uri, $params, $data, $headers, $username, $password, $timeout ); if ($logLevel === 'debug') { error_log('Status Code: ' . $response->getStatusCode()); error_log('Response Headers:'); $responseHeaders = $response->getHeaders(); foreach ($responseHeaders as $key => $value) { error_log("$key: $value"); } } return $response; } /** * Build the final request uri * * @param string $uri The original request uri * @return string Request uri */ public function buildUri(string $uri): string { if ($this->region == null && $this->edge == null) { return $uri; } $parsedUrl = \parse_url($uri); $pieces = \explode('.', $parsedUrl['host']); $product = $pieces[0]; $domain = \implode('.', \array_slice($pieces, -2)); $newEdge = $this->edge; $newRegion = $this->region; if (count($pieces) == 4) { // product.region.twilio.com $newRegion = $newRegion ?: $pieces[1]; } elseif (count($pieces) == 5) { // product.edge.region.twilio.com $newEdge = $newEdge ?: $pieces[1]; $newRegion = $newRegion ?: $pieces[2]; } if ($newEdge != null && $newRegion == null) { $newRegion = self::DEFAULT_REGION; } $parsedUrl['host'] = \implode('.', \array_filter([$product, $newEdge, $newRegion, $domain])); return RequestValidator::unparse_url($parsedUrl); } /** * Retrieve the Username * * @return string Current Username */ public function getUsername(): string { return $this->username; } /** * Retrieve the Password * * @return string Current Password */ public function getPassword(): string { return $this->password; } /** * Retrieve the AccountSid * * @return string Current AccountSid */ public function getAccountSid(): string { return $this->accountSid; } /** * Retrieve the Region * * @return string Current Region */ public function getRegion(): string { return $this->region; } /** * Retrieve the Edge * * @return string Current Edge */ public function getEdge(): string { return $this->edge; } /** * Set Edge * * @param string $uri Edge to use, unsets the Edge when called with no arguments */ public function setEdge(string $edge = null): void { $this->edge = $this->getArg($edge, self::ENV_EDGE); } /** * Retrieve the HttpClient * * @return HttpClient Current HttpClient */ public function getHttpClient(): HttpClient { return $this->httpClient; } /** * Set the HttpClient * * @param HttpClient $httpClient HttpClient to use */ public function setHttpClient(HttpClient $httpClient): void { $this->httpClient = $httpClient; } /** * Retrieve the log level * * @return ?string Current log level */ public function getLogLevel(): ?string { return $this->logLevel; } /** * Set log level to debug * * @param string $logLevel log level to use */ public function setLogLevel(string $logLevel = null): void { $this->logLevel = $this->getArg($logLevel, self::ENV_LOG); } /** * Access the Accounts Twilio Domain * * @return Accounts Accounts Twilio Domain */ protected function getAccounts(): Accounts { if (!$this->_accounts) { $this->_accounts = new Accounts($this); } return $this->_accounts; } /** * Access the Api Twilio Domain * * @return Api Api Twilio Domain */ protected function getApi(): Api { if (!$this->_api) { $this->_api = new Api($this); } return $this->_api; } /** * @return \Twilio\Rest\Api\V2010\AccountContext Account provided as the * authenticating account */ public function getAccount(): \Twilio\Rest\Api\V2010\AccountContext { return $this->api->v2010->account; } protected function getAddresses(): \Twilio\Rest\Api\V2010\Account\AddressList { return $this->api->v2010->account->addresses; } /** * @param string $sid The unique string that identifies the resource */ protected function contextAddresses(string $sid): \Twilio\Rest\Api\V2010\Account\AddressContext { return $this->api->v2010->account->addresses($sid); } protected function getApplications(): \Twilio\Rest\Api\V2010\Account\ApplicationList { return $this->api->v2010->account->applications; } /** * @param string $sid The unique string that identifies the resource */ protected function contextApplications(string $sid): \Twilio\Rest\Api\V2010\Account\ApplicationContext { return $this->api->v2010->account->applications($sid); } protected function getAuthorizedConnectApps(): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList { return $this->api->v2010->account->authorizedConnectApps; } /** * @param string $connectAppSid The SID of the Connect App to fetch */ protected function contextAuthorizedConnectApps(string $connectAppSid): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext { return $this->api->v2010->account->authorizedConnectApps($connectAppSid); } protected function getAvailablePhoneNumbers(): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList { return $this->api->v2010->account->availablePhoneNumbers; } /** * @param string $countryCode The ISO country code of the country to fetch * available phone number information about */ protected function contextAvailablePhoneNumbers(string $countryCode): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext { return $this->api->v2010->account->availablePhoneNumbers($countryCode); } protected function getBalance(): \Twilio\Rest\Api\V2010\Account\BalanceList { return $this->api->v2010->account->balance; } protected function getCalls(): \Twilio\Rest\Api\V2010\Account\CallList { return $this->api->v2010->account->calls; } /** * @param string $sid The SID of the Call resource to fetch */ protected function contextCalls(string $sid): \Twilio\Rest\Api\V2010\Account\CallContext { return $this->api->v2010->account->calls($sid); } protected function getConferences(): \Twilio\Rest\Api\V2010\Account\ConferenceList { return $this->api->v2010->account->conferences; } /** * @param string $sid The unique string that identifies this resource */ protected function contextConferences(string $sid): \Twilio\Rest\Api\V2010\Account\ConferenceContext { return $this->api->v2010->account->conferences($sid); } protected function getConnectApps(): \Twilio\Rest\Api\V2010\Account\ConnectAppList { return $this->api->v2010->account->connectApps; } /** * @param string $sid The unique string that identifies the resource */ protected function contextConnectApps(string $sid): \Twilio\Rest\Api\V2010\Account\ConnectAppContext { return $this->api->v2010->account->connectApps($sid); } protected function getIncomingPhoneNumbers(): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList { return $this->api->v2010->account->incomingPhoneNumbers; } /** * @param string $sid The unique string that identifies the resource */ protected function contextIncomingPhoneNumbers(string $sid): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext { return $this->api->v2010->account->incomingPhoneNumbers($sid); } protected function getKeys(): \Twilio\Rest\Api\V2010\Account\KeyList { return $this->api->v2010->account->keys; } /** * @param string $sid The unique string that identifies the resource */ protected function contextKeys(string $sid): \Twilio\Rest\Api\V2010\Account\KeyContext { return $this->api->v2010->account->keys($sid); } protected function getMessages(): \Twilio\Rest\Api\V2010\Account\MessageList { return $this->api->v2010->account->messages; } /** * @param string $sid The unique string that identifies the resource */ protected function contextMessages(string $sid): \Twilio\Rest\Api\V2010\Account\MessageContext { return $this->api->v2010->account->messages($sid); } protected function getNewKeys(): \Twilio\Rest\Api\V2010\Account\NewKeyList { return $this->api->v2010->account->newKeys; } protected function getNewSigningKeys(): \Twilio\Rest\Api\V2010\Account\NewSigningKeyList { return $this->api->v2010->account->newSigningKeys; } protected function getNotifications(): \Twilio\Rest\Api\V2010\Account\NotificationList { return $this->api->v2010->account->notifications; } /** * @param string $sid The unique string that identifies the resource */ protected function contextNotifications(string $sid): \Twilio\Rest\Api\V2010\Account\NotificationContext { return $this->api->v2010->account->notifications($sid); } protected function getOutgoingCallerIds(): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList { return $this->api->v2010->account->outgoingCallerIds; } /** * @param string $sid The unique string that identifies the resource */ protected function contextOutgoingCallerIds(string $sid): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext { return $this->api->v2010->account->outgoingCallerIds($sid); } protected function getQueues(): \Twilio\Rest\Api\V2010\Account\QueueList { return $this->api->v2010->account->queues; } /** * @param string $sid The unique string that identifies this resource */ protected function contextQueues(string $sid): \Twilio\Rest\Api\V2010\Account\QueueContext { return $this->api->v2010->account->queues($sid); } protected function getRecordings(): \Twilio\Rest\Api\V2010\Account\RecordingList { return $this->api->v2010->account->recordings; } /** * @param string $sid The unique string that identifies the resource */ protected function contextRecordings(string $sid): \Twilio\Rest\Api\V2010\Account\RecordingContext { return $this->api->v2010->account->recordings($sid); } protected function getSigningKeys(): \Twilio\Rest\Api\V2010\Account\SigningKeyList { return $this->api->v2010->account->signingKeys; } /** * @param string $sid The sid */ protected function contextSigningKeys(string $sid): \Twilio\Rest\Api\V2010\Account\SigningKeyContext { return $this->api->v2010->account->signingKeys($sid); } protected function getSip(): \Twilio\Rest\Api\V2010\Account\SipList { return $this->api->v2010->account->sip; } protected function getShortCodes(): \Twilio\Rest\Api\V2010\Account\ShortCodeList { return $this->api->v2010->account->shortCodes; } /** * @param string $sid The unique string that identifies this resource */ protected function contextShortCodes(string $sid): \Twilio\Rest\Api\V2010\Account\ShortCodeContext { return $this->api->v2010->account->shortCodes($sid); } protected function getTokens(): \Twilio\Rest\Api\V2010\Account\TokenList { return $this->api->v2010->account->tokens; } protected function getTranscriptions(): \Twilio\Rest\Api\V2010\Account\TranscriptionList { return $this->api->v2010->account->transcriptions; } /** * @param string $sid The unique string that identifies the resource */ protected function contextTranscriptions(string $sid): \Twilio\Rest\Api\V2010\Account\TranscriptionContext { return $this->api->v2010->account->transcriptions($sid); } protected function getUsage(): \Twilio\Rest\Api\V2010\Account\UsageList { return $this->api->v2010->account->usage; } protected function getValidationRequests(): \Twilio\Rest\Api\V2010\Account\ValidationRequestList { return $this->api->v2010->account->validationRequests; } /** * Access the Autopilot Twilio Domain * * @return Autopilot Autopilot Twilio Domain */ protected function getAutopilot(): Autopilot { if (!$this->_autopilot) { $this->_autopilot = new Autopilot($this); } return $this->_autopilot; } /** * Access the Chat Twilio Domain * * @return Chat Chat Twilio Domain */ protected function getChat(): Chat { if (!$this->_chat) { $this->_chat = new Chat($this); } return $this->_chat; } /** * Access the Content Twilio Domain * * @return Content Content Twilio Domain */ protected function getContent(): Content { if (!$this->_content) { $this->_content = new Content($this); } return $this->_content; } /** * Access the Conversations Twilio Domain * * @return Conversations Conversations Twilio Domain */ protected function getConversations(): Conversations { if (!$this->_conversations) { $this->_conversations = new Conversations($this); } return $this->_conversations; } /** * Access the Events Twilio Domain * * @return Events Events Twilio Domain */ protected function getEvents(): Events { if (!$this->_events) { $this->_events = new Events($this); } return $this->_events; } /** * Access the FlexApi Twilio Domain * * @return FlexApi FlexApi Twilio Domain */ protected function getFlexApi(): FlexApi { if (!$this->_flexApi) { $this->_flexApi = new FlexApi($this); } return $this->_flexApi; } /** * Access the FrontlineApi Twilio Domain * * @return FrontlineApi FrontlineApi Twilio Domain */ protected function getFrontlineApi(): FrontlineApi { if (!$this->_frontlineApi) { $this->_frontlineApi = new FrontlineApi($this); } return $this->_frontlineApi; } /** * Access the Insights Twilio Domain * * @return Insights Insights Twilio Domain */ protected function getInsights(): Insights { if (!$this->_insights) { $this->_insights = new Insights($this); } return $this->_insights; } /** * Access the IpMessaging Twilio Domain * * @return IpMessaging IpMessaging Twilio Domain */ protected function getIpMessaging(): IpMessaging { if (!$this->_ipMessaging) { $this->_ipMessaging = new IpMessaging($this); } return $this->_ipMessaging; } /** * Access the Lookups Twilio Domain * * @return Lookups Lookups Twilio Domain */ protected function getLookups(): Lookups { if (!$this->_lookups) { $this->_lookups = new Lookups($this); } return $this->_lookups; } /** * Access the Media Twilio Domain * * @return Media Media Twilio Domain */ protected function getMedia(): Media { if (!$this->_media) { $this->_media = new Media($this); } return $this->_media; } /** * Access the Messaging Twilio Domain * * @return Messaging Messaging Twilio Domain */ protected function getMessaging(): Messaging { if (!$this->_messaging) { $this->_messaging = new Messaging($this); } return $this->_messaging; } /** * Access the Monitor Twilio Domain * * @return Monitor Monitor Twilio Domain */ protected function getMonitor(): Monitor { if (!$this->_monitor) { $this->_monitor = new Monitor($this); } return $this->_monitor; } /** * Access the Notify Twilio Domain * * @return Notify Notify Twilio Domain */ protected function getNotify(): Notify { if (!$this->_notify) { $this->_notify = new Notify($this); } return $this->_notify; } /** * Access the Numbers Twilio Domain * * @return Numbers Numbers Twilio Domain */ protected function getNumbers(): Numbers { if (!$this->_numbers) { $this->_numbers = new Numbers($this); } return $this->_numbers; } /** * Access the Oauth Twilio Domain * * @return Oauth Oauth Twilio Domain */ protected function getOauth(): Oauth { if (!$this->_oauth) { $this->_oauth = new Oauth($this); } return $this->_oauth; } /** * Access the Preview Twilio Domain * * @return Preview Preview Twilio Domain */ protected function getPreview(): Preview { if (!$this->_preview) { $this->_preview = new Preview($this); } return $this->_preview; } /** * Access the Pricing Twilio Domain * * @return Pricing Pricing Twilio Domain */ protected function getPricing(): Pricing { if (!$this->_pricing) { $this->_pricing = new Pricing($this); } return $this->_pricing; } /** * Access the Proxy Twilio Domain * * @return Proxy Proxy Twilio Domain */ protected function getProxy(): Proxy { if (!$this->_proxy) { $this->_proxy = new Proxy($this); } return $this->_proxy; } /** * Access the Routes Twilio Domain * * @return Routes Routes Twilio Domain */ protected function getRoutes(): Routes { if (!$this->_routes) { $this->_routes = new Routes($this); } return $this->_routes; } /** * Access the Serverless Twilio Domain * * @return Serverless Serverless Twilio Domain */ protected function getServerless(): Serverless { if (!$this->_serverless) { $this->_serverless = new Serverless($this); } return $this->_serverless; } /** * Access the Studio Twilio Domain * * @return Studio Studio Twilio Domain */ protected function getStudio(): Studio { if (!$this->_studio) { $this->_studio = new Studio($this); } return $this->_studio; } /** * Access the Sync Twilio Domain * * @return Sync Sync Twilio Domain */ protected function getSync(): Sync { if (!$this->_sync) { $this->_sync = new Sync($this); } return $this->_sync; } /** * Access the Taskrouter Twilio Domain * * @return Taskrouter Taskrouter Twilio Domain */ protected function getTaskrouter(): Taskrouter { if (!$this->_taskrouter) { $this->_taskrouter = new Taskrouter($this); } return $this->_taskrouter; } /** * Access the Trunking Twilio Domain * * @return Trunking Trunking Twilio Domain */ protected function getTrunking(): Trunking { if (!$this->_trunking) { $this->_trunking = new Trunking($this); } return $this->_trunking; } /** * Access the Trusthub Twilio Domain * * @return Trusthub Trusthub Twilio Domain */ protected function getTrusthub(): Trusthub { if (!$this->_trusthub) { $this->_trusthub = new Trusthub($this); } return $this->_trusthub; } /** * Access the Verify Twilio Domain * * @return Verify Verify Twilio Domain */ protected function getVerify(): Verify { if (!$this->_verify) { $this->_verify = new Verify($this); } return $this->_verify; } /** * Access the Video Twilio Domain * * @return Video Video Twilio Domain */ protected function getVideo(): Video { if (!$this->_video) { $this->_video = new Video($this); } return $this->_video; } /** * Access the Voice Twilio Domain * * @return Voice Voice Twilio Domain */ protected function getVoice(): Voice { if (!$this->_voice) { $this->_voice = new Voice($this); } return $this->_voice; } /** * Access the Wireless Twilio Domain * * @return Wireless Wireless Twilio Domain */ protected function getWireless(): Wireless { if (!$this->_wireless) { $this->_wireless = new Wireless($this); } return $this->_wireless; } /** * Access the Supersim Twilio Domain * * @return Supersim Supersim Twilio Domain */ protected function getSupersim(): Supersim { if (!$this->_supersim) { $this->_supersim = new Supersim($this); } return $this->_supersim; } /** * Access the Bulkexports Twilio Domain * * @return Bulkexports Bulkexports Twilio Domain */ protected function getBulkexports(): Bulkexports { if (!$this->_bulkexports) { $this->_bulkexports = new Bulkexports($this); } return $this->_bulkexports; } /** * Access the Microvisor Twilio Domain * * @return Microvisor Microvisor Twilio Domain */ protected function getMicrovisor(): Microvisor { if (!$this->_microvisor) { $this->_microvisor = new Microvisor($this); } return $this->_microvisor; } /** * Magic getter to lazy load domains * * @param string $name Domain to return * @return \Twilio\Domain The requested domain * @throws TwilioException For unknown domains */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown domain ' . $name); } /** * Magic call to lazy load contexts * * @param string $name Context to return * @param mixed[] $arguments Context to return * @return \Twilio\InstanceContext The requested context * @throws TwilioException For unknown contexts */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Client ' . $this->getAccountSid() . ']'; } /** * Validates connection to new SSL certificate endpoint * * @param CurlClient $client * @throws TwilioException if request fails */ public function validateSslCertificate(CurlClient $client): void { $response = $client->request('GET', 'https://api.twilio.com:8443'); if ($response->getStatusCode() < 200 || $response->getStatusCode() > 300) { throw new TwilioException('Failed to validate SSL certificate'); } } }PKt[} Twilio/Rest/Content.phpnu[baseUrl = 'https://content.twilio.com'; } /** * @return V1 Version v1 of content */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getContents(): \Twilio\Rest\Content\V1\ContentList { return $this->v1->contents; } /** * @param string $sid The unique string that identifies the resource */ protected function contextContents(string $sid): \Twilio\Rest\Content\V1\ContentContext { return $this->v1->contents($sid); } protected function getLegacyContents(): \Twilio\Rest\Content\V1\LegacyContentList { return $this->v1->legacyContents; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Content]'; } }PKt[hhTwilio/Rest/Wireless.phpnu[baseUrl = 'https://wireless.twilio.com'; } /** * @return V1 Version v1 of wireless */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getUsageRecords(): \Twilio\Rest\Wireless\V1\UsageRecordList { return $this->v1->usageRecords; } protected function getCommands(): \Twilio\Rest\Wireless\V1\CommandList { return $this->v1->commands; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextCommands(string $sid): \Twilio\Rest\Wireless\V1\CommandContext { return $this->v1->commands($sid); } protected function getRatePlans(): \Twilio\Rest\Wireless\V1\RatePlanList { return $this->v1->ratePlans; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextRatePlans(string $sid): \Twilio\Rest\Wireless\V1\RatePlanContext { return $this->v1->ratePlans($sid); } protected function getSims(): \Twilio\Rest\Wireless\V1\SimList { return $this->v1->sims; } /** * @param string $sid The SID of the Sim resource to fetch */ protected function contextSims(string $sid): \Twilio\Rest\Wireless\V1\SimContext { return $this->v1->sims($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless]'; } }PKt[g8 Twilio/Rest/Oauth.phpnu[baseUrl = 'https://oauth.twilio.com'; } /** * @return V1 Version v1 of oauth */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getOauth(): \Twilio\Rest\Oauth\V1\OauthList { return $this->v1->oauth; } protected function contextOauth(): \Twilio\Rest\Oauth\V1\OauthContext { return $this->v1->oauth(); } protected function getDeviceCode(): \Twilio\Rest\Oauth\V1\DeviceCodeList { return $this->v1->deviceCode; } protected function getOpenidDiscovery(): \Twilio\Rest\Oauth\V1\OpenidDiscoveryList { return $this->v1->openidDiscovery; } protected function contextOpenidDiscovery(): \Twilio\Rest\Oauth\V1\OpenidDiscoveryContext { return $this->v1->openidDiscovery(); } protected function getToken(): \Twilio\Rest\Oauth\V1\TokenList { return $this->v1->token; } protected function getUserInfo(): \Twilio\Rest\Oauth\V1\UserInfoList { return $this->v1->userInfo; } protected function contextUserInfo(): \Twilio\Rest\Oauth\V1\UserInfoContext { return $this->v1->userInfo(); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth]'; } }PKt[hiAiA(Twilio/Rest/Trunking/V1/TrunkOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['domainName'] = $domainName; $this->options['disasterRecoveryUrl'] = $disasterRecoveryUrl; $this->options['disasterRecoveryMethod'] = $disasterRecoveryMethod; $this->options['transferMode'] = $transferMode; $this->options['secure'] = $secure; $this->options['cnamLookupEnabled'] = $cnamLookupEnabled; $this->options['transferCallerId'] = $transferCallerId; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. * * @param string $domainName The unique address you reserve on Twilio to which * you route your SIP traffic * @return $this Fluent Builder */ public function setDomainName(string $domainName): self { $this->options['domainName'] = $domainName; return $this; } /** * The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. * * @param string $disasterRecoveryUrl The HTTP URL that we should call if an * error occurs while sending SIP traffic * towards your configured Origination URL * @return $this Fluent Builder */ public function setDisasterRecoveryUrl(string $disasterRecoveryUrl): self { $this->options['disasterRecoveryUrl'] = $disasterRecoveryUrl; return $this; } /** * The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. * * @param string $disasterRecoveryMethod The HTTP method we should use to call * the disaster_recovery_url * @return $this Fluent Builder */ public function setDisasterRecoveryMethod(string $disasterRecoveryMethod): self { $this->options['disasterRecoveryMethod'] = $disasterRecoveryMethod; return $this; } /** * The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. * * @param string $transferMode The call transfer settings for the trunk * @return $this Fluent Builder */ public function setTransferMode(string $transferMode): self { $this->options['transferMode'] = $transferMode; return $this; } /** * Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. * * @param bool $secure Whether Secure Trunking is enabled for the trunk * @return $this Fluent Builder */ public function setSecure(bool $secure): self { $this->options['secure'] = $secure; return $this; } /** * Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. * * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup should * be enabled for the trunk * @return $this Fluent Builder */ public function setCnamLookupEnabled(bool $cnamLookupEnabled): self { $this->options['cnamLookupEnabled'] = $cnamLookupEnabled; return $this; } /** * Caller Id for transfer target. Can be: `from-transferee` (default) or `from-transferor`. * * @param string $transferCallerId Caller Id for transfer target * @return $this Fluent Builder */ public function setTransferCallerId(string $transferCallerId): self { $this->options['transferCallerId'] = $transferCallerId; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trunking.V1.CreateTrunkOptions ' . $options . ']'; } } class UpdateTrunkOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $domainName The unique address you reserve on Twilio to which * you route your SIP traffic * @param string $disasterRecoveryUrl The HTTP URL that we should call if an * error occurs while sending SIP traffic * towards your configured Origination URL * @param string $disasterRecoveryMethod The HTTP method we should use to call * the disaster_recovery_url * @param string $transferMode The call transfer settings for the trunk * @param bool $secure Whether Secure Trunking is enabled for the trunk * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup should * be enabled for the trunk * @param string $transferCallerId Caller Id for transfer target */ public function __construct(string $friendlyName = Values::NONE, string $domainName = Values::NONE, string $disasterRecoveryUrl = Values::NONE, string $disasterRecoveryMethod = Values::NONE, string $transferMode = Values::NONE, bool $secure = Values::NONE, bool $cnamLookupEnabled = Values::NONE, string $transferCallerId = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['domainName'] = $domainName; $this->options['disasterRecoveryUrl'] = $disasterRecoveryUrl; $this->options['disasterRecoveryMethod'] = $disasterRecoveryMethod; $this->options['transferMode'] = $transferMode; $this->options['secure'] = $secure; $this->options['cnamLookupEnabled'] = $cnamLookupEnabled; $this->options['transferCallerId'] = $transferCallerId; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. * * @param string $domainName The unique address you reserve on Twilio to which * you route your SIP traffic * @return $this Fluent Builder */ public function setDomainName(string $domainName): self { $this->options['domainName'] = $domainName; return $this; } /** * The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. * * @param string $disasterRecoveryUrl The HTTP URL that we should call if an * error occurs while sending SIP traffic * towards your configured Origination URL * @return $this Fluent Builder */ public function setDisasterRecoveryUrl(string $disasterRecoveryUrl): self { $this->options['disasterRecoveryUrl'] = $disasterRecoveryUrl; return $this; } /** * The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. * * @param string $disasterRecoveryMethod The HTTP method we should use to call * the disaster_recovery_url * @return $this Fluent Builder */ public function setDisasterRecoveryMethod(string $disasterRecoveryMethod): self { $this->options['disasterRecoveryMethod'] = $disasterRecoveryMethod; return $this; } /** * The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. * * @param string $transferMode The call transfer settings for the trunk * @return $this Fluent Builder */ public function setTransferMode(string $transferMode): self { $this->options['transferMode'] = $transferMode; return $this; } /** * Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. * * @param bool $secure Whether Secure Trunking is enabled for the trunk * @return $this Fluent Builder */ public function setSecure(bool $secure): self { $this->options['secure'] = $secure; return $this; } /** * Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. * * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup should * be enabled for the trunk * @return $this Fluent Builder */ public function setCnamLookupEnabled(bool $cnamLookupEnabled): self { $this->options['cnamLookupEnabled'] = $cnamLookupEnabled; return $this; } /** * Caller Id for transfer target. Can be: `from-transferee` (default) or `from-transferor`. * * @param string $transferCallerId Caller Id for transfer target * @return $this Fluent Builder */ public function setTransferCallerId(string $transferCallerId): self { $this->options['transferCallerId'] = $transferCallerId; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trunking.V1.UpdateTrunkOptions ' . $options . ']'; } }PKt[hss%Twilio/Rest/Trunking/V1/TrunkPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TrunkInstance \Twilio\Rest\Trunking\V1\TrunkInstance */ public function buildInstance(array $payload): TrunkInstance { return new TrunkInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.TrunkPage]'; } }PKt[Uå)Twilio/Rest/Trunking/V1/TrunkInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'domainName' => Values::array_get($payload, 'domain_name'), 'disasterRecoveryMethod' => Values::array_get($payload, 'disaster_recovery_method'), 'disasterRecoveryUrl' => Values::array_get($payload, 'disaster_recovery_url'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'secure' => Values::array_get($payload, 'secure'), 'recording' => Values::array_get($payload, 'recording'), 'transferMode' => Values::array_get($payload, 'transfer_mode'), 'transferCallerId' => Values::array_get($payload, 'transfer_caller_id'), 'cnamLookupEnabled' => Values::array_get($payload, 'cnam_lookup_enabled'), 'authType' => Values::array_get($payload, 'auth_type'), 'authTypeSet' => Values::array_get($payload, 'auth_type_set'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TrunkContext Context for this TrunkInstance */ protected function proxy(): TrunkContext { if (!$this->context) { $this->context = new TrunkContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the TrunkInstance * * @return TrunkInstance Fetched TrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrunkInstance { return $this->proxy()->fetch(); } /** * Delete the TrunkInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the TrunkInstance * * @param array|Options $options Optional Arguments * @return TrunkInstance Updated TrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TrunkInstance { return $this->proxy()->update($options); } /** * Access the originationUrls */ protected function getOriginationUrls(): OriginationUrlList { return $this->proxy()->originationUrls; } /** * Access the credentialsLists */ protected function getCredentialsLists(): CredentialListList { return $this->proxy()->credentialsLists; } /** * Access the ipAccessControlLists */ protected function getIpAccessControlLists(): IpAccessControlListList { return $this->proxy()->ipAccessControlLists; } /** * Access the phoneNumbers */ protected function getPhoneNumbers(): PhoneNumberList { return $this->proxy()->phoneNumbers; } /** * Access the recordings */ protected function getRecordings(): RecordingList { return $this->proxy()->recordings; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.TrunkInstance ' . \implode(' ', $context) . ']'; } }PKt[Yp_T<<(Twilio/Rest/Trunking/V1/TrunkContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Trunks/' . \rawurlencode($sid) . ''; } /** * Fetch the TrunkInstance * * @return TrunkInstance Fetched TrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrunkInstance { $payload = $this->version->fetch('GET', $this->uri); return new TrunkInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the TrunkInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the TrunkInstance * * @param array|Options $options Optional Arguments * @return TrunkInstance Updated TrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TrunkInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DomainName' => $options['domainName'], 'DisasterRecoveryUrl' => $options['disasterRecoveryUrl'], 'DisasterRecoveryMethod' => $options['disasterRecoveryMethod'], 'TransferMode' => $options['transferMode'], 'Secure' => Serialize::booleanToString($options['secure']), 'CnamLookupEnabled' => Serialize::booleanToString($options['cnamLookupEnabled']), 'TransferCallerId' => $options['transferCallerId'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TrunkInstance($this->version, $payload, $this->solution['sid']); } /** * Access the originationUrls */ protected function getOriginationUrls(): OriginationUrlList { if (!$this->_originationUrls) { $this->_originationUrls = new OriginationUrlList($this->version, $this->solution['sid']); } return $this->_originationUrls; } /** * Access the credentialsLists */ protected function getCredentialsLists(): CredentialListList { if (!$this->_credentialsLists) { $this->_credentialsLists = new CredentialListList($this->version, $this->solution['sid']); } return $this->_credentialsLists; } /** * Access the ipAccessControlLists */ protected function getIpAccessControlLists(): IpAccessControlListList { if (!$this->_ipAccessControlLists) { $this->_ipAccessControlLists = new IpAccessControlListList($this->version, $this->solution['sid']); } return $this->_ipAccessControlLists; } /** * Access the phoneNumbers */ protected function getPhoneNumbers(): PhoneNumberList { if (!$this->_phoneNumbers) { $this->_phoneNumbers = new PhoneNumberList($this->version, $this->solution['sid']); } return $this->_phoneNumbers; } /** * Access the recordings */ protected function getRecordings(): RecordingList { if (!$this->_recordings) { $this->_recordings = new RecordingList($this->version, $this->solution['sid']); } return $this->_recordings; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.TrunkContext ' . \implode(' ', $context) . ']'; } }PKt[`DD%Twilio/Rest/Trunking/V1/TrunkList.phpnu[solution = []; $this->uri = '/Trunks'; } /** * Create the TrunkInstance * * @param array|Options $options Optional Arguments * @return TrunkInstance Created TrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): TrunkInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DomainName' => $options['domainName'], 'DisasterRecoveryUrl' => $options['disasterRecoveryUrl'], 'DisasterRecoveryMethod' => $options['disasterRecoveryMethod'], 'TransferMode' => $options['transferMode'], 'Secure' => Serialize::booleanToString($options['secure']), 'CnamLookupEnabled' => Serialize::booleanToString($options['cnamLookupEnabled']), 'TransferCallerId' => $options['transferCallerId'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TrunkInstance($this->version, $payload); } /** * Streams TrunkInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TrunkInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TrunkInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of TrunkInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TrunkPage Page of TrunkInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TrunkPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TrunkPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TrunkInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TrunkPage Page of TrunkInstance */ public function getPage(string $targetUrl): TrunkPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TrunkPage($this->version, $response, $this->solution); } /** * Constructs a TrunkContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): TrunkContext { return new TrunkContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.TrunkList]'; } }PKt[ 9Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return IpAccessControlListInstance \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListInstance */ public function buildInstance(array $payload): IpAccessControlListInstance { return new IpAccessControlListInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.IpAccessControlListPage]'; } }PKt[}0''/Twilio/Rest/Trunking/V1/Trunk/RecordingList.phpnu[solution = ['trunkSid' => $trunkSid, ]; } /** * Constructs a RecordingContext */ public function getContext(): RecordingContext { return new RecordingContext($this->version, $this->solution['trunkSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.RecordingList]'; } }PKt[pxC4Twilio/Rest/Trunking/V1/Trunk/OriginationUrlPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return OriginationUrlInstance \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlInstance */ public function buildInstance(array $payload): OriginationUrlInstance { return new OriginationUrlInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.OriginationUrlPage]'; } }PKt[rTE  2Twilio/Rest/Trunking/V1/Trunk/RecordingOptions.phpnu[options['mode'] = $mode; $this->options['trim'] = $trim; } /** * The recording mode for the trunk. Can be do-not-record (default), record-from-ringing, record-from-answer, record-from-ringing-dual, or record-from-answer-dual. * * @param string $mode The recording mode for the trunk. * @return $this Fluent Builder */ public function setMode(string $mode): self { $this->options['mode'] = $mode; return $this; } /** * The recording trim setting for the trunk. Can be do-not-trim (default) or trim-silence. * * @param string $trim The recording trim setting for the trunk. * @return $this Fluent Builder */ public function setTrim(string $trim): self { $this->options['trim'] = $trim; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trunking.V1.UpdateRecordingOptions ' . $options . ']'; } }PKt[Q@2Twilio/Rest/Trunking/V1/Trunk/RecordingContext.phpnu[solution = ['trunkSid' => $trunkSid, ]; $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/Recording'; } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { $payload = $this->version->fetch('GET', $this->uri); return new RecordingInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Update the RecordingInstance * * @param array|Options $options Optional Arguments * @return RecordingInstance Updated RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): RecordingInstance { $options = new Values($options); $data = Values::of(['Mode' => $options['mode'], 'Trim' => $options['trim'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RecordingInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.RecordingContext ' . \implode(' ', $context) . ']'; } }PKt[y4Twilio/Rest/Trunking/V1/Trunk/CredentialListPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialListInstance \Twilio\Rest\Trunking\V1\Trunk\CredentialListInstance */ public function buildInstance(array $payload): CredentialListInstance { return new CredentialListInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.CredentialListPage]'; } }PKt[9_r1Twilio/Rest/Trunking/V1/Trunk/PhoneNumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PhoneNumberInstance \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberInstance */ public function buildInstance(array $payload): PhoneNumberInstance { return new PhoneNumberInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.PhoneNumberPage]'; } }PKt[ܸ * * 3Twilio/Rest/Trunking/V1/Trunk/RecordingInstance.phpnu[properties = [ 'mode' => Values::array_get($payload, 'mode'), 'trim' => Values::array_get($payload, 'trim'), ]; $this->solution = ['trunkSid' => $trunkSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RecordingContext Context for this RecordingInstance */ protected function proxy(): RecordingContext { if (!$this->context) { $this->context = new RecordingContext($this->version, $this->solution['trunkSid']); } return $this->context; } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { return $this->proxy()->fetch(); } /** * Update the RecordingInstance * * @param array|Options $options Optional Arguments * @return RecordingInstance Updated RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): RecordingInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.RecordingInstance ' . \implode(' ', $context) . ']'; } }PKt[?;S=Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IpAccessControlListContext Context for this * IpAccessControlListInstance */ protected function proxy(): IpAccessControlListContext { if (!$this->context) { $this->context = new IpAccessControlListContext( $this->version, $this->solution['trunkSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the IpAccessControlListInstance * * @return IpAccessControlListInstance Fetched IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAccessControlListInstance { return $this->proxy()->fetch(); } /** * Delete the IpAccessControlListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.IpAccessControlListInstance ' . \implode(' ', $context) . ']'; } }PKt[CBB4Twilio/Rest/Trunking/V1/Trunk/PhoneNumberContext.phpnu[solution = ['trunkSid' => $trunkSid, 'sid' => $sid, ]; $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/PhoneNumbers/' . \rawurlencode($sid) . ''; } /** * Fetch the PhoneNumberInstance * * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PhoneNumberInstance { $payload = $this->version->fetch('GET', $this->uri); return new PhoneNumberInstance( $this->version, $payload, $this->solution['trunkSid'], $this->solution['sid'] ); } /** * Delete the PhoneNumberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.PhoneNumberContext ' . \implode(' ', $context) . ']'; } }PKt[HT9Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListList.phpnu[solution = ['trunkSid' => $trunkSid, ]; $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/IpAccessControlLists'; } /** * Create the IpAccessControlListInstance * * @param string $ipAccessControlListSid The SID of the IP Access Control List * that you want to associate with the * trunk * @return IpAccessControlListInstance Created IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $ipAccessControlListSid): IpAccessControlListInstance { $data = Values::of(['IpAccessControlListSid' => $ipAccessControlListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IpAccessControlListInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Streams IpAccessControlListInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads IpAccessControlListInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return IpAccessControlListInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of IpAccessControlListInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return IpAccessControlListPage Page of IpAccessControlListInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IpAccessControlListPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IpAccessControlListPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IpAccessControlListInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IpAccessControlListPage Page of IpAccessControlListInstance */ public function getPage(string $targetUrl): IpAccessControlListPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IpAccessControlListPage($this->version, $response, $this->solution); } /** * Constructs a IpAccessControlListContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): IpAccessControlListContext { return new IpAccessControlListContext($this->version, $this->solution['trunkSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.IpAccessControlListList]'; } }PKt[y(y) ) 7Twilio/Rest/Trunking/V1/Trunk/OriginationUrlContext.phpnu[solution = ['trunkSid' => $trunkSid, 'sid' => $sid, ]; $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/OriginationUrls/' . \rawurlencode($sid) . ''; } /** * Fetch the OriginationUrlInstance * * @return OriginationUrlInstance Fetched OriginationUrlInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): OriginationUrlInstance { $payload = $this->version->fetch('GET', $this->uri); return new OriginationUrlInstance( $this->version, $payload, $this->solution['trunkSid'], $this->solution['sid'] ); } /** * Delete the OriginationUrlInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the OriginationUrlInstance * * @param array|Options $options Optional Arguments * @return OriginationUrlInstance Updated OriginationUrlInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): OriginationUrlInstance { $options = new Values($options); $data = Values::of([ 'Weight' => $options['weight'], 'Priority' => $options['priority'], 'Enabled' => Serialize::booleanToString($options['enabled']), 'FriendlyName' => $options['friendlyName'], 'SipUrl' => $options['sipUrl'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new OriginationUrlInstance( $this->version, $payload, $this->solution['trunkSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.OriginationUrlContext ' . \implode(' ', $context) . ']'; } }PKt[c&%%8Twilio/Rest/Trunking/V1/Trunk/OriginationUrlInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'weight' => Values::array_get($payload, 'weight'), 'enabled' => Values::array_get($payload, 'enabled'), 'sipUrl' => Values::array_get($payload, 'sip_url'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'priority' => Values::array_get($payload, 'priority'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return OriginationUrlContext Context for this OriginationUrlInstance */ protected function proxy(): OriginationUrlContext { if (!$this->context) { $this->context = new OriginationUrlContext( $this->version, $this->solution['trunkSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the OriginationUrlInstance * * @return OriginationUrlInstance Fetched OriginationUrlInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): OriginationUrlInstance { return $this->proxy()->fetch(); } /** * Delete the OriginationUrlInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the OriginationUrlInstance * * @param array|Options $options Optional Arguments * @return OriginationUrlInstance Updated OriginationUrlInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): OriginationUrlInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.OriginationUrlInstance ' . \implode(' ', $context) . ']'; } }PKt[IG/Twilio/Rest/Trunking/V1/Trunk/RecordingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RecordingInstance \Twilio\Rest\Trunking\V1\Trunk\RecordingInstance */ public function buildInstance(array $payload): RecordingInstance { return new RecordingInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.RecordingPage]'; } }PKt[o087Twilio/Rest/Trunking/V1/Trunk/OriginationUrlOptions.phpnu[options['weight'] = $weight; $this->options['priority'] = $priority; $this->options['enabled'] = $enabled; $this->options['friendlyName'] = $friendlyName; $this->options['sipUrl'] = $sipUrl; } /** * The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. * * @param int $weight The value that determines the relative load the URI * should receive compared to others with the same priority * @return $this Fluent Builder */ public function setWeight(int $weight): self { $this->options['weight'] = $weight; return $this; } /** * The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI. * * @param int $priority The relative importance of the URI * @return $this Fluent Builder */ public function setPriority(int $priority): self { $this->options['priority'] = $priority; return $this; } /** * Whether the URL is enabled. The default is `true`. * * @param bool $enabled Whether the URL is enabled * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported. * * @param string $sipUrl The SIP address you want Twilio to route your * Origination calls to * @return $this Fluent Builder */ public function setSipUrl(string $sipUrl): self { $this->options['sipUrl'] = $sipUrl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trunking.V1.UpdateOriginationUrlOptions ' . $options . ']'; } }PKt[JRR8Twilio/Rest/Trunking/V1/Trunk/CredentialListInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialListContext Context for this CredentialListInstance */ protected function proxy(): CredentialListContext { if (!$this->context) { $this->context = new CredentialListContext( $this->version, $this->solution['trunkSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CredentialListInstance * * @return CredentialListInstance Fetched CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialListInstance { return $this->proxy()->fetch(); } /** * Delete the CredentialListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.CredentialListInstance ' . \implode(' ', $context) . ']'; } }PKt[11Twilio/Rest/Trunking/V1/Trunk/PhoneNumberList.phpnu[solution = ['trunkSid' => $trunkSid, ]; $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/PhoneNumbers'; } /** * Create the PhoneNumberInstance * * @param string $phoneNumberSid The SID of the Incoming Phone Number that you * want to associate with the trunk * @return PhoneNumberInstance Created PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumberSid): PhoneNumberInstance { $data = Values::of(['PhoneNumberSid' => $phoneNumberSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new PhoneNumberInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Streams PhoneNumberInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads PhoneNumberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return PhoneNumberInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of PhoneNumberInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return PhoneNumberPage Page of PhoneNumberInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): PhoneNumberPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new PhoneNumberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of PhoneNumberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return PhoneNumberPage Page of PhoneNumberInstance */ public function getPage(string $targetUrl): PhoneNumberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new PhoneNumberPage($this->version, $response, $this->solution); } /** * Constructs a PhoneNumberContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): PhoneNumberContext { return new PhoneNumberContext($this->version, $this->solution['trunkSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.PhoneNumberList]'; } }PKt[MKK4Twilio/Rest/Trunking/V1/Trunk/CredentialListList.phpnu[solution = ['trunkSid' => $trunkSid, ]; $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/CredentialLists'; } /** * Create the CredentialListInstance * * @param string $credentialListSid The SID of the Credential List that you * want to associate with the trunk * @return CredentialListInstance Created CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $credentialListSid): CredentialListInstance { $data = Values::of(['CredentialListSid' => $credentialListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialListInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Streams CredentialListInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CredentialListInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CredentialListInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CredentialListInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CredentialListPage Page of CredentialListInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialListPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialListPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialListInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialListPage Page of CredentialListInstance */ public function getPage(string $targetUrl): CredentialListPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialListPage($this->version, $response, $this->solution); } /** * Constructs a CredentialListContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): CredentialListContext { return new CredentialListContext($this->version, $this->solution['trunkSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.CredentialListList]'; } }PKt[cj@[[7Twilio/Rest/Trunking/V1/Trunk/CredentialListContext.phpnu[solution = ['trunkSid' => $trunkSid, 'sid' => $sid, ]; $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/CredentialLists/' . \rawurlencode($sid) . ''; } /** * Fetch the CredentialListInstance * * @return CredentialListInstance Fetched CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialListInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialListInstance( $this->version, $payload, $this->solution['trunkSid'], $this->solution['sid'] ); } /** * Delete the CredentialListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.CredentialListContext ' . \implode(' ', $context) . ']'; } }PKt[A<Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListContext.phpnu[solution = ['trunkSid' => $trunkSid, 'sid' => $sid, ]; $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/IpAccessControlLists/' . \rawurlencode($sid) . ''; } /** * Fetch the IpAccessControlListInstance * * @return IpAccessControlListInstance Fetched IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAccessControlListInstance { $payload = $this->version->fetch('GET', $this->uri); return new IpAccessControlListInstance( $this->version, $payload, $this->solution['trunkSid'], $this->solution['sid'] ); } /** * Delete the IpAccessControlListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.IpAccessControlListContext ' . \implode(' ', $context) . ']'; } }PKt[B65Twilio/Rest/Trunking/V1/Trunk/PhoneNumberInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'links' => Values::array_get($payload, 'links'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'sid' => Values::array_get($payload, 'sid'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'url' => Values::array_get($payload, 'url'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), ]; $this->solution = ['trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PhoneNumberContext Context for this PhoneNumberInstance */ protected function proxy(): PhoneNumberContext { if (!$this->context) { $this->context = new PhoneNumberContext( $this->version, $this->solution['trunkSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the PhoneNumberInstance * * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PhoneNumberInstance { return $this->proxy()->fetch(); } /** * Delete the PhoneNumberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trunking.V1.PhoneNumberInstance ' . \implode(' ', $context) . ']'; } }PKt[6s``4Twilio/Rest/Trunking/V1/Trunk/OriginationUrlList.phpnu[solution = ['trunkSid' => $trunkSid, ]; $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/OriginationUrls'; } /** * Create the OriginationUrlInstance * * @param int $weight The value that determines the relative load the URI * should receive compared to others with the same priority * @param int $priority The relative importance of the URI * @param bool $enabled Whether the URL is enabled * @param string $friendlyName A string to describe the resource * @param string $sipUrl The SIP address you want Twilio to route your * Origination calls to * @return OriginationUrlInstance Created OriginationUrlInstance * @throws TwilioException When an HTTP error occurs. */ public function create(int $weight, int $priority, bool $enabled, string $friendlyName, string $sipUrl): OriginationUrlInstance { $data = Values::of([ 'Weight' => $weight, 'Priority' => $priority, 'Enabled' => Serialize::booleanToString($enabled), 'FriendlyName' => $friendlyName, 'SipUrl' => $sipUrl, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new OriginationUrlInstance($this->version, $payload, $this->solution['trunkSid']); } /** * Streams OriginationUrlInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads OriginationUrlInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return OriginationUrlInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of OriginationUrlInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return OriginationUrlPage Page of OriginationUrlInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): OriginationUrlPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new OriginationUrlPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of OriginationUrlInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return OriginationUrlPage Page of OriginationUrlInstance */ public function getPage(string $targetUrl): OriginationUrlPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new OriginationUrlPage($this->version, $response, $this->solution); } /** * Constructs a OriginationUrlContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): OriginationUrlContext { return new OriginationUrlContext($this->version, $this->solution['trunkSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1.OriginationUrlList]'; } }PKt[.]Twilio/Rest/Trunking/V1.phpnu[version = 'v1'; } protected function getTrunks(): TrunkList { if (!$this->_trunks) { $this->_trunks = new TrunkList($this); } return $this->_trunks; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking.V1]'; } }PKt[Ny  Twilio/Rest/IpMessaging.phpnu[baseUrl = 'https://ip-messaging.twilio.com'; } /** * @return V1 Version v1 of ip_messaging */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * @return V2 Version v2 of ip_messaging */ protected function getV2(): V2 { if (!$this->_v2) { $this->_v2 = new V2($this); } return $this->_v2; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getCredentials(): \Twilio\Rest\IpMessaging\V2\CredentialList { return $this->v2->credentials; } /** * @param string $sid The sid */ protected function contextCredentials(string $sid): \Twilio\Rest\IpMessaging\V2\CredentialContext { return $this->v2->credentials($sid); } protected function getServices(): \Twilio\Rest\IpMessaging\V2\ServiceList { return $this->v2->services; } /** * @param string $sid The sid */ protected function contextServices(string $sid): \Twilio\Rest\IpMessaging\V2\ServiceContext { return $this->v2->services($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging]'; } }PKt[hTwilio/Rest/Events.phpnu[baseUrl = 'https://events.twilio.com'; } /** * @return V1 Version v1 of events */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getEventTypes(): \Twilio\Rest\Events\V1\EventTypeList { return $this->v1->eventTypes; } /** * @param string $type A string that uniquely identifies this Event Type. */ protected function contextEventTypes(string $type): \Twilio\Rest\Events\V1\EventTypeContext { return $this->v1->eventTypes($type); } protected function getSchemas(): \Twilio\Rest\Events\V1\SchemaList { return $this->v1->schemas; } /** * @param string $id The unique identifier of the schema. */ protected function contextSchemas(string $id): \Twilio\Rest\Events\V1\SchemaContext { return $this->v1->schemas($id); } protected function getSinks(): \Twilio\Rest\Events\V1\SinkList { return $this->v1->sinks; } /** * @param string $sid A string that uniquely identifies this Sink. */ protected function contextSinks(string $sid): \Twilio\Rest\Events\V1\SinkContext { return $this->v1->sinks($sid); } protected function getSubscriptions(): \Twilio\Rest\Events\V1\SubscriptionList { return $this->v1->subscriptions; } /** * @param string $sid A string that uniquely identifies this Subscription. */ protected function contextSubscriptions(string $sid): \Twilio\Rest\Events\V1\SubscriptionContext { return $this->v1->subscriptions($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events]'; } }PKt[))Twilio/Rest/Api/V2010.phpnu[version = '2010-04-01'; } protected function getAccounts(): AccountList { if (!$this->_accounts) { $this->_accounts = new AccountList($this); } return $this->_accounts; } /** * @return AccountContext Account provided as the authenticating account */ protected function getAccount(): AccountContext { if (!$this->_account) { $this->_account = new AccountContext( $this, $this->domain->getClient()->getAccountSid() ); } return $this->_account; } /** * Setter to override the primary account * * @param AccountContext|AccountInstance $account account to use as the primary * account */ public function setAccount($account): void { $this->_account = $account; } protected function getAddresses(): \Twilio\Rest\Api\V2010\Account\AddressList { return $this->account->addresses; } protected function getApplications(): \Twilio\Rest\Api\V2010\Account\ApplicationList { return $this->account->applications; } protected function getAuthorizedConnectApps(): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList { return $this->account->authorizedConnectApps; } protected function getAvailablePhoneNumbers(): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList { return $this->account->availablePhoneNumbers; } protected function getBalance(): \Twilio\Rest\Api\V2010\Account\BalanceList { return $this->account->balance; } protected function getCalls(): \Twilio\Rest\Api\V2010\Account\CallList { return $this->account->calls; } protected function getConferences(): \Twilio\Rest\Api\V2010\Account\ConferenceList { return $this->account->conferences; } protected function getConnectApps(): \Twilio\Rest\Api\V2010\Account\ConnectAppList { return $this->account->connectApps; } protected function getIncomingPhoneNumbers(): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList { return $this->account->incomingPhoneNumbers; } protected function getKeys(): \Twilio\Rest\Api\V2010\Account\KeyList { return $this->account->keys; } protected function getMessages(): \Twilio\Rest\Api\V2010\Account\MessageList { return $this->account->messages; } protected function getNewKeys(): \Twilio\Rest\Api\V2010\Account\NewKeyList { return $this->account->newKeys; } protected function getNewSigningKeys(): \Twilio\Rest\Api\V2010\Account\NewSigningKeyList { return $this->account->newSigningKeys; } protected function getNotifications(): \Twilio\Rest\Api\V2010\Account\NotificationList { return $this->account->notifications; } protected function getOutgoingCallerIds(): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList { return $this->account->outgoingCallerIds; } protected function getQueues(): \Twilio\Rest\Api\V2010\Account\QueueList { return $this->account->queues; } protected function getRecordings(): \Twilio\Rest\Api\V2010\Account\RecordingList { return $this->account->recordings; } protected function getSigningKeys(): \Twilio\Rest\Api\V2010\Account\SigningKeyList { return $this->account->signingKeys; } protected function getSip(): \Twilio\Rest\Api\V2010\Account\SipList { return $this->account->sip; } protected function getShortCodes(): \Twilio\Rest\Api\V2010\Account\ShortCodeList { return $this->account->shortCodes; } protected function getTokens(): \Twilio\Rest\Api\V2010\Account\TokenList { return $this->account->tokens; } protected function getTranscriptions(): \Twilio\Rest\Api\V2010\Account\TranscriptionList { return $this->account->transcriptions; } protected function getUsage(): \Twilio\Rest\Api\V2010\Account\UsageList { return $this->account->usage; } protected function getValidationRequests(): \Twilio\Rest\Api\V2010\Account\ValidationRequestList { return $this->account->validationRequests; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010]'; } }PKt[}yy%Twilio/Rest/Api/V2010/AccountPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AccountInstance \Twilio\Rest\Api\V2010\AccountInstance */ public function buildInstance(array $payload): AccountInstance { return new AccountInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AccountPage]'; } }PKt[~2W9W9(Twilio/Rest/Api/V2010/AccountContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AccountInstance * * @return AccountInstance Fetched AccountInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AccountInstance { $payload = $this->version->fetch('GET', $this->uri); return new AccountInstance($this->version, $payload, $this->solution['sid']); } /** * Update the AccountInstance * * @param array|Options $options Optional Arguments * @return AccountInstance Updated AccountInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AccountInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], 'Status' => $options['status'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AccountInstance($this->version, $payload, $this->solution['sid']); } /** * Access the addresses */ protected function getAddresses(): AddressList { if (!$this->_addresses) { $this->_addresses = new AddressList($this->version, $this->solution['sid']); } return $this->_addresses; } /** * Access the applications */ protected function getApplications(): ApplicationList { if (!$this->_applications) { $this->_applications = new ApplicationList($this->version, $this->solution['sid']); } return $this->_applications; } /** * Access the authorizedConnectApps */ protected function getAuthorizedConnectApps(): AuthorizedConnectAppList { if (!$this->_authorizedConnectApps) { $this->_authorizedConnectApps = new AuthorizedConnectAppList( $this->version, $this->solution['sid'] ); } return $this->_authorizedConnectApps; } /** * Access the availablePhoneNumbers */ protected function getAvailablePhoneNumbers(): AvailablePhoneNumberCountryList { if (!$this->_availablePhoneNumbers) { $this->_availablePhoneNumbers = new AvailablePhoneNumberCountryList( $this->version, $this->solution['sid'] ); } return $this->_availablePhoneNumbers; } /** * Access the balance */ protected function getBalance(): BalanceList { if (!$this->_balance) { $this->_balance = new BalanceList($this->version, $this->solution['sid']); } return $this->_balance; } /** * Access the calls */ protected function getCalls(): CallList { if (!$this->_calls) { $this->_calls = new CallList($this->version, $this->solution['sid']); } return $this->_calls; } /** * Access the conferences */ protected function getConferences(): ConferenceList { if (!$this->_conferences) { $this->_conferences = new ConferenceList($this->version, $this->solution['sid']); } return $this->_conferences; } /** * Access the connectApps */ protected function getConnectApps(): ConnectAppList { if (!$this->_connectApps) { $this->_connectApps = new ConnectAppList($this->version, $this->solution['sid']); } return $this->_connectApps; } /** * Access the incomingPhoneNumbers */ protected function getIncomingPhoneNumbers(): IncomingPhoneNumberList { if (!$this->_incomingPhoneNumbers) { $this->_incomingPhoneNumbers = new IncomingPhoneNumberList($this->version, $this->solution['sid']); } return $this->_incomingPhoneNumbers; } /** * Access the keys */ protected function getKeys(): KeyList { if (!$this->_keys) { $this->_keys = new KeyList($this->version, $this->solution['sid']); } return $this->_keys; } /** * Access the messages */ protected function getMessages(): MessageList { if (!$this->_messages) { $this->_messages = new MessageList($this->version, $this->solution['sid']); } return $this->_messages; } /** * Access the newKeys */ protected function getNewKeys(): NewKeyList { if (!$this->_newKeys) { $this->_newKeys = new NewKeyList($this->version, $this->solution['sid']); } return $this->_newKeys; } /** * Access the newSigningKeys */ protected function getNewSigningKeys(): NewSigningKeyList { if (!$this->_newSigningKeys) { $this->_newSigningKeys = new NewSigningKeyList($this->version, $this->solution['sid']); } return $this->_newSigningKeys; } /** * Access the notifications */ protected function getNotifications(): NotificationList { if (!$this->_notifications) { $this->_notifications = new NotificationList($this->version, $this->solution['sid']); } return $this->_notifications; } /** * Access the outgoingCallerIds */ protected function getOutgoingCallerIds(): OutgoingCallerIdList { if (!$this->_outgoingCallerIds) { $this->_outgoingCallerIds = new OutgoingCallerIdList($this->version, $this->solution['sid']); } return $this->_outgoingCallerIds; } /** * Access the queues */ protected function getQueues(): QueueList { if (!$this->_queues) { $this->_queues = new QueueList($this->version, $this->solution['sid']); } return $this->_queues; } /** * Access the recordings */ protected function getRecordings(): RecordingList { if (!$this->_recordings) { $this->_recordings = new RecordingList($this->version, $this->solution['sid']); } return $this->_recordings; } /** * Access the signingKeys */ protected function getSigningKeys(): SigningKeyList { if (!$this->_signingKeys) { $this->_signingKeys = new SigningKeyList($this->version, $this->solution['sid']); } return $this->_signingKeys; } /** * Access the sip */ protected function getSip(): SipList { if (!$this->_sip) { $this->_sip = new SipList($this->version, $this->solution['sid']); } return $this->_sip; } /** * Access the shortCodes */ protected function getShortCodes(): ShortCodeList { if (!$this->_shortCodes) { $this->_shortCodes = new ShortCodeList($this->version, $this->solution['sid']); } return $this->_shortCodes; } /** * Access the tokens */ protected function getTokens(): TokenList { if (!$this->_tokens) { $this->_tokens = new TokenList($this->version, $this->solution['sid']); } return $this->_tokens; } /** * Access the transcriptions */ protected function getTranscriptions(): TranscriptionList { if (!$this->_transcriptions) { $this->_transcriptions = new TranscriptionList($this->version, $this->solution['sid']); } return $this->_transcriptions; } /** * Access the usage */ protected function getUsage(): UsageList { if (!$this->_usage) { $this->_usage = new UsageList($this->version, $this->solution['sid']); } return $this->_usage; } /** * Access the validationRequests */ protected function getValidationRequests(): ValidationRequestList { if (!$this->_validationRequests) { $this->_validationRequests = new ValidationRequestList($this->version, $this->solution['sid']); } return $this->_validationRequests; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AccountContext ' . \implode(' ', $context) . ']'; } }PKt[(Twilio/Rest/Api/V2010/AccountOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` * * @param string $friendlyName A human readable description of the account * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateAccountOptions ' . $options . ']'; } } class ReadAccountOptions extends Options { /** * @param string $friendlyName FriendlyName to filter on * @param string $status Status to filter on */ public function __construct(string $friendlyName = Values::NONE, string $status = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['status'] = $status; } /** * Only return the Account resources with friendly names that exactly match this name. * * @param string $friendlyName FriendlyName to filter on * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Only return Account resources with the given status. Can be `closed`, `suspended` or `active`. * * @param string $status Status to filter on * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadAccountOptions ' . $options . ']'; } } class UpdateAccountOptions extends Options { /** * @param string $friendlyName FriendlyName to update * @param string $status Status to update the Account with */ public function __construct(string $friendlyName = Values::NONE, string $status = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['status'] = $status; } /** * Update the human-readable description of this Account * * @param string $friendlyName FriendlyName to update * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Alter the status of this account: use `closed` to irreversibly close this account, `suspended` to temporarily suspend it, or `active` to reactivate it. * * @param string $status Status to update the Account with * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateAccountOptions ' . $options . ']'; } }PKt[Qͳ  %Twilio/Rest/Api/V2010/AccountList.phpnu[solution = []; $this->uri = '/Accounts.json'; } /** * Create the AccountInstance * * @param array|Options $options Optional Arguments * @return AccountInstance Created AccountInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): AccountInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AccountInstance($this->version, $payload); } /** * Streams AccountInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AccountInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AccountInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of AccountInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AccountPage Page of AccountInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AccountPage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AccountPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AccountInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AccountPage Page of AccountInstance */ public function getPage(string $targetUrl): AccountPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AccountPage($this->version, $response, $this->solution); } /** * Constructs a AccountContext * * @param string $sid Fetch by unique Account Sid */ public function getContext(string $sid): AccountContext { return new AccountContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AccountList]'; } }PKt[{**:Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AuthorizedConnectApps.json'; } /** * Streams AuthorizedConnectAppInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AuthorizedConnectAppInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AuthorizedConnectAppInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AuthorizedConnectAppInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AuthorizedConnectAppPage Page of AuthorizedConnectAppInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AuthorizedConnectAppPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AuthorizedConnectAppPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AuthorizedConnectAppInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AuthorizedConnectAppPage Page of AuthorizedConnectAppInstance */ public function getPage(string $targetUrl): AuthorizedConnectAppPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AuthorizedConnectAppPage($this->version, $response, $this->solution); } /** * Constructs a AuthorizedConnectAppContext * * @param string $connectAppSid The SID of the Connect App to fetch */ public function getContext(string $connectAppSid): AuthorizedConnectAppContext { return new AuthorizedConnectAppContext( $this->version, $this->solution['accountSid'], $connectAppSid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthorizedConnectAppList]'; } }PKt[FII-Twilio/Rest/Api/V2010/Account/BalanceList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Balance.json'; } /** * Fetch the BalanceInstance * * @return BalanceInstance Fetched BalanceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BalanceInstance { $payload = $this->version->fetch('GET', $this->uri); return new BalanceInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.BalanceList]'; } }PKt[0 %%-Twilio/Rest/Api/V2010/Account/CallContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($sid) . '.json'; } /** * Delete the CallInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the CallInstance * * @return CallInstance Fetched CallInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CallInstance { $payload = $this->version->fetch('GET', $this->uri); return new CallInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the CallInstance * * @param array|Options $options Optional Arguments * @return CallInstance Updated CallInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CallInstance { $options = new Values($options); $data = Values::of([ 'Url' => $options['url'], 'Method' => $options['method'], 'Status' => $options['status'], 'FallbackUrl' => $options['fallbackUrl'], 'FallbackMethod' => $options['fallbackMethod'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'Twiml' => $options['twiml'], 'TimeLimit' => $options['timeLimit'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CallInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Access the recordings */ protected function getRecordings(): RecordingList { if (!$this->_recordings) { $this->_recordings = new RecordingList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_recordings; } /** * Access the notifications */ protected function getNotifications(): NotificationList { if (!$this->_notifications) { $this->_notifications = new NotificationList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_notifications; } /** * Access the feedback */ protected function getFeedback(): FeedbackList { if (!$this->_feedback) { $this->_feedback = new FeedbackList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_feedback; } /** * Access the events */ protected function getEvents(): EventList { if (!$this->_events) { $this->_events = new EventList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_events; } /** * Access the payments */ protected function getPayments(): PaymentList { if (!$this->_payments) { $this->_payments = new PaymentList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_payments; } /** * Access the siprec */ protected function getSiprec(): SiprecList { if (!$this->_siprec) { $this->_siprec = new SiprecList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_siprec; } /** * Access the streams */ protected function getStreams(): StreamList { if (!$this->_streams) { $this->_streams = new StreamList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_streams; } /** * Access the userDefinedMessageSubscriptions */ protected function getUserDefinedMessageSubscriptions(): UserDefinedMessageSubscriptionList { if (!$this->_userDefinedMessageSubscriptions) { $this->_userDefinedMessageSubscriptions = new UserDefinedMessageSubscriptionList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_userDefinedMessageSubscriptions; } /** * Access the userDefinedMessages */ protected function getUserDefinedMessages(): UserDefinedMessageList { if (!$this->_userDefinedMessages) { $this->_userDefinedMessages = new UserDefinedMessageList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_userDefinedMessages; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.CallContext ' . \implode(' ', $context) . ']'; } }PKt[Naa6Twilio/Rest/Api/V2010/Account/TranscriptionContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Transcriptions/' . \rawurlencode($sid) . '.json'; } /** * Fetch the TranscriptionInstance * * @return TranscriptionInstance Fetched TranscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TranscriptionInstance { $payload = $this->version->fetch('GET', $this->uri); return new TranscriptionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the TranscriptionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.TranscriptionContext ' . \implode(' ', $context) . ']'; } }PKt[zZ# +Twilio/Rest/Api/V2010/Account/UsageList.phpnu[solution = ['accountSid' => $accountSid, ]; } /** * Access the records */ protected function getRecords(): RecordList { if (!$this->_records) { $this->_records = new RecordList($this->version, $this->solution['accountSid']); } return $this->_records; } /** * Access the triggers */ protected function getTriggers(): TriggerList { if (!$this->_triggers) { $this->_triggers = new TriggerList($this->version, $this->solution['accountSid']); } return $this->_triggers; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UsageList]'; } }PKt[v''<Twilio/Rest/Api/V2010/Account/Conference/ParticipantList.phpnu[solution = ['accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Participants.json'; } /** * Create the ParticipantInstance * * @param string $from The phone number, Client identifier, or username portion * of SIP address that made this call. * @param string $to The phone number, SIP address or Client identifier that * received this call. * @param array|Options $options Optional Arguments * @return ParticipantInstance Created ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $from, string $to, array $options = []): ParticipantInstance { $options = new Values($options); $data = Values::of([ 'From' => $from, 'To' => $to, 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function($e) { return $e; }), 'Label' => $options['label'], 'Timeout' => $options['timeout'], 'Record' => Serialize::booleanToString($options['record']), 'Muted' => Serialize::booleanToString($options['muted']), 'Beep' => $options['beep'], 'StartConferenceOnEnter' => Serialize::booleanToString($options['startConferenceOnEnter']), 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']), 'WaitUrl' => $options['waitUrl'], 'WaitMethod' => $options['waitMethod'], 'EarlyMedia' => Serialize::booleanToString($options['earlyMedia']), 'MaxParticipants' => $options['maxParticipants'], 'ConferenceRecord' => $options['conferenceRecord'], 'ConferenceTrim' => $options['conferenceTrim'], 'ConferenceStatusCallback' => $options['conferenceStatusCallback'], 'ConferenceStatusCallbackMethod' => $options['conferenceStatusCallbackMethod'], 'ConferenceStatusCallbackEvent' => Serialize::map($options['conferenceStatusCallbackEvent'], function($e) { return $e; }), 'RecordingChannels' => $options['recordingChannels'], 'RecordingStatusCallback' => $options['recordingStatusCallback'], 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'], 'SipAuthUsername' => $options['sipAuthUsername'], 'SipAuthPassword' => $options['sipAuthPassword'], 'Region' => $options['region'], 'ConferenceRecordingStatusCallback' => $options['conferenceRecordingStatusCallback'], 'ConferenceRecordingStatusCallbackMethod' => $options['conferenceRecordingStatusCallbackMethod'], 'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function($e) { return $e; }), 'ConferenceRecordingStatusCallbackEvent' => Serialize::map($options['conferenceRecordingStatusCallbackEvent'], function($e) { return $e; }), 'Coaching' => Serialize::booleanToString($options['coaching']), 'CallSidToCoach' => $options['callSidToCoach'], 'JitterBufferSize' => $options['jitterBufferSize'], 'Byoc' => $options['byoc'], 'CallerId' => $options['callerId'], 'CallReason' => $options['callReason'], 'RecordingTrack' => $options['recordingTrack'], 'TimeLimit' => $options['timeLimit'], 'MachineDetection' => $options['machineDetection'], 'MachineDetectionTimeout' => $options['machineDetectionTimeout'], 'MachineDetectionSpeechThreshold' => $options['machineDetectionSpeechThreshold'], 'MachineDetectionSpeechEndThreshold' => $options['machineDetectionSpeechEndThreshold'], 'MachineDetectionSilenceTimeout' => $options['machineDetectionSilenceTimeout'], 'AmdStatusCallback' => $options['amdStatusCallback'], 'AmdStatusCallbackMethod' => $options['amdStatusCallbackMethod'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ParticipantInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'] ); } /** * Streams ParticipantInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ParticipantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ParticipantInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ParticipantInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ParticipantPage Page of ParticipantInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ParticipantPage { $options = new Values($options); $params = Values::of([ 'Muted' => Serialize::booleanToString($options['muted']), 'Hold' => Serialize::booleanToString($options['hold']), 'Coaching' => Serialize::booleanToString($options['coaching']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ParticipantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ParticipantInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ParticipantPage Page of ParticipantInstance */ public function getPage(string $targetUrl): ParticipantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ParticipantPage($this->version, $response, $this->solution); } /** * Constructs a ParticipantContext * * @param string $callSid The Call SID or URL encoded label of the participant * to fetch */ public function getContext(string $callSid): ParticipantContext { return new ParticipantContext( $this->version, $this->solution['accountSid'], $this->solution['conferenceSid'], $callSid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ParticipantList]'; } }PKt[dc:Twilio/Rest/Api/V2010/Account/Conference/RecordingList.phpnu[solution = ['accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Recordings.json'; } /** * Streams RecordingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RecordingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RecordingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RecordingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RecordingPage Page of RecordingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RecordingPage { $options = new Values($options); $params = Values::of([ 'DateCreated<' => Serialize::iso8601Date($options['dateCreatedBefore']), 'DateCreated' => Serialize::iso8601Date($options['dateCreated']), 'DateCreated>' => Serialize::iso8601Date($options['dateCreatedAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RecordingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RecordingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RecordingPage Page of RecordingInstance */ public function getPage(string $targetUrl): RecordingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RecordingPage($this->version, $response, $this->solution); } /** * Constructs a RecordingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): RecordingContext { return new RecordingContext( $this->version, $this->solution['accountSid'], $this->solution['conferenceSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingList]'; } }PKt[/@Twilio/Rest/Api/V2010/Account/Conference/ParticipantInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'label' => Values::array_get($payload, 'label'), 'callSidToCoach' => Values::array_get($payload, 'call_sid_to_coach'), 'coaching' => Values::array_get($payload, 'coaching'), 'conferenceSid' => Values::array_get($payload, 'conference_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'endConferenceOnExit' => Values::array_get($payload, 'end_conference_on_exit'), 'muted' => Values::array_get($payload, 'muted'), 'hold' => Values::array_get($payload, 'hold'), 'startConferenceOnEnter' => Values::array_get($payload, 'start_conference_on_enter'), 'status' => Values::array_get($payload, 'status'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, 'callSid' => $callSid ?: $this->properties['callSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ParticipantContext Context for this ParticipantInstance */ protected function proxy(): ParticipantContext { if (!$this->context) { $this->context = new ParticipantContext( $this->version, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['callSid'] ); } return $this->context; } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { return $this->proxy()->fetch(); } /** * Update the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Updated ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ParticipantInstance { return $this->proxy()->update($options); } /** * Delete the ParticipantInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.ParticipantInstance ' . \implode(' ', $context) . ']'; } }PKt[=.=Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.phpnu[options['pauseBehavior'] = $pauseBehavior; } /** * Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. * * @param string $pauseBehavior Whether to record during a pause * @return $this Fluent Builder */ public function setPauseBehavior(string $pauseBehavior): self { $this->options['pauseBehavior'] = $pauseBehavior; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateRecordingOptions ' . $options . ']'; } } class ReadRecordingOptions extends Options { /** * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read */ public function __construct(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE) { $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['dateCreated'] = $dateCreated; $this->options['dateCreatedAfter'] = $dateCreatedAfter; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadRecordingOptions ' . $options . ']'; } }PKt[y y =Twilio/Rest/Api/V2010/Account/Conference/RecordingContext.phpnu[solution = ['accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Recordings/' . \rawurlencode($sid) . '.json'; } /** * Update the RecordingInstance * * @param string $status The new status of the recording * @param array|Options $options Optional Arguments * @return RecordingInstance Updated RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): RecordingInstance { $options = new Values($options); $data = Values::of(['Status' => $status, 'PauseBehavior' => $options['pauseBehavior'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['sid'] ); } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { $payload = $this->version->fetch('GET', $this->uri); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['sid'] ); } /** * Delete the RecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.RecordingContext ' . \implode(' ', $context) . ']'; } }PKt[M?Twilio/Rest/Api/V2010/Account/Conference/ParticipantContext.phpnu[solution = [ 'accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Participants/' . \rawurlencode($callSid) . '.json'; } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { $payload = $this->version->fetch('GET', $this->uri); return new ParticipantInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['callSid'] ); } /** * Update the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Updated ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ParticipantInstance { $options = new Values($options); $data = Values::of([ 'Muted' => Serialize::booleanToString($options['muted']), 'Hold' => Serialize::booleanToString($options['hold']), 'HoldUrl' => $options['holdUrl'], 'HoldMethod' => $options['holdMethod'], 'AnnounceUrl' => $options['announceUrl'], 'AnnounceMethod' => $options['announceMethod'], 'WaitUrl' => $options['waitUrl'], 'WaitMethod' => $options['waitMethod'], 'BeepOnExit' => Serialize::booleanToString($options['beepOnExit']), 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']), 'Coaching' => Serialize::booleanToString($options['coaching']), 'CallSidToCoach' => $options['callSidToCoach'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ParticipantInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['callSid'] ); } /** * Delete the ParticipantInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.ParticipantContext ' . \implode(' ', $context) . ']'; } }PKt[e>Twilio/Rest/Api/V2010/Account/Conference/RecordingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callSid' => Values::array_get($payload, 'call_sid'), 'conferenceSid' => Values::array_get($payload, 'conference_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'duration' => Values::array_get($payload, 'duration'), 'sid' => Values::array_get($payload, 'sid'), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'status' => Values::array_get($payload, 'status'), 'channels' => Values::array_get($payload, 'channels'), 'source' => Values::array_get($payload, 'source'), 'errorCode' => Values::array_get($payload, 'error_code'), 'encryptionDetails' => Values::array_get($payload, 'encryption_details'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RecordingContext Context for this RecordingInstance */ protected function proxy(): RecordingContext { if (!$this->context) { $this->context = new RecordingContext( $this->version, $this->solution['accountSid'], $this->solution['conferenceSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the RecordingInstance * * @param string $status The new status of the recording * @param array|Options $options Optional Arguments * @return RecordingInstance Updated RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): RecordingInstance { return $this->proxy()->update($status, $options); } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { return $this->proxy()->fetch(); } /** * Delete the RecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.RecordingInstance ' . \implode(' ', $context) . ']'; } }PKt[w?Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.phpnu[options['muted'] = $muted; $this->options['hold'] = $hold; $this->options['holdUrl'] = $holdUrl; $this->options['holdMethod'] = $holdMethod; $this->options['announceUrl'] = $announceUrl; $this->options['announceMethod'] = $announceMethod; $this->options['waitUrl'] = $waitUrl; $this->options['waitMethod'] = $waitMethod; $this->options['beepOnExit'] = $beepOnExit; $this->options['endConferenceOnExit'] = $endConferenceOnExit; $this->options['coaching'] = $coaching; $this->options['callSidToCoach'] = $callSidToCoach; } /** * Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`. * * @param bool $muted Whether the participant should be muted * @return $this Fluent Builder */ public function setMuted(bool $muted): self { $this->options['muted'] = $muted; return $this; } /** * Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference. * * @param bool $hold Whether the participant should be on hold * @return $this Fluent Builder */ public function setHold(bool $hold): self { $this->options['hold'] = $hold; return $this; } /** * The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. * * @param string $holdUrl The URL we call using the `hold_method` for music * that plays when the participant is on hold * @return $this Fluent Builder */ public function setHoldUrl(string $holdUrl): self { $this->options['holdUrl'] = $holdUrl; return $this; } /** * The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`. * * @param string $holdMethod The HTTP method we should use to call hold_url * @return $this Fluent Builder */ public function setHoldMethod(string $holdMethod): self { $this->options['holdMethod'] = $holdMethod; return $this; } /** * The URL we call using the `announce_method` for an announcement to the participant. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. * * @param string $announceUrl The URL we call using the `announce_method` for * an announcement to the participant * @return $this Fluent Builder */ public function setAnnounceUrl(string $announceUrl): self { $this->options['announceUrl'] = $announceUrl; return $this; } /** * The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $announceMethod The HTTP method we should use to call * announce_url * @return $this Fluent Builder */ public function setAnnounceMethod(string $announceMethod): self { $this->options['announceMethod'] = $announceMethod; return $this; } /** * The URL we call using the `wait_method` for the music to play while participants are waiting for the conference to start. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * * @param string $waitUrl The URL we call using the `wait_method` for the music * to play while participants are waiting for the * conference to start * @return $this Fluent Builder */ public function setWaitUrl(string $waitUrl): self { $this->options['waitUrl'] = $waitUrl; return $this; } /** * The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. * * @param string $waitMethod The HTTP method we should use to call `wait_url` * @return $this Fluent Builder */ public function setWaitMethod(string $waitMethod): self { $this->options['waitMethod'] = $waitMethod; return $this; } /** * Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`. * * @param bool $beepOnExit Whether to play a notification beep to the * conference when the participant exit * @return $this Fluent Builder */ public function setBeepOnExit(bool $beepOnExit): self { $this->options['beepOnExit'] = $beepOnExit; return $this; } /** * Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. * * @param bool $endConferenceOnExit Whether to end the conference when the * participant leaves * @return $this Fluent Builder */ public function setEndConferenceOnExit(bool $endConferenceOnExit): self { $this->options['endConferenceOnExit'] = $endConferenceOnExit; return $this; } /** * Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. * * @param bool $coaching Indicates if the participant changed to coach * @return $this Fluent Builder */ public function setCoaching(bool $coaching): self { $this->options['coaching'] = $coaching; return $this; } /** * The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. * * @param string $callSidToCoach The SID of the participant who is being * `coached` * @return $this Fluent Builder */ public function setCallSidToCoach(string $callSidToCoach): self { $this->options['callSidToCoach'] = $callSidToCoach; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateParticipantOptions ' . $options . ']'; } } class CreateParticipantOptions extends Options { /** * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * `status_callback` * @param string[] $statusCallbackEvent Set state change events that will * trigger a callback * @param string $label The label of this participant * @param int $timeout he number of seconds that we should wait for an answer * @param bool $record Whether to record the participant and their conferences * @param bool $muted Whether to mute the agent * @param string $beep Whether to play a notification beep to the conference * when the participant joins * @param bool $startConferenceOnEnter Whether the conference starts when the * participant joins the conference * @param bool $endConferenceOnExit Whether to end the conference when the * participant leaves * @param string $waitUrl URL that hosts pre-conference hold music * @param string $waitMethod The HTTP method we should use to call `wait_url` * @param bool $earlyMedia Whether agents can hear the state of the outbound * call * @param int $maxParticipants The maximum number of agent conference * participants * @param string $conferenceRecord Whether to record the conference the * participant is joining * @param string $conferenceTrim Whether to trim leading and trailing silence * from your recorded conference audio files * @param string $conferenceStatusCallback The callback URL for conference * events * @param string $conferenceStatusCallbackMethod HTTP method for requesting * `conference_status_callback` * URL * @param string[] $conferenceStatusCallbackEvent The conference state changes * that should generate a call * to * `conference_status_callback` * @param string $recordingChannels Specify `mono` or `dual` recording channels * @param string $recordingStatusCallback The URL that we should call using the * `recording_status_callback_method` * when the recording status changes * @param string $recordingStatusCallbackMethod The HTTP method we should use * when we call * `recording_status_callback` * @param string $sipAuthUsername The SIP username used for authentication * @param string $sipAuthPassword The SIP password for authentication * @param string $region The region where we should mix the conference audio * @param string $conferenceRecordingStatusCallback The URL we should call * using the * `conference_recording_status_callback_method` when the conference recording is available * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we * should use to call * `conference_recording_status_callback` * @param string[] $recordingStatusCallbackEvent The recording state changes * that should generate a call to * `recording_status_callback` * @param string[] $conferenceRecordingStatusCallbackEvent The conference * recording state * changes that should * generate a call to * `conference_recording_status_callback` * @param bool $coaching Indicates if the participant changed to coach * @param string $callSidToCoach The SID of the participant who is being * `coached` * @param string $jitterBufferSize Jitter Buffer size for the connecting * participant * @param string $byoc BYOC trunk SID (Beta) * @param string $callerId The phone number, Client identifier, or username * portion of SIP address that made this call. * @param string $callReason Reason for the call (Branded Calls Beta) * @param string $recordingTrack The track(s) to record * @param int $timeLimit The maximum duration of the call in seconds. * @param string $machineDetection Enable machine detection or end of greeting * detection * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence * @param string $amdStatusCallback The URL we should call to send amd status * information to your application * @param string $amdStatusCallbackMethod HTTP Method to use with * amd_status_callback */ public function __construct(string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, array $statusCallbackEvent = Values::ARRAY_NONE, string $label = Values::NONE, int $timeout = Values::NONE, bool $record = Values::NONE, bool $muted = Values::NONE, string $beep = Values::NONE, bool $startConferenceOnEnter = Values::NONE, bool $endConferenceOnExit = Values::NONE, string $waitUrl = Values::NONE, string $waitMethod = Values::NONE, bool $earlyMedia = Values::NONE, int $maxParticipants = Values::NONE, string $conferenceRecord = Values::NONE, string $conferenceTrim = Values::NONE, string $conferenceStatusCallback = Values::NONE, string $conferenceStatusCallbackMethod = Values::NONE, array $conferenceStatusCallbackEvent = Values::ARRAY_NONE, string $recordingChannels = Values::NONE, string $recordingStatusCallback = Values::NONE, string $recordingStatusCallbackMethod = Values::NONE, string $sipAuthUsername = Values::NONE, string $sipAuthPassword = Values::NONE, string $region = Values::NONE, string $conferenceRecordingStatusCallback = Values::NONE, string $conferenceRecordingStatusCallbackMethod = Values::NONE, array $recordingStatusCallbackEvent = Values::ARRAY_NONE, array $conferenceRecordingStatusCallbackEvent = Values::ARRAY_NONE, bool $coaching = Values::NONE, string $callSidToCoach = Values::NONE, string $jitterBufferSize = Values::NONE, string $byoc = Values::NONE, string $callerId = Values::NONE, string $callReason = Values::NONE, string $recordingTrack = Values::NONE, int $timeLimit = Values::NONE, string $machineDetection = Values::NONE, int $machineDetectionTimeout = Values::NONE, int $machineDetectionSpeechThreshold = Values::NONE, int $machineDetectionSpeechEndThreshold = Values::NONE, int $machineDetectionSilenceTimeout = Values::NONE, string $amdStatusCallback = Values::NONE, string $amdStatusCallbackMethod = Values::NONE) { $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['statusCallbackEvent'] = $statusCallbackEvent; $this->options['label'] = $label; $this->options['timeout'] = $timeout; $this->options['record'] = $record; $this->options['muted'] = $muted; $this->options['beep'] = $beep; $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; $this->options['endConferenceOnExit'] = $endConferenceOnExit; $this->options['waitUrl'] = $waitUrl; $this->options['waitMethod'] = $waitMethod; $this->options['earlyMedia'] = $earlyMedia; $this->options['maxParticipants'] = $maxParticipants; $this->options['conferenceRecord'] = $conferenceRecord; $this->options['conferenceTrim'] = $conferenceTrim; $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; $this->options['recordingChannels'] = $recordingChannels; $this->options['recordingStatusCallback'] = $recordingStatusCallback; $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; $this->options['sipAuthUsername'] = $sipAuthUsername; $this->options['sipAuthPassword'] = $sipAuthPassword; $this->options['region'] = $region; $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; $this->options['conferenceRecordingStatusCallbackEvent'] = $conferenceRecordingStatusCallbackEvent; $this->options['coaching'] = $coaching; $this->options['callSidToCoach'] = $callSidToCoach; $this->options['jitterBufferSize'] = $jitterBufferSize; $this->options['byoc'] = $byoc; $this->options['callerId'] = $callerId; $this->options['callReason'] = $callReason; $this->options['recordingTrack'] = $recordingTrack; $this->options['timeLimit'] = $timeLimit; $this->options['machineDetection'] = $machineDetection; $this->options['machineDetectionTimeout'] = $machineDetectionTimeout; $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold; $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold; $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout; $this->options['amdStatusCallback'] = $amdStatusCallback; $this->options['amdStatusCallbackMethod'] = $amdStatusCallbackMethod; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * `status_callback` * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`. * * @param string[] $statusCallbackEvent Set state change events that will * trigger a callback * @return $this Fluent Builder */ public function setStatusCallbackEvent(array $statusCallbackEvent): self { $this->options['statusCallbackEvent'] = $statusCallbackEvent; return $this; } /** * A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant. * * @param string $label The label of this participant * @return $this Fluent Builder */ public function setLabel(string $label): self { $this->options['label'] = $label; return $this; } /** * The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds. * * @param int $timeout he number of seconds that we should wait for an answer * @return $this Fluent Builder */ public function setTimeout(int $timeout): self { $this->options['timeout'] = $timeout; return $this; } /** * Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. * * @param bool $record Whether to record the participant and their conferences * @return $this Fluent Builder */ public function setRecord(bool $record): self { $this->options['record'] = $record; return $this; } /** * Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`. * * @param bool $muted Whether to mute the agent * @return $this Fluent Builder */ public function setMuted(bool $muted): self { $this->options['muted'] = $muted; return $this; } /** * Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. * * @param string $beep Whether to play a notification beep to the conference * when the participant joins * @return $this Fluent Builder */ public function setBeep(string $beep): self { $this->options['beep'] = $beep; return $this; } /** * Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. * * @param bool $startConferenceOnEnter Whether the conference starts when the * participant joins the conference * @return $this Fluent Builder */ public function setStartConferenceOnEnter(bool $startConferenceOnEnter): self { $this->options['startConferenceOnEnter'] = $startConferenceOnEnter; return $this; } /** * Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. * * @param bool $endConferenceOnExit Whether to end the conference when the * participant leaves * @return $this Fluent Builder */ public function setEndConferenceOnExit(bool $endConferenceOnExit): self { $this->options['endConferenceOnExit'] = $endConferenceOnExit; return $this; } /** * The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). * * @param string $waitUrl URL that hosts pre-conference hold music * @return $this Fluent Builder */ public function setWaitUrl(string $waitUrl): self { $this->options['waitUrl'] = $waitUrl; return $this; } /** * The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. * * @param string $waitMethod The HTTP method we should use to call `wait_url` * @return $this Fluent Builder */ public function setWaitMethod(string $waitMethod): self { $this->options['waitMethod'] = $waitMethod; return $this; } /** * Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`. * * @param bool $earlyMedia Whether agents can hear the state of the outbound * call * @return $this Fluent Builder */ public function setEarlyMedia(bool $earlyMedia): self { $this->options['earlyMedia'] = $earlyMedia; return $this; } /** * The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. * * @param int $maxParticipants The maximum number of agent conference * participants * @return $this Fluent Builder */ public function setMaxParticipants(int $maxParticipants): self { $this->options['maxParticipants'] = $maxParticipants; return $this; } /** * Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. * * @param string $conferenceRecord Whether to record the conference the * participant is joining * @return $this Fluent Builder */ public function setConferenceRecord(string $conferenceRecord): self { $this->options['conferenceRecord'] = $conferenceRecord; return $this; } /** * Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. * * @param string $conferenceTrim Whether to trim leading and trailing silence * from your recorded conference audio files * @return $this Fluent Builder */ public function setConferenceTrim(string $conferenceTrim): self { $this->options['conferenceTrim'] = $conferenceTrim; return $this; } /** * The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. * * @param string $conferenceStatusCallback The callback URL for conference * events * @return $this Fluent Builder */ public function setConferenceStatusCallback(string $conferenceStatusCallback): self { $this->options['conferenceStatusCallback'] = $conferenceStatusCallback; return $this; } /** * The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $conferenceStatusCallbackMethod HTTP method for requesting * `conference_status_callback` * URL * @return $this Fluent Builder */ public function setConferenceStatusCallbackMethod(string $conferenceStatusCallbackMethod): self { $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod; return $this; } /** * The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`. * * @param string[] $conferenceStatusCallbackEvent The conference state changes * that should generate a call * to * `conference_status_callback` * @return $this Fluent Builder */ public function setConferenceStatusCallbackEvent(array $conferenceStatusCallbackEvent): self { $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent; return $this; } /** * The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. * * @param string $recordingChannels Specify `mono` or `dual` recording channels * @return $this Fluent Builder */ public function setRecordingChannels(string $recordingChannels): self { $this->options['recordingChannels'] = $recordingChannels; return $this; } /** * The URL that we should call using the `recording_status_callback_method` when the recording status changes. * * @param string $recordingStatusCallback The URL that we should call using the * `recording_status_callback_method` * when the recording status changes * @return $this Fluent Builder */ public function setRecordingStatusCallback(string $recordingStatusCallback): self { $this->options['recordingStatusCallback'] = $recordingStatusCallback; return $this; } /** * The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $recordingStatusCallbackMethod The HTTP method we should use * when we call * `recording_status_callback` * @return $this Fluent Builder */ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self { $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; return $this; } /** * The SIP username used for authentication. * * @param string $sipAuthUsername The SIP username used for authentication * @return $this Fluent Builder */ public function setSipAuthUsername(string $sipAuthUsername): self { $this->options['sipAuthUsername'] = $sipAuthUsername; return $this; } /** * The SIP password for authentication. * * @param string $sipAuthPassword The SIP password for authentication * @return $this Fluent Builder */ public function setSipAuthPassword(string $sipAuthPassword): self { $this->options['sipAuthPassword'] = $sipAuthPassword; return $this; } /** * The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. * * @param string $region The region where we should mix the conference audio * @return $this Fluent Builder */ public function setRegion(string $region): self { $this->options['region'] = $region; return $this; } /** * The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. * * @param string $conferenceRecordingStatusCallback The URL we should call * using the * `conference_recording_status_callback_method` when the conference recording is available * @return $this Fluent Builder */ public function setConferenceRecordingStatusCallback(string $conferenceRecordingStatusCallback): self { $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback; return $this; } /** * The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we * should use to call * `conference_recording_status_callback` * @return $this Fluent Builder */ public function setConferenceRecordingStatusCallbackMethod(string $conferenceRecordingStatusCallbackMethod): self { $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod; return $this; } /** * The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`. * * @param string[] $recordingStatusCallbackEvent The recording state changes * that should generate a call to * `recording_status_callback` * @return $this Fluent Builder */ public function setRecordingStatusCallbackEvent(array $recordingStatusCallbackEvent): self { $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; return $this; } /** * The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'` * * @param string[] $conferenceRecordingStatusCallbackEvent The conference * recording state * changes that should * generate a call to * `conference_recording_status_callback` * @return $this Fluent Builder */ public function setConferenceRecordingStatusCallbackEvent(array $conferenceRecordingStatusCallbackEvent): self { $this->options['conferenceRecordingStatusCallbackEvent'] = $conferenceRecordingStatusCallbackEvent; return $this; } /** * Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. * * @param bool $coaching Indicates if the participant changed to coach * @return $this Fluent Builder */ public function setCoaching(bool $coaching): self { $this->options['coaching'] = $coaching; return $this; } /** * The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. * * @param string $callSidToCoach The SID of the participant who is being * `coached` * @return $this Fluent Builder */ public function setCallSidToCoach(string $callSidToCoach): self { $this->options['callSidToCoach'] = $callSidToCoach; return $this; } /** * Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`. * * @param string $jitterBufferSize Jitter Buffer size for the connecting * participant * @return $this Fluent Builder */ public function setJitterBufferSize(string $jitterBufferSize): self { $this->options['jitterBufferSize'] = $jitterBufferSize; return $this; } /** * The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) * * @param string $byoc BYOC trunk SID (Beta) * @return $this Fluent Builder */ public function setByoc(string $byoc): self { $this->options['byoc'] = $byoc; return $this; } /** * The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint. * * @param string $callerId The phone number, Client identifier, or username * portion of SIP address that made this call. * @return $this Fluent Builder */ public function setCallerId(string $callerId): self { $this->options['callerId'] = $callerId; return $this; } /** * The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) * * @param string $callReason Reason for the call (Branded Calls Beta) * @return $this Fluent Builder */ public function setCallReason(string $callReason): self { $this->options['callReason'] = $callReason; return $this; } /** * The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio. * * @param string $recordingTrack The track(s) to record * @return $this Fluent Builder */ public function setRecordingTrack(string $recordingTrack): self { $this->options['recordingTrack'] = $recordingTrack; return $this; } /** * The maximum duration of the call in seconds. Constraints depend on account and configuration. * * @param int $timeLimit The maximum duration of the call in seconds. * @return $this Fluent Builder */ public function setTimeLimit(int $timeLimit): self { $this->options['timeLimit'] = $timeLimit; return $this; } /** * Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). * * @param string $machineDetection Enable machine detection or end of greeting * detection * @return $this Fluent Builder */ public function setMachineDetection(string $machineDetection): self { $this->options['machineDetection'] = $machineDetection; return $this; } /** * The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. * * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection * @return $this Fluent Builder */ public function setMachineDetectionTimeout(int $machineDetectionTimeout): self { $this->options['machineDetectionTimeout'] = $machineDetectionTimeout; return $this; } /** * The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. * * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity * @return $this Fluent Builder */ public function setMachineDetectionSpeechThreshold(int $machineDetectionSpeechThreshold): self { $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold; return $this; } /** * The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. * * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity * @return $this Fluent Builder */ public function setMachineDetectionSpeechEndThreshold(int $machineDetectionSpeechEndThreshold): self { $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold; return $this; } /** * The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. * * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence * @return $this Fluent Builder */ public function setMachineDetectionSilenceTimeout(int $machineDetectionSilenceTimeout): self { $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout; return $this; } /** * The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. * * @param string $amdStatusCallback The URL we should call to send amd status * information to your application * @return $this Fluent Builder */ public function setAmdStatusCallback(string $amdStatusCallback): self { $this->options['amdStatusCallback'] = $amdStatusCallback; return $this; } /** * The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. * * @param string $amdStatusCallbackMethod HTTP Method to use with * amd_status_callback * @return $this Fluent Builder */ public function setAmdStatusCallbackMethod(string $amdStatusCallbackMethod): self { $this->options['amdStatusCallbackMethod'] = $amdStatusCallbackMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateParticipantOptions ' . $options . ']'; } } class ReadParticipantOptions extends Options { /** * @param bool $muted Whether to return only participants that are muted * @param bool $hold Whether to return only participants that are on hold * @param bool $coaching Whether to return only participants who are coaching * another call */ public function __construct(bool $muted = Values::NONE, bool $hold = Values::NONE, bool $coaching = Values::NONE) { $this->options['muted'] = $muted; $this->options['hold'] = $hold; $this->options['coaching'] = $coaching; } /** * Whether to return only participants that are muted. Can be: `true` or `false`. * * @param bool $muted Whether to return only participants that are muted * @return $this Fluent Builder */ public function setMuted(bool $muted): self { $this->options['muted'] = $muted; return $this; } /** * Whether to return only participants that are on hold. Can be: `true` or `false`. * * @param bool $hold Whether to return only participants that are on hold * @return $this Fluent Builder */ public function setHold(bool $hold): self { $this->options['hold'] = $hold; return $this; } /** * Whether to return only participants who are coaching another call. Can be: `true` or `false`. * * @param bool $coaching Whether to return only participants who are coaching * another call * @return $this Fluent Builder */ public function setCoaching(bool $coaching): self { $this->options['coaching'] = $coaching; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadParticipantOptions ' . $options . ']'; } }PKt[qFU&&:Twilio/Rest/Api/V2010/Account/Conference/RecordingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RecordingInstance \Twilio\Rest\Api\V2010\Account\Conference\RecordingInstance */ public function buildInstance(array $payload): RecordingInstance { return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingPage]'; } }PKt[/ 22<Twilio/Rest/Api/V2010/Account/Conference/ParticipantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ParticipantInstance \Twilio\Rest\Api\V2010\Account\Conference\ParticipantInstance */ public function buildInstance(array $payload): ParticipantInstance { return new ParticipantInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ParticipantPage]'; } }PKt[đ 3Twilio/Rest/Api/V2010/Account/SigningKeyContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SigningKeys/' . \rawurlencode($sid) . '.json'; } /** * Fetch the SigningKeyInstance * * @return SigningKeyInstance Fetched SigningKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SigningKeyInstance { $payload = $this->version->fetch('GET', $this->uri); return new SigningKeyInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the SigningKeyInstance * * @param array|Options $options Optional Arguments * @return SigningKeyInstance Updated SigningKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SigningKeyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SigningKeyInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the SigningKeyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.SigningKeyContext ' . \implode(' ', $context) . ']'; } }PKt[sY/Twilio/Rest/Api/V2010/Account/ShortCodeList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SMS/ShortCodes.json'; } /** * Streams ShortCodeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ShortCodeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ShortCodeInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ShortCodeInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ShortCodePage Page of ShortCodeInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ShortCodePage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'ShortCode' => $options['shortCode'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ShortCodePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ShortCodeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ShortCodePage Page of ShortCodeInstance */ public function getPage(string $targetUrl): ShortCodePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ShortCodePage($this->version, $response, $this->solution); } /** * Constructs a ShortCodeContext * * @param string $sid The unique string that identifies this resource */ public function getContext(string $sid): ShortCodeContext { return new ShortCodeContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ShortCodeList]'; } }PKt[&B-Twilio/Rest/Api/V2010/Account/BalancePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BalanceInstance \Twilio\Rest\Api\V2010\Account\BalanceInstance */ public function buildInstance(array $payload): BalanceInstance { return new BalanceInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.BalancePage]'; } }PKt[3,Twilio/Rest/Api/V2010/Account/KeyOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateKeyOptions ' . $options . ']'; } }PKt[G%p^/Twilio/Rest/Api/V2010/Account/NewKeyOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateNewKeyOptions ' . $options . ']'; } }PKt[_ss4Twilio/Rest/Api/V2010/Account/ApplicationOptions.phpnu[options['apiVersion'] = $apiVersion; $this->options['voiceUrl'] = $voiceUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['smsUrl'] = $smsUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsStatusCallback'] = $smsStatusCallback; $this->options['messageStatusCallback'] = $messageStatusCallback; $this->options['friendlyName'] = $friendlyName; $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled; } /** * The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version. * * @param string $apiVersion The API version to use to start a new TwiML session * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * The URL we should call when the phone number assigned to this application receives a call. * * @param string $voiceUrl The URL to call when the phone number receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * * @param string $voiceMethod The HTTP method to use with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. * * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL to send status information to your * application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. * * @param string $statusCallbackMethod The HTTP method to use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The URL we should call when the phone number receives an incoming SMS message. * * @param string $smsUrl The URL to call when the phone number receives an * incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. * * @param string $smsMethod The HTTP method to use with sms_url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. * * @param string $smsFallbackUrl The URL to call when an error occurs while * retrieving or executing the TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. * * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL we should call using a POST method to send status information about SMS messages sent by the application. * * @param string $smsStatusCallback The URL to send status information to your * application * @return $this Fluent Builder */ public function setSmsStatusCallback(string $smsStatusCallback): self { $this->options['smsStatusCallback'] = $smsStatusCallback; return $this; } /** * The URL we should call using a POST method to send message status information to your application. * * @param string $messageStatusCallback The URL to send message status * information to your application * @return $this Fluent Builder */ public function setMessageStatusCallback(string $messageStatusCallback): self { $this->options['messageStatusCallback'] = $messageStatusCallback; return $this; } /** * A descriptive string that you create to describe the new application. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`. * * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio * accounts to dial this * application * @return $this Fluent Builder */ public function setPublicApplicationConnectEnabled(bool $publicApplicationConnectEnabled): self { $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateApplicationOptions ' . $options . ']'; } } class ReadApplicationOptions extends Options { /** * @param string $friendlyName The string that identifies the Application * resources to read */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * The string that identifies the Application resources to read. * * @param string $friendlyName The string that identifies the Application * resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadApplicationOptions ' . $options . ']'; } } class UpdateApplicationOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $apiVersion The API version to use to start a new TwiML session * @param string $voiceUrl The URL to call when the phone number receives a call * @param string $voiceMethod The HTTP method to use with the voice_url * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @param string $statusCallback The URL to send status information to your * application * @param string $statusCallbackMethod The HTTP method to use to call * status_callback * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $smsUrl The URL to call when the phone number receives an * incoming SMS message * @param string $smsMethod The HTTP method to use with sms_url * @param string $smsFallbackUrl The URL to call when an error occurs while * retrieving or executing the TwiML * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url * @param string $smsStatusCallback Same as message_status_callback. * Deprecated, included for backwards * compatibility. * @param string $messageStatusCallback The URL to send message status * information to your application * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio * accounts to dial this * application */ public function __construct(string $friendlyName = Values::NONE, string $apiVersion = Values::NONE, string $voiceUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $smsUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsStatusCallback = Values::NONE, string $messageStatusCallback = Values::NONE, bool $publicApplicationConnectEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['apiVersion'] = $apiVersion; $this->options['voiceUrl'] = $voiceUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['smsUrl'] = $smsUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsStatusCallback'] = $smsStatusCallback; $this->options['messageStatusCallback'] = $messageStatusCallback; $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version. * * @param string $apiVersion The API version to use to start a new TwiML session * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * The URL we should call when the phone number assigned to this application receives a call. * * @param string $voiceUrl The URL to call when the phone number receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * * @param string $voiceMethod The HTTP method to use with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. * * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL to send status information to your * application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. * * @param string $statusCallbackMethod The HTTP method to use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The URL we should call when the phone number receives an incoming SMS message. * * @param string $smsUrl The URL to call when the phone number receives an * incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. * * @param string $smsMethod The HTTP method to use with sms_url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. * * @param string $smsFallbackUrl The URL to call when an error occurs while * retrieving or executing the TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. * * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility. * * @param string $smsStatusCallback Same as message_status_callback. * Deprecated, included for backwards * compatibility. * @return $this Fluent Builder */ public function setSmsStatusCallback(string $smsStatusCallback): self { $this->options['smsStatusCallback'] = $smsStatusCallback; return $this; } /** * The URL we should call using a POST method to send message status information to your application. * * @param string $messageStatusCallback The URL to send message status * information to your application * @return $this Fluent Builder */ public function setMessageStatusCallback(string $messageStatusCallback): self { $this->options['messageStatusCallback'] = $messageStatusCallback; return $this; } /** * Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`. * * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio * accounts to dial this * application * @return $this Fluent Builder */ public function setPublicApplicationConnectEnabled(bool $publicApplicationConnectEnabled): self { $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateApplicationOptions ' . $options . ']'; } }PKt[5Twilio/Rest/Api/V2010/Account/Queue/MemberOptions.phpnu[options['method'] = $method; } /** * How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters. * * @param string $method How to pass the update request data * @return $this Fluent Builder */ public function setMethod(string $method): self { $this->options['method'] = $method; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateMemberOptions ' . $options . ']'; } }PKt[TX  5Twilio/Rest/Api/V2010/Account/Queue/MemberContext.phpnu[solution = ['accountSid' => $accountSid, 'queueSid' => $queueSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues/' . \rawurlencode($queueSid) . '/Members/' . \rawurlencode($callSid) . '.json'; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { $payload = $this->version->fetch('GET', $this->uri); return new MemberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['queueSid'], $this->solution['callSid'] ); } /** * Update the MemberInstance * * @param string $url The absolute URL of the Queue resource * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $url, array $options = []): MemberInstance { $options = new Values($options); $data = Values::of(['Url' => $url, 'Method' => $options['method'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new MemberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['queueSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.MemberContext ' . \implode(' ', $context) . ']'; } }PKt[V2Twilio/Rest/Api/V2010/Account/Queue/MemberList.phpnu[solution = ['accountSid' => $accountSid, 'queueSid' => $queueSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues/' . \rawurlencode($queueSid) . '/Members.json'; } /** * Streams MemberInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MemberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MemberInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of MemberInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MemberPage Page of MemberInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MemberPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MemberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MemberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MemberPage Page of MemberInstance */ public function getPage(string $targetUrl): MemberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MemberPage($this->version, $response, $this->solution); } /** * Constructs a MemberContext * * @param string $callSid The Call SID of the resource(s) to fetch */ public function getContext(string $callSid): MemberContext { return new MemberContext( $this->version, $this->solution['accountSid'], $this->solution['queueSid'], $callSid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MemberList]'; } }PKt[Kr6Twilio/Rest/Api/V2010/Account/Queue/MemberInstance.phpnu[properties = [ 'callSid' => Values::array_get($payload, 'call_sid'), 'dateEnqueued' => Deserialize::dateTime(Values::array_get($payload, 'date_enqueued')), 'position' => Values::array_get($payload, 'position'), 'uri' => Values::array_get($payload, 'uri'), 'waitTime' => Values::array_get($payload, 'wait_time'), 'queueSid' => Values::array_get($payload, 'queue_sid'), ]; $this->solution = [ 'accountSid' => $accountSid, 'queueSid' => $queueSid, 'callSid' => $callSid ?: $this->properties['callSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MemberContext Context for this MemberInstance */ protected function proxy(): MemberContext { if (!$this->context) { $this->context = new MemberContext( $this->version, $this->solution['accountSid'], $this->solution['queueSid'], $this->solution['callSid'] ); } return $this->context; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { return $this->proxy()->fetch(); } /** * Update the MemberInstance * * @param string $url The absolute URL of the Queue resource * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $url, array $options = []): MemberInstance { return $this->proxy()->update($url, $options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.MemberInstance ' . \implode(' ', $context) . ']'; } }PKt[:Z2Twilio/Rest/Api/V2010/Account/Queue/MemberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MemberInstance \Twilio\Rest\Api\V2010\Account\Queue\MemberInstance */ public function buildInstance(array $payload): MemberInstance { return new MemberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['queueSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MemberPage]'; } }PKt[)Twilio/Rest/Api/V2010/Account/SipList.phpnu[solution = ['accountSid' => $accountSid, ]; } /** * Access the domains */ protected function getDomains(): DomainList { if (!$this->_domains) { $this->_domains = new DomainList($this->version, $this->solution['accountSid']); } return $this->_domains; } /** * Access the ipAccessControlLists */ protected function getIpAccessControlLists(): IpAccessControlListList { if (!$this->_ipAccessControlLists) { $this->_ipAccessControlLists = new IpAccessControlListList( $this->version, $this->solution['accountSid'] ); } return $this->_ipAccessControlLists; } /** * Access the credentialLists */ protected function getCredentialLists(): CredentialListList { if (!$this->_credentialLists) { $this->_credentialLists = new CredentialListList($this->version, $this->solution['accountSid']); } return $this->_credentialLists; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SipList]'; } }PKt[CP7Twilio/Rest/Api/V2010/Account/ValidationRequestPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ValidationRequestInstance \Twilio\Rest\Api\V2010\Account\ValidationRequestInstance */ public function buildInstance(array $payload): ValidationRequestInstance { return new ValidationRequestInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ValidationRequestPage]'; } }PKt[Hy՚ ,Twilio/Rest/Api/V2010/Account/KeyContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Keys/' . \rawurlencode($sid) . '.json'; } /** * Fetch the KeyInstance * * @return KeyInstance Fetched KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): KeyInstance { $payload = $this->version->fetch('GET', $this->uri); return new KeyInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the KeyInstance * * @param array|Options $options Optional Arguments * @return KeyInstance Updated KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): KeyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new KeyInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the KeyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.KeyContext ' . \implode(' ', $context) . ']'; } }PKt[Eh0Twilio/Rest/Api/V2010/Account/NewKeyInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'secret' => Values::array_get($payload, 'secret'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NewKeyInstance]'; } }PKt[s#!NNATwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AvailablePhoneNumberCountryInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryInstance */ public function buildInstance(array $payload): AvailablePhoneNumberCountryInstance { return new AvailablePhoneNumberCountryInstance( $this->version, $payload, $this->solution['accountSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AvailablePhoneNumberCountryPage]'; } }PKt[xT2Twilio/Rest/Api/V2010/Account/NotificationList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Notifications.json'; } /** * Streams NotificationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads NotificationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return NotificationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of NotificationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return NotificationPage Page of NotificationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): NotificationPage { $options = new Values($options); $params = Values::of([ 'Log' => $options['log'], 'MessageDate<' => Serialize::iso8601Date($options['messageDateBefore']), 'MessageDate' => Serialize::iso8601Date($options['messageDate']), 'MessageDate>' => Serialize::iso8601Date($options['messageDateAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new NotificationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of NotificationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return NotificationPage Page of NotificationInstance */ public function getPage(string $targetUrl): NotificationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new NotificationPage($this->version, $response, $this->solution); } /** * Constructs a NotificationContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): NotificationContext { return new NotificationContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NotificationList]'; } }PKt[83YOO4Twilio/Rest/Api/V2010/Account/ConnectAppInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'authorizeRedirectUrl' => Values::array_get($payload, 'authorize_redirect_url'), 'companyName' => Values::array_get($payload, 'company_name'), 'deauthorizeCallbackMethod' => Values::array_get($payload, 'deauthorize_callback_method'), 'deauthorizeCallbackUrl' => Values::array_get($payload, 'deauthorize_callback_url'), 'description' => Values::array_get($payload, 'description'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'homepageUrl' => Values::array_get($payload, 'homepage_url'), 'permissions' => Values::array_get($payload, 'permissions'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConnectAppContext Context for this ConnectAppInstance */ protected function proxy(): ConnectAppContext { if (!$this->context) { $this->context = new ConnectAppContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ConnectAppInstance * * @return ConnectAppInstance Fetched ConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConnectAppInstance { return $this->proxy()->fetch(); } /** * Update the ConnectAppInstance * * @param array|Options $options Optional Arguments * @return ConnectAppInstance Updated ConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConnectAppInstance { return $this->proxy()->update($options); } /** * Delete the ConnectAppInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.ConnectAppInstance ' . \implode(' ', $context) . ']'; } }PKt[)dy=Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppContext.phpnu[solution = ['accountSid' => $accountSid, 'connectAppSid' => $connectAppSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AuthorizedConnectApps/' . \rawurlencode($connectAppSid) . '.json'; } /** * Fetch the AuthorizedConnectAppInstance * * @return AuthorizedConnectAppInstance Fetched AuthorizedConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthorizedConnectAppInstance { $payload = $this->version->fetch('GET', $this->uri); return new AuthorizedConnectAppInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['connectAppSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AuthorizedConnectAppContext ' . \implode(' ', $context) . ']'; } }PKt[=nFF/Twilio/Rest/Api/V2010/Account/RecordingList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings.json'; } /** * Streams RecordingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RecordingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RecordingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RecordingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RecordingPage Page of RecordingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RecordingPage { $options = new Values($options); $params = Values::of([ 'DateCreated<' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateCreated>' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'CallSid' => $options['callSid'], 'ConferenceSid' => $options['conferenceSid'], 'IncludeSoftDeleted' => Serialize::booleanToString($options['includeSoftDeleted']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RecordingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RecordingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RecordingPage Page of RecordingInstance */ public function getPage(string $targetUrl): RecordingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RecordingPage($this->version, $response, $this->solution); } /** * Constructs a RecordingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): RecordingContext { return new RecordingContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingList]'; } }PKt[Kby.Twilio/Rest/Api/V2010/Account/QueueContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues/' . \rawurlencode($sid) . '.json'; } /** * Fetch the QueueInstance * * @return QueueInstance Fetched QueueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): QueueInstance { $payload = $this->version->fetch('GET', $this->uri); return new QueueInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the QueueInstance * * @param array|Options $options Optional Arguments * @return QueueInstance Updated QueueInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): QueueInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], 'MaxSize' => $options['maxSize'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new QueueInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the QueueInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the members */ protected function getMembers(): MemberList { if (!$this->_members) { $this->_members = new MemberList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_members; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.QueueContext ' . \implode(' ', $context) . ']'; } }PKt[-Twilio/Rest/Api/V2010/Account/AddressList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Addresses.json'; } /** * Create the AddressInstance * * @param string $customerName The name to associate with the new address * @param string $street The number and street address of the new address * @param string $city The city of the new address * @param string $region The state or region of the new address * @param string $postalCode The postal code of the new address * @param string $isoCountry The ISO country code of the new address * @param array|Options $options Optional Arguments * @return AddressInstance Created AddressInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $customerName, string $street, string $city, string $region, string $postalCode, string $isoCountry, array $options = []): AddressInstance { $options = new Values($options); $data = Values::of([ 'CustomerName' => $customerName, 'Street' => $street, 'City' => $city, 'Region' => $region, 'PostalCode' => $postalCode, 'IsoCountry' => $isoCountry, 'FriendlyName' => $options['friendlyName'], 'EmergencyEnabled' => Serialize::booleanToString($options['emergencyEnabled']), 'AutoCorrectAddress' => Serialize::booleanToString($options['autoCorrectAddress']), 'StreetSecondary' => $options['streetSecondary'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AddressInstance($this->version, $payload, $this->solution['accountSid']); } /** * Streams AddressInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AddressInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AddressInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of AddressInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AddressPage Page of AddressInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AddressPage { $options = new Values($options); $params = Values::of([ 'CustomerName' => $options['customerName'], 'FriendlyName' => $options['friendlyName'], 'IsoCountry' => $options['isoCountry'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AddressPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AddressInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AddressPage Page of AddressInstance */ public function getPage(string $targetUrl): AddressPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AddressPage($this->version, $response, $this->solution); } /** * Constructs a AddressContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AddressContext { return new AddressContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AddressList]'; } }PKt[lo)ۺ0Twilio/Rest/Api/V2010/Account/ConnectAppPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConnectAppInstance \Twilio\Rest\Api\V2010\Account\ConnectAppInstance */ public function buildInstance(array $payload): ConnectAppInstance { return new ConnectAppInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ConnectAppPage]'; } }PKt[k)ETwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryInstance.phpnu[properties = [ 'countryCode' => Values::array_get($payload, 'country_code'), 'country' => Values::array_get($payload, 'country'), 'uri' => Values::array_get($payload, 'uri'), 'beta' => Values::array_get($payload, 'beta'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = [ 'accountSid' => $accountSid, 'countryCode' => $countryCode ?: $this->properties['countryCode'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AvailablePhoneNumberCountryContext Context for this * AvailablePhoneNumberCountryInstance */ protected function proxy(): AvailablePhoneNumberCountryContext { if (!$this->context) { $this->context = new AvailablePhoneNumberCountryContext( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->context; } /** * Fetch the AvailablePhoneNumberCountryInstance * * @return AvailablePhoneNumberCountryInstance Fetched * AvailablePhoneNumberCountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AvailablePhoneNumberCountryInstance { return $this->proxy()->fetch(); } /** * Access the local */ protected function getLocal(): LocalList { return $this->proxy()->local; } /** * Access the tollFree */ protected function getTollFree(): TollFreeList { return $this->proxy()->tollFree; } /** * Access the mobile */ protected function getMobile(): MobileList { return $this->proxy()->mobile; } /** * Access the national */ protected function getNational(): NationalList { return $this->proxy()->national; } /** * Access the voip */ protected function getVoip(): VoipList { return $this->proxy()->voip; } /** * Access the sharedCost */ protected function getSharedCost(): SharedCostList { return $this->proxy()->sharedCost; } /** * Access the machineToMachine */ protected function getMachineToMachine(): MachineToMachineList { return $this->proxy()->machineToMachine; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AvailablePhoneNumberCountryInstance ' . \implode(' ', $context) . ']'; } }PKt[.667Twilio/Rest/Api/V2010/Account/ValidationRequestList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/OutgoingCallerIds.json'; } /** * Create the ValidationRequestInstance * * @param string $phoneNumber The phone number to verify in E.164 format * @param array|Options $options Optional Arguments * @return ValidationRequestInstance Created ValidationRequestInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber, array $options = []): ValidationRequestInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $phoneNumber, 'FriendlyName' => $options['friendlyName'], 'CallDelay' => $options['callDelay'], 'Extension' => $options['extension'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ValidationRequestInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ValidationRequestList]'; } }PKt[ f0Twilio/Rest/Api/V2010/Account/SigningKeyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SigningKeyInstance \Twilio\Rest\Api\V2010\Account\SigningKeyInstance */ public function buildInstance(array $payload): SigningKeyInstance { return new SigningKeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SigningKeyPage]'; } }PKt[o'o'9Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers.json'; } /** * Streams IncomingPhoneNumberInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads IncomingPhoneNumberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return IncomingPhoneNumberInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of IncomingPhoneNumberInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return IncomingPhoneNumberPage Page of IncomingPhoneNumberInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IncomingPhoneNumberPage { $options = new Values($options); $params = Values::of([ 'Beta' => Serialize::booleanToString($options['beta']), 'FriendlyName' => $options['friendlyName'], 'PhoneNumber' => $options['phoneNumber'], 'Origin' => $options['origin'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IncomingPhoneNumberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IncomingPhoneNumberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IncomingPhoneNumberPage Page of IncomingPhoneNumberInstance */ public function getPage(string $targetUrl): IncomingPhoneNumberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IncomingPhoneNumberPage($this->version, $response, $this->solution); } /** * Create the IncomingPhoneNumberInstance * * @param array|Options $options Optional Arguments * @return IncomingPhoneNumberInstance Created IncomingPhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): IncomingPhoneNumberInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $options['phoneNumber'], 'AreaCode' => $options['areaCode'], 'ApiVersion' => $options['apiVersion'], 'FriendlyName' => $options['friendlyName'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceApplicationSid' => $options['voiceApplicationSid'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'EmergencyStatus' => $options['emergencyStatus'], 'EmergencyAddressSid' => $options['emergencyAddressSid'], 'TrunkSid' => $options['trunkSid'], 'IdentitySid' => $options['identitySid'], 'AddressSid' => $options['addressSid'], 'VoiceReceiveMode' => $options['voiceReceiveMode'], 'BundleSid' => $options['bundleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IncomingPhoneNumberInstance($this->version, $payload, $this->solution['accountSid']); } /** * Access the local */ protected function getLocal(): LocalList { if (!$this->_local) { $this->_local = new LocalList($this->version, $this->solution['accountSid']); } return $this->_local; } /** * Access the mobile */ protected function getMobile(): MobileList { if (!$this->_mobile) { $this->_mobile = new MobileList($this->version, $this->solution['accountSid']); } return $this->_mobile; } /** * Access the tollFree */ protected function getTollFree(): TollFreeList { if (!$this->_tollFree) { $this->_tollFree = new TollFreeList($this->version, $this->solution['accountSid']); } return $this->_tollFree; } /** * Constructs a IncomingPhoneNumberContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): IncomingPhoneNumberContext { return new IncomingPhoneNumberContext($this->version, $this->solution['accountSid'], $sid); } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IncomingPhoneNumberList]'; } }PKt[|2Twilio/Rest/Api/V2010/Account/NotificationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NotificationInstance \Twilio\Rest\Api\V2010\Account\NotificationInstance */ public function buildInstance(array $payload): NotificationInstance { return new NotificationInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NotificationPage]'; } }PKt[lNޠ+Twilio/Rest/Api/V2010/Account/QueueList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues.json'; } /** * Streams QueueInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads QueueInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return QueueInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of QueueInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return QueuePage Page of QueueInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): QueuePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new QueuePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of QueueInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return QueuePage Page of QueueInstance */ public function getPage(string $targetUrl): QueuePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new QueuePage($this->version, $response, $this->solution); } /** * Create the QueueInstance * * @param string $friendlyName A string to describe this resource * @param array|Options $options Optional Arguments * @return QueueInstance Created QueueInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): QueueInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $friendlyName, 'MaxSize' => $options['maxSize'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new QueueInstance($this->version, $payload, $this->solution['accountSid']); } /** * Constructs a QueueContext * * @param string $sid The unique string that identifies this resource */ public function getContext(string $sid): QueueContext { return new QueueContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.QueueList]'; } }PKt[4L!!2Twilio/Rest/Api/V2010/Account/RecordingOptions.phpnu[options['includeSoftDeleted'] = $includeSoftDeleted; } /** * A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days. * * @param bool $includeSoftDeleted A boolean parameter indicating whether to * retrieve soft deleted recordings or not. * @return $this Fluent Builder */ public function setIncludeSoftDeleted(bool $includeSoftDeleted): self { $this->options['includeSoftDeleted'] = $includeSoftDeleted; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.FetchRecordingOptions ' . $options . ']'; } } class ReadRecordingOptions extends Options { /** * @param string $dateCreatedBefore Only include recordings that were created * on this date * @param string $dateCreated Only include recordings that were created on this * date * @param string $dateCreatedAfter Only include recordings that were created on * this date * @param string $callSid The Call SID of the resources to read * @param string $conferenceSid Read by unique Conference SID for the recording * @param bool $includeSoftDeleted A boolean parameter indicating whether to * retrieve soft deleted recordings or not. */ public function __construct(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE, string $callSid = Values::NONE, string $conferenceSid = Values::NONE, bool $includeSoftDeleted = Values::NONE) { $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['dateCreated'] = $dateCreated; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['callSid'] = $callSid; $this->options['conferenceSid'] = $conferenceSid; $this->options['includeSoftDeleted'] = $includeSoftDeleted; } /** * Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. * * @param string $dateCreatedBefore Only include recordings that were created * on this date * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. * * @param string $dateCreated Only include recordings that were created on this * date * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. * * @param string $dateCreatedAfter Only include recordings that were created on * this date * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. * * @param string $callSid The Call SID of the resources to read * @return $this Fluent Builder */ public function setCallSid(string $callSid): self { $this->options['callSid'] = $callSid; return $this; } /** * The Conference SID that identifies the conference associated with the recording to read. * * @param string $conferenceSid Read by unique Conference SID for the recording * @return $this Fluent Builder */ public function setConferenceSid(string $conferenceSid): self { $this->options['conferenceSid'] = $conferenceSid; return $this; } /** * A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days. * * @param bool $includeSoftDeleted A boolean parameter indicating whether to * retrieve soft deleted recordings or not. * @return $this Fluent Builder */ public function setIncludeSoftDeleted(bool $includeSoftDeleted): self { $this->options['includeSoftDeleted'] = $includeSoftDeleted; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadRecordingOptions ' . $options . ']'; } }PKt[T**)*)*Twilio/Rest/Api/V2010/Account/CallList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls.json'; } /** * Create the CallInstance * * @param string $to Phone number, SIP address, or client identifier to call * @param string $from Twilio number from which to originate the call * @param array|Options $options Optional Arguments * @return CallInstance Created CallInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $to, string $from, array $options = []): CallInstance { $options = new Values($options); $data = Values::of([ 'To' => $to, 'From' => $from, 'Url' => $options['url'], 'Twiml' => $options['twiml'], 'ApplicationSid' => $options['applicationSid'], 'Method' => $options['method'], 'FallbackUrl' => $options['fallbackUrl'], 'FallbackMethod' => $options['fallbackMethod'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function($e) { return $e; }), 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'SendDigits' => $options['sendDigits'], 'Timeout' => $options['timeout'], 'Record' => Serialize::booleanToString($options['record']), 'RecordingChannels' => $options['recordingChannels'], 'RecordingStatusCallback' => $options['recordingStatusCallback'], 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'], 'SipAuthUsername' => $options['sipAuthUsername'], 'SipAuthPassword' => $options['sipAuthPassword'], 'MachineDetection' => $options['machineDetection'], 'MachineDetectionTimeout' => $options['machineDetectionTimeout'], 'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function($e) { return $e; }), 'Trim' => $options['trim'], 'CallerId' => $options['callerId'], 'MachineDetectionSpeechThreshold' => $options['machineDetectionSpeechThreshold'], 'MachineDetectionSpeechEndThreshold' => $options['machineDetectionSpeechEndThreshold'], 'MachineDetectionSilenceTimeout' => $options['machineDetectionSilenceTimeout'], 'AsyncAmd' => $options['asyncAmd'], 'AsyncAmdStatusCallback' => $options['asyncAmdStatusCallback'], 'AsyncAmdStatusCallbackMethod' => $options['asyncAmdStatusCallbackMethod'], 'Byoc' => $options['byoc'], 'CallReason' => $options['callReason'], 'CallToken' => $options['callToken'], 'RecordingTrack' => $options['recordingTrack'], 'TimeLimit' => $options['timeLimit'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CallInstance($this->version, $payload, $this->solution['accountSid']); } /** * Streams CallInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CallInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CallInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CallInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CallPage Page of CallInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CallPage { $options = new Values($options); $params = Values::of([ 'To' => $options['to'], 'From' => $options['from'], 'ParentCallSid' => $options['parentCallSid'], 'Status' => $options['status'], 'StartTime<' => Serialize::iso8601DateTime($options['startTimeBefore']), 'StartTime' => Serialize::iso8601DateTime($options['startTime']), 'StartTime>' => Serialize::iso8601DateTime($options['startTimeAfter']), 'EndTime<' => Serialize::iso8601DateTime($options['endTimeBefore']), 'EndTime' => Serialize::iso8601DateTime($options['endTime']), 'EndTime>' => Serialize::iso8601DateTime($options['endTimeAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CallPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CallInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CallPage Page of CallInstance */ public function getPage(string $targetUrl): CallPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CallPage($this->version, $response, $this->solution); } /** * Access the feedbackSummaries */ protected function getFeedbackSummaries(): FeedbackSummaryList { if (!$this->_feedbackSummaries) { $this->_feedbackSummaries = new FeedbackSummaryList($this->version, $this->solution['accountSid']); } return $this->_feedbackSummaries; } /** * Constructs a CallContext * * @param string $sid The SID of the Call resource to fetch */ public function getContext(string $sid): CallContext { return new CallContext($this->version, $this->solution['accountSid'], $sid); } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CallList]'; } }PKt[Db9Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return IncomingPhoneNumberInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberInstance */ public function buildInstance(array $payload): IncomingPhoneNumberInstance { return new IncomingPhoneNumberInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IncomingPhoneNumberPage]'; } }PKt[e=FTwilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'emergencyStatus' => Values::array_get($payload, 'emergency_status'), 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'addressSid' => $addressSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DependentPhoneNumberInstance]'; } }PKt[C}__BTwilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DependentPhoneNumberInstance \Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberInstance */ public function buildInstance(array $payload): DependentPhoneNumberInstance { return new DependentPhoneNumberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['addressSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DependentPhoneNumberPage]'; } }PKt[SŁxXXBTwilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberList.phpnu[solution = ['accountSid' => $accountSid, 'addressSid' => $addressSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Addresses/' . \rawurlencode($addressSid) . '/DependentPhoneNumbers.json'; } /** * Streams DependentPhoneNumberInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DependentPhoneNumberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DependentPhoneNumberInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DependentPhoneNumberInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DependentPhoneNumberPage Page of DependentPhoneNumberInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DependentPhoneNumberPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DependentPhoneNumberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DependentPhoneNumberInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DependentPhoneNumberPage Page of DependentPhoneNumberInstance */ public function getPage(string $targetUrl): DependentPhoneNumberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DependentPhoneNumberPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DependentPhoneNumberList]'; } }PKt[ 2Twilio/Rest/Api/V2010/Account/RecordingContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the RecordingInstance * * @param array|Options $options Optional Arguments * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): RecordingInstance { $options = new Values($options); $params = Values::of([ 'IncludeSoftDeleted' => Serialize::booleanToString($options['includeSoftDeleted']), ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the RecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the transcriptions */ protected function getTranscriptions(): TranscriptionList { if (!$this->_transcriptions) { $this->_transcriptions = new TranscriptionList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_transcriptions; } /** * Access the addOnResults */ protected function getAddOnResults(): AddOnResultList { if (!$this->_addOnResults) { $this->_addOnResults = new AddOnResultList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_addOnResults; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.RecordingContext ' . \implode(' ', $context) . ']'; } }PKt[uN OO3Twilio/Rest/Api/V2010/Account/TranscriptionList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Transcriptions.json'; } /** * Streams TranscriptionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TranscriptionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TranscriptionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of TranscriptionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TranscriptionPage Page of TranscriptionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TranscriptionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TranscriptionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TranscriptionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TranscriptionPage Page of TranscriptionInstance */ public function getPage(string $targetUrl): TranscriptionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TranscriptionPage($this->version, $response, $this->solution); } /** * Constructs a TranscriptionContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): TranscriptionContext { return new TranscriptionContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TranscriptionList]'; } }PKt[ +Twilio/Rest/Api/V2010/Account/QueuePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return QueueInstance \Twilio\Rest\Api\V2010\Account\QueueInstance */ public function buildInstance(array $payload): QueueInstance { return new QueueInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.QueuePage]'; } }PKt[#fmm0Twilio/Rest/Api/V2010/Account/MessageOptions.phpnu[options['from'] = $from; $this->options['messagingServiceSid'] = $messagingServiceSid; $this->options['body'] = $body; $this->options['mediaUrl'] = $mediaUrl; $this->options['statusCallback'] = $statusCallback; $this->options['applicationSid'] = $applicationSid; $this->options['maxPrice'] = $maxPrice; $this->options['provideFeedback'] = $provideFeedback; $this->options['attempt'] = $attempt; $this->options['validityPeriod'] = $validityPeriod; $this->options['forceDelivery'] = $forceDelivery; $this->options['contentRetention'] = $contentRetention; $this->options['addressRetention'] = $addressRetention; $this->options['smartEncoded'] = $smartEncoded; $this->options['persistentAction'] = $persistentAction; $this->options['shortenUrls'] = $shortenUrls; $this->options['scheduleType'] = $scheduleType; $this->options['sendAt'] = $sendAt; $this->options['sendAsMms'] = $sendAsMms; $this->options['contentSid'] = $contentSid; $this->options['contentVariables'] = $contentVariables; } /** * A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty. * * @param string $from The phone number that initiated the message * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery. * * @param string $messagingServiceSid The SID of the Messaging Service you want * to associate with the message. * @return $this Fluent Builder */ public function setMessagingServiceSid(string $messagingServiceSid): self { $this->options['messagingServiceSid'] = $messagingServiceSid; return $this; } /** * The text of the message you want to send. Can be up to 1,600 characters in length. * * @param string $body The text of the message you want to send. Can be up to * 1,600 characters in length. * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada. * * @param string[] $mediaUrl The URL of the media to send with the message * @return $this Fluent Builder */ public function setMediaUrl(array $mediaUrl): self { $this->options['mediaUrl'] = $mediaUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used. * * @param string $applicationSid The application to use for callbacks * @return $this Fluent Builder */ public function setApplicationSid(string $applicationSid): self { $this->options['applicationSid'] = $applicationSid; return $this; } /** * The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked. * * @param string $maxPrice The total maximum price up to 4 decimal places in US * dollars acceptable for the message to be delivered. * @return $this Fluent Builder */ public function setMaxPrice(string $maxPrice): self { $this->options['maxPrice'] = $maxPrice; return $this; } /** * Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default. * * @param bool $provideFeedback Whether to confirm delivery of the message * @return $this Fluent Builder */ public function setProvideFeedback(bool $provideFeedback): self { $this->options['provideFeedback'] = $provideFeedback; return $this; } /** * Total number of attempts made ( including this ) to send out the message regardless of the provider used * * @param int $attempt Total numer of attempts made , this inclusive to send * out the message * @return $this Fluent Builder */ public function setAttempt(int $attempt): self { $this->options['attempt'] = $attempt; return $this; } /** * How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. * * @param int $validityPeriod The number of seconds that the message can remain * in our outgoing queue. * @return $this Fluent Builder */ public function setValidityPeriod(int $validityPeriod): self { $this->options['validityPeriod'] = $validityPeriod; return $this; } /** * Reserved * * @param bool $forceDelivery Reserved * @return $this Fluent Builder */ public function setForceDelivery(bool $forceDelivery): self { $this->options['forceDelivery'] = $forceDelivery; return $this; } /** * Determines if the message content can be stored or redacted based on privacy settings * * @param string $contentRetention Determines if the message content can be * stored or redacted based on privacy settings * @return $this Fluent Builder */ public function setContentRetention(string $contentRetention): self { $this->options['contentRetention'] = $contentRetention; return $this; } /** * Determines if the address can be stored or obfuscated based on privacy settings * * @param string $addressRetention Determines if the address can be stored or * obfuscated based on privacy settings * @return $this Fluent Builder */ public function setAddressRetention(string $addressRetention): self { $this->options['addressRetention'] = $addressRetention; return $this; } /** * Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. * * @param bool $smartEncoded Whether to detect Unicode characters that have a * similar GSM-7 character and replace them * @return $this Fluent Builder */ public function setSmartEncoded(bool $smartEncoded): self { $this->options['smartEncoded'] = $smartEncoded; return $this; } /** * Rich actions for Channels Messages. * * @param string[] $persistentAction Rich actions for Channels Messages. * @return $this Fluent Builder */ public function setPersistentAction(array $persistentAction): self { $this->options['persistentAction'] = $persistentAction; return $this; } /** * Determines the usage of Click Tracking. Setting it to `true` will instruct Twilio to replace all links in the Message with a shortened version based on the associated Domain Sid and track clicks on them. If this parameter is not set on an API call, we will use the value set on the Messaging Service. If this parameter is not set and the value is not configured on the Messaging Service used this will default to `false`. * * @param bool $shortenUrls Sets whether to shorten and track links included in * the body of this message. * @return $this Fluent Builder */ public function setShortenUrls(bool $shortenUrls): self { $this->options['shortenUrls'] = $shortenUrls; return $this; } /** * Indicates your intent to schedule a message. Pass the value `fixed` to schedule a message at a fixed time. * * @param string $scheduleType Pass the value `fixed` to schedule a message at * a fixed time. * @return $this Fluent Builder */ public function setScheduleType(string $scheduleType): self { $this->options['scheduleType'] = $scheduleType; return $this; } /** * The time that Twilio will send the message. Must be in ISO 8601 format. * * @param \DateTime $sendAt The time that Twilio will send the message. Must be * in ISO 8601 format. * @return $this Fluent Builder */ public function setSendAt(\DateTime $sendAt): self { $this->options['sendAt'] = $sendAt; return $this; } /** * If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media. * * @param bool $sendAsMms If set to True, Twilio will deliver the message as a * single MMS message, regardless of the presence of * media. * @return $this Fluent Builder */ public function setSendAsMms(bool $sendAsMms): self { $this->options['sendAsMms'] = $sendAsMms; return $this; } /** * The SID of the Content object returned at Content API content create time (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template). If this parameter is not specified, then the Content API will not be utilized. * * @param string $contentSid The SID of the preconfigured Content object you * want to associate with the message. * @return $this Fluent Builder */ public function setContentSid(string $contentSid): self { $this->options['contentSid'] = $contentSid; return $this; } /** * Key-value pairs of variable names to substitution values, used alongside a content_sid. If not specified, Content API will default to the default variables defined at create time. * * @param string $contentVariables Key-value pairs of variable names to * substitution values, used alongside a * content_sid. * @return $this Fluent Builder */ public function setContentVariables(string $contentVariables): self { $this->options['contentVariables'] = $contentVariables; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateMessageOptions ' . $options . ']'; } } class ReadMessageOptions extends Options { /** * @param string $to Filter by messages sent to this number * @param string $from Filter by from number * @param string $dateSentBefore Filter by date sent * @param string $dateSent Filter by date sent * @param string $dateSentAfter Filter by date sent */ public function __construct(string $to = Values::NONE, string $from = Values::NONE, string $dateSentBefore = Values::NONE, string $dateSent = Values::NONE, string $dateSentAfter = Values::NONE) { $this->options['to'] = $to; $this->options['from'] = $from; $this->options['dateSentBefore'] = $dateSentBefore; $this->options['dateSent'] = $dateSent; $this->options['dateSentAfter'] = $dateSentAfter; } /** * Read messages sent to only this phone number. * * @param string $to Filter by messages sent to this number * @return $this Fluent Builder */ public function setTo(string $to): self { $this->options['to'] = $to; return $this; } /** * Read messages sent from only this phone number or alphanumeric sender ID. * * @param string $from Filter by from number * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. * * @param string $dateSentBefore Filter by date sent * @return $this Fluent Builder */ public function setDateSentBefore(string $dateSentBefore): self { $this->options['dateSentBefore'] = $dateSentBefore; return $this; } /** * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. * * @param string $dateSent Filter by date sent * @return $this Fluent Builder */ public function setDateSent(string $dateSent): self { $this->options['dateSent'] = $dateSent; return $this; } /** * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. * * @param string $dateSentAfter Filter by date sent * @return $this Fluent Builder */ public function setDateSentAfter(string $dateSentAfter): self { $this->options['dateSentAfter'] = $dateSentAfter; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadMessageOptions ' . $options . ']'; } } class UpdateMessageOptions extends Options { /** * @param string $body The text of the message you want to send * @param string $status Set as `canceled` to cancel a message from being sent. */ public function __construct(string $body = Values::NONE, string $status = Values::NONE) { $this->options['body'] = $body; $this->options['status'] = $status; } /** * The text of the message you want to send. Can be up to 1,600 characters long. * * @param string $body The text of the message you want to send * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * When set as `canceled`, allows a message cancelation request if a message has not yet been sent. * * @param string $status Set as `canceled` to cancel a message from being sent. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateMessageOptions ' . $options . ']'; } }PKt[#Շhh3Twilio/Rest/Api/V2010/Account/SigningKeyOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateSigningKeyOptions ' . $options . ']'; } }PKt[ٳ] ] 9Twilio/Rest/Api/V2010/Account/OutgoingCallerIdContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/OutgoingCallerIds/' . \rawurlencode($sid) . '.json'; } /** * Fetch the OutgoingCallerIdInstance * * @return OutgoingCallerIdInstance Fetched OutgoingCallerIdInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): OutgoingCallerIdInstance { $payload = $this->version->fetch('GET', $this->uri); return new OutgoingCallerIdInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the OutgoingCallerIdInstance * * @param array|Options $options Optional Arguments * @return OutgoingCallerIdInstance Updated OutgoingCallerIdInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): OutgoingCallerIdInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new OutgoingCallerIdInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the OutgoingCallerIdInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.OutgoingCallerIdContext ' . \implode(' ', $context) . ']'; } }PKt[Y-DTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryContext.phpnu[solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '.json'; } /** * Fetch the AvailablePhoneNumberCountryInstance * * @return AvailablePhoneNumberCountryInstance Fetched * AvailablePhoneNumberCountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AvailablePhoneNumberCountryInstance { $payload = $this->version->fetch('GET', $this->uri); return new AvailablePhoneNumberCountryInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Access the local */ protected function getLocal(): LocalList { if (!$this->_local) { $this->_local = new LocalList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_local; } /** * Access the tollFree */ protected function getTollFree(): TollFreeList { if (!$this->_tollFree) { $this->_tollFree = new TollFreeList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_tollFree; } /** * Access the mobile */ protected function getMobile(): MobileList { if (!$this->_mobile) { $this->_mobile = new MobileList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_mobile; } /** * Access the national */ protected function getNational(): NationalList { if (!$this->_national) { $this->_national = new NationalList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_national; } /** * Access the voip */ protected function getVoip(): VoipList { if (!$this->_voip) { $this->_voip = new VoipList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_voip; } /** * Access the sharedCost */ protected function getSharedCost(): SharedCostList { if (!$this->_sharedCost) { $this->_sharedCost = new SharedCostList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_sharedCost; } /** * Access the machineToMachine */ protected function getMachineToMachine(): MachineToMachineList { if (!$this->_machineToMachine) { $this->_machineToMachine = new MachineToMachineList( $this->version, $this->solution['accountSid'], $this->solution['countryCode'] ); } return $this->_machineToMachine; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AvailablePhoneNumberCountryContext ' . \implode(' ', $context) . ']'; } }PKt[`$PP/Twilio/Rest/Api/V2010/Account/UsageInstance.phpnu[solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UsageInstance]'; } }PKt[ -D//+Twilio/Rest/Api/V2010/Account/TokenList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Tokens.json'; } /** * Create the TokenInstance * * @param array|Options $options Optional Arguments * @return TokenInstance Created TokenInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): TokenInstance { $options = new Values($options); $data = Values::of(['Ttl' => $options['ttl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TokenInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TokenList]'; } }PKt[l7}}1Twilio/Rest/Api/V2010/Account/BalanceInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'balance' => Values::array_get($payload, 'balance'), 'currency' => Values::array_get($payload, 'currency'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.BalanceInstance]'; } }PKt[Dyr.Twilio/Rest/Api/V2010/Account/TokenOptions.phpnu[options['ttl'] = $ttl; } /** * The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). * * @param int $ttl The duration in seconds the credentials are valid * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateTokenOptions ' . $options . ']'; } }PKt[Aδ3Twilio/Rest/Api/V2010/Account/TranscriptionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TranscriptionInstance \Twilio\Rest\Api\V2010\Account\TranscriptionInstance */ public function buildInstance(array $payload): TranscriptionInstance { return new TranscriptionInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TranscriptionPage]'; } }PKt[WDu+Twilio/Rest/Api/V2010/Account/TokenPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TokenInstance \Twilio\Rest\Api\V2010\Account\TokenInstance */ public function buildInstance(array $payload): TokenInstance { return new TokenInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TokenPage]'; } }PKt[fȴ/Twilio/Rest/Api/V2010/Account/ShortCodePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ShortCodeInstance \Twilio\Rest\Api\V2010\Account\ShortCodeInstance */ public function buildInstance(array $payload): ShortCodeInstance { return new ShortCodeInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ShortCodePage]'; } }PKt[N[-Twilio/Rest/Api/V2010/Account/MessagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MessageInstance \Twilio\Rest\Api\V2010\Account\MessageInstance */ public function buildInstance(array $payload): MessageInstance { return new MessageInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MessagePage]'; } }PKt[Ҭ-Twilio/Rest/Api/V2010/Account/CallOptions.phpnu[options['url'] = $url; $this->options['twiml'] = $twiml; $this->options['applicationSid'] = $applicationSid; $this->options['method'] = $method; $this->options['fallbackUrl'] = $fallbackUrl; $this->options['fallbackMethod'] = $fallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackEvent'] = $statusCallbackEvent; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['sendDigits'] = $sendDigits; $this->options['timeout'] = $timeout; $this->options['record'] = $record; $this->options['recordingChannels'] = $recordingChannels; $this->options['recordingStatusCallback'] = $recordingStatusCallback; $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; $this->options['sipAuthUsername'] = $sipAuthUsername; $this->options['sipAuthPassword'] = $sipAuthPassword; $this->options['machineDetection'] = $machineDetection; $this->options['machineDetectionTimeout'] = $machineDetectionTimeout; $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; $this->options['trim'] = $trim; $this->options['callerId'] = $callerId; $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold; $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold; $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout; $this->options['asyncAmd'] = $asyncAmd; $this->options['asyncAmdStatusCallback'] = $asyncAmdStatusCallback; $this->options['asyncAmdStatusCallbackMethod'] = $asyncAmdStatusCallbackMethod; $this->options['byoc'] = $byoc; $this->options['callReason'] = $callReason; $this->options['callToken'] = $callToken; $this->options['recordingTrack'] = $recordingTrack; $this->options['timeLimit'] = $timeLimit; } /** * The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). * * @param string $url The absolute URL that returns TwiML for this call * @return $this Fluent Builder */ public function setUrl(string $url): self { $this->options['url'] = $url; return $this; } /** * TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. Max 4000 characters. * * @param string $twiml TwiML instructions for the call * @return $this Fluent Builder */ public function setTwiml(string $twiml): self { $this->options['twiml'] = $twiml; return $this; } /** * The SID of the Application resource that will handle the call, if the call will be handled by an application. * * @param string $applicationSid The SID of the Application resource that will * handle the call * @return $this Fluent Builder */ public function setApplicationSid(string $applicationSid): self { $this->options['applicationSid'] = $applicationSid; return $this; } /** * The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $method HTTP method to use to fetch TwiML * @return $this Fluent Builder */ public function setMethod(string $method): self { $this->options['method'] = $method; return $this; } /** * The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $fallbackUrl Fallback URL in case of error * @return $this Fluent Builder */ public function setFallbackUrl(string $fallbackUrl): self { $this->options['fallbackUrl'] = $fallbackUrl; return $this; } /** * The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $fallbackMethod HTTP Method to use with fallback_url * @return $this Fluent Builder */ public function setFallbackMethod(string $fallbackMethod): self { $this->options['fallbackMethod'] = $fallbackMethod; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored. * * @param string[] $statusCallbackEvent The call progress events that we send * to the `status_callback` URL. * @return $this Fluent Builder */ public function setStatusCallbackEvent(array $statusCallbackEvent): self { $this->options['statusCallbackEvent'] = $statusCallbackEvent; return $this; } /** * The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $statusCallbackMethod HTTP Method to use with status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored. * * @param string $sendDigits The digits to dial after connecting to the number * @return $this Fluent Builder */ public function setSendDigits(string $sendDigits): self { $this->options['sendDigits'] = $sendDigits; return $this; } /** * The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail. * * @param int $timeout Number of seconds to wait for an answer * @return $this Fluent Builder */ public function setTimeout(int $timeout): self { $this->options['timeout'] = $timeout; return $this; } /** * Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL. * * @param bool $record Whether to record the call * @return $this Fluent Builder */ public function setRecord(bool $record): self { $this->options['record'] = $record; return $this; } /** * The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call. * * @param string $recordingChannels The number of channels in the final * recording * @return $this Fluent Builder */ public function setRecordingChannels(string $recordingChannels): self { $this->options['recordingChannels'] = $recordingChannels; return $this; } /** * The URL that we call when the recording is available to be accessed. * * @param string $recordingStatusCallback The URL that we call when the * recording is available to be accessed * @return $this Fluent Builder */ public function setRecordingStatusCallback(string $recordingStatusCallback): self { $this->options['recordingStatusCallback'] = $recordingStatusCallback; return $this; } /** * The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. * * @param string $recordingStatusCallbackMethod The HTTP method we should use * when calling the * `recording_status_callback` URL * @return $this Fluent Builder */ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self { $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; return $this; } /** * The username used to authenticate the caller making a SIP call. * * @param string $sipAuthUsername The username used to authenticate the caller * making a SIP call * @return $this Fluent Builder */ public function setSipAuthUsername(string $sipAuthUsername): self { $this->options['sipAuthUsername'] = $sipAuthUsername; return $this; } /** * The password required to authenticate the user account specified in `sip_auth_username`. * * @param string $sipAuthPassword The password required to authenticate the * user account specified in `sip_auth_username`. * @return $this Fluent Builder */ public function setSipAuthPassword(string $sipAuthPassword): self { $this->options['sipAuthPassword'] = $sipAuthPassword; return $this; } /** * Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). * * @param string $machineDetection Enable machine detection or end of greeting * detection * @return $this Fluent Builder */ public function setMachineDetection(string $machineDetection): self { $this->options['machineDetection'] = $machineDetection; return $this; } /** * The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. * * @param int $machineDetectionTimeout Number of seconds to wait for machine * detection * @return $this Fluent Builder */ public function setMachineDetectionTimeout(int $machineDetectionTimeout): self { $this->options['machineDetectionTimeout'] = $machineDetectionTimeout; return $this; } /** * The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space. * * @param string[] $recordingStatusCallbackEvent The recording status events * that will trigger calls to the * URL specified in * `recording_status_callback` * @return $this Fluent Builder */ public function setRecordingStatusCallbackEvent(array $recordingStatusCallbackEvent): self { $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; return $this; } /** * Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. * * @param string $trim Set this parameter to control trimming of silence on the * recording. * @return $this Fluent Builder */ public function setTrim(string $trim): self { $this->options['trim'] = $trim; return $this; } /** * The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. * * @param string $callerId The phone number, SIP address, or Client identifier * that made this call. Phone numbers are in E.164 * format (e.g., +16175551212). SIP addresses are * formatted as `name@company.com`. * @return $this Fluent Builder */ public function setCallerId(string $callerId): self { $this->options['callerId'] = $callerId; return $this; } /** * The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. * * @param int $machineDetectionSpeechThreshold Number of milliseconds for * measuring stick for the length * of the speech activity * @return $this Fluent Builder */ public function setMachineDetectionSpeechThreshold(int $machineDetectionSpeechThreshold): self { $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold; return $this; } /** * The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. * * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of * silence after speech activity * @return $this Fluent Builder */ public function setMachineDetectionSpeechEndThreshold(int $machineDetectionSpeechEndThreshold): self { $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold; return $this; } /** * The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. * * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial * silence * @return $this Fluent Builder */ public function setMachineDetectionSilenceTimeout(int $machineDetectionSilenceTimeout): self { $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout; return $this; } /** * Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`. * * @param string $asyncAmd Enable asynchronous AMD * @return $this Fluent Builder */ public function setAsyncAmd(string $asyncAmd): self { $this->options['asyncAmd'] = $asyncAmd; return $this; } /** * The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. * * @param string $asyncAmdStatusCallback The URL we should call to send amd * status information to your application * @return $this Fluent Builder */ public function setAsyncAmdStatusCallback(string $asyncAmdStatusCallback): self { $this->options['asyncAmdStatusCallback'] = $asyncAmdStatusCallback; return $this; } /** * The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. * * @param string $asyncAmdStatusCallbackMethod HTTP Method to use with * async_amd_status_callback * @return $this Fluent Builder */ public function setAsyncAmdStatusCallbackMethod(string $asyncAmdStatusCallbackMethod): self { $this->options['asyncAmdStatusCallbackMethod'] = $asyncAmdStatusCallbackMethod; return $this; } /** * The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) * * @param string $byoc BYOC trunk SID (Beta) * @return $this Fluent Builder */ public function setByoc(string $byoc): self { $this->options['byoc'] = $byoc; return $this; } /** * The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) * * @param string $callReason Reason for the call (Branded Calls Beta) * @return $this Fluent Builder */ public function setCallReason(string $callReason): self { $this->options['callReason'] = $callReason; return $this; } /** * A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. * * @param string $callToken A token string needed to invoke a forwarded call * with a CallerId recieved on a previous incoming call * @return $this Fluent Builder */ public function setCallToken(string $callToken): self { $this->options['callToken'] = $callToken; return $this; } /** * The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. * * @param string $recordingTrack Which track(s) to record * @return $this Fluent Builder */ public function setRecordingTrack(string $recordingTrack): self { $this->options['recordingTrack'] = $recordingTrack; return $this; } /** * The maximum duration of the call in seconds. Constraints depend on account and configuration. * * @param int $timeLimit The maximum duration of the call in seconds. * @return $this Fluent Builder */ public function setTimeLimit(int $timeLimit): self { $this->options['timeLimit'] = $timeLimit; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateCallOptions ' . $options . ']'; } } class ReadCallOptions extends Options { /** * @param string $to Phone number or Client identifier of calls to include * @param string $from Phone number or Client identifier to filter `from` on * @param string $parentCallSid Parent call SID to filter on * @param string $status The status of the resources to read * @param string $startTimeBefore Only include calls that started on this date * @param string $startTime Only include calls that started on this date * @param string $startTimeAfter Only include calls that started on this date * @param string $endTimeBefore Only include calls that ended on this date * @param string $endTime Only include calls that ended on this date * @param string $endTimeAfter Only include calls that ended on this date */ public function __construct(string $to = Values::NONE, string $from = Values::NONE, string $parentCallSid = Values::NONE, string $status = Values::NONE, string $startTimeBefore = Values::NONE, string $startTime = Values::NONE, string $startTimeAfter = Values::NONE, string $endTimeBefore = Values::NONE, string $endTime = Values::NONE, string $endTimeAfter = Values::NONE) { $this->options['to'] = $to; $this->options['from'] = $from; $this->options['parentCallSid'] = $parentCallSid; $this->options['status'] = $status; $this->options['startTimeBefore'] = $startTimeBefore; $this->options['startTime'] = $startTime; $this->options['startTimeAfter'] = $startTimeAfter; $this->options['endTimeBefore'] = $endTimeBefore; $this->options['endTime'] = $endTime; $this->options['endTimeAfter'] = $endTimeAfter; } /** * Only show calls made to this phone number, SIP address, Client identifier or SIM SID. * * @param string $to Phone number or Client identifier of calls to include * @return $this Fluent Builder */ public function setTo(string $to): self { $this->options['to'] = $to; return $this; } /** * Only include calls from this phone number, SIP address, Client identifier or SIM SID. * * @param string $from Phone number or Client identifier to filter `from` on * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * Only include calls spawned by calls with this SID. * * @param string $parentCallSid Parent call SID to filter on * @return $this Fluent Builder */ public function setParentCallSid(string $parentCallSid): self { $this->options['parentCallSid'] = $parentCallSid; return $this; } /** * The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. * * @param string $status The status of the resources to read * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. * * @param string $startTimeBefore Only include calls that started on this date * @return $this Fluent Builder */ public function setStartTimeBefore(string $startTimeBefore): self { $this->options['startTimeBefore'] = $startTimeBefore; return $this; } /** * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. * * @param string $startTime Only include calls that started on this date * @return $this Fluent Builder */ public function setStartTime(string $startTime): self { $this->options['startTime'] = $startTime; return $this; } /** * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. * * @param string $startTimeAfter Only include calls that started on this date * @return $this Fluent Builder */ public function setStartTimeAfter(string $startTimeAfter): self { $this->options['startTimeAfter'] = $startTimeAfter; return $this; } /** * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. * * @param string $endTimeBefore Only include calls that ended on this date * @return $this Fluent Builder */ public function setEndTimeBefore(string $endTimeBefore): self { $this->options['endTimeBefore'] = $endTimeBefore; return $this; } /** * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. * * @param string $endTime Only include calls that ended on this date * @return $this Fluent Builder */ public function setEndTime(string $endTime): self { $this->options['endTime'] = $endTime; return $this; } /** * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. * * @param string $endTimeAfter Only include calls that ended on this date * @return $this Fluent Builder */ public function setEndTimeAfter(string $endTimeAfter): self { $this->options['endTimeAfter'] = $endTimeAfter; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadCallOptions ' . $options . ']'; } } class UpdateCallOptions extends Options { /** * @param string $url The absolute URL that returns TwiML for this call * @param string $method HTTP method to use to fetch TwiML * @param string $status The new status to update the call with. * @param string $fallbackUrl Fallback URL in case of error * @param string $fallbackMethod HTTP Method to use with fallback_url * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod HTTP Method to use to call * status_callback * @param string $twiml TwiML instructions for the call * @param int $timeLimit The maximum duration of the call in seconds. */ public function __construct(string $url = Values::NONE, string $method = Values::NONE, string $status = Values::NONE, string $fallbackUrl = Values::NONE, string $fallbackMethod = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $twiml = Values::NONE, int $timeLimit = Values::NONE) { $this->options['url'] = $url; $this->options['method'] = $method; $this->options['status'] = $status; $this->options['fallbackUrl'] = $fallbackUrl; $this->options['fallbackMethod'] = $fallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['twiml'] = $twiml; $this->options['timeLimit'] = $timeLimit; } /** * The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). * * @param string $url The absolute URL that returns TwiML for this call * @return $this Fluent Builder */ public function setUrl(string $url): self { $this->options['url'] = $url; return $this; } /** * The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $method HTTP method to use to fetch TwiML * @return $this Fluent Builder */ public function setMethod(string $method): self { $this->options['method'] = $method; return $this; } /** * The new status of the resource. Can be: `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls that are queued or ringing; however, it will not affect calls already in progress. Specifying `completed` will attempt to hang up a call even if it's already in progress. * * @param string $status The new status to update the call with. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $fallbackUrl Fallback URL in case of error * @return $this Fluent Builder */ public function setFallbackUrl(string $fallbackUrl): self { $this->options['fallbackUrl'] = $fallbackUrl; return $this; } /** * The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $fallbackMethod HTTP Method to use with fallback_url * @return $this Fluent Builder */ public function setFallbackMethod(string $fallbackMethod): self { $this->options['fallbackMethod'] = $fallbackMethod; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. * * @param string $statusCallbackMethod HTTP Method to use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive * * @param string $twiml TwiML instructions for the call * @return $this Fluent Builder */ public function setTwiml(string $twiml): self { $this->options['twiml'] = $twiml; return $this; } /** * The maximum duration of the call in seconds. Constraints depend on account and configuration. * * @param int $timeLimit The maximum duration of the call in seconds. * @return $this Fluent Builder */ public function setTimeLimit(int $timeLimit): self { $this->options['timeLimit'] = $timeLimit; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateCallOptions ' . $options . ']'; } }PKt[pϠ-Twilio/Rest/Api/V2010/Account/MessageList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages.json'; } /** * Create the MessageInstance * * @param string $to The destination phone number * @param array|Options $options Optional Arguments * @return MessageInstance Created MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $to, array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'To' => $to, 'From' => $options['from'], 'MessagingServiceSid' => $options['messagingServiceSid'], 'Body' => $options['body'], 'MediaUrl' => Serialize::map($options['mediaUrl'], function($e) { return $e; }), 'StatusCallback' => $options['statusCallback'], 'ApplicationSid' => $options['applicationSid'], 'MaxPrice' => $options['maxPrice'], 'ProvideFeedback' => Serialize::booleanToString($options['provideFeedback']), 'Attempt' => $options['attempt'], 'ValidityPeriod' => $options['validityPeriod'], 'ForceDelivery' => Serialize::booleanToString($options['forceDelivery']), 'ContentRetention' => $options['contentRetention'], 'AddressRetention' => $options['addressRetention'], 'SmartEncoded' => Serialize::booleanToString($options['smartEncoded']), 'PersistentAction' => Serialize::map($options['persistentAction'], function($e) { return $e; }), 'ShortenUrls' => Serialize::booleanToString($options['shortenUrls']), 'ScheduleType' => $options['scheduleType'], 'SendAt' => Serialize::iso8601DateTime($options['sendAt']), 'SendAsMms' => Serialize::booleanToString($options['sendAsMms']), 'ContentSid' => $options['contentSid'], 'ContentVariables' => $options['contentVariables'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MessageInstance($this->version, $payload, $this->solution['accountSid']); } /** * Streams MessageInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MessageInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MessageInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MessageInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MessagePage Page of MessageInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MessagePage { $options = new Values($options); $params = Values::of([ 'To' => $options['to'], 'From' => $options['from'], 'DateSent<' => Serialize::iso8601DateTime($options['dateSentBefore']), 'DateSent' => Serialize::iso8601DateTime($options['dateSent']), 'DateSent>' => Serialize::iso8601DateTime($options['dateSentAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MessagePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MessageInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MessagePage Page of MessageInstance */ public function getPage(string $targetUrl): MessagePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MessagePage($this->version, $response, $this->solution); } /** * Constructs a MessageContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): MessageContext { return new MessageContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MessageList]'; } }PKt[T4Ζ*Twilio/Rest/Api/V2010/Account/CallPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CallInstance \Twilio\Rest\Api\V2010\Account\CallInstance */ public function buildInstance(array $payload): CallInstance { return new CallInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CallPage]'; } }PKt[+](6Twilio/Rest/Api/V2010/Account/OutgoingCallerIdPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return OutgoingCallerIdInstance \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdInstance */ public function buildInstance(array $payload): OutgoingCallerIdInstance { return new OutgoingCallerIdInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.OutgoingCallerIdPage]'; } }PKt[O]++3Twilio/Rest/Api/V2010/Account/RecordingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callSid' => Values::array_get($payload, 'call_sid'), 'conferenceSid' => Values::array_get($payload, 'conference_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'duration' => Values::array_get($payload, 'duration'), 'sid' => Values::array_get($payload, 'sid'), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'status' => Values::array_get($payload, 'status'), 'channels' => Values::array_get($payload, 'channels'), 'source' => Values::array_get($payload, 'source'), 'errorCode' => Values::array_get($payload, 'error_code'), 'uri' => Values::array_get($payload, 'uri'), 'encryptionDetails' => Values::array_get($payload, 'encryption_details'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'mediaUrl' => Values::array_get($payload, 'media_url'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RecordingContext Context for this RecordingInstance */ protected function proxy(): RecordingContext { if (!$this->context) { $this->context = new RecordingContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the RecordingInstance * * @param array|Options $options Optional Arguments * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): RecordingInstance { return $this->proxy()->fetch($options); } /** * Delete the RecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the transcriptions */ protected function getTranscriptions(): TranscriptionList { return $this->proxy()->transcriptions; } /** * Access the addOnResults */ protected function getAddOnResults(): AddOnResultList { return $this->proxy()->addOnResults; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.RecordingInstance ' . \implode(' ', $context) . ']'; } }PKt[-3Twilio/Rest/Api/V2010/Account/ConferenceContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($sid) . '.json'; } /** * Fetch the ConferenceInstance * * @return ConferenceInstance Fetched ConferenceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConferenceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConferenceInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the ConferenceInstance * * @param array|Options $options Optional Arguments * @return ConferenceInstance Updated ConferenceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConferenceInstance { $options = new Values($options); $data = Values::of([ 'Status' => $options['status'], 'AnnounceUrl' => $options['announceUrl'], 'AnnounceMethod' => $options['announceMethod'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ConferenceInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Access the participants */ protected function getParticipants(): ParticipantList { if (!$this->_participants) { $this->_participants = new ParticipantList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_participants; } /** * Access the recordings */ protected function getRecordings(): RecordingList { if (!$this->_recordings) { $this->_recordings = new RecordingList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_recordings; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.ConferenceContext ' . \implode(' ', $context) . ']'; } }PKt[j^OO=Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'identitySid' => Values::array_get($payload, 'identity_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'origin' => Values::array_get($payload, 'origin'), 'sid' => Values::array_get($payload, 'sid'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'uri' => Values::array_get($payload, 'uri'), 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'emergencyStatus' => Values::array_get($payload, 'emergency_status'), 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'), 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'), 'bundleSid' => Values::array_get($payload, 'bundle_sid'), 'status' => Values::array_get($payload, 'status'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IncomingPhoneNumberContext Context for this * IncomingPhoneNumberInstance */ protected function proxy(): IncomingPhoneNumberContext { if (!$this->context) { $this->context = new IncomingPhoneNumberContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the IncomingPhoneNumberInstance * * @param array|Options $options Optional Arguments * @return IncomingPhoneNumberInstance Updated IncomingPhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): IncomingPhoneNumberInstance { return $this->proxy()->update($options); } /** * Fetch the IncomingPhoneNumberInstance * * @return IncomingPhoneNumberInstance Fetched IncomingPhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IncomingPhoneNumberInstance { return $this->proxy()->fetch(); } /** * Delete the IncomingPhoneNumberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the assignedAddOns */ protected function getAssignedAddOns(): AssignedAddOnList { return $this->proxy()->assignedAddOns; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.IncomingPhoneNumberInstance ' . \implode(' ', $context) . ']'; } }PKt[#k'':Twilio/Rest/Api/V2010/Account/ValidationRequestOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['callDelay'] = $callDelay; $this->options['extension'] = $extension; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; } /** * A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`. * * @param int $callDelay The number of seconds to delay before initiating the * verification call * @return $this Fluent Builder */ public function setCallDelay(int $callDelay): self { $this->options['callDelay'] = $callDelay; return $this; } /** * The digits to dial after connecting the verification call. * * @param string $extension The digits to dial after connecting the * verification call * @return $this Fluent Builder */ public function setExtension(string $extension): self { $this->options['extension'] = $extension; return $this; } /** * The URL we should call using the `status_callback_method` to send status information about the verification process to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateValidationRequestOptions ' . $options . ']'; } }PKt[ G)Twilio/Rest/Api/V2010/Account/KeyList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Keys.json'; } /** * Streams KeyInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads KeyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return KeyInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of KeyInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return KeyPage Page of KeyInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): KeyPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new KeyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of KeyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return KeyPage Page of KeyInstance */ public function getPage(string $targetUrl): KeyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new KeyPage($this->version, $response, $this->solution); } /** * Constructs a KeyContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): KeyContext { return new KeyContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.KeyList]'; } }PKt[缑FF6Twilio/Rest/Api/V2010/Account/NotificationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callSid' => Values::array_get($payload, 'call_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'errorCode' => Values::array_get($payload, 'error_code'), 'log' => Values::array_get($payload, 'log'), 'messageDate' => Deserialize::dateTime(Values::array_get($payload, 'message_date')), 'messageText' => Values::array_get($payload, 'message_text'), 'moreInfo' => Values::array_get($payload, 'more_info'), 'requestMethod' => Values::array_get($payload, 'request_method'), 'requestUrl' => Values::array_get($payload, 'request_url'), 'requestVariables' => Values::array_get($payload, 'request_variables'), 'responseBody' => Values::array_get($payload, 'response_body'), 'responseHeaders' => Values::array_get($payload, 'response_headers'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NotificationContext Context for this NotificationInstance */ protected function proxy(): NotificationContext { if (!$this->context) { $this->context = new NotificationContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the NotificationInstance * * @return NotificationInstance Fetched NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NotificationInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.NotificationInstance ' . \implode(' ', $context) . ']'; } }PKt[CKW:Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AuthorizedConnectAppInstance \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppInstance */ public function buildInstance(array $payload): AuthorizedConnectAppInstance { return new AuthorizedConnectAppInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthorizedConnectAppPage]'; } }PKt[6Je5Twilio/Rest/Api/V2010/Account/NotificationOptions.phpnu[options['log'] = $log; $this->options['messageDateBefore'] = $messageDateBefore; $this->options['messageDate'] = $messageDate; $this->options['messageDateAfter'] = $messageDateAfter; } /** * Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. * * @param int $log Filter by log level * @return $this Fluent Builder */ public function setLog(int $log): self { $this->options['log'] = $log; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDateBefore Filter by date * @return $this Fluent Builder */ public function setMessageDateBefore(string $messageDateBefore): self { $this->options['messageDateBefore'] = $messageDateBefore; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDate Filter by date * @return $this Fluent Builder */ public function setMessageDate(string $messageDate): self { $this->options['messageDate'] = $messageDate; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDateAfter Filter by date * @return $this Fluent Builder */ public function setMessageDateAfter(string $messageDateAfter): self { $this->options['messageDateAfter'] = $messageDateAfter; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadNotificationOptions ' . $options . ']'; } }PKt[W-Twilio/Rest/Api/V2010/Account/AddressPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AddressInstance \Twilio\Rest\Api\V2010\Account\AddressInstance */ public function buildInstance(array $payload): AddressInstance { return new AddressInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AddressPage]'; } }PKt[Zp7Twilio/Rest/Api/V2010/Account/NewSigningKeyInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'secret' => Values::array_get($payload, 'secret'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NewSigningKeyInstance]'; } }PKt[ ??1Twilio/Rest/Api/V2010/Account/AddressInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'city' => Values::array_get($payload, 'city'), 'customerName' => Values::array_get($payload, 'customer_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'region' => Values::array_get($payload, 'region'), 'sid' => Values::array_get($payload, 'sid'), 'street' => Values::array_get($payload, 'street'), 'uri' => Values::array_get($payload, 'uri'), 'emergencyEnabled' => Values::array_get($payload, 'emergency_enabled'), 'validated' => Values::array_get($payload, 'validated'), 'verified' => Values::array_get($payload, 'verified'), 'streetSecondary' => Values::array_get($payload, 'street_secondary'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AddressContext Context for this AddressInstance */ protected function proxy(): AddressContext { if (!$this->context) { $this->context = new AddressContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the AddressInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the AddressInstance * * @return AddressInstance Fetched AddressInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AddressInstance { return $this->proxy()->fetch(); } /** * Update the AddressInstance * * @param array|Options $options Optional Arguments * @return AddressInstance Updated AddressInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AddressInstance { return $this->proxy()->update($options); } /** * Access the dependentPhoneNumbers */ protected function getDependentPhoneNumbers(): DependentPhoneNumberList { return $this->proxy()->dependentPhoneNumbers; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AddressInstance ' . \implode(' ', $context) . ']'; } }PKt[NK5hh4Twilio/Rest/Api/V2010/Account/SigningKeyInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SigningKeyContext Context for this SigningKeyInstance */ protected function proxy(): SigningKeyContext { if (!$this->context) { $this->context = new SigningKeyContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SigningKeyInstance * * @return SigningKeyInstance Fetched SigningKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SigningKeyInstance { return $this->proxy()->fetch(); } /** * Update the SigningKeyInstance * * @param array|Options $options Optional Arguments * @return SigningKeyInstance Updated SigningKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SigningKeyInstance { return $this->proxy()->update($options); } /** * Delete the SigningKeyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.SigningKeyInstance ' . \implode(' ', $context) . ']'; } }PKt[^^0Twilio/Rest/Api/V2010/Account/MessageContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($sid) . '.json'; } /** * Delete the MessageInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { $payload = $this->version->fetch('GET', $this->uri); return new MessageInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of(['Body' => $options['body'], 'Status' => $options['status'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new MessageInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Access the media */ protected function getMedia(): MediaList { if (!$this->_media) { $this->_media = new MediaList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_media; } /** * Access the feedback */ protected function getFeedback(): FeedbackList { if (!$this->_feedback) { $this->_feedback = new FeedbackList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_feedback; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.MessageContext ' . \implode(' ', $context) . ']'; } }PKt[(9D0Twilio/Rest/Api/V2010/Account/ConferencePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConferenceInstance \Twilio\Rest\Api\V2010\Account\ConferenceInstance */ public function buildInstance(array $payload): ConferenceInstance { return new ConferenceInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ConferencePage]'; } }PKt[Cwƴ/Twilio/Rest/Api/V2010/Account/RecordingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RecordingInstance \Twilio\Rest\Api\V2010\Account\RecordingInstance */ public function buildInstance(array $payload): RecordingInstance { return new RecordingInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingPage]'; } }PKt[ Uh+h+3Twilio/Rest/Api/V2010/Account/ConferenceOptions.phpnu[options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['dateCreated'] = $dateCreated; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['dateUpdatedBefore'] = $dateUpdatedBefore; $this->options['dateUpdated'] = $dateUpdated; $this->options['dateUpdatedAfter'] = $dateUpdatedAfter; $this->options['friendlyName'] = $friendlyName; $this->options['status'] = $status; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. * * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. * * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. * * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. * * @param string $dateUpdatedBefore The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateUpdatedBefore(string $dateUpdatedBefore): self { $this->options['dateUpdatedBefore'] = $dateUpdatedBefore; return $this; } /** * The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. * * @param string $dateUpdated The `YYYY-MM-DD` value of the resources to read * @return $this Fluent Builder */ public function setDateUpdated(string $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. * * @param string $dateUpdatedAfter The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateUpdatedAfter(string $dateUpdatedAfter): self { $this->options['dateUpdatedAfter'] = $dateUpdatedAfter; return $this; } /** * The string that identifies the Conference resources to read. * * @param string $friendlyName The string that identifies the Conference * resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. * * @param string $status The status of the resources to read * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadConferenceOptions ' . $options . ']'; } } class UpdateConferenceOptions extends Options { /** * @param string $status The new status of the resource * @param string $announceUrl The URL we should call to announce something into * the conference * @param string $announceMethod he HTTP method used to call announce_url */ public function __construct(string $status = Values::NONE, string $announceUrl = Values::NONE, string $announceMethod = Values::NONE) { $this->options['status'] = $status; $this->options['announceUrl'] = $announceUrl; $this->options['announceMethod'] = $announceMethod; } /** * The new status of the resource. Can be: Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end the conference and hang up all participants * * @param string $status The new status of the resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The URL we should call to announce something into the conference. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. * * @param string $announceUrl The URL we should call to announce something into * the conference * @return $this Fluent Builder */ public function setAnnounceUrl(string $announceUrl): self { $this->options['announceUrl'] = $announceUrl; return $this; } /** * The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST` * * @param string $announceMethod he HTTP method used to call announce_url * @return $this Fluent Builder */ public function setAnnounceMethod(string $announceMethod): self { $this->options['announceMethod'] = $announceMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateConferenceOptions ' . $options . ']'; } }PKt[b&7__6Twilio/Rest/Api/V2010/Account/OutgoingCallerIdList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/OutgoingCallerIds.json'; } /** * Streams OutgoingCallerIdInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads OutgoingCallerIdInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return OutgoingCallerIdInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of OutgoingCallerIdInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return OutgoingCallerIdPage Page of OutgoingCallerIdInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): OutgoingCallerIdPage { $options = new Values($options); $params = Values::of([ 'PhoneNumber' => $options['phoneNumber'], 'FriendlyName' => $options['friendlyName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new OutgoingCallerIdPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of OutgoingCallerIdInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return OutgoingCallerIdPage Page of OutgoingCallerIdInstance */ public function getPage(string $targetUrl): OutgoingCallerIdPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new OutgoingCallerIdPage($this->version, $response, $this->solution); } /** * Constructs a OutgoingCallerIdContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): OutgoingCallerIdContext { return new OutgoingCallerIdContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.OutgoingCallerIdList]'; } }PKt[_д@@5Twilio/Rest/Api/V2010/Account/ApplicationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'messageStatusCallback' => Values::array_get($payload, 'message_status_callback'), 'sid' => Values::array_get($payload, 'sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsStatusCallback' => Values::array_get($payload, 'sms_status_callback'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'uri' => Values::array_get($payload, 'uri'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'publicApplicationConnectEnabled' => Values::array_get($payload, 'public_application_connect_enabled'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ApplicationContext Context for this ApplicationInstance */ protected function proxy(): ApplicationContext { if (!$this->context) { $this->context = new ApplicationContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the ApplicationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the ApplicationInstance * * @return ApplicationInstance Fetched ApplicationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ApplicationInstance { return $this->proxy()->fetch(); } /** * Update the ApplicationInstance * * @param array|Options $options Optional Arguments * @return ApplicationInstance Updated ApplicationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ApplicationInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.ApplicationInstance ' . \implode(' ', $context) . ']'; } }PKt[q3Twilio/Rest/Api/V2010/Account/NewSigningKeyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NewSigningKeyInstance \Twilio\Rest\Api\V2010\Account\NewSigningKeyInstance */ public function buildInstance(array $payload): NewSigningKeyInstance { return new NewSigningKeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NewSigningKeyPage]'; } }PKt[>  1Twilio/Rest/Api/V2010/Account/MessageInstance.phpnu[properties = [ 'body' => Values::array_get($payload, 'body'), 'numSegments' => Values::array_get($payload, 'num_segments'), 'direction' => Values::array_get($payload, 'direction'), 'from' => Values::array_get($payload, 'from'), 'to' => Values::array_get($payload, 'to'), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'price' => Values::array_get($payload, 'price'), 'errorMessage' => Values::array_get($payload, 'error_message'), 'uri' => Values::array_get($payload, 'uri'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'numMedia' => Values::array_get($payload, 'num_media'), 'status' => Values::array_get($payload, 'status'), 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateSent' => Deserialize::dateTime(Values::array_get($payload, 'date_sent')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'errorCode' => Values::array_get($payload, 'error_code'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MessageContext Context for this MessageInstance */ protected function proxy(): MessageContext { if (!$this->context) { $this->context = new MessageContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the MessageInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { return $this->proxy()->fetch(); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { return $this->proxy()->update($options); } /** * Access the media */ protected function getMedia(): MediaList { return $this->proxy()->media; } /** * Access the feedback */ protected function getFeedback(): FeedbackList { return $this->proxy()->feedback; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.MessageInstance ' . \implode(' ', $context) . ']'; } }PKt[qc  2Twilio/Rest/Api/V2010/Account/ShortCodeContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SMS/ShortCodes/' . \rawurlencode($sid) . '.json'; } /** * Fetch the ShortCodeInstance * * @return ShortCodeInstance Fetched ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ShortCodeInstance { $payload = $this->version->fetch('GET', $this->uri); return new ShortCodeInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the ShortCodeInstance * * @param array|Options $options Optional Arguments * @return ShortCodeInstance Updated ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ShortCodeInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'ApiVersion' => $options['apiVersion'], 'SmsUrl' => $options['smsUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ShortCodeInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.ShortCodeContext ' . \implode(' ', $context) . ']'; } }PKt[e)6Twilio/Rest/Api/V2010/Account/NewSigningKeyOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateNewSigningKeyOptions ' . $options . ']'; } }PKt[Zǥ:Twilio/Rest/Api/V2010/Account/OutgoingCallerIdInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return OutgoingCallerIdContext Context for this OutgoingCallerIdInstance */ protected function proxy(): OutgoingCallerIdContext { if (!$this->context) { $this->context = new OutgoingCallerIdContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the OutgoingCallerIdInstance * * @return OutgoingCallerIdInstance Fetched OutgoingCallerIdInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): OutgoingCallerIdInstance { return $this->proxy()->fetch(); } /** * Update the OutgoingCallerIdInstance * * @param array|Options $options Optional Arguments * @return OutgoingCallerIdInstance Updated OutgoingCallerIdInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): OutgoingCallerIdInstance { return $this->proxy()->update($options); } /** * Delete the OutgoingCallerIdInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.OutgoingCallerIdInstance ' . \implode(' ', $context) . ']'; } }PKt[}n .Twilio/Rest/Api/V2010/Account/QueueOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['maxSize'] = $maxSize; } /** * A descriptive string that you created to describe this resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe this resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. * * @param int $maxSize The max number of calls allowed in the queue * @return $this Fluent Builder */ public function setMaxSize(int $maxSize): self { $this->options['maxSize'] = $maxSize; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateQueueOptions ' . $options . ']'; } } class CreateQueueOptions extends Options { /** * @param int $maxSize The max number of calls allowed in the queue */ public function __construct(int $maxSize = Values::NONE) { $this->options['maxSize'] = $maxSize; } /** * The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. * * @param int $maxSize The max number of calls allowed in the queue * @return $this Fluent Builder */ public function setMaxSize(int $maxSize): self { $this->options['maxSize'] = $maxSize; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateQueueOptions ' . $options . ']'; } }PKt[:U3Twilio/Rest/Api/V2010/Account/NewSigningKeyList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SigningKeys.json'; } /** * Create the NewSigningKeyInstance * * @param array|Options $options Optional Arguments * @return NewSigningKeyInstance Created NewSigningKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): NewSigningKeyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new NewSigningKeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NewSigningKeyList]'; } }PKt[on4]9Twilio/Rest/Api/V2010/Account/OutgoingCallerIdOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateOutgoingCallerIdOptions ' . $options . ']'; } } class ReadOutgoingCallerIdOptions extends Options { /** * @param string $phoneNumber The phone number of the OutgoingCallerId * resources to read * @param string $friendlyName The string that identifies the OutgoingCallerId * resources to read */ public function __construct(string $phoneNumber = Values::NONE, string $friendlyName = Values::NONE) { $this->options['phoneNumber'] = $phoneNumber; $this->options['friendlyName'] = $friendlyName; } /** * The phone number of the OutgoingCallerId resources to read. * * @param string $phoneNumber The phone number of the OutgoingCallerId * resources to read * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * The string that identifies the OutgoingCallerId resources to read. * * @param string $friendlyName The string that identifies the OutgoingCallerId * resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadOutgoingCallerIdOptions ' . $options . ']'; } }PKt[zDH\0Twilio/Rest/Api/V2010/Account/ConferenceList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences.json'; } /** * Streams ConferenceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ConferenceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ConferenceInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ConferenceInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ConferencePage Page of ConferenceInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ConferencePage { $options = new Values($options); $params = Values::of([ 'DateCreated<' => Serialize::iso8601Date($options['dateCreatedBefore']), 'DateCreated' => Serialize::iso8601Date($options['dateCreated']), 'DateCreated>' => Serialize::iso8601Date($options['dateCreatedAfter']), 'DateUpdated<' => Serialize::iso8601Date($options['dateUpdatedBefore']), 'DateUpdated' => Serialize::iso8601Date($options['dateUpdated']), 'DateUpdated>' => Serialize::iso8601Date($options['dateUpdatedAfter']), 'FriendlyName' => $options['friendlyName'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ConferencePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ConferenceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ConferencePage Page of ConferenceInstance */ public function getPage(string $targetUrl): ConferencePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ConferencePage($this->version, $response, $this->solution); } /** * Constructs a ConferenceContext * * @param string $sid The unique string that identifies this resource */ public function getContext(string $sid): ConferenceContext { return new ConferenceContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ConferenceList]'; } }PKt[:=Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return IpAccessControlListInstance \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListInstance */ public function buildInstance(array $payload): IpAccessControlListInstance { return new IpAccessControlListInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAccessControlListPage]'; } }PKt[9@@CTwilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialInstance \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialInstance */ public function buildInstance(array $payload): CredentialInstance { return new CredentialInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['credentialListSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialPage]'; } }PKt[ޭ[[FTwilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.phpnu[options['password'] = $password; } /** * The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) * * @param string $password The password will not be returned in the response * @return $this Fluent Builder */ public function setPassword(string $password): self { $this->options['password'] = $password; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateCredentialOptions ' . $options . ']'; } }PKt[ɔ FTwilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialContext.phpnu[solution = [ 'accountSid' => $accountSid, 'credentialListSid' => $credentialListSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists/' . \rawurlencode($credentialListSid) . '/Credentials/' . \rawurlencode($sid) . '.json'; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['credentialListSid'], $this->solution['sid'] ); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of(['Password' => $options['password'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CredentialInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['credentialListSid'], $this->solution['sid'] ); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.CredentialContext ' . \implode(' ', $context) . ']'; } }PKt[-33CTwilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialList.phpnu[solution = ['accountSid' => $accountSid, 'credentialListSid' => $credentialListSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists/' . \rawurlencode($credentialListSid) . '/Credentials.json'; } /** * Streams CredentialInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CredentialInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CredentialInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CredentialInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CredentialPage Page of CredentialInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialPage Page of CredentialInstance */ public function getPage(string $targetUrl): CredentialPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialPage($this->version, $response, $this->solution); } /** * Create the CredentialInstance * * @param string $username The username for this credential. * @param string $password The password will not be returned in the response. * @return CredentialInstance Created CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $username, string $password): CredentialInstance { $data = Values::of(['Username' => $username, 'Password' => $password, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['credentialListSid'] ); } /** * Constructs a CredentialContext * * @param string $sid The unique id that identifies the resource to fetch. */ public function getContext(string $sid): CredentialContext { return new CredentialContext( $this->version, $this->solution['accountSid'], $this->solution['credentialListSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialList]'; } }PKt[H}JJGTwilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'credentialListSid' => Values::array_get($payload, 'credential_list_sid'), 'username' => Values::array_get($payload, 'username'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'credentialListSid' => $credentialListSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialContext Context for this CredentialInstance */ protected function proxy(): CredentialContext { if (!$this->context) { $this->context = new CredentialContext( $this->version, $this->solution['accountSid'], $this->solution['credentialListSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { return $this->proxy()->fetch(); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { return $this->proxy()->update($options); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.CredentialInstance ' . \implode(' ', $context) . ']'; } }PKt[ w8Twilio/Rest/Api/V2010/Account/Sip/CredentialListPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialListInstance \Twilio\Rest\Api\V2010\Account\Sip\CredentialListInstance */ public function buildInstance(array $payload): CredentialListInstance { return new CredentialListInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialListPage]'; } }PKt[-#VV3Twilio/Rest/Api/V2010/Account/Sip/DomainOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['voiceUrl'] = $voiceUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl; $this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod; $this->options['sipRegistration'] = $sipRegistration; $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled; $this->options['secure'] = $secure; $this->options['byocTrunkSid'] = $byocTrunkSid; $this->options['emergencyCallerSid'] = $emergencyCallerSid; } /** * A descriptive string that you created to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The URL we should when the domain receives a call. * * @param string $voiceUrl The URL we should call when receiving a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * * @param string $voiceMethod The HTTP method to use with voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. * * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. * * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call to pass status parameters (such as call ended) to your application. * * @param string $voiceStatusCallbackUrl The URL that we should call to pass * status updates * @return $this Fluent Builder */ public function setVoiceStatusCallbackUrl(string $voiceStatusCallbackUrl): self { $this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. * * @param string $voiceStatusCallbackMethod The HTTP method we should use to * call `voice_status_callback_url` * @return $this Fluent Builder */ public function setVoiceStatusCallbackMethod(string $voiceStatusCallbackMethod): self { $this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod; return $this; } /** * Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. * * @param bool $sipRegistration Whether SIP registration is allowed * @return $this Fluent Builder */ public function setSipRegistration(bool $sipRegistration): self { $this->options['sipRegistration'] = $sipRegistration; return $this; } /** * Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. * * @param bool $emergencyCallingEnabled Whether emergency calling is enabled * for the domain. * @return $this Fluent Builder */ public function setEmergencyCallingEnabled(bool $emergencyCallingEnabled): self { $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled; return $this; } /** * Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. * * @param bool $secure Whether secure SIP is enabled for the domain * @return $this Fluent Builder */ public function setSecure(bool $secure): self { $this->options['secure'] = $secure; return $this; } /** * The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. * * @param string $byocTrunkSid The SID of the BYOC Trunk resource. * @return $this Fluent Builder */ public function setByocTrunkSid(string $byocTrunkSid): self { $this->options['byocTrunkSid'] = $byocTrunkSid; return $this; } /** * Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. * * @param string $emergencyCallerSid Whether an emergency caller sid is * configured for the domain. * @return $this Fluent Builder */ public function setEmergencyCallerSid(string $emergencyCallerSid): self { $this->options['emergencyCallerSid'] = $emergencyCallerSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateDomainOptions ' . $options . ']'; } } class UpdateDomainOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @param string $voiceMethod The HTTP method we should use with voice_url * @param string $voiceStatusCallbackMethod The HTTP method we should use to * call voice_status_callback_url * @param string $voiceStatusCallbackUrl The URL that we should call to pass * status updates * @param string $voiceUrl The URL we should call when receiving a call * @param bool $sipRegistration Whether SIP registration is allowed * @param string $domainName The unique address on Twilio to route SIP traffic * @param bool $emergencyCallingEnabled Whether emergency calling is enabled * for the domain. * @param bool $secure Whether secure SIP is enabled for the domain * @param string $byocTrunkSid The SID of the BYOC Trunk resource. * @param string $emergencyCallerSid Whether an emergency caller sid is * configured for the domain. */ public function __construct(string $friendlyName = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceStatusCallbackMethod = Values::NONE, string $voiceStatusCallbackUrl = Values::NONE, string $voiceUrl = Values::NONE, bool $sipRegistration = Values::NONE, string $domainName = Values::NONE, bool $emergencyCallingEnabled = Values::NONE, bool $secure = Values::NONE, string $byocTrunkSid = Values::NONE, string $emergencyCallerSid = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod; $this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl; $this->options['voiceUrl'] = $voiceUrl; $this->options['sipRegistration'] = $sipRegistration; $this->options['domainName'] = $domainName; $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled; $this->options['secure'] = $secure; $this->options['byocTrunkSid'] = $byocTrunkSid; $this->options['emergencyCallerSid'] = $emergencyCallerSid; } /** * A descriptive string that you created to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. * * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_url` * * @param string $voiceMethod The HTTP method we should use with voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. * * @param string $voiceStatusCallbackMethod The HTTP method we should use to * call voice_status_callback_url * @return $this Fluent Builder */ public function setVoiceStatusCallbackMethod(string $voiceStatusCallbackMethod): self { $this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod; return $this; } /** * The URL that we should call to pass status parameters (such as call ended) to your application. * * @param string $voiceStatusCallbackUrl The URL that we should call to pass * status updates * @return $this Fluent Builder */ public function setVoiceStatusCallbackUrl(string $voiceStatusCallbackUrl): self { $this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl; return $this; } /** * The URL we should call when the domain receives a call. * * @param string $voiceUrl The URL we should call when receiving a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. * * @param bool $sipRegistration Whether SIP registration is allowed * @return $this Fluent Builder */ public function setSipRegistration(bool $sipRegistration): self { $this->options['sipRegistration'] = $sipRegistration; return $this; } /** * The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with `sip.twilio.com`. * * @param string $domainName The unique address on Twilio to route SIP traffic * @return $this Fluent Builder */ public function setDomainName(string $domainName): self { $this->options['domainName'] = $domainName; return $this; } /** * Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. * * @param bool $emergencyCallingEnabled Whether emergency calling is enabled * for the domain. * @return $this Fluent Builder */ public function setEmergencyCallingEnabled(bool $emergencyCallingEnabled): self { $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled; return $this; } /** * Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. * * @param bool $secure Whether secure SIP is enabled for the domain * @return $this Fluent Builder */ public function setSecure(bool $secure): self { $this->options['secure'] = $secure; return $this; } /** * The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. * * @param string $byocTrunkSid The SID of the BYOC Trunk resource. * @return $this Fluent Builder */ public function setByocTrunkSid(string $byocTrunkSid): self { $this->options['byocTrunkSid'] = $byocTrunkSid; return $this; } /** * Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. * * @param string $emergencyCallerSid Whether an emergency caller sid is * configured for the domain. * @return $this Fluent Builder */ public function setEmergencyCallerSid(string $emergencyCallerSid): self { $this->options['emergencyCallerSid'] = $emergencyCallerSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateDomainOptions ' . $options . ']'; } }PKt[z(,t t JTwilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressContext.phpnu[solution = [ 'accountSid' => $accountSid, 'ipAccessControlListSid' => $ipAccessControlListSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists/' . \rawurlencode($ipAccessControlListSid) . '/IpAddresses/' . \rawurlencode($sid) . '.json'; } /** * Fetch the IpAddressInstance * * @return IpAddressInstance Fetched IpAddressInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAddressInstance { $payload = $this->version->fetch('GET', $this->uri); return new IpAddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'], $this->solution['sid'] ); } /** * Update the IpAddressInstance * * @param array|Options $options Optional Arguments * @return IpAddressInstance Updated IpAddressInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): IpAddressInstance { $options = new Values($options); $data = Values::of([ 'IpAddress' => $options['ipAddress'], 'FriendlyName' => $options['friendlyName'], 'CidrPrefixLength' => $options['cidrPrefixLength'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new IpAddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'], $this->solution['sid'] ); } /** * Delete the IpAddressInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.IpAddressContext ' . \implode(' ', $context) . ']'; } }PKt[d$JTwilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressOptions.phpnu[options['cidrPrefixLength'] = $cidrPrefixLength; } /** * An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. * * @param int $cidrPrefixLength An integer representing the length of the CIDR * prefix to use with this IP address when * accepting traffic. By default the entire IP * address is used. * @return $this Fluent Builder */ public function setCidrPrefixLength(int $cidrPrefixLength): self { $this->options['cidrPrefixLength'] = $cidrPrefixLength; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateIpAddressOptions ' . $options . ']'; } } class UpdateIpAddressOptions extends Options { /** * @param string $ipAddress An IP address in dotted decimal notation from which * you want to accept traffic. Any SIP requests from * this IP address will be allowed by Twilio. IPv4 * only supported today. * @param string $friendlyName A human readable descriptive text for this * resource, up to 255 characters long. * @param int $cidrPrefixLength An integer representing the length of the CIDR * prefix to use with this IP address when * accepting traffic. By default the entire IP * address is used. */ public function __construct(string $ipAddress = Values::NONE, string $friendlyName = Values::NONE, int $cidrPrefixLength = Values::NONE) { $this->options['ipAddress'] = $ipAddress; $this->options['friendlyName'] = $friendlyName; $this->options['cidrPrefixLength'] = $cidrPrefixLength; } /** * An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. * * @param string $ipAddress An IP address in dotted decimal notation from which * you want to accept traffic. Any SIP requests from * this IP address will be allowed by Twilio. IPv4 * only supported today. * @return $this Fluent Builder */ public function setIpAddress(string $ipAddress): self { $this->options['ipAddress'] = $ipAddress; return $this; } /** * A human readable descriptive text for this resource, up to 255 characters long. * * @param string $friendlyName A human readable descriptive text for this * resource, up to 255 characters long. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. * * @param int $cidrPrefixLength An integer representing the length of the CIDR * prefix to use with this IP address when * accepting traffic. By default the entire IP * address is used. * @return $this Fluent Builder */ public function setCidrPrefixLength(int $cidrPrefixLength): self { $this->options['cidrPrefixLength'] = $cidrPrefixLength; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateIpAddressOptions ' . $options . ']'; } }PKt[ GTwilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressList.phpnu[solution = [ 'accountSid' => $accountSid, 'ipAccessControlListSid' => $ipAccessControlListSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists/' . \rawurlencode($ipAccessControlListSid) . '/IpAddresses.json'; } /** * Streams IpAddressInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads IpAddressInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return IpAddressInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of IpAddressInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return IpAddressPage Page of IpAddressInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IpAddressPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IpAddressPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IpAddressInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IpAddressPage Page of IpAddressInstance */ public function getPage(string $targetUrl): IpAddressPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IpAddressPage($this->version, $response, $this->solution); } /** * Create the IpAddressInstance * * @param string $friendlyName A human readable descriptive text for this * resource, up to 255 characters long. * @param string $ipAddress An IP address in dotted decimal notation from which * you want to accept traffic. Any SIP requests from * this IP address will be allowed by Twilio. IPv4 * only supported today. * @param array|Options $options Optional Arguments * @return IpAddressInstance Created IpAddressInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $ipAddress, array $options = []): IpAddressInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'IpAddress' => $ipAddress, 'CidrPrefixLength' => $options['cidrPrefixLength'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IpAddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'] ); } /** * Constructs a IpAddressContext * * @param string $sid A string that identifies the IpAddress resource to fetch */ public function getContext(string $sid): IpAddressContext { return new IpAddressContext( $this->version, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAddressList]'; } }PKt[3IIGTwilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return IpAddressInstance \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressInstance */ public function buildInstance(array $payload): IpAddressInstance { return new IpAddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAddressPage]'; } }PKt[``KTwilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'ipAddress' => Values::array_get($payload, 'ip_address'), 'cidrPrefixLength' => Values::array_get($payload, 'cidr_prefix_length'), 'ipAccessControlListSid' => Values::array_get($payload, 'ip_access_control_list_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'ipAccessControlListSid' => $ipAccessControlListSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IpAddressContext Context for this IpAddressInstance */ protected function proxy(): IpAddressContext { if (!$this->context) { $this->context = new IpAddressContext( $this->version, $this->solution['accountSid'], $this->solution['ipAccessControlListSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the IpAddressInstance * * @return IpAddressInstance Fetched IpAddressInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAddressInstance { return $this->proxy()->fetch(); } /** * Update the IpAddressInstance * * @param array|Options $options Optional Arguments * @return IpAddressInstance Updated IpAddressInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): IpAddressInstance { return $this->proxy()->update($options); } /** * Delete the IpAddressInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.IpAddressInstance ' . \implode(' ', $context) . ']'; } }PKt[BveATwilio/Rest/Api/V2010/Account/Sip/IpAccessControlListInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IpAccessControlListContext Context for this * IpAccessControlListInstance */ protected function proxy(): IpAccessControlListContext { if (!$this->context) { $this->context = new IpAccessControlListContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the IpAccessControlListInstance * * @return IpAccessControlListInstance Fetched IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAccessControlListInstance { return $this->proxy()->fetch(); } /** * Update the IpAccessControlListInstance * * @param string $friendlyName A human readable description of this resource * @return IpAccessControlListInstance Updated IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): IpAccessControlListInstance { return $this->proxy()->update($friendlyName); } /** * Delete the IpAccessControlListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the ipAddresses */ protected function getIpAddresses(): IpAddressList { return $this->proxy()->ipAddresses; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.IpAccessControlListInstance ' . \implode(' ', $context) . ']'; } }PKt['w=Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists.json'; } /** * Streams IpAccessControlListInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads IpAccessControlListInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return IpAccessControlListInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of IpAccessControlListInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return IpAccessControlListPage Page of IpAccessControlListInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IpAccessControlListPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IpAccessControlListPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IpAccessControlListInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IpAccessControlListPage Page of IpAccessControlListInstance */ public function getPage(string $targetUrl): IpAccessControlListPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IpAccessControlListPage($this->version, $response, $this->solution); } /** * Create the IpAccessControlListInstance * * @param string $friendlyName A human readable description of this resource * @return IpAccessControlListInstance Created IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): IpAccessControlListInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IpAccessControlListInstance($this->version, $payload, $this->solution['accountSid']); } /** * Constructs a IpAccessControlListContext * * @param string $sid A string that identifies the resource to fetch */ public function getContext(string $sid): IpAccessControlListContext { return new IpAccessControlListContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAccessControlListList]'; } }PKt[E0Twilio/Rest/Api/V2010/Account/Sip/DomainPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DomainInstance \Twilio\Rest\Api\V2010\Account\Sip\DomainInstance */ public function buildInstance(array $payload): DomainInstance { return new DomainInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DomainPage]'; } }PKt[3=<Twilio/Rest/Api/V2010/Account/Sip/CredentialListInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialListContext Context for this CredentialListInstance */ protected function proxy(): CredentialListContext { if (!$this->context) { $this->context = new CredentialListContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CredentialListInstance * * @return CredentialListInstance Fetched CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialListInstance { return $this->proxy()->fetch(); } /** * Update the CredentialListInstance * * @param string $friendlyName Human readable descriptive text * @return CredentialListInstance Updated CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): CredentialListInstance { return $this->proxy()->update($friendlyName); } /** * Delete the CredentialListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the credentials */ protected function getCredentials(): CredentialList { return $this->proxy()->credentials; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.CredentialListInstance ' . \implode(' ', $context) . ']'; } }PKt[8Twilio/Rest/Api/V2010/Account/Sip/CredentialListList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists.json'; } /** * Streams CredentialListInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CredentialListInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CredentialListInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CredentialListInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CredentialListPage Page of CredentialListInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialListPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialListPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialListInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialListPage Page of CredentialListInstance */ public function getPage(string $targetUrl): CredentialListPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialListPage($this->version, $response, $this->solution); } /** * Create the CredentialListInstance * * @param string $friendlyName Human readable descriptive text * @return CredentialListInstance Created CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): CredentialListInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialListInstance($this->version, $payload, $this->solution['accountSid']); } /** * Constructs a CredentialListContext * * @param string $sid Fetch by unique credential list Sid */ public function getContext(string $sid): CredentialListContext { return new CredentialListContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialListList]'; } }PKt[ϱ3Twilio/Rest/Api/V2010/Account/Sip/DomainContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($sid) . '.json'; } /** * Fetch the DomainInstance * * @return DomainInstance Fetched DomainInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DomainInstance { $payload = $this->version->fetch('GET', $this->uri); return new DomainInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the DomainInstance * * @param array|Options $options Optional Arguments * @return DomainInstance Updated DomainInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DomainInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceStatusCallbackMethod' => $options['voiceStatusCallbackMethod'], 'VoiceStatusCallbackUrl' => $options['voiceStatusCallbackUrl'], 'VoiceUrl' => $options['voiceUrl'], 'SipRegistration' => Serialize::booleanToString($options['sipRegistration']), 'DomainName' => $options['domainName'], 'EmergencyCallingEnabled' => Serialize::booleanToString($options['emergencyCallingEnabled']), 'Secure' => Serialize::booleanToString($options['secure']), 'ByocTrunkSid' => $options['byocTrunkSid'], 'EmergencyCallerSid' => $options['emergencyCallerSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DomainInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the DomainInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the ipAccessControlListMappings */ protected function getIpAccessControlListMappings(): IpAccessControlListMappingList { if (!$this->_ipAccessControlListMappings) { $this->_ipAccessControlListMappings = new IpAccessControlListMappingList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_ipAccessControlListMappings; } /** * Access the credentialListMappings */ protected function getCredentialListMappings(): CredentialListMappingList { if (!$this->_credentialListMappings) { $this->_credentialListMappings = new CredentialListMappingList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_credentialListMappings; } /** * Access the auth */ protected function getAuth(): AuthTypesList { if (!$this->_auth) { $this->_auth = new AuthTypesList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_auth; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.DomainContext ' . \implode(' ', $context) . ']'; } }PKt[,T#;Twilio/Rest/Api/V2010/Account/Sip/CredentialListContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists/' . \rawurlencode($sid) . '.json'; } /** * Fetch the CredentialListInstance * * @return CredentialListInstance Fetched CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialListInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialListInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the CredentialListInstance * * @param string $friendlyName Human readable descriptive text * @return CredentialListInstance Updated CredentialListInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): CredentialListInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CredentialListInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the CredentialListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the credentials */ protected function getCredentials(): CredentialList { if (!$this->_credentials) { $this->_credentials = new CredentialList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_credentials; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.CredentialListContext ' . \implode(' ', $context) . ']'; } }PKt[#(00@Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists/' . \rawurlencode($sid) . '.json'; } /** * Fetch the IpAccessControlListInstance * * @return IpAccessControlListInstance Fetched IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAccessControlListInstance { $payload = $this->version->fetch('GET', $this->uri); return new IpAccessControlListInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the IpAccessControlListInstance * * @param string $friendlyName A human readable description of this resource * @return IpAccessControlListInstance Updated IpAccessControlListInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): IpAccessControlListInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new IpAccessControlListInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the IpAccessControlListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the ipAddresses */ protected function getIpAddresses(): IpAddressList { if (!$this->_ipAddresses) { $this->_ipAddresses = new IpAddressList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_ipAddresses; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.IpAccessControlListContext ' . \implode(' ', $context) . ']'; } }PKt[|VV4Twilio/Rest/Api/V2010/Account/Sip/DomainInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'authType' => Values::array_get($payload, 'auth_type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'domainName' => Values::array_get($payload, 'domain_name'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceStatusCallbackMethod' => Values::array_get($payload, 'voice_status_callback_method'), 'voiceStatusCallbackUrl' => Values::array_get($payload, 'voice_status_callback_url'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'sipRegistration' => Values::array_get($payload, 'sip_registration'), 'emergencyCallingEnabled' => Values::array_get($payload, 'emergency_calling_enabled'), 'secure' => Values::array_get($payload, 'secure'), 'byocTrunkSid' => Values::array_get($payload, 'byoc_trunk_sid'), 'emergencyCallerSid' => Values::array_get($payload, 'emergency_caller_sid'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DomainContext Context for this DomainInstance */ protected function proxy(): DomainContext { if (!$this->context) { $this->context = new DomainContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DomainInstance * * @return DomainInstance Fetched DomainInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DomainInstance { return $this->proxy()->fetch(); } /** * Update the DomainInstance * * @param array|Options $options Optional Arguments * @return DomainInstance Updated DomainInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DomainInstance { return $this->proxy()->update($options); } /** * Delete the DomainInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the ipAccessControlListMappings */ protected function getIpAccessControlListMappings(): IpAccessControlListMappingList { return $this->proxy()->ipAccessControlListMappings; } /** * Access the credentialListMappings */ protected function getCredentialListMappings(): CredentialListMappingList { return $this->proxy()->credentialListMappings; } /** * Access the auth */ protected function getAuth(): AuthTypesList { return $this->proxy()->auth; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.DomainInstance ' . \implode(' ', $context) . ']'; } }PKt[QjJTwilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'domainSid' => Values::array_get($payload, 'domain_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialListMappingContext Context for this * CredentialListMappingInstance */ protected function proxy(): CredentialListMappingContext { if (!$this->context) { $this->context = new CredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CredentialListMappingInstance * * @return CredentialListMappingInstance Fetched CredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialListMappingInstance { return $this->proxy()->fetch(); } /** * Delete the CredentialListMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.CredentialListMappingInstance ' . \implode(' ', $context) . ']'; } }PKt[L^ ^ PTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsList.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * Access the credentialListMappings */ protected function getCredentialListMappings(): AuthRegistrationsCredentialListMappingList { if (!$this->_credentialListMappings) { $this->_credentialListMappings = new AuthRegistrationsCredentialListMappingList( $this->version, $this->solution['accountSid'], $this->solution['domainSid'] ); } return $this->_credentialListMappings; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypeRegistrationsList]'; } }PKt[O ~~PTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AuthTypeRegistrationsInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrationsInstance */ public function buildInstance(array $payload): AuthTypeRegistrationsInstance { return new AuthTypeRegistrationsInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypeRegistrationsPage]'; } }PKt[g TTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsInstance.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypeRegistrationsInstance]'; } }PKt[@&c c jTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingContext.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/CredentialListMappings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AuthCallsCredentialListMappingInstance * * @return AuthCallsCredentialListMappingInstance Fetched * AuthCallsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthCallsCredentialListMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new AuthCallsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } /** * Delete the AuthCallsCredentialListMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AuthCallsCredentialListMappingContext ' . \implode(' ', $context) . ']'; } }PKt[< oTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingContext.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/IpAccessControlListMappings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AuthCallsIpAccessControlListMappingInstance * * @return AuthCallsIpAccessControlListMappingInstance Fetched * AuthCallsIpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthCallsIpAccessControlListMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new AuthCallsIpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } /** * Delete the AuthCallsIpAccessControlListMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AuthCallsIpAccessControlListMappingContext ' . \implode(' ', $context) . ']'; } }PKt[ڻlTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingList.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/IpAccessControlListMappings.json'; } /** * Create the AuthCallsIpAccessControlListMappingInstance * * @param string $ipAccessControlListSid The SID of the IpAccessControlList * resource to map to the SIP domain * @return AuthCallsIpAccessControlListMappingInstance Created * AuthCallsIpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $ipAccessControlListSid): AuthCallsIpAccessControlListMappingInstance { $data = Values::of(['IpAccessControlListSid' => $ipAccessControlListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AuthCallsIpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Streams AuthCallsIpAccessControlListMappingInstance records from the API as * a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AuthCallsIpAccessControlListMappingInstance records from the API as a * list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AuthCallsIpAccessControlListMappingInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AuthCallsIpAccessControlListMappingInstance * records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AuthCallsIpAccessControlListMappingPage Page of * AuthCallsIpAccessControlListMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AuthCallsIpAccessControlListMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AuthCallsIpAccessControlListMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AuthCallsIpAccessControlListMappingInstance * records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AuthCallsIpAccessControlListMappingPage Page of * AuthCallsIpAccessControlListMappingInstance */ public function getPage(string $targetUrl): AuthCallsIpAccessControlListMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AuthCallsIpAccessControlListMappingPage($this->version, $response, $this->solution); } /** * Constructs a AuthCallsIpAccessControlListMappingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AuthCallsIpAccessControlListMappingContext { return new AuthCallsIpAccessControlListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthCallsIpAccessControlListMappingList]'; } }PKt[UTgTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingList.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/CredentialListMappings.json'; } /** * Create the AuthCallsCredentialListMappingInstance * * @param string $credentialListSid The SID of the CredentialList resource to * map to the SIP domain * @return AuthCallsCredentialListMappingInstance Created * AuthCallsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $credentialListSid): AuthCallsCredentialListMappingInstance { $data = Values::of(['CredentialListSid' => $credentialListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AuthCallsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Streams AuthCallsCredentialListMappingInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AuthCallsCredentialListMappingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AuthCallsCredentialListMappingInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AuthCallsCredentialListMappingInstance records * from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AuthCallsCredentialListMappingPage Page of * AuthCallsCredentialListMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AuthCallsCredentialListMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AuthCallsCredentialListMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AuthCallsCredentialListMappingInstance records * from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AuthCallsCredentialListMappingPage Page of * AuthCallsCredentialListMappingInstance */ public function getPage(string $targetUrl): AuthCallsCredentialListMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AuthCallsCredentialListMappingPage($this->version, $response, $this->solution); } /** * Constructs a AuthCallsCredentialListMappingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AuthCallsCredentialListMappingContext { return new AuthCallsCredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthCallsCredentialListMappingList]'; } }PKt[c6lTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AuthCallsIpAccessControlListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingInstance */ public function buildInstance(array $payload): AuthCallsIpAccessControlListMappingInstance { return new AuthCallsIpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthCallsIpAccessControlListMappingPage]'; } }PKt[J- gTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AuthCallsCredentialListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingInstance */ public function buildInstance(array $payload): AuthCallsCredentialListMappingInstance { return new AuthCallsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthCallsCredentialListMappingPage]'; } }PKt[ApTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), ]; $this->solution = [ 'accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AuthCallsIpAccessControlListMappingContext Context for this * AuthCallsIpAccessControlListMappingInstance */ protected function proxy(): AuthCallsIpAccessControlListMappingContext { if (!$this->context) { $this->context = new AuthCallsIpAccessControlListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AuthCallsIpAccessControlListMappingInstance * * @return AuthCallsIpAccessControlListMappingInstance Fetched * AuthCallsIpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthCallsIpAccessControlListMappingInstance { return $this->proxy()->fetch(); } /** * Delete the AuthCallsIpAccessControlListMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AuthCallsIpAccessControlListMappingInstance ' . \implode(' ', $context) . ']'; } }PKt[#lkTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), ]; $this->solution = [ 'accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AuthCallsCredentialListMappingContext Context for this * AuthCallsCredentialListMappingInstance */ protected function proxy(): AuthCallsCredentialListMappingContext { if (!$this->context) { $this->context = new AuthCallsCredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AuthCallsCredentialListMappingInstance * * @return AuthCallsCredentialListMappingInstance Fetched * AuthCallsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthCallsCredentialListMappingInstance { return $this->proxy()->fetch(); } /** * Delete the AuthCallsCredentialListMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AuthCallsCredentialListMappingInstance ' . \implode(' ', $context) . ']'; } }PKt[EŴLTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsInstance.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypeCallsInstance]'; } }PKt[uaHTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsList.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * Access the credentialListMappings */ protected function getCredentialListMappings(): AuthCallsCredentialListMappingList { if (!$this->_credentialListMappings) { $this->_credentialListMappings = new AuthCallsCredentialListMappingList( $this->version, $this->solution['accountSid'], $this->solution['domainSid'] ); } return $this->_credentialListMappings; } /** * Access the ipAccessControlListMappings */ protected function getIpAccessControlListMappings(): AuthCallsIpAccessControlListMappingList { if (!$this->_ipAccessControlListMappings) { $this->_ipAccessControlListMappings = new AuthCallsIpAccessControlListMappingList( $this->version, $this->solution['accountSid'], $this->solution['domainSid'] ); } return $this->_ipAccessControlListMappings; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypeCallsList]'; } }PKt[#;NNHTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AuthTypeCallsInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCallsInstance */ public function buildInstance(array $payload): AuthTypeCallsInstance { return new AuthTypeCallsInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypeCallsPage]'; } }PKt[ JwTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AuthRegistrationsCredentialListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingInstance */ public function buildInstance(array $payload): AuthRegistrationsCredentialListMappingInstance { return new AuthRegistrationsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthRegistrationsCredentialListMappingPage]'; } }PKt[P{Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), ]; $this->solution = [ 'accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AuthRegistrationsCredentialListMappingContext Context for this * AuthRegistrationsCredentialListMappingInstance */ protected function proxy(): AuthRegistrationsCredentialListMappingContext { if (!$this->context) { $this->context = new AuthRegistrationsCredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AuthRegistrationsCredentialListMappingInstance * * @return AuthRegistrationsCredentialListMappingInstance Fetched * AuthRegistrationsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthRegistrationsCredentialListMappingInstance { return $this->proxy()->fetch(); } /** * Delete the AuthRegistrationsCredentialListMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AuthRegistrationsCredentialListMappingInstance ' . \implode(' ', $context) . ']'; } }PKt[/ zTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingContext.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Registrations/CredentialListMappings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AuthRegistrationsCredentialListMappingInstance * * @return AuthRegistrationsCredentialListMappingInstance Fetched * AuthRegistrationsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthRegistrationsCredentialListMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new AuthRegistrationsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } /** * Delete the AuthRegistrationsCredentialListMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AuthRegistrationsCredentialListMappingContext ' . \implode(' ', $context) . ']'; } }PKt[DAwTwilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingList.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Registrations/CredentialListMappings.json'; } /** * Create the AuthRegistrationsCredentialListMappingInstance * * @param string $credentialListSid The SID of the CredentialList resource to * map to the SIP domain * @return AuthRegistrationsCredentialListMappingInstance Created * AuthRegistrationsCredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $credentialListSid): AuthRegistrationsCredentialListMappingInstance { $data = Values::of(['CredentialListSid' => $credentialListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AuthRegistrationsCredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Streams AuthRegistrationsCredentialListMappingInstance records from the API * as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AuthRegistrationsCredentialListMappingInstance records from the API as * a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AuthRegistrationsCredentialListMappingInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AuthRegistrationsCredentialListMappingInstance * records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AuthRegistrationsCredentialListMappingPage Page of * AuthRegistrationsCredentialListMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AuthRegistrationsCredentialListMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AuthRegistrationsCredentialListMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AuthRegistrationsCredentialListMappingInstance * records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AuthRegistrationsCredentialListMappingPage Page of * AuthRegistrationsCredentialListMappingInstance */ public function getPage(string $targetUrl): AuthRegistrationsCredentialListMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AuthRegistrationsCredentialListMappingPage($this->version, $response, $this->solution); } /** * Constructs a AuthRegistrationsCredentialListMappingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AuthRegistrationsCredentialListMappingContext { return new AuthRegistrationsCredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthRegistrationsCredentialListMappingList]'; } }PKt[;E+ + NTwilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingContext.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/IpAccessControlListMappings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the IpAccessControlListMappingInstance * * @return IpAccessControlListMappingInstance Fetched * IpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAccessControlListMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new IpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } /** * Delete the IpAccessControlListMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.IpAccessControlListMappingContext ' . \implode(' ', $context) . ']'; } }PKt[>Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesInstance.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypesInstance]'; } }PKt[gOTwilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'domainSid' => Values::array_get($payload, 'domain_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IpAccessControlListMappingContext Context for this * IpAccessControlListMappingInstance */ protected function proxy(): IpAccessControlListMappingContext { if (!$this->context) { $this->context = new IpAccessControlListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the IpAccessControlListMappingInstance * * @return IpAccessControlListMappingInstance Fetched * IpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpAccessControlListMappingInstance { return $this->proxy()->fetch(); } /** * Delete the IpAccessControlListMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.IpAccessControlListMappingInstance ' . \implode(' ', $context) . ']'; } }PKt[Pm ITwilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingContext.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/CredentialListMappings/' . \rawurlencode($sid) . '.json'; } /** * Fetch the CredentialListMappingInstance * * @return CredentialListMappingInstance Fetched CredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialListMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'], $this->solution['sid'] ); } /** * Delete the CredentialListMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.CredentialListMappingContext ' . \implode(' ', $context) . ']'; } }PKt["ӈKTwilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingList.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/IpAccessControlListMappings.json'; } /** * Create the IpAccessControlListMappingInstance * * @param string $ipAccessControlListSid The unique id of the IP access control * list to map to the SIP domain * @return IpAccessControlListMappingInstance Created * IpAccessControlListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $ipAccessControlListSid): IpAccessControlListMappingInstance { $data = Values::of(['IpAccessControlListSid' => $ipAccessControlListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Streams IpAccessControlListMappingInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads IpAccessControlListMappingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return IpAccessControlListMappingInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of IpAccessControlListMappingInstance records from * the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return IpAccessControlListMappingPage Page of * IpAccessControlListMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IpAccessControlListMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IpAccessControlListMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IpAccessControlListMappingInstance records from * the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IpAccessControlListMappingPage Page of * IpAccessControlListMappingInstance */ public function getPage(string $targetUrl): IpAccessControlListMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IpAccessControlListMappingPage($this->version, $response, $this->solution); } /** * Constructs a IpAccessControlListMappingContext * * @param string $sid A 34 character string that uniquely identifies the * resource to fetch. */ public function getContext(string $sid): IpAccessControlListMappingContext { return new IpAccessControlListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAccessControlListMappingList]'; } }PKt[}$jjFTwilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingInstance */ public function buildInstance(array $payload): CredentialListMappingInstance { return new CredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialListMappingPage]'; } }PKt[ 6 :Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesList.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; } /** * Access the calls */ protected function getCalls(): AuthTypeCallsList { if (!$this->_calls) { $this->_calls = new AuthTypeCallsList( $this->version, $this->solution['accountSid'], $this->solution['domainSid'] ); } return $this->_calls; } /** * Access the registrations */ protected function getRegistrations(): AuthTypeRegistrationsList { if (!$this->_registrations) { $this->_registrations = new AuthTypeRegistrationsList( $this->version, $this->solution['accountSid'], $this->solution['domainSid'] ); } return $this->_registrations; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypesList]'; } }PKt[…LjKTwilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return IpAccessControlListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingInstance */ public function buildInstance(array $payload): IpAccessControlListMappingInstance { return new IpAccessControlListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.IpAccessControlListMappingPage]'; } }PKt[Wr"":Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AuthTypesInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesInstance */ public function buildInstance(array $payload): AuthTypesInstance { return new AuthTypesInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AuthTypesPage]'; } }PKt[UFTwilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingList.phpnu[solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/CredentialListMappings.json'; } /** * Create the CredentialListMappingInstance * * @param string $credentialListSid A string that identifies the CredentialList * resource to map to the SIP domain * @return CredentialListMappingInstance Created CredentialListMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $credentialListSid): CredentialListMappingInstance { $data = Values::of(['CredentialListSid' => $credentialListSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialListMappingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid'] ); } /** * Streams CredentialListMappingInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CredentialListMappingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CredentialListMappingInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CredentialListMappingInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CredentialListMappingPage Page of CredentialListMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialListMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialListMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialListMappingInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialListMappingPage Page of CredentialListMappingInstance */ public function getPage(string $targetUrl): CredentialListMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialListMappingPage($this->version, $response, $this->solution); } /** * Constructs a CredentialListMappingContext * * @param string $sid A string that identifies the resource to fetch */ public function getContext(string $sid): CredentialListMappingContext { return new CredentialListMappingContext( $this->version, $this->solution['accountSid'], $this->solution['domainSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.CredentialListMappingList]'; } }PKt[/]GG0Twilio/Rest/Api/V2010/Account/Sip/DomainList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains.json'; } /** * Streams DomainInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DomainInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DomainInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DomainInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DomainPage Page of DomainInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DomainPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DomainPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DomainInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DomainPage Page of DomainInstance */ public function getPage(string $targetUrl): DomainPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DomainPage($this->version, $response, $this->solution); } /** * Create the DomainInstance * * @param string $domainName The unique address on Twilio to route SIP traffic * @param array|Options $options Optional Arguments * @return DomainInstance Created DomainInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $domainName, array $options = []): DomainInstance { $options = new Values($options); $data = Values::of([ 'DomainName' => $domainName, 'FriendlyName' => $options['friendlyName'], 'VoiceUrl' => $options['voiceUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceStatusCallbackUrl' => $options['voiceStatusCallbackUrl'], 'VoiceStatusCallbackMethod' => $options['voiceStatusCallbackMethod'], 'SipRegistration' => Serialize::booleanToString($options['sipRegistration']), 'EmergencyCallingEnabled' => Serialize::booleanToString($options['emergencyCallingEnabled']), 'Secure' => Serialize::booleanToString($options['secure']), 'ByocTrunkSid' => $options['byocTrunkSid'], 'EmergencyCallerSid' => $options['emergencyCallerSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new DomainInstance($this->version, $payload, $this->solution['accountSid']); } /** * Constructs a DomainContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): DomainContext { return new DomainContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DomainList]'; } }PKt[乼>4Twilio/Rest/Api/V2010/Account/ConferenceInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'apiVersion' => Values::array_get($payload, 'api_version'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'region' => Values::array_get($payload, 'region'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'uri' => Values::array_get($payload, 'uri'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'reasonConferenceEnded' => Values::array_get($payload, 'reason_conference_ended'), 'callSidEndingConference' => Values::array_get($payload, 'call_sid_ending_conference'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConferenceContext Context for this ConferenceInstance */ protected function proxy(): ConferenceContext { if (!$this->context) { $this->context = new ConferenceContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ConferenceInstance * * @return ConferenceInstance Fetched ConferenceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConferenceInstance { return $this->proxy()->fetch(); } /** * Update the ConferenceInstance * * @param array|Options $options Optional Arguments * @return ConferenceInstance Updated ConferenceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConferenceInstance { return $this->proxy()->update($options); } /** * Access the participants */ protected function getParticipants(): ParticipantList { return $this->proxy()->participants; } /** * Access the recordings */ protected function getRecordings(): RecordingList { return $this->proxy()->recordings; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.ConferenceInstance ' . \implode(' ', $context) . ']'; } }PKt[Y;Twilio/Rest/Api/V2010/Account/ValidationRequestInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'validationCode' => Values::array_get($payload, 'validation_code'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ValidationRequestInstance]'; } }PKt[f+Twilio/Rest/Api/V2010/Account/UsagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UsageInstance \Twilio\Rest\Api\V2010\Account\UsageInstance */ public function buildInstance(array $payload): UsageInstance { return new UsageInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UsagePage]'; } }PKt[3%%4Twilio/Rest/Api/V2010/Account/ApplicationContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Applications/' . \rawurlencode($sid) . '.json'; } /** * Delete the ApplicationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the ApplicationInstance * * @return ApplicationInstance Fetched ApplicationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ApplicationInstance { $payload = $this->version->fetch('GET', $this->uri); return new ApplicationInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the ApplicationInstance * * @param array|Options $options Optional Arguments * @return ApplicationInstance Updated ApplicationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ApplicationInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'ApiVersion' => $options['apiVersion'], 'VoiceUrl' => $options['voiceUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'SmsUrl' => $options['smsUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsStatusCallback' => $options['smsStatusCallback'], 'MessageStatusCallback' => $options['messageStatusCallback'], 'PublicApplicationConnectEnabled' => Serialize::booleanToString($options['publicApplicationConnectEnabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ApplicationInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.ApplicationContext ' . \implode(' ', $context) . ']'; } }PKt[Ɲ<Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($sid) . '.json'; } /** * Update the IncomingPhoneNumberInstance * * @param array|Options $options Optional Arguments * @return IncomingPhoneNumberInstance Updated IncomingPhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): IncomingPhoneNumberInstance { $options = new Values($options); $data = Values::of([ 'AccountSid' => $options['accountSid'], 'ApiVersion' => $options['apiVersion'], 'FriendlyName' => $options['friendlyName'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceApplicationSid' => $options['voiceApplicationSid'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'EmergencyStatus' => $options['emergencyStatus'], 'EmergencyAddressSid' => $options['emergencyAddressSid'], 'TrunkSid' => $options['trunkSid'], 'VoiceReceiveMode' => $options['voiceReceiveMode'], 'IdentitySid' => $options['identitySid'], 'AddressSid' => $options['addressSid'], 'BundleSid' => $options['bundleSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new IncomingPhoneNumberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Fetch the IncomingPhoneNumberInstance * * @return IncomingPhoneNumberInstance Fetched IncomingPhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IncomingPhoneNumberInstance { $payload = $this->version->fetch('GET', $this->uri); return new IncomingPhoneNumberInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the IncomingPhoneNumberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the assignedAddOns */ protected function getAssignedAddOns(): AssignedAddOnList { if (!$this->_assignedAddOns) { $this->_assignedAddOns = new AssignedAddOnList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_assignedAddOns; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.IncomingPhoneNumberContext ' . \implode(' ', $context) . ']'; } }PKt[`*ATwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers.json'; } /** * Streams AvailablePhoneNumberCountryInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AvailablePhoneNumberCountryInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AvailablePhoneNumberCountryInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AvailablePhoneNumberCountryInstance records from * the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AvailablePhoneNumberCountryPage Page of * AvailablePhoneNumberCountryInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AvailablePhoneNumberCountryPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AvailablePhoneNumberCountryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AvailablePhoneNumberCountryInstance records from * the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AvailablePhoneNumberCountryPage Page of * AvailablePhoneNumberCountryInstance */ public function getPage(string $targetUrl): AvailablePhoneNumberCountryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AvailablePhoneNumberCountryPage($this->version, $response, $this->solution); } /** * Constructs a AvailablePhoneNumberCountryContext * * @param string $countryCode The ISO country code of the country to fetch * available phone number information about */ public function getContext(string $countryCode): AvailablePhoneNumberCountryContext { return new AvailablePhoneNumberCountryContext( $this->version, $this->solution['accountSid'], $countryCode ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AvailablePhoneNumberCountryList]'; } }PKt[i..GTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return LocalInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalInstance */ public function buildInstance(array $payload): LocalInstance { return new LocalInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LocalPage]'; } }PKt[3GTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalList.phpnu[solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/Local.json'; } /** * Streams LocalInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads LocalInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return LocalInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of LocalInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return LocalPage Page of LocalInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): LocalPage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new LocalPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of LocalInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return LocalPage Page of LocalInstance */ public function getPage(string $targetUrl): LocalPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new LocalPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LocalList]'; } }PKt[Фs  KTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalInstance.phpnu[properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LocalInstance]'; } }PKt['"@@JTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NationalInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalInstance */ public function buildInstance(array $payload): NationalInstance { return new NationalInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NationalPage]'; } }PKt[qppRTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachinePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MachineToMachineInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineInstance */ public function buildInstance(array $payload): MachineToMachineInstance { return new MachineToMachineInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MachineToMachinePage]'; } }PKt[7@@JTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TollFreeInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeInstance */ public function buildInstance(array $payload): TollFreeInstance { return new TollFreeInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TollFreePage]'; } }PKt[50HTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileList.phpnu[solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/Mobile.json'; } /** * Streams MobileInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MobileInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MobileInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MobileInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MobilePage Page of MobileInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MobilePage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MobilePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MobileInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MobilePage Page of MobileInstance */ public function getPage(string $targetUrl): MobilePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MobilePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MobileList]'; } }PKt[*GFTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipList.phpnu[solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/Voip.json'; } /** * Streams VoipInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads VoipInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return VoipInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of VoipInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return VoipPage Page of VoipInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): VoipPage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new VoipPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of VoipInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return VoipPage Page of VoipInstance */ public function getPage(string $targetUrl): VoipPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new VoipPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.VoipList]'; } }PKt[0$ $ NTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalInstance.phpnu[properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NationalInstance]'; } }PKt[?{a'B'BUTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineOptions.phpnu[options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadMachineToMachineOptions ' . $options . ']'; } }PKt[XBBOTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostOptions.phpnu[options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadSharedCostOptions ' . $options . ']'; } }PKt[oY|  JTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipInstance.phpnu[properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.VoipInstance]'; } }PKt[** * PTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostInstance.phpnu[properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SharedCostInstance]'; } }PKt[VAAKTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileOptions.phpnu[options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadMobileOptions ' . $options . ']'; } }PKt[h'IZZRTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineList.phpnu[solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/MachineToMachine.json'; } /** * Streams MachineToMachineInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MachineToMachineInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MachineToMachineInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MachineToMachineInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MachineToMachinePage Page of MachineToMachineInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MachineToMachinePage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MachineToMachinePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MachineToMachineInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MachineToMachinePage Page of MachineToMachineInstance */ public function getPage(string $targetUrl): MachineToMachinePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MachineToMachinePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MachineToMachineList]'; } }PKt[jUt$ $ NTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeInstance.phpnu[properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TollFreeInstance]'; } }PKt[> 3LTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostList.phpnu[solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/SharedCost.json'; } /** * Streams SharedCostInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SharedCostInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SharedCostInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SharedCostInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SharedCostPage Page of SharedCostInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SharedCostPage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SharedCostPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SharedCostInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SharedCostPage Page of SharedCostInstance */ public function getPage(string $targetUrl): SharedCostPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SharedCostPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SharedCostList]'; } }PKt[OTk  LTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileInstance.phpnu[properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MobileInstance]'; } }PKt[42JTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalList.phpnu[solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/National.json'; } /** * Streams NationalInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads NationalInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return NationalInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of NationalInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return NationalPage Page of NationalInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): NationalPage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new NationalPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of NationalInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return NationalPage Page of NationalInstance */ public function getPage(string $targetUrl): NationalPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new NationalPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NationalList]'; } }PKt[k}*B*BJTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.phpnu[options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadLocalOptions ' . $options . ']'; } }PKt[LLLTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SharedCostInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostInstance */ public function buildInstance(array $payload): SharedCostInstance { return new SharedCostInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SharedCostPage]'; } }PKt[XAAITwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipOptions.phpnu[options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadVoipOptions ' . $options . ']'; } }PKt[rFi((FTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return VoipInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipInstance */ public function buildInstance(array $payload): VoipInstance { return new VoipInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.VoipPage]'; } }PKt[ETAAMTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalOptions.phpnu[options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadNationalOptions ' . $options . ']'; } }PKt[44HTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobilePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MobileInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileInstance */ public function buildInstance(array $payload): MobileInstance { return new MobileInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MobilePage]'; } }PKt[Kjn< < VTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineInstance.phpnu[properties = [ 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'lata' => Values::array_get($payload, 'lata'), 'locality' => Values::array_get($payload, 'locality'), 'rateCenter' => Values::array_get($payload, 'rate_center'), 'latitude' => Values::array_get($payload, 'latitude'), 'longitude' => Values::array_get($payload, 'longitude'), 'region' => Values::array_get($payload, 'region'), 'postalCode' => Values::array_get($payload, 'postal_code'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), ]; $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MachineToMachineInstance]'; } }PKt[x/4/JTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeList.phpnu[solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/TollFree.json'; } /** * Streams TollFreeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TollFreeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TollFreeInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TollFreeInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TollFreePage Page of TollFreeInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TollFreePage { $options = new Values($options); $params = Values::of([ 'AreaCode' => $options['areaCode'], 'Contains' => $options['contains'], 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']), 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']), 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']), 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']), 'Beta' => Serialize::booleanToString($options['beta']), 'NearNumber' => $options['nearNumber'], 'NearLatLong' => $options['nearLatLong'], 'Distance' => $options['distance'], 'InPostalCode' => $options['inPostalCode'], 'InRegion' => $options['inRegion'], 'InRateCenter' => $options['inRateCenter'], 'InLata' => $options['inLata'], 'InLocality' => $options['inLocality'], 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TollFreePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TollFreeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TollFreePage Page of TollFreeInstance */ public function getPage(string $targetUrl): TollFreePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TollFreePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TollFreeList]'; } }PKt[AAMTwilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeOptions.phpnu[options['areaCode'] = $areaCode; $this->options['contains'] = $contains; $this->options['smsEnabled'] = $smsEnabled; $this->options['mmsEnabled'] = $mmsEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; $this->options['beta'] = $beta; $this->options['nearNumber'] = $nearNumber; $this->options['nearLatLong'] = $nearLatLong; $this->options['distance'] = $distance; $this->options['inPostalCode'] = $inPostalCode; $this->options['inRegion'] = $inRegion; $this->options['inRateCenter'] = $inRateCenter; $this->options['inLata'] = $inLata; $this->options['inLocality'] = $inLocality; $this->options['faxEnabled'] = $faxEnabled; } /** * The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. * * @param int $areaCode The area code of the phone numbers to read * @return $this Fluent Builder */ public function setAreaCode(int $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. * * @param string $contains The pattern on which to match phone numbers * @return $this Fluent Builder */ public function setContains(string $contains): self { $this->options['contains'] = $contains; return $this; } /** * Whether the phone numbers can receive text messages. Can be: `true` or `false`. * * @param bool $smsEnabled Whether the phone numbers can receive text messages * @return $this Fluent Builder */ public function setSmsEnabled(bool $smsEnabled): self { $this->options['smsEnabled'] = $smsEnabled; return $this; } /** * Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. * * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages * @return $this Fluent Builder */ public function setMmsEnabled(bool $mmsEnabled): self { $this->options['mmsEnabled'] = $mmsEnabled; return $this; } /** * Whether the phone numbers can receive calls. Can be: `true` or `false`. * * @param bool $voiceEnabled Whether the phone numbers can receive calls. * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that * require an Address * @return $this Fluent Builder */ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self { $this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers * that require a local address * @return $this Fluent Builder */ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self { $this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired; return $this; } /** * Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. * * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers * that require a foreign address * @return $this Fluent Builder */ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self { $this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired; return $this; } /** * Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to read phone numbers new to the Twilio platform * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. * * @param string $nearNumber Given a phone number, find a geographically close * number within distance miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearNumber(string $nearNumber): self { $this->options['nearNumber'] = $nearNumber; return $this; } /** * Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. * * @param string $nearLatLong Given a latitude/longitude pair lat,long find * geographically close numbers within distance * miles. (US/Canada only) * @return $this Fluent Builder */ public function setNearLatLong(string $nearLatLong): self { $this->options['nearLatLong'] = $nearLatLong; return $this; } /** * The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. * * @param int $distance The search radius, in miles, for a near_ query. * (US/Canada only) * @return $this Fluent Builder */ public function setDistance(int $distance): self { $this->options['distance'] = $distance; return $this; } /** * Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. * * @param string $inPostalCode Limit results to a particular postal code. * (US/Canada only) * @return $this Fluent Builder */ public function setInPostalCode(string $inPostalCode): self { $this->options['inPostalCode'] = $inPostalCode; return $this; } /** * Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. * * @param string $inRegion Limit results to a particular region. (US/Canada * only) * @return $this Fluent Builder */ public function setInRegion(string $inRegion): self { $this->options['inRegion'] = $inRegion; return $this; } /** * Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. * * @param string $inRateCenter Limit results to a specific rate center, or * given a phone number search within the same rate * center as that number. (US/Canada only) * @return $this Fluent Builder */ public function setInRateCenter(string $inRateCenter): self { $this->options['inRateCenter'] = $inRateCenter; return $this; } /** * Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. * * @param string $inLata Limit results to a specific local access and transport * area. (US/Canada only) * @return $this Fluent Builder */ public function setInLata(string $inLata): self { $this->options['inLata'] = $inLata; return $this; } /** * Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. * * @param string $inLocality Limit results to a particular locality * @return $this Fluent Builder */ public function setInLocality(string $inLocality): self { $this->options['inLocality'] = $inLocality; return $this; } /** * Whether the phone numbers can receive faxes. Can be: `true` or `false`. * * @param bool $faxEnabled Whether the phone numbers can receive faxes * @return $this Fluent Builder */ public function setFaxEnabled(bool $faxEnabled): self { $this->options['faxEnabled'] = $faxEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadTollFreeOptions ' . $options . ']'; } }PKt[N(h  3Twilio/Rest/Api/V2010/Account/ConnectAppContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/ConnectApps/' . \rawurlencode($sid) . '.json'; } /** * Fetch the ConnectAppInstance * * @return ConnectAppInstance Fetched ConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConnectAppInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConnectAppInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the ConnectAppInstance * * @param array|Options $options Optional Arguments * @return ConnectAppInstance Updated ConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConnectAppInstance { $options = new Values($options); $data = Values::of([ 'AuthorizeRedirectUrl' => $options['authorizeRedirectUrl'], 'CompanyName' => $options['companyName'], 'DeauthorizeCallbackMethod' => $options['deauthorizeCallbackMethod'], 'DeauthorizeCallbackUrl' => $options['deauthorizeCallbackUrl'], 'Description' => $options['description'], 'FriendlyName' => $options['friendlyName'], 'HomepageUrl' => $options['homepageUrl'], 'Permissions' => Serialize::map($options['permissions'], function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ConnectAppInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the ConnectAppInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.ConnectAppContext ' . \implode(' ', $context) . ']'; } }PKt[O,Twilio/Rest/Api/V2010/Account/NewKeyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NewKeyInstance \Twilio\Rest\Api\V2010\Account\NewKeyInstance */ public function buildInstance(array $payload): NewKeyInstance { return new NewKeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NewKeyPage]'; } }PKt[nF  =Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageList.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/UserDefinedMessages.json'; } /** * Create the UserDefinedMessageInstance * * @param string $content The User Defined Message in the form of URL-encoded * JSON string. * @param array|Options $options Optional Arguments * @return UserDefinedMessageInstance Created UserDefinedMessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $content, array $options = []): UserDefinedMessageInstance { $options = new Values($options); $data = Values::of(['Content' => $content, 'IdempotencyKey' => $options['idempotencyKey'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new UserDefinedMessageInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UserDefinedMessageList]'; } }PKt[K҈ 6Twilio/Rest/Api/V2010/Account/Call/FeedbackContext.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Feedback.json'; } /** * Fetch the FeedbackInstance * * @return FeedbackInstance Fetched FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FeedbackInstance { $payload = $this->version->fetch('GET', $this->uri); return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Create the FeedbackInstance * * @param int $qualityScore The call quality expressed as an integer from 1 to 5 * @param array|Options $options Optional Arguments * @return FeedbackInstance Created FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function create(int $qualityScore, array $options = []): FeedbackInstance { $options = new Values($options); $data = Values::of([ 'QualityScore' => $qualityScore, 'Issue' => Serialize::map($options['issue'], function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Update the FeedbackInstance * * @param array|Options $options Optional Arguments * @return FeedbackInstance Updated FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FeedbackInstance { $options = new Values($options); $data = Values::of([ 'QualityScore' => $options['qualityScore'], 'Issue' => Serialize::map($options['issue'], function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.FeedbackContext ' . \implode(' ', $context) . ']'; } }PKt[p}-1Twilio/Rest/Api/V2010/Account/Call/SiprecPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SiprecInstance \Twilio\Rest\Api\V2010\Account\Call\SiprecInstance */ public function buildInstance(array $payload): SiprecInstance { return new SiprecInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SiprecPage]'; } }PKt[~;;1Twilio/Rest/Api/V2010/Account/Call/SiprecList.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Siprec.json'; } /** * Create the SiprecInstance * * @param array|Options $options Optional Arguments * @return SiprecInstance Created SiprecInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): SiprecInstance { $options = new Values($options); $data = Values::of([ 'Name' => $options['name'], 'ConnectorName' => $options['connectorName'], 'Track' => $options['track'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'Parameter1.Name' => $options['parameter1Name'], 'Parameter1.Value' => $options['parameter1Value'], 'Parameter2.Name' => $options['parameter2Name'], 'Parameter2.Value' => $options['parameter2Value'], 'Parameter3.Name' => $options['parameter3Name'], 'Parameter3.Value' => $options['parameter3Value'], 'Parameter4.Name' => $options['parameter4Name'], 'Parameter4.Value' => $options['parameter4Value'], 'Parameter5.Name' => $options['parameter5Name'], 'Parameter5.Value' => $options['parameter5Value'], 'Parameter6.Name' => $options['parameter6Name'], 'Parameter6.Value' => $options['parameter6Value'], 'Parameter7.Name' => $options['parameter7Name'], 'Parameter7.Value' => $options['parameter7Value'], 'Parameter8.Name' => $options['parameter8Name'], 'Parameter8.Value' => $options['parameter8Value'], 'Parameter9.Name' => $options['parameter9Name'], 'Parameter9.Value' => $options['parameter9Value'], 'Parameter10.Name' => $options['parameter10Name'], 'Parameter10.Value' => $options['parameter10Value'], 'Parameter11.Name' => $options['parameter11Name'], 'Parameter11.Value' => $options['parameter11Value'], 'Parameter12.Name' => $options['parameter12Name'], 'Parameter12.Value' => $options['parameter12Value'], 'Parameter13.Name' => $options['parameter13Name'], 'Parameter13.Value' => $options['parameter13Value'], 'Parameter14.Name' => $options['parameter14Name'], 'Parameter14.Value' => $options['parameter14Value'], 'Parameter15.Name' => $options['parameter15Name'], 'Parameter15.Value' => $options['parameter15Value'], 'Parameter16.Name' => $options['parameter16Name'], 'Parameter16.Value' => $options['parameter16Value'], 'Parameter17.Name' => $options['parameter17Name'], 'Parameter17.Value' => $options['parameter17Value'], 'Parameter18.Name' => $options['parameter18Name'], 'Parameter18.Value' => $options['parameter18Value'], 'Parameter19.Name' => $options['parameter19Name'], 'Parameter19.Value' => $options['parameter19Value'], 'Parameter20.Name' => $options['parameter20Name'], 'Parameter20.Value' => $options['parameter20Value'], 'Parameter21.Name' => $options['parameter21Name'], 'Parameter21.Value' => $options['parameter21Value'], 'Parameter22.Name' => $options['parameter22Name'], 'Parameter22.Value' => $options['parameter22Value'], 'Parameter23.Name' => $options['parameter23Name'], 'Parameter23.Value' => $options['parameter23Value'], 'Parameter24.Name' => $options['parameter24Name'], 'Parameter24.Value' => $options['parameter24Value'], 'Parameter25.Name' => $options['parameter25Name'], 'Parameter25.Value' => $options['parameter25Value'], 'Parameter26.Name' => $options['parameter26Name'], 'Parameter26.Value' => $options['parameter26Value'], 'Parameter27.Name' => $options['parameter27Name'], 'Parameter27.Value' => $options['parameter27Value'], 'Parameter28.Name' => $options['parameter28Name'], 'Parameter28.Value' => $options['parameter28Value'], 'Parameter29.Name' => $options['parameter29Name'], 'Parameter29.Value' => $options['parameter29Value'], 'Parameter30.Name' => $options['parameter30Name'], 'Parameter30.Value' => $options['parameter30Value'], 'Parameter31.Name' => $options['parameter31Name'], 'Parameter31.Value' => $options['parameter31Value'], 'Parameter32.Name' => $options['parameter32Name'], 'Parameter32.Value' => $options['parameter32Value'], 'Parameter33.Name' => $options['parameter33Name'], 'Parameter33.Value' => $options['parameter33Value'], 'Parameter34.Name' => $options['parameter34Name'], 'Parameter34.Value' => $options['parameter34Value'], 'Parameter35.Name' => $options['parameter35Name'], 'Parameter35.Value' => $options['parameter35Value'], 'Parameter36.Name' => $options['parameter36Name'], 'Parameter36.Value' => $options['parameter36Value'], 'Parameter37.Name' => $options['parameter37Name'], 'Parameter37.Value' => $options['parameter37Value'], 'Parameter38.Name' => $options['parameter38Name'], 'Parameter38.Value' => $options['parameter38Value'], 'Parameter39.Name' => $options['parameter39Name'], 'Parameter39.Value' => $options['parameter39Value'], 'Parameter40.Name' => $options['parameter40Name'], 'Parameter40.Value' => $options['parameter40Value'], 'Parameter41.Name' => $options['parameter41Name'], 'Parameter41.Value' => $options['parameter41Value'], 'Parameter42.Name' => $options['parameter42Name'], 'Parameter42.Value' => $options['parameter42Value'], 'Parameter43.Name' => $options['parameter43Name'], 'Parameter43.Value' => $options['parameter43Value'], 'Parameter44.Name' => $options['parameter44Name'], 'Parameter44.Value' => $options['parameter44Value'], 'Parameter45.Name' => $options['parameter45Name'], 'Parameter45.Value' => $options['parameter45Value'], 'Parameter46.Name' => $options['parameter46Name'], 'Parameter46.Value' => $options['parameter46Value'], 'Parameter47.Name' => $options['parameter47Name'], 'Parameter47.Value' => $options['parameter47Value'], 'Parameter48.Name' => $options['parameter48Name'], 'Parameter48.Value' => $options['parameter48Value'], 'Parameter49.Name' => $options['parameter49Name'], 'Parameter49.Value' => $options['parameter49Value'], 'Parameter50.Name' => $options['parameter50Name'], 'Parameter50.Value' => $options['parameter50Value'], 'Parameter51.Name' => $options['parameter51Name'], 'Parameter51.Value' => $options['parameter51Value'], 'Parameter52.Name' => $options['parameter52Name'], 'Parameter52.Value' => $options['parameter52Value'], 'Parameter53.Name' => $options['parameter53Name'], 'Parameter53.Value' => $options['parameter53Value'], 'Parameter54.Name' => $options['parameter54Name'], 'Parameter54.Value' => $options['parameter54Value'], 'Parameter55.Name' => $options['parameter55Name'], 'Parameter55.Value' => $options['parameter55Value'], 'Parameter56.Name' => $options['parameter56Name'], 'Parameter56.Value' => $options['parameter56Value'], 'Parameter57.Name' => $options['parameter57Name'], 'Parameter57.Value' => $options['parameter57Value'], 'Parameter58.Name' => $options['parameter58Name'], 'Parameter58.Value' => $options['parameter58Value'], 'Parameter59.Name' => $options['parameter59Name'], 'Parameter59.Value' => $options['parameter59Value'], 'Parameter60.Name' => $options['parameter60Name'], 'Parameter60.Value' => $options['parameter60Value'], 'Parameter61.Name' => $options['parameter61Name'], 'Parameter61.Value' => $options['parameter61Value'], 'Parameter62.Name' => $options['parameter62Name'], 'Parameter62.Value' => $options['parameter62Value'], 'Parameter63.Name' => $options['parameter63Name'], 'Parameter63.Value' => $options['parameter63Value'], 'Parameter64.Name' => $options['parameter64Name'], 'Parameter64.Value' => $options['parameter64Value'], 'Parameter65.Name' => $options['parameter65Name'], 'Parameter65.Value' => $options['parameter65Value'], 'Parameter66.Name' => $options['parameter66Name'], 'Parameter66.Value' => $options['parameter66Value'], 'Parameter67.Name' => $options['parameter67Name'], 'Parameter67.Value' => $options['parameter67Value'], 'Parameter68.Name' => $options['parameter68Name'], 'Parameter68.Value' => $options['parameter68Value'], 'Parameter69.Name' => $options['parameter69Name'], 'Parameter69.Value' => $options['parameter69Value'], 'Parameter70.Name' => $options['parameter70Name'], 'Parameter70.Value' => $options['parameter70Value'], 'Parameter71.Name' => $options['parameter71Name'], 'Parameter71.Value' => $options['parameter71Value'], 'Parameter72.Name' => $options['parameter72Name'], 'Parameter72.Value' => $options['parameter72Value'], 'Parameter73.Name' => $options['parameter73Name'], 'Parameter73.Value' => $options['parameter73Value'], 'Parameter74.Name' => $options['parameter74Name'], 'Parameter74.Value' => $options['parameter74Value'], 'Parameter75.Name' => $options['parameter75Name'], 'Parameter75.Value' => $options['parameter75Value'], 'Parameter76.Name' => $options['parameter76Name'], 'Parameter76.Value' => $options['parameter76Value'], 'Parameter77.Name' => $options['parameter77Name'], 'Parameter77.Value' => $options['parameter77Value'], 'Parameter78.Name' => $options['parameter78Name'], 'Parameter78.Value' => $options['parameter78Value'], 'Parameter79.Name' => $options['parameter79Name'], 'Parameter79.Value' => $options['parameter79Value'], 'Parameter80.Name' => $options['parameter80Name'], 'Parameter80.Value' => $options['parameter80Value'], 'Parameter81.Name' => $options['parameter81Name'], 'Parameter81.Value' => $options['parameter81Value'], 'Parameter82.Name' => $options['parameter82Name'], 'Parameter82.Value' => $options['parameter82Value'], 'Parameter83.Name' => $options['parameter83Name'], 'Parameter83.Value' => $options['parameter83Value'], 'Parameter84.Name' => $options['parameter84Name'], 'Parameter84.Value' => $options['parameter84Value'], 'Parameter85.Name' => $options['parameter85Name'], 'Parameter85.Value' => $options['parameter85Value'], 'Parameter86.Name' => $options['parameter86Name'], 'Parameter86.Value' => $options['parameter86Value'], 'Parameter87.Name' => $options['parameter87Name'], 'Parameter87.Value' => $options['parameter87Value'], 'Parameter88.Name' => $options['parameter88Name'], 'Parameter88.Value' => $options['parameter88Value'], 'Parameter89.Name' => $options['parameter89Name'], 'Parameter89.Value' => $options['parameter89Value'], 'Parameter90.Name' => $options['parameter90Name'], 'Parameter90.Value' => $options['parameter90Value'], 'Parameter91.Name' => $options['parameter91Name'], 'Parameter91.Value' => $options['parameter91Value'], 'Parameter92.Name' => $options['parameter92Name'], 'Parameter92.Value' => $options['parameter92Value'], 'Parameter93.Name' => $options['parameter93Name'], 'Parameter93.Value' => $options['parameter93Value'], 'Parameter94.Name' => $options['parameter94Name'], 'Parameter94.Value' => $options['parameter94Value'], 'Parameter95.Name' => $options['parameter95Name'], 'Parameter95.Value' => $options['parameter95Value'], 'Parameter96.Name' => $options['parameter96Name'], 'Parameter96.Value' => $options['parameter96Value'], 'Parameter97.Name' => $options['parameter97Name'], 'Parameter97.Value' => $options['parameter97Value'], 'Parameter98.Name' => $options['parameter98Name'], 'Parameter98.Value' => $options['parameter98Value'], 'Parameter99.Name' => $options['parameter99Name'], 'Parameter99.Value' => $options['parameter99Value'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SiprecInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Constructs a SiprecContext * * @param string $sid The SID of the Siprec resource, or the `name` */ public function getContext(string $sid): SiprecContext { return new SiprecContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SiprecList]'; } }PKt[_-3Twilio/Rest/Api/V2010/Account/Call/FeedbackPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FeedbackInstance \Twilio\Rest\Api\V2010\Account\Call\FeedbackInstance */ public function buildInstance(array $payload): FeedbackInstance { return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackPage]'; } }PKt[~m LTwilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionOptions.phpnu[options['idempotencyKey'] = $idempotencyKey; $this->options['method'] = $method; } /** * A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated. * * @param string $idempotencyKey A unique string value to identify API call. * This should be a unique string value per API * call and can be a randomly generated. * @return $this Fluent Builder */ public function setIdempotencyKey(string $idempotencyKey): self { $this->options['idempotencyKey'] = $idempotencyKey; return $this; } /** * The HTTP method Twilio will use when requesting the above `Url`. Either `GET` or `POST`. Default is `POST`. * * @param string $method HTTP method used with the callback. * @return $this Fluent Builder */ public function setMethod(string $method): self { $this->options['method'] = $method; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateUserDefinedMessageSubscriptionOptions ' . $options . ']'; } }PKt[;7Twilio/Rest/Api/V2010/Account/Call/NotificationList.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Notifications.json'; } /** * Streams NotificationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads NotificationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return NotificationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of NotificationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return NotificationPage Page of NotificationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): NotificationPage { $options = new Values($options); $params = Values::of([ 'Log' => $options['log'], 'MessageDate<' => Serialize::iso8601Date($options['messageDateBefore']), 'MessageDate' => Serialize::iso8601Date($options['messageDate']), 'MessageDate>' => Serialize::iso8601Date($options['messageDateAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new NotificationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of NotificationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return NotificationPage Page of NotificationInstance */ public function getPage(string $targetUrl): NotificationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new NotificationPage($this->version, $response, $this->solution); } /** * Constructs a NotificationContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): NotificationContext { return new NotificationContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NotificationList]'; } }PKt[)_:NNMTwilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserDefinedMessageSubscriptionContext Context for this * UserDefinedMessageSubscriptionInstance */ protected function proxy(): UserDefinedMessageSubscriptionContext { if (!$this->context) { $this->context = new UserDefinedMessageSubscriptionContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the UserDefinedMessageSubscriptionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.UserDefinedMessageSubscriptionInstance ' . \implode(' ', $context) . ']'; } }PKt[ 4Twilio/Rest/Api/V2010/Account/Call/RecordingList.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Recordings.json'; } /** * Create the RecordingInstance * * @param array|Options $options Optional Arguments * @return RecordingInstance Created RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): RecordingInstance { $options = new Values($options); $data = Values::of([ 'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function($e) { return $e; }), 'RecordingStatusCallback' => $options['recordingStatusCallback'], 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'], 'Trim' => $options['trim'], 'RecordingChannels' => $options['recordingChannels'], 'RecordingTrack' => $options['recordingTrack'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Streams RecordingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RecordingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RecordingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RecordingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RecordingPage Page of RecordingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RecordingPage { $options = new Values($options); $params = Values::of([ 'DateCreated<' => Serialize::iso8601Date($options['dateCreatedBefore']), 'DateCreated' => Serialize::iso8601Date($options['dateCreated']), 'DateCreated>' => Serialize::iso8601Date($options['dateCreatedAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RecordingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RecordingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RecordingPage Page of RecordingInstance */ public function getPage(string $targetUrl): RecordingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RecordingPage($this->version, $response, $this->solution); } /** * Constructs a RecordingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): RecordingContext { return new RecordingContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingList]'; } }PKt[oqP770Twilio/Rest/Api/V2010/Account/Call/EventList.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Events.json'; } /** * Streams EventInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EventInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EventInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of EventInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EventPage Page of EventInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EventPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EventPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EventInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EventPage Page of EventInstance */ public function getPage(string $targetUrl): EventPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EventPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.EventList]'; } }PKt[> 6Twilio/Rest/Api/V2010/Account/Call/PaymentInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PaymentContext Context for this PaymentInstance */ protected function proxy(): PaymentContext { if (!$this->context) { $this->context = new PaymentContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the PaymentInstance * * @param string $idempotencyKey A unique token that will be used to ensure * that multiple API calls with the same * information do not result in multiple * transactions. * @param string $statusCallback Provide an absolute or relative URL to receive * status updates regarding your Pay session. * @param array|Options $options Optional Arguments * @return PaymentInstance Updated PaymentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $idempotencyKey, string $statusCallback, array $options = []): PaymentInstance { return $this->proxy()->update($idempotencyKey, $statusCallback, $options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.PaymentInstance ' . \implode(' ', $context) . ']'; } }PKt[c&&7Twilio/Rest/Api/V2010/Account/Call/NotificationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NotificationInstance \Twilio\Rest\Api\V2010\Account\Call\NotificationInstance */ public function buildInstance(array $payload): NotificationInstance { return new NotificationInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NotificationPage]'; } }PKt[|a117Twilio/Rest/Api/V2010/Account/Call/RecordingOptions.phpnu[options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; $this->options['recordingStatusCallback'] = $recordingStatusCallback; $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; $this->options['trim'] = $trim; $this->options['recordingChannels'] = $recordingChannels; $this->options['recordingTrack'] = $recordingTrack; } /** * The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space. * * @param string[] $recordingStatusCallbackEvent The recording status changes * that should generate a callback * @return $this Fluent Builder */ public function setRecordingStatusCallbackEvent(array $recordingStatusCallbackEvent): self { $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent; return $this; } /** * The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback). * * @param string $recordingStatusCallback The callback URL on each selected * recording event * @return $this Fluent Builder */ public function setRecordingStatusCallback(string $recordingStatusCallback): self { $this->options['recordingStatusCallback'] = $recordingStatusCallback; return $this; } /** * The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`. * * @param string $recordingStatusCallbackMethod The HTTP method we should use * to call * `recording_status_callback` * @return $this Fluent Builder */ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self { $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod; return $this; } /** * Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. * * @param string $trim Whether to trim the silence in the recording * @return $this Fluent Builder */ public function setTrim(string $trim): self { $this->options['trim'] = $trim; return $this; } /** * The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels. * * @param string $recordingChannels The number of channels that the output * recording will be configured with * @return $this Fluent Builder */ public function setRecordingChannels(string $recordingChannels): self { $this->options['recordingChannels'] = $recordingChannels; return $this; } /** * The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. * * @param string $recordingTrack Which track(s) to record * @return $this Fluent Builder */ public function setRecordingTrack(string $recordingTrack): self { $this->options['recordingTrack'] = $recordingTrack; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateRecordingOptions ' . $options . ']'; } } class UpdateRecordingOptions extends Options { /** * @param string $pauseBehavior Whether to record or not during the pause * period. */ public function __construct(string $pauseBehavior = Values::NONE) { $this->options['pauseBehavior'] = $pauseBehavior; } /** * Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. * * @param string $pauseBehavior Whether to record or not during the pause * period. * @return $this Fluent Builder */ public function setPauseBehavior(string $pauseBehavior): self { $this->options['pauseBehavior'] = $pauseBehavior; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateRecordingOptions ' . $options . ']'; } } class ReadRecordingOptions extends Options { /** * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read */ public function __construct(string $dateCreatedBefore = Values::NONE, string $dateCreated = Values::NONE, string $dateCreatedAfter = Values::NONE) { $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['dateCreated'] = $dateCreated; $this->options['dateCreatedAfter'] = $dateCreatedAfter; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. * * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to * read * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadRecordingOptions ' . $options . ']'; } }PKt[Bi::2Twilio/Rest/Api/V2010/Account/Call/PaymentList.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Payments.json'; } /** * Create the PaymentInstance * * @param string $idempotencyKey A unique token that will be used to ensure * that multiple API calls with the same * information do not result in multiple * transactions. * @param string $statusCallback Provide an absolute or relative URL to receive * status updates regarding your Pay session.. * @param array|Options $options Optional Arguments * @return PaymentInstance Created PaymentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $idempotencyKey, string $statusCallback, array $options = []): PaymentInstance { $options = new Values($options); $data = Values::of([ 'IdempotencyKey' => $idempotencyKey, 'StatusCallback' => $statusCallback, 'BankAccountType' => $options['bankAccountType'], 'ChargeAmount' => $options['chargeAmount'], 'Currency' => $options['currency'], 'Description' => $options['description'], 'Input' => $options['input'], 'MinPostalCodeLength' => $options['minPostalCodeLength'], 'Parameter' => Serialize::jsonObject($options['parameter']), 'PaymentConnector' => $options['paymentConnector'], 'PaymentMethod' => $options['paymentMethod'], 'PostalCode' => Serialize::booleanToString($options['postalCode']), 'SecurityCode' => Serialize::booleanToString($options['securityCode']), 'Timeout' => $options['timeout'], 'TokenType' => $options['tokenType'], 'ValidCardTypes' => $options['validCardTypes'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new PaymentInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Constructs a PaymentContext * * @param string $sid The SID of Payments session */ public function getContext(string $sid): PaymentContext { return new PaymentContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.PaymentList]'; } }PKt[ZGG@Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageOptions.phpnu[options['idempotencyKey'] = $idempotencyKey; } /** * A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated. * * @param string $idempotencyKey A unique string value to identify API call. * This should be a unique string value per API * call and can be a randomly generated. * @return $this Fluent Builder */ public function setIdempotencyKey(string $idempotencyKey): self { $this->options['idempotencyKey'] = $idempotencyKey; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateUserDefinedMessageOptions ' . $options . ']'; } }PKt[\8 8 7Twilio/Rest/Api/V2010/Account/Call/RecordingContext.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Recordings/' . \rawurlencode($sid) . '.json'; } /** * Update the RecordingInstance * * @param string $status The new status of the recording * @param array|Options $options Optional Arguments * @return RecordingInstance Updated RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): RecordingInstance { $options = new Values($options); $data = Values::of(['Status' => $status, 'PauseBehavior' => $options['pauseBehavior'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { $payload = $this->version->fetch('GET', $this->uri); return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * Delete the RecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.RecordingContext ' . \implode(' ', $context) . ']'; } }PKt[S:0Twilio/Rest/Api/V2010/Account/Call/EventPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EventInstance \Twilio\Rest\Api\V2010\Account\Call\EventInstance */ public function buildInstance(array $payload): EventInstance { return new EventInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.EventPage]'; } }PKt[2$. . :Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/FeedbackSummary.json'; } /** * Create the FeedbackSummaryInstance * * @param \DateTime $startDate Only include feedback given on or after this date * @param \DateTime $endDate Only include feedback given on or before this date * @param array|Options $options Optional Arguments * @return FeedbackSummaryInstance Created FeedbackSummaryInstance * @throws TwilioException When an HTTP error occurs. */ public function create(\DateTime $startDate, \DateTime $endDate, array $options = []): FeedbackSummaryInstance { $options = new Values($options); $data = Values::of([ 'StartDate' => Serialize::iso8601Date($startDate), 'EndDate' => Serialize::iso8601Date($endDate), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FeedbackSummaryInstance($this->version, $payload, $this->solution['accountSid']); } /** * Constructs a FeedbackSummaryContext * * @param string $sid A string that uniquely identifies this feedback summary * resource */ public function getContext(string $sid): FeedbackSummaryContext { return new FeedbackSummaryContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackSummaryList]'; } }PKt[Vz1Twilio/Rest/Api/V2010/Account/Call/StreamPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return StreamInstance \Twilio\Rest\Api\V2010\Account\Call\StreamInstance */ public function buildInstance(array $payload): StreamInstance { return new StreamInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.StreamPage]'; } }PKt[Vf994Twilio/Rest/Api/V2010/Account/Call/StreamContext.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Streams/' . \rawurlencode($sid) . '.json'; } /** * Update the StreamInstance * * @param string $status The status. Must have the value `stopped` * @return StreamInstance Updated StreamInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): StreamInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new StreamInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.StreamContext ' . \implode(' ', $context) . ']'; } }PKt[75Twilio/Rest/Api/V2010/Account/Call/StreamInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'name' => Values::array_get($payload, 'name'), 'status' => Values::array_get($payload, 'status'), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return StreamContext Context for this StreamInstance */ protected function proxy(): StreamContext { if (!$this->context) { $this->context = new StreamContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the StreamInstance * * @param string $status The status. Must have the value `stopped` * @return StreamInstance Updated StreamInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): StreamInstance { return $this->proxy()->update($status); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.StreamInstance ' . \implode(' ', $context) . ']'; } }PKt[%I8Twilio/Rest/Api/V2010/Account/Call/RecordingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callSid' => Values::array_get($payload, 'call_sid'), 'conferenceSid' => Values::array_get($payload, 'conference_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'duration' => Values::array_get($payload, 'duration'), 'sid' => Values::array_get($payload, 'sid'), 'price' => Values::array_get($payload, 'price'), 'uri' => Values::array_get($payload, 'uri'), 'encryptionDetails' => Values::array_get($payload, 'encryption_details'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'status' => Values::array_get($payload, 'status'), 'channels' => Values::array_get($payload, 'channels'), 'source' => Values::array_get($payload, 'source'), 'errorCode' => Values::array_get($payload, 'error_code'), 'track' => Values::array_get($payload, 'track'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RecordingContext Context for this RecordingInstance */ protected function proxy(): RecordingContext { if (!$this->context) { $this->context = new RecordingContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the RecordingInstance * * @param string $status The new status of the recording * @param array|Options $options Optional Arguments * @return RecordingInstance Updated RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): RecordingInstance { return $this->proxy()->update($status, $options); } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { return $this->proxy()->fetch(); } /** * Delete the RecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.RecordingInstance ' . \implode(' ', $context) . ']'; } }PKt[ȇ;Twilio/Rest/Api/V2010/Account/Call/NotificationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callSid' => Values::array_get($payload, 'call_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'errorCode' => Values::array_get($payload, 'error_code'), 'log' => Values::array_get($payload, 'log'), 'messageDate' => Deserialize::dateTime(Values::array_get($payload, 'message_date')), 'messageText' => Values::array_get($payload, 'message_text'), 'moreInfo' => Values::array_get($payload, 'more_info'), 'requestMethod' => Values::array_get($payload, 'request_method'), 'requestUrl' => Values::array_get($payload, 'request_url'), 'requestVariables' => Values::array_get($payload, 'request_variables'), 'responseBody' => Values::array_get($payload, 'response_body'), 'responseHeaders' => Values::array_get($payload, 'response_headers'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NotificationContext Context for this NotificationInstance */ protected function proxy(): NotificationContext { if (!$this->context) { $this->context = new NotificationContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the NotificationInstance * * @return NotificationInstance Fetched NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NotificationInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.NotificationInstance ' . \implode(' ', $context) . ']'; } }PKt[q#C:Twilio/Rest/Api/V2010/Account/Call/NotificationOptions.phpnu[options['log'] = $log; $this->options['messageDateBefore'] = $messageDateBefore; $this->options['messageDate'] = $messageDate; $this->options['messageDateAfter'] = $messageDateAfter; } /** * Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. * * @param int $log Filter by log level * @return $this Fluent Builder */ public function setLog(int $log): self { $this->options['log'] = $log; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDateBefore Filter by date * @return $this Fluent Builder */ public function setMessageDateBefore(string $messageDateBefore): self { $this->options['messageDateBefore'] = $messageDateBefore; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDate Filter by date * @return $this Fluent Builder */ public function setMessageDate(string $messageDate): self { $this->options['messageDate'] = $messageDate; return $this; } /** * Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. * * @param string $messageDateAfter Filter by date * @return $this Fluent Builder */ public function setMessageDateAfter(string $messageDateAfter): self { $this->options['messageDateAfter'] = $messageDateAfter; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadNotificationOptions ' . $options . ']'; } }PKt[}ъITwilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserDefinedMessageSubscriptionInstance \Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageSubscriptionInstance */ public function buildInstance(array $payload): UserDefinedMessageSubscriptionInstance { return new UserDefinedMessageSubscriptionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UserDefinedMessageSubscriptionPage]'; } }PKt[n5Twilio/Rest/Api/V2010/Account/Call/SiprecInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'name' => Values::array_get($payload, 'name'), 'status' => Values::array_get($payload, 'status'), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SiprecContext Context for this SiprecInstance */ protected function proxy(): SiprecContext { if (!$this->context) { $this->context = new SiprecContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the SiprecInstance * * @param string $status The status. Must have the value `stopped` * @return SiprecInstance Updated SiprecInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): SiprecInstance { return $this->proxy()->update($status); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.SiprecInstance ' . \implode(' ', $context) . ']'; } }PKt[д4Twilio/Rest/Api/V2010/Account/Call/RecordingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RecordingInstance \Twilio\Rest\Api\V2010\Account\Call\RecordingInstance */ public function buildInstance(array $payload): RecordingInstance { return new RecordingInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordingPage]'; } }PKt[h2Twilio/Rest/Api/V2010/Account/Call/PaymentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PaymentInstance \Twilio\Rest\Api\V2010\Account\Call\PaymentInstance */ public function buildInstance(array $payload): PaymentInstance { return new PaymentInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.PaymentPage]'; } }PKt[} 0=Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.phpnu[options['includeSubaccounts'] = $includeSubaccounts; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; } /** * Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account. * * @param bool $includeSubaccounts `true` includes feedback from the specified * account and its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * The URL that we will request when the feedback summary is complete. * * @param string $statusCallback The URL that we will request when the feedback * summary is complete * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL. * * @param string $statusCallbackMethod The HTTP method we use to make requests * to the StatusCallback URL * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateFeedbackSummaryOptions ' . $options . ']'; } }PKt[L=;=;1Twilio/Rest/Api/V2010/Account/Call/StreamList.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Streams.json'; } /** * Create the StreamInstance * * @param string $url Url where WebSocket connection will be established. * @param array|Options $options Optional Arguments * @return StreamInstance Created StreamInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $url, array $options = []): StreamInstance { $options = new Values($options); $data = Values::of([ 'Url' => $url, 'Name' => $options['name'], 'Track' => $options['track'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'Parameter1.Name' => $options['parameter1Name'], 'Parameter1.Value' => $options['parameter1Value'], 'Parameter2.Name' => $options['parameter2Name'], 'Parameter2.Value' => $options['parameter2Value'], 'Parameter3.Name' => $options['parameter3Name'], 'Parameter3.Value' => $options['parameter3Value'], 'Parameter4.Name' => $options['parameter4Name'], 'Parameter4.Value' => $options['parameter4Value'], 'Parameter5.Name' => $options['parameter5Name'], 'Parameter5.Value' => $options['parameter5Value'], 'Parameter6.Name' => $options['parameter6Name'], 'Parameter6.Value' => $options['parameter6Value'], 'Parameter7.Name' => $options['parameter7Name'], 'Parameter7.Value' => $options['parameter7Value'], 'Parameter8.Name' => $options['parameter8Name'], 'Parameter8.Value' => $options['parameter8Value'], 'Parameter9.Name' => $options['parameter9Name'], 'Parameter9.Value' => $options['parameter9Value'], 'Parameter10.Name' => $options['parameter10Name'], 'Parameter10.Value' => $options['parameter10Value'], 'Parameter11.Name' => $options['parameter11Name'], 'Parameter11.Value' => $options['parameter11Value'], 'Parameter12.Name' => $options['parameter12Name'], 'Parameter12.Value' => $options['parameter12Value'], 'Parameter13.Name' => $options['parameter13Name'], 'Parameter13.Value' => $options['parameter13Value'], 'Parameter14.Name' => $options['parameter14Name'], 'Parameter14.Value' => $options['parameter14Value'], 'Parameter15.Name' => $options['parameter15Name'], 'Parameter15.Value' => $options['parameter15Value'], 'Parameter16.Name' => $options['parameter16Name'], 'Parameter16.Value' => $options['parameter16Value'], 'Parameter17.Name' => $options['parameter17Name'], 'Parameter17.Value' => $options['parameter17Value'], 'Parameter18.Name' => $options['parameter18Name'], 'Parameter18.Value' => $options['parameter18Value'], 'Parameter19.Name' => $options['parameter19Name'], 'Parameter19.Value' => $options['parameter19Value'], 'Parameter20.Name' => $options['parameter20Name'], 'Parameter20.Value' => $options['parameter20Value'], 'Parameter21.Name' => $options['parameter21Name'], 'Parameter21.Value' => $options['parameter21Value'], 'Parameter22.Name' => $options['parameter22Name'], 'Parameter22.Value' => $options['parameter22Value'], 'Parameter23.Name' => $options['parameter23Name'], 'Parameter23.Value' => $options['parameter23Value'], 'Parameter24.Name' => $options['parameter24Name'], 'Parameter24.Value' => $options['parameter24Value'], 'Parameter25.Name' => $options['parameter25Name'], 'Parameter25.Value' => $options['parameter25Value'], 'Parameter26.Name' => $options['parameter26Name'], 'Parameter26.Value' => $options['parameter26Value'], 'Parameter27.Name' => $options['parameter27Name'], 'Parameter27.Value' => $options['parameter27Value'], 'Parameter28.Name' => $options['parameter28Name'], 'Parameter28.Value' => $options['parameter28Value'], 'Parameter29.Name' => $options['parameter29Name'], 'Parameter29.Value' => $options['parameter29Value'], 'Parameter30.Name' => $options['parameter30Name'], 'Parameter30.Value' => $options['parameter30Value'], 'Parameter31.Name' => $options['parameter31Name'], 'Parameter31.Value' => $options['parameter31Value'], 'Parameter32.Name' => $options['parameter32Name'], 'Parameter32.Value' => $options['parameter32Value'], 'Parameter33.Name' => $options['parameter33Name'], 'Parameter33.Value' => $options['parameter33Value'], 'Parameter34.Name' => $options['parameter34Name'], 'Parameter34.Value' => $options['parameter34Value'], 'Parameter35.Name' => $options['parameter35Name'], 'Parameter35.Value' => $options['parameter35Value'], 'Parameter36.Name' => $options['parameter36Name'], 'Parameter36.Value' => $options['parameter36Value'], 'Parameter37.Name' => $options['parameter37Name'], 'Parameter37.Value' => $options['parameter37Value'], 'Parameter38.Name' => $options['parameter38Name'], 'Parameter38.Value' => $options['parameter38Value'], 'Parameter39.Name' => $options['parameter39Name'], 'Parameter39.Value' => $options['parameter39Value'], 'Parameter40.Name' => $options['parameter40Name'], 'Parameter40.Value' => $options['parameter40Value'], 'Parameter41.Name' => $options['parameter41Name'], 'Parameter41.Value' => $options['parameter41Value'], 'Parameter42.Name' => $options['parameter42Name'], 'Parameter42.Value' => $options['parameter42Value'], 'Parameter43.Name' => $options['parameter43Name'], 'Parameter43.Value' => $options['parameter43Value'], 'Parameter44.Name' => $options['parameter44Name'], 'Parameter44.Value' => $options['parameter44Value'], 'Parameter45.Name' => $options['parameter45Name'], 'Parameter45.Value' => $options['parameter45Value'], 'Parameter46.Name' => $options['parameter46Name'], 'Parameter46.Value' => $options['parameter46Value'], 'Parameter47.Name' => $options['parameter47Name'], 'Parameter47.Value' => $options['parameter47Value'], 'Parameter48.Name' => $options['parameter48Name'], 'Parameter48.Value' => $options['parameter48Value'], 'Parameter49.Name' => $options['parameter49Name'], 'Parameter49.Value' => $options['parameter49Value'], 'Parameter50.Name' => $options['parameter50Name'], 'Parameter50.Value' => $options['parameter50Value'], 'Parameter51.Name' => $options['parameter51Name'], 'Parameter51.Value' => $options['parameter51Value'], 'Parameter52.Name' => $options['parameter52Name'], 'Parameter52.Value' => $options['parameter52Value'], 'Parameter53.Name' => $options['parameter53Name'], 'Parameter53.Value' => $options['parameter53Value'], 'Parameter54.Name' => $options['parameter54Name'], 'Parameter54.Value' => $options['parameter54Value'], 'Parameter55.Name' => $options['parameter55Name'], 'Parameter55.Value' => $options['parameter55Value'], 'Parameter56.Name' => $options['parameter56Name'], 'Parameter56.Value' => $options['parameter56Value'], 'Parameter57.Name' => $options['parameter57Name'], 'Parameter57.Value' => $options['parameter57Value'], 'Parameter58.Name' => $options['parameter58Name'], 'Parameter58.Value' => $options['parameter58Value'], 'Parameter59.Name' => $options['parameter59Name'], 'Parameter59.Value' => $options['parameter59Value'], 'Parameter60.Name' => $options['parameter60Name'], 'Parameter60.Value' => $options['parameter60Value'], 'Parameter61.Name' => $options['parameter61Name'], 'Parameter61.Value' => $options['parameter61Value'], 'Parameter62.Name' => $options['parameter62Name'], 'Parameter62.Value' => $options['parameter62Value'], 'Parameter63.Name' => $options['parameter63Name'], 'Parameter63.Value' => $options['parameter63Value'], 'Parameter64.Name' => $options['parameter64Name'], 'Parameter64.Value' => $options['parameter64Value'], 'Parameter65.Name' => $options['parameter65Name'], 'Parameter65.Value' => $options['parameter65Value'], 'Parameter66.Name' => $options['parameter66Name'], 'Parameter66.Value' => $options['parameter66Value'], 'Parameter67.Name' => $options['parameter67Name'], 'Parameter67.Value' => $options['parameter67Value'], 'Parameter68.Name' => $options['parameter68Name'], 'Parameter68.Value' => $options['parameter68Value'], 'Parameter69.Name' => $options['parameter69Name'], 'Parameter69.Value' => $options['parameter69Value'], 'Parameter70.Name' => $options['parameter70Name'], 'Parameter70.Value' => $options['parameter70Value'], 'Parameter71.Name' => $options['parameter71Name'], 'Parameter71.Value' => $options['parameter71Value'], 'Parameter72.Name' => $options['parameter72Name'], 'Parameter72.Value' => $options['parameter72Value'], 'Parameter73.Name' => $options['parameter73Name'], 'Parameter73.Value' => $options['parameter73Value'], 'Parameter74.Name' => $options['parameter74Name'], 'Parameter74.Value' => $options['parameter74Value'], 'Parameter75.Name' => $options['parameter75Name'], 'Parameter75.Value' => $options['parameter75Value'], 'Parameter76.Name' => $options['parameter76Name'], 'Parameter76.Value' => $options['parameter76Value'], 'Parameter77.Name' => $options['parameter77Name'], 'Parameter77.Value' => $options['parameter77Value'], 'Parameter78.Name' => $options['parameter78Name'], 'Parameter78.Value' => $options['parameter78Value'], 'Parameter79.Name' => $options['parameter79Name'], 'Parameter79.Value' => $options['parameter79Value'], 'Parameter80.Name' => $options['parameter80Name'], 'Parameter80.Value' => $options['parameter80Value'], 'Parameter81.Name' => $options['parameter81Name'], 'Parameter81.Value' => $options['parameter81Value'], 'Parameter82.Name' => $options['parameter82Name'], 'Parameter82.Value' => $options['parameter82Value'], 'Parameter83.Name' => $options['parameter83Name'], 'Parameter83.Value' => $options['parameter83Value'], 'Parameter84.Name' => $options['parameter84Name'], 'Parameter84.Value' => $options['parameter84Value'], 'Parameter85.Name' => $options['parameter85Name'], 'Parameter85.Value' => $options['parameter85Value'], 'Parameter86.Name' => $options['parameter86Name'], 'Parameter86.Value' => $options['parameter86Value'], 'Parameter87.Name' => $options['parameter87Name'], 'Parameter87.Value' => $options['parameter87Value'], 'Parameter88.Name' => $options['parameter88Name'], 'Parameter88.Value' => $options['parameter88Value'], 'Parameter89.Name' => $options['parameter89Name'], 'Parameter89.Value' => $options['parameter89Value'], 'Parameter90.Name' => $options['parameter90Name'], 'Parameter90.Value' => $options['parameter90Value'], 'Parameter91.Name' => $options['parameter91Name'], 'Parameter91.Value' => $options['parameter91Value'], 'Parameter92.Name' => $options['parameter92Name'], 'Parameter92.Value' => $options['parameter92Value'], 'Parameter93.Name' => $options['parameter93Name'], 'Parameter93.Value' => $options['parameter93Value'], 'Parameter94.Name' => $options['parameter94Name'], 'Parameter94.Value' => $options['parameter94Value'], 'Parameter95.Name' => $options['parameter95Name'], 'Parameter95.Value' => $options['parameter95Value'], 'Parameter96.Name' => $options['parameter96Name'], 'Parameter96.Value' => $options['parameter96Value'], 'Parameter97.Name' => $options['parameter97Name'], 'Parameter97.Value' => $options['parameter97Value'], 'Parameter98.Name' => $options['parameter98Name'], 'Parameter98.Value' => $options['parameter98Value'], 'Parameter99.Name' => $options['parameter99Name'], 'Parameter99.Value' => $options['parameter99Value'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new StreamInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Constructs a StreamContext * * @param string $sid The SID of the Stream resource, or the `name` */ public function getContext(string $sid): StreamContext { return new StreamContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.StreamList]'; } }PKt[s7Twilio/Rest/Api/V2010/Account/Call/FeedbackInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'issues' => Values::array_get($payload, 'issues'), 'qualityScore' => Values::array_get($payload, 'quality_score'), 'sid' => Values::array_get($payload, 'sid'), ]; $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FeedbackContext Context for this FeedbackInstance */ protected function proxy(): FeedbackContext { if (!$this->context) { $this->context = new FeedbackContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'] ); } return $this->context; } /** * Fetch the FeedbackInstance * * @return FeedbackInstance Fetched FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FeedbackInstance { return $this->proxy()->fetch(); } /** * Create the FeedbackInstance * * @param int $qualityScore The call quality expressed as an integer from 1 to 5 * @param array|Options $options Optional Arguments * @return FeedbackInstance Created FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function create(int $qualityScore, array $options = []): FeedbackInstance { return $this->proxy()->create($qualityScore, $options); } /** * Update the FeedbackInstance * * @param array|Options $options Optional Arguments * @return FeedbackInstance Updated FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FeedbackInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.FeedbackInstance ' . \implode(' ', $context) . ']'; } }PKt[x 5Twilio/Rest/Api/V2010/Account/Call/PaymentContext.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Payments/' . \rawurlencode($sid) . '.json'; } /** * Update the PaymentInstance * * @param string $idempotencyKey A unique token that will be used to ensure * that multiple API calls with the same * information do not result in multiple * transactions. * @param string $statusCallback Provide an absolute or relative URL to receive * status updates regarding your Pay session. * @param array|Options $options Optional Arguments * @return PaymentInstance Updated PaymentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $idempotencyKey, string $statusCallback, array $options = []): PaymentInstance { $options = new Values($options); $data = Values::of([ 'IdempotencyKey' => $idempotencyKey, 'StatusCallback' => $statusCallback, 'Capture' => $options['capture'], 'Status' => $options['status'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new PaymentInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.PaymentContext ' . \implode(' ', $context) . ']'; } }PKt[P4Twilio/Rest/Api/V2010/Account/Call/EventInstance.phpnu[properties = [ 'request' => Values::array_get($payload, 'request'), 'response' => Values::array_get($payload, 'response'), ]; $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.EventInstance]'; } }PKt[K3Twilio/Rest/Api/V2010/Account/Call/FeedbackList.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; } /** * Constructs a FeedbackContext */ public function getContext(): FeedbackContext { return new FeedbackContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackList]'; } }PKt[#F0F0F5Twilio/Rest/Api/V2010/Account/Call/PaymentOptions.phpnu[ should wait for the * caller to press a digit between each subsequent digit, * after the first one, before moving on to validate the * digits captured. * @param string $tokenType Indicates whether the payment method should be * tokenized as a `one-time` or `reusable` token. * @param string $validCardTypes Credit card types separated by space that Pay * should accept. * @return CreatePaymentOptions Options builder */ public static function create(string $bankAccountType = Values::NONE, string $chargeAmount = Values::NONE, string $currency = Values::NONE, string $description = Values::NONE, string $input = Values::NONE, int $minPostalCodeLength = Values::NONE, array $parameter = Values::ARRAY_NONE, string $paymentConnector = Values::NONE, string $paymentMethod = Values::NONE, bool $postalCode = Values::NONE, bool $securityCode = Values::NONE, int $timeout = Values::NONE, string $tokenType = Values::NONE, string $validCardTypes = Values::NONE): CreatePaymentOptions { return new CreatePaymentOptions($bankAccountType, $chargeAmount, $currency, $description, $input, $minPostalCodeLength, $parameter, $paymentConnector, $paymentMethod, $postalCode, $securityCode, $timeout, $tokenType, $validCardTypes); } /** * @param string $capture The piece of payment information that you wish the * caller to enter. * @param string $status Indicates whether the current payment session should * be cancelled or completed. * @return UpdatePaymentOptions Options builder */ public static function update(string $capture = Values::NONE, string $status = Values::NONE): UpdatePaymentOptions { return new UpdatePaymentOptions($capture, $status); } } class CreatePaymentOptions extends Options { /** * @param string $bankAccountType Type of bank account if payment source is ACH. * @param string $chargeAmount A positive decimal value less than 1,000,000 to * charge against the credit card or bank account. * @param string $currency The currency of the `charge_amount`. * @param string $description The description can be used to provide more * details regarding the transaction. * @param string $input A list of inputs that should be accepted. Currently * only `dtmf` is supported. * @param int $minPostalCodeLength A positive integer that is used to validate * the length of the `PostalCode` inputted by * the user. * @param array $parameter A single-level JSON object used to pass custom * parameters to payment processors. (Required for ACH * payments) * @param string $paymentConnector This is the unique name corresponding to the * Pay Connector installed in the Twilio * Add-ons. * @param string $paymentMethod Type of payment being captured. * @param bool $postalCode Indicates whether the credit card PostalCode (zip * code) is a required piece of payment information * that must be provided by the caller. * @param bool $securityCode Indicates whether the credit card security code is * a required piece of payment information that must * be provided by the caller. * @param int $timeout The number of seconds that should wait for the * caller to press a digit between each subsequent digit, * after the first one, before moving on to validate the * digits captured. * @param string $tokenType Indicates whether the payment method should be * tokenized as a `one-time` or `reusable` token. * @param string $validCardTypes Credit card types separated by space that Pay * should accept. */ public function __construct(string $bankAccountType = Values::NONE, string $chargeAmount = Values::NONE, string $currency = Values::NONE, string $description = Values::NONE, string $input = Values::NONE, int $minPostalCodeLength = Values::NONE, array $parameter = Values::ARRAY_NONE, string $paymentConnector = Values::NONE, string $paymentMethod = Values::NONE, bool $postalCode = Values::NONE, bool $securityCode = Values::NONE, int $timeout = Values::NONE, string $tokenType = Values::NONE, string $validCardTypes = Values::NONE) { $this->options['bankAccountType'] = $bankAccountType; $this->options['chargeAmount'] = $chargeAmount; $this->options['currency'] = $currency; $this->options['description'] = $description; $this->options['input'] = $input; $this->options['minPostalCodeLength'] = $minPostalCodeLength; $this->options['parameter'] = $parameter; $this->options['paymentConnector'] = $paymentConnector; $this->options['paymentMethod'] = $paymentMethod; $this->options['postalCode'] = $postalCode; $this->options['securityCode'] = $securityCode; $this->options['timeout'] = $timeout; $this->options['tokenType'] = $tokenType; $this->options['validCardTypes'] = $validCardTypes; } /** * Type of bank account if payment source is ACH. One of `consumer-checking`, `consumer-savings`, or `commercial-checking`. The default value is `consumer-checking`. * * @param string $bankAccountType Type of bank account if payment source is ACH. * @return $this Fluent Builder */ public function setBankAccountType(string $bankAccountType): self { $this->options['bankAccountType'] = $bankAccountType; return $this; } /** * A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize. * * @param string $chargeAmount A positive decimal value less than 1,000,000 to * charge against the credit card or bank account. * @return $this Fluent Builder */ public function setChargeAmount(string $chargeAmount): self { $this->options['chargeAmount'] = $chargeAmount; return $this; } /** * The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Pay Connector are accepted. * * @param string $currency The currency of the `charge_amount`. * @return $this Fluent Builder */ public function setCurrency(string $currency): self { $this->options['currency'] = $currency; return $this; } /** * The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions. * * @param string $description The description can be used to provide more * details regarding the transaction. * @return $this Fluent Builder */ public function setDescription(string $description): self { $this->options['description'] = $description; return $this; } /** * A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs. * * @param string $input A list of inputs that should be accepted. Currently * only `dtmf` is supported. * @return $this Fluent Builder */ public function setInput(string $input): self { $this->options['input'] = $input; return $this; } /** * A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits. * * @param int $minPostalCodeLength A positive integer that is used to validate * the length of the `PostalCode` inputted by * the user. * @return $this Fluent Builder */ public function setMinPostalCodeLength(int $minPostalCodeLength): self { $this->options['minPostalCodeLength'] = $minPostalCodeLength; return $this; } /** * A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments). The information that has to be included here depends on the Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors). * * @param array $parameter A single-level JSON object used to pass custom * parameters to payment processors. (Required for ACH * payments) * @return $this Fluent Builder */ public function setParameter(array $parameter): self { $this->options['parameter'] = $parameter; return $this; } /** * This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`. * * @param string $paymentConnector This is the unique name corresponding to the * Pay Connector installed in the Twilio * Add-ons. * @return $this Fluent Builder */ public function setPaymentConnector(string $paymentConnector): self { $this->options['paymentConnector'] = $paymentConnector; return $this; } /** * Type of payment being captured. One of `credit-card` or `ach-debit`. The default value is `credit-card`. * * @param string $paymentMethod Type of payment being captured. * @return $this Fluent Builder */ public function setPaymentMethod(string $paymentMethod): self { $this->options['paymentMethod'] = $paymentMethod; return $this; } /** * Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`. * * @param bool $postalCode Indicates whether the credit card PostalCode (zip * code) is a required piece of payment information * that must be provided by the caller. * @return $this Fluent Builder */ public function setPostalCode(bool $postalCode): self { $this->options['postalCode'] = $postalCode; return $this; } /** * Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`. * * @param bool $securityCode Indicates whether the credit card security code is * a required piece of payment information that must * be provided by the caller. * @return $this Fluent Builder */ public function setSecurityCode(bool $securityCode): self { $this->options['securityCode'] = $securityCode; return $this; } /** * The number of seconds that should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`. * * @param int $timeout The number of seconds that should wait for the * caller to press a digit between each subsequent digit, * after the first one, before moving on to validate the * digits captured. * @return $this Fluent Builder */ public function setTimeout(int $timeout): self { $this->options['timeout'] = $timeout; return $this; } /** * Indicates whether the payment method should be tokenized as a `one-time` or `reusable` token. The default value is `reusable`. Do not enter a charge amount when tokenizing. If a charge amount is entered, the payment method will be charged and not tokenized. * * @param string $tokenType Indicates whether the payment method should be * tokenized as a `one-time` or `reusable` token. * @return $this Fluent Builder */ public function setTokenType(string $tokenType): self { $this->options['tokenType'] = $tokenType; return $this; } /** * Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` * * @param string $validCardTypes Credit card types separated by space that Pay * should accept. * @return $this Fluent Builder */ public function setValidCardTypes(string $validCardTypes): self { $this->options['validCardTypes'] = $validCardTypes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreatePaymentOptions ' . $options . ']'; } } class UpdatePaymentOptions extends Options { /** * @param string $capture The piece of payment information that you wish the * caller to enter. * @param string $status Indicates whether the current payment session should * be cancelled or completed. */ public function __construct(string $capture = Values::NONE, string $status = Values::NONE) { $this->options['capture'] = $capture; $this->options['status'] = $status; } /** * The piece of payment information that you wish the caller to enter. Must be one of `payment-card-number`, `expiration-date`, `security-code`, `postal-code`, `bank-routing-number`, or `bank-account-number`. * * @param string $capture The piece of payment information that you wish the * caller to enter. * @return $this Fluent Builder */ public function setCapture(string $capture): self { $this->options['capture'] = $capture; return $this; } /** * Indicates whether the current payment session should be cancelled or completed. When `cancel` the payment session is cancelled. When `complete`, Twilio sends the payment information to the selected Pay Connector for processing. * * @param string $status Indicates whether the current payment session should * be cancelled or completed. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdatePaymentOptions ' . $options . ']'; } }PKt[sBLTwilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionContext.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/UserDefinedMessageSubscriptions/' . \rawurlencode($sid) . '.json'; } /** * Delete the UserDefinedMessageSubscriptionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.UserDefinedMessageSubscriptionContext ' . \implode(' ', $context) . ']'; } }PKt[rX+ATwilio/Rest/Api/V2010/Account/Call/UserDefinedMessageInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), ]; $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UserDefinedMessageInstance]'; } }PKt[i<||=Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/FeedbackSummary/' . \rawurlencode($sid) . '.json'; } /** * Fetch the FeedbackSummaryInstance * * @return FeedbackSummaryInstance Fetched FeedbackSummaryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FeedbackSummaryInstance { $payload = $this->version->fetch('GET', $this->uri); return new FeedbackSummaryInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the FeedbackSummaryInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.FeedbackSummaryContext ' . \implode(' ', $context) . ']'; } }PKt[V  4Twilio/Rest/Api/V2010/Account/Call/StreamOptions.phpnu[options['name'] = $name; $this->options['track'] = $track; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['parameter1Name'] = $parameter1Name; $this->options['parameter1Value'] = $parameter1Value; $this->options['parameter2Name'] = $parameter2Name; $this->options['parameter2Value'] = $parameter2Value; $this->options['parameter3Name'] = $parameter3Name; $this->options['parameter3Value'] = $parameter3Value; $this->options['parameter4Name'] = $parameter4Name; $this->options['parameter4Value'] = $parameter4Value; $this->options['parameter5Name'] = $parameter5Name; $this->options['parameter5Value'] = $parameter5Value; $this->options['parameter6Name'] = $parameter6Name; $this->options['parameter6Value'] = $parameter6Value; $this->options['parameter7Name'] = $parameter7Name; $this->options['parameter7Value'] = $parameter7Value; $this->options['parameter8Name'] = $parameter8Name; $this->options['parameter8Value'] = $parameter8Value; $this->options['parameter9Name'] = $parameter9Name; $this->options['parameter9Value'] = $parameter9Value; $this->options['parameter10Name'] = $parameter10Name; $this->options['parameter10Value'] = $parameter10Value; $this->options['parameter11Name'] = $parameter11Name; $this->options['parameter11Value'] = $parameter11Value; $this->options['parameter12Name'] = $parameter12Name; $this->options['parameter12Value'] = $parameter12Value; $this->options['parameter13Name'] = $parameter13Name; $this->options['parameter13Value'] = $parameter13Value; $this->options['parameter14Name'] = $parameter14Name; $this->options['parameter14Value'] = $parameter14Value; $this->options['parameter15Name'] = $parameter15Name; $this->options['parameter15Value'] = $parameter15Value; $this->options['parameter16Name'] = $parameter16Name; $this->options['parameter16Value'] = $parameter16Value; $this->options['parameter17Name'] = $parameter17Name; $this->options['parameter17Value'] = $parameter17Value; $this->options['parameter18Name'] = $parameter18Name; $this->options['parameter18Value'] = $parameter18Value; $this->options['parameter19Name'] = $parameter19Name; $this->options['parameter19Value'] = $parameter19Value; $this->options['parameter20Name'] = $parameter20Name; $this->options['parameter20Value'] = $parameter20Value; $this->options['parameter21Name'] = $parameter21Name; $this->options['parameter21Value'] = $parameter21Value; $this->options['parameter22Name'] = $parameter22Name; $this->options['parameter22Value'] = $parameter22Value; $this->options['parameter23Name'] = $parameter23Name; $this->options['parameter23Value'] = $parameter23Value; $this->options['parameter24Name'] = $parameter24Name; $this->options['parameter24Value'] = $parameter24Value; $this->options['parameter25Name'] = $parameter25Name; $this->options['parameter25Value'] = $parameter25Value; $this->options['parameter26Name'] = $parameter26Name; $this->options['parameter26Value'] = $parameter26Value; $this->options['parameter27Name'] = $parameter27Name; $this->options['parameter27Value'] = $parameter27Value; $this->options['parameter28Name'] = $parameter28Name; $this->options['parameter28Value'] = $parameter28Value; $this->options['parameter29Name'] = $parameter29Name; $this->options['parameter29Value'] = $parameter29Value; $this->options['parameter30Name'] = $parameter30Name; $this->options['parameter30Value'] = $parameter30Value; $this->options['parameter31Name'] = $parameter31Name; $this->options['parameter31Value'] = $parameter31Value; $this->options['parameter32Name'] = $parameter32Name; $this->options['parameter32Value'] = $parameter32Value; $this->options['parameter33Name'] = $parameter33Name; $this->options['parameter33Value'] = $parameter33Value; $this->options['parameter34Name'] = $parameter34Name; $this->options['parameter34Value'] = $parameter34Value; $this->options['parameter35Name'] = $parameter35Name; $this->options['parameter35Value'] = $parameter35Value; $this->options['parameter36Name'] = $parameter36Name; $this->options['parameter36Value'] = $parameter36Value; $this->options['parameter37Name'] = $parameter37Name; $this->options['parameter37Value'] = $parameter37Value; $this->options['parameter38Name'] = $parameter38Name; $this->options['parameter38Value'] = $parameter38Value; $this->options['parameter39Name'] = $parameter39Name; $this->options['parameter39Value'] = $parameter39Value; $this->options['parameter40Name'] = $parameter40Name; $this->options['parameter40Value'] = $parameter40Value; $this->options['parameter41Name'] = $parameter41Name; $this->options['parameter41Value'] = $parameter41Value; $this->options['parameter42Name'] = $parameter42Name; $this->options['parameter42Value'] = $parameter42Value; $this->options['parameter43Name'] = $parameter43Name; $this->options['parameter43Value'] = $parameter43Value; $this->options['parameter44Name'] = $parameter44Name; $this->options['parameter44Value'] = $parameter44Value; $this->options['parameter45Name'] = $parameter45Name; $this->options['parameter45Value'] = $parameter45Value; $this->options['parameter46Name'] = $parameter46Name; $this->options['parameter46Value'] = $parameter46Value; $this->options['parameter47Name'] = $parameter47Name; $this->options['parameter47Value'] = $parameter47Value; $this->options['parameter48Name'] = $parameter48Name; $this->options['parameter48Value'] = $parameter48Value; $this->options['parameter49Name'] = $parameter49Name; $this->options['parameter49Value'] = $parameter49Value; $this->options['parameter50Name'] = $parameter50Name; $this->options['parameter50Value'] = $parameter50Value; $this->options['parameter51Name'] = $parameter51Name; $this->options['parameter51Value'] = $parameter51Value; $this->options['parameter52Name'] = $parameter52Name; $this->options['parameter52Value'] = $parameter52Value; $this->options['parameter53Name'] = $parameter53Name; $this->options['parameter53Value'] = $parameter53Value; $this->options['parameter54Name'] = $parameter54Name; $this->options['parameter54Value'] = $parameter54Value; $this->options['parameter55Name'] = $parameter55Name; $this->options['parameter55Value'] = $parameter55Value; $this->options['parameter56Name'] = $parameter56Name; $this->options['parameter56Value'] = $parameter56Value; $this->options['parameter57Name'] = $parameter57Name; $this->options['parameter57Value'] = $parameter57Value; $this->options['parameter58Name'] = $parameter58Name; $this->options['parameter58Value'] = $parameter58Value; $this->options['parameter59Name'] = $parameter59Name; $this->options['parameter59Value'] = $parameter59Value; $this->options['parameter60Name'] = $parameter60Name; $this->options['parameter60Value'] = $parameter60Value; $this->options['parameter61Name'] = $parameter61Name; $this->options['parameter61Value'] = $parameter61Value; $this->options['parameter62Name'] = $parameter62Name; $this->options['parameter62Value'] = $parameter62Value; $this->options['parameter63Name'] = $parameter63Name; $this->options['parameter63Value'] = $parameter63Value; $this->options['parameter64Name'] = $parameter64Name; $this->options['parameter64Value'] = $parameter64Value; $this->options['parameter65Name'] = $parameter65Name; $this->options['parameter65Value'] = $parameter65Value; $this->options['parameter66Name'] = $parameter66Name; $this->options['parameter66Value'] = $parameter66Value; $this->options['parameter67Name'] = $parameter67Name; $this->options['parameter67Value'] = $parameter67Value; $this->options['parameter68Name'] = $parameter68Name; $this->options['parameter68Value'] = $parameter68Value; $this->options['parameter69Name'] = $parameter69Name; $this->options['parameter69Value'] = $parameter69Value; $this->options['parameter70Name'] = $parameter70Name; $this->options['parameter70Value'] = $parameter70Value; $this->options['parameter71Name'] = $parameter71Name; $this->options['parameter71Value'] = $parameter71Value; $this->options['parameter72Name'] = $parameter72Name; $this->options['parameter72Value'] = $parameter72Value; $this->options['parameter73Name'] = $parameter73Name; $this->options['parameter73Value'] = $parameter73Value; $this->options['parameter74Name'] = $parameter74Name; $this->options['parameter74Value'] = $parameter74Value; $this->options['parameter75Name'] = $parameter75Name; $this->options['parameter75Value'] = $parameter75Value; $this->options['parameter76Name'] = $parameter76Name; $this->options['parameter76Value'] = $parameter76Value; $this->options['parameter77Name'] = $parameter77Name; $this->options['parameter77Value'] = $parameter77Value; $this->options['parameter78Name'] = $parameter78Name; $this->options['parameter78Value'] = $parameter78Value; $this->options['parameter79Name'] = $parameter79Name; $this->options['parameter79Value'] = $parameter79Value; $this->options['parameter80Name'] = $parameter80Name; $this->options['parameter80Value'] = $parameter80Value; $this->options['parameter81Name'] = $parameter81Name; $this->options['parameter81Value'] = $parameter81Value; $this->options['parameter82Name'] = $parameter82Name; $this->options['parameter82Value'] = $parameter82Value; $this->options['parameter83Name'] = $parameter83Name; $this->options['parameter83Value'] = $parameter83Value; $this->options['parameter84Name'] = $parameter84Name; $this->options['parameter84Value'] = $parameter84Value; $this->options['parameter85Name'] = $parameter85Name; $this->options['parameter85Value'] = $parameter85Value; $this->options['parameter86Name'] = $parameter86Name; $this->options['parameter86Value'] = $parameter86Value; $this->options['parameter87Name'] = $parameter87Name; $this->options['parameter87Value'] = $parameter87Value; $this->options['parameter88Name'] = $parameter88Name; $this->options['parameter88Value'] = $parameter88Value; $this->options['parameter89Name'] = $parameter89Name; $this->options['parameter89Value'] = $parameter89Value; $this->options['parameter90Name'] = $parameter90Name; $this->options['parameter90Value'] = $parameter90Value; $this->options['parameter91Name'] = $parameter91Name; $this->options['parameter91Value'] = $parameter91Value; $this->options['parameter92Name'] = $parameter92Name; $this->options['parameter92Value'] = $parameter92Value; $this->options['parameter93Name'] = $parameter93Name; $this->options['parameter93Value'] = $parameter93Value; $this->options['parameter94Name'] = $parameter94Name; $this->options['parameter94Value'] = $parameter94Value; $this->options['parameter95Name'] = $parameter95Name; $this->options['parameter95Value'] = $parameter95Value; $this->options['parameter96Name'] = $parameter96Name; $this->options['parameter96Value'] = $parameter96Value; $this->options['parameter97Name'] = $parameter97Name; $this->options['parameter97Value'] = $parameter97Value; $this->options['parameter98Name'] = $parameter98Name; $this->options['parameter98Value'] = $parameter98Value; $this->options['parameter99Name'] = $parameter99Name; $this->options['parameter99Value'] = $parameter99Value; } /** * The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream. * * @param string $name The name of this resource * @return $this Fluent Builder */ public function setName(string $name): self { $this->options['name'] = $name; return $this; } /** * One of `inbound_track`, `outbound_track`, `both_tracks`. * * @param string $track One of `inbound_track`, `outbound_track`, `both_tracks`. * @return $this Fluent Builder */ public function setTrack(string $track): self { $this->options['track'] = $track; return $this; } /** * Absolute URL of the status callback. * * @param string $statusCallback Absolute URL of the status callback. * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The http method for the status_callback (one of GET, POST). * * @param string $statusCallbackMethod The http method for the status_callback. * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Parameter name * * @param string $parameter1Name Parameter name * @return $this Fluent Builder */ public function setParameter1Name(string $parameter1Name): self { $this->options['parameter1Name'] = $parameter1Name; return $this; } /** * Parameter value * * @param string $parameter1Value Parameter value * @return $this Fluent Builder */ public function setParameter1Value(string $parameter1Value): self { $this->options['parameter1Value'] = $parameter1Value; return $this; } /** * Parameter name * * @param string $parameter2Name Parameter name * @return $this Fluent Builder */ public function setParameter2Name(string $parameter2Name): self { $this->options['parameter2Name'] = $parameter2Name; return $this; } /** * Parameter value * * @param string $parameter2Value Parameter value * @return $this Fluent Builder */ public function setParameter2Value(string $parameter2Value): self { $this->options['parameter2Value'] = $parameter2Value; return $this; } /** * Parameter name * * @param string $parameter3Name Parameter name * @return $this Fluent Builder */ public function setParameter3Name(string $parameter3Name): self { $this->options['parameter3Name'] = $parameter3Name; return $this; } /** * Parameter value * * @param string $parameter3Value Parameter value * @return $this Fluent Builder */ public function setParameter3Value(string $parameter3Value): self { $this->options['parameter3Value'] = $parameter3Value; return $this; } /** * Parameter name * * @param string $parameter4Name Parameter name * @return $this Fluent Builder */ public function setParameter4Name(string $parameter4Name): self { $this->options['parameter4Name'] = $parameter4Name; return $this; } /** * Parameter value * * @param string $parameter4Value Parameter value * @return $this Fluent Builder */ public function setParameter4Value(string $parameter4Value): self { $this->options['parameter4Value'] = $parameter4Value; return $this; } /** * Parameter name * * @param string $parameter5Name Parameter name * @return $this Fluent Builder */ public function setParameter5Name(string $parameter5Name): self { $this->options['parameter5Name'] = $parameter5Name; return $this; } /** * Parameter value * * @param string $parameter5Value Parameter value * @return $this Fluent Builder */ public function setParameter5Value(string $parameter5Value): self { $this->options['parameter5Value'] = $parameter5Value; return $this; } /** * Parameter name * * @param string $parameter6Name Parameter name * @return $this Fluent Builder */ public function setParameter6Name(string $parameter6Name): self { $this->options['parameter6Name'] = $parameter6Name; return $this; } /** * Parameter value * * @param string $parameter6Value Parameter value * @return $this Fluent Builder */ public function setParameter6Value(string $parameter6Value): self { $this->options['parameter6Value'] = $parameter6Value; return $this; } /** * Parameter name * * @param string $parameter7Name Parameter name * @return $this Fluent Builder */ public function setParameter7Name(string $parameter7Name): self { $this->options['parameter7Name'] = $parameter7Name; return $this; } /** * Parameter value * * @param string $parameter7Value Parameter value * @return $this Fluent Builder */ public function setParameter7Value(string $parameter7Value): self { $this->options['parameter7Value'] = $parameter7Value; return $this; } /** * Parameter name * * @param string $parameter8Name Parameter name * @return $this Fluent Builder */ public function setParameter8Name(string $parameter8Name): self { $this->options['parameter8Name'] = $parameter8Name; return $this; } /** * Parameter value * * @param string $parameter8Value Parameter value * @return $this Fluent Builder */ public function setParameter8Value(string $parameter8Value): self { $this->options['parameter8Value'] = $parameter8Value; return $this; } /** * Parameter name * * @param string $parameter9Name Parameter name * @return $this Fluent Builder */ public function setParameter9Name(string $parameter9Name): self { $this->options['parameter9Name'] = $parameter9Name; return $this; } /** * Parameter value * * @param string $parameter9Value Parameter value * @return $this Fluent Builder */ public function setParameter9Value(string $parameter9Value): self { $this->options['parameter9Value'] = $parameter9Value; return $this; } /** * Parameter name * * @param string $parameter10Name Parameter name * @return $this Fluent Builder */ public function setParameter10Name(string $parameter10Name): self { $this->options['parameter10Name'] = $parameter10Name; return $this; } /** * Parameter value * * @param string $parameter10Value Parameter value * @return $this Fluent Builder */ public function setParameter10Value(string $parameter10Value): self { $this->options['parameter10Value'] = $parameter10Value; return $this; } /** * Parameter name * * @param string $parameter11Name Parameter name * @return $this Fluent Builder */ public function setParameter11Name(string $parameter11Name): self { $this->options['parameter11Name'] = $parameter11Name; return $this; } /** * Parameter value * * @param string $parameter11Value Parameter value * @return $this Fluent Builder */ public function setParameter11Value(string $parameter11Value): self { $this->options['parameter11Value'] = $parameter11Value; return $this; } /** * Parameter name * * @param string $parameter12Name Parameter name * @return $this Fluent Builder */ public function setParameter12Name(string $parameter12Name): self { $this->options['parameter12Name'] = $parameter12Name; return $this; } /** * Parameter value * * @param string $parameter12Value Parameter value * @return $this Fluent Builder */ public function setParameter12Value(string $parameter12Value): self { $this->options['parameter12Value'] = $parameter12Value; return $this; } /** * Parameter name * * @param string $parameter13Name Parameter name * @return $this Fluent Builder */ public function setParameter13Name(string $parameter13Name): self { $this->options['parameter13Name'] = $parameter13Name; return $this; } /** * Parameter value * * @param string $parameter13Value Parameter value * @return $this Fluent Builder */ public function setParameter13Value(string $parameter13Value): self { $this->options['parameter13Value'] = $parameter13Value; return $this; } /** * Parameter name * * @param string $parameter14Name Parameter name * @return $this Fluent Builder */ public function setParameter14Name(string $parameter14Name): self { $this->options['parameter14Name'] = $parameter14Name; return $this; } /** * Parameter value * * @param string $parameter14Value Parameter value * @return $this Fluent Builder */ public function setParameter14Value(string $parameter14Value): self { $this->options['parameter14Value'] = $parameter14Value; return $this; } /** * Parameter name * * @param string $parameter15Name Parameter name * @return $this Fluent Builder */ public function setParameter15Name(string $parameter15Name): self { $this->options['parameter15Name'] = $parameter15Name; return $this; } /** * Parameter value * * @param string $parameter15Value Parameter value * @return $this Fluent Builder */ public function setParameter15Value(string $parameter15Value): self { $this->options['parameter15Value'] = $parameter15Value; return $this; } /** * Parameter name * * @param string $parameter16Name Parameter name * @return $this Fluent Builder */ public function setParameter16Name(string $parameter16Name): self { $this->options['parameter16Name'] = $parameter16Name; return $this; } /** * Parameter value * * @param string $parameter16Value Parameter value * @return $this Fluent Builder */ public function setParameter16Value(string $parameter16Value): self { $this->options['parameter16Value'] = $parameter16Value; return $this; } /** * Parameter name * * @param string $parameter17Name Parameter name * @return $this Fluent Builder */ public function setParameter17Name(string $parameter17Name): self { $this->options['parameter17Name'] = $parameter17Name; return $this; } /** * Parameter value * * @param string $parameter17Value Parameter value * @return $this Fluent Builder */ public function setParameter17Value(string $parameter17Value): self { $this->options['parameter17Value'] = $parameter17Value; return $this; } /** * Parameter name * * @param string $parameter18Name Parameter name * @return $this Fluent Builder */ public function setParameter18Name(string $parameter18Name): self { $this->options['parameter18Name'] = $parameter18Name; return $this; } /** * Parameter value * * @param string $parameter18Value Parameter value * @return $this Fluent Builder */ public function setParameter18Value(string $parameter18Value): self { $this->options['parameter18Value'] = $parameter18Value; return $this; } /** * Parameter name * * @param string $parameter19Name Parameter name * @return $this Fluent Builder */ public function setParameter19Name(string $parameter19Name): self { $this->options['parameter19Name'] = $parameter19Name; return $this; } /** * Parameter value * * @param string $parameter19Value Parameter value * @return $this Fluent Builder */ public function setParameter19Value(string $parameter19Value): self { $this->options['parameter19Value'] = $parameter19Value; return $this; } /** * Parameter name * * @param string $parameter20Name Parameter name * @return $this Fluent Builder */ public function setParameter20Name(string $parameter20Name): self { $this->options['parameter20Name'] = $parameter20Name; return $this; } /** * Parameter value * * @param string $parameter20Value Parameter value * @return $this Fluent Builder */ public function setParameter20Value(string $parameter20Value): self { $this->options['parameter20Value'] = $parameter20Value; return $this; } /** * Parameter name * * @param string $parameter21Name Parameter name * @return $this Fluent Builder */ public function setParameter21Name(string $parameter21Name): self { $this->options['parameter21Name'] = $parameter21Name; return $this; } /** * Parameter value * * @param string $parameter21Value Parameter value * @return $this Fluent Builder */ public function setParameter21Value(string $parameter21Value): self { $this->options['parameter21Value'] = $parameter21Value; return $this; } /** * Parameter name * * @param string $parameter22Name Parameter name * @return $this Fluent Builder */ public function setParameter22Name(string $parameter22Name): self { $this->options['parameter22Name'] = $parameter22Name; return $this; } /** * Parameter value * * @param string $parameter22Value Parameter value * @return $this Fluent Builder */ public function setParameter22Value(string $parameter22Value): self { $this->options['parameter22Value'] = $parameter22Value; return $this; } /** * Parameter name * * @param string $parameter23Name Parameter name * @return $this Fluent Builder */ public function setParameter23Name(string $parameter23Name): self { $this->options['parameter23Name'] = $parameter23Name; return $this; } /** * Parameter value * * @param string $parameter23Value Parameter value * @return $this Fluent Builder */ public function setParameter23Value(string $parameter23Value): self { $this->options['parameter23Value'] = $parameter23Value; return $this; } /** * Parameter name * * @param string $parameter24Name Parameter name * @return $this Fluent Builder */ public function setParameter24Name(string $parameter24Name): self { $this->options['parameter24Name'] = $parameter24Name; return $this; } /** * Parameter value * * @param string $parameter24Value Parameter value * @return $this Fluent Builder */ public function setParameter24Value(string $parameter24Value): self { $this->options['parameter24Value'] = $parameter24Value; return $this; } /** * Parameter name * * @param string $parameter25Name Parameter name * @return $this Fluent Builder */ public function setParameter25Name(string $parameter25Name): self { $this->options['parameter25Name'] = $parameter25Name; return $this; } /** * Parameter value * * @param string $parameter25Value Parameter value * @return $this Fluent Builder */ public function setParameter25Value(string $parameter25Value): self { $this->options['parameter25Value'] = $parameter25Value; return $this; } /** * Parameter name * * @param string $parameter26Name Parameter name * @return $this Fluent Builder */ public function setParameter26Name(string $parameter26Name): self { $this->options['parameter26Name'] = $parameter26Name; return $this; } /** * Parameter value * * @param string $parameter26Value Parameter value * @return $this Fluent Builder */ public function setParameter26Value(string $parameter26Value): self { $this->options['parameter26Value'] = $parameter26Value; return $this; } /** * Parameter name * * @param string $parameter27Name Parameter name * @return $this Fluent Builder */ public function setParameter27Name(string $parameter27Name): self { $this->options['parameter27Name'] = $parameter27Name; return $this; } /** * Parameter value * * @param string $parameter27Value Parameter value * @return $this Fluent Builder */ public function setParameter27Value(string $parameter27Value): self { $this->options['parameter27Value'] = $parameter27Value; return $this; } /** * Parameter name * * @param string $parameter28Name Parameter name * @return $this Fluent Builder */ public function setParameter28Name(string $parameter28Name): self { $this->options['parameter28Name'] = $parameter28Name; return $this; } /** * Parameter value * * @param string $parameter28Value Parameter value * @return $this Fluent Builder */ public function setParameter28Value(string $parameter28Value): self { $this->options['parameter28Value'] = $parameter28Value; return $this; } /** * Parameter name * * @param string $parameter29Name Parameter name * @return $this Fluent Builder */ public function setParameter29Name(string $parameter29Name): self { $this->options['parameter29Name'] = $parameter29Name; return $this; } /** * Parameter value * * @param string $parameter29Value Parameter value * @return $this Fluent Builder */ public function setParameter29Value(string $parameter29Value): self { $this->options['parameter29Value'] = $parameter29Value; return $this; } /** * Parameter name * * @param string $parameter30Name Parameter name * @return $this Fluent Builder */ public function setParameter30Name(string $parameter30Name): self { $this->options['parameter30Name'] = $parameter30Name; return $this; } /** * Parameter value * * @param string $parameter30Value Parameter value * @return $this Fluent Builder */ public function setParameter30Value(string $parameter30Value): self { $this->options['parameter30Value'] = $parameter30Value; return $this; } /** * Parameter name * * @param string $parameter31Name Parameter name * @return $this Fluent Builder */ public function setParameter31Name(string $parameter31Name): self { $this->options['parameter31Name'] = $parameter31Name; return $this; } /** * Parameter value * * @param string $parameter31Value Parameter value * @return $this Fluent Builder */ public function setParameter31Value(string $parameter31Value): self { $this->options['parameter31Value'] = $parameter31Value; return $this; } /** * Parameter name * * @param string $parameter32Name Parameter name * @return $this Fluent Builder */ public function setParameter32Name(string $parameter32Name): self { $this->options['parameter32Name'] = $parameter32Name; return $this; } /** * Parameter value * * @param string $parameter32Value Parameter value * @return $this Fluent Builder */ public function setParameter32Value(string $parameter32Value): self { $this->options['parameter32Value'] = $parameter32Value; return $this; } /** * Parameter name * * @param string $parameter33Name Parameter name * @return $this Fluent Builder */ public function setParameter33Name(string $parameter33Name): self { $this->options['parameter33Name'] = $parameter33Name; return $this; } /** * Parameter value * * @param string $parameter33Value Parameter value * @return $this Fluent Builder */ public function setParameter33Value(string $parameter33Value): self { $this->options['parameter33Value'] = $parameter33Value; return $this; } /** * Parameter name * * @param string $parameter34Name Parameter name * @return $this Fluent Builder */ public function setParameter34Name(string $parameter34Name): self { $this->options['parameter34Name'] = $parameter34Name; return $this; } /** * Parameter value * * @param string $parameter34Value Parameter value * @return $this Fluent Builder */ public function setParameter34Value(string $parameter34Value): self { $this->options['parameter34Value'] = $parameter34Value; return $this; } /** * Parameter name * * @param string $parameter35Name Parameter name * @return $this Fluent Builder */ public function setParameter35Name(string $parameter35Name): self { $this->options['parameter35Name'] = $parameter35Name; return $this; } /** * Parameter value * * @param string $parameter35Value Parameter value * @return $this Fluent Builder */ public function setParameter35Value(string $parameter35Value): self { $this->options['parameter35Value'] = $parameter35Value; return $this; } /** * Parameter name * * @param string $parameter36Name Parameter name * @return $this Fluent Builder */ public function setParameter36Name(string $parameter36Name): self { $this->options['parameter36Name'] = $parameter36Name; return $this; } /** * Parameter value * * @param string $parameter36Value Parameter value * @return $this Fluent Builder */ public function setParameter36Value(string $parameter36Value): self { $this->options['parameter36Value'] = $parameter36Value; return $this; } /** * Parameter name * * @param string $parameter37Name Parameter name * @return $this Fluent Builder */ public function setParameter37Name(string $parameter37Name): self { $this->options['parameter37Name'] = $parameter37Name; return $this; } /** * Parameter value * * @param string $parameter37Value Parameter value * @return $this Fluent Builder */ public function setParameter37Value(string $parameter37Value): self { $this->options['parameter37Value'] = $parameter37Value; return $this; } /** * Parameter name * * @param string $parameter38Name Parameter name * @return $this Fluent Builder */ public function setParameter38Name(string $parameter38Name): self { $this->options['parameter38Name'] = $parameter38Name; return $this; } /** * Parameter value * * @param string $parameter38Value Parameter value * @return $this Fluent Builder */ public function setParameter38Value(string $parameter38Value): self { $this->options['parameter38Value'] = $parameter38Value; return $this; } /** * Parameter name * * @param string $parameter39Name Parameter name * @return $this Fluent Builder */ public function setParameter39Name(string $parameter39Name): self { $this->options['parameter39Name'] = $parameter39Name; return $this; } /** * Parameter value * * @param string $parameter39Value Parameter value * @return $this Fluent Builder */ public function setParameter39Value(string $parameter39Value): self { $this->options['parameter39Value'] = $parameter39Value; return $this; } /** * Parameter name * * @param string $parameter40Name Parameter name * @return $this Fluent Builder */ public function setParameter40Name(string $parameter40Name): self { $this->options['parameter40Name'] = $parameter40Name; return $this; } /** * Parameter value * * @param string $parameter40Value Parameter value * @return $this Fluent Builder */ public function setParameter40Value(string $parameter40Value): self { $this->options['parameter40Value'] = $parameter40Value; return $this; } /** * Parameter name * * @param string $parameter41Name Parameter name * @return $this Fluent Builder */ public function setParameter41Name(string $parameter41Name): self { $this->options['parameter41Name'] = $parameter41Name; return $this; } /** * Parameter value * * @param string $parameter41Value Parameter value * @return $this Fluent Builder */ public function setParameter41Value(string $parameter41Value): self { $this->options['parameter41Value'] = $parameter41Value; return $this; } /** * Parameter name * * @param string $parameter42Name Parameter name * @return $this Fluent Builder */ public function setParameter42Name(string $parameter42Name): self { $this->options['parameter42Name'] = $parameter42Name; return $this; } /** * Parameter value * * @param string $parameter42Value Parameter value * @return $this Fluent Builder */ public function setParameter42Value(string $parameter42Value): self { $this->options['parameter42Value'] = $parameter42Value; return $this; } /** * Parameter name * * @param string $parameter43Name Parameter name * @return $this Fluent Builder */ public function setParameter43Name(string $parameter43Name): self { $this->options['parameter43Name'] = $parameter43Name; return $this; } /** * Parameter value * * @param string $parameter43Value Parameter value * @return $this Fluent Builder */ public function setParameter43Value(string $parameter43Value): self { $this->options['parameter43Value'] = $parameter43Value; return $this; } /** * Parameter name * * @param string $parameter44Name Parameter name * @return $this Fluent Builder */ public function setParameter44Name(string $parameter44Name): self { $this->options['parameter44Name'] = $parameter44Name; return $this; } /** * Parameter value * * @param string $parameter44Value Parameter value * @return $this Fluent Builder */ public function setParameter44Value(string $parameter44Value): self { $this->options['parameter44Value'] = $parameter44Value; return $this; } /** * Parameter name * * @param string $parameter45Name Parameter name * @return $this Fluent Builder */ public function setParameter45Name(string $parameter45Name): self { $this->options['parameter45Name'] = $parameter45Name; return $this; } /** * Parameter value * * @param string $parameter45Value Parameter value * @return $this Fluent Builder */ public function setParameter45Value(string $parameter45Value): self { $this->options['parameter45Value'] = $parameter45Value; return $this; } /** * Parameter name * * @param string $parameter46Name Parameter name * @return $this Fluent Builder */ public function setParameter46Name(string $parameter46Name): self { $this->options['parameter46Name'] = $parameter46Name; return $this; } /** * Parameter value * * @param string $parameter46Value Parameter value * @return $this Fluent Builder */ public function setParameter46Value(string $parameter46Value): self { $this->options['parameter46Value'] = $parameter46Value; return $this; } /** * Parameter name * * @param string $parameter47Name Parameter name * @return $this Fluent Builder */ public function setParameter47Name(string $parameter47Name): self { $this->options['parameter47Name'] = $parameter47Name; return $this; } /** * Parameter value * * @param string $parameter47Value Parameter value * @return $this Fluent Builder */ public function setParameter47Value(string $parameter47Value): self { $this->options['parameter47Value'] = $parameter47Value; return $this; } /** * Parameter name * * @param string $parameter48Name Parameter name * @return $this Fluent Builder */ public function setParameter48Name(string $parameter48Name): self { $this->options['parameter48Name'] = $parameter48Name; return $this; } /** * Parameter value * * @param string $parameter48Value Parameter value * @return $this Fluent Builder */ public function setParameter48Value(string $parameter48Value): self { $this->options['parameter48Value'] = $parameter48Value; return $this; } /** * Parameter name * * @param string $parameter49Name Parameter name * @return $this Fluent Builder */ public function setParameter49Name(string $parameter49Name): self { $this->options['parameter49Name'] = $parameter49Name; return $this; } /** * Parameter value * * @param string $parameter49Value Parameter value * @return $this Fluent Builder */ public function setParameter49Value(string $parameter49Value): self { $this->options['parameter49Value'] = $parameter49Value; return $this; } /** * Parameter name * * @param string $parameter50Name Parameter name * @return $this Fluent Builder */ public function setParameter50Name(string $parameter50Name): self { $this->options['parameter50Name'] = $parameter50Name; return $this; } /** * Parameter value * * @param string $parameter50Value Parameter value * @return $this Fluent Builder */ public function setParameter50Value(string $parameter50Value): self { $this->options['parameter50Value'] = $parameter50Value; return $this; } /** * Parameter name * * @param string $parameter51Name Parameter name * @return $this Fluent Builder */ public function setParameter51Name(string $parameter51Name): self { $this->options['parameter51Name'] = $parameter51Name; return $this; } /** * Parameter value * * @param string $parameter51Value Parameter value * @return $this Fluent Builder */ public function setParameter51Value(string $parameter51Value): self { $this->options['parameter51Value'] = $parameter51Value; return $this; } /** * Parameter name * * @param string $parameter52Name Parameter name * @return $this Fluent Builder */ public function setParameter52Name(string $parameter52Name): self { $this->options['parameter52Name'] = $parameter52Name; return $this; } /** * Parameter value * * @param string $parameter52Value Parameter value * @return $this Fluent Builder */ public function setParameter52Value(string $parameter52Value): self { $this->options['parameter52Value'] = $parameter52Value; return $this; } /** * Parameter name * * @param string $parameter53Name Parameter name * @return $this Fluent Builder */ public function setParameter53Name(string $parameter53Name): self { $this->options['parameter53Name'] = $parameter53Name; return $this; } /** * Parameter value * * @param string $parameter53Value Parameter value * @return $this Fluent Builder */ public function setParameter53Value(string $parameter53Value): self { $this->options['parameter53Value'] = $parameter53Value; return $this; } /** * Parameter name * * @param string $parameter54Name Parameter name * @return $this Fluent Builder */ public function setParameter54Name(string $parameter54Name): self { $this->options['parameter54Name'] = $parameter54Name; return $this; } /** * Parameter value * * @param string $parameter54Value Parameter value * @return $this Fluent Builder */ public function setParameter54Value(string $parameter54Value): self { $this->options['parameter54Value'] = $parameter54Value; return $this; } /** * Parameter name * * @param string $parameter55Name Parameter name * @return $this Fluent Builder */ public function setParameter55Name(string $parameter55Name): self { $this->options['parameter55Name'] = $parameter55Name; return $this; } /** * Parameter value * * @param string $parameter55Value Parameter value * @return $this Fluent Builder */ public function setParameter55Value(string $parameter55Value): self { $this->options['parameter55Value'] = $parameter55Value; return $this; } /** * Parameter name * * @param string $parameter56Name Parameter name * @return $this Fluent Builder */ public function setParameter56Name(string $parameter56Name): self { $this->options['parameter56Name'] = $parameter56Name; return $this; } /** * Parameter value * * @param string $parameter56Value Parameter value * @return $this Fluent Builder */ public function setParameter56Value(string $parameter56Value): self { $this->options['parameter56Value'] = $parameter56Value; return $this; } /** * Parameter name * * @param string $parameter57Name Parameter name * @return $this Fluent Builder */ public function setParameter57Name(string $parameter57Name): self { $this->options['parameter57Name'] = $parameter57Name; return $this; } /** * Parameter value * * @param string $parameter57Value Parameter value * @return $this Fluent Builder */ public function setParameter57Value(string $parameter57Value): self { $this->options['parameter57Value'] = $parameter57Value; return $this; } /** * Parameter name * * @param string $parameter58Name Parameter name * @return $this Fluent Builder */ public function setParameter58Name(string $parameter58Name): self { $this->options['parameter58Name'] = $parameter58Name; return $this; } /** * Parameter value * * @param string $parameter58Value Parameter value * @return $this Fluent Builder */ public function setParameter58Value(string $parameter58Value): self { $this->options['parameter58Value'] = $parameter58Value; return $this; } /** * Parameter name * * @param string $parameter59Name Parameter name * @return $this Fluent Builder */ public function setParameter59Name(string $parameter59Name): self { $this->options['parameter59Name'] = $parameter59Name; return $this; } /** * Parameter value * * @param string $parameter59Value Parameter value * @return $this Fluent Builder */ public function setParameter59Value(string $parameter59Value): self { $this->options['parameter59Value'] = $parameter59Value; return $this; } /** * Parameter name * * @param string $parameter60Name Parameter name * @return $this Fluent Builder */ public function setParameter60Name(string $parameter60Name): self { $this->options['parameter60Name'] = $parameter60Name; return $this; } /** * Parameter value * * @param string $parameter60Value Parameter value * @return $this Fluent Builder */ public function setParameter60Value(string $parameter60Value): self { $this->options['parameter60Value'] = $parameter60Value; return $this; } /** * Parameter name * * @param string $parameter61Name Parameter name * @return $this Fluent Builder */ public function setParameter61Name(string $parameter61Name): self { $this->options['parameter61Name'] = $parameter61Name; return $this; } /** * Parameter value * * @param string $parameter61Value Parameter value * @return $this Fluent Builder */ public function setParameter61Value(string $parameter61Value): self { $this->options['parameter61Value'] = $parameter61Value; return $this; } /** * Parameter name * * @param string $parameter62Name Parameter name * @return $this Fluent Builder */ public function setParameter62Name(string $parameter62Name): self { $this->options['parameter62Name'] = $parameter62Name; return $this; } /** * Parameter value * * @param string $parameter62Value Parameter value * @return $this Fluent Builder */ public function setParameter62Value(string $parameter62Value): self { $this->options['parameter62Value'] = $parameter62Value; return $this; } /** * Parameter name * * @param string $parameter63Name Parameter name * @return $this Fluent Builder */ public function setParameter63Name(string $parameter63Name): self { $this->options['parameter63Name'] = $parameter63Name; return $this; } /** * Parameter value * * @param string $parameter63Value Parameter value * @return $this Fluent Builder */ public function setParameter63Value(string $parameter63Value): self { $this->options['parameter63Value'] = $parameter63Value; return $this; } /** * Parameter name * * @param string $parameter64Name Parameter name * @return $this Fluent Builder */ public function setParameter64Name(string $parameter64Name): self { $this->options['parameter64Name'] = $parameter64Name; return $this; } /** * Parameter value * * @param string $parameter64Value Parameter value * @return $this Fluent Builder */ public function setParameter64Value(string $parameter64Value): self { $this->options['parameter64Value'] = $parameter64Value; return $this; } /** * Parameter name * * @param string $parameter65Name Parameter name * @return $this Fluent Builder */ public function setParameter65Name(string $parameter65Name): self { $this->options['parameter65Name'] = $parameter65Name; return $this; } /** * Parameter value * * @param string $parameter65Value Parameter value * @return $this Fluent Builder */ public function setParameter65Value(string $parameter65Value): self { $this->options['parameter65Value'] = $parameter65Value; return $this; } /** * Parameter name * * @param string $parameter66Name Parameter name * @return $this Fluent Builder */ public function setParameter66Name(string $parameter66Name): self { $this->options['parameter66Name'] = $parameter66Name; return $this; } /** * Parameter value * * @param string $parameter66Value Parameter value * @return $this Fluent Builder */ public function setParameter66Value(string $parameter66Value): self { $this->options['parameter66Value'] = $parameter66Value; return $this; } /** * Parameter name * * @param string $parameter67Name Parameter name * @return $this Fluent Builder */ public function setParameter67Name(string $parameter67Name): self { $this->options['parameter67Name'] = $parameter67Name; return $this; } /** * Parameter value * * @param string $parameter67Value Parameter value * @return $this Fluent Builder */ public function setParameter67Value(string $parameter67Value): self { $this->options['parameter67Value'] = $parameter67Value; return $this; } /** * Parameter name * * @param string $parameter68Name Parameter name * @return $this Fluent Builder */ public function setParameter68Name(string $parameter68Name): self { $this->options['parameter68Name'] = $parameter68Name; return $this; } /** * Parameter value * * @param string $parameter68Value Parameter value * @return $this Fluent Builder */ public function setParameter68Value(string $parameter68Value): self { $this->options['parameter68Value'] = $parameter68Value; return $this; } /** * Parameter name * * @param string $parameter69Name Parameter name * @return $this Fluent Builder */ public function setParameter69Name(string $parameter69Name): self { $this->options['parameter69Name'] = $parameter69Name; return $this; } /** * Parameter value * * @param string $parameter69Value Parameter value * @return $this Fluent Builder */ public function setParameter69Value(string $parameter69Value): self { $this->options['parameter69Value'] = $parameter69Value; return $this; } /** * Parameter name * * @param string $parameter70Name Parameter name * @return $this Fluent Builder */ public function setParameter70Name(string $parameter70Name): self { $this->options['parameter70Name'] = $parameter70Name; return $this; } /** * Parameter value * * @param string $parameter70Value Parameter value * @return $this Fluent Builder */ public function setParameter70Value(string $parameter70Value): self { $this->options['parameter70Value'] = $parameter70Value; return $this; } /** * Parameter name * * @param string $parameter71Name Parameter name * @return $this Fluent Builder */ public function setParameter71Name(string $parameter71Name): self { $this->options['parameter71Name'] = $parameter71Name; return $this; } /** * Parameter value * * @param string $parameter71Value Parameter value * @return $this Fluent Builder */ public function setParameter71Value(string $parameter71Value): self { $this->options['parameter71Value'] = $parameter71Value; return $this; } /** * Parameter name * * @param string $parameter72Name Parameter name * @return $this Fluent Builder */ public function setParameter72Name(string $parameter72Name): self { $this->options['parameter72Name'] = $parameter72Name; return $this; } /** * Parameter value * * @param string $parameter72Value Parameter value * @return $this Fluent Builder */ public function setParameter72Value(string $parameter72Value): self { $this->options['parameter72Value'] = $parameter72Value; return $this; } /** * Parameter name * * @param string $parameter73Name Parameter name * @return $this Fluent Builder */ public function setParameter73Name(string $parameter73Name): self { $this->options['parameter73Name'] = $parameter73Name; return $this; } /** * Parameter value * * @param string $parameter73Value Parameter value * @return $this Fluent Builder */ public function setParameter73Value(string $parameter73Value): self { $this->options['parameter73Value'] = $parameter73Value; return $this; } /** * Parameter name * * @param string $parameter74Name Parameter name * @return $this Fluent Builder */ public function setParameter74Name(string $parameter74Name): self { $this->options['parameter74Name'] = $parameter74Name; return $this; } /** * Parameter value * * @param string $parameter74Value Parameter value * @return $this Fluent Builder */ public function setParameter74Value(string $parameter74Value): self { $this->options['parameter74Value'] = $parameter74Value; return $this; } /** * Parameter name * * @param string $parameter75Name Parameter name * @return $this Fluent Builder */ public function setParameter75Name(string $parameter75Name): self { $this->options['parameter75Name'] = $parameter75Name; return $this; } /** * Parameter value * * @param string $parameter75Value Parameter value * @return $this Fluent Builder */ public function setParameter75Value(string $parameter75Value): self { $this->options['parameter75Value'] = $parameter75Value; return $this; } /** * Parameter name * * @param string $parameter76Name Parameter name * @return $this Fluent Builder */ public function setParameter76Name(string $parameter76Name): self { $this->options['parameter76Name'] = $parameter76Name; return $this; } /** * Parameter value * * @param string $parameter76Value Parameter value * @return $this Fluent Builder */ public function setParameter76Value(string $parameter76Value): self { $this->options['parameter76Value'] = $parameter76Value; return $this; } /** * Parameter name * * @param string $parameter77Name Parameter name * @return $this Fluent Builder */ public function setParameter77Name(string $parameter77Name): self { $this->options['parameter77Name'] = $parameter77Name; return $this; } /** * Parameter value * * @param string $parameter77Value Parameter value * @return $this Fluent Builder */ public function setParameter77Value(string $parameter77Value): self { $this->options['parameter77Value'] = $parameter77Value; return $this; } /** * Parameter name * * @param string $parameter78Name Parameter name * @return $this Fluent Builder */ public function setParameter78Name(string $parameter78Name): self { $this->options['parameter78Name'] = $parameter78Name; return $this; } /** * Parameter value * * @param string $parameter78Value Parameter value * @return $this Fluent Builder */ public function setParameter78Value(string $parameter78Value): self { $this->options['parameter78Value'] = $parameter78Value; return $this; } /** * Parameter name * * @param string $parameter79Name Parameter name * @return $this Fluent Builder */ public function setParameter79Name(string $parameter79Name): self { $this->options['parameter79Name'] = $parameter79Name; return $this; } /** * Parameter value * * @param string $parameter79Value Parameter value * @return $this Fluent Builder */ public function setParameter79Value(string $parameter79Value): self { $this->options['parameter79Value'] = $parameter79Value; return $this; } /** * Parameter name * * @param string $parameter80Name Parameter name * @return $this Fluent Builder */ public function setParameter80Name(string $parameter80Name): self { $this->options['parameter80Name'] = $parameter80Name; return $this; } /** * Parameter value * * @param string $parameter80Value Parameter value * @return $this Fluent Builder */ public function setParameter80Value(string $parameter80Value): self { $this->options['parameter80Value'] = $parameter80Value; return $this; } /** * Parameter name * * @param string $parameter81Name Parameter name * @return $this Fluent Builder */ public function setParameter81Name(string $parameter81Name): self { $this->options['parameter81Name'] = $parameter81Name; return $this; } /** * Parameter value * * @param string $parameter81Value Parameter value * @return $this Fluent Builder */ public function setParameter81Value(string $parameter81Value): self { $this->options['parameter81Value'] = $parameter81Value; return $this; } /** * Parameter name * * @param string $parameter82Name Parameter name * @return $this Fluent Builder */ public function setParameter82Name(string $parameter82Name): self { $this->options['parameter82Name'] = $parameter82Name; return $this; } /** * Parameter value * * @param string $parameter82Value Parameter value * @return $this Fluent Builder */ public function setParameter82Value(string $parameter82Value): self { $this->options['parameter82Value'] = $parameter82Value; return $this; } /** * Parameter name * * @param string $parameter83Name Parameter name * @return $this Fluent Builder */ public function setParameter83Name(string $parameter83Name): self { $this->options['parameter83Name'] = $parameter83Name; return $this; } /** * Parameter value * * @param string $parameter83Value Parameter value * @return $this Fluent Builder */ public function setParameter83Value(string $parameter83Value): self { $this->options['parameter83Value'] = $parameter83Value; return $this; } /** * Parameter name * * @param string $parameter84Name Parameter name * @return $this Fluent Builder */ public function setParameter84Name(string $parameter84Name): self { $this->options['parameter84Name'] = $parameter84Name; return $this; } /** * Parameter value * * @param string $parameter84Value Parameter value * @return $this Fluent Builder */ public function setParameter84Value(string $parameter84Value): self { $this->options['parameter84Value'] = $parameter84Value; return $this; } /** * Parameter name * * @param string $parameter85Name Parameter name * @return $this Fluent Builder */ public function setParameter85Name(string $parameter85Name): self { $this->options['parameter85Name'] = $parameter85Name; return $this; } /** * Parameter value * * @param string $parameter85Value Parameter value * @return $this Fluent Builder */ public function setParameter85Value(string $parameter85Value): self { $this->options['parameter85Value'] = $parameter85Value; return $this; } /** * Parameter name * * @param string $parameter86Name Parameter name * @return $this Fluent Builder */ public function setParameter86Name(string $parameter86Name): self { $this->options['parameter86Name'] = $parameter86Name; return $this; } /** * Parameter value * * @param string $parameter86Value Parameter value * @return $this Fluent Builder */ public function setParameter86Value(string $parameter86Value): self { $this->options['parameter86Value'] = $parameter86Value; return $this; } /** * Parameter name * * @param string $parameter87Name Parameter name * @return $this Fluent Builder */ public function setParameter87Name(string $parameter87Name): self { $this->options['parameter87Name'] = $parameter87Name; return $this; } /** * Parameter value * * @param string $parameter87Value Parameter value * @return $this Fluent Builder */ public function setParameter87Value(string $parameter87Value): self { $this->options['parameter87Value'] = $parameter87Value; return $this; } /** * Parameter name * * @param string $parameter88Name Parameter name * @return $this Fluent Builder */ public function setParameter88Name(string $parameter88Name): self { $this->options['parameter88Name'] = $parameter88Name; return $this; } /** * Parameter value * * @param string $parameter88Value Parameter value * @return $this Fluent Builder */ public function setParameter88Value(string $parameter88Value): self { $this->options['parameter88Value'] = $parameter88Value; return $this; } /** * Parameter name * * @param string $parameter89Name Parameter name * @return $this Fluent Builder */ public function setParameter89Name(string $parameter89Name): self { $this->options['parameter89Name'] = $parameter89Name; return $this; } /** * Parameter value * * @param string $parameter89Value Parameter value * @return $this Fluent Builder */ public function setParameter89Value(string $parameter89Value): self { $this->options['parameter89Value'] = $parameter89Value; return $this; } /** * Parameter name * * @param string $parameter90Name Parameter name * @return $this Fluent Builder */ public function setParameter90Name(string $parameter90Name): self { $this->options['parameter90Name'] = $parameter90Name; return $this; } /** * Parameter value * * @param string $parameter90Value Parameter value * @return $this Fluent Builder */ public function setParameter90Value(string $parameter90Value): self { $this->options['parameter90Value'] = $parameter90Value; return $this; } /** * Parameter name * * @param string $parameter91Name Parameter name * @return $this Fluent Builder */ public function setParameter91Name(string $parameter91Name): self { $this->options['parameter91Name'] = $parameter91Name; return $this; } /** * Parameter value * * @param string $parameter91Value Parameter value * @return $this Fluent Builder */ public function setParameter91Value(string $parameter91Value): self { $this->options['parameter91Value'] = $parameter91Value; return $this; } /** * Parameter name * * @param string $parameter92Name Parameter name * @return $this Fluent Builder */ public function setParameter92Name(string $parameter92Name): self { $this->options['parameter92Name'] = $parameter92Name; return $this; } /** * Parameter value * * @param string $parameter92Value Parameter value * @return $this Fluent Builder */ public function setParameter92Value(string $parameter92Value): self { $this->options['parameter92Value'] = $parameter92Value; return $this; } /** * Parameter name * * @param string $parameter93Name Parameter name * @return $this Fluent Builder */ public function setParameter93Name(string $parameter93Name): self { $this->options['parameter93Name'] = $parameter93Name; return $this; } /** * Parameter value * * @param string $parameter93Value Parameter value * @return $this Fluent Builder */ public function setParameter93Value(string $parameter93Value): self { $this->options['parameter93Value'] = $parameter93Value; return $this; } /** * Parameter name * * @param string $parameter94Name Parameter name * @return $this Fluent Builder */ public function setParameter94Name(string $parameter94Name): self { $this->options['parameter94Name'] = $parameter94Name; return $this; } /** * Parameter value * * @param string $parameter94Value Parameter value * @return $this Fluent Builder */ public function setParameter94Value(string $parameter94Value): self { $this->options['parameter94Value'] = $parameter94Value; return $this; } /** * Parameter name * * @param string $parameter95Name Parameter name * @return $this Fluent Builder */ public function setParameter95Name(string $parameter95Name): self { $this->options['parameter95Name'] = $parameter95Name; return $this; } /** * Parameter value * * @param string $parameter95Value Parameter value * @return $this Fluent Builder */ public function setParameter95Value(string $parameter95Value): self { $this->options['parameter95Value'] = $parameter95Value; return $this; } /** * Parameter name * * @param string $parameter96Name Parameter name * @return $this Fluent Builder */ public function setParameter96Name(string $parameter96Name): self { $this->options['parameter96Name'] = $parameter96Name; return $this; } /** * Parameter value * * @param string $parameter96Value Parameter value * @return $this Fluent Builder */ public function setParameter96Value(string $parameter96Value): self { $this->options['parameter96Value'] = $parameter96Value; return $this; } /** * Parameter name * * @param string $parameter97Name Parameter name * @return $this Fluent Builder */ public function setParameter97Name(string $parameter97Name): self { $this->options['parameter97Name'] = $parameter97Name; return $this; } /** * Parameter value * * @param string $parameter97Value Parameter value * @return $this Fluent Builder */ public function setParameter97Value(string $parameter97Value): self { $this->options['parameter97Value'] = $parameter97Value; return $this; } /** * Parameter name * * @param string $parameter98Name Parameter name * @return $this Fluent Builder */ public function setParameter98Name(string $parameter98Name): self { $this->options['parameter98Name'] = $parameter98Name; return $this; } /** * Parameter value * * @param string $parameter98Value Parameter value * @return $this Fluent Builder */ public function setParameter98Value(string $parameter98Value): self { $this->options['parameter98Value'] = $parameter98Value; return $this; } /** * Parameter name * * @param string $parameter99Name Parameter name * @return $this Fluent Builder */ public function setParameter99Name(string $parameter99Name): self { $this->options['parameter99Name'] = $parameter99Name; return $this; } /** * Parameter value * * @param string $parameter99Value Parameter value * @return $this Fluent Builder */ public function setParameter99Value(string $parameter99Value): self { $this->options['parameter99Value'] = $parameter99Value; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateStreamOptions ' . $options . ']'; } }PKt[ȍ:Twilio/Rest/Api/V2010/Account/Call/NotificationContext.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Notifications/' . \rawurlencode($sid) . '.json'; } /** * Fetch the NotificationInstance * * @return NotificationInstance Fetched NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NotificationInstance { $payload = $this->version->fetch('GET', $this->uri); return new NotificationInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.NotificationContext ' . \implode(' ', $context) . ']'; } }PKt[p|q884Twilio/Rest/Api/V2010/Account/Call/SiprecContext.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Siprec/' . \rawurlencode($sid) . '.json'; } /** * Update the SiprecInstance * * @param string $status The status. Must have the value `stopped` * @return SiprecInstance Updated SiprecInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): SiprecInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SiprecInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.SiprecContext ' . \implode(' ', $context) . ']'; } }PKt[+2;;6Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.phpnu[options['issue'] = $issue; } /** * A list of one or more issues experienced during the call. Issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. * * @param string[] $issue Issues experienced during the call * @return $this Fluent Builder */ public function setIssue(array $issue): self { $this->options['issue'] = $issue; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateFeedbackOptions ' . $options . ']'; } } class UpdateFeedbackOptions extends Options { /** * @param int $qualityScore The call quality expressed as an integer from 1 to 5 * @param string[] $issue Issues experienced during the call */ public function __construct(int $qualityScore = Values::NONE, array $issue = Values::ARRAY_NONE) { $this->options['qualityScore'] = $qualityScore; $this->options['issue'] = $issue; } /** * The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. * * @param int $qualityScore The call quality expressed as an integer from 1 to 5 * @return $this Fluent Builder */ public function setQualityScore(int $qualityScore): self { $this->options['qualityScore'] = $qualityScore; return $this; } /** * One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. * * @param string[] $issue Issues experienced during the call * @return $this Fluent Builder */ public function setIssue(array $issue): self { $this->options['issue'] = $issue; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateFeedbackOptions ' . $options . ']'; } }PKt[ww4Twilio/Rest/Api/V2010/Account/Call/SiprecOptions.phpnu[options['name'] = $name; $this->options['connectorName'] = $connectorName; $this->options['track'] = $track; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['parameter1Name'] = $parameter1Name; $this->options['parameter1Value'] = $parameter1Value; $this->options['parameter2Name'] = $parameter2Name; $this->options['parameter2Value'] = $parameter2Value; $this->options['parameter3Name'] = $parameter3Name; $this->options['parameter3Value'] = $parameter3Value; $this->options['parameter4Name'] = $parameter4Name; $this->options['parameter4Value'] = $parameter4Value; $this->options['parameter5Name'] = $parameter5Name; $this->options['parameter5Value'] = $parameter5Value; $this->options['parameter6Name'] = $parameter6Name; $this->options['parameter6Value'] = $parameter6Value; $this->options['parameter7Name'] = $parameter7Name; $this->options['parameter7Value'] = $parameter7Value; $this->options['parameter8Name'] = $parameter8Name; $this->options['parameter8Value'] = $parameter8Value; $this->options['parameter9Name'] = $parameter9Name; $this->options['parameter9Value'] = $parameter9Value; $this->options['parameter10Name'] = $parameter10Name; $this->options['parameter10Value'] = $parameter10Value; $this->options['parameter11Name'] = $parameter11Name; $this->options['parameter11Value'] = $parameter11Value; $this->options['parameter12Name'] = $parameter12Name; $this->options['parameter12Value'] = $parameter12Value; $this->options['parameter13Name'] = $parameter13Name; $this->options['parameter13Value'] = $parameter13Value; $this->options['parameter14Name'] = $parameter14Name; $this->options['parameter14Value'] = $parameter14Value; $this->options['parameter15Name'] = $parameter15Name; $this->options['parameter15Value'] = $parameter15Value; $this->options['parameter16Name'] = $parameter16Name; $this->options['parameter16Value'] = $parameter16Value; $this->options['parameter17Name'] = $parameter17Name; $this->options['parameter17Value'] = $parameter17Value; $this->options['parameter18Name'] = $parameter18Name; $this->options['parameter18Value'] = $parameter18Value; $this->options['parameter19Name'] = $parameter19Name; $this->options['parameter19Value'] = $parameter19Value; $this->options['parameter20Name'] = $parameter20Name; $this->options['parameter20Value'] = $parameter20Value; $this->options['parameter21Name'] = $parameter21Name; $this->options['parameter21Value'] = $parameter21Value; $this->options['parameter22Name'] = $parameter22Name; $this->options['parameter22Value'] = $parameter22Value; $this->options['parameter23Name'] = $parameter23Name; $this->options['parameter23Value'] = $parameter23Value; $this->options['parameter24Name'] = $parameter24Name; $this->options['parameter24Value'] = $parameter24Value; $this->options['parameter25Name'] = $parameter25Name; $this->options['parameter25Value'] = $parameter25Value; $this->options['parameter26Name'] = $parameter26Name; $this->options['parameter26Value'] = $parameter26Value; $this->options['parameter27Name'] = $parameter27Name; $this->options['parameter27Value'] = $parameter27Value; $this->options['parameter28Name'] = $parameter28Name; $this->options['parameter28Value'] = $parameter28Value; $this->options['parameter29Name'] = $parameter29Name; $this->options['parameter29Value'] = $parameter29Value; $this->options['parameter30Name'] = $parameter30Name; $this->options['parameter30Value'] = $parameter30Value; $this->options['parameter31Name'] = $parameter31Name; $this->options['parameter31Value'] = $parameter31Value; $this->options['parameter32Name'] = $parameter32Name; $this->options['parameter32Value'] = $parameter32Value; $this->options['parameter33Name'] = $parameter33Name; $this->options['parameter33Value'] = $parameter33Value; $this->options['parameter34Name'] = $parameter34Name; $this->options['parameter34Value'] = $parameter34Value; $this->options['parameter35Name'] = $parameter35Name; $this->options['parameter35Value'] = $parameter35Value; $this->options['parameter36Name'] = $parameter36Name; $this->options['parameter36Value'] = $parameter36Value; $this->options['parameter37Name'] = $parameter37Name; $this->options['parameter37Value'] = $parameter37Value; $this->options['parameter38Name'] = $parameter38Name; $this->options['parameter38Value'] = $parameter38Value; $this->options['parameter39Name'] = $parameter39Name; $this->options['parameter39Value'] = $parameter39Value; $this->options['parameter40Name'] = $parameter40Name; $this->options['parameter40Value'] = $parameter40Value; $this->options['parameter41Name'] = $parameter41Name; $this->options['parameter41Value'] = $parameter41Value; $this->options['parameter42Name'] = $parameter42Name; $this->options['parameter42Value'] = $parameter42Value; $this->options['parameter43Name'] = $parameter43Name; $this->options['parameter43Value'] = $parameter43Value; $this->options['parameter44Name'] = $parameter44Name; $this->options['parameter44Value'] = $parameter44Value; $this->options['parameter45Name'] = $parameter45Name; $this->options['parameter45Value'] = $parameter45Value; $this->options['parameter46Name'] = $parameter46Name; $this->options['parameter46Value'] = $parameter46Value; $this->options['parameter47Name'] = $parameter47Name; $this->options['parameter47Value'] = $parameter47Value; $this->options['parameter48Name'] = $parameter48Name; $this->options['parameter48Value'] = $parameter48Value; $this->options['parameter49Name'] = $parameter49Name; $this->options['parameter49Value'] = $parameter49Value; $this->options['parameter50Name'] = $parameter50Name; $this->options['parameter50Value'] = $parameter50Value; $this->options['parameter51Name'] = $parameter51Name; $this->options['parameter51Value'] = $parameter51Value; $this->options['parameter52Name'] = $parameter52Name; $this->options['parameter52Value'] = $parameter52Value; $this->options['parameter53Name'] = $parameter53Name; $this->options['parameter53Value'] = $parameter53Value; $this->options['parameter54Name'] = $parameter54Name; $this->options['parameter54Value'] = $parameter54Value; $this->options['parameter55Name'] = $parameter55Name; $this->options['parameter55Value'] = $parameter55Value; $this->options['parameter56Name'] = $parameter56Name; $this->options['parameter56Value'] = $parameter56Value; $this->options['parameter57Name'] = $parameter57Name; $this->options['parameter57Value'] = $parameter57Value; $this->options['parameter58Name'] = $parameter58Name; $this->options['parameter58Value'] = $parameter58Value; $this->options['parameter59Name'] = $parameter59Name; $this->options['parameter59Value'] = $parameter59Value; $this->options['parameter60Name'] = $parameter60Name; $this->options['parameter60Value'] = $parameter60Value; $this->options['parameter61Name'] = $parameter61Name; $this->options['parameter61Value'] = $parameter61Value; $this->options['parameter62Name'] = $parameter62Name; $this->options['parameter62Value'] = $parameter62Value; $this->options['parameter63Name'] = $parameter63Name; $this->options['parameter63Value'] = $parameter63Value; $this->options['parameter64Name'] = $parameter64Name; $this->options['parameter64Value'] = $parameter64Value; $this->options['parameter65Name'] = $parameter65Name; $this->options['parameter65Value'] = $parameter65Value; $this->options['parameter66Name'] = $parameter66Name; $this->options['parameter66Value'] = $parameter66Value; $this->options['parameter67Name'] = $parameter67Name; $this->options['parameter67Value'] = $parameter67Value; $this->options['parameter68Name'] = $parameter68Name; $this->options['parameter68Value'] = $parameter68Value; $this->options['parameter69Name'] = $parameter69Name; $this->options['parameter69Value'] = $parameter69Value; $this->options['parameter70Name'] = $parameter70Name; $this->options['parameter70Value'] = $parameter70Value; $this->options['parameter71Name'] = $parameter71Name; $this->options['parameter71Value'] = $parameter71Value; $this->options['parameter72Name'] = $parameter72Name; $this->options['parameter72Value'] = $parameter72Value; $this->options['parameter73Name'] = $parameter73Name; $this->options['parameter73Value'] = $parameter73Value; $this->options['parameter74Name'] = $parameter74Name; $this->options['parameter74Value'] = $parameter74Value; $this->options['parameter75Name'] = $parameter75Name; $this->options['parameter75Value'] = $parameter75Value; $this->options['parameter76Name'] = $parameter76Name; $this->options['parameter76Value'] = $parameter76Value; $this->options['parameter77Name'] = $parameter77Name; $this->options['parameter77Value'] = $parameter77Value; $this->options['parameter78Name'] = $parameter78Name; $this->options['parameter78Value'] = $parameter78Value; $this->options['parameter79Name'] = $parameter79Name; $this->options['parameter79Value'] = $parameter79Value; $this->options['parameter80Name'] = $parameter80Name; $this->options['parameter80Value'] = $parameter80Value; $this->options['parameter81Name'] = $parameter81Name; $this->options['parameter81Value'] = $parameter81Value; $this->options['parameter82Name'] = $parameter82Name; $this->options['parameter82Value'] = $parameter82Value; $this->options['parameter83Name'] = $parameter83Name; $this->options['parameter83Value'] = $parameter83Value; $this->options['parameter84Name'] = $parameter84Name; $this->options['parameter84Value'] = $parameter84Value; $this->options['parameter85Name'] = $parameter85Name; $this->options['parameter85Value'] = $parameter85Value; $this->options['parameter86Name'] = $parameter86Name; $this->options['parameter86Value'] = $parameter86Value; $this->options['parameter87Name'] = $parameter87Name; $this->options['parameter87Value'] = $parameter87Value; $this->options['parameter88Name'] = $parameter88Name; $this->options['parameter88Value'] = $parameter88Value; $this->options['parameter89Name'] = $parameter89Name; $this->options['parameter89Value'] = $parameter89Value; $this->options['parameter90Name'] = $parameter90Name; $this->options['parameter90Value'] = $parameter90Value; $this->options['parameter91Name'] = $parameter91Name; $this->options['parameter91Value'] = $parameter91Value; $this->options['parameter92Name'] = $parameter92Name; $this->options['parameter92Value'] = $parameter92Value; $this->options['parameter93Name'] = $parameter93Name; $this->options['parameter93Value'] = $parameter93Value; $this->options['parameter94Name'] = $parameter94Name; $this->options['parameter94Value'] = $parameter94Value; $this->options['parameter95Name'] = $parameter95Name; $this->options['parameter95Value'] = $parameter95Value; $this->options['parameter96Name'] = $parameter96Name; $this->options['parameter96Value'] = $parameter96Value; $this->options['parameter97Name'] = $parameter97Name; $this->options['parameter97Value'] = $parameter97Value; $this->options['parameter98Name'] = $parameter98Name; $this->options['parameter98Value'] = $parameter98Value; $this->options['parameter99Name'] = $parameter99Name; $this->options['parameter99Value'] = $parameter99Value; } /** * The user-specified name of this Siprec, if one was given when the Siprec was created. This may be used to stop the Siprec. * * @param string $name The name of this resource * @return $this Fluent Builder */ public function setName(string $name): self { $this->options['name'] = $name; return $this; } /** * Unique name used when configuring the connector via Marketplace Add-on. * * @param string $connectorName Unique name used when configuring the connector * via Marketplace Add-on. * @return $this Fluent Builder */ public function setConnectorName(string $connectorName): self { $this->options['connectorName'] = $connectorName; return $this; } /** * One of `inbound_track`, `outbound_track`, `both_tracks`. * * @param string $track One of `inbound_track`, `outbound_track`, `both_tracks`. * @return $this Fluent Builder */ public function setTrack(string $track): self { $this->options['track'] = $track; return $this; } /** * Absolute URL of the status callback. * * @param string $statusCallback Absolute URL of the status callback. * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The http method for the status_callback (one of GET, POST). * * @param string $statusCallbackMethod The http method for the status_callback. * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Parameter name * * @param string $parameter1Name Parameter name * @return $this Fluent Builder */ public function setParameter1Name(string $parameter1Name): self { $this->options['parameter1Name'] = $parameter1Name; return $this; } /** * Parameter value * * @param string $parameter1Value Parameter value * @return $this Fluent Builder */ public function setParameter1Value(string $parameter1Value): self { $this->options['parameter1Value'] = $parameter1Value; return $this; } /** * Parameter name * * @param string $parameter2Name Parameter name * @return $this Fluent Builder */ public function setParameter2Name(string $parameter2Name): self { $this->options['parameter2Name'] = $parameter2Name; return $this; } /** * Parameter value * * @param string $parameter2Value Parameter value * @return $this Fluent Builder */ public function setParameter2Value(string $parameter2Value): self { $this->options['parameter2Value'] = $parameter2Value; return $this; } /** * Parameter name * * @param string $parameter3Name Parameter name * @return $this Fluent Builder */ public function setParameter3Name(string $parameter3Name): self { $this->options['parameter3Name'] = $parameter3Name; return $this; } /** * Parameter value * * @param string $parameter3Value Parameter value * @return $this Fluent Builder */ public function setParameter3Value(string $parameter3Value): self { $this->options['parameter3Value'] = $parameter3Value; return $this; } /** * Parameter name * * @param string $parameter4Name Parameter name * @return $this Fluent Builder */ public function setParameter4Name(string $parameter4Name): self { $this->options['parameter4Name'] = $parameter4Name; return $this; } /** * Parameter value * * @param string $parameter4Value Parameter value * @return $this Fluent Builder */ public function setParameter4Value(string $parameter4Value): self { $this->options['parameter4Value'] = $parameter4Value; return $this; } /** * Parameter name * * @param string $parameter5Name Parameter name * @return $this Fluent Builder */ public function setParameter5Name(string $parameter5Name): self { $this->options['parameter5Name'] = $parameter5Name; return $this; } /** * Parameter value * * @param string $parameter5Value Parameter value * @return $this Fluent Builder */ public function setParameter5Value(string $parameter5Value): self { $this->options['parameter5Value'] = $parameter5Value; return $this; } /** * Parameter name * * @param string $parameter6Name Parameter name * @return $this Fluent Builder */ public function setParameter6Name(string $parameter6Name): self { $this->options['parameter6Name'] = $parameter6Name; return $this; } /** * Parameter value * * @param string $parameter6Value Parameter value * @return $this Fluent Builder */ public function setParameter6Value(string $parameter6Value): self { $this->options['parameter6Value'] = $parameter6Value; return $this; } /** * Parameter name * * @param string $parameter7Name Parameter name * @return $this Fluent Builder */ public function setParameter7Name(string $parameter7Name): self { $this->options['parameter7Name'] = $parameter7Name; return $this; } /** * Parameter value * * @param string $parameter7Value Parameter value * @return $this Fluent Builder */ public function setParameter7Value(string $parameter7Value): self { $this->options['parameter7Value'] = $parameter7Value; return $this; } /** * Parameter name * * @param string $parameter8Name Parameter name * @return $this Fluent Builder */ public function setParameter8Name(string $parameter8Name): self { $this->options['parameter8Name'] = $parameter8Name; return $this; } /** * Parameter value * * @param string $parameter8Value Parameter value * @return $this Fluent Builder */ public function setParameter8Value(string $parameter8Value): self { $this->options['parameter8Value'] = $parameter8Value; return $this; } /** * Parameter name * * @param string $parameter9Name Parameter name * @return $this Fluent Builder */ public function setParameter9Name(string $parameter9Name): self { $this->options['parameter9Name'] = $parameter9Name; return $this; } /** * Parameter value * * @param string $parameter9Value Parameter value * @return $this Fluent Builder */ public function setParameter9Value(string $parameter9Value): self { $this->options['parameter9Value'] = $parameter9Value; return $this; } /** * Parameter name * * @param string $parameter10Name Parameter name * @return $this Fluent Builder */ public function setParameter10Name(string $parameter10Name): self { $this->options['parameter10Name'] = $parameter10Name; return $this; } /** * Parameter value * * @param string $parameter10Value Parameter value * @return $this Fluent Builder */ public function setParameter10Value(string $parameter10Value): self { $this->options['parameter10Value'] = $parameter10Value; return $this; } /** * Parameter name * * @param string $parameter11Name Parameter name * @return $this Fluent Builder */ public function setParameter11Name(string $parameter11Name): self { $this->options['parameter11Name'] = $parameter11Name; return $this; } /** * Parameter value * * @param string $parameter11Value Parameter value * @return $this Fluent Builder */ public function setParameter11Value(string $parameter11Value): self { $this->options['parameter11Value'] = $parameter11Value; return $this; } /** * Parameter name * * @param string $parameter12Name Parameter name * @return $this Fluent Builder */ public function setParameter12Name(string $parameter12Name): self { $this->options['parameter12Name'] = $parameter12Name; return $this; } /** * Parameter value * * @param string $parameter12Value Parameter value * @return $this Fluent Builder */ public function setParameter12Value(string $parameter12Value): self { $this->options['parameter12Value'] = $parameter12Value; return $this; } /** * Parameter name * * @param string $parameter13Name Parameter name * @return $this Fluent Builder */ public function setParameter13Name(string $parameter13Name): self { $this->options['parameter13Name'] = $parameter13Name; return $this; } /** * Parameter value * * @param string $parameter13Value Parameter value * @return $this Fluent Builder */ public function setParameter13Value(string $parameter13Value): self { $this->options['parameter13Value'] = $parameter13Value; return $this; } /** * Parameter name * * @param string $parameter14Name Parameter name * @return $this Fluent Builder */ public function setParameter14Name(string $parameter14Name): self { $this->options['parameter14Name'] = $parameter14Name; return $this; } /** * Parameter value * * @param string $parameter14Value Parameter value * @return $this Fluent Builder */ public function setParameter14Value(string $parameter14Value): self { $this->options['parameter14Value'] = $parameter14Value; return $this; } /** * Parameter name * * @param string $parameter15Name Parameter name * @return $this Fluent Builder */ public function setParameter15Name(string $parameter15Name): self { $this->options['parameter15Name'] = $parameter15Name; return $this; } /** * Parameter value * * @param string $parameter15Value Parameter value * @return $this Fluent Builder */ public function setParameter15Value(string $parameter15Value): self { $this->options['parameter15Value'] = $parameter15Value; return $this; } /** * Parameter name * * @param string $parameter16Name Parameter name * @return $this Fluent Builder */ public function setParameter16Name(string $parameter16Name): self { $this->options['parameter16Name'] = $parameter16Name; return $this; } /** * Parameter value * * @param string $parameter16Value Parameter value * @return $this Fluent Builder */ public function setParameter16Value(string $parameter16Value): self { $this->options['parameter16Value'] = $parameter16Value; return $this; } /** * Parameter name * * @param string $parameter17Name Parameter name * @return $this Fluent Builder */ public function setParameter17Name(string $parameter17Name): self { $this->options['parameter17Name'] = $parameter17Name; return $this; } /** * Parameter value * * @param string $parameter17Value Parameter value * @return $this Fluent Builder */ public function setParameter17Value(string $parameter17Value): self { $this->options['parameter17Value'] = $parameter17Value; return $this; } /** * Parameter name * * @param string $parameter18Name Parameter name * @return $this Fluent Builder */ public function setParameter18Name(string $parameter18Name): self { $this->options['parameter18Name'] = $parameter18Name; return $this; } /** * Parameter value * * @param string $parameter18Value Parameter value * @return $this Fluent Builder */ public function setParameter18Value(string $parameter18Value): self { $this->options['parameter18Value'] = $parameter18Value; return $this; } /** * Parameter name * * @param string $parameter19Name Parameter name * @return $this Fluent Builder */ public function setParameter19Name(string $parameter19Name): self { $this->options['parameter19Name'] = $parameter19Name; return $this; } /** * Parameter value * * @param string $parameter19Value Parameter value * @return $this Fluent Builder */ public function setParameter19Value(string $parameter19Value): self { $this->options['parameter19Value'] = $parameter19Value; return $this; } /** * Parameter name * * @param string $parameter20Name Parameter name * @return $this Fluent Builder */ public function setParameter20Name(string $parameter20Name): self { $this->options['parameter20Name'] = $parameter20Name; return $this; } /** * Parameter value * * @param string $parameter20Value Parameter value * @return $this Fluent Builder */ public function setParameter20Value(string $parameter20Value): self { $this->options['parameter20Value'] = $parameter20Value; return $this; } /** * Parameter name * * @param string $parameter21Name Parameter name * @return $this Fluent Builder */ public function setParameter21Name(string $parameter21Name): self { $this->options['parameter21Name'] = $parameter21Name; return $this; } /** * Parameter value * * @param string $parameter21Value Parameter value * @return $this Fluent Builder */ public function setParameter21Value(string $parameter21Value): self { $this->options['parameter21Value'] = $parameter21Value; return $this; } /** * Parameter name * * @param string $parameter22Name Parameter name * @return $this Fluent Builder */ public function setParameter22Name(string $parameter22Name): self { $this->options['parameter22Name'] = $parameter22Name; return $this; } /** * Parameter value * * @param string $parameter22Value Parameter value * @return $this Fluent Builder */ public function setParameter22Value(string $parameter22Value): self { $this->options['parameter22Value'] = $parameter22Value; return $this; } /** * Parameter name * * @param string $parameter23Name Parameter name * @return $this Fluent Builder */ public function setParameter23Name(string $parameter23Name): self { $this->options['parameter23Name'] = $parameter23Name; return $this; } /** * Parameter value * * @param string $parameter23Value Parameter value * @return $this Fluent Builder */ public function setParameter23Value(string $parameter23Value): self { $this->options['parameter23Value'] = $parameter23Value; return $this; } /** * Parameter name * * @param string $parameter24Name Parameter name * @return $this Fluent Builder */ public function setParameter24Name(string $parameter24Name): self { $this->options['parameter24Name'] = $parameter24Name; return $this; } /** * Parameter value * * @param string $parameter24Value Parameter value * @return $this Fluent Builder */ public function setParameter24Value(string $parameter24Value): self { $this->options['parameter24Value'] = $parameter24Value; return $this; } /** * Parameter name * * @param string $parameter25Name Parameter name * @return $this Fluent Builder */ public function setParameter25Name(string $parameter25Name): self { $this->options['parameter25Name'] = $parameter25Name; return $this; } /** * Parameter value * * @param string $parameter25Value Parameter value * @return $this Fluent Builder */ public function setParameter25Value(string $parameter25Value): self { $this->options['parameter25Value'] = $parameter25Value; return $this; } /** * Parameter name * * @param string $parameter26Name Parameter name * @return $this Fluent Builder */ public function setParameter26Name(string $parameter26Name): self { $this->options['parameter26Name'] = $parameter26Name; return $this; } /** * Parameter value * * @param string $parameter26Value Parameter value * @return $this Fluent Builder */ public function setParameter26Value(string $parameter26Value): self { $this->options['parameter26Value'] = $parameter26Value; return $this; } /** * Parameter name * * @param string $parameter27Name Parameter name * @return $this Fluent Builder */ public function setParameter27Name(string $parameter27Name): self { $this->options['parameter27Name'] = $parameter27Name; return $this; } /** * Parameter value * * @param string $parameter27Value Parameter value * @return $this Fluent Builder */ public function setParameter27Value(string $parameter27Value): self { $this->options['parameter27Value'] = $parameter27Value; return $this; } /** * Parameter name * * @param string $parameter28Name Parameter name * @return $this Fluent Builder */ public function setParameter28Name(string $parameter28Name): self { $this->options['parameter28Name'] = $parameter28Name; return $this; } /** * Parameter value * * @param string $parameter28Value Parameter value * @return $this Fluent Builder */ public function setParameter28Value(string $parameter28Value): self { $this->options['parameter28Value'] = $parameter28Value; return $this; } /** * Parameter name * * @param string $parameter29Name Parameter name * @return $this Fluent Builder */ public function setParameter29Name(string $parameter29Name): self { $this->options['parameter29Name'] = $parameter29Name; return $this; } /** * Parameter value * * @param string $parameter29Value Parameter value * @return $this Fluent Builder */ public function setParameter29Value(string $parameter29Value): self { $this->options['parameter29Value'] = $parameter29Value; return $this; } /** * Parameter name * * @param string $parameter30Name Parameter name * @return $this Fluent Builder */ public function setParameter30Name(string $parameter30Name): self { $this->options['parameter30Name'] = $parameter30Name; return $this; } /** * Parameter value * * @param string $parameter30Value Parameter value * @return $this Fluent Builder */ public function setParameter30Value(string $parameter30Value): self { $this->options['parameter30Value'] = $parameter30Value; return $this; } /** * Parameter name * * @param string $parameter31Name Parameter name * @return $this Fluent Builder */ public function setParameter31Name(string $parameter31Name): self { $this->options['parameter31Name'] = $parameter31Name; return $this; } /** * Parameter value * * @param string $parameter31Value Parameter value * @return $this Fluent Builder */ public function setParameter31Value(string $parameter31Value): self { $this->options['parameter31Value'] = $parameter31Value; return $this; } /** * Parameter name * * @param string $parameter32Name Parameter name * @return $this Fluent Builder */ public function setParameter32Name(string $parameter32Name): self { $this->options['parameter32Name'] = $parameter32Name; return $this; } /** * Parameter value * * @param string $parameter32Value Parameter value * @return $this Fluent Builder */ public function setParameter32Value(string $parameter32Value): self { $this->options['parameter32Value'] = $parameter32Value; return $this; } /** * Parameter name * * @param string $parameter33Name Parameter name * @return $this Fluent Builder */ public function setParameter33Name(string $parameter33Name): self { $this->options['parameter33Name'] = $parameter33Name; return $this; } /** * Parameter value * * @param string $parameter33Value Parameter value * @return $this Fluent Builder */ public function setParameter33Value(string $parameter33Value): self { $this->options['parameter33Value'] = $parameter33Value; return $this; } /** * Parameter name * * @param string $parameter34Name Parameter name * @return $this Fluent Builder */ public function setParameter34Name(string $parameter34Name): self { $this->options['parameter34Name'] = $parameter34Name; return $this; } /** * Parameter value * * @param string $parameter34Value Parameter value * @return $this Fluent Builder */ public function setParameter34Value(string $parameter34Value): self { $this->options['parameter34Value'] = $parameter34Value; return $this; } /** * Parameter name * * @param string $parameter35Name Parameter name * @return $this Fluent Builder */ public function setParameter35Name(string $parameter35Name): self { $this->options['parameter35Name'] = $parameter35Name; return $this; } /** * Parameter value * * @param string $parameter35Value Parameter value * @return $this Fluent Builder */ public function setParameter35Value(string $parameter35Value): self { $this->options['parameter35Value'] = $parameter35Value; return $this; } /** * Parameter name * * @param string $parameter36Name Parameter name * @return $this Fluent Builder */ public function setParameter36Name(string $parameter36Name): self { $this->options['parameter36Name'] = $parameter36Name; return $this; } /** * Parameter value * * @param string $parameter36Value Parameter value * @return $this Fluent Builder */ public function setParameter36Value(string $parameter36Value): self { $this->options['parameter36Value'] = $parameter36Value; return $this; } /** * Parameter name * * @param string $parameter37Name Parameter name * @return $this Fluent Builder */ public function setParameter37Name(string $parameter37Name): self { $this->options['parameter37Name'] = $parameter37Name; return $this; } /** * Parameter value * * @param string $parameter37Value Parameter value * @return $this Fluent Builder */ public function setParameter37Value(string $parameter37Value): self { $this->options['parameter37Value'] = $parameter37Value; return $this; } /** * Parameter name * * @param string $parameter38Name Parameter name * @return $this Fluent Builder */ public function setParameter38Name(string $parameter38Name): self { $this->options['parameter38Name'] = $parameter38Name; return $this; } /** * Parameter value * * @param string $parameter38Value Parameter value * @return $this Fluent Builder */ public function setParameter38Value(string $parameter38Value): self { $this->options['parameter38Value'] = $parameter38Value; return $this; } /** * Parameter name * * @param string $parameter39Name Parameter name * @return $this Fluent Builder */ public function setParameter39Name(string $parameter39Name): self { $this->options['parameter39Name'] = $parameter39Name; return $this; } /** * Parameter value * * @param string $parameter39Value Parameter value * @return $this Fluent Builder */ public function setParameter39Value(string $parameter39Value): self { $this->options['parameter39Value'] = $parameter39Value; return $this; } /** * Parameter name * * @param string $parameter40Name Parameter name * @return $this Fluent Builder */ public function setParameter40Name(string $parameter40Name): self { $this->options['parameter40Name'] = $parameter40Name; return $this; } /** * Parameter value * * @param string $parameter40Value Parameter value * @return $this Fluent Builder */ public function setParameter40Value(string $parameter40Value): self { $this->options['parameter40Value'] = $parameter40Value; return $this; } /** * Parameter name * * @param string $parameter41Name Parameter name * @return $this Fluent Builder */ public function setParameter41Name(string $parameter41Name): self { $this->options['parameter41Name'] = $parameter41Name; return $this; } /** * Parameter value * * @param string $parameter41Value Parameter value * @return $this Fluent Builder */ public function setParameter41Value(string $parameter41Value): self { $this->options['parameter41Value'] = $parameter41Value; return $this; } /** * Parameter name * * @param string $parameter42Name Parameter name * @return $this Fluent Builder */ public function setParameter42Name(string $parameter42Name): self { $this->options['parameter42Name'] = $parameter42Name; return $this; } /** * Parameter value * * @param string $parameter42Value Parameter value * @return $this Fluent Builder */ public function setParameter42Value(string $parameter42Value): self { $this->options['parameter42Value'] = $parameter42Value; return $this; } /** * Parameter name * * @param string $parameter43Name Parameter name * @return $this Fluent Builder */ public function setParameter43Name(string $parameter43Name): self { $this->options['parameter43Name'] = $parameter43Name; return $this; } /** * Parameter value * * @param string $parameter43Value Parameter value * @return $this Fluent Builder */ public function setParameter43Value(string $parameter43Value): self { $this->options['parameter43Value'] = $parameter43Value; return $this; } /** * Parameter name * * @param string $parameter44Name Parameter name * @return $this Fluent Builder */ public function setParameter44Name(string $parameter44Name): self { $this->options['parameter44Name'] = $parameter44Name; return $this; } /** * Parameter value * * @param string $parameter44Value Parameter value * @return $this Fluent Builder */ public function setParameter44Value(string $parameter44Value): self { $this->options['parameter44Value'] = $parameter44Value; return $this; } /** * Parameter name * * @param string $parameter45Name Parameter name * @return $this Fluent Builder */ public function setParameter45Name(string $parameter45Name): self { $this->options['parameter45Name'] = $parameter45Name; return $this; } /** * Parameter value * * @param string $parameter45Value Parameter value * @return $this Fluent Builder */ public function setParameter45Value(string $parameter45Value): self { $this->options['parameter45Value'] = $parameter45Value; return $this; } /** * Parameter name * * @param string $parameter46Name Parameter name * @return $this Fluent Builder */ public function setParameter46Name(string $parameter46Name): self { $this->options['parameter46Name'] = $parameter46Name; return $this; } /** * Parameter value * * @param string $parameter46Value Parameter value * @return $this Fluent Builder */ public function setParameter46Value(string $parameter46Value): self { $this->options['parameter46Value'] = $parameter46Value; return $this; } /** * Parameter name * * @param string $parameter47Name Parameter name * @return $this Fluent Builder */ public function setParameter47Name(string $parameter47Name): self { $this->options['parameter47Name'] = $parameter47Name; return $this; } /** * Parameter value * * @param string $parameter47Value Parameter value * @return $this Fluent Builder */ public function setParameter47Value(string $parameter47Value): self { $this->options['parameter47Value'] = $parameter47Value; return $this; } /** * Parameter name * * @param string $parameter48Name Parameter name * @return $this Fluent Builder */ public function setParameter48Name(string $parameter48Name): self { $this->options['parameter48Name'] = $parameter48Name; return $this; } /** * Parameter value * * @param string $parameter48Value Parameter value * @return $this Fluent Builder */ public function setParameter48Value(string $parameter48Value): self { $this->options['parameter48Value'] = $parameter48Value; return $this; } /** * Parameter name * * @param string $parameter49Name Parameter name * @return $this Fluent Builder */ public function setParameter49Name(string $parameter49Name): self { $this->options['parameter49Name'] = $parameter49Name; return $this; } /** * Parameter value * * @param string $parameter49Value Parameter value * @return $this Fluent Builder */ public function setParameter49Value(string $parameter49Value): self { $this->options['parameter49Value'] = $parameter49Value; return $this; } /** * Parameter name * * @param string $parameter50Name Parameter name * @return $this Fluent Builder */ public function setParameter50Name(string $parameter50Name): self { $this->options['parameter50Name'] = $parameter50Name; return $this; } /** * Parameter value * * @param string $parameter50Value Parameter value * @return $this Fluent Builder */ public function setParameter50Value(string $parameter50Value): self { $this->options['parameter50Value'] = $parameter50Value; return $this; } /** * Parameter name * * @param string $parameter51Name Parameter name * @return $this Fluent Builder */ public function setParameter51Name(string $parameter51Name): self { $this->options['parameter51Name'] = $parameter51Name; return $this; } /** * Parameter value * * @param string $parameter51Value Parameter value * @return $this Fluent Builder */ public function setParameter51Value(string $parameter51Value): self { $this->options['parameter51Value'] = $parameter51Value; return $this; } /** * Parameter name * * @param string $parameter52Name Parameter name * @return $this Fluent Builder */ public function setParameter52Name(string $parameter52Name): self { $this->options['parameter52Name'] = $parameter52Name; return $this; } /** * Parameter value * * @param string $parameter52Value Parameter value * @return $this Fluent Builder */ public function setParameter52Value(string $parameter52Value): self { $this->options['parameter52Value'] = $parameter52Value; return $this; } /** * Parameter name * * @param string $parameter53Name Parameter name * @return $this Fluent Builder */ public function setParameter53Name(string $parameter53Name): self { $this->options['parameter53Name'] = $parameter53Name; return $this; } /** * Parameter value * * @param string $parameter53Value Parameter value * @return $this Fluent Builder */ public function setParameter53Value(string $parameter53Value): self { $this->options['parameter53Value'] = $parameter53Value; return $this; } /** * Parameter name * * @param string $parameter54Name Parameter name * @return $this Fluent Builder */ public function setParameter54Name(string $parameter54Name): self { $this->options['parameter54Name'] = $parameter54Name; return $this; } /** * Parameter value * * @param string $parameter54Value Parameter value * @return $this Fluent Builder */ public function setParameter54Value(string $parameter54Value): self { $this->options['parameter54Value'] = $parameter54Value; return $this; } /** * Parameter name * * @param string $parameter55Name Parameter name * @return $this Fluent Builder */ public function setParameter55Name(string $parameter55Name): self { $this->options['parameter55Name'] = $parameter55Name; return $this; } /** * Parameter value * * @param string $parameter55Value Parameter value * @return $this Fluent Builder */ public function setParameter55Value(string $parameter55Value): self { $this->options['parameter55Value'] = $parameter55Value; return $this; } /** * Parameter name * * @param string $parameter56Name Parameter name * @return $this Fluent Builder */ public function setParameter56Name(string $parameter56Name): self { $this->options['parameter56Name'] = $parameter56Name; return $this; } /** * Parameter value * * @param string $parameter56Value Parameter value * @return $this Fluent Builder */ public function setParameter56Value(string $parameter56Value): self { $this->options['parameter56Value'] = $parameter56Value; return $this; } /** * Parameter name * * @param string $parameter57Name Parameter name * @return $this Fluent Builder */ public function setParameter57Name(string $parameter57Name): self { $this->options['parameter57Name'] = $parameter57Name; return $this; } /** * Parameter value * * @param string $parameter57Value Parameter value * @return $this Fluent Builder */ public function setParameter57Value(string $parameter57Value): self { $this->options['parameter57Value'] = $parameter57Value; return $this; } /** * Parameter name * * @param string $parameter58Name Parameter name * @return $this Fluent Builder */ public function setParameter58Name(string $parameter58Name): self { $this->options['parameter58Name'] = $parameter58Name; return $this; } /** * Parameter value * * @param string $parameter58Value Parameter value * @return $this Fluent Builder */ public function setParameter58Value(string $parameter58Value): self { $this->options['parameter58Value'] = $parameter58Value; return $this; } /** * Parameter name * * @param string $parameter59Name Parameter name * @return $this Fluent Builder */ public function setParameter59Name(string $parameter59Name): self { $this->options['parameter59Name'] = $parameter59Name; return $this; } /** * Parameter value * * @param string $parameter59Value Parameter value * @return $this Fluent Builder */ public function setParameter59Value(string $parameter59Value): self { $this->options['parameter59Value'] = $parameter59Value; return $this; } /** * Parameter name * * @param string $parameter60Name Parameter name * @return $this Fluent Builder */ public function setParameter60Name(string $parameter60Name): self { $this->options['parameter60Name'] = $parameter60Name; return $this; } /** * Parameter value * * @param string $parameter60Value Parameter value * @return $this Fluent Builder */ public function setParameter60Value(string $parameter60Value): self { $this->options['parameter60Value'] = $parameter60Value; return $this; } /** * Parameter name * * @param string $parameter61Name Parameter name * @return $this Fluent Builder */ public function setParameter61Name(string $parameter61Name): self { $this->options['parameter61Name'] = $parameter61Name; return $this; } /** * Parameter value * * @param string $parameter61Value Parameter value * @return $this Fluent Builder */ public function setParameter61Value(string $parameter61Value): self { $this->options['parameter61Value'] = $parameter61Value; return $this; } /** * Parameter name * * @param string $parameter62Name Parameter name * @return $this Fluent Builder */ public function setParameter62Name(string $parameter62Name): self { $this->options['parameter62Name'] = $parameter62Name; return $this; } /** * Parameter value * * @param string $parameter62Value Parameter value * @return $this Fluent Builder */ public function setParameter62Value(string $parameter62Value): self { $this->options['parameter62Value'] = $parameter62Value; return $this; } /** * Parameter name * * @param string $parameter63Name Parameter name * @return $this Fluent Builder */ public function setParameter63Name(string $parameter63Name): self { $this->options['parameter63Name'] = $parameter63Name; return $this; } /** * Parameter value * * @param string $parameter63Value Parameter value * @return $this Fluent Builder */ public function setParameter63Value(string $parameter63Value): self { $this->options['parameter63Value'] = $parameter63Value; return $this; } /** * Parameter name * * @param string $parameter64Name Parameter name * @return $this Fluent Builder */ public function setParameter64Name(string $parameter64Name): self { $this->options['parameter64Name'] = $parameter64Name; return $this; } /** * Parameter value * * @param string $parameter64Value Parameter value * @return $this Fluent Builder */ public function setParameter64Value(string $parameter64Value): self { $this->options['parameter64Value'] = $parameter64Value; return $this; } /** * Parameter name * * @param string $parameter65Name Parameter name * @return $this Fluent Builder */ public function setParameter65Name(string $parameter65Name): self { $this->options['parameter65Name'] = $parameter65Name; return $this; } /** * Parameter value * * @param string $parameter65Value Parameter value * @return $this Fluent Builder */ public function setParameter65Value(string $parameter65Value): self { $this->options['parameter65Value'] = $parameter65Value; return $this; } /** * Parameter name * * @param string $parameter66Name Parameter name * @return $this Fluent Builder */ public function setParameter66Name(string $parameter66Name): self { $this->options['parameter66Name'] = $parameter66Name; return $this; } /** * Parameter value * * @param string $parameter66Value Parameter value * @return $this Fluent Builder */ public function setParameter66Value(string $parameter66Value): self { $this->options['parameter66Value'] = $parameter66Value; return $this; } /** * Parameter name * * @param string $parameter67Name Parameter name * @return $this Fluent Builder */ public function setParameter67Name(string $parameter67Name): self { $this->options['parameter67Name'] = $parameter67Name; return $this; } /** * Parameter value * * @param string $parameter67Value Parameter value * @return $this Fluent Builder */ public function setParameter67Value(string $parameter67Value): self { $this->options['parameter67Value'] = $parameter67Value; return $this; } /** * Parameter name * * @param string $parameter68Name Parameter name * @return $this Fluent Builder */ public function setParameter68Name(string $parameter68Name): self { $this->options['parameter68Name'] = $parameter68Name; return $this; } /** * Parameter value * * @param string $parameter68Value Parameter value * @return $this Fluent Builder */ public function setParameter68Value(string $parameter68Value): self { $this->options['parameter68Value'] = $parameter68Value; return $this; } /** * Parameter name * * @param string $parameter69Name Parameter name * @return $this Fluent Builder */ public function setParameter69Name(string $parameter69Name): self { $this->options['parameter69Name'] = $parameter69Name; return $this; } /** * Parameter value * * @param string $parameter69Value Parameter value * @return $this Fluent Builder */ public function setParameter69Value(string $parameter69Value): self { $this->options['parameter69Value'] = $parameter69Value; return $this; } /** * Parameter name * * @param string $parameter70Name Parameter name * @return $this Fluent Builder */ public function setParameter70Name(string $parameter70Name): self { $this->options['parameter70Name'] = $parameter70Name; return $this; } /** * Parameter value * * @param string $parameter70Value Parameter value * @return $this Fluent Builder */ public function setParameter70Value(string $parameter70Value): self { $this->options['parameter70Value'] = $parameter70Value; return $this; } /** * Parameter name * * @param string $parameter71Name Parameter name * @return $this Fluent Builder */ public function setParameter71Name(string $parameter71Name): self { $this->options['parameter71Name'] = $parameter71Name; return $this; } /** * Parameter value * * @param string $parameter71Value Parameter value * @return $this Fluent Builder */ public function setParameter71Value(string $parameter71Value): self { $this->options['parameter71Value'] = $parameter71Value; return $this; } /** * Parameter name * * @param string $parameter72Name Parameter name * @return $this Fluent Builder */ public function setParameter72Name(string $parameter72Name): self { $this->options['parameter72Name'] = $parameter72Name; return $this; } /** * Parameter value * * @param string $parameter72Value Parameter value * @return $this Fluent Builder */ public function setParameter72Value(string $parameter72Value): self { $this->options['parameter72Value'] = $parameter72Value; return $this; } /** * Parameter name * * @param string $parameter73Name Parameter name * @return $this Fluent Builder */ public function setParameter73Name(string $parameter73Name): self { $this->options['parameter73Name'] = $parameter73Name; return $this; } /** * Parameter value * * @param string $parameter73Value Parameter value * @return $this Fluent Builder */ public function setParameter73Value(string $parameter73Value): self { $this->options['parameter73Value'] = $parameter73Value; return $this; } /** * Parameter name * * @param string $parameter74Name Parameter name * @return $this Fluent Builder */ public function setParameter74Name(string $parameter74Name): self { $this->options['parameter74Name'] = $parameter74Name; return $this; } /** * Parameter value * * @param string $parameter74Value Parameter value * @return $this Fluent Builder */ public function setParameter74Value(string $parameter74Value): self { $this->options['parameter74Value'] = $parameter74Value; return $this; } /** * Parameter name * * @param string $parameter75Name Parameter name * @return $this Fluent Builder */ public function setParameter75Name(string $parameter75Name): self { $this->options['parameter75Name'] = $parameter75Name; return $this; } /** * Parameter value * * @param string $parameter75Value Parameter value * @return $this Fluent Builder */ public function setParameter75Value(string $parameter75Value): self { $this->options['parameter75Value'] = $parameter75Value; return $this; } /** * Parameter name * * @param string $parameter76Name Parameter name * @return $this Fluent Builder */ public function setParameter76Name(string $parameter76Name): self { $this->options['parameter76Name'] = $parameter76Name; return $this; } /** * Parameter value * * @param string $parameter76Value Parameter value * @return $this Fluent Builder */ public function setParameter76Value(string $parameter76Value): self { $this->options['parameter76Value'] = $parameter76Value; return $this; } /** * Parameter name * * @param string $parameter77Name Parameter name * @return $this Fluent Builder */ public function setParameter77Name(string $parameter77Name): self { $this->options['parameter77Name'] = $parameter77Name; return $this; } /** * Parameter value * * @param string $parameter77Value Parameter value * @return $this Fluent Builder */ public function setParameter77Value(string $parameter77Value): self { $this->options['parameter77Value'] = $parameter77Value; return $this; } /** * Parameter name * * @param string $parameter78Name Parameter name * @return $this Fluent Builder */ public function setParameter78Name(string $parameter78Name): self { $this->options['parameter78Name'] = $parameter78Name; return $this; } /** * Parameter value * * @param string $parameter78Value Parameter value * @return $this Fluent Builder */ public function setParameter78Value(string $parameter78Value): self { $this->options['parameter78Value'] = $parameter78Value; return $this; } /** * Parameter name * * @param string $parameter79Name Parameter name * @return $this Fluent Builder */ public function setParameter79Name(string $parameter79Name): self { $this->options['parameter79Name'] = $parameter79Name; return $this; } /** * Parameter value * * @param string $parameter79Value Parameter value * @return $this Fluent Builder */ public function setParameter79Value(string $parameter79Value): self { $this->options['parameter79Value'] = $parameter79Value; return $this; } /** * Parameter name * * @param string $parameter80Name Parameter name * @return $this Fluent Builder */ public function setParameter80Name(string $parameter80Name): self { $this->options['parameter80Name'] = $parameter80Name; return $this; } /** * Parameter value * * @param string $parameter80Value Parameter value * @return $this Fluent Builder */ public function setParameter80Value(string $parameter80Value): self { $this->options['parameter80Value'] = $parameter80Value; return $this; } /** * Parameter name * * @param string $parameter81Name Parameter name * @return $this Fluent Builder */ public function setParameter81Name(string $parameter81Name): self { $this->options['parameter81Name'] = $parameter81Name; return $this; } /** * Parameter value * * @param string $parameter81Value Parameter value * @return $this Fluent Builder */ public function setParameter81Value(string $parameter81Value): self { $this->options['parameter81Value'] = $parameter81Value; return $this; } /** * Parameter name * * @param string $parameter82Name Parameter name * @return $this Fluent Builder */ public function setParameter82Name(string $parameter82Name): self { $this->options['parameter82Name'] = $parameter82Name; return $this; } /** * Parameter value * * @param string $parameter82Value Parameter value * @return $this Fluent Builder */ public function setParameter82Value(string $parameter82Value): self { $this->options['parameter82Value'] = $parameter82Value; return $this; } /** * Parameter name * * @param string $parameter83Name Parameter name * @return $this Fluent Builder */ public function setParameter83Name(string $parameter83Name): self { $this->options['parameter83Name'] = $parameter83Name; return $this; } /** * Parameter value * * @param string $parameter83Value Parameter value * @return $this Fluent Builder */ public function setParameter83Value(string $parameter83Value): self { $this->options['parameter83Value'] = $parameter83Value; return $this; } /** * Parameter name * * @param string $parameter84Name Parameter name * @return $this Fluent Builder */ public function setParameter84Name(string $parameter84Name): self { $this->options['parameter84Name'] = $parameter84Name; return $this; } /** * Parameter value * * @param string $parameter84Value Parameter value * @return $this Fluent Builder */ public function setParameter84Value(string $parameter84Value): self { $this->options['parameter84Value'] = $parameter84Value; return $this; } /** * Parameter name * * @param string $parameter85Name Parameter name * @return $this Fluent Builder */ public function setParameter85Name(string $parameter85Name): self { $this->options['parameter85Name'] = $parameter85Name; return $this; } /** * Parameter value * * @param string $parameter85Value Parameter value * @return $this Fluent Builder */ public function setParameter85Value(string $parameter85Value): self { $this->options['parameter85Value'] = $parameter85Value; return $this; } /** * Parameter name * * @param string $parameter86Name Parameter name * @return $this Fluent Builder */ public function setParameter86Name(string $parameter86Name): self { $this->options['parameter86Name'] = $parameter86Name; return $this; } /** * Parameter value * * @param string $parameter86Value Parameter value * @return $this Fluent Builder */ public function setParameter86Value(string $parameter86Value): self { $this->options['parameter86Value'] = $parameter86Value; return $this; } /** * Parameter name * * @param string $parameter87Name Parameter name * @return $this Fluent Builder */ public function setParameter87Name(string $parameter87Name): self { $this->options['parameter87Name'] = $parameter87Name; return $this; } /** * Parameter value * * @param string $parameter87Value Parameter value * @return $this Fluent Builder */ public function setParameter87Value(string $parameter87Value): self { $this->options['parameter87Value'] = $parameter87Value; return $this; } /** * Parameter name * * @param string $parameter88Name Parameter name * @return $this Fluent Builder */ public function setParameter88Name(string $parameter88Name): self { $this->options['parameter88Name'] = $parameter88Name; return $this; } /** * Parameter value * * @param string $parameter88Value Parameter value * @return $this Fluent Builder */ public function setParameter88Value(string $parameter88Value): self { $this->options['parameter88Value'] = $parameter88Value; return $this; } /** * Parameter name * * @param string $parameter89Name Parameter name * @return $this Fluent Builder */ public function setParameter89Name(string $parameter89Name): self { $this->options['parameter89Name'] = $parameter89Name; return $this; } /** * Parameter value * * @param string $parameter89Value Parameter value * @return $this Fluent Builder */ public function setParameter89Value(string $parameter89Value): self { $this->options['parameter89Value'] = $parameter89Value; return $this; } /** * Parameter name * * @param string $parameter90Name Parameter name * @return $this Fluent Builder */ public function setParameter90Name(string $parameter90Name): self { $this->options['parameter90Name'] = $parameter90Name; return $this; } /** * Parameter value * * @param string $parameter90Value Parameter value * @return $this Fluent Builder */ public function setParameter90Value(string $parameter90Value): self { $this->options['parameter90Value'] = $parameter90Value; return $this; } /** * Parameter name * * @param string $parameter91Name Parameter name * @return $this Fluent Builder */ public function setParameter91Name(string $parameter91Name): self { $this->options['parameter91Name'] = $parameter91Name; return $this; } /** * Parameter value * * @param string $parameter91Value Parameter value * @return $this Fluent Builder */ public function setParameter91Value(string $parameter91Value): self { $this->options['parameter91Value'] = $parameter91Value; return $this; } /** * Parameter name * * @param string $parameter92Name Parameter name * @return $this Fluent Builder */ public function setParameter92Name(string $parameter92Name): self { $this->options['parameter92Name'] = $parameter92Name; return $this; } /** * Parameter value * * @param string $parameter92Value Parameter value * @return $this Fluent Builder */ public function setParameter92Value(string $parameter92Value): self { $this->options['parameter92Value'] = $parameter92Value; return $this; } /** * Parameter name * * @param string $parameter93Name Parameter name * @return $this Fluent Builder */ public function setParameter93Name(string $parameter93Name): self { $this->options['parameter93Name'] = $parameter93Name; return $this; } /** * Parameter value * * @param string $parameter93Value Parameter value * @return $this Fluent Builder */ public function setParameter93Value(string $parameter93Value): self { $this->options['parameter93Value'] = $parameter93Value; return $this; } /** * Parameter name * * @param string $parameter94Name Parameter name * @return $this Fluent Builder */ public function setParameter94Name(string $parameter94Name): self { $this->options['parameter94Name'] = $parameter94Name; return $this; } /** * Parameter value * * @param string $parameter94Value Parameter value * @return $this Fluent Builder */ public function setParameter94Value(string $parameter94Value): self { $this->options['parameter94Value'] = $parameter94Value; return $this; } /** * Parameter name * * @param string $parameter95Name Parameter name * @return $this Fluent Builder */ public function setParameter95Name(string $parameter95Name): self { $this->options['parameter95Name'] = $parameter95Name; return $this; } /** * Parameter value * * @param string $parameter95Value Parameter value * @return $this Fluent Builder */ public function setParameter95Value(string $parameter95Value): self { $this->options['parameter95Value'] = $parameter95Value; return $this; } /** * Parameter name * * @param string $parameter96Name Parameter name * @return $this Fluent Builder */ public function setParameter96Name(string $parameter96Name): self { $this->options['parameter96Name'] = $parameter96Name; return $this; } /** * Parameter value * * @param string $parameter96Value Parameter value * @return $this Fluent Builder */ public function setParameter96Value(string $parameter96Value): self { $this->options['parameter96Value'] = $parameter96Value; return $this; } /** * Parameter name * * @param string $parameter97Name Parameter name * @return $this Fluent Builder */ public function setParameter97Name(string $parameter97Name): self { $this->options['parameter97Name'] = $parameter97Name; return $this; } /** * Parameter value * * @param string $parameter97Value Parameter value * @return $this Fluent Builder */ public function setParameter97Value(string $parameter97Value): self { $this->options['parameter97Value'] = $parameter97Value; return $this; } /** * Parameter name * * @param string $parameter98Name Parameter name * @return $this Fluent Builder */ public function setParameter98Name(string $parameter98Name): self { $this->options['parameter98Name'] = $parameter98Name; return $this; } /** * Parameter value * * @param string $parameter98Value Parameter value * @return $this Fluent Builder */ public function setParameter98Value(string $parameter98Value): self { $this->options['parameter98Value'] = $parameter98Value; return $this; } /** * Parameter name * * @param string $parameter99Name Parameter name * @return $this Fluent Builder */ public function setParameter99Name(string $parameter99Name): self { $this->options['parameter99Name'] = $parameter99Name; return $this; } /** * Parameter value * * @param string $parameter99Value Parameter value * @return $this Fluent Builder */ public function setParameter99Value(string $parameter99Value): self { $this->options['parameter99Value'] = $parameter99Value; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateSiprecOptions ' . $options . ']'; } }PKt[^C ITwilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionList.phpnu[solution = ['accountSid' => $accountSid, 'callSid' => $callSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/UserDefinedMessageSubscriptions.json'; } /** * Create the UserDefinedMessageSubscriptionInstance * * @param string $callback The URL we should call to send user defined messages. * @param array|Options $options Optional Arguments * @return UserDefinedMessageSubscriptionInstance Created * UserDefinedMessageSubscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $callback, array $options = []): UserDefinedMessageSubscriptionInstance { $options = new Values($options); $data = Values::of([ 'Callback' => $callback, 'IdempotencyKey' => $options['idempotencyKey'], 'Method' => $options['method'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new UserDefinedMessageSubscriptionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Constructs a UserDefinedMessageSubscriptionContext * * @param string $sid User Defined Message Subscription SID. */ public function getContext(string $sid): UserDefinedMessageSubscriptionContext { return new UserDefinedMessageSubscriptionContext( $this->version, $this->solution['accountSid'], $this->solution['callSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UserDefinedMessageSubscriptionList]'; } }PKt[J#̷JJ=Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserDefinedMessageInstance \Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageInstance */ public function buildInstance(array $payload): UserDefinedMessageInstance { return new UserDefinedMessageInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['callSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.UserDefinedMessagePage]'; } }PKt[0y:Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FeedbackSummaryInstance \Twilio\Rest\Api\V2010\Account\Call\FeedbackSummaryInstance */ public function buildInstance(array $payload): FeedbackSummaryInstance { return new FeedbackSummaryInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackSummaryPage]'; } }PKt[J >Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callCount' => Values::array_get($payload, 'call_count'), 'callFeedbackCount' => Values::array_get($payload, 'call_feedback_count'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'includeSubaccounts' => Values::array_get($payload, 'include_subaccounts'), 'issues' => Values::array_get($payload, 'issues'), 'qualityScoreAverage' => Values::array_get($payload, 'quality_score_average'), 'qualityScoreMedian' => Values::array_get($payload, 'quality_score_median'), 'qualityScoreStandardDeviation' => Values::array_get($payload, 'quality_score_standard_deviation'), 'sid' => Values::array_get($payload, 'sid'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'status' => Values::array_get($payload, 'status'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FeedbackSummaryContext Context for this FeedbackSummaryInstance */ protected function proxy(): FeedbackSummaryContext { if (!$this->context) { $this->context = new FeedbackSummaryContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FeedbackSummaryInstance * * @return FeedbackSummaryInstance Fetched FeedbackSummaryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FeedbackSummaryInstance { return $this->proxy()->fetch(); } /** * Delete the FeedbackSummaryInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.FeedbackSummaryInstance ' . \implode(' ', $context) . ']'; } }PKt[uu7Twilio/Rest/Api/V2010/Account/TranscriptionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'duration' => Values::array_get($payload, 'duration'), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'recordingSid' => Values::array_get($payload, 'recording_sid'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'transcriptionText' => Values::array_get($payload, 'transcription_text'), 'type' => Values::array_get($payload, 'type'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TranscriptionContext Context for this TranscriptionInstance */ protected function proxy(): TranscriptionContext { if (!$this->context) { $this->context = new TranscriptionContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TranscriptionInstance * * @return TranscriptionInstance Fetched TranscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TranscriptionInstance { return $this->proxy()->fetch(); } /** * Delete the TranscriptionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.TranscriptionInstance ' . \implode(' ', $context) . ']'; } }PKt[-a\\5Twilio/Rest/Api/V2010/Account/Usage/RecordOptions.phpnu[options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadRecordOptions ' . $options . ']'; } }PKt[l8i i 6Twilio/Rest/Api/V2010/Account/Usage/TriggerContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Triggers/' . \rawurlencode($sid) . '.json'; } /** * Fetch the TriggerInstance * * @return TriggerInstance Fetched TriggerInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TriggerInstance { $payload = $this->version->fetch('GET', $this->uri); return new TriggerInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the TriggerInstance * * @param array|Options $options Optional Arguments * @return TriggerInstance Updated TriggerInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TriggerInstance { $options = new Values($options); $data = Values::of([ 'CallbackMethod' => $options['callbackMethod'], 'CallbackUrl' => $options['callbackUrl'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TriggerInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Delete the TriggerInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.TriggerContext ' . \implode(' ', $context) . ']'; } }PKt[63Twilio/Rest/Api/V2010/Account/Usage/TriggerPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TriggerInstance \Twilio\Rest\Api\V2010\Account\Usage\TriggerInstance */ public function buildInstance(array $payload): TriggerInstance { return new TriggerInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TriggerPage]'; } }PKt[Xz2Twilio/Rest/Api/V2010/Account/Usage/RecordPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RecordInstance \Twilio\Rest\Api\V2010\Account\Usage\RecordInstance */ public function buildInstance(array $payload): RecordInstance { return new RecordInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordPage]'; } }PKt[Ǝ3<Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return YesterdayInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\YesterdayInstance */ public function buildInstance(array $payload): YesterdayInstance { return new YesterdayInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.YesterdayPage]'; } }PKt[2:Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AllTimeInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\AllTimeInstance */ public function buildInstance(array $payload): AllTimeInstance { return new AllTimeInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AllTimePage]'; } }PKt[n<Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ThisMonthInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\ThisMonthInstance */ public function buildInstance(array $payload): ThisMonthInstance { return new ThisMonthInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ThisMonthPage]'; } }PKt[Xd= <Twilio/Rest/Api/V2010/Account/Usage/Record/TodayInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TodayInstance]'; } }PKt[X:Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/AllTime.json'; } /** * Streams AllTimeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AllTimeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AllTimeInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of AllTimeInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AllTimePage Page of AllTimeInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AllTimePage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AllTimePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AllTimeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AllTimePage Page of AllTimeInstance */ public function getPage(string $targetUrl): AllTimePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AllTimePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AllTimeList]'; } }PKt[0F >Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AllTimeInstance]'; } }PKt[L @Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.YesterdayInstance]'; } }PKt[6 <Twilio/Rest/Api/V2010/Account/Usage/Record/DailyInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DailyInstance]'; } }PKt[P uu?Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayOptions.phpnu[options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadYesterdayOptions ' . $options . ']'; } }PKt[ Lֽ<Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/ThisMonth.json'; } /** * Streams ThisMonthInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ThisMonthInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ThisMonthInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ThisMonthInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ThisMonthPage Page of ThisMonthInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ThisMonthPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ThisMonthPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ThisMonthInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ThisMonthPage Page of ThisMonthInstance */ public function getPage(string $targetUrl): ThisMonthPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ThisMonthPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ThisMonthList]'; } }PKt[jh]];Twilio/Rest/Api/V2010/Account/Usage/Record/TodayOptions.phpnu[options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadTodayOptions ' . $options . ']'; } }PKt[difyy8Twilio/Rest/Api/V2010/Account/Usage/Record/TodayList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Today.json'; } /** * Streams TodayInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TodayInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TodayInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TodayInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TodayPage Page of TodayInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TodayPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TodayPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TodayInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TodayPage Page of TodayInstance */ public function getPage(string $targetUrl): TodayPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TodayPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TodayList]'; } }PKt[*Ouu?Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthOptions.phpnu[options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadLastMonthOptions ' . $options . ']'; } }PKt[: yy8Twilio/Rest/Api/V2010/Account/Usage/Record/DailyList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Daily.json'; } /** * Streams DailyInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DailyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DailyInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of DailyInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DailyPage Page of DailyInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DailyPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DailyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DailyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DailyPage Page of DailyInstance */ public function getPage(string $targetUrl): DailyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DailyPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DailyList]'; } }PKt[:Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MonthlyInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\MonthlyInstance */ public function buildInstance(array $payload): MonthlyInstance { return new MonthlyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MonthlyPage]'; } }PKt[ >Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MonthlyInstance]'; } }PKt[1JD<Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/LastMonth.json'; } /** * Streams LastMonthInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads LastMonthInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return LastMonthInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of LastMonthInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return LastMonthPage Page of LastMonthInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): LastMonthPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new LastMonthPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of LastMonthInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return LastMonthPage Page of LastMonthInstance */ public function getPage(string $targetUrl): LastMonthPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new LastMonthPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LastMonthList]'; } }PKt[:7<Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return LastMonthInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\LastMonthInstance */ public function buildInstance(array $payload): LastMonthInstance { return new LastMonthInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LastMonthPage]'; } }PKt[b<2 @Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ThisMonthInstance]'; } }PKt[8Twilio/Rest/Api/V2010/Account/Usage/Record/TodayPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TodayInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\TodayInstance */ public function buildInstance(array $payload): TodayInstance { return new TodayInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TodayPage]'; } }PKt[cc<Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyOptions.phpnu[options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadYearlyOptions ' . $options . ']'; } }PKt[-!:Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Monthly.json'; } /** * Streams MonthlyInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MonthlyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MonthlyInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MonthlyInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MonthlyPage Page of MonthlyInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MonthlyPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MonthlyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MonthlyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MonthlyPage Page of MonthlyInstance */ public function getPage(string $targetUrl): MonthlyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MonthlyPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MonthlyList]'; } }PKt[/f =Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.YearlyInstance]'; } }PKt[K>xii=Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeOptions.phpnu[options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadAllTimeOptions ' . $options . ']'; } }PKt[V*9Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Yearly.json'; } /** * Streams YearlyInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads YearlyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return YearlyInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of YearlyInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return YearlyPage Page of YearlyInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): YearlyPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new YearlyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of YearlyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return YearlyPage Page of YearlyInstance */ public function getPage(string $targetUrl): YearlyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new YearlyPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.YearlyList]'; } }PKt[]];Twilio/Rest/Api/V2010/Account/Usage/Record/DailyOptions.phpnu[options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadDailyOptions ' . $options . ']'; } }PKt[[_8Twilio/Rest/Api/V2010/Account/Usage/Record/DailyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DailyInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\DailyInstance */ public function buildInstance(array $payload): DailyInstance { return new DailyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.DailyPage]'; } }PKt[8u.9Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return YearlyInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\YearlyInstance */ public function buildInstance(array $payload): YearlyInstance { return new YearlyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.YearlyPage]'; } }PKt[L;s<Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Yesterday.json'; } /** * Streams YesterdayInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads YesterdayInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return YesterdayInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of YesterdayInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return YesterdayPage Page of YesterdayInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): YesterdayPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new YesterdayPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of YesterdayInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return YesterdayPage Page of YesterdayInstance */ public function getPage(string $targetUrl): YesterdayPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new YesterdayPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.YesterdayList]'; } }PKt[Qhuu?Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthOptions.phpnu[options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadThisMonthOptions ' . $options . ']'; } }PKt[5޻ @Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LastMonthInstance]'; } }PKt[3=ii=Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyOptions.phpnu[options['category'] = $category; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['includeSubaccounts'] = $includeSubaccounts; } /** * The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. * * @param string $category The usage category of the UsageRecord resources to * read * @return $this Fluent Builder */ public function setCategory(string $category): self { $this->options['category'] = $category; return $this; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. * * @param bool $includeSubaccounts Whether to include usage from the master * account and all its subaccounts * @return $this Fluent Builder */ public function setIncludeSubaccounts(bool $includeSubaccounts): self { $this->options['includeSubaccounts'] = $includeSubaccounts; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadMonthlyOptions ' . $options . ']'; } }PKt[OOh%h%6Twilio/Rest/Api/V2010/Account/Usage/TriggerOptions.phpnu[options['callbackMethod'] = $callbackMethod; $this->options['callbackUrl'] = $callbackUrl; $this->options['friendlyName'] = $friendlyName; } /** * The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. * * @param string $callbackMethod The HTTP method to use to call callback_url * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * The URL we should call using `callback_method` when the trigger fires. * * @param string $callbackUrl The URL we call when the trigger fires * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateTriggerOptions ' . $options . ']'; } } class CreateTriggerOptions extends Options { /** * @param string $callbackMethod The HTTP method to use to call callback_url * @param string $friendlyName A string to describe the resource * @param string $recurring The frequency of a recurring UsageTrigger * @param string $triggerBy The field in the UsageRecord resource that fires * the trigger */ public function __construct(string $callbackMethod = Values::NONE, string $friendlyName = Values::NONE, string $recurring = Values::NONE, string $triggerBy = Values::NONE) { $this->options['callbackMethod'] = $callbackMethod; $this->options['friendlyName'] = $friendlyName; $this->options['recurring'] = $recurring; $this->options['triggerBy'] = $triggerBy; } /** * The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. * * @param string $callbackMethod The HTTP method to use to call callback_url * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The frequency of a recurring UsageTrigger. Can be: `daily`, `monthly`, or `yearly` for recurring triggers or empty for non-recurring triggers. A trigger will only fire once during each period. Recurring times are in GMT. * * @param string $recurring The frequency of a recurring UsageTrigger * @return $this Fluent Builder */ public function setRecurring(string $recurring): self { $this->options['recurring'] = $recurring; return $this; } /** * The field in the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource that should fire the trigger. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). The default is `usage`. * * @param string $triggerBy The field in the UsageRecord resource that fires * the trigger * @return $this Fluent Builder */ public function setTriggerBy(string $triggerBy): self { $this->options['triggerBy'] = $triggerBy; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateTriggerOptions ' . $options . ']'; } } class ReadTriggerOptions extends Options { /** * @param string $recurring The frequency of recurring UsageTriggers to read * @param string $triggerBy The trigger field of the UsageTriggers to read * @param string $usageCategory The usage category of the UsageTriggers to read */ public function __construct(string $recurring = Values::NONE, string $triggerBy = Values::NONE, string $usageCategory = Values::NONE) { $this->options['recurring'] = $recurring; $this->options['triggerBy'] = $triggerBy; $this->options['usageCategory'] = $usageCategory; } /** * The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers. * * @param string $recurring The frequency of recurring UsageTriggers to read * @return $this Fluent Builder */ public function setRecurring(string $recurring): self { $this->options['recurring'] = $recurring; return $this; } /** * The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). * * @param string $triggerBy The trigger field of the UsageTriggers to read * @return $this Fluent Builder */ public function setTriggerBy(string $triggerBy): self { $this->options['triggerBy'] = $triggerBy; return $this; } /** * The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). * * @param string $usageCategory The usage category of the UsageTriggers to read * @return $this Fluent Builder */ public function setUsageCategory(string $usageCategory): self { $this->options['usageCategory'] = $usageCategory; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadTriggerOptions ' . $options . ']'; } }PKt[&GU%%2Twilio/Rest/Api/V2010/Account/Usage/RecordList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records.json'; } /** * Streams RecordInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RecordInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RecordInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RecordInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RecordPage Page of RecordInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RecordPage { $options = new Values($options); $params = Values::of([ 'Category' => $options['category'], 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RecordPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RecordInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RecordPage Page of RecordInstance */ public function getPage(string $targetUrl): RecordPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RecordPage($this->version, $response, $this->solution); } /** * Access the allTime */ protected function getAllTime(): AllTimeList { if (!$this->_allTime) { $this->_allTime = new AllTimeList($this->version, $this->solution['accountSid']); } return $this->_allTime; } /** * Access the daily */ protected function getDaily(): DailyList { if (!$this->_daily) { $this->_daily = new DailyList($this->version, $this->solution['accountSid']); } return $this->_daily; } /** * Access the lastMonth */ protected function getLastMonth(): LastMonthList { if (!$this->_lastMonth) { $this->_lastMonth = new LastMonthList($this->version, $this->solution['accountSid']); } return $this->_lastMonth; } /** * Access the monthly */ protected function getMonthly(): MonthlyList { if (!$this->_monthly) { $this->_monthly = new MonthlyList($this->version, $this->solution['accountSid']); } return $this->_monthly; } /** * Access the thisMonth */ protected function getThisMonth(): ThisMonthList { if (!$this->_thisMonth) { $this->_thisMonth = new ThisMonthList($this->version, $this->solution['accountSid']); } return $this->_thisMonth; } /** * Access the today */ protected function getToday(): TodayList { if (!$this->_today) { $this->_today = new TodayList($this->version, $this->solution['accountSid']); } return $this->_today; } /** * Access the yearly */ protected function getYearly(): YearlyList { if (!$this->_yearly) { $this->_yearly = new YearlyList($this->version, $this->solution['accountSid']); } return $this->_yearly; } /** * Access the yesterday */ protected function getYesterday(): YesterdayList { if (!$this->_yesterday) { $this->_yesterday = new YesterdayList($this->version, $this->solution['accountSid']); } return $this->_yesterday; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordList]'; } }PKt[]pp7Twilio/Rest/Api/V2010/Account/Usage/TriggerInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'callbackMethod' => Values::array_get($payload, 'callback_method'), 'callbackUrl' => Values::array_get($payload, 'callback_url'), 'currentValue' => Values::array_get($payload, 'current_value'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateFired' => Deserialize::dateTime(Values::array_get($payload, 'date_fired')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'recurring' => Values::array_get($payload, 'recurring'), 'sid' => Values::array_get($payload, 'sid'), 'triggerBy' => Values::array_get($payload, 'trigger_by'), 'triggerValue' => Values::array_get($payload, 'trigger_value'), 'uri' => Values::array_get($payload, 'uri'), 'usageCategory' => Values::array_get($payload, 'usage_category'), 'usageRecordUri' => Values::array_get($payload, 'usage_record_uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TriggerContext Context for this TriggerInstance */ protected function proxy(): TriggerContext { if (!$this->context) { $this->context = new TriggerContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TriggerInstance * * @return TriggerInstance Fetched TriggerInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TriggerInstance { return $this->proxy()->fetch(); } /** * Update the TriggerInstance * * @param array|Options $options Optional Arguments * @return TriggerInstance Updated TriggerInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TriggerInstance { return $this->proxy()->update($options); } /** * Delete the TriggerInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.TriggerInstance ' . \implode(' ', $context) . ']'; } }PKt[85p 6Twilio/Rest/Api/V2010/Account/Usage/RecordInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'asOf' => Values::array_get($payload, 'as_of'), 'category' => Values::array_get($payload, 'category'), 'count' => Values::array_get($payload, 'count'), 'countUnit' => Values::array_get($payload, 'count_unit'), 'description' => Values::array_get($payload, 'description'), 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'uri' => Values::array_get($payload, 'uri'), 'usage' => Values::array_get($payload, 'usage'), 'usageUnit' => Values::array_get($payload, 'usage_unit'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.RecordInstance]'; } }PKt[O3Twilio/Rest/Api/V2010/Account/Usage/TriggerList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Triggers.json'; } /** * Create the TriggerInstance * * @param string $callbackUrl The URL we call when the trigger fires * @param string $triggerValue The usage value at which the trigger should fire * @param string $usageCategory The usage category the trigger watches * @param array|Options $options Optional Arguments * @return TriggerInstance Created TriggerInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $callbackUrl, string $triggerValue, string $usageCategory, array $options = []): TriggerInstance { $options = new Values($options); $data = Values::of([ 'CallbackUrl' => $callbackUrl, 'TriggerValue' => $triggerValue, 'UsageCategory' => $usageCategory, 'CallbackMethod' => $options['callbackMethod'], 'FriendlyName' => $options['friendlyName'], 'Recurring' => $options['recurring'], 'TriggerBy' => $options['triggerBy'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TriggerInstance($this->version, $payload, $this->solution['accountSid']); } /** * Streams TriggerInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TriggerInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TriggerInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TriggerInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TriggerPage Page of TriggerInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TriggerPage { $options = new Values($options); $params = Values::of([ 'Recurring' => $options['recurring'], 'TriggerBy' => $options['triggerBy'], 'UsageCategory' => $options['usageCategory'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TriggerPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TriggerInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TriggerPage Page of TriggerInstance */ public function getPage(string $targetUrl): TriggerPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TriggerPage($this->version, $response, $this->solution); } /** * Constructs a TriggerContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): TriggerContext { return new TriggerContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TriggerList]'; } }PKt[0Twilio/Rest/Api/V2010/Account/ConnectAppList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/ConnectApps.json'; } /** * Streams ConnectAppInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ConnectAppInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ConnectAppInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ConnectAppInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ConnectAppPage Page of ConnectAppInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ConnectAppPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ConnectAppPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ConnectAppInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ConnectAppPage Page of ConnectAppInstance */ public function getPage(string $targetUrl): ConnectAppPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ConnectAppPage($this->version, $response, $this->solution); } /** * Constructs a ConnectAppContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ConnectAppContext { return new ConnectAppContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ConnectAppList]'; } }PKt[Z| | /Twilio/Rest/Api/V2010/Account/TokenInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'iceServers' => Values::array_get($payload, 'ice_servers'), 'password' => Values::array_get($payload, 'password'), 'ttl' => Values::array_get($payload, 'ttl'), 'username' => Values::array_get($payload, 'username'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TokenInstance]'; } }PKt[E3Twilio/Rest/Api/V2010/Account/ConnectAppOptions.phpnu[options['authorizeRedirectUrl'] = $authorizeRedirectUrl; $this->options['companyName'] = $companyName; $this->options['deauthorizeCallbackMethod'] = $deauthorizeCallbackMethod; $this->options['deauthorizeCallbackUrl'] = $deauthorizeCallbackUrl; $this->options['description'] = $description; $this->options['friendlyName'] = $friendlyName; $this->options['homepageUrl'] = $homepageUrl; $this->options['permissions'] = $permissions; } /** * The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App. * * @param string $authorizeRedirectUrl The URL to redirect the user to after * authorization * @return $this Fluent Builder */ public function setAuthorizeRedirectUrl(string $authorizeRedirectUrl): self { $this->options['authorizeRedirectUrl'] = $authorizeRedirectUrl; return $this; } /** * The company name to set for the Connect App. * * @param string $companyName The company name to set for the Connect App * @return $this Fluent Builder */ public function setCompanyName(string $companyName): self { $this->options['companyName'] = $companyName; return $this; } /** * The HTTP method to use when calling `deauthorize_callback_url`. * * @param string $deauthorizeCallbackMethod The HTTP method to use when calling * deauthorize_callback_url * @return $this Fluent Builder */ public function setDeauthorizeCallbackMethod(string $deauthorizeCallbackMethod): self { $this->options['deauthorizeCallbackMethod'] = $deauthorizeCallbackMethod; return $this; } /** * The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App. * * @param string $deauthorizeCallbackUrl The URL to call to de-authorize the * Connect App * @return $this Fluent Builder */ public function setDeauthorizeCallbackUrl(string $deauthorizeCallbackUrl): self { $this->options['deauthorizeCallbackUrl'] = $deauthorizeCallbackUrl; return $this; } /** * A description of the Connect App. * * @param string $description A description of the Connect App * @return $this Fluent Builder */ public function setDescription(string $description): self { $this->options['description'] = $description; return $this; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * A public URL where users can obtain more information about this Connect App. * * @param string $homepageUrl A public URL where users can obtain more * information * @return $this Fluent Builder */ public function setHomepageUrl(string $homepageUrl): self { $this->options['homepageUrl'] = $homepageUrl; return $this; } /** * A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. * * @param string[] $permissions The set of permissions that your ConnectApp * will request * @return $this Fluent Builder */ public function setPermissions(array $permissions): self { $this->options['permissions'] = $permissions; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateConnectAppOptions ' . $options . ']'; } }PKt[m @Twilio/Rest/Api/V2010/Account/Recording/TranscriptionContext.phpnu[solution = ['accountSid' => $accountSid, 'recordingSid' => $recordingSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($recordingSid) . '/Transcriptions/' . \rawurlencode($sid) . '.json'; } /** * Fetch the TranscriptionInstance * * @return TranscriptionInstance Fetched TranscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TranscriptionInstance { $payload = $this->version->fetch('GET', $this->uri); return new TranscriptionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['recordingSid'], $this->solution['sid'] ); } /** * Delete the TranscriptionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.TranscriptionContext ' . \implode(' ', $context) . ']'; } }PKt[>mCTwilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadList.phpnu[solution = [ 'accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'addOnResultSid' => $addOnResultSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults/' . \rawurlencode($addOnResultSid) . '/Payloads.json'; } /** * Streams PayloadInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads PayloadInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return PayloadInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of PayloadInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return PayloadPage Page of PayloadInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): PayloadPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new PayloadPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of PayloadInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return PayloadPage Page of PayloadInstance */ public function getPage(string $targetUrl): PayloadPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new PayloadPage($this->version, $response, $this->solution); } /** * Constructs a PayloadContext * * @param string $sid The unique string that identifies the resource to fetch */ public function getContext(string $sid): PayloadContext { return new PayloadContext( $this->version, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['addOnResultSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.PayloadList]'; } }PKt[mLBt^^CTwilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PayloadInstance \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadInstance */ public function buildInstance(array $payload): PayloadInstance { return new PayloadInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['addOnResultSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.PayloadPage]'; } }PKt[?==GTwilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'addOnResultSid' => Values::array_get($payload, 'add_on_result_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'label' => Values::array_get($payload, 'label'), 'addOnSid' => Values::array_get($payload, 'add_on_sid'), 'addOnConfigurationSid' => Values::array_get($payload, 'add_on_configuration_sid'), 'contentType' => Values::array_get($payload, 'content_type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'referenceSid' => Values::array_get($payload, 'reference_sid'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = [ 'accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'addOnResultSid' => $addOnResultSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PayloadContext Context for this PayloadInstance */ protected function proxy(): PayloadContext { if (!$this->context) { $this->context = new PayloadContext( $this->version, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['addOnResultSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the PayloadInstance * * @return PayloadInstance Fetched PayloadInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PayloadInstance { return $this->proxy()->fetch(); } /** * Delete the PayloadInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.PayloadInstance ' . \implode(' ', $context) . ']'; } }PKt[whr FTwilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadContext.phpnu[solution = [ 'accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'addOnResultSid' => $addOnResultSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults/' . \rawurlencode($addOnResultSid) . '/Payloads/' . \rawurlencode($sid) . '.json'; } /** * Fetch the PayloadInstance * * @return PayloadInstance Fetched PayloadInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PayloadInstance { $payload = $this->version->fetch('GET', $this->uri); return new PayloadInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['addOnResultSid'], $this->solution['sid'] ); } /** * Delete the PayloadInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.PayloadContext ' . \implode(' ', $context) . ']'; } }PKt[ <=Twilio/Rest/Api/V2010/Account/Recording/TranscriptionList.phpnu[solution = ['accountSid' => $accountSid, 'recordingSid' => $recordingSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($recordingSid) . '/Transcriptions.json'; } /** * Streams TranscriptionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TranscriptionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TranscriptionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of TranscriptionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TranscriptionPage Page of TranscriptionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TranscriptionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TranscriptionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TranscriptionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TranscriptionPage Page of TranscriptionInstance */ public function getPage(string $targetUrl): TranscriptionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TranscriptionPage($this->version, $response, $this->solution); } /** * Constructs a TranscriptionContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): TranscriptionContext { return new TranscriptionContext( $this->version, $this->solution['accountSid'], $this->solution['recordingSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TranscriptionList]'; } }PKt[u'.//;Twilio/Rest/Api/V2010/Account/Recording/AddOnResultPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AddOnResultInstance \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultInstance */ public function buildInstance(array $payload): AddOnResultInstance { return new AddOnResultInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['referenceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AddOnResultPage]'; } }PKt[bf;;=Twilio/Rest/Api/V2010/Account/Recording/TranscriptionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TranscriptionInstance \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionInstance */ public function buildInstance(array $payload): TranscriptionInstance { return new TranscriptionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['recordingSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TranscriptionPage]'; } }PKt[U`;Twilio/Rest/Api/V2010/Account/Recording/AddOnResultList.phpnu[solution = ['accountSid' => $accountSid, 'referenceSid' => $referenceSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults.json'; } /** * Streams AddOnResultInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AddOnResultInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AddOnResultInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AddOnResultInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AddOnResultPage Page of AddOnResultInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AddOnResultPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AddOnResultPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AddOnResultInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AddOnResultPage Page of AddOnResultInstance */ public function getPage(string $targetUrl): AddOnResultPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AddOnResultPage($this->version, $response, $this->solution); } /** * Constructs a AddOnResultContext * * @param string $sid The unique string that identifies the resource to fetch */ public function getContext(string $sid): AddOnResultContext { return new AddOnResultContext( $this->version, $this->solution['accountSid'], $this->solution['referenceSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AddOnResultList]'; } }PKt["@xx>Twilio/Rest/Api/V2010/Account/Recording/AddOnResultContext.phpnu[solution = ['accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AddOnResultInstance * * @return AddOnResultInstance Fetched AddOnResultInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AddOnResultInstance { $payload = $this->version->fetch('GET', $this->uri); return new AddOnResultInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['sid'] ); } /** * Delete the AddOnResultInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the payloads */ protected function getPayloads(): PayloadList { if (!$this->_payloads) { $this->_payloads = new PayloadList( $this->version, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['sid'] ); } return $this->_payloads; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AddOnResultContext ' . \implode(' ', $context) . ']'; } }PKt[} ӐATwilio/Rest/Api/V2010/Account/Recording/TranscriptionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'duration' => Values::array_get($payload, 'duration'), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'recordingSid' => Values::array_get($payload, 'recording_sid'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'transcriptionText' => Values::array_get($payload, 'transcription_text'), 'type' => Values::array_get($payload, 'type'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'recordingSid' => $recordingSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TranscriptionContext Context for this TranscriptionInstance */ protected function proxy(): TranscriptionContext { if (!$this->context) { $this->context = new TranscriptionContext( $this->version, $this->solution['accountSid'], $this->solution['recordingSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TranscriptionInstance * * @return TranscriptionInstance Fetched TranscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TranscriptionInstance { return $this->proxy()->fetch(); } /** * Delete the TranscriptionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.TranscriptionInstance ' . \implode(' ', $context) . ']'; } }PKt[s?Twilio/Rest/Api/V2010/Account/Recording/AddOnResultInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'status' => Values::array_get($payload, 'status'), 'addOnSid' => Values::array_get($payload, 'add_on_sid'), 'addOnConfigurationSid' => Values::array_get($payload, 'add_on_configuration_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'dateCompleted' => Deserialize::dateTime(Values::array_get($payload, 'date_completed')), 'referenceSid' => Values::array_get($payload, 'reference_sid'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = [ 'accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AddOnResultContext Context for this AddOnResultInstance */ protected function proxy(): AddOnResultContext { if (!$this->context) { $this->context = new AddOnResultContext( $this->version, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AddOnResultInstance * * @return AddOnResultInstance Fetched AddOnResultInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AddOnResultInstance { return $this->proxy()->fetch(); } /** * Delete the AddOnResultInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the payloads */ protected function getPayloads(): PayloadList { return $this->proxy()->payloads; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AddOnResultInstance ' . \implode(' ', $context) . ']'; } }PKt[QY-Twilio/Rest/Api/V2010/Account/KeyInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return KeyContext Context for this KeyInstance */ protected function proxy(): KeyContext { if (!$this->context) { $this->context = new KeyContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the KeyInstance * * @return KeyInstance Fetched KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): KeyInstance { return $this->proxy()->fetch(); } /** * Update the KeyInstance * * @param array|Options $options Optional Arguments * @return KeyInstance Updated KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): KeyInstance { return $this->proxy()->update($options); } /** * Delete the KeyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.KeyInstance ' . \implode(' ', $context) . ']'; } }PKt[}xR)Twilio/Rest/Api/V2010/Account/KeyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return KeyInstance \Twilio\Rest\Api\V2010\Account\KeyInstance */ public function buildInstance(array $payload): KeyInstance { return new KeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.KeyPage]'; } }PKt[!##GTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnList.phpnu[solution = ['accountSid' => $accountSid, 'resourceSid' => $resourceSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns.json'; } /** * Streams AssignedAddOnInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AssignedAddOnInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AssignedAddOnInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AssignedAddOnInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AssignedAddOnPage Page of AssignedAddOnInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AssignedAddOnPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AssignedAddOnPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AssignedAddOnInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AssignedAddOnPage Page of AssignedAddOnInstance */ public function getPage(string $targetUrl): AssignedAddOnPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AssignedAddOnPage($this->version, $response, $this->solution); } /** * Create the AssignedAddOnInstance * * @param string $installedAddOnSid The SID that identifies the Add-on * installation * @return AssignedAddOnInstance Created AssignedAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $installedAddOnSid): AssignedAddOnInstance { $data = Values::of(['InstalledAddOnSid' => $installedAddOnSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AssignedAddOnInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'] ); } /** * Constructs a AssignedAddOnContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AssignedAddOnContext { return new AssignedAddOnContext( $this->version, $this->solution['accountSid'], $this->solution['resourceSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AssignedAddOnList]'; } }PKt[L?Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return LocalInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\LocalInstance */ public function buildInstance(array $payload): LocalInstance { return new LocalInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LocalPage]'; } }PKt[n<?Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/Local.json'; } /** * Streams LocalInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads LocalInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return LocalInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of LocalInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return LocalPage Page of LocalInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): LocalPage { $options = new Values($options); $params = Values::of([ 'Beta' => Serialize::booleanToString($options['beta']), 'FriendlyName' => $options['friendlyName'], 'PhoneNumber' => $options['phoneNumber'], 'Origin' => $options['origin'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new LocalPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of LocalInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return LocalPage Page of LocalInstance */ public function getPage(string $targetUrl): LocalPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new LocalPage($this->version, $response, $this->solution); } /** * Create the LocalInstance * * @param string $phoneNumber The phone number to purchase in E.164 format * @param array|Options $options Optional Arguments * @return LocalInstance Created LocalInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber, array $options = []): LocalInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $phoneNumber, 'ApiVersion' => $options['apiVersion'], 'FriendlyName' => $options['friendlyName'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceApplicationSid' => $options['voiceApplicationSid'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'IdentitySid' => $options['identitySid'], 'AddressSid' => $options['addressSid'], 'EmergencyStatus' => $options['emergencyStatus'], 'EmergencyAddressSid' => $options['emergencyAddressSid'], 'TrunkSid' => $options['trunkSid'], 'VoiceReceiveMode' => $options['voiceReceiveMode'], 'BundleSid' => $options['bundleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new LocalInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LocalList]'; } }PKt[v{CTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'identitySid' => Values::array_get($payload, 'identity_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'origin' => Values::array_get($payload, 'origin'), 'sid' => Values::array_get($payload, 'sid'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'uri' => Values::array_get($payload, 'uri'), 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'emergencyStatus' => Values::array_get($payload, 'emergency_status'), 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'), 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'), 'bundleSid' => Values::array_get($payload, 'bundle_sid'), 'status' => Values::array_get($payload, 'status'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.LocalInstance]'; } }PKt[uyggJTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnContext.phpnu[solution = ['accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AssignedAddOnInstance * * @return AssignedAddOnInstance Fetched AssignedAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssignedAddOnInstance { $payload = $this->version->fetch('GET', $this->uri); return new AssignedAddOnInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['sid'] ); } /** * Delete the AssignedAddOnInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the extensions */ protected function getExtensions(): AssignedAddOnExtensionList { if (!$this->_extensions) { $this->_extensions = new AssignedAddOnExtensionList( $this->version, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['sid'] ); } return $this->_extensions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AssignedAddOnContext ' . \implode(' ', $context) . ']'; } }PKt[XBTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TollFreeInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\TollFreeInstance */ public function buildInstance(array $payload): TollFreeInstance { return new TollFreeInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TollFreePage]'; } }PKt[Z33@Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/Mobile.json'; } /** * Streams MobileInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MobileInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MobileInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MobileInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MobilePage Page of MobileInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MobilePage { $options = new Values($options); $params = Values::of([ 'Beta' => Serialize::booleanToString($options['beta']), 'FriendlyName' => $options['friendlyName'], 'PhoneNumber' => $options['phoneNumber'], 'Origin' => $options['origin'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MobilePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MobileInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MobilePage Page of MobileInstance */ public function getPage(string $targetUrl): MobilePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MobilePage($this->version, $response, $this->solution); } /** * Create the MobileInstance * * @param string $phoneNumber The phone number to purchase in E.164 format * @param array|Options $options Optional Arguments * @return MobileInstance Created MobileInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber, array $options = []): MobileInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $phoneNumber, 'ApiVersion' => $options['apiVersion'], 'FriendlyName' => $options['friendlyName'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceApplicationSid' => $options['voiceApplicationSid'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'IdentitySid' => $options['identitySid'], 'AddressSid' => $options['addressSid'], 'EmergencyStatus' => $options['emergencyStatus'], 'EmergencyAddressSid' => $options['emergencyAddressSid'], 'TrunkSid' => $options['trunkSid'], 'VoiceReceiveMode' => $options['voiceReceiveMode'], 'BundleSid' => $options['bundleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MobileInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MobileList]'; } }PKt[Z$M[[CTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileOptions.phpnu[options['beta'] = $beta; $this->options['friendlyName'] = $friendlyName; $this->options['phoneNumber'] = $phoneNumber; $this->options['origin'] = $origin; } /** * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to include new phone numbers * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * A string that identifies the resources to read. * * @param string $friendlyName A string that identifies the resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. * * @param string $phoneNumber The phone numbers of the resources to read * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return $this Fluent Builder */ public function setOrigin(string $origin): self { $this->options['origin'] = $origin; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadMobileOptions ' . $options . ']'; } } class CreateMobileOptions extends Options { /** * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number */ public function __construct(string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE) { $this->options['apiVersion'] = $apiVersion; $this->options['friendlyName'] = $friendlyName; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceApplicationSid'] = $voiceApplicationSid; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['identitySid'] = $identitySid; $this->options['addressSid'] = $addressSid; $this->options['emergencyStatus'] = $emergencyStatus; $this->options['emergencyAddressSid'] = $emergencyAddressSid; $this->options['trunkSid'] = $trunkSid; $this->options['voiceReceiveMode'] = $voiceReceiveMode; $this->options['bundleSid'] = $bundleSid; } /** * The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. * * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number. * * @param string $friendlyName A string to describe the new phone number * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application. * * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. * * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsMethod The HTTP method to use with sms url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call when the new phone number receives an incoming SMS message. * * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. * * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @return $this Fluent Builder */ public function setVoiceApplicationSid(string $voiceApplicationSid): self { $this->options['voiceApplicationSid'] = $voiceApplicationSid; return $this; } /** * Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceMethod The HTTP method used with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * * @param string $voiceUrl The URL we should call when the phone number * receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. * * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @return $this Fluent Builder */ public function setIdentitySid(string $identitySid): self { $this->options['identitySid'] = $identitySid; return $this; } /** * The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. * * @param string $addressSid The SID of the Address resource associated with * the phone number * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. * * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @return $this Fluent Builder */ public function setEmergencyStatus(string $emergencyStatus): self { $this->options['emergencyStatus'] = $emergencyStatus; return $this; } /** * The SID of the emergency address configuration to use for emergency calling from the new phone number. * * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @return $this Fluent Builder */ public function setEmergencyAddressSid(string $emergencyAddressSid): self { $this->options['emergencyAddressSid'] = $emergencyAddressSid; return $this; } /** * The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. * * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @return $this Fluent Builder */ public function setTrunkSid(string $trunkSid): self { $this->options['trunkSid'] = $trunkSid; return $this; } /** * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * * @param string $voiceReceiveMode Incoming call type: fax or voice * @return $this Fluent Builder */ public function setVoiceReceiveMode(string $voiceReceiveMode): self { $this->options['voiceReceiveMode'] = $voiceReceiveMode; return $this; } /** * The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. * * @param string $bundleSid The SID of the Bundle resource associated with * number * @return $this Fluent Builder */ public function setBundleSid(string $bundleSid): self { $this->options['bundleSid'] = $bundleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateMobileOptions ' . $options . ']'; } }PKt[DzFTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'identitySid' => Values::array_get($payload, 'identity_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'origin' => Values::array_get($payload, 'origin'), 'sid' => Values::array_get($payload, 'sid'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'uri' => Values::array_get($payload, 'uri'), 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'emergencyStatus' => Values::array_get($payload, 'emergency_status'), 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'), 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'), 'bundleSid' => Values::array_get($payload, 'bundle_sid'), 'status' => Values::array_get($payload, 'status'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TollFreeInstance]'; } }PKt[7CDTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'addressRequirements' => Values::array_get($payload, 'address_requirements'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'beta' => Values::array_get($payload, 'beta'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'identitySid' => Values::array_get($payload, 'identity_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'origin' => Values::array_get($payload, 'origin'), 'sid' => Values::array_get($payload, 'sid'), 'smsApplicationSid' => Values::array_get($payload, 'sms_application_sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'uri' => Values::array_get($payload, 'uri'), 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'), 'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'), 'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'emergencyStatus' => Values::array_get($payload, 'emergency_status'), 'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'), 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'), 'bundleSid' => Values::array_get($payload, 'bundle_sid'), 'status' => Values::array_get($payload, 'status'), ]; $this->solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MobileInstance]'; } }PKt[NN^Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.phpnu[solution = [ 'accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'assignedAddOnSid' => $assignedAddOnSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns/' . \rawurlencode($assignedAddOnSid) . '/Extensions.json'; } /** * Streams AssignedAddOnExtensionInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AssignedAddOnExtensionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AssignedAddOnExtensionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AssignedAddOnExtensionInstance records from the * API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AssignedAddOnExtensionPage Page of AssignedAddOnExtensionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AssignedAddOnExtensionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AssignedAddOnExtensionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AssignedAddOnExtensionInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AssignedAddOnExtensionPage Page of AssignedAddOnExtensionInstance */ public function getPage(string $targetUrl): AssignedAddOnExtensionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AssignedAddOnExtensionPage($this->version, $response, $this->solution); } /** * Constructs a AssignedAddOnExtensionContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AssignedAddOnExtensionContext { return new AssignedAddOnExtensionContext( $this->version, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['assignedAddOnSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AssignedAddOnExtensionList]'; } }PKt[MbTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'resourceSid' => Values::array_get($payload, 'resource_sid'), 'assignedAddOnSid' => Values::array_get($payload, 'assigned_add_on_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'productName' => Values::array_get($payload, 'product_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'uri' => Values::array_get($payload, 'uri'), 'enabled' => Values::array_get($payload, 'enabled'), ]; $this->solution = [ 'accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'assignedAddOnSid' => $assignedAddOnSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssignedAddOnExtensionContext Context for this * AssignedAddOnExtensionInstance */ protected function proxy(): AssignedAddOnExtensionContext { if (!$this->context) { $this->context = new AssignedAddOnExtensionContext( $this->version, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['assignedAddOnSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AssignedAddOnExtensionInstance * * @return AssignedAddOnExtensionInstance Fetched AssignedAddOnExtensionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssignedAddOnExtensionInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AssignedAddOnExtensionInstance ' . \implode(' ', $context) . ']'; } }PKt[Dę aTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionContext.phpnu[solution = [ 'accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'assignedAddOnSid' => $assignedAddOnSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns/' . \rawurlencode($assignedAddOnSid) . '/Extensions/' . \rawurlencode($sid) . '.json'; } /** * Fetch the AssignedAddOnExtensionInstance * * @return AssignedAddOnExtensionInstance Fetched AssignedAddOnExtensionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssignedAddOnExtensionInstance { $payload = $this->version->fetch('GET', $this->uri); return new AssignedAddOnExtensionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['assignedAddOnSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AssignedAddOnExtensionContext ' . \implode(' ', $context) . ']'; } }PKt[ʞpBB^Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AssignedAddOnExtensionInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionInstance */ public function buildInstance(array $payload): AssignedAddOnExtensionInstance { return new AssignedAddOnExtensionInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['assignedAddOnSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AssignedAddOnExtensionPage]'; } }PKt[UR\\BTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalOptions.phpnu[options['beta'] = $beta; $this->options['friendlyName'] = $friendlyName; $this->options['phoneNumber'] = $phoneNumber; $this->options['origin'] = $origin; } /** * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to include new phone numbers * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * A string that identifies the resources to read. * * @param string $friendlyName A string that identifies the resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. * * @param string $phoneNumber The phone numbers of the resources to read * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return $this Fluent Builder */ public function setOrigin(string $origin): self { $this->options['origin'] = $origin; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadLocalOptions ' . $options . ']'; } } class CreateLocalOptions extends Options { /** * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod The HTTP method we use to call * status_callback * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number */ public function __construct(string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE) { $this->options['apiVersion'] = $apiVersion; $this->options['friendlyName'] = $friendlyName; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceApplicationSid'] = $voiceApplicationSid; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['identitySid'] = $identitySid; $this->options['addressSid'] = $addressSid; $this->options['emergencyStatus'] = $emergencyStatus; $this->options['emergencyAddressSid'] = $emergencyAddressSid; $this->options['trunkSid'] = $trunkSid; $this->options['voiceReceiveMode'] = $voiceReceiveMode; $this->options['bundleSid'] = $bundleSid; } /** * The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. * * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. * * @param string $friendlyName A string to describe the new phone number * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. * * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsFallbackMethod The HTTP method we use to call * status_callback * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. * * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsMethod The HTTP method to use with sms url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call when the new phone number receives an incoming SMS message. * * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $statusCallbackMethod HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. * * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @return $this Fluent Builder */ public function setVoiceApplicationSid(string $voiceApplicationSid): self { $this->options['voiceApplicationSid'] = $voiceApplicationSid; return $this; } /** * Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceMethod The HTTP method used with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * * @param string $voiceUrl The URL we should call when the phone number * receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. * * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @return $this Fluent Builder */ public function setIdentitySid(string $identitySid): self { $this->options['identitySid'] = $identitySid; return $this; } /** * The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. * * @param string $addressSid The SID of the Address resource associated with * the phone number * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. * * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @return $this Fluent Builder */ public function setEmergencyStatus(string $emergencyStatus): self { $this->options['emergencyStatus'] = $emergencyStatus; return $this; } /** * The SID of the emergency address configuration to use for emergency calling from the new phone number. * * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @return $this Fluent Builder */ public function setEmergencyAddressSid(string $emergencyAddressSid): self { $this->options['emergencyAddressSid'] = $emergencyAddressSid; return $this; } /** * The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. * * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @return $this Fluent Builder */ public function setTrunkSid(string $trunkSid): self { $this->options['trunkSid'] = $trunkSid; return $this; } /** * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * * @param string $voiceReceiveMode Incoming call type: fax or voice * @return $this Fluent Builder */ public function setVoiceReceiveMode(string $voiceReceiveMode): self { $this->options['voiceReceiveMode'] = $voiceReceiveMode; return $this; } /** * The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. * * @param string $bundleSid The SID of the Bundle resource associated with * number * @return $this Fluent Builder */ public function setBundleSid(string $bundleSid): self { $this->options['bundleSid'] = $bundleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateLocalOptions ' . $options . ']'; } }PKt[¼GTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AssignedAddOnInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnInstance */ public function buildInstance(array $payload): AssignedAddOnInstance { return new AssignedAddOnInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.AssignedAddOnPage]'; } }PKt[MZKTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'resourceSid' => Values::array_get($payload, 'resource_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'description' => Values::array_get($payload, 'description'), 'configuration' => Values::array_get($payload, 'configuration'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = [ 'accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssignedAddOnContext Context for this AssignedAddOnInstance */ protected function proxy(): AssignedAddOnContext { if (!$this->context) { $this->context = new AssignedAddOnContext( $this->version, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AssignedAddOnInstance * * @return AssignedAddOnInstance Fetched AssignedAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssignedAddOnInstance { return $this->proxy()->fetch(); } /** * Delete the AssignedAddOnInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the extensions */ protected function getExtensions(): AssignedAddOnExtensionList { return $this->proxy()->extensions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AssignedAddOnInstance ' . \implode(' ', $context) . ']'; } }PKt[fր@Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobilePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MobileInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\MobileInstance */ public function buildInstance(array $payload): MobileInstance { return new MobileInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MobilePage]'; } }PKt[64L__BTwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/TollFree.json'; } /** * Streams TollFreeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TollFreeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TollFreeInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TollFreeInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TollFreePage Page of TollFreeInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TollFreePage { $options = new Values($options); $params = Values::of([ 'Beta' => Serialize::booleanToString($options['beta']), 'FriendlyName' => $options['friendlyName'], 'PhoneNumber' => $options['phoneNumber'], 'Origin' => $options['origin'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TollFreePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TollFreeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TollFreePage Page of TollFreeInstance */ public function getPage(string $targetUrl): TollFreePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TollFreePage($this->version, $response, $this->solution); } /** * Create the TollFreeInstance * * @param string $phoneNumber The phone number to purchase in E.164 format * @param array|Options $options Optional Arguments * @return TollFreeInstance Created TollFreeInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber, array $options = []): TollFreeInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $phoneNumber, 'ApiVersion' => $options['apiVersion'], 'FriendlyName' => $options['friendlyName'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceApplicationSid' => $options['voiceApplicationSid'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'IdentitySid' => $options['identitySid'], 'AddressSid' => $options['addressSid'], 'EmergencyStatus' => $options['emergencyStatus'], 'EmergencyAddressSid' => $options['emergencyAddressSid'], 'TrunkSid' => $options['trunkSid'], 'VoiceReceiveMode' => $options['voiceReceiveMode'], 'BundleSid' => $options['bundleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TollFreeInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.TollFreeList]'; } }PKt[mHi[i[ETwilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeOptions.phpnu[options['beta'] = $beta; $this->options['friendlyName'] = $friendlyName; $this->options['phoneNumber'] = $phoneNumber; $this->options['origin'] = $origin; } /** * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to include new phone numbers * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * A string that identifies the resources to read. * * @param string $friendlyName A string that identifies the resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. * * @param string $phoneNumber The phone numbers of the resources to read * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return $this Fluent Builder */ public function setOrigin(string $origin): self { $this->options['origin'] = $origin; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadTollFreeOptions ' . $options . ']'; } } class CreateTollFreeOptions extends Options { /** * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms_url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL to send status information to your * application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number */ public function __construct(string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE) { $this->options['apiVersion'] = $apiVersion; $this->options['friendlyName'] = $friendlyName; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceApplicationSid'] = $voiceApplicationSid; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['identitySid'] = $identitySid; $this->options['addressSid'] = $addressSid; $this->options['emergencyStatus'] = $emergencyStatus; $this->options['emergencyAddressSid'] = $emergencyAddressSid; $this->options['trunkSid'] = $trunkSid; $this->options['voiceReceiveMode'] = $voiceReceiveMode; $this->options['bundleSid'] = $bundleSid; } /** * The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. * * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. * * @param string $friendlyName A string to describe the new phone number * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. * * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. * * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsMethod The HTTP method to use with sms_url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call when the new phone number receives an incoming SMS message. * * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL to send status information to your * application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. * * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @return $this Fluent Builder */ public function setVoiceApplicationSid(string $voiceApplicationSid): self { $this->options['voiceApplicationSid'] = $voiceApplicationSid; return $this; } /** * Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceMethod The HTTP method used with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * * @param string $voiceUrl The URL we should call when the phone number * receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations. * * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @return $this Fluent Builder */ public function setIdentitySid(string $identitySid): self { $this->options['identitySid'] = $identitySid; return $this; } /** * The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. * * @param string $addressSid The SID of the Address resource associated with * the phone number * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. * * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @return $this Fluent Builder */ public function setEmergencyStatus(string $emergencyStatus): self { $this->options['emergencyStatus'] = $emergencyStatus; return $this; } /** * The SID of the emergency address configuration to use for emergency calling from the new phone number. * * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @return $this Fluent Builder */ public function setEmergencyAddressSid(string $emergencyAddressSid): self { $this->options['emergencyAddressSid'] = $emergencyAddressSid; return $this; } /** * The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. * * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @return $this Fluent Builder */ public function setTrunkSid(string $trunkSid): self { $this->options['trunkSid'] = $trunkSid; return $this; } /** * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * * @param string $voiceReceiveMode Incoming call type: fax or voice * @return $this Fluent Builder */ public function setVoiceReceiveMode(string $voiceReceiveMode): self { $this->options['voiceReceiveMode'] = $voiceReceiveMode; return $this; } /** * The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. * * @param string $bundleSid The SID of the Bundle resource associated with * number * @return $this Fluent Builder */ public function setBundleSid(string $bundleSid): self { $this->options['bundleSid'] = $bundleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateTollFreeOptions ' . $options . ']'; } }PKt[qJJ-Twilio/Rest/Api/V2010/Account/SipInstance.phpnu[solution = ['accountSid' => $accountSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SipInstance]'; } }PKt[995Twilio/Rest/Api/V2010/Account/NotificationContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Notifications/' . \rawurlencode($sid) . '.json'; } /** * Fetch the NotificationInstance * * @return NotificationInstance Fetched NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NotificationInstance { $payload = $this->version->fetch('GET', $this->uri); return new NotificationInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.NotificationContext ' . \implode(' ', $context) . ']'; } }PKt[*#5/Twilio/Rest/Api/V2010/Account/QueueInstance.phpnu[properties = [ 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'currentSize' => Values::array_get($payload, 'current_size'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uri' => Values::array_get($payload, 'uri'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'averageWaitTime' => Values::array_get($payload, 'average_wait_time'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'maxSize' => Values::array_get($payload, 'max_size'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return QueueContext Context for this QueueInstance */ protected function proxy(): QueueContext { if (!$this->context) { $this->context = new QueueContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the QueueInstance * * @return QueueInstance Fetched QueueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): QueueInstance { return $this->proxy()->fetch(); } /** * Update the QueueInstance * * @param array|Options $options Optional Arguments * @return QueueInstance Updated QueueInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): QueueInstance { return $this->proxy()->update($options); } /** * Delete the QueueInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the members */ protected function getMembers(): MemberList { return $this->proxy()->members; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.QueueInstance ' . \implode(' ', $context) . ']'; } }PKt[8̙2Twilio/Rest/Api/V2010/Account/ShortCodeOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['apiVersion'] = $apiVersion; $this->options['smsUrl'] = $smsUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsFallbackMethod'] = $smsFallbackMethod; } /** * A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code. * * @param string $friendlyName A string to describe this resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. * * @param string $apiVersion The API version to use to start a new TwiML session * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * The URL we should call when receiving an incoming SMS message to this short code. * * @param string $smsUrl URL Twilio will request when receiving an SMS * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`. * * @param string $smsMethod HTTP method to use when requesting the sms url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`. * * @param string $smsFallbackUrl URL Twilio will request if an error occurs in * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`. * * @param string $smsFallbackMethod HTTP method Twilio will use with * sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateShortCodeOptions ' . $options . ']'; } } class ReadShortCodeOptions extends Options { /** * @param string $friendlyName The string that identifies the ShortCode * resources to read * @param string $shortCode Filter by ShortCode */ public function __construct(string $friendlyName = Values::NONE, string $shortCode = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['shortCode'] = $shortCode; } /** * The string that identifies the ShortCode resources to read. * * @param string $friendlyName The string that identifies the ShortCode * resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit. * * @param string $shortCode Filter by ShortCode * @return $this Fluent Builder */ public function setShortCode(string $shortCode): self { $this->options['shortCode'] = $shortCode; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadShortCodeOptions ' . $options . ']'; } }PKt[RWy1Twilio/Rest/Api/V2010/Account/ApplicationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ApplicationInstance \Twilio\Rest\Api\V2010\Account\ApplicationInstance */ public function buildInstance(array $payload): ApplicationInstance { return new ApplicationInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ApplicationPage]'; } }PKt[3y0Twilio/Rest/Api/V2010/Account/AddressContext.phpnu[solution = ['accountSid' => $accountSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Addresses/' . \rawurlencode($sid) . '.json'; } /** * Delete the AddressInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the AddressInstance * * @return AddressInstance Fetched AddressInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AddressInstance { $payload = $this->version->fetch('GET', $this->uri); return new AddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Update the AddressInstance * * @param array|Options $options Optional Arguments * @return AddressInstance Updated AddressInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AddressInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'CustomerName' => $options['customerName'], 'Street' => $options['street'], 'City' => $options['city'], 'Region' => $options['region'], 'PostalCode' => $options['postalCode'], 'EmergencyEnabled' => Serialize::booleanToString($options['emergencyEnabled']), 'AutoCorrectAddress' => Serialize::booleanToString($options['autoCorrectAddress']), 'StreetSecondary' => $options['streetSecondary'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AddressInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['sid'] ); } /** * Access the dependentPhoneNumbers */ protected function getDependentPhoneNumbers(): DependentPhoneNumberList { if (!$this->_dependentPhoneNumbers) { $this->_dependentPhoneNumbers = new DependentPhoneNumberList( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->_dependentPhoneNumbers; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AddressContext ' . \implode(' ', $context) . ']'; } }PKt[)Tj6j60Twilio/Rest/Api/V2010/Account/AddressOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['emergencyEnabled'] = $emergencyEnabled; $this->options['autoCorrectAddress'] = $autoCorrectAddress; $this->options['streetSecondary'] = $streetSecondary; } /** * A descriptive string that you create to describe the new address. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether to enable emergency calling on the new address. Can be: `true` or `false`. * * @param bool $emergencyEnabled Whether to enable emergency calling on the new * address * @return $this Fluent Builder */ public function setEmergencyEnabled(bool $emergencyEnabled): self { $this->options['emergencyEnabled'] = $emergencyEnabled; return $this; } /** * Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. * * @param bool $autoCorrectAddress Whether we should automatically correct the * address * @return $this Fluent Builder */ public function setAutoCorrectAddress(bool $autoCorrectAddress): self { $this->options['autoCorrectAddress'] = $autoCorrectAddress; return $this; } /** * The additional number and street address of the address. * * @param string $streetSecondary The additional number and street address of * the address * @return $this Fluent Builder */ public function setStreetSecondary(string $streetSecondary): self { $this->options['streetSecondary'] = $streetSecondary; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateAddressOptions ' . $options . ']'; } } class UpdateAddressOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $customerName The name to associate with the address * @param string $street The number and street address of the address * @param string $city The city of the address * @param string $region The state or region of the address * @param string $postalCode The postal code of the address * @param bool $emergencyEnabled Whether to enable emergency calling on the * address * @param bool $autoCorrectAddress Whether we should automatically correct the * address * @param string $streetSecondary The additional number and street address of * the address */ public function __construct(string $friendlyName = Values::NONE, string $customerName = Values::NONE, string $street = Values::NONE, string $city = Values::NONE, string $region = Values::NONE, string $postalCode = Values::NONE, bool $emergencyEnabled = Values::NONE, bool $autoCorrectAddress = Values::NONE, string $streetSecondary = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['customerName'] = $customerName; $this->options['street'] = $street; $this->options['city'] = $city; $this->options['region'] = $region; $this->options['postalCode'] = $postalCode; $this->options['emergencyEnabled'] = $emergencyEnabled; $this->options['autoCorrectAddress'] = $autoCorrectAddress; $this->options['streetSecondary'] = $streetSecondary; } /** * A descriptive string that you create to describe the address. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The name to associate with the address. * * @param string $customerName The name to associate with the address * @return $this Fluent Builder */ public function setCustomerName(string $customerName): self { $this->options['customerName'] = $customerName; return $this; } /** * The number and street address of the address. * * @param string $street The number and street address of the address * @return $this Fluent Builder */ public function setStreet(string $street): self { $this->options['street'] = $street; return $this; } /** * The city of the address. * * @param string $city The city of the address * @return $this Fluent Builder */ public function setCity(string $city): self { $this->options['city'] = $city; return $this; } /** * The state or region of the address. * * @param string $region The state or region of the address * @return $this Fluent Builder */ public function setRegion(string $region): self { $this->options['region'] = $region; return $this; } /** * The postal code of the address. * * @param string $postalCode The postal code of the address * @return $this Fluent Builder */ public function setPostalCode(string $postalCode): self { $this->options['postalCode'] = $postalCode; return $this; } /** * Whether to enable emergency calling on the address. Can be: `true` or `false`. * * @param bool $emergencyEnabled Whether to enable emergency calling on the * address * @return $this Fluent Builder */ public function setEmergencyEnabled(bool $emergencyEnabled): self { $this->options['emergencyEnabled'] = $emergencyEnabled; return $this; } /** * Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. * * @param bool $autoCorrectAddress Whether we should automatically correct the * address * @return $this Fluent Builder */ public function setAutoCorrectAddress(bool $autoCorrectAddress): self { $this->options['autoCorrectAddress'] = $autoCorrectAddress; return $this; } /** * The additional number and street address of the address. * * @param string $streetSecondary The additional number and street address of * the address * @return $this Fluent Builder */ public function setStreetSecondary(string $streetSecondary): self { $this->options['streetSecondary'] = $streetSecondary; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateAddressOptions ' . $options . ']'; } } class ReadAddressOptions extends Options { /** * @param string $customerName The `customer_name` of the Address resources to * read * @param string $friendlyName The string that identifies the Address resources * to read * @param string $isoCountry The ISO country code of the Address resources to * read */ public function __construct(string $customerName = Values::NONE, string $friendlyName = Values::NONE, string $isoCountry = Values::NONE) { $this->options['customerName'] = $customerName; $this->options['friendlyName'] = $friendlyName; $this->options['isoCountry'] = $isoCountry; } /** * The `customer_name` of the Address resources to read. * * @param string $customerName The `customer_name` of the Address resources to * read * @return $this Fluent Builder */ public function setCustomerName(string $customerName): self { $this->options['customerName'] = $customerName; return $this; } /** * The string that identifies the Address resources to read. * * @param string $friendlyName The string that identifies the Address resources * to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The ISO country code of the Address resources to read. * * @param string $isoCountry The ISO country code of the Address resources to * read * @return $this Fluent Builder */ public function setIsoCountry(string $isoCountry): self { $this->options['isoCountry'] = $isoCountry; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadAddressOptions ' . $options . ']'; } }PKt[ <;<Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberOptions.phpnu[options['accountSid'] = $accountSid; $this->options['apiVersion'] = $apiVersion; $this->options['friendlyName'] = $friendlyName; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceApplicationSid'] = $voiceApplicationSid; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['emergencyStatus'] = $emergencyStatus; $this->options['emergencyAddressSid'] = $emergencyAddressSid; $this->options['trunkSid'] = $trunkSid; $this->options['voiceReceiveMode'] = $voiceReceiveMode; $this->options['identitySid'] = $identitySid; $this->options['addressSid'] = $addressSid; $this->options['bundleSid'] = $bundleSid; } /** * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). * * @param string $accountSid The SID of the Account that created the resource * to update * @return $this Fluent Builder */ public function setAccountSid(string $accountSid): self { $this->options['accountSid'] = $accountSid; return $this; } /** * The API version to use for incoming calls made to the phone number. The default is `2010-04-01`. * * @param string $apiVersion The API version to use for incoming calls made to * the phone number * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. * * @param string $smsApplicationSid Unique string that identifies the * application * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. * * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsMethod The HTTP method to use with sms_url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call when the phone number receives an incoming SMS message. * * @param string $smsUrl The URL we should call when the phone number receives * an incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. * * @param string $voiceApplicationSid The SID of the application to handle the * phone number * @return $this Fluent Builder */ public function setVoiceApplicationSid(string $voiceApplicationSid): self { $this->options['voiceApplicationSid'] = $voiceApplicationSid; return $this; } /** * Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceFallbackMethod The HTTP method used with fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceMethod The HTTP method used with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * * @param string $voiceUrl The URL we should call when the phone number * receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. * * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @return $this Fluent Builder */ public function setEmergencyStatus(string $emergencyStatus): self { $this->options['emergencyStatus'] = $emergencyStatus; return $this; } /** * The SID of the emergency address configuration to use for emergency calling from this phone number. * * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @return $this Fluent Builder */ public function setEmergencyAddressSid(string $emergencyAddressSid): self { $this->options['emergencyAddressSid'] = $emergencyAddressSid; return $this; } /** * The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. * * @param string $trunkSid SID of the trunk to handle phone calls to the phone * number * @return $this Fluent Builder */ public function setTrunkSid(string $trunkSid): self { $this->options['trunkSid'] = $trunkSid; return $this; } /** * The configuration parameter for the phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * * @param string $voiceReceiveMode Incoming call type: fax or voice * @return $this Fluent Builder */ public function setVoiceReceiveMode(string $voiceReceiveMode): self { $this->options['voiceReceiveMode'] = $voiceReceiveMode; return $this; } /** * The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations. * * @param string $identitySid Unique string that identifies the identity * associated with number * @return $this Fluent Builder */ public function setIdentitySid(string $identitySid): self { $this->options['identitySid'] = $identitySid; return $this; } /** * The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations. * * @param string $addressSid The SID of the Address resource associated with * the phone number * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. * * @param string $bundleSid The SID of the Bundle resource associated with * number * @return $this Fluent Builder */ public function setBundleSid(string $bundleSid): self { $this->options['bundleSid'] = $bundleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.UpdateIncomingPhoneNumberOptions ' . $options . ']'; } } class ReadIncomingPhoneNumberOptions extends Options { /** * @param bool $beta Whether to include new phone numbers * @param string $friendlyName A string that identifies the IncomingPhoneNumber * resources to read * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber * resources to read * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. */ public function __construct(bool $beta = Values::NONE, string $friendlyName = Values::NONE, string $phoneNumber = Values::NONE, string $origin = Values::NONE) { $this->options['beta'] = $beta; $this->options['friendlyName'] = $friendlyName; $this->options['phoneNumber'] = $phoneNumber; $this->options['origin'] = $origin; } /** * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. * * @param bool $beta Whether to include new phone numbers * @return $this Fluent Builder */ public function setBeta(bool $beta): self { $this->options['beta'] = $beta; return $this; } /** * A string that identifies the IncomingPhoneNumber resources to read. * * @param string $friendlyName A string that identifies the IncomingPhoneNumber * resources to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. * * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber * resources to read * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. * * @param string $origin Include phone numbers based on their origin. By * default, phone numbers of all origin are included. * @return $this Fluent Builder */ public function setOrigin(string $origin): self { $this->options['origin'] = $origin; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadIncomingPhoneNumberOptions ' . $options . ']'; } } class CreateIncomingPhoneNumberOptions extends Options { /** * @param string $phoneNumber The phone number to purchase in E.164 format * @param string $areaCode The desired area code for the new phone number * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @param string $friendlyName A string to describe the new phone number * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @param string $smsMethod The HTTP method to use with sms url * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod HTTP method we should use to call * status_callback * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @param string $voiceMethod The HTTP method used with the voice_url * @param string $voiceUrl The URL we should call when the phone number * receives a call * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @param string $addressSid The SID of the Address resource associated with * the phone number * @param string $voiceReceiveMode Incoming call type: fax or voice * @param string $bundleSid The SID of the Bundle resource associated with * number */ public function __construct(string $phoneNumber = Values::NONE, string $areaCode = Values::NONE, string $apiVersion = Values::NONE, string $friendlyName = Values::NONE, string $smsApplicationSid = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, string $voiceApplicationSid = Values::NONE, bool $voiceCallerIdLookup = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $emergencyStatus = Values::NONE, string $emergencyAddressSid = Values::NONE, string $trunkSid = Values::NONE, string $identitySid = Values::NONE, string $addressSid = Values::NONE, string $voiceReceiveMode = Values::NONE, string $bundleSid = Values::NONE) { $this->options['phoneNumber'] = $phoneNumber; $this->options['areaCode'] = $areaCode; $this->options['apiVersion'] = $apiVersion; $this->options['friendlyName'] = $friendlyName; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['voiceApplicationSid'] = $voiceApplicationSid; $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['emergencyStatus'] = $emergencyStatus; $this->options['emergencyAddressSid'] = $emergencyAddressSid; $this->options['trunkSid'] = $trunkSid; $this->options['identitySid'] = $identitySid; $this->options['addressSid'] = $addressSid; $this->options['voiceReceiveMode'] = $voiceReceiveMode; $this->options['bundleSid'] = $bundleSid; } /** * The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234. * * @param string $phoneNumber The phone number to purchase in E.164 format * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only). * * @param string $areaCode The desired area code for the new phone number * @return $this Fluent Builder */ public function setAreaCode(string $areaCode): self { $this->options['areaCode'] = $areaCode; return $this; } /** * The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. * * @param string $apiVersion The API version to use for incoming calls made to * the new phone number * @return $this Fluent Builder */ public function setApiVersion(string $apiVersion): self { $this->options['apiVersion'] = $apiVersion; return $this; } /** * A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number. * * @param string $friendlyName A string to describe the new phone number * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. * * @param string $smsApplicationSid The SID of the application to handle SMS * messages * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsFallbackMethod HTTP method used with sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. * * @param string $smsFallbackUrl The URL we call when an error occurs while * executing TwiML * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $smsMethod The HTTP method to use with sms url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call when the new phone number receives an incoming SMS message. * * @param string $smsUrl The URL we should call when the new phone number * receives an incoming SMS message * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $statusCallbackMethod HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. * * @param string $voiceApplicationSid The SID of the application to handle the * new phone number * @return $this Fluent Builder */ public function setVoiceApplicationSid(string $voiceApplicationSid): self { $this->options['voiceApplicationSid'] = $voiceApplicationSid; return $this; } /** * Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. * * @param bool $voiceCallerIdLookup Whether to lookup the caller's name * @return $this Fluent Builder */ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self { $this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup; return $this; } /** * The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. * * @param string $voiceFallbackUrl The URL we will call when an error occurs in * TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. * * @param string $voiceMethod The HTTP method used with the voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. * * @param string $voiceUrl The URL we should call when the phone number * receives a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. * * @param string $emergencyStatus Displays if emergency calling is enabled for * this number. * @return $this Fluent Builder */ public function setEmergencyStatus(string $emergencyStatus): self { $this->options['emergencyStatus'] = $emergencyStatus; return $this; } /** * The SID of the emergency address configuration to use for emergency calling from the new phone number. * * @param string $emergencyAddressSid The emergency address configuration to * use for emergency calling * @return $this Fluent Builder */ public function setEmergencyAddressSid(string $emergencyAddressSid): self { $this->options['emergencyAddressSid'] = $emergencyAddressSid; return $this; } /** * The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. * * @param string $trunkSid SID of the trunk to handle calls to the new phone * number * @return $this Fluent Builder */ public function setTrunkSid(string $trunkSid): self { $this->options['trunkSid'] = $trunkSid; return $this; } /** * The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. * * @param string $identitySid The SID of the Identity resource to associate * with the new phone number * @return $this Fluent Builder */ public function setIdentitySid(string $identitySid): self { $this->options['identitySid'] = $identitySid; return $this; } /** * The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. * * @param string $addressSid The SID of the Address resource associated with * the phone number * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. * * @param string $voiceReceiveMode Incoming call type: fax or voice * @return $this Fluent Builder */ public function setVoiceReceiveMode(string $voiceReceiveMode): self { $this->options['voiceReceiveMode'] = $voiceReceiveMode; return $this; } /** * The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. * * @param string $bundleSid The SID of the Bundle resource associated with * number * @return $this Fluent Builder */ public function setBundleSid(string $bundleSid): self { $this->options['bundleSid'] = $bundleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateIncomingPhoneNumberOptions ' . $options . ']'; } }PKt[j3Twilio/Rest/Api/V2010/Account/ShortCodeInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'shortCode' => Values::array_get($payload, 'short_code'), 'sid' => Values::array_get($payload, 'sid'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ShortCodeContext Context for this ShortCodeInstance */ protected function proxy(): ShortCodeContext { if (!$this->context) { $this->context = new ShortCodeContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ShortCodeInstance * * @return ShortCodeInstance Fetched ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ShortCodeInstance { return $this->proxy()->fetch(); } /** * Update the ShortCodeInstance * * @param array|Options $options Optional Arguments * @return ShortCodeInstance Updated ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ShortCodeInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.ShortCodeInstance ' . \implode(' ', $context) . ']'; } }PKt[T>Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'connectAppCompanyName' => Values::array_get($payload, 'connect_app_company_name'), 'connectAppDescription' => Values::array_get($payload, 'connect_app_description'), 'connectAppFriendlyName' => Values::array_get($payload, 'connect_app_friendly_name'), 'connectAppHomepageUrl' => Values::array_get($payload, 'connect_app_homepage_url'), 'connectAppSid' => Values::array_get($payload, 'connect_app_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'permissions' => Values::array_get($payload, 'permissions'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'connectAppSid' => $connectAppSid ?: $this->properties['connectAppSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AuthorizedConnectAppContext Context for this * AuthorizedConnectAppInstance */ protected function proxy(): AuthorizedConnectAppContext { if (!$this->context) { $this->context = new AuthorizedConnectAppContext( $this->version, $this->solution['accountSid'], $this->solution['connectAppSid'] ); } return $this->context; } /** * Fetch the AuthorizedConnectAppInstance * * @return AuthorizedConnectAppInstance Fetched AuthorizedConnectAppInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthorizedConnectAppInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AuthorizedConnectAppInstance ' . \implode(' ', $context) . ']'; } }PKt[)uu,Twilio/Rest/Api/V2010/Account/NewKeyList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Keys.json'; } /** * Create the NewKeyInstance * * @param array|Options $options Optional Arguments * @return NewKeyInstance Created NewKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): NewKeyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new NewKeyInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.NewKeyList]'; } }PKt[)Twilio/Rest/Api/V2010/Account/SipPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SipInstance \Twilio\Rest\Api\V2010\Account\SipInstance */ public function buildInstance(array $payload): SipInstance { return new SipInstance($this->version, $payload, $this->solution['accountSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SipPage]'; } }PKt[h+^^1Twilio/Rest/Api/V2010/Account/ApplicationList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Applications.json'; } /** * Create the ApplicationInstance * * @param array|Options $options Optional Arguments * @return ApplicationInstance Created ApplicationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ApplicationInstance { $options = new Values($options); $data = Values::of([ 'ApiVersion' => $options['apiVersion'], 'VoiceUrl' => $options['voiceUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']), 'SmsUrl' => $options['smsUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsStatusCallback' => $options['smsStatusCallback'], 'MessageStatusCallback' => $options['messageStatusCallback'], 'FriendlyName' => $options['friendlyName'], 'PublicApplicationConnectEnabled' => Serialize::booleanToString($options['publicApplicationConnectEnabled']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ApplicationInstance($this->version, $payload, $this->solution['accountSid']); } /** * Streams ApplicationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ApplicationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ApplicationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ApplicationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ApplicationPage Page of ApplicationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ApplicationPage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ApplicationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ApplicationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ApplicationPage Page of ApplicationInstance */ public function getPage(string $targetUrl): ApplicationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ApplicationPage($this->version, $response, $this->solution); } /** * Constructs a ApplicationContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ApplicationContext { return new ApplicationContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.ApplicationList]'; } }PKt[x0Twilio/Rest/Api/V2010/Account/SigningKeyList.phpnu[solution = ['accountSid' => $accountSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SigningKeys.json'; } /** * Streams SigningKeyInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SigningKeyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SigningKeyInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SigningKeyInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SigningKeyPage Page of SigningKeyInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SigningKeyPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SigningKeyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SigningKeyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SigningKeyPage Page of SigningKeyInstance */ public function getPage(string $targetUrl): SigningKeyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SigningKeyPage($this->version, $response, $this->solution); } /** * Constructs a SigningKeyContext * * @param string $sid The sid */ public function getContext(string $sid): SigningKeyContext { return new SigningKeyContext($this->version, $this->solution['accountSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.SigningKeyList]'; } }PKt[۫7Twilio/Rest/Api/V2010/Account/Message/MediaInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'contentType' => Values::array_get($payload, 'content_type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'parentSid' => Values::array_get($payload, 'parent_sid'), 'sid' => Values::array_get($payload, 'sid'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = [ 'accountSid' => $accountSid, 'messageSid' => $messageSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MediaContext Context for this MediaInstance */ protected function proxy(): MediaContext { if (!$this->context) { $this->context = new MediaContext( $this->version, $this->solution['accountSid'], $this->solution['messageSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the MediaInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the MediaInstance * * @return MediaInstance Fetched MediaInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MediaInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.MediaInstance ' . \implode(' ', $context) . ']'; } }PKt[Z6Twilio/Rest/Api/V2010/Account/Message/FeedbackPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FeedbackInstance \Twilio\Rest\Api\V2010\Account\Message\FeedbackInstance */ public function buildInstance(array $payload): FeedbackInstance { return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['messageSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackPage]'; } }PKt[??6Twilio/Rest/Api/V2010/Account/Message/MediaOptions.phpnu[options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['dateCreated'] = $dateCreated; $this->options['dateCreatedAfter'] = $dateCreatedAfter; } /** * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. * * @param string $dateCreatedBefore Only include media that was created on this * date * @return $this Fluent Builder */ public function setDateCreatedBefore(string $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. * * @param string $dateCreated Only include media that was created on this date * @return $this Fluent Builder */ public function setDateCreated(string $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. * * @param string $dateCreatedAfter Only include media that was created on this * date * @return $this Fluent Builder */ public function setDateCreatedAfter(string $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.ReadMediaOptions ' . $options . ']'; } }PKt[̱# # 6Twilio/Rest/Api/V2010/Account/Message/MediaContext.phpnu[solution = ['accountSid' => $accountSid, 'messageSid' => $messageSid, 'sid' => $sid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($messageSid) . '/Media/' . \rawurlencode($sid) . '.json'; } /** * Delete the MediaInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the MediaInstance * * @return MediaInstance Fetched MediaInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MediaInstance { $payload = $this->version->fetch('GET', $this->uri); return new MediaInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['messageSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.MediaContext ' . \implode(' ', $context) . ']'; } }PKt[_E :Twilio/Rest/Api/V2010/Account/Message/FeedbackInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'messageSid' => Values::array_get($payload, 'message_sid'), 'outcome' => Values::array_get($payload, 'outcome'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['accountSid' => $accountSid, 'messageSid' => $messageSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackInstance]'; } }PKt[͕6Twilio/Rest/Api/V2010/Account/Message/FeedbackList.phpnu[solution = ['accountSid' => $accountSid, 'messageSid' => $messageSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($messageSid) . '/Feedback.json'; } /** * Create the FeedbackInstance * * @param array|Options $options Optional Arguments * @return FeedbackInstance Created FeedbackInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): FeedbackInstance { $options = new Values($options); $data = Values::of(['Outcome' => $options['outcome'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FeedbackInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['messageSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.FeedbackList]'; } }PKt[@69Twilio/Rest/Api/V2010/Account/Message/FeedbackOptions.phpnu[options['outcome'] = $outcome; } /** * Whether the feedback has arrived. Can be: `unconfirmed` or `confirmed`. If `provide_feedback`=`true` in [the initial HTTP POST](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource), the initial value of this property is `unconfirmed`. After the message arrives, update the value to `confirmed`. * * @param string $outcome Whether the feedback has arrived * @return $this Fluent Builder */ public function setOutcome(string $outcome): self { $this->options['outcome'] = $outcome; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Api.V2010.CreateFeedbackOptions ' . $options . ']'; } }PKt[#3Twilio/Rest/Api/V2010/Account/Message/MediaPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MediaInstance \Twilio\Rest\Api\V2010\Account\Message\MediaInstance */ public function buildInstance(array $payload): MediaInstance { return new MediaInstance( $this->version, $payload, $this->solution['accountSid'], $this->solution['messageSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MediaPage]'; } }PKt[|w==3Twilio/Rest/Api/V2010/Account/Message/MediaList.phpnu[solution = ['accountSid' => $accountSid, 'messageSid' => $messageSid, ]; $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($messageSid) . '/Media.json'; } /** * Streams MediaInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MediaInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MediaInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MediaInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MediaPage Page of MediaInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MediaPage { $options = new Values($options); $params = Values::of([ 'DateCreated<' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateCreated>' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MediaPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MediaInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MediaPage Page of MediaInstance */ public function getPage(string $targetUrl): MediaPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MediaPage($this->version, $response, $this->solution); } /** * Constructs a MediaContext * * @param string $sid The unique string that identifies this resource */ public function getContext(string $sid): MediaContext { return new MediaContext( $this->version, $this->solution['accountSid'], $this->solution['messageSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api.V2010.MediaList]'; } }PKt[B1,mk k .Twilio/Rest/Api/V2010/Account/CallInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'parentCallSid' => Values::array_get($payload, 'parent_call_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'to' => Values::array_get($payload, 'to'), 'toFormatted' => Values::array_get($payload, 'to_formatted'), 'from' => Values::array_get($payload, 'from'), 'fromFormatted' => Values::array_get($payload, 'from_formatted'), 'phoneNumberSid' => Values::array_get($payload, 'phone_number_sid'), 'status' => Values::array_get($payload, 'status'), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'duration' => Values::array_get($payload, 'duration'), 'price' => Values::array_get($payload, 'price'), 'priceUnit' => Values::array_get($payload, 'price_unit'), 'direction' => Values::array_get($payload, 'direction'), 'answeredBy' => Values::array_get($payload, 'answered_by'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'forwardedFrom' => Values::array_get($payload, 'forwarded_from'), 'groupSid' => Values::array_get($payload, 'group_sid'), 'callerName' => Values::array_get($payload, 'caller_name'), 'queueTime' => Values::array_get($payload, 'queue_time'), 'trunkSid' => Values::array_get($payload, 'trunk_sid'), 'uri' => Values::array_get($payload, 'uri'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), ]; $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CallContext Context for this CallInstance */ protected function proxy(): CallContext { if (!$this->context) { $this->context = new CallContext( $this->version, $this->solution['accountSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the CallInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the CallInstance * * @return CallInstance Fetched CallInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CallInstance { return $this->proxy()->fetch(); } /** * Update the CallInstance * * @param array|Options $options Optional Arguments * @return CallInstance Updated CallInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CallInstance { return $this->proxy()->update($options); } /** * Access the recordings */ protected function getRecordings(): RecordingList { return $this->proxy()->recordings; } /** * Access the notifications */ protected function getNotifications(): NotificationList { return $this->proxy()->notifications; } /** * Access the feedback */ protected function getFeedback(): FeedbackList { return $this->proxy()->feedback; } /** * Access the events */ protected function getEvents(): EventList { return $this->proxy()->events; } /** * Access the payments */ protected function getPayments(): PaymentList { return $this->proxy()->payments; } /** * Access the siprec */ protected function getSiprec(): SiprecList { return $this->proxy()->siprec; } /** * Access the streams */ protected function getStreams(): StreamList { return $this->proxy()->streams; } /** * Access the userDefinedMessageSubscriptions */ protected function getUserDefinedMessageSubscriptions(): UserDefinedMessageSubscriptionList { return $this->proxy()->userDefinedMessageSubscriptions; } /** * Access the userDefinedMessages */ protected function getUserDefinedMessages(): UserDefinedMessageList { return $this->proxy()->userDefinedMessages; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.CallInstance ' . \implode(' ', $context) . ']'; } }PKt[s%%%)Twilio/Rest/Api/V2010/AccountInstance.phpnu[properties = [ 'authToken' => Values::array_get($payload, 'auth_token'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'ownerAccountSid' => Values::array_get($payload, 'owner_account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'subresourceUris' => Values::array_get($payload, 'subresource_uris'), 'type' => Values::array_get($payload, 'type'), 'uri' => Values::array_get($payload, 'uri'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AccountContext Context for this AccountInstance */ protected function proxy(): AccountContext { if (!$this->context) { $this->context = new AccountContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the AccountInstance * * @return AccountInstance Fetched AccountInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AccountInstance { return $this->proxy()->fetch(); } /** * Update the AccountInstance * * @param array|Options $options Optional Arguments * @return AccountInstance Updated AccountInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AccountInstance { return $this->proxy()->update($options); } /** * Access the addresses */ protected function getAddresses(): AddressList { return $this->proxy()->addresses; } /** * Access the applications */ protected function getApplications(): ApplicationList { return $this->proxy()->applications; } /** * Access the authorizedConnectApps */ protected function getAuthorizedConnectApps(): AuthorizedConnectAppList { return $this->proxy()->authorizedConnectApps; } /** * Access the availablePhoneNumbers */ protected function getAvailablePhoneNumbers(): AvailablePhoneNumberCountryList { return $this->proxy()->availablePhoneNumbers; } /** * Access the balance */ protected function getBalance(): BalanceList { return $this->proxy()->balance; } /** * Access the calls */ protected function getCalls(): CallList { return $this->proxy()->calls; } /** * Access the conferences */ protected function getConferences(): ConferenceList { return $this->proxy()->conferences; } /** * Access the connectApps */ protected function getConnectApps(): ConnectAppList { return $this->proxy()->connectApps; } /** * Access the incomingPhoneNumbers */ protected function getIncomingPhoneNumbers(): IncomingPhoneNumberList { return $this->proxy()->incomingPhoneNumbers; } /** * Access the keys */ protected function getKeys(): KeyList { return $this->proxy()->keys; } /** * Access the messages */ protected function getMessages(): MessageList { return $this->proxy()->messages; } /** * Access the newKeys */ protected function getNewKeys(): NewKeyList { return $this->proxy()->newKeys; } /** * Access the newSigningKeys */ protected function getNewSigningKeys(): NewSigningKeyList { return $this->proxy()->newSigningKeys; } /** * Access the notifications */ protected function getNotifications(): NotificationList { return $this->proxy()->notifications; } /** * Access the outgoingCallerIds */ protected function getOutgoingCallerIds(): OutgoingCallerIdList { return $this->proxy()->outgoingCallerIds; } /** * Access the queues */ protected function getQueues(): QueueList { return $this->proxy()->queues; } /** * Access the recordings */ protected function getRecordings(): RecordingList { return $this->proxy()->recordings; } /** * Access the signingKeys */ protected function getSigningKeys(): SigningKeyList { return $this->proxy()->signingKeys; } /** * Access the sip */ protected function getSip(): SipList { return $this->proxy()->sip; } /** * Access the shortCodes */ protected function getShortCodes(): ShortCodeList { return $this->proxy()->shortCodes; } /** * Access the tokens */ protected function getTokens(): TokenList { return $this->proxy()->tokens; } /** * Access the transcriptions */ protected function getTranscriptions(): TranscriptionList { return $this->proxy()->transcriptions; } /** * Access the usage */ protected function getUsage(): UsageList { return $this->proxy()->usage; } /** * Access the validationRequests */ protected function getValidationRequests(): ValidationRequestList { return $this->proxy()->validationRequests; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Api.V2010.AccountInstance ' . \implode(' ', $context) . ']'; } }PKt[4Y Twilio/Rest/Supersim.phpnu[baseUrl = 'https://supersim.twilio.com'; } /** * @return V1 Version v1 of supersim */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getEsimProfiles(): \Twilio\Rest\Supersim\V1\EsimProfileList { return $this->v1->esimProfiles; } /** * @param string $sid The SID of the eSIM Profile resource to fetch */ protected function contextEsimProfiles(string $sid): \Twilio\Rest\Supersim\V1\EsimProfileContext { return $this->v1->esimProfiles($sid); } protected function getFleets(): \Twilio\Rest\Supersim\V1\FleetList { return $this->v1->fleets; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextFleets(string $sid): \Twilio\Rest\Supersim\V1\FleetContext { return $this->v1->fleets($sid); } protected function getIpCommands(): \Twilio\Rest\Supersim\V1\IpCommandList { return $this->v1->ipCommands; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextIpCommands(string $sid): \Twilio\Rest\Supersim\V1\IpCommandContext { return $this->v1->ipCommands($sid); } protected function getNetworks(): \Twilio\Rest\Supersim\V1\NetworkList { return $this->v1->networks; } /** * @param string $sid The SID of the Network resource to fetch */ protected function contextNetworks(string $sid): \Twilio\Rest\Supersim\V1\NetworkContext { return $this->v1->networks($sid); } protected function getNetworkAccessProfiles(): \Twilio\Rest\Supersim\V1\NetworkAccessProfileList { return $this->v1->networkAccessProfiles; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextNetworkAccessProfiles(string $sid): \Twilio\Rest\Supersim\V1\NetworkAccessProfileContext { return $this->v1->networkAccessProfiles($sid); } protected function getSettingsUpdates(): \Twilio\Rest\Supersim\V1\SettingsUpdateList { return $this->v1->settingsUpdates; } protected function getSims(): \Twilio\Rest\Supersim\V1\SimList { return $this->v1->sims; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextSims(string $sid): \Twilio\Rest\Supersim\V1\SimContext { return $this->v1->sims($sid); } protected function getSmsCommands(): \Twilio\Rest\Supersim\V1\SmsCommandList { return $this->v1->smsCommands; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextSmsCommands(string $sid): \Twilio\Rest\Supersim\V1\SmsCommandContext { return $this->v1->smsCommands($sid); } protected function getUsageRecords(): \Twilio\Rest\Supersim\V1\UsageRecordList { return $this->v1->usageRecords; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim]'; } }PKt[׆̌&&Twilio/Rest/Preview.phpnu[baseUrl = 'https://preview.twilio.com'; } /** * @return PreviewDeployedDevices Version deployedDevices of preview */ protected function getDeployedDevices(): PreviewDeployedDevices { if (!$this->_deployedDevices) { $this->_deployedDevices = new PreviewDeployedDevices($this); } return $this->_deployedDevices; } /** * @return PreviewHostedNumbers Version hostedNumbers of preview */ protected function getHostedNumbers(): PreviewHostedNumbers { if (!$this->_hostedNumbers) { $this->_hostedNumbers = new PreviewHostedNumbers($this); } return $this->_hostedNumbers; } /** * @return PreviewMarketplace Version marketplace of preview */ protected function getMarketplace(): PreviewMarketplace { if (!$this->_marketplace) { $this->_marketplace = new PreviewMarketplace($this); } return $this->_marketplace; } /** * @return PreviewSync Version sync of preview */ protected function getSync(): PreviewSync { if (!$this->_sync) { $this->_sync = new PreviewSync($this); } return $this->_sync; } /** * @return PreviewUnderstand Version understand of preview */ protected function getUnderstand(): PreviewUnderstand { if (!$this->_understand) { $this->_understand = new PreviewUnderstand($this); } return $this->_understand; } /** * @return PreviewWireless Version wireless of preview */ protected function getWireless(): PreviewWireless { if (!$this->_wireless) { $this->_wireless = new PreviewWireless($this); } return $this->_wireless; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getFleets(): \Twilio\Rest\Preview\DeployedDevices\FleetList { return $this->deployedDevices->fleets; } /** * @param string $sid A string that uniquely identifies the Fleet. */ protected function contextFleets(string $sid): \Twilio\Rest\Preview\DeployedDevices\FleetContext { return $this->deployedDevices->fleets($sid); } protected function getAuthorizationDocuments(): \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentList { return $this->hostedNumbers->authorizationDocuments; } /** * @param string $sid AuthorizationDocument sid. */ protected function contextAuthorizationDocuments(string $sid): \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentContext { return $this->hostedNumbers->authorizationDocuments($sid); } protected function getHostedNumberOrders(): \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderList { return $this->hostedNumbers->hostedNumberOrders; } /** * @param string $sid HostedNumberOrder sid. */ protected function contextHostedNumberOrders(string $sid): \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderContext { return $this->hostedNumbers->hostedNumberOrders($sid); } protected function getAvailableAddOns(): \Twilio\Rest\Preview\Marketplace\AvailableAddOnList { return $this->marketplace->availableAddOns; } /** * @param string $sid The SID of the AvailableAddOn resource to fetch */ protected function contextAvailableAddOns(string $sid): \Twilio\Rest\Preview\Marketplace\AvailableAddOnContext { return $this->marketplace->availableAddOns($sid); } protected function getInstalledAddOns(): \Twilio\Rest\Preview\Marketplace\InstalledAddOnList { return $this->marketplace->installedAddOns; } /** * @param string $sid The SID of the InstalledAddOn resource to fetch */ protected function contextInstalledAddOns(string $sid): \Twilio\Rest\Preview\Marketplace\InstalledAddOnContext { return $this->marketplace->installedAddOns($sid); } protected function getServices(): \Twilio\Rest\Preview\Sync\ServiceList { return $this->sync->services; } /** * @param string $sid The sid */ protected function contextServices(string $sid): \Twilio\Rest\Preview\Sync\ServiceContext { return $this->sync->services($sid); } protected function getAssistants(): \Twilio\Rest\Preview\Understand\AssistantList { return $this->understand->assistants; } /** * @param string $sid A 34 character string that uniquely identifies this * resource. */ protected function contextAssistants(string $sid): \Twilio\Rest\Preview\Understand\AssistantContext { return $this->understand->assistants($sid); } protected function getCommands(): \Twilio\Rest\Preview\Wireless\CommandList { return $this->wireless->commands; } /** * @param string $sid The sid */ protected function contextCommands(string $sid): \Twilio\Rest\Preview\Wireless\CommandContext { return $this->wireless->commands($sid); } protected function getRatePlans(): \Twilio\Rest\Preview\Wireless\RatePlanList { return $this->wireless->ratePlans; } /** * @param string $sid The sid */ protected function contextRatePlans(string $sid): \Twilio\Rest\Preview\Wireless\RatePlanContext { return $this->wireless->ratePlans($sid); } protected function getSims(): \Twilio\Rest\Preview\Wireless\SimList { return $this->wireless->sims; } /** * @param string $sid The sid */ protected function contextSims(string $sid): \Twilio\Rest\Preview\Wireless\SimContext { return $this->wireless->sims($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview]'; } }PKt[jMTwilio/Rest/Verify.phpnu[baseUrl = 'https://verify.twilio.com'; } /** * @return V2 Version v2 of verify */ protected function getV2(): V2 { if (!$this->_v2) { $this->_v2 = new V2($this); } return $this->_v2; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getForms(): \Twilio\Rest\Verify\V2\FormList { return $this->v2->forms; } /** * @param string $formType The Type of this Form */ protected function contextForms(string $formType): \Twilio\Rest\Verify\V2\FormContext { return $this->v2->forms($formType); } protected function getSafelist(): \Twilio\Rest\Verify\V2\SafelistList { return $this->v2->safelist; } /** * @param string $phoneNumber The phone number to be fetched from SafeList. */ protected function contextSafelist(string $phoneNumber): \Twilio\Rest\Verify\V2\SafelistContext { return $this->v2->safelist($phoneNumber); } protected function getServices(): \Twilio\Rest\Verify\V2\ServiceList { return $this->v2->services; } /** * @param string $sid The unique string that identifies the resource */ protected function contextServices(string $sid): \Twilio\Rest\Verify\V2\ServiceContext { return $this->v2->services($sid); } protected function getVerificationAttempts(): \Twilio\Rest\Verify\V2\VerificationAttemptList { return $this->v2->verificationAttempts; } /** * @param string $sid Verification Attempt Sid. */ protected function contextVerificationAttempts(string $sid): \Twilio\Rest\Verify\V2\VerificationAttemptContext { return $this->v2->verificationAttempts($sid); } protected function getVerificationAttemptsSummary(): \Twilio\Rest\Verify\V2\VerificationAttemptsSummaryList { return $this->v2->verificationAttemptsSummary; } protected function contextVerificationAttemptsSummary(): \Twilio\Rest\Verify\V2\VerificationAttemptsSummaryContext { return $this->v2->verificationAttemptsSummary(); } protected function getTemplates(): \Twilio\Rest\Verify\V2\TemplateList { return $this->v2->templates; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify]'; } }PKt[2#=4Twilio/Rest/Conversations/V1/ConversationContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Conversations/' . \rawurlencode($sid) . ''; } /** * Update the ConversationInstance * * @param array|Options $options Optional Arguments * @return ConversationInstance Updated ConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConversationInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], 'MessagingServiceSid' => $options['messagingServiceSid'], 'State' => $options['state'], 'Timers.Inactive' => $options['timersInactive'], 'Timers.Closed' => $options['timersClosed'], 'UniqueName' => $options['uniqueName'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new ConversationInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ConversationInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Fetch the ConversationInstance * * @return ConversationInstance Fetched ConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConversationInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConversationInstance($this->version, $payload, $this->solution['sid']); } /** * Access the participants */ protected function getParticipants(): ParticipantList { if (!$this->_participants) { $this->_participants = new ParticipantList($this->version, $this->solution['sid']); } return $this->_participants; } /** * Access the messages */ protected function getMessages(): MessageList { if (!$this->_messages) { $this->_messages = new MessageList($this->version, $this->solution['sid']); } return $this->_messages; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { if (!$this->_webhooks) { $this->_webhooks = new WebhookList($this->version, $this->solution['sid']); } return $this->_webhooks; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ConversationContext ' . \implode(' ', $context) . ']'; } }PKt[)N-Twilio/Rest/Conversations/V1/UserInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'roleSid' => Values::array_get($payload, 'role_sid'), 'identity' => Values::array_get($payload, 'identity'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'attributes' => Values::array_get($payload, 'attributes'), 'isOnline' => Values::array_get($payload, 'is_online'), 'isNotifiable' => Values::array_get($payload, 'is_notifiable'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserContext Context for this UserInstance */ protected function proxy(): UserContext { if (!$this->context) { $this->context = new UserContext($this->version, $this->solution['sid']); } return $this->context; } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { return $this->proxy()->update($options); } /** * Delete the UserInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { return $this->proxy()->fetch(); } /** * Access the userConversations */ protected function getUserConversations(): UserConversationList { return $this->proxy()->userConversations; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.UserInstance ' . \implode(' ', $context) . ']'; } }PKt[E^/Twilio/Rest/Conversations/V1/CredentialPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialInstance \Twilio\Rest\Conversations\V1\CredentialInstance */ public function buildInstance(array $payload): CredentialInstance { return new CredentialInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.CredentialPage]'; } }PKt[S>i1i12Twilio/Rest/Conversations/V1/CredentialOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * A descriptive string that you create to describe the new resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. * * @param string $certificate [APN only] The URL encoded representation of the * certificate. * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. * * @param string $privateKey [APN only] The URL encoded representation of the * private key. * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs. * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. * * @param string $apiKey [GCM only] The API key for the project that was * obtained from the Google Developer console for your * GCM Service application credential. * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * * @param string $secret [FCM only] The Server key of your project from * Firebase console. * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateCredentialOptions ' . $options . ']'; } } class UpdateCredentialOptions extends Options { /** * @param string $type The type of push-notification service the credential is * for. * @param string $friendlyName A string to describe the resource * @param string $certificate [APN only] The URL encoded representation of the * certificate. * @param string $privateKey [APN only] The URL encoded representation of the * private key. * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs. * @param string $apiKey [GCM only] The API key for the project that was * obtained from the Google Developer console for your * GCM Service application credential. * @param string $secret [FCM only] The Server key of your project from * Firebase console. */ public function __construct(string $type = Values::NONE, string $friendlyName = Values::NONE, string $certificate = Values::NONE, string $privateKey = Values::NONE, bool $sandbox = Values::NONE, string $apiKey = Values::NONE, string $secret = Values::NONE) { $this->options['type'] = $type; $this->options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. * * @param string $type The type of push-notification service the credential is * for. * @return $this Fluent Builder */ public function setType(string $type): self { $this->options['type'] = $type; return $this; } /** * A descriptive string that you create to describe the new resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. * * @param string $certificate [APN only] The URL encoded representation of the * certificate. * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. * * @param string $privateKey [APN only] The URL encoded representation of the * private key. * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs. * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. * * @param string $apiKey [GCM only] The API key for the project that was * obtained from the Google Developer console for your * GCM Service application credential. * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * * @param string $secret [FCM only] The Server key of your project from * Firebase console. * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateCredentialOptions ' . $options . ']'; } }PKt[_<Twilio/Rest/Conversations/V1/ParticipantConversationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ParticipantConversationInstance \Twilio\Rest\Conversations\V1\ParticipantConversationInstance */ public function buildInstance(array $payload): ParticipantConversationInstance { return new ParticipantConversationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ParticipantConversationPage]'; } }PKt[]p$p$,Twilio/Rest/Conversations/V1/UserOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['attributes'] = $attributes; $this->options['roleSid'] = $roleSid; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. * * @param string $attributes The JSON Object string that stores * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * * @param string $roleSid The SID of a service-level Role to assign to the user * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateUserOptions ' . $options . ']'; } } class UpdateUserOptions extends Options { /** * @param string $friendlyName The string that you assigned to describe the * resource * @param string $attributes The JSON Object string that stores * application-specific data * @param string $roleSid The SID of a service-level Role to assign to the user * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $friendlyName = Values::NONE, string $attributes = Values::NONE, string $roleSid = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['attributes'] = $attributes; $this->options['roleSid'] = $roleSid; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. * * @param string $attributes The JSON Object string that stores * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * * @param string $roleSid The SID of a service-level Role to assign to the user * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateUserOptions ' . $options . ']'; } } class DeleteUserOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.DeleteUserOptions ' . $options . ']'; } }PKt[Dbs s ?Twilio/Rest/Conversations/V1/ParticipantConversationOptions.phpnu[options['identity'] = $identity; $this->options['address'] = $address; } /** * A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. * * @param string $identity A unique string identifier for the conversation * participant as Conversation User. * @return $this Fluent Builder */ public function setIdentity(string $identity): self { $this->options['identity'] = $identity; return $this; } /** * A unique string identifier for the conversation participant who's not a Conversation User. This parameter could be found in messaging_binding.address field of Participant resource. It should be url-encoded. * * @param string $address A unique string identifier for the conversation * participant who's not a Conversation User. * @return $this Fluent Builder */ public function setAddress(string $address): self { $this->options['address'] = $address; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.ReadParticipantConversationOptions ' . $options . ']'; } }PKt[he<Twilio/Rest/Conversations/V1/Service/ConversationContext.phpnu[solution = ['chatServiceSid' => $chatServiceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Conversations/' . \rawurlencode($sid) . ''; } /** * Update the ConversationInstance * * @param array|Options $options Optional Arguments * @return ConversationInstance Updated ConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConversationInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], 'MessagingServiceSid' => $options['messagingServiceSid'], 'State' => $options['state'], 'Timers.Inactive' => $options['timersInactive'], 'Timers.Closed' => $options['timersClosed'], 'UniqueName' => $options['uniqueName'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new ConversationInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['sid'] ); } /** * Delete the ConversationInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Fetch the ConversationInstance * * @return ConversationInstance Fetched ConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConversationInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConversationInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['sid'] ); } /** * Access the participants */ protected function getParticipants(): ParticipantList { if (!$this->_participants) { $this->_participants = new ParticipantList( $this->version, $this->solution['chatServiceSid'], $this->solution['sid'] ); } return $this->_participants; } /** * Access the messages */ protected function getMessages(): MessageList { if (!$this->_messages) { $this->_messages = new MessageList( $this->version, $this->solution['chatServiceSid'], $this->solution['sid'] ); } return $this->_messages; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { if (!$this->_webhooks) { $this->_webhooks = new WebhookList( $this->version, $this->solution['chatServiceSid'], $this->solution['sid'] ); } return $this->_webhooks; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ConversationContext ' . \implode(' ', $context) . ']'; } }PKt[9~g7Twilio/Rest/Conversations/V1/Service/BindingContext.phpnu[solution = ['chatServiceSid' => $chatServiceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Bindings/' . \rawurlencode($sid) . ''; } /** * Delete the BindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the BindingInstance * * @return BindingInstance Fetched BindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BindingInstance { $payload = $this->version->fetch('GET', $this->uri); return new BindingInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.BindingContext ' . \implode(' ', $context) . ']'; } }PKt[>>5Twilio/Rest/Conversations/V1/Service/UserInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'roleSid' => Values::array_get($payload, 'role_sid'), 'identity' => Values::array_get($payload, 'identity'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'attributes' => Values::array_get($payload, 'attributes'), 'isOnline' => Values::array_get($payload, 'is_online'), 'isNotifiable' => Values::array_get($payload, 'is_notifiable'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['chatServiceSid' => $chatServiceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserContext Context for this UserInstance */ protected function proxy(): UserContext { if (!$this->context) { $this->context = new UserContext( $this->version, $this->solution['chatServiceSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { return $this->proxy()->update($options); } /** * Delete the UserInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { return $this->proxy()->fetch(); } /** * Access the userConversations */ protected function getUserConversations(): UserConversationList { return $this->proxy()->userConversations; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.UserInstance ' . \implode(' ', $context) . ']'; } }PKt[}` 7Twilio/Rest/Conversations/V1/Service/BindingOptions.phpnu[options['bindingType'] = $bindingType; $this->options['identity'] = $identity; } /** * The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. * * @param string[] $bindingType The push technology used by the Binding * resources to read. * @return $this Fluent Builder */ public function setBindingType(array $bindingType): self { $this->options['bindingType'] = $bindingType; return $this; } /** * The identity of a [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource) this binding belongs to. See [access tokens](https://www.twilio.com/docs/conversations/create-tokens) for more details. * * @param string[] $identity The identity of Conversation User associated with * this binding. * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.ReadBindingOptions ' . $options . ']'; } }PKt[6$OODTwilio/Rest/Conversations/V1/Service/ParticipantConversationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ParticipantConversationInstance \Twilio\Rest\Conversations\V1\Service\ParticipantConversationInstance */ public function buildInstance(array $payload): ParticipantConversationInstance { return new ParticipantConversationInstance( $this->version, $payload, $this->solution['chatServiceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ParticipantConversationPage]'; } }PKt[:.x$x$4Twilio/Rest/Conversations/V1/Service/UserOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['attributes'] = $attributes; $this->options['roleSid'] = $roleSid; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. * * @param string $attributes The JSON Object string that stores * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * * @param string $roleSid The SID of a service-level Role to assign to the user * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateUserOptions ' . $options . ']'; } } class UpdateUserOptions extends Options { /** * @param string $friendlyName The string that you assigned to describe the * resource * @param string $attributes The JSON Object string that stores * application-specific data * @param string $roleSid The SID of a service-level Role to assign to the user * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $friendlyName = Values::NONE, string $attributes = Values::NONE, string $roleSid = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['attributes'] = $attributes; $this->options['roleSid'] = $roleSid; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. * * @param string $attributes The JSON Object string that stores * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. * * @param string $roleSid The SID of a service-level Role to assign to the user * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateUserOptions ' . $options . ']'; } } class DeleteUserOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.DeleteUserOptions ' . $options . ']'; } }PKt[Cs{ { GTwilio/Rest/Conversations/V1/Service/ParticipantConversationOptions.phpnu[options['identity'] = $identity; $this->options['address'] = $address; } /** * A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. * * @param string $identity A unique string identifier for the conversation * participant as Conversation User. * @return $this Fluent Builder */ public function setIdentity(string $identity): self { $this->options['identity'] = $identity; return $this; } /** * A unique string identifier for the conversation participant who's not a Conversation User. This parameter could be found in messaging_binding.address field of Participant resource. It should be url-encoded. * * @param string $address A unique string identifier for the conversation * participant who's not a Conversation User. * @return $this Fluent Builder */ public function setAddress(string $address): self { $this->options['address'] = $address; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.ReadParticipantConversationOptions ' . $options . ']'; } }PKt[oRBTwilio/Rest/Conversations/V1/Service/Configuration/WebhookPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WebhookInstance \Twilio\Rest\Conversations\V1\Service\Configuration\WebhookInstance */ public function buildInstance(array $payload): WebhookInstance { return new WebhookInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.WebhookPage]'; } }PKt[%?6qqGTwilio/Rest/Conversations/V1/Service/Configuration/NotificationList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; } /** * Constructs a NotificationContext */ public function getContext(): NotificationContext { return new NotificationContext($this->version, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.NotificationList]'; } }PKt[`hSSBTwilio/Rest/Conversations/V1/Service/Configuration/WebhookList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; } /** * Constructs a WebhookContext */ public function getContext(): WebhookContext { return new WebhookContext($this->version, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.WebhookList]'; } }PKt[rWGTwilio/Rest/Conversations/V1/Service/Configuration/NotificationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NotificationInstance \Twilio\Rest\Conversations\V1\Service\Configuration\NotificationInstance */ public function buildInstance(array $payload): NotificationInstance { return new NotificationInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.NotificationPage]'; } }PKt[ÕKTwilio/Rest/Conversations/V1/Service/Configuration/NotificationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'newMessage' => Values::array_get($payload, 'new_message'), 'addedToConversation' => Values::array_get($payload, 'added_to_conversation'), 'removedFromConversation' => Values::array_get($payload, 'removed_from_conversation'), 'logEnabled' => Values::array_get($payload, 'log_enabled'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['chatServiceSid' => $chatServiceSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NotificationContext Context for this NotificationInstance */ protected function proxy(): NotificationContext { if (!$this->context) { $this->context = new NotificationContext($this->version, $this->solution['chatServiceSid']); } return $this->context; } /** * Update the NotificationInstance * * @param array|Options $options Optional Arguments * @return NotificationInstance Updated NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): NotificationInstance { return $this->proxy()->update($options); } /** * Fetch the NotificationInstance * * @return NotificationInstance Fetched NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NotificationInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.NotificationInstance ' . \implode(' ', $context) . ']'; } }PKt[gCCJTwilio/Rest/Conversations/V1/Service/Configuration/NotificationOptions.phpnu[options['logEnabled'] = $logEnabled; $this->options['newMessageEnabled'] = $newMessageEnabled; $this->options['newMessageTemplate'] = $newMessageTemplate; $this->options['newMessageSound'] = $newMessageSound; $this->options['newMessageBadgeCountEnabled'] = $newMessageBadgeCountEnabled; $this->options['addedToConversationEnabled'] = $addedToConversationEnabled; $this->options['addedToConversationTemplate'] = $addedToConversationTemplate; $this->options['addedToConversationSound'] = $addedToConversationSound; $this->options['removedFromConversationEnabled'] = $removedFromConversationEnabled; $this->options['removedFromConversationTemplate'] = $removedFromConversationTemplate; $this->options['removedFromConversationSound'] = $removedFromConversationSound; $this->options['newMessageWithMediaEnabled'] = $newMessageWithMediaEnabled; $this->options['newMessageWithMediaTemplate'] = $newMessageWithMediaTemplate; } /** * Weather the notification logging is enabled. * * @param bool $logEnabled Weather the notification logging is enabled. * @return $this Fluent Builder */ public function setLogEnabled(bool $logEnabled): self { $this->options['logEnabled'] = $logEnabled; return $this; } /** * Whether to send a notification when a new message is added to a conversation. The default is `false`. * * @param bool $newMessageEnabled Whether to send a notification when a new * message is added to a conversation. * @return $this Fluent Builder */ public function setNewMessageEnabled(bool $newMessageEnabled): self { $this->options['newMessageEnabled'] = $newMessageEnabled; return $this; } /** * The template to use to create the notification text displayed when a new message is added to a conversation and `new_message.enabled` is `true`. * * @param string $newMessageTemplate The template to use to create the * notification text displayed when a new * message is added to a conversation. * @return $this Fluent Builder */ public function setNewMessageTemplate(string $newMessageTemplate): self { $this->options['newMessageTemplate'] = $newMessageTemplate; return $this; } /** * The name of the sound to play when a new message is added to a conversation and `new_message.enabled` is `true`. * * @param string $newMessageSound The name of the sound to play when a new * message is added to a conversation. * @return $this Fluent Builder */ public function setNewMessageSound(string $newMessageSound): self { $this->options['newMessageSound'] = $newMessageSound; return $this; } /** * Whether the new message badge is enabled. The default is `false`. * * @param bool $newMessageBadgeCountEnabled Whether the new message badge is * enabled. * @return $this Fluent Builder */ public function setNewMessageBadgeCountEnabled(bool $newMessageBadgeCountEnabled): self { $this->options['newMessageBadgeCountEnabled'] = $newMessageBadgeCountEnabled; return $this; } /** * Whether to send a notification when a participant is added to a conversation. The default is `false`. * * @param bool $addedToConversationEnabled Whether to send a notification when * a participant is added to a * conversation. * @return $this Fluent Builder */ public function setAddedToConversationEnabled(bool $addedToConversationEnabled): self { $this->options['addedToConversationEnabled'] = $addedToConversationEnabled; return $this; } /** * The template to use to create the notification text displayed when a participant is added to a conversation and `added_to_conversation.enabled` is `true`. * * @param string $addedToConversationTemplate The template to use to create the * notification text displayed when * a participant is added to a * conversation. * @return $this Fluent Builder */ public function setAddedToConversationTemplate(string $addedToConversationTemplate): self { $this->options['addedToConversationTemplate'] = $addedToConversationTemplate; return $this; } /** * The name of the sound to play when a participant is added to a conversation and `added_to_conversation.enabled` is `true`. * * @param string $addedToConversationSound The name of the sound to play when a * participant is added to a * conversation. * @return $this Fluent Builder */ public function setAddedToConversationSound(string $addedToConversationSound): self { $this->options['addedToConversationSound'] = $addedToConversationSound; return $this; } /** * Whether to send a notification to a user when they are removed from a conversation. The default is `false`. * * @param bool $removedFromConversationEnabled Whether to send a notification * to a user when they are removed * from a conversation. * @return $this Fluent Builder */ public function setRemovedFromConversationEnabled(bool $removedFromConversationEnabled): self { $this->options['removedFromConversationEnabled'] = $removedFromConversationEnabled; return $this; } /** * The template to use to create the notification text displayed to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. * * @param string $removedFromConversationTemplate The template to use to create * the notification text * displayed to a user when they * are removed. * @return $this Fluent Builder */ public function setRemovedFromConversationTemplate(string $removedFromConversationTemplate): self { $this->options['removedFromConversationTemplate'] = $removedFromConversationTemplate; return $this; } /** * The name of the sound to play to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. * * @param string $removedFromConversationSound The name of the sound to play to * a user when they are removed * from a conversation. * @return $this Fluent Builder */ public function setRemovedFromConversationSound(string $removedFromConversationSound): self { $this->options['removedFromConversationSound'] = $removedFromConversationSound; return $this; } /** * Whether to send a notification when a new message with media/file attachments is added to a conversation. The default is `false`. * * @param bool $newMessageWithMediaEnabled Whether to send a notification when * a new message with media/file * attachments is added to a * conversation. * @return $this Fluent Builder */ public function setNewMessageWithMediaEnabled(bool $newMessageWithMediaEnabled): self { $this->options['newMessageWithMediaEnabled'] = $newMessageWithMediaEnabled; return $this; } /** * The template to use to create the notification text displayed when a new message with media/file attachments is added to a conversation and `new_message.attachments.enabled` is `true`. * * @param string $newMessageWithMediaTemplate The template to use to create the * notification text displayed when * a new message with media/file * attachments is added to a * conversation. * @return $this Fluent Builder */ public function setNewMessageWithMediaTemplate(string $newMessageWithMediaTemplate): self { $this->options['newMessageWithMediaTemplate'] = $newMessageWithMediaTemplate; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateNotificationOptions ' . $options . ']'; } }PKt[Ut$ $ ETwilio/Rest/Conversations/V1/Service/Configuration/WebhookContext.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Configuration/Webhooks'; } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'PreWebhookUrl' => $options['preWebhookUrl'], 'PostWebhookUrl' => $options['postWebhookUrl'], 'Filters' => Serialize::map($options['filters'], function($e) { return $e; }), 'Method' => $options['method'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WebhookInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { $payload = $this->version->fetch('GET', $this->uri); return new WebhookInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.WebhookContext ' . \implode(' ', $context) . ']'; } }PKt["Mv JTwilio/Rest/Conversations/V1/Service/Configuration/NotificationContext.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Configuration/Notifications'; } /** * Update the NotificationInstance * * @param array|Options $options Optional Arguments * @return NotificationInstance Updated NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): NotificationInstance { $options = new Values($options); $data = Values::of([ 'LogEnabled' => Serialize::booleanToString($options['logEnabled']), 'NewMessage.Enabled' => Serialize::booleanToString($options['newMessageEnabled']), 'NewMessage.Template' => $options['newMessageTemplate'], 'NewMessage.Sound' => $options['newMessageSound'], 'NewMessage.BadgeCountEnabled' => Serialize::booleanToString($options['newMessageBadgeCountEnabled']), 'AddedToConversation.Enabled' => Serialize::booleanToString($options['addedToConversationEnabled']), 'AddedToConversation.Template' => $options['addedToConversationTemplate'], 'AddedToConversation.Sound' => $options['addedToConversationSound'], 'RemovedFromConversation.Enabled' => Serialize::booleanToString($options['removedFromConversationEnabled']), 'RemovedFromConversation.Template' => $options['removedFromConversationTemplate'], 'RemovedFromConversation.Sound' => $options['removedFromConversationSound'], 'NewMessage.WithMedia.Enabled' => Serialize::booleanToString($options['newMessageWithMediaEnabled']), 'NewMessage.WithMedia.Template' => $options['newMessageWithMediaTemplate'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new NotificationInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Fetch the NotificationInstance * * @return NotificationInstance Fetched NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NotificationInstance { $payload = $this->version->fetch('GET', $this->uri); return new NotificationInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.NotificationContext ' . \implode(' ', $context) . ']'; } }PKt[ kkFTwilio/Rest/Conversations/V1/Service/Configuration/WebhookInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'preWebhookUrl' => Values::array_get($payload, 'pre_webhook_url'), 'postWebhookUrl' => Values::array_get($payload, 'post_webhook_url'), 'filters' => Values::array_get($payload, 'filters'), 'method' => Values::array_get($payload, 'method'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['chatServiceSid' => $chatServiceSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WebhookContext Context for this WebhookInstance */ protected function proxy(): WebhookContext { if (!$this->context) { $this->context = new WebhookContext($this->version, $this->solution['chatServiceSid']); } return $this->context; } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { return $this->proxy()->update($options); } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.WebhookInstance ' . \implode(' ', $context) . ']'; } }PKt[ETwilio/Rest/Conversations/V1/Service/Configuration/WebhookOptions.phpnu[options['preWebhookUrl'] = $preWebhookUrl; $this->options['postWebhookUrl'] = $postWebhookUrl; $this->options['filters'] = $filters; $this->options['method'] = $method; } /** * The absolute url the pre-event webhook request should be sent to. * * @param string $preWebhookUrl The absolute url the pre-event webhook request * should be sent to. * @return $this Fluent Builder */ public function setPreWebhookUrl(string $preWebhookUrl): self { $this->options['preWebhookUrl'] = $preWebhookUrl; return $this; } /** * The absolute url the post-event webhook request should be sent to. * * @param string $postWebhookUrl The absolute url the post-event webhook * request should be sent to. * @return $this Fluent Builder */ public function setPostWebhookUrl(string $postWebhookUrl): self { $this->options['postWebhookUrl'] = $postWebhookUrl; return $this; } /** * The list of events that your configured webhook targets will receive. Events not configured here will not fire. Possible values are `onParticipantAdd`, `onParticipantAdded`, `onDeliveryUpdated`, `onConversationUpdated`, `onConversationRemove`, `onParticipantRemove`, `onConversationUpdate`, `onMessageAdd`, `onMessageRemoved`, `onParticipantUpdated`, `onConversationAdded`, `onMessageAdded`, `onConversationAdd`, `onConversationRemoved`, `onParticipantUpdate`, `onMessageRemove`, `onMessageUpdated`, `onParticipantRemoved`, `onMessageUpdate` or `onConversationStateUpdated`. * * @param string[] $filters The list of events that your configured webhook * targets will receive. Events not configured here * will not fire. * @return $this Fluent Builder */ public function setFilters(array $filters): self { $this->options['filters'] = $filters; return $this; } /** * The HTTP method to be used when sending a webhook request. One of `GET` or `POST`. * * @param string $method The HTTP method to be used when sending a webhook * request * @return $this Fluent Builder */ public function setMethod(string $method): self { $this->options['method'] = $method; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateWebhookOptions ' . $options . ']'; } }PKt[KK<Twilio/Rest/Conversations/V1/Service/ConversationOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['attributes'] = $attributes; $this->options['messagingServiceSid'] = $messagingServiceSid; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['state'] = $state; $this->options['timersInactive'] = $timersInactive; $this->options['timersClosed'] = $timersClosed; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The human-readable name of this conversation, limited to 256 characters. Optional. * * @param string $friendlyName The human-readable name of this conversation. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. * * @param string $messagingServiceSid The unique ID of the Messaging Service * this conversation belongs to. * @return $this Fluent Builder */ public function setMessagingServiceSid(string $messagingServiceSid): self { $this->options['messagingServiceSid'] = $messagingServiceSid; return $this; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` * * @param string $state Current state of this conversation. * @return $this Fluent Builder */ public function setState(string $state): self { $this->options['state'] = $state; return $this; } /** * ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * * @param string $timersInactive ISO8601 duration when conversation will be * switched to `inactive` state. * @return $this Fluent Builder */ public function setTimersInactive(string $timersInactive): self { $this->options['timersInactive'] = $timersInactive; return $this; } /** * ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. * * @param string $timersClosed ISO8601 duration when conversation will be * switched to `closed` state. * @return $this Fluent Builder */ public function setTimersClosed(string $timersClosed): self { $this->options['timersClosed'] = $timersClosed; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateConversationOptions ' . $options . ']'; } } class UpdateConversationOptions extends Options { /** * @param string $friendlyName The human-readable name of this conversation. * @param \DateTime $dateCreated The date that this resource was created. * @param \DateTime $dateUpdated The date that this resource was last updated. * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @param string $messagingServiceSid The unique ID of the Messaging Service * this conversation belongs to. * @param string $state Current state of this conversation. * @param string $timersInactive ISO8601 duration when conversation will be * switched to `inactive` state. * @param string $timersClosed ISO8601 duration when conversation will be * switched to `closed` state. * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $friendlyName = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $attributes = Values::NONE, string $messagingServiceSid = Values::NONE, string $state = Values::NONE, string $timersInactive = Values::NONE, string $timersClosed = Values::NONE, string $uniqueName = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['messagingServiceSid'] = $messagingServiceSid; $this->options['state'] = $state; $this->options['timersInactive'] = $timersInactive; $this->options['timersClosed'] = $timersClosed; $this->options['uniqueName'] = $uniqueName; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The human-readable name of this conversation, limited to 256 characters. Optional. * * @param string $friendlyName The human-readable name of this conversation. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. * * @param string $messagingServiceSid The unique ID of the Messaging Service * this conversation belongs to. * @return $this Fluent Builder */ public function setMessagingServiceSid(string $messagingServiceSid): self { $this->options['messagingServiceSid'] = $messagingServiceSid; return $this; } /** * Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` * * @param string $state Current state of this conversation. * @return $this Fluent Builder */ public function setState(string $state): self { $this->options['state'] = $state; return $this; } /** * ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * * @param string $timersInactive ISO8601 duration when conversation will be * switched to `inactive` state. * @return $this Fluent Builder */ public function setTimersInactive(string $timersInactive): self { $this->options['timersInactive'] = $timersInactive; return $this; } /** * ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. * * @param string $timersClosed ISO8601 duration when conversation will be * switched to `closed` state. * @return $this Fluent Builder */ public function setTimersClosed(string $timersClosed): self { $this->options['timersClosed'] = $timersClosed; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateConversationOptions ' . $options . ']'; } } class DeleteConversationOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.DeleteConversationOptions ' . $options . ']'; } }PKt[I '99ATwilio/Rest/Conversations/V1/Service/Conversation/WebhookPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WebhookInstance \Twilio\Rest\Conversations\V1\Service\Conversation\WebhookInstance */ public function buildInstance(array $payload): WebhookInstance { return new WebhookInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.WebhookPage]'; } }PKt[/ETwilio/Rest/Conversations/V1/Service/Conversation/ParticipantList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Conversations/' . \rawurlencode($conversationSid) . '/Participants'; } /** * Create the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Created ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ParticipantInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $options['identity'], 'MessagingBinding.Address' => $options['messagingBindingAddress'], 'MessagingBinding.ProxyAddress' => $options['messagingBindingProxyAddress'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], 'MessagingBinding.ProjectedAddress' => $options['messagingBindingProjectedAddress'], 'RoleSid' => $options['roleSid'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new ParticipantInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'] ); } /** * Streams ParticipantInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ParticipantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ParticipantInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ParticipantInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ParticipantPage Page of ParticipantInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ParticipantPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ParticipantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ParticipantInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ParticipantPage Page of ParticipantInstance */ public function getPage(string $targetUrl): ParticipantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ParticipantPage($this->version, $response, $this->solution); } /** * Constructs a ParticipantContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): ParticipantContext { return new ParticipantContext( $this->version, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ParticipantList]'; } }PKt[LATwilio/Rest/Conversations/V1/Service/Conversation/WebhookList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Conversations/' . \rawurlencode($conversationSid) . '/Webhooks'; } /** * Create the WebhookInstance * * @param string $target The target of this webhook. * @param array|Options $options Optional Arguments * @return WebhookInstance Created WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $target, array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'Target' => $target, 'Configuration.Url' => $options['configurationUrl'], 'Configuration.Method' => $options['configurationMethod'], 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }), 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }), 'Configuration.FlowSid' => $options['configurationFlowSid'], 'Configuration.ReplayAfter' => $options['configurationReplayAfter'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WebhookInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'] ); } /** * Streams WebhookInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WebhookInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WebhookInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of WebhookInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WebhookPage Page of WebhookInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WebhookPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WebhookPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WebhookInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WebhookPage Page of WebhookInstance */ public function getPage(string $targetUrl): WebhookPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WebhookPage($this->version, $response, $this->solution); } /** * Constructs a WebhookContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): WebhookContext { return new WebhookContext( $this->version, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.WebhookList]'; } }PKt[ZZITwilio/Rest/Conversations/V1/Service/Conversation/ParticipantInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'sid' => Values::array_get($payload, 'sid'), 'identity' => Values::array_get($payload, 'identity'), 'attributes' => Values::array_get($payload, 'attributes'), 'messagingBinding' => Values::array_get($payload, 'messaging_binding'), 'roleSid' => Values::array_get($payload, 'role_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'lastReadMessageIndex' => Values::array_get($payload, 'last_read_message_index'), 'lastReadTimestamp' => Values::array_get($payload, 'last_read_timestamp'), ]; $this->solution = [ 'chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ParticipantContext Context for this ParticipantInstance */ protected function proxy(): ParticipantContext { if (!$this->context) { $this->context = new ParticipantContext( $this->version, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Updated ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ParticipantInstance { return $this->proxy()->update($options); } /** * Delete the ParticipantInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ParticipantInstance ' . \implode(' ', $context) . ']'; } }PKt[\k=k=DTwilio/Rest/Conversations/V1/Service/Conversation/MessageOptions.phpnu[options['author'] = $author; $this->options['body'] = $body; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['mediaSid'] = $mediaSid; $this->options['contentSid'] = $contentSid; $this->options['contentVariables'] = $contentVariables; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The channel specific identifier of the message's author. Defaults to `system`. * * @param string $author The channel specific identifier of the message's * author. * @return $this Fluent Builder */ public function setAuthor(string $author): self { $this->options['author'] = $author; return $this; } /** * The content of the message, can be up to 1,600 characters long. * * @param string $body The content of the message. * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. `null` if the message has not been edited. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes A string metadata field you can use to store any * data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The Media SID to be attached to the new Message. * * @param string $mediaSid The Media SID to be attached to the new Message. * @return $this Fluent Builder */ public function setMediaSid(string $mediaSid): self { $this->options['mediaSid'] = $mediaSid; return $this; } /** * The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. * * @param string $contentSid The unique ID of the multi-channel Rich Content * template. * @return $this Fluent Builder */ public function setContentSid(string $contentSid): self { $this->options['contentSid'] = $contentSid; return $this; } /** * A structurally valid JSON string that contains values to resolve Rich Content template variables. * * @param string $contentVariables A structurally valid JSON string that * contains values to resolve Rich Content * template variables. * @return $this Fluent Builder */ public function setContentVariables(string $contentVariables): self { $this->options['contentVariables'] = $contentVariables; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateMessageOptions ' . $options . ']'; } } class UpdateMessageOptions extends Options { /** * @param string $author The channel specific identifier of the message's * author. * @param string $body The content of the message. * @param \DateTime $dateCreated The date that this resource was created. * @param \DateTime $dateUpdated The date that this resource was last updated. * @param string $attributes A string metadata field you can use to store any * data you wish. * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $author = Values::NONE, string $body = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $attributes = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['author'] = $author; $this->options['body'] = $body; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The channel specific identifier of the message's author. Defaults to `system`. * * @param string $author The channel specific identifier of the message's * author. * @return $this Fluent Builder */ public function setAuthor(string $author): self { $this->options['author'] = $author; return $this; } /** * The content of the message, can be up to 1,600 characters long. * * @param string $body The content of the message. * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. `null` if the message has not been edited. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes A string metadata field you can use to store any * data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateMessageOptions ' . $options . ']'; } } class DeleteMessageOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.DeleteMessageOptions ' . $options . ']'; } } class ReadMessageOptions extends Options { /** * @param string $order The sort order of the returned messages */ public function __construct(string $order = Values::NONE) { $this->options['order'] = $order; } /** * The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending), with `asc` as the default. * * @param string $order The sort order of the returned messages * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.ReadMessageOptions ' . $options . ']'; } }PKt[bHTwilio/Rest/Conversations/V1/Service/Conversation/ParticipantContext.phpnu[solution = [ 'chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Conversations/' . \rawurlencode($conversationSid) . '/Participants/' . \rawurlencode($sid) . ''; } /** * Update the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Updated ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ParticipantInstance { $options = new Values($options); $data = Values::of([ 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Identity' => $options['identity'], 'Attributes' => $options['attributes'], 'RoleSid' => $options['roleSid'], 'MessagingBinding.ProxyAddress' => $options['messagingBindingProxyAddress'], 'MessagingBinding.ProjectedAddress' => $options['messagingBindingProjectedAddress'], 'LastReadMessageIndex' => $options['lastReadMessageIndex'], 'LastReadTimestamp' => $options['lastReadTimestamp'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new ParticipantInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Delete the ParticipantInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { $payload = $this->version->fetch('GET', $this->uri); return new ParticipantInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ParticipantContext ' . \implode(' ', $context) . ']'; } }PKt[Ș99ATwilio/Rest/Conversations/V1/Service/Conversation/MessagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MessageInstance \Twilio\Rest\Conversations\V1\Service\Conversation\MessageInstance */ public function buildInstance(array $payload): MessageInstance { return new MessageInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.MessagePage]'; } }PKt[}UUATwilio/Rest/Conversations/V1/Service/Conversation/MessageList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Conversations/' . \rawurlencode($conversationSid) . '/Messages'; } /** * Create the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Created MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'Author' => $options['author'], 'Body' => $options['body'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], 'MediaSid' => $options['mediaSid'], 'ContentSid' => $options['contentSid'], 'ContentVariables' => $options['contentVariables'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new MessageInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'] ); } /** * Streams MessageInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MessageInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MessageInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MessageInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MessagePage Page of MessageInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MessagePage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MessagePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MessageInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MessagePage Page of MessageInstance */ public function getPage(string $targetUrl): MessagePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MessagePage($this->version, $response, $this->solution); } /** * Constructs a MessageContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): MessageContext { return new MessageContext( $this->version, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.MessageList]'; } }PKt[&ssDTwilio/Rest/Conversations/V1/Service/Conversation/WebhookContext.phpnu[solution = [ 'chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Conversations/' . \rawurlencode($conversationSid) . '/Webhooks/' . \rawurlencode($sid) . ''; } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'Configuration.Url' => $options['configurationUrl'], 'Configuration.Method' => $options['configurationMethod'], 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }), 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }), 'Configuration.FlowSid' => $options['configurationFlowSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WebhookInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { $payload = $this->version->fetch('GET', $this->uri); return new WebhookInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.WebhookContext ' . \implode(' ', $context) . ']'; } }PKt[ngTTHTwilio/Rest/Conversations/V1/Service/Conversation/ParticipantOptions.phpnu[options['identity'] = $identity; $this->options['messagingBindingAddress'] = $messagingBindingAddress; $this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress; $this->options['roleSid'] = $roleSid; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. * * @param string $identity A unique string identifier for the conversation * participant as Conversation User. * @return $this Fluent Builder */ public function setIdentity(string $identity): self { $this->options['identity'] = $identity; return $this; } /** * The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). * * @param string $messagingBindingAddress The address of the participant's * device. * @return $this Fluent Builder */ public function setMessagingBindingAddress(string $messagingBindingAddress): self { $this->options['messagingBindingAddress'] = $messagingBindingAddress; return $this; } /** * The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). * * @param string $messagingBindingProxyAddress The address of the Twilio phone * number that the participant is * in contact with. * @return $this Fluent Builder */ public function setMessagingBindingProxyAddress(string $messagingBindingProxyAddress): self { $this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress; return $this; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. * * @param string $messagingBindingProjectedAddress The address of the Twilio * phone number that is used in * Group MMS. * @return $this Fluent Builder */ public function setMessagingBindingProjectedAddress(string $messagingBindingProjectedAddress): self { $this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress; return $this; } /** * The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * * @param string $roleSid The SID of a conversation-level Role to assign to the * participant * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateParticipantOptions ' . $options . ']'; } } class UpdateParticipantOptions extends Options { /** * @param \DateTime $dateCreated The date that this resource was created. * @param \DateTime $dateUpdated The date that this resource was last updated. * @param string $identity A unique string identifier for the conversation * participant as Conversation User. * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @param string $roleSid The SID of a conversation-level Role to assign to the * participant * @param string $messagingBindingProxyAddress The address of the Twilio phone * number that the participant is * in contact with. * @param string $messagingBindingProjectedAddress The address of the Twilio * phone number that is used in * Group MMS. * @param int $lastReadMessageIndex Index of last “read” message in the * Conversation for the Participant. * @param string $lastReadTimestamp Timestamp of last “read” message in the * Conversation for the Participant. * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(\DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $identity = Values::NONE, string $attributes = Values::NONE, string $roleSid = Values::NONE, string $messagingBindingProxyAddress = Values::NONE, string $messagingBindingProjectedAddress = Values::NONE, int $lastReadMessageIndex = Values::NONE, string $lastReadTimestamp = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['identity'] = $identity; $this->options['attributes'] = $attributes; $this->options['roleSid'] = $roleSid; $this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress; $this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress; $this->options['lastReadMessageIndex'] = $lastReadMessageIndex; $this->options['lastReadTimestamp'] = $lastReadTimestamp; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. * * @param string $identity A unique string identifier for the conversation * participant as Conversation User. * @return $this Fluent Builder */ public function setIdentity(string $identity): self { $this->options['identity'] = $identity; return $this; } /** * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * * @param string $roleSid The SID of a conversation-level Role to assign to the * participant * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. * * @param string $messagingBindingProxyAddress The address of the Twilio phone * number that the participant is * in contact with. * @return $this Fluent Builder */ public function setMessagingBindingProxyAddress(string $messagingBindingProxyAddress): self { $this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress; return $this; } /** * The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it. * * @param string $messagingBindingProjectedAddress The address of the Twilio * phone number that is used in * Group MMS. * @return $this Fluent Builder */ public function setMessagingBindingProjectedAddress(string $messagingBindingProjectedAddress): self { $this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress; return $this; } /** * Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. * * @param int $lastReadMessageIndex Index of last “read” message in the * Conversation for the Participant. * @return $this Fluent Builder */ public function setLastReadMessageIndex(int $lastReadMessageIndex): self { $this->options['lastReadMessageIndex'] = $lastReadMessageIndex; return $this; } /** * Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. * * @param string $lastReadTimestamp Timestamp of last “read” message in the * Conversation for the Participant. * @return $this Fluent Builder */ public function setLastReadTimestamp(string $lastReadTimestamp): self { $this->options['lastReadTimestamp'] = $lastReadTimestamp; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateParticipantOptions ' . $options . ']'; } } class DeleteParticipantOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.DeleteParticipantOptions ' . $options . ']'; } }PKt[EDTwilio/Rest/Conversations/V1/Service/Conversation/MessageContext.phpnu[solution = [ 'chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Conversations/' . \rawurlencode($conversationSid) . '/Messages/' . \rawurlencode($sid) . ''; } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'Author' => $options['author'], 'Body' => $options['body'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new MessageInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Delete the MessageInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { $payload = $this->version->fetch('GET', $this->uri); return new MessageInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Access the deliveryReceipts */ protected function getDeliveryReceipts(): DeliveryReceiptList { if (!$this->_deliveryReceipts) { $this->_deliveryReceipts = new DeliveryReceiptList( $this->version, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['sid'] ); } return $this->_deliveryReceipts; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.MessageContext ' . \implode(' ', $context) . ']'; } }PKt[_<ETwilio/Rest/Conversations/V1/Service/Conversation/MessageInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'sid' => Values::array_get($payload, 'sid'), 'index' => Values::array_get($payload, 'index'), 'author' => Values::array_get($payload, 'author'), 'body' => Values::array_get($payload, 'body'), 'media' => Values::array_get($payload, 'media'), 'attributes' => Values::array_get($payload, 'attributes'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'delivery' => Values::array_get($payload, 'delivery'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'contentSid' => Values::array_get($payload, 'content_sid'), ]; $this->solution = [ 'chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MessageContext Context for this MessageInstance */ protected function proxy(): MessageContext { if (!$this->context) { $this->context = new MessageContext( $this->version, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { return $this->proxy()->update($options); } /** * Delete the MessageInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { return $this->proxy()->fetch(); } /** * Access the deliveryReceipts */ protected function getDeliveryReceipts(): DeliveryReceiptList { return $this->proxy()->deliveryReceipts; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.MessageInstance ' . \implode(' ', $context) . ']'; } }PKt["QQETwilio/Rest/Conversations/V1/Service/Conversation/ParticipantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ParticipantInstance \Twilio\Rest\Conversations\V1\Service\Conversation\ParticipantInstance */ public function buildInstance(array $payload): ParticipantInstance { return new ParticipantInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ParticipantPage]'; } }PKt[uٙETwilio/Rest/Conversations/V1/Service/Conversation/WebhookInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'target' => Values::array_get($payload, 'target'), 'url' => Values::array_get($payload, 'url'), 'configuration' => Values::array_get($payload, 'configuration'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = [ 'chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WebhookContext Context for this WebhookInstance */ protected function proxy(): WebhookContext { if (!$this->context) { $this->context = new WebhookContext( $this->version, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { return $this->proxy()->update($options); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.WebhookInstance ' . \implode(' ', $context) . ']'; } }PKt[2h-.-.DTwilio/Rest/Conversations/V1/Service/Conversation/WebhookOptions.phpnu[options['configurationUrl'] = $configurationUrl; $this->options['configurationMethod'] = $configurationMethod; $this->options['configurationFilters'] = $configurationFilters; $this->options['configurationTriggers'] = $configurationTriggers; $this->options['configurationFlowSid'] = $configurationFlowSid; $this->options['configurationReplayAfter'] = $configurationReplayAfter; } /** * The absolute url the webhook request should be sent to. * * @param string $configurationUrl The absolute url the webhook request should * be sent to. * @return $this Fluent Builder */ public function setConfigurationUrl(string $configurationUrl): self { $this->options['configurationUrl'] = $configurationUrl; return $this; } /** * The HTTP method to be used when sending a webhook request. * * @param string $configurationMethod The HTTP method to be used when sending a * webhook request. * @return $this Fluent Builder */ public function setConfigurationMethod(string $configurationMethod): self { $this->options['configurationMethod'] = $configurationMethod; return $this; } /** * The list of events, firing webhook event for this Conversation. * * @param string[] $configurationFilters The list of events, firing webhook * event for this Conversation. * @return $this Fluent Builder */ public function setConfigurationFilters(array $configurationFilters): self { $this->options['configurationFilters'] = $configurationFilters; return $this; } /** * The list of keywords, firing webhook event for this Conversation. * * @param string[] $configurationTriggers The list of keywords, firing webhook * event for this Conversation. * @return $this Fluent Builder */ public function setConfigurationTriggers(array $configurationTriggers): self { $this->options['configurationTriggers'] = $configurationTriggers; return $this; } /** * The studio flow SID, where the webhook should be sent to. * * @param string $configurationFlowSid The studio flow SID, where the webhook * should be sent to. * @return $this Fluent Builder */ public function setConfigurationFlowSid(string $configurationFlowSid): self { $this->options['configurationFlowSid'] = $configurationFlowSid; return $this; } /** * The message index for which and it's successors the webhook will be replayed. Not set by default * * @param int $configurationReplayAfter The message index for which and it's * successors the webhook will be replayed. * @return $this Fluent Builder */ public function setConfigurationReplayAfter(int $configurationReplayAfter): self { $this->options['configurationReplayAfter'] = $configurationReplayAfter; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateWebhookOptions ' . $options . ']'; } } class UpdateWebhookOptions extends Options { /** * @param string $configurationUrl The absolute url the webhook request should * be sent to. * @param string $configurationMethod The HTTP method to be used when sending a * webhook request. * @param string[] $configurationFilters The list of events, firing webhook * event for this Conversation. * @param string[] $configurationTriggers The list of keywords, firing webhook * event for this Conversation. * @param string $configurationFlowSid The studio flow SID, where the webhook * should be sent to. */ public function __construct(string $configurationUrl = Values::NONE, string $configurationMethod = Values::NONE, array $configurationFilters = Values::ARRAY_NONE, array $configurationTriggers = Values::ARRAY_NONE, string $configurationFlowSid = Values::NONE) { $this->options['configurationUrl'] = $configurationUrl; $this->options['configurationMethod'] = $configurationMethod; $this->options['configurationFilters'] = $configurationFilters; $this->options['configurationTriggers'] = $configurationTriggers; $this->options['configurationFlowSid'] = $configurationFlowSid; } /** * The absolute url the webhook request should be sent to. * * @param string $configurationUrl The absolute url the webhook request should * be sent to. * @return $this Fluent Builder */ public function setConfigurationUrl(string $configurationUrl): self { $this->options['configurationUrl'] = $configurationUrl; return $this; } /** * The HTTP method to be used when sending a webhook request. * * @param string $configurationMethod The HTTP method to be used when sending a * webhook request. * @return $this Fluent Builder */ public function setConfigurationMethod(string $configurationMethod): self { $this->options['configurationMethod'] = $configurationMethod; return $this; } /** * The list of events, firing webhook event for this Conversation. * * @param string[] $configurationFilters The list of events, firing webhook * event for this Conversation. * @return $this Fluent Builder */ public function setConfigurationFilters(array $configurationFilters): self { $this->options['configurationFilters'] = $configurationFilters; return $this; } /** * The list of keywords, firing webhook event for this Conversation. * * @param string[] $configurationTriggers The list of keywords, firing webhook * event for this Conversation. * @return $this Fluent Builder */ public function setConfigurationTriggers(array $configurationTriggers): self { $this->options['configurationTriggers'] = $configurationTriggers; return $this; } /** * The studio flow SID, where the webhook should be sent to. * * @param string $configurationFlowSid The studio flow SID, where the webhook * should be sent to. * @return $this Fluent Builder */ public function setConfigurationFlowSid(string $configurationFlowSid): self { $this->options['configurationFlowSid'] = $configurationFlowSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateWebhookOptions ' . $options . ']'; } }PKt[S:F\  TTwilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptContext.phpnu[solution = [ 'chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, 'messageSid' => $messageSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Conversations/' . \rawurlencode($conversationSid) . '/Messages/' . \rawurlencode($messageSid) . '/Receipts/' . \rawurlencode($sid) . ''; } /** * Fetch the DeliveryReceiptInstance * * @return DeliveryReceiptInstance Fetched DeliveryReceiptInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeliveryReceiptInstance { $payload = $this->version->fetch('GET', $this->uri); return new DeliveryReceiptInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['messageSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.DeliveryReceiptContext ' . \implode(' ', $context) . ']'; } }PKt[HnQTwilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptList.phpnu[solution = [ 'chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, 'messageSid' => $messageSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Conversations/' . \rawurlencode($conversationSid) . '/Messages/' . \rawurlencode($messageSid) . '/Receipts'; } /** * Streams DeliveryReceiptInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DeliveryReceiptInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DeliveryReceiptInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DeliveryReceiptInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DeliveryReceiptPage Page of DeliveryReceiptInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DeliveryReceiptPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DeliveryReceiptPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DeliveryReceiptInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DeliveryReceiptPage Page of DeliveryReceiptInstance */ public function getPage(string $targetUrl): DeliveryReceiptPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DeliveryReceiptPage($this->version, $response, $this->solution); } /** * Constructs a DeliveryReceiptContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): DeliveryReceiptContext { return new DeliveryReceiptContext( $this->version, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['messageSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.DeliveryReceiptList]'; } }PKt[ "UTwilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'messageSid' => Values::array_get($payload, 'message_sid'), 'sid' => Values::array_get($payload, 'sid'), 'channelMessageSid' => Values::array_get($payload, 'channel_message_sid'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'status' => Values::array_get($payload, 'status'), 'errorCode' => Values::array_get($payload, 'error_code'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'chatServiceSid' => $chatServiceSid, 'conversationSid' => $conversationSid, 'messageSid' => $messageSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DeliveryReceiptContext Context for this DeliveryReceiptInstance */ protected function proxy(): DeliveryReceiptContext { if (!$this->context) { $this->context = new DeliveryReceiptContext( $this->version, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['messageSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DeliveryReceiptInstance * * @return DeliveryReceiptInstance Fetched DeliveryReceiptInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeliveryReceiptInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.DeliveryReceiptInstance ' . \implode(' ', $context) . ']'; } }PKt[7#QTwilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DeliveryReceiptInstance \Twilio\Rest\Conversations\V1\Service\Conversation\Message\DeliveryReceiptInstance */ public function buildInstance(array $payload): DeliveryReceiptInstance { return new DeliveryReceiptInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['conversationSid'], $this->solution['messageSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.DeliveryReceiptPage]'; } }PKt[6kYC C :Twilio/Rest/Conversations/V1/Service/ConfigurationList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; } /** * Access the notifications */ protected function getNotifications(): NotificationList { if (!$this->_notifications) { $this->_notifications = new NotificationList($this->version, $this->solution['chatServiceSid']); } return $this->_notifications; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { if (!$this->_webhooks) { $this->_webhooks = new WebhookList($this->version, $this->solution['chatServiceSid']); } return $this->_webhooks; } /** * Constructs a ConfigurationContext */ public function getContext(): ConfigurationContext { return new ConfigurationContext($this->version, $this->solution['chatServiceSid']); } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ConfigurationList]'; } }PKt[^DTwilio/Rest/Conversations/V1/Service/ParticipantConversationList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/ParticipantConversations'; } /** * Streams ParticipantConversationInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ParticipantConversationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ParticipantConversationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ParticipantConversationInstance records from the * API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ParticipantConversationPage Page of ParticipantConversationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ParticipantConversationPage { $options = new Values($options); $params = Values::of([ 'Identity' => $options['identity'], 'Address' => $options['address'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ParticipantConversationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ParticipantConversationInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ParticipantConversationPage Page of ParticipantConversationInstance */ public function getPage(string $targetUrl): ParticipantConversationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ParticipantConversationPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ParticipantConversationList]'; } }PKt[Cpu u =Twilio/Rest/Conversations/V1/Service/ConfigurationContext.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Configuration'; } /** * Fetch the ConfigurationInstance * * @return ConfigurationInstance Fetched ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConfigurationInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConfigurationInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Update the ConfigurationInstance * * @param array|Options $options Optional Arguments * @return ConfigurationInstance Updated ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConfigurationInstance { $options = new Values($options); $data = Values::of([ 'DefaultConversationCreatorRoleSid' => $options['defaultConversationCreatorRoleSid'], 'DefaultConversationRoleSid' => $options['defaultConversationRoleSid'], 'DefaultChatServiceRoleSid' => $options['defaultChatServiceRoleSid'], 'ReachabilityEnabled' => Serialize::booleanToString($options['reachabilityEnabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ConfigurationInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ConfigurationContext ' . \implode(' ', $context) . ']'; } }PKt[M:Twilio/Rest/Conversations/V1/Service/ConfigurationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConfigurationInstance \Twilio\Rest\Conversations\V1\Service\ConfigurationInstance */ public function buildInstance(array $payload): ConfigurationInstance { return new ConfigurationInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ConfigurationPage]'; } }PKt[|Vgg>Twilio/Rest/Conversations/V1/Service/ConfigurationInstance.phpnu[properties = [ 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'defaultConversationCreatorRoleSid' => Values::array_get($payload, 'default_conversation_creator_role_sid'), 'defaultConversationRoleSid' => Values::array_get($payload, 'default_conversation_role_sid'), 'defaultChatServiceRoleSid' => Values::array_get($payload, 'default_chat_service_role_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'reachabilityEnabled' => Values::array_get($payload, 'reachability_enabled'), ]; $this->solution = ['chatServiceSid' => $chatServiceSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConfigurationContext Context for this ConfigurationInstance */ protected function proxy(): ConfigurationContext { if (!$this->context) { $this->context = new ConfigurationContext($this->version, $this->solution['chatServiceSid']); } return $this->context; } /** * Fetch the ConfigurationInstance * * @return ConfigurationInstance Fetched ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConfigurationInstance { return $this->proxy()->fetch(); } /** * Update the ConfigurationInstance * * @param array|Options $options Optional Arguments * @return ConfigurationInstance Updated ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConfigurationInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ConfigurationInstance ' . \implode(' ', $context) . ']'; } }PKt[QV##=Twilio/Rest/Conversations/V1/Service/ConversationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'attributes' => Values::array_get($payload, 'attributes'), 'state' => Values::array_get($payload, 'state'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'timers' => Values::array_get($payload, 'timers'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'bindings' => Values::array_get($payload, 'bindings'), ]; $this->solution = ['chatServiceSid' => $chatServiceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConversationContext Context for this ConversationInstance */ protected function proxy(): ConversationContext { if (!$this->context) { $this->context = new ConversationContext( $this->version, $this->solution['chatServiceSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the ConversationInstance * * @param array|Options $options Optional Arguments * @return ConversationInstance Updated ConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConversationInstance { return $this->proxy()->update($options); } /** * Delete the ConversationInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Fetch the ConversationInstance * * @return ConversationInstance Fetched ConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConversationInstance { return $this->proxy()->fetch(); } /** * Access the participants */ protected function getParticipants(): ParticipantList { return $this->proxy()->participants; } /** * Access the messages */ protected function getMessages(): MessageList { return $this->proxy()->messages; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { return $this->proxy()->webhooks; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ConversationInstance ' . \implode(' ', $context) . ']'; } }PKt[}9Twilio/Rest/Conversations/V1/Service/ConversationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConversationInstance \Twilio\Rest\Conversations\V1\Service\ConversationInstance */ public function buildInstance(array $payload): ConversationInstance { return new ConversationInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ConversationPage]'; } }PKt[@84Twilio/Rest/Conversations/V1/Service/UserContext.phpnu[solution = ['chatServiceSid' => $chatServiceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Users/' . \rawurlencode($sid) . ''; } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Attributes' => $options['attributes'], 'RoleSid' => $options['roleSid'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new UserInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['sid'] ); } /** * Delete the UserInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['sid'] ); } /** * Access the userConversations */ protected function getUserConversations(): UserConversationList { if (!$this->_userConversations) { $this->_userConversations = new UserConversationList( $this->version, $this->solution['chatServiceSid'], $this->solution['sid'] ); } return $this->_userConversations; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.UserContext ' . \implode(' ', $context) . ']'; } }PKt[ hA4Twilio/Rest/Conversations/V1/Service/BindingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BindingInstance \Twilio\Rest\Conversations\V1\Service\BindingInstance */ public function buildInstance(array $payload): BindingInstance { return new BindingInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.BindingPage]'; } }PKt[6-``HTwilio/Rest/Conversations/V1/Service/ParticipantConversationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'participantUserSid' => Values::array_get($payload, 'participant_user_sid'), 'participantIdentity' => Values::array_get($payload, 'participant_identity'), 'participantMessagingBinding' => Values::array_get($payload, 'participant_messaging_binding'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'conversationUniqueName' => Values::array_get($payload, 'conversation_unique_name'), 'conversationFriendlyName' => Values::array_get($payload, 'conversation_friendly_name'), 'conversationAttributes' => Values::array_get($payload, 'conversation_attributes'), 'conversationDateCreated' => Deserialize::dateTime(Values::array_get($payload, 'conversation_date_created')), 'conversationDateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'conversation_date_updated')), 'conversationCreatedBy' => Values::array_get($payload, 'conversation_created_by'), 'conversationState' => Values::array_get($payload, 'conversation_state'), 'conversationTimers' => Values::array_get($payload, 'conversation_timers'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['chatServiceSid' => $chatServiceSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ParticipantConversationInstance]'; } }PKt[/9Twilio/Rest/Conversations/V1/Service/ConversationList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Conversations'; } /** * Create the ConversationInstance * * @param array|Options $options Optional Arguments * @return ConversationInstance Created ConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ConversationInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Attributes' => $options['attributes'], 'MessagingServiceSid' => $options['messagingServiceSid'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'State' => $options['state'], 'Timers.Inactive' => $options['timersInactive'], 'Timers.Closed' => $options['timersClosed'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new ConversationInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Streams ConversationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ConversationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ConversationInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ConversationInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ConversationPage Page of ConversationInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ConversationPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ConversationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ConversationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ConversationPage Page of ConversationInstance */ public function getPage(string $targetUrl): ConversationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ConversationPage($this->version, $response, $this->solution); } /** * Constructs a ConversationContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): ConversationContext { return new ConversationContext($this->version, $this->solution['chatServiceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ConversationList]'; } }PKt[>Á33FTwilio/Rest/Conversations/V1/Service/User/UserConversationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'unreadMessagesCount' => Values::array_get($payload, 'unread_messages_count'), 'lastReadMessageIndex' => Values::array_get($payload, 'last_read_message_index'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'userSid' => Values::array_get($payload, 'user_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'conversationState' => Values::array_get($payload, 'conversation_state'), 'timers' => Values::array_get($payload, 'timers'), 'attributes' => Values::array_get($payload, 'attributes'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), 'notificationLevel' => Values::array_get($payload, 'notification_level'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'chatServiceSid' => $chatServiceSid, 'userSid' => $userSid, 'conversationSid' => $conversationSid ?: $this->properties['conversationSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserConversationContext Context for this UserConversationInstance */ protected function proxy(): UserConversationContext { if (!$this->context) { $this->context = new UserConversationContext( $this->version, $this->solution['chatServiceSid'], $this->solution['userSid'], $this->solution['conversationSid'] ); } return $this->context; } /** * Update the UserConversationInstance * * @param array|Options $options Optional Arguments * @return UserConversationInstance Updated UserConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserConversationInstance { return $this->proxy()->update($options); } /** * Delete the UserConversationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the UserConversationInstance * * @return UserConversationInstance Fetched UserConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserConversationInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.UserConversationInstance ' . \implode(' ', $context) . ']'; } }PKt[WWBTwilio/Rest/Conversations/V1/Service/User/UserConversationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserConversationInstance \Twilio\Rest\Conversations\V1\Service\User\UserConversationInstance */ public function buildInstance(array $payload): UserConversationInstance { return new UserConversationInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['userSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.UserConversationPage]'; } }PKt[SO ETwilio/Rest/Conversations/V1/Service/User/UserConversationOptions.phpnu[options['notificationLevel'] = $notificationLevel; $this->options['lastReadTimestamp'] = $lastReadTimestamp; $this->options['lastReadMessageIndex'] = $lastReadMessageIndex; } /** * The Notification Level of this User Conversation. One of `default` or `muted`. * * @param string $notificationLevel The Notification Level of this User * Conversation. * @return $this Fluent Builder */ public function setNotificationLevel(string $notificationLevel): self { $this->options['notificationLevel'] = $notificationLevel; return $this; } /** * The date of the last message read in conversation by the user, given in ISO 8601 format. * * @param \DateTime $lastReadTimestamp The date of the last message read in * conversation by the user. * @return $this Fluent Builder */ public function setLastReadTimestamp(\DateTime $lastReadTimestamp): self { $this->options['lastReadTimestamp'] = $lastReadTimestamp; return $this; } /** * The index of the last Message in the Conversation that the Participant has read. * * @param int $lastReadMessageIndex The index of the last read Message. * @return $this Fluent Builder */ public function setLastReadMessageIndex(int $lastReadMessageIndex): self { $this->options['lastReadMessageIndex'] = $lastReadMessageIndex; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateUserConversationOptions ' . $options . ']'; } }PKt[B# ETwilio/Rest/Conversations/V1/Service/User/UserConversationContext.phpnu[solution = [ 'chatServiceSid' => $chatServiceSid, 'userSid' => $userSid, 'conversationSid' => $conversationSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Users/' . \rawurlencode($userSid) . '/Conversations/' . \rawurlencode($conversationSid) . ''; } /** * Update the UserConversationInstance * * @param array|Options $options Optional Arguments * @return UserConversationInstance Updated UserConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserConversationInstance { $options = new Values($options); $data = Values::of([ 'NotificationLevel' => $options['notificationLevel'], 'LastReadTimestamp' => Serialize::iso8601DateTime($options['lastReadTimestamp']), 'LastReadMessageIndex' => $options['lastReadMessageIndex'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new UserConversationInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['userSid'], $this->solution['conversationSid'] ); } /** * Delete the UserConversationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the UserConversationInstance * * @return UserConversationInstance Fetched UserConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserConversationInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserConversationInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['userSid'], $this->solution['conversationSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.UserConversationContext ' . \implode(' ', $context) . ']'; } }PKt[ BTwilio/Rest/Conversations/V1/Service/User/UserConversationList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, 'userSid' => $userSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Users/' . \rawurlencode($userSid) . '/Conversations'; } /** * Streams UserConversationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserConversationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserConversationInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserConversationInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserConversationPage Page of UserConversationInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserConversationPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserConversationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserConversationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserConversationPage Page of UserConversationInstance */ public function getPage(string $targetUrl): UserConversationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserConversationPage($this->version, $response, $this->solution); } /** * Constructs a UserConversationContext * * @param string $conversationSid The unique SID identifier of the Conversation. */ public function getContext(string $conversationSid): UserConversationContext { return new UserConversationContext( $this->version, $this->solution['chatServiceSid'], $this->solution['userSid'], $conversationSid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.UserConversationList]'; } }PKt[Z <1Twilio/Rest/Conversations/V1/Service/UserPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserInstance \Twilio\Rest\Conversations\V1\Service\UserInstance */ public function buildInstance(array $payload): UserInstance { return new UserInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.UserPage]'; } }PKt[;1Twilio/Rest/Conversations/V1/Service/RolePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RoleInstance \Twilio\Rest\Conversations\V1\Service\RoleInstance */ public function buildInstance(array $payload): RoleInstance { return new RoleInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.RolePage]'; } }PKt[⏄dd1Twilio/Rest/Conversations/V1/Service/RoleList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Roles'; } /** * Create the RoleInstance * * @param string $friendlyName A string to describe the new resource * @param string $type The type of role * @param string[] $permission A permission the role should have * @return RoleInstance Created RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $type, array $permission): RoleInstance { $data = Values::of([ 'FriendlyName' => $friendlyName, 'Type' => $type, 'Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RoleInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Streams RoleInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RoleInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RoleInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of RoleInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RolePage Page of RoleInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RolePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RolePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RoleInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RolePage Page of RoleInstance */ public function getPage(string $targetUrl): RolePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RolePage($this->version, $response, $this->solution); } /** * Constructs a RoleContext * * @param string $sid The SID of the Role resource to fetch */ public function getContext(string $sid): RoleContext { return new RoleContext($this->version, $this->solution['chatServiceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.RoleList]'; } }PKt[ 8Twilio/Rest/Conversations/V1/Service/BindingInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'credentialSid' => Values::array_get($payload, 'credential_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'endpoint' => Values::array_get($payload, 'endpoint'), 'identity' => Values::array_get($payload, 'identity'), 'bindingType' => Values::array_get($payload, 'binding_type'), 'messageTypes' => Values::array_get($payload, 'message_types'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['chatServiceSid' => $chatServiceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return BindingContext Context for this BindingInstance */ protected function proxy(): BindingContext { if (!$this->context) { $this->context = new BindingContext( $this->version, $this->solution['chatServiceSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the BindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the BindingInstance * * @return BindingInstance Fetched BindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BindingInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.BindingInstance ' . \implode(' ', $context) . ']'; } }PKt[#D4Twilio/Rest/Conversations/V1/Service/BindingList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Bindings'; } /** * Streams BindingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BindingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BindingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of BindingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BindingPage Page of BindingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BindingPage { $options = new Values($options); $params = Values::of([ 'BindingType' => Serialize::map($options['bindingType'], function($e) { return $e; }), 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BindingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BindingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BindingPage Page of BindingInstance */ public function getPage(string $targetUrl): BindingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BindingPage($this->version, $response, $this->solution); } /** * Constructs a BindingContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): BindingContext { return new BindingContext($this->version, $this->solution['chatServiceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.BindingList]'; } }PKt[j1Twilio/Rest/Conversations/V1/Service/UserList.phpnu[solution = ['chatServiceSid' => $chatServiceSid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Users'; } /** * Create the UserInstance * * @param string $identity The string that identifies the resource's User * @param array|Options $options Optional Arguments * @return UserInstance Created UserInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $identity, 'FriendlyName' => $options['friendlyName'], 'Attributes' => $options['attributes'], 'RoleSid' => $options['roleSid'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new UserInstance($this->version, $payload, $this->solution['chatServiceSid']); } /** * Streams UserInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserPage Page of UserInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserPage Page of UserInstance */ public function getPage(string $targetUrl): UserPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserPage($this->version, $response, $this->solution); } /** * Constructs a UserContext * * @param string $sid The SID of the User resource to fetch */ public function getContext(string $sid): UserContext { return new UserContext($this->version, $this->solution['chatServiceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.UserList]'; } }PKt[$ 4Twilio/Rest/Conversations/V1/Service/RoleContext.phpnu[solution = ['chatServiceSid' => $chatServiceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($chatServiceSid) . '/Roles/' . \rawurlencode($sid) . ''; } /** * Update the RoleInstance * * @param string[] $permission A permission the role should have * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { $data = Values::of(['Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RoleInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['sid'] ); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { $payload = $this->version->fetch('GET', $this->uri); return new RoleInstance( $this->version, $payload, $this->solution['chatServiceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.RoleContext ' . \implode(' ', $context) . ']'; } }PKt[uAA5Twilio/Rest/Conversations/V1/Service/RoleInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'permissions' => Values::array_get($payload, 'permissions'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['chatServiceSid' => $chatServiceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RoleContext Context for this RoleInstance */ protected function proxy(): RoleContext { if (!$this->context) { $this->context = new RoleContext( $this->version, $this->solution['chatServiceSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the RoleInstance * * @param string[] $permission A permission the role should have * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { return $this->proxy()->update($permission); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.RoleInstance ' . \implode(' ', $context) . ']'; } }PKt[}%=Twilio/Rest/Conversations/V1/Service/ConfigurationOptions.phpnu[options['defaultConversationCreatorRoleSid'] = $defaultConversationCreatorRoleSid; $this->options['defaultConversationRoleSid'] = $defaultConversationRoleSid; $this->options['defaultChatServiceRoleSid'] = $defaultChatServiceRoleSid; $this->options['reachabilityEnabled'] = $reachabilityEnabled; } /** * The conversation-level role assigned to a conversation creator when they join a new conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. * * @param string $defaultConversationCreatorRoleSid The role assigned to a * conversation creator when * they join a new conversation * @return $this Fluent Builder */ public function setDefaultConversationCreatorRoleSid(string $defaultConversationCreatorRoleSid): self { $this->options['defaultConversationCreatorRoleSid'] = $defaultConversationCreatorRoleSid; return $this; } /** * The conversation-level role assigned to users when they are added to a conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. * * @param string $defaultConversationRoleSid The role assigned to users when * they are added to a conversation * @return $this Fluent Builder */ public function setDefaultConversationRoleSid(string $defaultConversationRoleSid): self { $this->options['defaultConversationRoleSid'] = $defaultConversationRoleSid; return $this; } /** * The service-level role assigned to users when they are added to the service. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. * * @param string $defaultChatServiceRoleSid The service role assigned to users * when they are added to the service * @return $this Fluent Builder */ public function setDefaultChatServiceRoleSid(string $defaultChatServiceRoleSid): self { $this->options['defaultChatServiceRoleSid'] = $defaultChatServiceRoleSid; return $this; } /** * Whether the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) is enabled for this Conversations Service. The default is `false`. * * @param bool $reachabilityEnabled Whether the Reachability Indicator feature * is enabled for this Conversations Service * @return $this Fluent Builder */ public function setReachabilityEnabled(bool $reachabilityEnabled): self { $this->options['reachabilityEnabled'] = $reachabilityEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateConfigurationOptions ' . $options . ']'; } }PKt[:Twilio/Rest/Conversations/V1/Configuration/WebhookPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WebhookInstance \Twilio\Rest\Conversations\V1\Configuration\WebhookInstance */ public function buildInstance(array $payload): WebhookInstance { return new WebhookInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.WebhookPage]'; } }PKt[0×:Twilio/Rest/Conversations/V1/Configuration/WebhookList.phpnu[solution = []; } /** * Constructs a WebhookContext */ public function getContext(): WebhookContext { return new WebhookContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.WebhookList]'; } }PKt[6=Twilio/Rest/Conversations/V1/Configuration/WebhookContext.phpnu[solution = []; $this->uri = '/Configuration/Webhooks'; } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { $payload = $this->version->fetch('GET', $this->uri); return new WebhookInstance($this->version, $payload); } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'Method' => $options['method'], 'Filters' => Serialize::map($options['filters'], function($e) { return $e; }), 'PreWebhookUrl' => $options['preWebhookUrl'], 'PostWebhookUrl' => $options['postWebhookUrl'], 'Target' => $options['target'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WebhookInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.WebhookContext ' . \implode(' ', $context) . ']'; } }PKt[5* >Twilio/Rest/Conversations/V1/Configuration/WebhookInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'method' => Values::array_get($payload, 'method'), 'filters' => Values::array_get($payload, 'filters'), 'preWebhookUrl' => Values::array_get($payload, 'pre_webhook_url'), 'postWebhookUrl' => Values::array_get($payload, 'post_webhook_url'), 'target' => Values::array_get($payload, 'target'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WebhookContext Context for this WebhookInstance */ protected function proxy(): WebhookContext { if (!$this->context) { $this->context = new WebhookContext($this->version); } return $this->context; } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { return $this->proxy()->fetch(); } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.WebhookInstance ' . \implode(' ', $context) . ']'; } }PKt[_}Ӽ=Twilio/Rest/Conversations/V1/Configuration/WebhookOptions.phpnu[options['method'] = $method; $this->options['filters'] = $filters; $this->options['preWebhookUrl'] = $preWebhookUrl; $this->options['postWebhookUrl'] = $postWebhookUrl; $this->options['target'] = $target; } /** * The HTTP method to be used when sending a webhook request. * * @param string $method The HTTP method to be used when sending a webhook * request. * @return $this Fluent Builder */ public function setMethod(string $method): self { $this->options['method'] = $method; return $this; } /** * The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved` * * @param string[] $filters The list of webhook event triggers that are enabled * for this Service. * @return $this Fluent Builder */ public function setFilters(array $filters): self { $this->options['filters'] = $filters; return $this; } /** * The absolute url the pre-event webhook request should be sent to. * * @param string $preWebhookUrl The absolute url the pre-event webhook request * should be sent to. * @return $this Fluent Builder */ public function setPreWebhookUrl(string $preWebhookUrl): self { $this->options['preWebhookUrl'] = $preWebhookUrl; return $this; } /** * The absolute url the post-event webhook request should be sent to. * * @param string $postWebhookUrl The absolute url the post-event webhook * request should be sent to. * @return $this Fluent Builder */ public function setPostWebhookUrl(string $postWebhookUrl): self { $this->options['postWebhookUrl'] = $postWebhookUrl; return $this; } /** * The routing target of the webhook. * * @param string $target The routing target of the webhook. * @return $this Fluent Builder */ public function setTarget(string $target): self { $this->options['target'] = $target; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateWebhookOptions ' . $options . ']'; } }PKt[7XKK4Twilio/Rest/Conversations/V1/ConversationOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['messagingServiceSid'] = $messagingServiceSid; $this->options['attributes'] = $attributes; $this->options['state'] = $state; $this->options['timersInactive'] = $timersInactive; $this->options['timersClosed'] = $timersClosed; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The human-readable name of this conversation, limited to 256 characters. Optional. * * @param string $friendlyName The human-readable name of this conversation. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. * * @param string $messagingServiceSid The unique ID of the Messaging Service * this conversation belongs to. * @return $this Fluent Builder */ public function setMessagingServiceSid(string $messagingServiceSid): self { $this->options['messagingServiceSid'] = $messagingServiceSid; return $this; } /** * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` * * @param string $state Current state of this conversation. * @return $this Fluent Builder */ public function setState(string $state): self { $this->options['state'] = $state; return $this; } /** * ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * * @param string $timersInactive ISO8601 duration when conversation will be * switched to `inactive` state. * @return $this Fluent Builder */ public function setTimersInactive(string $timersInactive): self { $this->options['timersInactive'] = $timersInactive; return $this; } /** * ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. * * @param string $timersClosed ISO8601 duration when conversation will be * switched to `closed` state. * @return $this Fluent Builder */ public function setTimersClosed(string $timersClosed): self { $this->options['timersClosed'] = $timersClosed; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateConversationOptions ' . $options . ']'; } } class UpdateConversationOptions extends Options { /** * @param string $friendlyName The human-readable name of this conversation. * @param \DateTime $dateCreated The date that this resource was created. * @param \DateTime $dateUpdated The date that this resource was last updated. * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @param string $messagingServiceSid The unique ID of the Messaging Service * this conversation belongs to. * @param string $state Current state of this conversation. * @param string $timersInactive ISO8601 duration when conversation will be * switched to `inactive` state. * @param string $timersClosed ISO8601 duration when conversation will be * switched to `closed` state. * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $friendlyName = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $attributes = Values::NONE, string $messagingServiceSid = Values::NONE, string $state = Values::NONE, string $timersInactive = Values::NONE, string $timersClosed = Values::NONE, string $uniqueName = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['messagingServiceSid'] = $messagingServiceSid; $this->options['state'] = $state; $this->options['timersInactive'] = $timersInactive; $this->options['timersClosed'] = $timersClosed; $this->options['uniqueName'] = $uniqueName; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The human-readable name of this conversation, limited to 256 characters. Optional. * * @param string $friendlyName The human-readable name of this conversation. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. * * @param string $messagingServiceSid The unique ID of the Messaging Service * this conversation belongs to. * @return $this Fluent Builder */ public function setMessagingServiceSid(string $messagingServiceSid): self { $this->options['messagingServiceSid'] = $messagingServiceSid; return $this; } /** * Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` * * @param string $state Current state of this conversation. * @return $this Fluent Builder */ public function setState(string $state): self { $this->options['state'] = $state; return $this; } /** * ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * * @param string $timersInactive ISO8601 duration when conversation will be * switched to `inactive` state. * @return $this Fluent Builder */ public function setTimersInactive(string $timersInactive): self { $this->options['timersInactive'] = $timersInactive; return $this; } /** * ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. * * @param string $timersClosed ISO8601 duration when conversation will be * switched to `closed` state. * @return $this Fluent Builder */ public function setTimersClosed(string $timersClosed): self { $this->options['timersClosed'] = $timersClosed; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateConversationOptions ' . $options . ']'; } } class DeleteConversationOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.DeleteConversationOptions ' . $options . ']'; } }PKt[@{9Twilio/Rest/Conversations/V1/Conversation/WebhookPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WebhookInstance \Twilio\Rest\Conversations\V1\Conversation\WebhookInstance */ public function buildInstance(array $payload): WebhookInstance { return new WebhookInstance($this->version, $payload, $this->solution['conversationSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.WebhookPage]'; } }PKt[v=Twilio/Rest/Conversations/V1/Conversation/ParticipantList.phpnu[solution = ['conversationSid' => $conversationSid, ]; $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Participants'; } /** * Create the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Created ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ParticipantInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $options['identity'], 'MessagingBinding.Address' => $options['messagingBindingAddress'], 'MessagingBinding.ProxyAddress' => $options['messagingBindingProxyAddress'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], 'MessagingBinding.ProjectedAddress' => $options['messagingBindingProjectedAddress'], 'RoleSid' => $options['roleSid'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new ParticipantInstance($this->version, $payload, $this->solution['conversationSid']); } /** * Streams ParticipantInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ParticipantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ParticipantInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ParticipantInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ParticipantPage Page of ParticipantInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ParticipantPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ParticipantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ParticipantInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ParticipantPage Page of ParticipantInstance */ public function getPage(string $targetUrl): ParticipantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ParticipantPage($this->version, $response, $this->solution); } /** * Constructs a ParticipantContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): ParticipantContext { return new ParticipantContext($this->version, $this->solution['conversationSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ParticipantList]'; } }PKt[J;RR9Twilio/Rest/Conversations/V1/Conversation/WebhookList.phpnu[solution = ['conversationSid' => $conversationSid, ]; $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Webhooks'; } /** * Streams WebhookInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WebhookInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WebhookInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of WebhookInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WebhookPage Page of WebhookInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WebhookPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WebhookPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WebhookInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WebhookPage Page of WebhookInstance */ public function getPage(string $targetUrl): WebhookPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WebhookPage($this->version, $response, $this->solution); } /** * Create the WebhookInstance * * @param string $target The target of this webhook. * @param array|Options $options Optional Arguments * @return WebhookInstance Created WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $target, array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'Target' => $target, 'Configuration.Url' => $options['configurationUrl'], 'Configuration.Method' => $options['configurationMethod'], 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }), 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }), 'Configuration.FlowSid' => $options['configurationFlowSid'], 'Configuration.ReplayAfter' => $options['configurationReplayAfter'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WebhookInstance($this->version, $payload, $this->solution['conversationSid']); } /** * Constructs a WebhookContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): WebhookContext { return new WebhookContext($this->version, $this->solution['conversationSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.WebhookList]'; } }PKt[^ATwilio/Rest/Conversations/V1/Conversation/ParticipantInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'sid' => Values::array_get($payload, 'sid'), 'identity' => Values::array_get($payload, 'identity'), 'attributes' => Values::array_get($payload, 'attributes'), 'messagingBinding' => Values::array_get($payload, 'messaging_binding'), 'roleSid' => Values::array_get($payload, 'role_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'lastReadMessageIndex' => Values::array_get($payload, 'last_read_message_index'), 'lastReadTimestamp' => Values::array_get($payload, 'last_read_timestamp'), ]; $this->solution = [ 'conversationSid' => $conversationSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ParticipantContext Context for this ParticipantInstance */ protected function proxy(): ParticipantContext { if (!$this->context) { $this->context = new ParticipantContext( $this->version, $this->solution['conversationSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Updated ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ParticipantInstance { return $this->proxy()->update($options); } /** * Delete the ParticipantInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ParticipantInstance ' . \implode(' ', $context) . ']'; } }PKt[\c=c=<Twilio/Rest/Conversations/V1/Conversation/MessageOptions.phpnu[options['author'] = $author; $this->options['body'] = $body; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['mediaSid'] = $mediaSid; $this->options['contentSid'] = $contentSid; $this->options['contentVariables'] = $contentVariables; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The channel specific identifier of the message's author. Defaults to `system`. * * @param string $author The channel specific identifier of the message's * author. * @return $this Fluent Builder */ public function setAuthor(string $author): self { $this->options['author'] = $author; return $this; } /** * The content of the message, can be up to 1,600 characters long. * * @param string $body The content of the message. * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. `null` if the message has not been edited. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes A string metadata field you can use to store any * data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The Media SID to be attached to the new Message. * * @param string $mediaSid The Media SID to be attached to the new Message. * @return $this Fluent Builder */ public function setMediaSid(string $mediaSid): self { $this->options['mediaSid'] = $mediaSid; return $this; } /** * The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. * * @param string $contentSid The unique ID of the multi-channel Rich Content * template. * @return $this Fluent Builder */ public function setContentSid(string $contentSid): self { $this->options['contentSid'] = $contentSid; return $this; } /** * A structurally valid JSON string that contains values to resolve Rich Content template variables. * * @param string $contentVariables A structurally valid JSON string that * contains values to resolve Rich Content * template variables. * @return $this Fluent Builder */ public function setContentVariables(string $contentVariables): self { $this->options['contentVariables'] = $contentVariables; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateMessageOptions ' . $options . ']'; } } class UpdateMessageOptions extends Options { /** * @param string $author The channel specific identifier of the message's * author. * @param string $body The content of the message. * @param \DateTime $dateCreated The date that this resource was created. * @param \DateTime $dateUpdated The date that this resource was last updated. * @param string $attributes A string metadata field you can use to store any * data you wish. * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $author = Values::NONE, string $body = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $attributes = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['author'] = $author; $this->options['body'] = $body; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The channel specific identifier of the message's author. Defaults to `system`. * * @param string $author The channel specific identifier of the message's * author. * @return $this Fluent Builder */ public function setAuthor(string $author): self { $this->options['author'] = $author; return $this; } /** * The content of the message, can be up to 1,600 characters long. * * @param string $body The content of the message. * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. `null` if the message has not been edited. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes A string metadata field you can use to store any * data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateMessageOptions ' . $options . ']'; } } class DeleteMessageOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.DeleteMessageOptions ' . $options . ']'; } } class ReadMessageOptions extends Options { /** * @param string $order The sort order of the returned messages */ public function __construct(string $order = Values::NONE) { $this->options['order'] = $order; } /** * The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending), with `asc` as the default. * * @param string $order The sort order of the returned messages * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.ReadMessageOptions ' . $options . ']'; } }PKt[h1;;@Twilio/Rest/Conversations/V1/Conversation/ParticipantContext.phpnu[solution = ['conversationSid' => $conversationSid, 'sid' => $sid, ]; $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Participants/' . \rawurlencode($sid) . ''; } /** * Update the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Updated ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ParticipantInstance { $options = new Values($options); $data = Values::of([ 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], 'RoleSid' => $options['roleSid'], 'MessagingBinding.ProxyAddress' => $options['messagingBindingProxyAddress'], 'MessagingBinding.ProjectedAddress' => $options['messagingBindingProjectedAddress'], 'Identity' => $options['identity'], 'LastReadMessageIndex' => $options['lastReadMessageIndex'], 'LastReadTimestamp' => $options['lastReadTimestamp'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new ParticipantInstance( $this->version, $payload, $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Delete the ParticipantInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { $payload = $this->version->fetch('GET', $this->uri); return new ParticipantInstance( $this->version, $payload, $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ParticipantContext ' . \implode(' ', $context) . ']'; } }PKt[89Twilio/Rest/Conversations/V1/Conversation/MessagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MessageInstance \Twilio\Rest\Conversations\V1\Conversation\MessageInstance */ public function buildInstance(array $payload): MessageInstance { return new MessageInstance($this->version, $payload, $this->solution['conversationSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.MessagePage]'; } }PKt[v9Twilio/Rest/Conversations/V1/Conversation/MessageList.phpnu[solution = ['conversationSid' => $conversationSid, ]; $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Messages'; } /** * Create the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Created MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'Author' => $options['author'], 'Body' => $options['body'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], 'MediaSid' => $options['mediaSid'], 'ContentSid' => $options['contentSid'], 'ContentVariables' => $options['contentVariables'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new MessageInstance($this->version, $payload, $this->solution['conversationSid']); } /** * Streams MessageInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MessageInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MessageInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MessageInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MessagePage Page of MessageInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MessagePage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MessagePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MessageInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MessagePage Page of MessageInstance */ public function getPage(string $targetUrl): MessagePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MessagePage($this->version, $response, $this->solution); } /** * Constructs a MessageContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): MessageContext { return new MessageContext($this->version, $this->solution['conversationSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.MessageList]'; } }PKt["H <Twilio/Rest/Conversations/V1/Conversation/WebhookContext.phpnu[solution = ['conversationSid' => $conversationSid, 'sid' => $sid, ]; $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Webhooks/' . \rawurlencode($sid) . ''; } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { $payload = $this->version->fetch('GET', $this->uri); return new WebhookInstance( $this->version, $payload, $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'Configuration.Url' => $options['configurationUrl'], 'Configuration.Method' => $options['configurationMethod'], 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }), 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }), 'Configuration.FlowSid' => $options['configurationFlowSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WebhookInstance( $this->version, $payload, $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.WebhookContext ' . \implode(' ', $context) . ']'; } }PKt[x7xTT@Twilio/Rest/Conversations/V1/Conversation/ParticipantOptions.phpnu[options['identity'] = $identity; $this->options['messagingBindingAddress'] = $messagingBindingAddress; $this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress; $this->options['roleSid'] = $roleSid; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. * * @param string $identity A unique string identifier for the conversation * participant as Conversation User. * @return $this Fluent Builder */ public function setIdentity(string $identity): self { $this->options['identity'] = $identity; return $this; } /** * The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). * * @param string $messagingBindingAddress The address of the participant's * device. * @return $this Fluent Builder */ public function setMessagingBindingAddress(string $messagingBindingAddress): self { $this->options['messagingBindingAddress'] = $messagingBindingAddress; return $this; } /** * The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). * * @param string $messagingBindingProxyAddress The address of the Twilio phone * number that the participant is * in contact with. * @return $this Fluent Builder */ public function setMessagingBindingProxyAddress(string $messagingBindingProxyAddress): self { $this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress; return $this; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. * * @param string $messagingBindingProjectedAddress The address of the Twilio * phone number that is used in * Group MMS. * @return $this Fluent Builder */ public function setMessagingBindingProjectedAddress(string $messagingBindingProjectedAddress): self { $this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress; return $this; } /** * The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * * @param string $roleSid The SID of a conversation-level Role to assign to the * participant * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateParticipantOptions ' . $options . ']'; } } class UpdateParticipantOptions extends Options { /** * @param \DateTime $dateCreated The date that this resource was created. * @param \DateTime $dateUpdated The date that this resource was last updated. * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @param string $roleSid The SID of a conversation-level Role to assign to the * participant * @param string $messagingBindingProxyAddress The address of the Twilio phone * number that the participant is * in contact with. * @param string $messagingBindingProjectedAddress The address of the Twilio * phone number that is used in * Group MMS. * @param string $identity A unique string identifier for the conversation * participant as Conversation User. * @param int $lastReadMessageIndex Index of last “read” message in the * Conversation for the Participant. * @param string $lastReadTimestamp Timestamp of last “read” message in the * Conversation for the Participant. * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(\DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $attributes = Values::NONE, string $roleSid = Values::NONE, string $messagingBindingProxyAddress = Values::NONE, string $messagingBindingProjectedAddress = Values::NONE, string $identity = Values::NONE, int $lastReadMessageIndex = Values::NONE, string $lastReadTimestamp = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['roleSid'] = $roleSid; $this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress; $this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress; $this->options['identity'] = $identity; $this->options['lastReadMessageIndex'] = $lastReadMessageIndex; $this->options['lastReadTimestamp'] = $lastReadTimestamp; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The date that this resource was created. * * @param \DateTime $dateCreated The date that this resource was created. * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date that this resource was last updated. * * @param \DateTime $dateUpdated The date that this resource was last updated. * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned. * * @param string $attributes An optional string metadata field you can use to * store any data you wish. * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. * * @param string $roleSid The SID of a conversation-level Role to assign to the * participant * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. * * @param string $messagingBindingProxyAddress The address of the Twilio phone * number that the participant is * in contact with. * @return $this Fluent Builder */ public function setMessagingBindingProxyAddress(string $messagingBindingProxyAddress): self { $this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress; return $this; } /** * The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it. * * @param string $messagingBindingProjectedAddress The address of the Twilio * phone number that is used in * Group MMS. * @return $this Fluent Builder */ public function setMessagingBindingProjectedAddress(string $messagingBindingProjectedAddress): self { $this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress; return $this; } /** * A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. * * @param string $identity A unique string identifier for the conversation * participant as Conversation User. * @return $this Fluent Builder */ public function setIdentity(string $identity): self { $this->options['identity'] = $identity; return $this; } /** * Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. * * @param int $lastReadMessageIndex Index of last “read” message in the * Conversation for the Participant. * @return $this Fluent Builder */ public function setLastReadMessageIndex(int $lastReadMessageIndex): self { $this->options['lastReadMessageIndex'] = $lastReadMessageIndex; return $this; } /** * Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. * * @param string $lastReadTimestamp Timestamp of last “read” message in the * Conversation for the Participant. * @return $this Fluent Builder */ public function setLastReadTimestamp(string $lastReadTimestamp): self { $this->options['lastReadTimestamp'] = $lastReadTimestamp; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateParticipantOptions ' . $options . ']'; } } class DeleteParticipantOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.DeleteParticipantOptions ' . $options . ']'; } }PKt[><Twilio/Rest/Conversations/V1/Conversation/MessageContext.phpnu[solution = ['conversationSid' => $conversationSid, 'sid' => $sid, ]; $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Messages/' . \rawurlencode($sid) . ''; } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'Author' => $options['author'], 'Body' => $options['body'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new MessageInstance( $this->version, $payload, $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Delete the MessageInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { $payload = $this->version->fetch('GET', $this->uri); return new MessageInstance( $this->version, $payload, $this->solution['conversationSid'], $this->solution['sid'] ); } /** * Access the deliveryReceipts */ protected function getDeliveryReceipts(): DeliveryReceiptList { if (!$this->_deliveryReceipts) { $this->_deliveryReceipts = new DeliveryReceiptList( $this->version, $this->solution['conversationSid'], $this->solution['sid'] ); } return $this->_deliveryReceipts; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.MessageContext ' . \implode(' ', $context) . ']'; } }PKt[A=[[=Twilio/Rest/Conversations/V1/Conversation/MessageInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'sid' => Values::array_get($payload, 'sid'), 'index' => Values::array_get($payload, 'index'), 'author' => Values::array_get($payload, 'author'), 'body' => Values::array_get($payload, 'body'), 'media' => Values::array_get($payload, 'media'), 'attributes' => Values::array_get($payload, 'attributes'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'delivery' => Values::array_get($payload, 'delivery'), 'links' => Values::array_get($payload, 'links'), 'contentSid' => Values::array_get($payload, 'content_sid'), ]; $this->solution = [ 'conversationSid' => $conversationSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MessageContext Context for this MessageInstance */ protected function proxy(): MessageContext { if (!$this->context) { $this->context = new MessageContext( $this->version, $this->solution['conversationSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { return $this->proxy()->update($options); } /** * Delete the MessageInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { return $this->proxy()->fetch(); } /** * Access the deliveryReceipts */ protected function getDeliveryReceipts(): DeliveryReceiptList { return $this->proxy()->deliveryReceipts; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.MessageInstance ' . \implode(' ', $context) . ']'; } }PKt[2+=Twilio/Rest/Conversations/V1/Conversation/ParticipantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ParticipantInstance \Twilio\Rest\Conversations\V1\Conversation\ParticipantInstance */ public function buildInstance(array $payload): ParticipantInstance { return new ParticipantInstance($this->version, $payload, $this->solution['conversationSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ParticipantPage]'; } }PKt[U>=]]=Twilio/Rest/Conversations/V1/Conversation/WebhookInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'target' => Values::array_get($payload, 'target'), 'url' => Values::array_get($payload, 'url'), 'configuration' => Values::array_get($payload, 'configuration'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = [ 'conversationSid' => $conversationSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WebhookContext Context for this WebhookInstance */ protected function proxy(): WebhookContext { if (!$this->context) { $this->context = new WebhookContext( $this->version, $this->solution['conversationSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { return $this->proxy()->fetch(); } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { return $this->proxy()->update($options); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.WebhookInstance ' . \implode(' ', $context) . ']'; } }PKt[HX%.%.<Twilio/Rest/Conversations/V1/Conversation/WebhookOptions.phpnu[options['configurationUrl'] = $configurationUrl; $this->options['configurationMethod'] = $configurationMethod; $this->options['configurationFilters'] = $configurationFilters; $this->options['configurationTriggers'] = $configurationTriggers; $this->options['configurationFlowSid'] = $configurationFlowSid; $this->options['configurationReplayAfter'] = $configurationReplayAfter; } /** * The absolute url the webhook request should be sent to. * * @param string $configurationUrl The absolute url the webhook request should * be sent to. * @return $this Fluent Builder */ public function setConfigurationUrl(string $configurationUrl): self { $this->options['configurationUrl'] = $configurationUrl; return $this; } /** * The HTTP method to be used when sending a webhook request. * * @param string $configurationMethod The HTTP method to be used when sending a * webhook request. * @return $this Fluent Builder */ public function setConfigurationMethod(string $configurationMethod): self { $this->options['configurationMethod'] = $configurationMethod; return $this; } /** * The list of events, firing webhook event for this Conversation. * * @param string[] $configurationFilters The list of events, firing webhook * event for this Conversation. * @return $this Fluent Builder */ public function setConfigurationFilters(array $configurationFilters): self { $this->options['configurationFilters'] = $configurationFilters; return $this; } /** * The list of keywords, firing webhook event for this Conversation. * * @param string[] $configurationTriggers The list of keywords, firing webhook * event for this Conversation. * @return $this Fluent Builder */ public function setConfigurationTriggers(array $configurationTriggers): self { $this->options['configurationTriggers'] = $configurationTriggers; return $this; } /** * The studio flow SID, where the webhook should be sent to. * * @param string $configurationFlowSid The studio flow SID, where the webhook * should be sent to. * @return $this Fluent Builder */ public function setConfigurationFlowSid(string $configurationFlowSid): self { $this->options['configurationFlowSid'] = $configurationFlowSid; return $this; } /** * The message index for which and it's successors the webhook will be replayed. Not set by default * * @param int $configurationReplayAfter The message index for which and it's * successors the webhook will be replayed. * @return $this Fluent Builder */ public function setConfigurationReplayAfter(int $configurationReplayAfter): self { $this->options['configurationReplayAfter'] = $configurationReplayAfter; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateWebhookOptions ' . $options . ']'; } } class UpdateWebhookOptions extends Options { /** * @param string $configurationUrl The absolute url the webhook request should * be sent to. * @param string $configurationMethod The HTTP method to be used when sending a * webhook request. * @param string[] $configurationFilters The list of events, firing webhook * event for this Conversation. * @param string[] $configurationTriggers The list of keywords, firing webhook * event for this Conversation. * @param string $configurationFlowSid The studio flow SID, where the webhook * should be sent to. */ public function __construct(string $configurationUrl = Values::NONE, string $configurationMethod = Values::NONE, array $configurationFilters = Values::ARRAY_NONE, array $configurationTriggers = Values::ARRAY_NONE, string $configurationFlowSid = Values::NONE) { $this->options['configurationUrl'] = $configurationUrl; $this->options['configurationMethod'] = $configurationMethod; $this->options['configurationFilters'] = $configurationFilters; $this->options['configurationTriggers'] = $configurationTriggers; $this->options['configurationFlowSid'] = $configurationFlowSid; } /** * The absolute url the webhook request should be sent to. * * @param string $configurationUrl The absolute url the webhook request should * be sent to. * @return $this Fluent Builder */ public function setConfigurationUrl(string $configurationUrl): self { $this->options['configurationUrl'] = $configurationUrl; return $this; } /** * The HTTP method to be used when sending a webhook request. * * @param string $configurationMethod The HTTP method to be used when sending a * webhook request. * @return $this Fluent Builder */ public function setConfigurationMethod(string $configurationMethod): self { $this->options['configurationMethod'] = $configurationMethod; return $this; } /** * The list of events, firing webhook event for this Conversation. * * @param string[] $configurationFilters The list of events, firing webhook * event for this Conversation. * @return $this Fluent Builder */ public function setConfigurationFilters(array $configurationFilters): self { $this->options['configurationFilters'] = $configurationFilters; return $this; } /** * The list of keywords, firing webhook event for this Conversation. * * @param string[] $configurationTriggers The list of keywords, firing webhook * event for this Conversation. * @return $this Fluent Builder */ public function setConfigurationTriggers(array $configurationTriggers): self { $this->options['configurationTriggers'] = $configurationTriggers; return $this; } /** * The studio flow SID, where the webhook should be sent to. * * @param string $configurationFlowSid The studio flow SID, where the webhook * should be sent to. * @return $this Fluent Builder */ public function setConfigurationFlowSid(string $configurationFlowSid): self { $this->options['configurationFlowSid'] = $configurationFlowSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateWebhookOptions ' . $options . ']'; } }PKt[Q0LTwilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptContext.phpnu[solution = [ 'conversationSid' => $conversationSid, 'messageSid' => $messageSid, 'sid' => $sid, ]; $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Messages/' . \rawurlencode($messageSid) . '/Receipts/' . \rawurlencode($sid) . ''; } /** * Fetch the DeliveryReceiptInstance * * @return DeliveryReceiptInstance Fetched DeliveryReceiptInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeliveryReceiptInstance { $payload = $this->version->fetch('GET', $this->uri); return new DeliveryReceiptInstance( $this->version, $payload, $this->solution['conversationSid'], $this->solution['messageSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.DeliveryReceiptContext ' . \implode(' ', $context) . ']'; } }PKt[;x))ITwilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptList.phpnu[solution = ['conversationSid' => $conversationSid, 'messageSid' => $messageSid, ]; $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Messages/' . \rawurlencode($messageSid) . '/Receipts'; } /** * Streams DeliveryReceiptInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DeliveryReceiptInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DeliveryReceiptInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DeliveryReceiptInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DeliveryReceiptPage Page of DeliveryReceiptInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DeliveryReceiptPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DeliveryReceiptPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DeliveryReceiptInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DeliveryReceiptPage Page of DeliveryReceiptInstance */ public function getPage(string $targetUrl): DeliveryReceiptPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DeliveryReceiptPage($this->version, $response, $this->solution); } /** * Constructs a DeliveryReceiptContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): DeliveryReceiptContext { return new DeliveryReceiptContext( $this->version, $this->solution['conversationSid'], $this->solution['messageSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.DeliveryReceiptList]'; } }PKt[L4yyMTwilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'sid' => Values::array_get($payload, 'sid'), 'messageSid' => Values::array_get($payload, 'message_sid'), 'channelMessageSid' => Values::array_get($payload, 'channel_message_sid'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'status' => Values::array_get($payload, 'status'), 'errorCode' => Values::array_get($payload, 'error_code'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'conversationSid' => $conversationSid, 'messageSid' => $messageSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DeliveryReceiptContext Context for this DeliveryReceiptInstance */ protected function proxy(): DeliveryReceiptContext { if (!$this->context) { $this->context = new DeliveryReceiptContext( $this->version, $this->solution['conversationSid'], $this->solution['messageSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DeliveryReceiptInstance * * @return DeliveryReceiptInstance Fetched DeliveryReceiptInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeliveryReceiptInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.DeliveryReceiptInstance ' . \implode(' ', $context) . ']'; } }PKt[։eeITwilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DeliveryReceiptInstance \Twilio\Rest\Conversations\V1\Conversation\Message\DeliveryReceiptInstance */ public function buildInstance(array $payload): DeliveryReceiptInstance { return new DeliveryReceiptInstance( $this->version, $payload, $this->solution['conversationSid'], $this->solution['messageSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.DeliveryReceiptPage]'; } }PKt[ b  2Twilio/Rest/Conversations/V1/ConfigurationList.phpnu[solution = []; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { if (!$this->_webhooks) { $this->_webhooks = new WebhookList($this->version); } return $this->_webhooks; } /** * Constructs a ConfigurationContext */ public function getContext(): ConfigurationContext { return new ConfigurationContext($this->version); } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ConfigurationList]'; } }PKt[i<Twilio/Rest/Conversations/V1/ParticipantConversationList.phpnu[solution = []; $this->uri = '/ParticipantConversations'; } /** * Streams ParticipantConversationInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ParticipantConversationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ParticipantConversationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ParticipantConversationInstance records from the * API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ParticipantConversationPage Page of ParticipantConversationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ParticipantConversationPage { $options = new Values($options); $params = Values::of([ 'Identity' => $options['identity'], 'Address' => $options['address'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ParticipantConversationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ParticipantConversationInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ParticipantConversationPage Page of ParticipantConversationInstance */ public function getPage(string $targetUrl): ParticipantConversationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ParticipantConversationPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ParticipantConversationList]'; } }PKt[75Twilio/Rest/Conversations/V1/ConfigurationContext.phpnu[solution = []; $this->uri = '/Configuration'; } /** * Fetch the ConfigurationInstance * * @return ConfigurationInstance Fetched ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConfigurationInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConfigurationInstance($this->version, $payload); } /** * Update the ConfigurationInstance * * @param array|Options $options Optional Arguments * @return ConfigurationInstance Updated ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConfigurationInstance { $options = new Values($options); $data = Values::of([ 'DefaultChatServiceSid' => $options['defaultChatServiceSid'], 'DefaultMessagingServiceSid' => $options['defaultMessagingServiceSid'], 'DefaultInactiveTimer' => $options['defaultInactiveTimer'], 'DefaultClosedTimer' => $options['defaultClosedTimer'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ConfigurationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ConfigurationContext ' . \implode(' ', $context) . ']'; } }PKt[?6  <Twilio/Rest/Conversations/V1/AddressConfigurationContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Configuration/Addresses/' . \rawurlencode($sid) . ''; } /** * Fetch the AddressConfigurationInstance * * @return AddressConfigurationInstance Fetched AddressConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AddressConfigurationInstance { $payload = $this->version->fetch('GET', $this->uri); return new AddressConfigurationInstance($this->version, $payload, $this->solution['sid']); } /** * Update the AddressConfigurationInstance * * @param array|Options $options Optional Arguments * @return AddressConfigurationInstance Updated AddressConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AddressConfigurationInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'AutoCreation.Enabled' => Serialize::booleanToString($options['autoCreationEnabled']), 'AutoCreation.Type' => $options['autoCreationType'], 'AutoCreation.ConversationServiceSid' => $options['autoCreationConversationServiceSid'], 'AutoCreation.WebhookUrl' => $options['autoCreationWebhookUrl'], 'AutoCreation.WebhookMethod' => $options['autoCreationWebhookMethod'], 'AutoCreation.WebhookFilters' => Serialize::map($options['autoCreationWebhookFilters'], function($e) { return $e; }), 'AutoCreation.StudioFlowSid' => $options['autoCreationStudioFlowSid'], 'AutoCreation.StudioRetryCount' => $options['autoCreationStudioRetryCount'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AddressConfigurationInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the AddressConfigurationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.AddressConfigurationContext ' . \implode(' ', $context) . ']'; } }PKt["ۦ0Twilio/Rest/Conversations/V1/ServiceInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Access the conversations */ protected function getConversations(): ConversationList { return $this->proxy()->conversations; } /** * Access the bindings */ protected function getBindings(): BindingList { return $this->proxy()->bindings; } /** * Access the users */ protected function getUsers(): UserList { return $this->proxy()->users; } /** * Access the roles */ protected function getRoles(): RoleList { return $this->proxy()->roles; } /** * Access the configuration */ protected function getConfiguration(): ConfigurationList { return $this->proxy()->configuration; } /** * Access the participantConversations */ protected function getParticipantConversations(): ParticipantConversationList { return $this->proxy()->participantConversations; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[jG2Twilio/Rest/Conversations/V1/ConfigurationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConfigurationInstance \Twilio\Rest\Conversations\V1\ConfigurationInstance */ public function buildInstance(array $payload): ConfigurationInstance { return new ConfigurationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ConfigurationPage]'; } }PKt[`Zhh6Twilio/Rest/Conversations/V1/ConfigurationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'defaultChatServiceSid' => Values::array_get($payload, 'default_chat_service_sid'), 'defaultMessagingServiceSid' => Values::array_get($payload, 'default_messaging_service_sid'), 'defaultInactiveTimer' => Values::array_get($payload, 'default_inactive_timer'), 'defaultClosedTimer' => Values::array_get($payload, 'default_closed_timer'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConfigurationContext Context for this ConfigurationInstance */ protected function proxy(): ConfigurationContext { if (!$this->context) { $this->context = new ConfigurationContext($this->version); } return $this->context; } /** * Fetch the ConfigurationInstance * * @return ConfigurationInstance Fetched ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConfigurationInstance { return $this->proxy()->fetch(); } /** * Update the ConfigurationInstance * * @param array|Options $options Optional Arguments * @return ConfigurationInstance Updated ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConfigurationInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ConfigurationInstance ' . \implode(' ', $context) . ']'; } }PKt[miff,Twilio/Rest/Conversations/V1/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Create the ServiceInstance * * @param string $friendlyName The human-readable name of this service. * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): ServiceInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Constructs a ServiceContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ServiceList]'; } }PKt[F"YY/Twilio/Rest/Conversations/V1/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the conversations */ protected function getConversations(): ConversationList { if (!$this->_conversations) { $this->_conversations = new ConversationList($this->version, $this->solution['sid']); } return $this->_conversations; } /** * Access the bindings */ protected function getBindings(): BindingList { if (!$this->_bindings) { $this->_bindings = new BindingList($this->version, $this->solution['sid']); } return $this->_bindings; } /** * Access the users */ protected function getUsers(): UserList { if (!$this->_users) { $this->_users = new UserList($this->version, $this->solution['sid']); } return $this->_users; } /** * Access the roles */ protected function getRoles(): RoleList { if (!$this->_roles) { $this->_roles = new RoleList($this->version, $this->solution['sid']); } return $this->_roles; } /** * Access the configuration */ protected function getConfiguration(): ConfigurationList { if (!$this->_configuration) { $this->_configuration = new ConfigurationList($this->version, $this->solution['sid']); } return $this->_configuration; } /** * Access the participantConversations */ protected function getParticipantConversations(): ParticipantConversationList { if (!$this->_participantConversations) { $this->_participantConversations = new ParticipantConversationList( $this->version, $this->solution['sid'] ); } return $this->_participantConversations; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[\#5Twilio/Rest/Conversations/V1/ConversationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'attributes' => Values::array_get($payload, 'attributes'), 'state' => Values::array_get($payload, 'state'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'timers' => Values::array_get($payload, 'timers'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'bindings' => Values::array_get($payload, 'bindings'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConversationContext Context for this ConversationInstance */ protected function proxy(): ConversationContext { if (!$this->context) { $this->context = new ConversationContext($this->version, $this->solution['sid']); } return $this->context; } /** * Update the ConversationInstance * * @param array|Options $options Optional Arguments * @return ConversationInstance Updated ConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConversationInstance { return $this->proxy()->update($options); } /** * Delete the ConversationInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Fetch the ConversationInstance * * @return ConversationInstance Fetched ConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConversationInstance { return $this->proxy()->fetch(); } /** * Access the participants */ protected function getParticipants(): ParticipantList { return $this->proxy()->participants; } /** * Access the messages */ protected function getMessages(): MessageList { return $this->proxy()->messages; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { return $this->proxy()->webhooks; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.ConversationInstance ' . \implode(' ', $context) . ']'; } }PKt[XmU1Twilio/Rest/Conversations/V1/ConversationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConversationInstance \Twilio\Rest\Conversations\V1\ConversationInstance */ public function buildInstance(array $payload): ConversationInstance { return new ConversationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ConversationPage]'; } }PKt[ҳ  2Twilio/Rest/Conversations/V1/CredentialContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Credentials/' . \rawurlencode($sid) . ''; } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'Type' => $options['type'], 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.CredentialContext ' . \implode(' ', $context) . ']'; } }PKt[^,Twilio/Rest/Conversations/V1/UserContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Users/' . \rawurlencode($sid) . ''; } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Attributes' => $options['attributes'], 'RoleSid' => $options['roleSid'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new UserInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the UserInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserInstance($this->version, $payload, $this->solution['sid']); } /** * Access the userConversations */ protected function getUserConversations(): UserConversationList { if (!$this->_userConversations) { $this->_userConversations = new UserConversationList($this->version, $this->solution['sid']); } return $this->_userConversations; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.UserContext ' . \implode(' ', $context) . ']'; } }PKt[&&=Twilio/Rest/Conversations/V1/AddressConfigurationInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'type' => Values::array_get($payload, 'type'), 'address' => Values::array_get($payload, 'address'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'autoCreation' => Values::array_get($payload, 'auto_creation'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AddressConfigurationContext Context for this * AddressConfigurationInstance */ protected function proxy(): AddressConfigurationContext { if (!$this->context) { $this->context = new AddressConfigurationContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the AddressConfigurationInstance * * @return AddressConfigurationInstance Fetched AddressConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AddressConfigurationInstance { return $this->proxy()->fetch(); } /** * Update the AddressConfigurationInstance * * @param array|Options $options Optional Arguments * @return AddressConfigurationInstance Updated AddressConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AddressConfigurationInstance { return $this->proxy()->update($options); } /** * Delete the AddressConfigurationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.AddressConfigurationInstance ' . \implode(' ', $context) . ']'; } }PKt[ݪ@Twilio/Rest/Conversations/V1/ParticipantConversationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'participantUserSid' => Values::array_get($payload, 'participant_user_sid'), 'participantIdentity' => Values::array_get($payload, 'participant_identity'), 'participantMessagingBinding' => Values::array_get($payload, 'participant_messaging_binding'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'conversationUniqueName' => Values::array_get($payload, 'conversation_unique_name'), 'conversationFriendlyName' => Values::array_get($payload, 'conversation_friendly_name'), 'conversationAttributes' => Values::array_get($payload, 'conversation_attributes'), 'conversationDateCreated' => Deserialize::dateTime(Values::array_get($payload, 'conversation_date_created')), 'conversationDateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'conversation_date_updated')), 'conversationCreatedBy' => Values::array_get($payload, 'conversation_created_by'), 'conversationState' => Values::array_get($payload, 'conversation_state'), 'conversationTimers' => Values::array_get($payload, 'conversation_timers'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ParticipantConversationInstance]'; } }PKt[@ {1Twilio/Rest/Conversations/V1/ConversationList.phpnu[solution = []; $this->uri = '/Conversations'; } /** * Create the ConversationInstance * * @param array|Options $options Optional Arguments * @return ConversationInstance Created ConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ConversationInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'MessagingServiceSid' => $options['messagingServiceSid'], 'Attributes' => $options['attributes'], 'State' => $options['state'], 'Timers.Inactive' => $options['timersInactive'], 'Timers.Closed' => $options['timersClosed'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new ConversationInstance($this->version, $payload); } /** * Streams ConversationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ConversationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ConversationInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ConversationInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ConversationPage Page of ConversationInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ConversationPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ConversationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ConversationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ConversationPage Page of ConversationInstance */ public function getPage(string $targetUrl): ConversationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ConversationPage($this->version, $response, $this->solution); } /** * Constructs a ConversationContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): ConversationContext { return new ConversationContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ConversationList]'; } }PKt[w9Twilio/Rest/Conversations/V1/AddressConfigurationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AddressConfigurationInstance \Twilio\Rest\Conversations\V1\AddressConfigurationInstance */ public function buildInstance(array $payload): AddressConfigurationInstance { return new AddressConfigurationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.AddressConfigurationPage]'; } }PKt[8>Twilio/Rest/Conversations/V1/User/UserConversationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'unreadMessagesCount' => Values::array_get($payload, 'unread_messages_count'), 'lastReadMessageIndex' => Values::array_get($payload, 'last_read_message_index'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'userSid' => Values::array_get($payload, 'user_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'conversationState' => Values::array_get($payload, 'conversation_state'), 'timers' => Values::array_get($payload, 'timers'), 'attributes' => Values::array_get($payload, 'attributes'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), 'notificationLevel' => Values::array_get($payload, 'notification_level'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'userSid' => $userSid, 'conversationSid' => $conversationSid ?: $this->properties['conversationSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserConversationContext Context for this UserConversationInstance */ protected function proxy(): UserConversationContext { if (!$this->context) { $this->context = new UserConversationContext( $this->version, $this->solution['userSid'], $this->solution['conversationSid'] ); } return $this->context; } /** * Update the UserConversationInstance * * @param array|Options $options Optional Arguments * @return UserConversationInstance Updated UserConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserConversationInstance { return $this->proxy()->update($options); } /** * Delete the UserConversationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the UserConversationInstance * * @return UserConversationInstance Fetched UserConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserConversationInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.UserConversationInstance ' . \implode(' ', $context) . ']'; } }PKt[9q[:Twilio/Rest/Conversations/V1/User/UserConversationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserConversationInstance \Twilio\Rest\Conversations\V1\User\UserConversationInstance */ public function buildInstance(array $payload): UserConversationInstance { return new UserConversationInstance($this->version, $payload, $this->solution['userSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.UserConversationPage]'; } }PKt[p~ ~ =Twilio/Rest/Conversations/V1/User/UserConversationOptions.phpnu[options['notificationLevel'] = $notificationLevel; $this->options['lastReadTimestamp'] = $lastReadTimestamp; $this->options['lastReadMessageIndex'] = $lastReadMessageIndex; } /** * The Notification Level of this User Conversation. One of `default` or `muted`. * * @param string $notificationLevel The Notification Level of this User * Conversation. * @return $this Fluent Builder */ public function setNotificationLevel(string $notificationLevel): self { $this->options['notificationLevel'] = $notificationLevel; return $this; } /** * The date of the last message read in conversation by the user, given in ISO 8601 format. * * @param \DateTime $lastReadTimestamp The date of the last message read in * conversation by the user. * @return $this Fluent Builder */ public function setLastReadTimestamp(\DateTime $lastReadTimestamp): self { $this->options['lastReadTimestamp'] = $lastReadTimestamp; return $this; } /** * The index of the last Message in the Conversation that the Participant has read. * * @param int $lastReadMessageIndex The index of the last read Message. * @return $this Fluent Builder */ public function setLastReadMessageIndex(int $lastReadMessageIndex): self { $this->options['lastReadMessageIndex'] = $lastReadMessageIndex; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateUserConversationOptions ' . $options . ']'; } }PKt[SB B =Twilio/Rest/Conversations/V1/User/UserConversationContext.phpnu[solution = ['userSid' => $userSid, 'conversationSid' => $conversationSid, ]; $this->uri = '/Users/' . \rawurlencode($userSid) . '/Conversations/' . \rawurlencode($conversationSid) . ''; } /** * Update the UserConversationInstance * * @param array|Options $options Optional Arguments * @return UserConversationInstance Updated UserConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserConversationInstance { $options = new Values($options); $data = Values::of([ 'NotificationLevel' => $options['notificationLevel'], 'LastReadTimestamp' => Serialize::iso8601DateTime($options['lastReadTimestamp']), 'LastReadMessageIndex' => $options['lastReadMessageIndex'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new UserConversationInstance( $this->version, $payload, $this->solution['userSid'], $this->solution['conversationSid'] ); } /** * Delete the UserConversationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the UserConversationInstance * * @return UserConversationInstance Fetched UserConversationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserConversationInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserConversationInstance( $this->version, $payload, $this->solution['userSid'], $this->solution['conversationSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.UserConversationContext ' . \implode(' ', $context) . ']'; } }PKt[:Twilio/Rest/Conversations/V1/User/UserConversationList.phpnu[solution = ['userSid' => $userSid, ]; $this->uri = '/Users/' . \rawurlencode($userSid) . '/Conversations'; } /** * Streams UserConversationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserConversationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserConversationInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserConversationInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserConversationPage Page of UserConversationInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserConversationPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserConversationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserConversationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserConversationPage Page of UserConversationInstance */ public function getPage(string $targetUrl): UserConversationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserConversationPage($this->version, $response, $this->solution); } /** * Constructs a UserConversationContext * * @param string $conversationSid The unique SID identifier of the Conversation. */ public function getContext(string $conversationSid): UserConversationContext { return new UserConversationContext($this->version, $this->solution['userSid'], $conversationSid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.UserConversationList]'; } }PKt[K ||)Twilio/Rest/Conversations/V1/UserPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserInstance \Twilio\Rest\Conversations\V1\UserInstance */ public function buildInstance(array $payload): UserInstance { return new UserInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.UserPage]'; } }PKt[8)||)Twilio/Rest/Conversations/V1/RolePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RoleInstance \Twilio\Rest\Conversations\V1\RoleInstance */ public function buildInstance(array $payload): RoleInstance { return new RoleInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.RolePage]'; } }PKt['/Twilio/Rest/Conversations/V1/CredentialList.phpnu[solution = []; $this->uri = '/Credentials'; } /** * Create the CredentialInstance * * @param string $type The type of push-notification service the credential is * for. * @param array|Options $options Optional Arguments * @return CredentialInstance Created CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'Type' => $type, 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload); } /** * Streams CredentialInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CredentialInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CredentialInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CredentialInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CredentialPage Page of CredentialInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialPage Page of CredentialInstance */ public function getPage(string $targetUrl): CredentialPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialPage($this->version, $response, $this->solution); } /** * Constructs a CredentialContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): CredentialContext { return new CredentialContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.CredentialList]'; } }PKt[QY  9Twilio/Rest/Conversations/V1/AddressConfigurationList.phpnu[solution = []; $this->uri = '/Configuration/Addresses'; } /** * Streams AddressConfigurationInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AddressConfigurationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AddressConfigurationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of AddressConfigurationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AddressConfigurationPage Page of AddressConfigurationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AddressConfigurationPage { $options = new Values($options); $params = Values::of([ 'Type' => $options['type'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AddressConfigurationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AddressConfigurationInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AddressConfigurationPage Page of AddressConfigurationInstance */ public function getPage(string $targetUrl): AddressConfigurationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AddressConfigurationPage($this->version, $response, $this->solution); } /** * Create the AddressConfigurationInstance * * @param string $type Type of Address. * @param string $address The unique address to be configured. * @param array|Options $options Optional Arguments * @return AddressConfigurationInstance Created AddressConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, string $address, array $options = []): AddressConfigurationInstance { $options = new Values($options); $data = Values::of([ 'Type' => $type, 'Address' => $address, 'FriendlyName' => $options['friendlyName'], 'AutoCreation.Enabled' => Serialize::booleanToString($options['autoCreationEnabled']), 'AutoCreation.Type' => $options['autoCreationType'], 'AutoCreation.ConversationServiceSid' => $options['autoCreationConversationServiceSid'], 'AutoCreation.WebhookUrl' => $options['autoCreationWebhookUrl'], 'AutoCreation.WebhookMethod' => $options['autoCreationWebhookMethod'], 'AutoCreation.WebhookFilters' => Serialize::map($options['autoCreationWebhookFilters'], function($e) { return $e; }), 'AutoCreation.StudioFlowSid' => $options['autoCreationStudioFlowSid'], 'AutoCreation.StudioRetryCount' => $options['autoCreationStudioRetryCount'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AddressConfigurationInstance($this->version, $payload); } /** * Constructs a AddressConfigurationContext * * @param string $sid The SID or Address of the Configuration. */ public function getContext(string $sid): AddressConfigurationContext { return new AddressConfigurationContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.AddressConfigurationList]'; } }PKt[3Twilio/Rest/Conversations/V1/CredentialInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'sandbox' => Values::array_get($payload, 'sandbox'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialContext Context for this CredentialInstance */ protected function proxy(): CredentialContext { if (!$this->context) { $this->context = new CredentialContext($this->version, $this->solution['sid']); } return $this->context; } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { return $this->proxy()->update($options); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.CredentialInstance ' . \implode(' ', $context) . ']'; } }PKt[@1)Twilio/Rest/Conversations/V1/RoleList.phpnu[solution = []; $this->uri = '/Roles'; } /** * Create the RoleInstance * * @param string $friendlyName A string to describe the new resource * @param string $type The type of role * @param string[] $permission A permission the role should have * @return RoleInstance Created RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $type, array $permission): RoleInstance { $data = Values::of([ 'FriendlyName' => $friendlyName, 'Type' => $type, 'Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RoleInstance($this->version, $payload); } /** * Streams RoleInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RoleInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RoleInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of RoleInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RolePage Page of RoleInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RolePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RolePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RoleInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RolePage Page of RoleInstance */ public function getPage(string $targetUrl): RolePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RolePage($this->version, $response, $this->solution); } /** * Constructs a RoleContext * * @param string $sid The SID of the Role resource to fetch */ public function getContext(string $sid): RoleContext { return new RoleContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.RoleList]'; } }PKt[C8UU<Twilio/Rest/Conversations/V1/AddressConfigurationOptions.phpnu[options['type'] = $type; } /** * Filter the address configurations by its type. This value can be one of: `whatsapp`, `sms`. * * @param string $type The type of address configuration. * @return $this Fluent Builder */ public function setType(string $type): self { $this->options['type'] = $type; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.ReadAddressConfigurationOptions ' . $options . ']'; } } class CreateAddressConfigurationOptions extends Options { /** * @param string $friendlyName The human-readable name of this configuration. * @param bool $autoCreationEnabled Enable/Disable auto-creating conversations * for messages to this address * @param string $autoCreationType Type of Auto Creation. * @param string $autoCreationConversationServiceSid Conversation Service for * the auto-created * conversation. * @param string $autoCreationWebhookUrl For type `webhook`, the url for the * webhook request. * @param string $autoCreationWebhookMethod For type `webhook`, the HTTP method * to be used when sending a webhook * request. * @param string[] $autoCreationWebhookFilters The list of events, firing * webhook event for this * Conversation. * @param string $autoCreationStudioFlowSid For type `studio`, the studio flow * SID where the webhook should be * sent to. * @param int $autoCreationStudioRetryCount For type `studio`, number of times * to retry the webhook request */ public function __construct(string $friendlyName = Values::NONE, bool $autoCreationEnabled = Values::NONE, string $autoCreationType = Values::NONE, string $autoCreationConversationServiceSid = Values::NONE, string $autoCreationWebhookUrl = Values::NONE, string $autoCreationWebhookMethod = Values::NONE, array $autoCreationWebhookFilters = Values::ARRAY_NONE, string $autoCreationStudioFlowSid = Values::NONE, int $autoCreationStudioRetryCount = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['autoCreationEnabled'] = $autoCreationEnabled; $this->options['autoCreationType'] = $autoCreationType; $this->options['autoCreationConversationServiceSid'] = $autoCreationConversationServiceSid; $this->options['autoCreationWebhookUrl'] = $autoCreationWebhookUrl; $this->options['autoCreationWebhookMethod'] = $autoCreationWebhookMethod; $this->options['autoCreationWebhookFilters'] = $autoCreationWebhookFilters; $this->options['autoCreationStudioFlowSid'] = $autoCreationStudioFlowSid; $this->options['autoCreationStudioRetryCount'] = $autoCreationStudioRetryCount; } /** * The human-readable name of this configuration, limited to 256 characters. Optional. * * @param string $friendlyName The human-readable name of this configuration. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Enable/Disable auto-creating conversations for messages to this address * * @param bool $autoCreationEnabled Enable/Disable auto-creating conversations * for messages to this address * @return $this Fluent Builder */ public function setAutoCreationEnabled(bool $autoCreationEnabled): self { $this->options['autoCreationEnabled'] = $autoCreationEnabled; return $this; } /** * Type of Auto Creation. Value can be one of `webhook`, `studio` or `default`. * * @param string $autoCreationType Type of Auto Creation. * @return $this Fluent Builder */ public function setAutoCreationType(string $autoCreationType): self { $this->options['autoCreationType'] = $autoCreationType; return $this; } /** * Conversation Service for the auto-created conversation. If not set, the conversation is created in the default service. * * @param string $autoCreationConversationServiceSid Conversation Service for * the auto-created * conversation. * @return $this Fluent Builder */ public function setAutoCreationConversationServiceSid(string $autoCreationConversationServiceSid): self { $this->options['autoCreationConversationServiceSid'] = $autoCreationConversationServiceSid; return $this; } /** * For type `webhook`, the url for the webhook request. * * @param string $autoCreationWebhookUrl For type `webhook`, the url for the * webhook request. * @return $this Fluent Builder */ public function setAutoCreationWebhookUrl(string $autoCreationWebhookUrl): self { $this->options['autoCreationWebhookUrl'] = $autoCreationWebhookUrl; return $this; } /** * For type `webhook`, the HTTP method to be used when sending a webhook request. * * @param string $autoCreationWebhookMethod For type `webhook`, the HTTP method * to be used when sending a webhook * request. * @return $this Fluent Builder */ public function setAutoCreationWebhookMethod(string $autoCreationWebhookMethod): self { $this->options['autoCreationWebhookMethod'] = $autoCreationWebhookMethod; return $this; } /** * The list of events, firing webhook event for this Conversation. Values can be any of the following: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationStateUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`, `onDeliveryUpdated` * * @param string[] $autoCreationWebhookFilters The list of events, firing * webhook event for this * Conversation. * @return $this Fluent Builder */ public function setAutoCreationWebhookFilters(array $autoCreationWebhookFilters): self { $this->options['autoCreationWebhookFilters'] = $autoCreationWebhookFilters; return $this; } /** * For type `studio`, the studio flow SID where the webhook should be sent to. * * @param string $autoCreationStudioFlowSid For type `studio`, the studio flow * SID where the webhook should be * sent to. * @return $this Fluent Builder */ public function setAutoCreationStudioFlowSid(string $autoCreationStudioFlowSid): self { $this->options['autoCreationStudioFlowSid'] = $autoCreationStudioFlowSid; return $this; } /** * For type `studio`, number of times to retry the webhook request * * @param int $autoCreationStudioRetryCount For type `studio`, number of times * to retry the webhook request * @return $this Fluent Builder */ public function setAutoCreationStudioRetryCount(int $autoCreationStudioRetryCount): self { $this->options['autoCreationStudioRetryCount'] = $autoCreationStudioRetryCount; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.CreateAddressConfigurationOptions ' . $options . ']'; } } class UpdateAddressConfigurationOptions extends Options { /** * @param string $friendlyName The human-readable name of this configuration. * @param bool $autoCreationEnabled Enable/Disable auto-creating conversations * for messages to this address * @param string $autoCreationType Type of Auto Creation. * @param string $autoCreationConversationServiceSid Conversation Service for * the auto-created * conversation. * @param string $autoCreationWebhookUrl For type `webhook`, the url for the * webhook request. * @param string $autoCreationWebhookMethod For type `webhook`, the HTTP method * to be used when sending a webhook * request. * @param string[] $autoCreationWebhookFilters The list of events, firing * webhook event for this * Conversation. * @param string $autoCreationStudioFlowSid For type `studio`, the studio flow * SID where the webhook should be * sent to. * @param int $autoCreationStudioRetryCount For type `studio`, number of times * to retry the webhook request */ public function __construct(string $friendlyName = Values::NONE, bool $autoCreationEnabled = Values::NONE, string $autoCreationType = Values::NONE, string $autoCreationConversationServiceSid = Values::NONE, string $autoCreationWebhookUrl = Values::NONE, string $autoCreationWebhookMethod = Values::NONE, array $autoCreationWebhookFilters = Values::ARRAY_NONE, string $autoCreationStudioFlowSid = Values::NONE, int $autoCreationStudioRetryCount = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['autoCreationEnabled'] = $autoCreationEnabled; $this->options['autoCreationType'] = $autoCreationType; $this->options['autoCreationConversationServiceSid'] = $autoCreationConversationServiceSid; $this->options['autoCreationWebhookUrl'] = $autoCreationWebhookUrl; $this->options['autoCreationWebhookMethod'] = $autoCreationWebhookMethod; $this->options['autoCreationWebhookFilters'] = $autoCreationWebhookFilters; $this->options['autoCreationStudioFlowSid'] = $autoCreationStudioFlowSid; $this->options['autoCreationStudioRetryCount'] = $autoCreationStudioRetryCount; } /** * The human-readable name of this configuration, limited to 256 characters. Optional. * * @param string $friendlyName The human-readable name of this configuration. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Enable/Disable auto-creating conversations for messages to this address * * @param bool $autoCreationEnabled Enable/Disable auto-creating conversations * for messages to this address * @return $this Fluent Builder */ public function setAutoCreationEnabled(bool $autoCreationEnabled): self { $this->options['autoCreationEnabled'] = $autoCreationEnabled; return $this; } /** * Type of Auto Creation. Value can be one of `webhook`, `studio` or `default`. * * @param string $autoCreationType Type of Auto Creation. * @return $this Fluent Builder */ public function setAutoCreationType(string $autoCreationType): self { $this->options['autoCreationType'] = $autoCreationType; return $this; } /** * Conversation Service for the auto-created conversation. If not set, the conversation is created in the default service. * * @param string $autoCreationConversationServiceSid Conversation Service for * the auto-created * conversation. * @return $this Fluent Builder */ public function setAutoCreationConversationServiceSid(string $autoCreationConversationServiceSid): self { $this->options['autoCreationConversationServiceSid'] = $autoCreationConversationServiceSid; return $this; } /** * For type `webhook`, the url for the webhook request. * * @param string $autoCreationWebhookUrl For type `webhook`, the url for the * webhook request. * @return $this Fluent Builder */ public function setAutoCreationWebhookUrl(string $autoCreationWebhookUrl): self { $this->options['autoCreationWebhookUrl'] = $autoCreationWebhookUrl; return $this; } /** * For type `webhook`, the HTTP method to be used when sending a webhook request. * * @param string $autoCreationWebhookMethod For type `webhook`, the HTTP method * to be used when sending a webhook * request. * @return $this Fluent Builder */ public function setAutoCreationWebhookMethod(string $autoCreationWebhookMethod): self { $this->options['autoCreationWebhookMethod'] = $autoCreationWebhookMethod; return $this; } /** * The list of events, firing webhook event for this Conversation. Values can be any of the following: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationStateUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`, `onDeliveryUpdated` * * @param string[] $autoCreationWebhookFilters The list of events, firing * webhook event for this * Conversation. * @return $this Fluent Builder */ public function setAutoCreationWebhookFilters(array $autoCreationWebhookFilters): self { $this->options['autoCreationWebhookFilters'] = $autoCreationWebhookFilters; return $this; } /** * For type `studio`, the studio flow SID where the webhook should be sent to. * * @param string $autoCreationStudioFlowSid For type `studio`, the studio flow * SID where the webhook should be * sent to. * @return $this Fluent Builder */ public function setAutoCreationStudioFlowSid(string $autoCreationStudioFlowSid): self { $this->options['autoCreationStudioFlowSid'] = $autoCreationStudioFlowSid; return $this; } /** * For type `studio`, number of times to retry the webhook request * * @param int $autoCreationStudioRetryCount For type `studio`, number of times * to retry the webhook request * @return $this Fluent Builder */ public function setAutoCreationStudioRetryCount(int $autoCreationStudioRetryCount): self { $this->options['autoCreationStudioRetryCount'] = $autoCreationStudioRetryCount; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateAddressConfigurationOptions ' . $options . ']'; } }PKt[&lB,Twilio/Rest/Conversations/V1/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\Conversations\V1\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.ServicePage]'; } }PKt[`P})Twilio/Rest/Conversations/V1/UserList.phpnu[solution = []; $this->uri = '/Users'; } /** * Create the UserInstance * * @param string $identity The string that identifies the resource's User * @param array|Options $options Optional Arguments * @return UserInstance Created UserInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $identity, 'FriendlyName' => $options['friendlyName'], 'Attributes' => $options['attributes'], 'RoleSid' => $options['roleSid'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new UserInstance($this->version, $payload); } /** * Streams UserInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserPage Page of UserInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserPage Page of UserInstance */ public function getPage(string $targetUrl): UserPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserPage($this->version, $response, $this->solution); } /** * Constructs a UserContext * * @param string $sid The SID of the User resource to fetch */ public function getContext(string $sid): UserContext { return new UserContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1.UserList]'; } }PKt[solution = ['sid' => $sid, ]; $this->uri = '/Roles/' . \rawurlencode($sid) . ''; } /** * Update the RoleInstance * * @param string[] $permission A permission the role should have * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { $data = Values::of(['Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RoleInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { $payload = $this->version->fetch('GET', $this->uri); return new RoleInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.RoleContext ' . \implode(' ', $context) . ']'; } }PKt[1z8-Twilio/Rest/Conversations/V1/RoleInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'permissions' => Values::array_get($payload, 'permissions'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RoleContext Context for this RoleInstance */ protected function proxy(): RoleContext { if (!$this->context) { $this->context = new RoleContext($this->version, $this->solution['sid']); } return $this->context; } /** * Update the RoleInstance * * @param string[] $permission A permission the role should have * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { return $this->proxy()->update($permission); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Conversations.V1.RoleInstance ' . \implode(' ', $context) . ']'; } }PKt[H5Twilio/Rest/Conversations/V1/ConfigurationOptions.phpnu[options['defaultChatServiceSid'] = $defaultChatServiceSid; $this->options['defaultMessagingServiceSid'] = $defaultMessagingServiceSid; $this->options['defaultInactiveTimer'] = $defaultInactiveTimer; $this->options['defaultClosedTimer'] = $defaultClosedTimer; } /** * The SID of the default [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to use when creating a conversation. * * @param string $defaultChatServiceSid The SID of the default Conversation * Service that every new conversation * will be associated with. * @return $this Fluent Builder */ public function setDefaultChatServiceSid(string $defaultChatServiceSid): self { $this->options['defaultChatServiceSid'] = $defaultChatServiceSid; return $this; } /** * The SID of the default [Messaging Service](https://www.twilio.com/docs/sms/services/api) to use when creating a conversation. * * @param string $defaultMessagingServiceSid The SID of the default Messaging * Service that every new * conversation will be associated * with. * @return $this Fluent Builder */ public function setDefaultMessagingServiceSid(string $defaultMessagingServiceSid): self { $this->options['defaultMessagingServiceSid'] = $defaultMessagingServiceSid; return $this; } /** * Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. * * @param string $defaultInactiveTimer Default ISO8601 duration when * conversation will be switched to * `inactive` state. * @return $this Fluent Builder */ public function setDefaultInactiveTimer(string $defaultInactiveTimer): self { $this->options['defaultInactiveTimer'] = $defaultInactiveTimer; return $this; } /** * Default ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. * * @param string $defaultClosedTimer Default ISO8601 duration when conversation * will be switched to `closed` state. * @return $this Fluent Builder */ public function setDefaultClosedTimer(string $defaultClosedTimer): self { $this->options['defaultClosedTimer'] = $defaultClosedTimer; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Conversations.V1.UpdateConfigurationOptions ' . $options . ']'; } }PKt[@4 Twilio/Rest/Conversations/V1.phpnu[version = 'v1'; } protected function getConfiguration(): ConfigurationList { if (!$this->_configuration) { $this->_configuration = new ConfigurationList($this); } return $this->_configuration; } protected function getAddressConfigurations(): AddressConfigurationList { if (!$this->_addressConfigurations) { $this->_addressConfigurations = new AddressConfigurationList($this); } return $this->_addressConfigurations; } protected function getConversations(): ConversationList { if (!$this->_conversations) { $this->_conversations = new ConversationList($this); } return $this->_conversations; } protected function getCredentials(): CredentialList { if (!$this->_credentials) { $this->_credentials = new CredentialList($this); } return $this->_credentials; } protected function getParticipantConversations(): ParticipantConversationList { if (!$this->_participantConversations) { $this->_participantConversations = new ParticipantConversationList($this); } return $this->_participantConversations; } protected function getRoles(): RoleList { if (!$this->_roles) { $this->_roles = new RoleList($this); } return $this->_roles; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } protected function getUsers(): UserList { if (!$this->_users) { $this->_users = new UserList($this); } return $this->_users; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations.V1]'; } }PKt[9=Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InsightsQuestionnairesQuestionInstance \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesQuestionInstance */ public function buildInstance(array $payload): InsightsQuestionnairesQuestionInstance { return new InsightsQuestionnairesQuestionInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsQuestionnairesQuestionPage]'; } }PKt[詉.Twilio/Rest/FlexApi/V1/AssessmentsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assessmentId' => Values::array_get($payload, 'assessment_id'), 'offset' => Values::array_get($payload, 'offset'), 'report' => Values::array_get($payload, 'report'), 'weight' => Values::array_get($payload, 'weight'), 'agentId' => Values::array_get($payload, 'agent_id'), 'segmentId' => Values::array_get($payload, 'segment_id'), 'userName' => Values::array_get($payload, 'user_name'), 'userEmail' => Values::array_get($payload, 'user_email'), 'answerText' => Values::array_get($payload, 'answer_text'), 'answerId' => Values::array_get($payload, 'answer_id'), 'assessment' => Values::array_get($payload, 'assessment'), 'timestamp' => Values::array_get($payload, 'timestamp'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['assessmentId' => $assessmentId ?: $this->properties['assessmentId'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssessmentsContext Context for this AssessmentsInstance */ protected function proxy(): AssessmentsContext { if (!$this->context) { $this->context = new AssessmentsContext($this->version, $this->solution['assessmentId']); } return $this->context; } /** * Update the AssessmentsInstance * * @param string $offset offset * @param string $answerText Answer text * @param string $answerId Answer Id * @param array|Options $options Optional Arguments * @return AssessmentsInstance Updated AssessmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $offset, string $answerText, string $answerId, array $options = []): AssessmentsInstance { return $this->proxy()->update($offset, $answerText, $answerId, $options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.AssessmentsInstance ' . \implode(' ', $context) . ']'; } }PKt[Bc>d=Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionList.phpnu[solution = []; $this->uri = '/Insights/QM/Questions'; } /** * Create the InsightsQuestionnairesQuestionInstance * * @param string $categoryId Category ID * @param string $question The question. * @param string $description The question description. * @param string $answerSetId The answer_set for question. * @param bool $allowNa Flag to enable NA for answer. * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesQuestionInstance Created * InsightsQuestionnairesQuestionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $categoryId, string $question, string $description, string $answerSetId, bool $allowNa, array $options = []): InsightsQuestionnairesQuestionInstance { $options = new Values($options); $data = Values::of([ 'CategoryId' => $categoryId, 'Question' => $question, 'Description' => $description, 'AnswerSetId' => $answerSetId, 'AllowNa' => Serialize::booleanToString($allowNa), ]); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new InsightsQuestionnairesQuestionInstance($this->version, $payload); } /** * Streams InsightsQuestionnairesQuestionInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InsightsQuestionnairesQuestionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InsightsQuestionnairesQuestionInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of InsightsQuestionnairesQuestionInstance records * from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InsightsQuestionnairesQuestionPage Page of * InsightsQuestionnairesQuestionInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InsightsQuestionnairesQuestionPage { $options = new Values($options); $params = Values::of([ 'CategoryId' => Serialize::map($options['categoryId'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $headers = Values::of(['Token' => $options['token'], ]); $response = $this->version->page('GET', $this->uri, $params, [], $headers); return new InsightsQuestionnairesQuestionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InsightsQuestionnairesQuestionInstance records * from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InsightsQuestionnairesQuestionPage Page of * InsightsQuestionnairesQuestionInstance */ public function getPage(string $targetUrl): InsightsQuestionnairesQuestionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InsightsQuestionnairesQuestionPage($this->version, $response, $this->solution); } /** * Constructs a InsightsQuestionnairesQuestionContext * * @param string $questionId Unique Question ID */ public function getContext(string $questionId): InsightsQuestionnairesQuestionContext { return new InsightsQuestionnairesQuestionContext($this->version, $questionId); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsQuestionnairesQuestionList]'; } }PKt[ (5Twilio/Rest/FlexApi/V1/InsightsQuestionnairesList.phpnu[solution = []; $this->uri = '/Insights/QM/Questionnaires'; } /** * Create the InsightsQuestionnairesInstance * * @param string $name The questionnaire name * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesInstance Created InsightsQuestionnairesInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $name, array $options = []): InsightsQuestionnairesInstance { $options = new Values($options); $data = Values::of([ 'Name' => $name, 'Description' => $options['description'], 'Active' => Serialize::booleanToString($options['active']), 'QuestionIds' => Serialize::map($options['questionIds'], function($e) { return $e; }), ]); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new InsightsQuestionnairesInstance($this->version, $payload); } /** * Streams InsightsQuestionnairesInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InsightsQuestionnairesInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InsightsQuestionnairesInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of InsightsQuestionnairesInstance records from the * API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InsightsQuestionnairesPage Page of InsightsQuestionnairesInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InsightsQuestionnairesPage { $options = new Values($options); $params = Values::of([ 'IncludeInactive' => Serialize::booleanToString($options['includeInactive']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $headers = Values::of(['Token' => $options['token'], ]); $response = $this->version->page('GET', $this->uri, $params, [], $headers); return new InsightsQuestionnairesPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InsightsQuestionnairesInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InsightsQuestionnairesPage Page of InsightsQuestionnairesInstance */ public function getPage(string $targetUrl): InsightsQuestionnairesPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InsightsQuestionnairesPage($this->version, $response, $this->solution); } /** * Constructs a InsightsQuestionnairesContext * * @param string $id Unique Questionnaire ID */ public function getContext(string $id): InsightsQuestionnairesContext { return new InsightsQuestionnairesContext($this->version, $id); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsQuestionnairesList]'; } }PKt[ATwilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'categoryId' => Values::array_get($payload, 'category_id'), 'name' => Values::array_get($payload, 'name'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['categoryId' => $categoryId ?: $this->properties['categoryId'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InsightsQuestionnairesCategoryContext Context for this * InsightsQuestionnairesCategoryInstance */ protected function proxy(): InsightsQuestionnairesCategoryContext { if (!$this->context) { $this->context = new InsightsQuestionnairesCategoryContext( $this->version, $this->solution['categoryId'] ); } return $this->context; } /** * Update the InsightsQuestionnairesCategoryInstance * * @param string $name The category name. * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesCategoryInstance Updated * InsightsQuestionnairesCategoryInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $name, array $options = []): InsightsQuestionnairesCategoryInstance { return $this->proxy()->update($name, $options); } /** * Delete the InsightsQuestionnairesCategoryInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsQuestionnairesCategoryInstance ' . \implode(' ', $context) . ']'; } }PKt['5Twilio/Rest/FlexApi/V1/InsightsQuestionnairesPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InsightsQuestionnairesInstance \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesInstance */ public function buildInstance(array $payload): InsightsQuestionnairesInstance { return new InsightsQuestionnairesInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsQuestionnairesPage]'; } }PKt[.AL L @Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionContext.phpnu[solution = ['questionId' => $questionId, ]; $this->uri = '/Insights/QM/Questions/' . \rawurlencode($questionId) . ''; } /** * Update the InsightsQuestionnairesQuestionInstance * * @param bool $allowNa Flag to enable NA for answer. * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesQuestionInstance Updated * InsightsQuestionnairesQuestionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $allowNa, array $options = []): InsightsQuestionnairesQuestionInstance { $options = new Values($options); $data = Values::of([ 'AllowNa' => Serialize::booleanToString($allowNa), 'CategoryId' => $options['categoryId'], 'Question' => $options['question'], 'Description' => $options['description'], 'AnswerSetId' => $options['answerSetId'], ]); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new InsightsQuestionnairesQuestionInstance( $this->version, $payload, $this->solution['questionId'] ); } /** * Delete the InsightsQuestionnairesQuestionInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['Token' => $options['token'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsQuestionnairesQuestionContext ' . \implode(' ', $context) . ']'; } }PKt[.||+Twilio/Rest/FlexApi/V1/FlexFlowInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'), 'channelType' => Values::array_get($payload, 'channel_type'), 'contactIdentity' => Values::array_get($payload, 'contact_identity'), 'enabled' => Values::array_get($payload, 'enabled'), 'integrationType' => Values::array_get($payload, 'integration_type'), 'integration' => Values::array_get($payload, 'integration'), 'longLived' => Values::array_get($payload, 'long_lived'), 'janitorEnabled' => Values::array_get($payload, 'janitor_enabled'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FlexFlowContext Context for this FlexFlowInstance */ protected function proxy(): FlexFlowContext { if (!$this->context) { $this->context = new FlexFlowContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the FlexFlowInstance * * @return FlexFlowInstance Fetched FlexFlowInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FlexFlowInstance { return $this->proxy()->fetch(); } /** * Update the FlexFlowInstance * * @param array|Options $options Optional Arguments * @return FlexFlowInstance Updated FlexFlowInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FlexFlowInstance { return $this->proxy()->update($options); } /** * Delete the FlexFlowInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.FlexFlowInstance ' . \implode(' ', $context) . ']'; } }PKt[l9Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InsightsSettingsAnswerSetsInstance \Twilio\Rest\FlexApi\V1\InsightsSettingsAnswerSetsInstance */ public function buildInstance(array $payload): InsightsSettingsAnswerSetsInstance { return new InsightsSettingsAnswerSetsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsSettingsAnswerSetsPage]'; } }PKt[si@Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.phpnu[options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.CreateInsightsQuestionnairesCategoryOptions ' . $options . ']'; } } class UpdateInsightsQuestionnairesCategoryOptions extends Options { /** * @param string $token The Token HTTP request header */ public function __construct(string $token = Values::NONE) { $this->options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.UpdateInsightsQuestionnairesCategoryOptions ' . $options . ']'; } } class ReadInsightsQuestionnairesCategoryOptions extends Options { /** * @param string $token The Token HTTP request header */ public function __construct(string $token = Values::NONE) { $this->options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.ReadInsightsQuestionnairesCategoryOptions ' . $options . ']'; } } class DeleteInsightsQuestionnairesCategoryOptions extends Options { /** * @param string $token The Token HTTP request header */ public function __construct(string $token = Values::NONE) { $this->options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.DeleteInsightsQuestionnairesCategoryOptions ' . $options . ']'; } }PKt[+< 4Twilio/Rest/FlexApi/V1/InsightsUserRolesInstance.phpnu[properties = [ 'roles' => Values::array_get($payload, 'roles'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InsightsUserRolesContext Context for this InsightsUserRolesInstance */ protected function proxy(): InsightsUserRolesContext { if (!$this->context) { $this->context = new InsightsUserRolesContext($this->version); } return $this->context; } /** * Fetch the InsightsUserRolesInstance * * @param array|Options $options Optional Arguments * @return InsightsUserRolesInstance Fetched InsightsUserRolesInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): InsightsUserRolesInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsUserRolesInstance ' . \implode(' ', $context) . ']'; } }PKt[F0Twilio/Rest/FlexApi/V1/InsightsUserRolesList.phpnu[solution = []; } /** * Constructs a InsightsUserRolesContext */ public function getContext(): InsightsUserRolesContext { return new InsightsUserRolesContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsUserRolesList]'; } }PKt[٪4H33)Twilio/Rest/FlexApi/V1/ChannelOptions.phpnu[options['target'] = $target; $this->options['chatUniqueName'] = $chatUniqueName; $this->options['preEngagementData'] = $preEngagementData; $this->options['taskSid'] = $taskSid; $this->options['taskAttributes'] = $taskAttributes; $this->options['longLived'] = $longLived; } /** * The Target Contact Identity, for example the phone number of an SMS. * * @param string $target The Target Contact Identity * @return $this Fluent Builder */ public function setTarget(string $target): self { $this->options['target'] = $target; return $this; } /** * The chat channel's unique name. * * @param string $chatUniqueName The chat channel's unique name * @return $this Fluent Builder */ public function setChatUniqueName(string $chatUniqueName): self { $this->options['chatUniqueName'] = $chatUniqueName; return $this; } /** * The pre-engagement data. * * @param string $preEngagementData The pre-engagement data * @return $this Fluent Builder */ public function setPreEngagementData(string $preEngagementData): self { $this->options['preEngagementData'] = $preEngagementData; return $this; } /** * The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external` * * @param string $taskSid The SID of the TaskRouter Task * @return $this Fluent Builder */ public function setTaskSid(string $taskSid): self { $this->options['taskSid'] = $taskSid; return $this; } /** * The Task attributes to be added for the TaskRouter Task. * * @param string $taskAttributes The Task attributes to be added for the * TaskRouter Task * @return $this Fluent Builder */ public function setTaskAttributes(string $taskAttributes): self { $this->options['taskAttributes'] = $taskAttributes; return $this; } /** * Whether to create the channel as long-lived. * * @param bool $longLived Whether to create the channel as long-lived * @return $this Fluent Builder */ public function setLongLived(bool $longLived): self { $this->options['longLived'] = $longLived; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.CreateChannelOptions ' . $options . ']'; } }PKt[6'}q__*Twilio/Rest/FlexApi/V1/AssessmentsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AssessmentsInstance \Twilio\Rest\FlexApi\V1\AssessmentsInstance */ public function buildInstance(array $payload): AssessmentsInstance { return new AssessmentsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.AssessmentsPage]'; } }PKt[hww.Twilio/Rest/FlexApi/V1/InsightsSessionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InsightsSessionInstance \Twilio\Rest\FlexApi\V1\InsightsSessionInstance */ public function buildInstance(array $payload): InsightsSessionInstance { return new InsightsSessionInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsSessionPage]'; } }PKt[\y@HH1Twilio/Rest/FlexApi/V1/InsightsSessionContext.phpnu[solution = []; $this->uri = '/Insights/Session'; } /** * Create the InsightsSessionInstance * * @param array|Options $options Optional Arguments * @return InsightsSessionInstance Created InsightsSessionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): InsightsSessionInstance { $options = new Values($options); $headers = Values::of(['Authorization' => $options['authorization'], ]); $payload = $this->version->create('POST', $this->uri, [], [], $headers); return new InsightsSessionInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsSessionContext ' . \implode(' ', $context) . ']'; } }PKt[y"||&Twilio/Rest/FlexApi/V1/ChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ChannelInstance \Twilio\Rest\FlexApi\V1\ChannelInstance */ public function buildInstance(array $payload): ChannelInstance { return new ChannelInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.ChannelPage]'; } }PKt[Q  =Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'answerSets' => Values::array_get($payload, 'answer_sets'), 'answerSetCategories' => Values::array_get($payload, 'answer_set_categories'), 'notApplicable' => Values::array_get($payload, 'not_applicable'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsSettingsAnswerSetsInstance]'; } }PKt[7s s =Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assessmentId' => Values::array_get($payload, 'assessment_id'), 'comment' => Values::array_get($payload, 'comment'), 'offset' => Values::array_get($payload, 'offset'), 'report' => Values::array_get($payload, 'report'), 'weight' => Values::array_get($payload, 'weight'), 'agentId' => Values::array_get($payload, 'agent_id'), 'segmentId' => Values::array_get($payload, 'segment_id'), 'userName' => Values::array_get($payload, 'user_name'), 'userEmail' => Values::array_get($payload, 'user_email'), 'timestamp' => Values::array_get($payload, 'timestamp'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsAssessmentsCommentInstance]'; } }PKt[B .Twilio/Rest/FlexApi/V1/InteractionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'channel' => Values::array_get($payload, 'channel'), 'routing' => Values::array_get($payload, 'routing'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InteractionContext Context for this InteractionInstance */ protected function proxy(): InteractionContext { if (!$this->context) { $this->context = new InteractionContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the InteractionInstance * * @return InteractionInstance Fetched InteractionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InteractionInstance { return $this->proxy()->fetch(); } /** * Access the channels */ protected function getChannels(): InteractionChannelList { return $this->proxy()->channels; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InteractionInstance ' . \implode(' ', $context) . ']'; } }PKt[pHm(,Twilio/Rest/FlexApi/V1/ConfigurationList.phpnu[solution = []; } /** * Constructs a ConfigurationContext */ public function getContext(): ConfigurationContext { return new ConfigurationContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.ConfigurationList]'; } }PKt[y:Twilio/Rest/FlexApi/V1/InsightsSettingsCommentInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'comments' => Values::array_get($payload, 'comments'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsSettingsCommentInstance]'; } }PKt[tN N /Twilio/Rest/FlexApi/V1/ConfigurationContext.phpnu[solution = []; $this->uri = '/Configuration'; } /** * Fetch the ConfigurationInstance * * @param array|Options $options Optional Arguments * @return ConfigurationInstance Fetched ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): ConfigurationInstance { $options = new Values($options); $params = Values::of(['UiVersion' => $options['uiVersion'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new ConfigurationInstance($this->version, $payload); } /** * Create the ConfigurationInstance * * @return ConfigurationInstance Created ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(): ConfigurationInstance { $payload = $this->version->create('POST', $this->uri); return new ConfigurationInstance($this->version, $payload); } /** * Update the ConfigurationInstance * * @return ConfigurationInstance Updated ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(): ConfigurationInstance { $payload = $this->version->update('POST', $this->uri); return new ConfigurationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.ConfigurationContext ' . \implode(' ', $context) . ']'; } }PKt[2WW&Twilio/Rest/FlexApi/V1/ChannelList.phpnu[solution = []; $this->uri = '/Channels'; } /** * Streams ChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ChannelInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ChannelInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ChannelPage Page of ChannelInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ChannelPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ChannelPage Page of ChannelInstance */ public function getPage(string $targetUrl): ChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ChannelPage($this->version, $response, $this->solution); } /** * Create the ChannelInstance * * @param string $flexFlowSid The SID of the Flex Flow * @param string $identity The identity value that identifies the new * resource's chat User * @param string $chatUserFriendlyName The chat participant's friendly name * @param string $chatFriendlyName The chat channel's friendly name * @param array|Options $options Optional Arguments * @return ChannelInstance Created ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $flexFlowSid, string $identity, string $chatUserFriendlyName, string $chatFriendlyName, array $options = []): ChannelInstance { $options = new Values($options); $data = Values::of([ 'FlexFlowSid' => $flexFlowSid, 'Identity' => $identity, 'ChatUserFriendlyName' => $chatUserFriendlyName, 'ChatFriendlyName' => $chatFriendlyName, 'Target' => $options['target'], 'ChatUniqueName' => $options['chatUniqueName'], 'PreEngagementData' => $options['preEngagementData'], 'TaskSid' => $options['taskSid'], 'TaskAttributes' => $options['taskAttributes'], 'LongLived' => Serialize::booleanToString($options['longLived']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ChannelInstance($this->version, $payload); } /** * Constructs a ChannelContext * * @param string $sid The SID that identifies the Flex chat channel resource to * fetch */ public function getContext(string $sid): ChannelContext { return new ChannelContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.ChannelList]'; } }PKt[}xl'Twilio/Rest/FlexApi/V1/FlexFlowList.phpnu[solution = []; $this->uri = '/FlexFlows'; } /** * Streams FlexFlowInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FlexFlowInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FlexFlowInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of FlexFlowInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FlexFlowPage Page of FlexFlowInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FlexFlowPage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FlexFlowPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FlexFlowInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FlexFlowPage Page of FlexFlowInstance */ public function getPage(string $targetUrl): FlexFlowPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FlexFlowPage($this->version, $response, $this->solution); } /** * Create the FlexFlowInstance * * @param string $friendlyName A string to describe the resource * @param string $chatServiceSid The SID of the chat service * @param string $channelType The channel type * @param array|Options $options Optional Arguments * @return FlexFlowInstance Created FlexFlowInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $chatServiceSid, string $channelType, array $options = []): FlexFlowInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'ChatServiceSid' => $chatServiceSid, 'ChannelType' => $channelType, 'ContactIdentity' => $options['contactIdentity'], 'Enabled' => Serialize::booleanToString($options['enabled']), 'IntegrationType' => $options['integrationType'], 'Integration.FlowSid' => $options['integrationFlowSid'], 'Integration.Url' => $options['integrationUrl'], 'Integration.WorkspaceSid' => $options['integrationWorkspaceSid'], 'Integration.WorkflowSid' => $options['integrationWorkflowSid'], 'Integration.Channel' => $options['integrationChannel'], 'Integration.Timeout' => $options['integrationTimeout'], 'Integration.Priority' => $options['integrationPriority'], 'Integration.CreationOnMessage' => Serialize::booleanToString($options['integrationCreationOnMessage']), 'LongLived' => Serialize::booleanToString($options['longLived']), 'JanitorEnabled' => Serialize::booleanToString($options['janitorEnabled']), 'Integration.RetryCount' => $options['integrationRetryCount'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FlexFlowInstance($this->version, $payload); } /** * Constructs a FlexFlowContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): FlexFlowContext { return new FlexFlowContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.FlexFlowList]'; } }PKt[,Twilio/Rest/FlexApi/V1/ConfigurationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConfigurationInstance \Twilio\Rest\FlexApi\V1\ConfigurationInstance */ public function buildInstance(array $payload): ConfigurationInstance { return new ConfigurationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.ConfigurationPage]'; } }PKt[-]("("0Twilio/Rest/FlexApi/V1/ConfigurationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'attributes' => Values::array_get($payload, 'attributes'), 'status' => Values::array_get($payload, 'status'), 'taskrouterWorkspaceSid' => Values::array_get($payload, 'taskrouter_workspace_sid'), 'taskrouterTargetWorkflowSid' => Values::array_get($payload, 'taskrouter_target_workflow_sid'), 'taskrouterTargetTaskqueueSid' => Values::array_get($payload, 'taskrouter_target_taskqueue_sid'), 'taskrouterTaskqueues' => Values::array_get($payload, 'taskrouter_taskqueues'), 'taskrouterSkills' => Values::array_get($payload, 'taskrouter_skills'), 'taskrouterWorkerChannels' => Values::array_get($payload, 'taskrouter_worker_channels'), 'taskrouterWorkerAttributes' => Values::array_get($payload, 'taskrouter_worker_attributes'), 'taskrouterOfflineActivitySid' => Values::array_get($payload, 'taskrouter_offline_activity_sid'), 'runtimeDomain' => Values::array_get($payload, 'runtime_domain'), 'messagingServiceInstanceSid' => Values::array_get($payload, 'messaging_service_instance_sid'), 'chatServiceInstanceSid' => Values::array_get($payload, 'chat_service_instance_sid'), 'flexServiceInstanceSid' => Values::array_get($payload, 'flex_service_instance_sid'), 'uiLanguage' => Values::array_get($payload, 'ui_language'), 'uiAttributes' => Values::array_get($payload, 'ui_attributes'), 'uiDependencies' => Values::array_get($payload, 'ui_dependencies'), 'uiVersion' => Values::array_get($payload, 'ui_version'), 'serviceVersion' => Values::array_get($payload, 'service_version'), 'callRecordingEnabled' => Values::array_get($payload, 'call_recording_enabled'), 'callRecordingWebhookUrl' => Values::array_get($payload, 'call_recording_webhook_url'), 'crmEnabled' => Values::array_get($payload, 'crm_enabled'), 'crmType' => Values::array_get($payload, 'crm_type'), 'crmCallbackUrl' => Values::array_get($payload, 'crm_callback_url'), 'crmFallbackUrl' => Values::array_get($payload, 'crm_fallback_url'), 'crmAttributes' => Values::array_get($payload, 'crm_attributes'), 'publicAttributes' => Values::array_get($payload, 'public_attributes'), 'pluginServiceEnabled' => Values::array_get($payload, 'plugin_service_enabled'), 'pluginServiceAttributes' => Values::array_get($payload, 'plugin_service_attributes'), 'integrations' => Values::array_get($payload, 'integrations'), 'outboundCallFlows' => Values::array_get($payload, 'outbound_call_flows'), 'serverlessServiceSids' => Values::array_get($payload, 'serverless_service_sids'), 'queueStatsConfiguration' => Values::array_get($payload, 'queue_stats_configuration'), 'notifications' => Values::array_get($payload, 'notifications'), 'markdown' => Values::array_get($payload, 'markdown'), 'url' => Values::array_get($payload, 'url'), 'flexInsightsHr' => Values::array_get($payload, 'flex_insights_hr'), 'flexInsightsDrilldown' => Values::array_get($payload, 'flex_insights_drilldown'), 'flexUrl' => Values::array_get($payload, 'flex_url'), 'channelConfigs' => Values::array_get($payload, 'channel_configs'), 'debuggerIntegration' => Values::array_get($payload, 'debugger_integration'), 'flexUiStatusReport' => Values::array_get($payload, 'flex_ui_status_report'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConfigurationContext Context for this ConfigurationInstance */ protected function proxy(): ConfigurationContext { if (!$this->context) { $this->context = new ConfigurationContext($this->version); } return $this->context; } /** * Fetch the ConfigurationInstance * * @param array|Options $options Optional Arguments * @return ConfigurationInstance Fetched ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): ConfigurationInstance { return $this->proxy()->fetch($options); } /** * Create the ConfigurationInstance * * @return ConfigurationInstance Created ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(): ConfigurationInstance { return $this->proxy()->create(); } /** * Update the ConfigurationInstance * * @return ConfigurationInstance Updated ConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(): ConfigurationInstance { return $this->proxy()->update(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.ConfigurationInstance ' . \implode(' ', $context) . ']'; } }PKt[F 8Twilio/Rest/FlexApi/V1/InsightsQuestionnairesContext.phpnu[solution = ['id' => $id, ]; $this->uri = '/Insights/QM/Questionnaires/' . \rawurlencode($id) . ''; } /** * Update the InsightsQuestionnairesInstance * * @param bool $active Is questionnaire enabled ? * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesInstance Updated InsightsQuestionnairesInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $active, array $options = []): InsightsQuestionnairesInstance { $options = new Values($options); $data = Values::of([ 'Active' => Serialize::booleanToString($active), 'Name' => $options['name'], 'Description' => $options['description'], 'QuestionIds' => Serialize::map($options['questionIds'], function($e) { return $e; }), ]); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new InsightsQuestionnairesInstance($this->version, $payload, $this->solution['id']); } /** * Delete the InsightsQuestionnairesInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['Token' => $options['token'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Fetch the InsightsQuestionnairesInstance * * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesInstance Fetched InsightsQuestionnairesInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): InsightsQuestionnairesInstance { $options = new Values($options); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->fetch('GET', $this->uri, [], [], $headers); return new InsightsQuestionnairesInstance($this->version, $payload, $this->solution['id']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsQuestionnairesContext ' . \implode(' ', $context) . ']'; } }PKt[=C[>n>n*Twilio/Rest/FlexApi/V1/FlexFlowOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * The `friendly_name` of the Flex Flow resources to read. * * @param string $friendlyName The `friendly_name` of the Flex Flow resources * to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.ReadFlexFlowOptions ' . $options . ']'; } } class CreateFlexFlowOptions extends Options { /** * @param string $contactIdentity The channel contact's Identity * @param bool $enabled Whether the new Flex Flow is enabled * @param string $integrationType The software that will handle inbound * messages. * @param string $integrationFlowSid The SID of the Studio Flow * @param string $integrationUrl The External Webhook URL * @param string $integrationWorkspaceSid The Workspace SID for a new Task * @param string $integrationWorkflowSid The Workflow SID for a new Task * @param string $integrationChannel The Task Channel for a new Task * @param int $integrationTimeout The Task timeout in seconds for a new Task * @param int $integrationPriority The Task priority of a new Task * @param bool $integrationCreationOnMessage Whether to create a Task when the * first message arrives * @param bool $longLived Reuse this chat channel for future interactions with * a contact * @param bool $janitorEnabled Remove active Proxy sessions if the * corresponding Task is deleted * @param int $integrationRetryCount The number of times to retry the Studio * Flow or webhook in case of failure */ public function __construct(string $contactIdentity = Values::NONE, bool $enabled = Values::NONE, string $integrationType = Values::NONE, string $integrationFlowSid = Values::NONE, string $integrationUrl = Values::NONE, string $integrationWorkspaceSid = Values::NONE, string $integrationWorkflowSid = Values::NONE, string $integrationChannel = Values::NONE, int $integrationTimeout = Values::NONE, int $integrationPriority = Values::NONE, bool $integrationCreationOnMessage = Values::NONE, bool $longLived = Values::NONE, bool $janitorEnabled = Values::NONE, int $integrationRetryCount = Values::NONE) { $this->options['contactIdentity'] = $contactIdentity; $this->options['enabled'] = $enabled; $this->options['integrationType'] = $integrationType; $this->options['integrationFlowSid'] = $integrationFlowSid; $this->options['integrationUrl'] = $integrationUrl; $this->options['integrationWorkspaceSid'] = $integrationWorkspaceSid; $this->options['integrationWorkflowSid'] = $integrationWorkflowSid; $this->options['integrationChannel'] = $integrationChannel; $this->options['integrationTimeout'] = $integrationTimeout; $this->options['integrationPriority'] = $integrationPriority; $this->options['integrationCreationOnMessage'] = $integrationCreationOnMessage; $this->options['longLived'] = $longLived; $this->options['janitorEnabled'] = $janitorEnabled; $this->options['integrationRetryCount'] = $integrationRetryCount; } /** * The channel contact's Identity. * * @param string $contactIdentity The channel contact's Identity * @return $this Fluent Builder */ public function setContactIdentity(string $contactIdentity): self { $this->options['contactIdentity'] = $contactIdentity; return $this; } /** * Whether the new Flex Flow is enabled. * * @param bool $enabled Whether the new Flex Flow is enabled * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * The software that will handle inbound messages. [Integration Type](https://www.twilio.com/docs/flex/developer/messaging/manage-flows#integration-types) can be: `studio`, `external`, or `task`. * * @param string $integrationType The software that will handle inbound * messages. * @return $this Fluent Builder */ public function setIntegrationType(string $integrationType): self { $this->options['integrationType'] = $integrationType; return $this; } /** * The SID of the Studio Flow. Required when `integrationType` is `studio`. * * @param string $integrationFlowSid The SID of the Studio Flow * @return $this Fluent Builder */ public function setIntegrationFlowSid(string $integrationFlowSid): self { $this->options['integrationFlowSid'] = $integrationFlowSid; return $this; } /** * The URL of the external webhook. Required when `integrationType` is `external`. * * @param string $integrationUrl The External Webhook URL * @return $this Fluent Builder */ public function setIntegrationUrl(string $integrationUrl): self { $this->options['integrationUrl'] = $integrationUrl; return $this; } /** * The Workspace SID for a new Task. Required when `integrationType` is `task`. * * @param string $integrationWorkspaceSid The Workspace SID for a new Task * @return $this Fluent Builder */ public function setIntegrationWorkspaceSid(string $integrationWorkspaceSid): self { $this->options['integrationWorkspaceSid'] = $integrationWorkspaceSid; return $this; } /** * The Workflow SID for a new Task. Required when `integrationType` is `task`. * * @param string $integrationWorkflowSid The Workflow SID for a new Task * @return $this Fluent Builder */ public function setIntegrationWorkflowSid(string $integrationWorkflowSid): self { $this->options['integrationWorkflowSid'] = $integrationWorkflowSid; return $this; } /** * The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`. * * @param string $integrationChannel The Task Channel for a new Task * @return $this Fluent Builder */ public function setIntegrationChannel(string $integrationChannel): self { $this->options['integrationChannel'] = $integrationChannel; return $this; } /** * The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise. * * @param int $integrationTimeout The Task timeout in seconds for a new Task * @return $this Fluent Builder */ public function setIntegrationTimeout(int $integrationTimeout): self { $this->options['integrationTimeout'] = $integrationTimeout; return $this; } /** * The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise. * * @param int $integrationPriority The Task priority of a new Task * @return $this Fluent Builder */ public function setIntegrationPriority(int $integrationPriority): self { $this->options['integrationPriority'] = $integrationPriority; return $this; } /** * In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging. * * @param bool $integrationCreationOnMessage Whether to create a Task when the * first message arrives * @return $this Fluent Builder */ public function setIntegrationCreationOnMessage(bool $integrationCreationOnMessage): self { $this->options['integrationCreationOnMessage'] = $integrationCreationOnMessage; return $this; } /** * When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. * * @param bool $longLived Reuse this chat channel for future interactions with * a contact * @return $this Fluent Builder */ public function setLongLived(bool $longLived): self { $this->options['longLived'] = $longLived; return $this; } /** * When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. * * @param bool $janitorEnabled Remove active Proxy sessions if the * corresponding Task is deleted * @return $this Fluent Builder */ public function setJanitorEnabled(bool $janitorEnabled): self { $this->options['janitorEnabled'] = $janitorEnabled; return $this; } /** * The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise. * * @param int $integrationRetryCount The number of times to retry the Studio * Flow or webhook in case of failure * @return $this Fluent Builder */ public function setIntegrationRetryCount(int $integrationRetryCount): self { $this->options['integrationRetryCount'] = $integrationRetryCount; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.CreateFlexFlowOptions ' . $options . ']'; } } class UpdateFlexFlowOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $chatServiceSid The SID of the chat service * @param string $channelType The channel type * @param string $contactIdentity The channel contact's Identity * @param bool $enabled Whether the new Flex Flow is enabled * @param string $integrationType The software that will handle inbound * messages. * @param string $integrationFlowSid The SID of the Studio Flow * @param string $integrationUrl The External Webhook URL * @param string $integrationWorkspaceSid The Workspace SID for a new Task * @param string $integrationWorkflowSid The Workflow SID for a new Task * @param string $integrationChannel The Task Channel for a new Task * @param int $integrationTimeout The Task timeout in seconds for a new Task * @param int $integrationPriority The Task priority of a new Task * @param bool $integrationCreationOnMessage Whether to create a Task when the * first message arrives * @param bool $longLived Reuse this chat channel for future interactions with * a contact * @param bool $janitorEnabled Remove active Proxy sessions if the * corresponding Task is deleted * @param int $integrationRetryCount The number of times to retry the Studio * Flow or webhook in case of failure */ public function __construct(string $friendlyName = Values::NONE, string $chatServiceSid = Values::NONE, string $channelType = Values::NONE, string $contactIdentity = Values::NONE, bool $enabled = Values::NONE, string $integrationType = Values::NONE, string $integrationFlowSid = Values::NONE, string $integrationUrl = Values::NONE, string $integrationWorkspaceSid = Values::NONE, string $integrationWorkflowSid = Values::NONE, string $integrationChannel = Values::NONE, int $integrationTimeout = Values::NONE, int $integrationPriority = Values::NONE, bool $integrationCreationOnMessage = Values::NONE, bool $longLived = Values::NONE, bool $janitorEnabled = Values::NONE, int $integrationRetryCount = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['chatServiceSid'] = $chatServiceSid; $this->options['channelType'] = $channelType; $this->options['contactIdentity'] = $contactIdentity; $this->options['enabled'] = $enabled; $this->options['integrationType'] = $integrationType; $this->options['integrationFlowSid'] = $integrationFlowSid; $this->options['integrationUrl'] = $integrationUrl; $this->options['integrationWorkspaceSid'] = $integrationWorkspaceSid; $this->options['integrationWorkflowSid'] = $integrationWorkflowSid; $this->options['integrationChannel'] = $integrationChannel; $this->options['integrationTimeout'] = $integrationTimeout; $this->options['integrationPriority'] = $integrationPriority; $this->options['integrationCreationOnMessage'] = $integrationCreationOnMessage; $this->options['longLived'] = $longLived; $this->options['janitorEnabled'] = $janitorEnabled; $this->options['integrationRetryCount'] = $integrationRetryCount; } /** * A descriptive string that you create to describe the Flex Flow resource. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the chat service. * * @param string $chatServiceSid The SID of the chat service * @return $this Fluent Builder */ public function setChatServiceSid(string $chatServiceSid): self { $this->options['chatServiceSid'] = $chatServiceSid; return $this; } /** * The channel type. One of `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. By default, Studio’s Send to Flex widget passes it on to the Task attributes for Tasks created based on this Flex Flow. The Task attributes will be used by the Flex UI to render the respective Task as appropriate (applying channel-specific design and length limits). If `channelType` is `facebook`, `whatsapp` or `line`, the Send to Flex widget should set the Task Channel to Programmable Chat. * * @param string $channelType The channel type * @return $this Fluent Builder */ public function setChannelType(string $channelType): self { $this->options['channelType'] = $channelType; return $this; } /** * The channel contact's Identity. * * @param string $contactIdentity The channel contact's Identity * @return $this Fluent Builder */ public function setContactIdentity(string $contactIdentity): self { $this->options['contactIdentity'] = $contactIdentity; return $this; } /** * Whether the new Flex Flow is enabled. * * @param bool $enabled Whether the new Flex Flow is enabled * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * The software that will handle inbound messages. [Integration Type](https://www.twilio.com/docs/flex/developer/messaging/manage-flows#integration-types) can be: `studio`, `external`, or `task`. * * @param string $integrationType The software that will handle inbound * messages. * @return $this Fluent Builder */ public function setIntegrationType(string $integrationType): self { $this->options['integrationType'] = $integrationType; return $this; } /** * The SID of the Studio Flow. Required when `integrationType` is `studio`. * * @param string $integrationFlowSid The SID of the Studio Flow * @return $this Fluent Builder */ public function setIntegrationFlowSid(string $integrationFlowSid): self { $this->options['integrationFlowSid'] = $integrationFlowSid; return $this; } /** * The URL of the external webhook. Required when `integrationType` is `external`. * * @param string $integrationUrl The External Webhook URL * @return $this Fluent Builder */ public function setIntegrationUrl(string $integrationUrl): self { $this->options['integrationUrl'] = $integrationUrl; return $this; } /** * The Workspace SID for a new Task. Required when `integrationType` is `task`. * * @param string $integrationWorkspaceSid The Workspace SID for a new Task * @return $this Fluent Builder */ public function setIntegrationWorkspaceSid(string $integrationWorkspaceSid): self { $this->options['integrationWorkspaceSid'] = $integrationWorkspaceSid; return $this; } /** * The Workflow SID for a new Task. Required when `integrationType` is `task`. * * @param string $integrationWorkflowSid The Workflow SID for a new Task * @return $this Fluent Builder */ public function setIntegrationWorkflowSid(string $integrationWorkflowSid): self { $this->options['integrationWorkflowSid'] = $integrationWorkflowSid; return $this; } /** * The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`. * * @param string $integrationChannel The Task Channel for a new Task * @return $this Fluent Builder */ public function setIntegrationChannel(string $integrationChannel): self { $this->options['integrationChannel'] = $integrationChannel; return $this; } /** * The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise. * * @param int $integrationTimeout The Task timeout in seconds for a new Task * @return $this Fluent Builder */ public function setIntegrationTimeout(int $integrationTimeout): self { $this->options['integrationTimeout'] = $integrationTimeout; return $this; } /** * The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise. * * @param int $integrationPriority The Task priority of a new Task * @return $this Fluent Builder */ public function setIntegrationPriority(int $integrationPriority): self { $this->options['integrationPriority'] = $integrationPriority; return $this; } /** * In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging. * * @param bool $integrationCreationOnMessage Whether to create a Task when the * first message arrives * @return $this Fluent Builder */ public function setIntegrationCreationOnMessage(bool $integrationCreationOnMessage): self { $this->options['integrationCreationOnMessage'] = $integrationCreationOnMessage; return $this; } /** * When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. * * @param bool $longLived Reuse this chat channel for future interactions with * a contact * @return $this Fluent Builder */ public function setLongLived(bool $longLived): self { $this->options['longLived'] = $longLived; return $this; } /** * When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. * * @param bool $janitorEnabled Remove active Proxy sessions if the * corresponding Task is deleted * @return $this Fluent Builder */ public function setJanitorEnabled(bool $janitorEnabled): self { $this->options['janitorEnabled'] = $janitorEnabled; return $this; } /** * The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise. * * @param int $integrationRetryCount The number of times to retry the Studio * Flow or webhook in case of failure * @return $this Fluent Builder */ public function setIntegrationRetryCount(int $integrationRetryCount): self { $this->options['integrationRetryCount'] = $integrationRetryCount; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.UpdateFlexFlowOptions ' . $options . ']'; } }PKt[,sh}}/Twilio/Rest/FlexApi/V1/InsightsSegmentsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InsightsSegmentsInstance \Twilio\Rest\FlexApi\V1\InsightsSegmentsInstance */ public function buildInstance(array $payload): InsightsSegmentsInstance { return new InsightsSegmentsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsSegmentsPage]'; } }PKt[֎@Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.phpnu[options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.CreateInsightsQuestionnairesQuestionOptions ' . $options . ']'; } } class UpdateInsightsQuestionnairesQuestionOptions extends Options { /** * @param string $categoryId Category ID * @param string $question The question. * @param string $description The question description. * @param string $answerSetId The answer_set for question. * @param string $token The Token HTTP request header */ public function __construct(string $categoryId = Values::NONE, string $question = Values::NONE, string $description = Values::NONE, string $answerSetId = Values::NONE, string $token = Values::NONE) { $this->options['categoryId'] = $categoryId; $this->options['question'] = $question; $this->options['description'] = $description; $this->options['answerSetId'] = $answerSetId; $this->options['token'] = $token; } /** * The ID of the category * * @param string $categoryId Category ID * @return $this Fluent Builder */ public function setCategoryId(string $categoryId): self { $this->options['categoryId'] = $categoryId; return $this; } /** * The question. * * @param string $question The question. * @return $this Fluent Builder */ public function setQuestion(string $question): self { $this->options['question'] = $question; return $this; } /** * The description for the question. * * @param string $description The question description. * @return $this Fluent Builder */ public function setDescription(string $description): self { $this->options['description'] = $description; return $this; } /** * The answer_set for the question. * * @param string $answerSetId The answer_set for question. * @return $this Fluent Builder */ public function setAnswerSetId(string $answerSetId): self { $this->options['answerSetId'] = $answerSetId; return $this; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.UpdateInsightsQuestionnairesQuestionOptions ' . $options . ']'; } } class ReadInsightsQuestionnairesQuestionOptions extends Options { /** * @param string[] $categoryId List of category Ids * @param string $token The Token HTTP request header */ public function __construct(array $categoryId = Values::ARRAY_NONE, string $token = Values::NONE) { $this->options['categoryId'] = $categoryId; $this->options['token'] = $token; } /** * The list of category IDs * * @param string[] $categoryId List of category Ids * @return $this Fluent Builder */ public function setCategoryId(array $categoryId): self { $this->options['categoryId'] = $categoryId; return $this; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.ReadInsightsQuestionnairesQuestionOptions ' . $options . ']'; } } class DeleteInsightsQuestionnairesQuestionOptions extends Options { /** * @param string $token The Token HTTP request header */ public function __construct(string $token = Values::NONE) { $this->options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.DeleteInsightsQuestionnairesQuestionOptions ' . $options . ']'; } }PKt[)|v v *Twilio/Rest/FlexApi/V1/AssessmentsList.phpnu[solution = []; $this->uri = '/Insights/QM/Assessments'; } /** * Create the AssessmentsInstance * * @param string $categoryId Category Id * @param string $categoryName Category name * @param string $segmentId Segment Id * @param string $userName User Name * @param string $userEmail User Email * @param string $agentId AgentID * @param string $offset offset. * @param string $metricId Question Id * @param string $metricName Question name * @param string $answerText Answer text * @param string $answerId Answer Id * @param string $questionnaireId Questionnaire Id * @param array|Options $options Optional Arguments * @return AssessmentsInstance Created AssessmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $categoryId, string $categoryName, string $segmentId, string $userName, string $userEmail, string $agentId, string $offset, string $metricId, string $metricName, string $answerText, string $answerId, string $questionnaireId, array $options = []): AssessmentsInstance { $options = new Values($options); $data = Values::of([ 'CategoryId' => $categoryId, 'CategoryName' => $categoryName, 'SegmentId' => $segmentId, 'UserName' => $userName, 'UserEmail' => $userEmail, 'AgentId' => $agentId, 'Offset' => $offset, 'MetricId' => $metricId, 'MetricName' => $metricName, 'AnswerText' => $answerText, 'AnswerId' => $answerId, 'QuestionnaireId' => $questionnaireId, ]); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new AssessmentsInstance($this->version, $payload); } /** * Constructs a AssessmentsContext * * @param string $assessmentId Assessment Id */ public function getContext(string $assessmentId): AssessmentsContext { return new AssessmentsContext($this->version, $assessmentId); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.AssessmentsList]'; } }PKt[3Twilio/Rest/FlexApi/V1/InsightsSegmentsInstance.phpnu[properties = [ 'segmentId' => Values::array_get($payload, 'segment_id'), 'externalId' => Values::array_get($payload, 'external_id'), 'queue' => Values::array_get($payload, 'queue'), 'externalContact' => Values::array_get($payload, 'external_contact'), 'externalSegmentLinkId' => Values::array_get($payload, 'external_segment_link_id'), 'date' => Values::array_get($payload, 'date'), 'accountId' => Values::array_get($payload, 'account_id'), 'externalSegmentLink' => Values::array_get($payload, 'external_segment_link'), 'agentId' => Values::array_get($payload, 'agent_id'), 'agentPhone' => Values::array_get($payload, 'agent_phone'), 'agentName' => Values::array_get($payload, 'agent_name'), 'agentTeamName' => Values::array_get($payload, 'agent_team_name'), 'agentTeamNameInHierarchy' => Values::array_get($payload, 'agent_team_name_in_hierarchy'), 'agentLink' => Values::array_get($payload, 'agent_link'), 'customerPhone' => Values::array_get($payload, 'customer_phone'), 'customerName' => Values::array_get($payload, 'customer_name'), 'customerLink' => Values::array_get($payload, 'customer_link'), 'segmentRecordingOffset' => Values::array_get($payload, 'segment_recording_offset'), 'media' => Values::array_get($payload, 'media'), 'assessmentType' => Values::array_get($payload, 'assessment_type'), 'assessmentPercentage' => Values::array_get($payload, 'assessment_percentage'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['segmentId' => $segmentId ?: $this->properties['segmentId'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InsightsSegmentsContext Context for this InsightsSegmentsInstance */ protected function proxy(): InsightsSegmentsContext { if (!$this->context) { $this->context = new InsightsSegmentsContext($this->version, $this->solution['segmentId']); } return $this->context; } /** * Fetch the InsightsSegmentsInstance * * @param array|Options $options Optional Arguments * @return InsightsSegmentsInstance Fetched InsightsSegmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): InsightsSegmentsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsSegmentsInstance ' . \implode(' ', $context) . ']'; } }PKt[$&*1Twilio/Rest/FlexApi/V1/InsightsSessionOptions.phpnu[options['authorization'] = $authorization; } /** * The Authorization HTTP request header * * @param string $authorization The Authorization HTTP request header * @return $this Fluent Builder */ public function setAuthorization(string $authorization): self { $this->options['authorization'] = $authorization; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.CreateInsightsSessionOptions ' . $options . ']'; } }PKt[y2Twilio/Rest/FlexApi/V1/InsightsSegmentsContext.phpnu[solution = ['segmentId' => $segmentId, ]; $this->uri = '/Insights/Segments/' . \rawurlencode($segmentId) . ''; } /** * Fetch the InsightsSegmentsInstance * * @param array|Options $options Optional Arguments * @return InsightsSegmentsInstance Fetched InsightsSegmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): InsightsSegmentsInstance { $options = new Values($options); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->fetch('GET', $this->uri, [], [], $headers); return new InsightsSegmentsInstance($this->version, $payload, $this->solution['segmentId']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsSegmentsContext ' . \implode(' ', $context) . ']'; } }PKt[.0Twilio/Rest/FlexApi/V1/InsightsUserRolesPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InsightsUserRolesInstance \Twilio\Rest\FlexApi\V1\InsightsUserRolesInstance */ public function buildInstance(array $payload): InsightsUserRolesInstance { return new InsightsUserRolesInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsUserRolesPage]'; } }PKt[)$xx.Twilio/Rest/FlexApi/V1/InsightsSessionList.phpnu[solution = []; } /** * Constructs a InsightsSessionContext */ public function getContext(): InsightsSessionContext { return new InsightsSessionContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsSessionList]'; } }PKt[ll--)Twilio/Rest/FlexApi/V1/WebChannelList.phpnu[solution = []; $this->uri = '/WebChannels'; } /** * Streams WebChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WebChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WebChannelInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of WebChannelInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WebChannelPage Page of WebChannelInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WebChannelPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WebChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WebChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WebChannelPage Page of WebChannelInstance */ public function getPage(string $targetUrl): WebChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WebChannelPage($this->version, $response, $this->solution); } /** * Create the WebChannelInstance * * @param string $flexFlowSid The SID of the Flex Flow * @param string $identity The chat identity * @param string $customerFriendlyName The chat participant's friendly name * @param string $chatFriendlyName The chat channel's friendly name * @param array|Options $options Optional Arguments * @return WebChannelInstance Created WebChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $flexFlowSid, string $identity, string $customerFriendlyName, string $chatFriendlyName, array $options = []): WebChannelInstance { $options = new Values($options); $data = Values::of([ 'FlexFlowSid' => $flexFlowSid, 'Identity' => $identity, 'CustomerFriendlyName' => $customerFriendlyName, 'ChatFriendlyName' => $chatFriendlyName, 'ChatUniqueName' => $options['chatUniqueName'], 'PreEngagementData' => $options['preEngagementData'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WebChannelInstance($this->version, $payload); } /** * Constructs a WebChannelContext * * @param string $sid The SID of the WebChannel resource to fetch */ public function getContext(string $sid): WebChannelContext { return new WebChannelContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.WebChannelList]'; } }PKt[k!9Twilio/Rest/FlexApi/V1/InsightsQuestionnairesInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'id' => Values::array_get($payload, 'id'), 'name' => Values::array_get($payload, 'name'), 'description' => Values::array_get($payload, 'description'), 'active' => Values::array_get($payload, 'active'), 'questions' => Values::array_get($payload, 'questions'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['id' => $id ?: $this->properties['id'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InsightsQuestionnairesContext Context for this * InsightsQuestionnairesInstance */ protected function proxy(): InsightsQuestionnairesContext { if (!$this->context) { $this->context = new InsightsQuestionnairesContext($this->version, $this->solution['id']); } return $this->context; } /** * Update the InsightsQuestionnairesInstance * * @param bool $active Is questionnaire enabled ? * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesInstance Updated InsightsQuestionnairesInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $active, array $options = []): InsightsQuestionnairesInstance { return $this->proxy()->update($active, $options); } /** * Delete the InsightsQuestionnairesInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Fetch the InsightsQuestionnairesInstance * * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesInstance Fetched InsightsQuestionnairesInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): InsightsQuestionnairesInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsQuestionnairesInstance ' . \implode(' ', $context) . ']'; } }PKt[^!cc<Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsOptions.phpnu[options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.FetchInsightsSettingsAnswerSetsOptions ' . $options . ']'; } }PKt[@6Twilio/Rest/FlexApi/V1/InsightsSettingsCommentList.phpnu[solution = []; $this->uri = '/Insights/QM/Settings/CommentTags'; } /** * Fetch the InsightsSettingsCommentInstance * * @param array|Options $options Optional Arguments * @return InsightsSettingsCommentInstance Fetched * InsightsSettingsCommentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): InsightsSettingsCommentInstance { $options = new Values($options); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->fetch('GET', $this->uri, [], [], $headers); return new InsightsSettingsCommentInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsSettingsCommentList]'; } }PKt[*zX9Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsList.phpnu[solution = []; $this->uri = '/Insights/QM/Settings/AnswerSets'; } /** * Fetch the InsightsSettingsAnswerSetsInstance * * @param array|Options $options Optional Arguments * @return InsightsSettingsAnswerSetsInstance Fetched * InsightsSettingsAnswerSetsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): InsightsSettingsAnswerSetsInstance { $options = new Values($options); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->fetch('GET', $this->uri, [], [], $headers); return new InsightsSettingsAnswerSetsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsSettingsAnswerSetsList]'; } }PKt[]XXATwilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'questionId' => Values::array_get($payload, 'question_id'), 'question' => Values::array_get($payload, 'question'), 'description' => Values::array_get($payload, 'description'), 'category' => Values::array_get($payload, 'category'), 'answerSetId' => Values::array_get($payload, 'answer_set_id'), 'allowNa' => Values::array_get($payload, 'allow_na'), 'usage' => Values::array_get($payload, 'usage'), 'answerSet' => Values::array_get($payload, 'answer_set'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['questionId' => $questionId ?: $this->properties['questionId'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InsightsQuestionnairesQuestionContext Context for this * InsightsQuestionnairesQuestionInstance */ protected function proxy(): InsightsQuestionnairesQuestionContext { if (!$this->context) { $this->context = new InsightsQuestionnairesQuestionContext( $this->version, $this->solution['questionId'] ); } return $this->context; } /** * Update the InsightsQuestionnairesQuestionInstance * * @param bool $allowNa Flag to enable NA for answer. * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesQuestionInstance Updated * InsightsQuestionnairesQuestionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $allowNa, array $options = []): InsightsQuestionnairesQuestionInstance { return $this->proxy()->update($allowNa, $options); } /** * Delete the InsightsQuestionnairesQuestionInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsQuestionnairesQuestionInstance ' . \implode(' ', $context) . ']'; } }PKt[C@  *Twilio/Rest/FlexApi/V1/FlexFlowContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/FlexFlows/' . \rawurlencode($sid) . ''; } /** * Fetch the FlexFlowInstance * * @return FlexFlowInstance Fetched FlexFlowInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FlexFlowInstance { $payload = $this->version->fetch('GET', $this->uri); return new FlexFlowInstance($this->version, $payload, $this->solution['sid']); } /** * Update the FlexFlowInstance * * @param array|Options $options Optional Arguments * @return FlexFlowInstance Updated FlexFlowInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FlexFlowInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'ChatServiceSid' => $options['chatServiceSid'], 'ChannelType' => $options['channelType'], 'ContactIdentity' => $options['contactIdentity'], 'Enabled' => Serialize::booleanToString($options['enabled']), 'IntegrationType' => $options['integrationType'], 'Integration.FlowSid' => $options['integrationFlowSid'], 'Integration.Url' => $options['integrationUrl'], 'Integration.WorkspaceSid' => $options['integrationWorkspaceSid'], 'Integration.WorkflowSid' => $options['integrationWorkflowSid'], 'Integration.Channel' => $options['integrationChannel'], 'Integration.Timeout' => $options['integrationTimeout'], 'Integration.Priority' => $options['integrationPriority'], 'Integration.CreationOnMessage' => Serialize::booleanToString($options['integrationCreationOnMessage']), 'LongLived' => Serialize::booleanToString($options['longLived']), 'JanitorEnabled' => Serialize::booleanToString($options['janitorEnabled']), 'Integration.RetryCount' => $options['integrationRetryCount'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FlexFlowInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the FlexFlowInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.FlexFlowContext ' . \implode(' ', $context) . ']'; } }PKt[=Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InsightsQuestionnairesCategoryInstance \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesCategoryInstance */ public function buildInstance(array $payload): InsightsQuestionnairesCategoryInstance { return new InsightsQuestionnairesCategoryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsQuestionnairesCategoryPage]'; } }PKt[cGB -Twilio/Rest/FlexApi/V1/InteractionContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Interactions/' . \rawurlencode($sid) . ''; } /** * Fetch the InteractionInstance * * @return InteractionInstance Fetched InteractionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InteractionInstance { $payload = $this->version->fetch('GET', $this->uri); return new InteractionInstance($this->version, $payload, $this->solution['sid']); } /** * Access the channels */ protected function getChannels(): InteractionChannelList { if (!$this->_channels) { $this->_channels = new InteractionChannelList($this->version, $this->solution['sid']); } return $this->_channels; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InteractionContext ' . \implode(' ', $context) . ']'; } }PKt[?,o o -Twilio/Rest/FlexApi/V1/AssessmentsOptions.phpnu[options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.CreateAssessmentsOptions ' . $options . ']'; } } class UpdateAssessmentsOptions extends Options { /** * @param string $token The Token HTTP request header */ public function __construct(string $token = Values::NONE) { $this->options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.UpdateAssessmentsOptions ' . $options . ']'; } }PKt[C9I 2Twilio/Rest/FlexApi/V1/InsightsSegmentsOptions.phpnu[options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.FetchInsightsSegmentsOptions ' . $options . ']'; } } class ReadInsightsSegmentsOptions extends Options { /** * @param string[] $reservationId List of reservation Ids * @param string $token The Token HTTP request header */ public function __construct(array $reservationId = Values::ARRAY_NONE, string $token = Values::NONE) { $this->options['reservationId'] = $reservationId; $this->options['token'] = $token; } /** * The list of reservation Ids * * @param string[] $reservationId List of reservation Ids * @return $this Fluent Builder */ public function setReservationId(array $reservationId): self { $this->options['reservationId'] = $reservationId; return $this; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.ReadInsightsSegmentsOptions ' . $options . ']'; } }PKt[(8)S6Twilio/Rest/FlexApi/V1/InsightsSettingsCommentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InsightsSettingsCommentInstance \Twilio\Rest\FlexApi\V1\InsightsSettingsCommentInstance */ public function buildInstance(array $payload): InsightsSettingsCommentInstance { return new InsightsSettingsCommentInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsSettingsCommentPage]'; } }PKt[{{*Twilio/Rest/FlexApi/V1/ChannelInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'flexFlowSid' => Values::array_get($payload, 'flex_flow_sid'), 'sid' => Values::array_get($payload, 'sid'), 'userSid' => Values::array_get($payload, 'user_sid'), 'taskSid' => Values::array_get($payload, 'task_sid'), 'url' => Values::array_get($payload, 'url'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ChannelContext Context for this ChannelInstance */ protected function proxy(): ChannelContext { if (!$this->context) { $this->context = new ChannelContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ChannelInstance * * @return ChannelInstance Fetched ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChannelInstance { return $this->proxy()->fetch(); } /** * Delete the ChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.ChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[S ,Twilio/Rest/FlexApi/V1/WebChannelContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/WebChannels/' . \rawurlencode($sid) . ''; } /** * Fetch the WebChannelInstance * * @return WebChannelInstance Fetched WebChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new WebChannelInstance($this->version, $payload, $this->solution['sid']); } /** * Update the WebChannelInstance * * @param array|Options $options Optional Arguments * @return WebChannelInstance Updated WebChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebChannelInstance { $options = new Values($options); $data = Values::of([ 'ChatStatus' => $options['chatStatus'], 'PostEngagementData' => $options['postEngagementData'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WebChannelInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the WebChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.WebChannelContext ' . \implode(' ', $context) . ']'; } }PKt[)Twilio/Rest/FlexApi/V1/ChannelContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Channels/' . \rawurlencode($sid) . ''; } /** * Fetch the ChannelInstance * * @return ChannelInstance Fetched ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new ChannelInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.ChannelContext ' . \implode(' ', $context) . ']'; } }PKt[u,Twilio/Rest/FlexApi/V1/WebChannelOptions.phpnu[options['chatUniqueName'] = $chatUniqueName; $this->options['preEngagementData'] = $preEngagementData; } /** * The chat channel's unique name. * * @param string $chatUniqueName The chat channel's unique name * @return $this Fluent Builder */ public function setChatUniqueName(string $chatUniqueName): self { $this->options['chatUniqueName'] = $chatUniqueName; return $this; } /** * The pre-engagement data. * * @param string $preEngagementData The pre-engagement data * @return $this Fluent Builder */ public function setPreEngagementData(string $preEngagementData): self { $this->options['preEngagementData'] = $preEngagementData; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.CreateWebChannelOptions ' . $options . ']'; } } class UpdateWebChannelOptions extends Options { /** * @param string $chatStatus The chat status * @param string $postEngagementData The post-engagement data */ public function __construct(string $chatStatus = Values::NONE, string $postEngagementData = Values::NONE) { $this->options['chatStatus'] = $chatStatus; $this->options['postEngagementData'] = $postEngagementData; } /** * The chat status. Can only be `inactive`. * * @param string $chatStatus The chat status * @return $this Fluent Builder */ public function setChatStatus(string $chatStatus): self { $this->options['chatStatus'] = $chatStatus; return $this; } /** * The post-engagement data. * * @param string $postEngagementData The post-engagement data * @return $this Fluent Builder */ public function setPostEngagementData(string $postEngagementData): self { $this->options['postEngagementData'] = $postEngagementData; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.UpdateWebChannelOptions ' . $options . ']'; } }PKt[͚1VV3Twilio/Rest/FlexApi/V1/InsightsUserRolesContext.phpnu[solution = []; $this->uri = '/Insights/UserRoles'; } /** * Fetch the InsightsUserRolesInstance * * @param array|Options $options Optional Arguments * @return InsightsUserRolesInstance Fetched InsightsUserRolesInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): InsightsUserRolesInstance { $options = new Values($options); $headers = Values::of(['Authorization' => $options['authorization'], ]); $payload = $this->version->fetch('GET', $this->uri, [], [], $headers); return new InsightsUserRolesInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsUserRolesContext ' . \implode(' ', $context) . ']'; } }PKt[00-Twilio/Rest/FlexApi/V1/WebChannelInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'flexFlowSid' => Values::array_get($payload, 'flex_flow_sid'), 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WebChannelContext Context for this WebChannelInstance */ protected function proxy(): WebChannelContext { if (!$this->context) { $this->context = new WebChannelContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the WebChannelInstance * * @return WebChannelInstance Fetched WebChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebChannelInstance { return $this->proxy()->fetch(); } /** * Update the WebChannelInstance * * @param array|Options $options Optional Arguments * @return WebChannelInstance Updated WebChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebChannelInstance { return $this->proxy()->update($options); } /** * Delete the WebChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.WebChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[L)Twilio/Rest/FlexApi/V1/WebChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WebChannelInstance \Twilio\Rest\FlexApi\V1\WebChannelInstance */ public function buildInstance(array $payload): WebChannelInstance { return new WebChannelInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.WebChannelPage]'; } }PKt[J`ؤ/Twilio/Rest/FlexApi/V1/InsightsSegmentsList.phpnu[solution = []; $this->uri = '/Insights/Segments'; } /** * Streams InsightsSegmentsInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InsightsSegmentsInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InsightsSegmentsInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of InsightsSegmentsInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InsightsSegmentsPage Page of InsightsSegmentsInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InsightsSegmentsPage { $options = new Values($options); $params = Values::of([ 'ReservationId' => Serialize::map($options['reservationId'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $headers = Values::of(['Token' => $options['token'], ]); $response = $this->version->page('GET', $this->uri, $params, [], $headers); return new InsightsSegmentsPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InsightsSegmentsInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InsightsSegmentsPage Page of InsightsSegmentsInstance */ public function getPage(string $targetUrl): InsightsSegmentsPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InsightsSegmentsPage($this->version, $response, $this->solution); } /** * Constructs a InsightsSegmentsContext * * @param string $segmentId Unique segment Id */ public function getContext(string $segmentId): InsightsSegmentsContext { return new InsightsSegmentsContext($this->version, $segmentId); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsSegmentsList]'; } }PKt[X,=Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelList.phpnu[solution = ['interactionSid' => $interactionSid, ]; $this->uri = '/Interactions/' . \rawurlencode($interactionSid) . '/Channels'; } /** * Streams InteractionChannelInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InteractionChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InteractionChannelInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of InteractionChannelInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InteractionChannelPage Page of InteractionChannelInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InteractionChannelPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new InteractionChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InteractionChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InteractionChannelPage Page of InteractionChannelInstance */ public function getPage(string $targetUrl): InteractionChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InteractionChannelPage($this->version, $response, $this->solution); } /** * Constructs a InteractionChannelContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): InteractionChannelContext { return new InteractionChannelContext($this->version, $this->solution['interactionSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InteractionChannelList]'; } }PKt[E ҃VTwilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInviteList.phpnu[solution = ['interactionSid' => $interactionSid, 'channelSid' => $channelSid, ]; $this->uri = '/Interactions/' . \rawurlencode($interactionSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites'; } /** * Create the InteractionChannelInviteInstance * * @param array $routing The Interaction's routing logic * @return InteractionChannelInviteInstance Created * InteractionChannelInviteInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $routing): InteractionChannelInviteInstance { $data = Values::of(['Routing' => Serialize::jsonObject($routing), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new InteractionChannelInviteInstance( $this->version, $payload, $this->solution['interactionSid'], $this->solution['channelSid'] ); } /** * Streams InteractionChannelInviteInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InteractionChannelInviteInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InteractionChannelInviteInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of InteractionChannelInviteInstance records from the * API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InteractionChannelInvitePage Page of InteractionChannelInviteInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InteractionChannelInvitePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new InteractionChannelInvitePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InteractionChannelInviteInstance records from * the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InteractionChannelInvitePage Page of InteractionChannelInviteInstance */ public function getPage(string $targetUrl): InteractionChannelInvitePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InteractionChannelInvitePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InteractionChannelInviteList]'; } }PKt[R  ZTwilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInviteInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'interactionSid' => Values::array_get($payload, 'interaction_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'routing' => Values::array_get($payload, 'routing'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['interactionSid' => $interactionSid, 'channelSid' => $channelSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InteractionChannelInviteInstance]'; } }PKt[ VTwilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInvitePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InteractionChannelInviteInstance \Twilio\Rest\FlexApi\V1\Interaction\InteractionChannel\InteractionChannelInviteInstance */ public function buildInstance(array $payload): InteractionChannelInviteInstance { return new InteractionChannelInviteInstance( $this->version, $payload, $this->solution['interactionSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InteractionChannelInvitePage]'; } }PKt[<NN_Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'type' => Values::array_get($payload, 'type'), 'interactionSid' => Values::array_get($payload, 'interaction_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'interactionSid' => $interactionSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InteractionChannelParticipantContext Context for this * InteractionChannelParticipantInstance */ protected function proxy(): InteractionChannelParticipantContext { if (!$this->context) { $this->context = new InteractionChannelParticipantContext( $this->version, $this->solution['interactionSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the InteractionChannelParticipantInstance * * @param string $status The Participant's status. * @return InteractionChannelParticipantInstance Updated * InteractionChannelParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): InteractionChannelParticipantInstance { return $this->proxy()->update($status); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InteractionChannelParticipantInstance ' . \implode(' ', $context) . ']'; } }PKt[''[Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantList.phpnu[solution = ['interactionSid' => $interactionSid, 'channelSid' => $channelSid, ]; $this->uri = '/Interactions/' . \rawurlencode($interactionSid) . '/Channels/' . \rawurlencode($channelSid) . '/Participants'; } /** * Create the InteractionChannelParticipantInstance * * @param string $type Participant type. * @param array $mediaProperties JSON representing the Media Properties for the * new Participant. * @return InteractionChannelParticipantInstance Created * InteractionChannelParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, array $mediaProperties): InteractionChannelParticipantInstance { $data = Values::of(['Type' => $type, 'MediaProperties' => Serialize::jsonObject($mediaProperties), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new InteractionChannelParticipantInstance( $this->version, $payload, $this->solution['interactionSid'], $this->solution['channelSid'] ); } /** * Streams InteractionChannelParticipantInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InteractionChannelParticipantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InteractionChannelParticipantInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of InteractionChannelParticipantInstance records from * the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InteractionChannelParticipantPage Page of * InteractionChannelParticipantInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InteractionChannelParticipantPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new InteractionChannelParticipantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InteractionChannelParticipantInstance records * from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InteractionChannelParticipantPage Page of * InteractionChannelParticipantInstance */ public function getPage(string $targetUrl): InteractionChannelParticipantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InteractionChannelParticipantPage($this->version, $response, $this->solution); } /** * Constructs a InteractionChannelParticipantContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): InteractionChannelParticipantContext { return new InteractionChannelParticipantContext( $this->version, $this->solution['interactionSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InteractionChannelParticipantList]'; } }PKt[f[Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InteractionChannelParticipantInstance \Twilio\Rest\FlexApi\V1\Interaction\InteractionChannel\InteractionChannelParticipantInstance */ public function buildInstance(array $payload): InteractionChannelParticipantInstance { return new InteractionChannelParticipantInstance( $this->version, $payload, $this->solution['interactionSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InteractionChannelParticipantPage]'; } }PKt[YiŌB B ^Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantContext.phpnu[solution = ['interactionSid' => $interactionSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Interactions/' . \rawurlencode($interactionSid) . '/Channels/' . \rawurlencode($channelSid) . '/Participants/' . \rawurlencode($sid) . ''; } /** * Update the InteractionChannelParticipantInstance * * @param string $status The Participant's status. * @return InteractionChannelParticipantInstance Updated * InteractionChannelParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): InteractionChannelParticipantInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new InteractionChannelParticipantInstance( $this->version, $payload, $this->solution['interactionSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InteractionChannelParticipantContext ' . \implode(' ', $context) . ']'; } }PKt[V~].=Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InteractionChannelInstance \Twilio\Rest\FlexApi\V1\Interaction\InteractionChannelInstance */ public function buildInstance(array $payload): InteractionChannelInstance { return new InteractionChannelInstance($this->version, $payload, $this->solution['interactionSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InteractionChannelPage]'; } }PKt[\@Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelOptions.phpnu[options['routing'] = $routing; } /** * Optional. The state of associated tasks. If not specified, all tasks will be set to `wrapping`. * * @param array $routing Optional. The state of associated tasks. * @return $this Fluent Builder */ public function setRouting(array $routing): self { $this->options['routing'] = $routing; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.UpdateInteractionChannelOptions ' . $options . ']'; } }PKt[Wh)Akk@Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelContext.phpnu[solution = ['interactionSid' => $interactionSid, 'sid' => $sid, ]; $this->uri = '/Interactions/' . \rawurlencode($interactionSid) . '/Channels/' . \rawurlencode($sid) . ''; } /** * Fetch the InteractionChannelInstance * * @return InteractionChannelInstance Fetched InteractionChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InteractionChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new InteractionChannelInstance( $this->version, $payload, $this->solution['interactionSid'], $this->solution['sid'] ); } /** * Update the InteractionChannelInstance * * @param string $status Required. The Interaction channels's status * @param array|Options $options Optional Arguments * @return InteractionChannelInstance Updated InteractionChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): InteractionChannelInstance { $options = new Values($options); $data = Values::of(['Status' => $status, 'Routing' => Serialize::jsonObject($options['routing']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new InteractionChannelInstance( $this->version, $payload, $this->solution['interactionSid'], $this->solution['sid'] ); } /** * Access the invites */ protected function getInvites(): InteractionChannelInviteList { if (!$this->_invites) { $this->_invites = new InteractionChannelInviteList( $this->version, $this->solution['interactionSid'], $this->solution['sid'] ); } return $this->_invites; } /** * Access the participants */ protected function getParticipants(): InteractionChannelParticipantList { if (!$this->_participants) { $this->_participants = new InteractionChannelParticipantList( $this->version, $this->solution['interactionSid'], $this->solution['sid'] ); } return $this->_participants; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InteractionChannelContext ' . \implode(' ', $context) . ']'; } }PKt[eATwilio/Rest/FlexApi/V1/Interaction/InteractionChannelInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'interactionSid' => Values::array_get($payload, 'interaction_sid'), 'type' => Values::array_get($payload, 'type'), 'status' => Values::array_get($payload, 'status'), 'errorCode' => Values::array_get($payload, 'error_code'), 'errorMessage' => Values::array_get($payload, 'error_message'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['interactionSid' => $interactionSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InteractionChannelContext Context for this InteractionChannelInstance */ protected function proxy(): InteractionChannelContext { if (!$this->context) { $this->context = new InteractionChannelContext( $this->version, $this->solution['interactionSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the InteractionChannelInstance * * @return InteractionChannelInstance Fetched InteractionChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InteractionChannelInstance { return $this->proxy()->fetch(); } /** * Update the InteractionChannelInstance * * @param string $status Required. The Interaction channels's status * @param array|Options $options Optional Arguments * @return InteractionChannelInstance Updated InteractionChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): InteractionChannelInstance { return $this->proxy()->update($status, $options); } /** * Access the invites */ protected function getInvites(): InteractionChannelInviteList { return $this->proxy()->invites; } /** * Access the participants */ protected function getParticipants(): InteractionChannelParticipantList { return $this->proxy()->participants; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InteractionChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[=QQ9Twilio/Rest/FlexApi/V1/InsightsSettingsCommentOptions.phpnu[options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.FetchInsightsSettingsCommentOptions ' . $options . ']'; } }PKt[TU-Twilio/Rest/FlexApi/V1/AssessmentsContext.phpnu[solution = ['assessmentId' => $assessmentId, ]; $this->uri = '/Insights/QM/Assessments/' . \rawurlencode($assessmentId) . ''; } /** * Update the AssessmentsInstance * * @param string $offset offset * @param string $answerText Answer text * @param string $answerId Answer Id * @param array|Options $options Optional Arguments * @return AssessmentsInstance Updated AssessmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $offset, string $answerText, string $answerId, array $options = []): AssessmentsInstance { $options = new Values($options); $data = Values::of(['Offset' => $offset, 'AnswerText' => $answerText, 'AnswerId' => $answerId, ]); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new AssessmentsInstance($this->version, $payload, $this->solution['assessmentId']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.AssessmentsContext ' . \implode(' ', $context) . ']'; } }PKt[?G̪<Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentOptions.phpnu[options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.CreateInsightsAssessmentsCommentOptions ' . $options . ']'; } } class ReadInsightsAssessmentsCommentOptions extends Options { /** * @param string $segmentId Segment Id. * @param string $agentId Agent Id. * @param string $token The Token HTTP request header */ public function __construct(string $segmentId = Values::NONE, string $agentId = Values::NONE, string $token = Values::NONE) { $this->options['segmentId'] = $segmentId; $this->options['agentId'] = $agentId; $this->options['token'] = $token; } /** * The id of the segment. * * @param string $segmentId Segment Id. * @return $this Fluent Builder */ public function setSegmentId(string $segmentId): self { $this->options['segmentId'] = $segmentId; return $this; } /** * The id of the agent. * * @param string $agentId Agent Id. * @return $this Fluent Builder */ public function setAgentId(string $agentId): self { $this->options['agentId'] = $agentId; return $this; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.ReadInsightsAssessmentsCommentOptions ' . $options . ']'; } }PKt[O@(@(8Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.phpnu[options['description'] = $description; $this->options['active'] = $active; $this->options['questionIds'] = $questionIds; $this->options['token'] = $token; } /** * The description of this questionnaire * * @param string $description The questionnaire description * @return $this Fluent Builder */ public function setDescription(string $description): self { $this->options['description'] = $description; return $this; } /** * The flag to enable or disable questionnaire * * @param bool $active Is questionnaire enabled ? * @return $this Fluent Builder */ public function setActive(bool $active): self { $this->options['active'] = $active; return $this; } /** * The list of questions ids under a questionnaire * * @param string[] $questionIds The questionnaire question ids list * @return $this Fluent Builder */ public function setQuestionIds(array $questionIds): self { $this->options['questionIds'] = $questionIds; return $this; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.CreateInsightsQuestionnairesOptions ' . $options . ']'; } } class ReadInsightsQuestionnairesOptions extends Options { /** * @param bool $includeInactive Include Inactive * @param string $token The Token HTTP request header */ public function __construct(bool $includeInactive = Values::NONE, string $token = Values::NONE) { $this->options['includeInactive'] = $includeInactive; $this->options['token'] = $token; } /** * Flag indicating whether to include inactive questionnaires or not * * @param bool $includeInactive Include Inactive * @return $this Fluent Builder */ public function setIncludeInactive(bool $includeInactive): self { $this->options['includeInactive'] = $includeInactive; return $this; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.ReadInsightsQuestionnairesOptions ' . $options . ']'; } } class UpdateInsightsQuestionnairesOptions extends Options { /** * @param string $name The questionnaire name * @param string $description The questionnaire description * @param string[] $questionIds The questionnaire question ids list * @param string $token The Token HTTP request header */ public function __construct(string $name = Values::NONE, string $description = Values::NONE, array $questionIds = Values::ARRAY_NONE, string $token = Values::NONE) { $this->options['name'] = $name; $this->options['description'] = $description; $this->options['questionIds'] = $questionIds; $this->options['token'] = $token; } /** * The name of this questionnaire * * @param string $name The questionnaire name * @return $this Fluent Builder */ public function setName(string $name): self { $this->options['name'] = $name; return $this; } /** * The description of this questionnaire * * @param string $description The questionnaire description * @return $this Fluent Builder */ public function setDescription(string $description): self { $this->options['description'] = $description; return $this; } /** * The list of questions ids under a questionnaire * * @param string[] $questionIds The questionnaire question ids list * @return $this Fluent Builder */ public function setQuestionIds(array $questionIds): self { $this->options['questionIds'] = $questionIds; return $this; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.UpdateInsightsQuestionnairesOptions ' . $options . ']'; } } class DeleteInsightsQuestionnairesOptions extends Options { /** * @param string $token The Token HTTP request header */ public function __construct(string $token = Values::NONE) { $this->options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.DeleteInsightsQuestionnairesOptions ' . $options . ']'; } } class FetchInsightsQuestionnairesOptions extends Options { /** * @param string $token The Token HTTP request header */ public function __construct(string $token = Values::NONE) { $this->options['token'] = $token; } /** * The Token HTTP request header * * @param string $token The Token HTTP request header * @return $this Fluent Builder */ public function setToken(string $token): self { $this->options['token'] = $token; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.FetchInsightsQuestionnairesOptions ' . $options . ']'; } }PKt[sL9Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InsightsAssessmentsCommentInstance \Twilio\Rest\FlexApi\V1\InsightsAssessmentsCommentInstance */ public function buildInstance(array $payload): InsightsAssessmentsCommentInstance { return new InsightsAssessmentsCommentInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsAssessmentsCommentPage]'; } }PKt[ 'Twilio/Rest/FlexApi/V1/FlexFlowPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FlexFlowInstance \Twilio\Rest\FlexApi\V1\FlexFlowInstance */ public function buildInstance(array $payload): FlexFlowInstance { return new FlexFlowInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.FlexFlowPage]'; } }PKt[@*Twilio/Rest/FlexApi/V1/InteractionList.phpnu[solution = []; $this->uri = '/Interactions'; } /** * Create the InteractionInstance * * @param array $channel The Interaction's channel * @param array $routing The Interaction's routing logic * @return InteractionInstance Created InteractionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $channel, array $routing): InteractionInstance { $data = Values::of([ 'Channel' => Serialize::jsonObject($channel), 'Routing' => Serialize::jsonObject($routing), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new InteractionInstance($this->version, $payload); } /** * Constructs a InteractionContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): InteractionContext { return new InteractionContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InteractionList]'; } }PKt[ڗX 2Twilio/Rest/FlexApi/V1/InsightsSessionInstance.phpnu[properties = [ 'workspaceId' => Values::array_get($payload, 'workspace_id'), 'sessionExpiry' => Values::array_get($payload, 'session_expiry'), 'sessionId' => Values::array_get($payload, 'session_id'), 'baseUrl' => Values::array_get($payload, 'base_url'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InsightsSessionContext Context for this InsightsSessionInstance */ protected function proxy(): InsightsSessionContext { if (!$this->context) { $this->context = new InsightsSessionContext($this->version); } return $this->context; } /** * Create the InsightsSessionInstance * * @param array|Options $options Optional Arguments * @return InsightsSessionInstance Created InsightsSessionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): InsightsSessionInstance { return $this->proxy()->create($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsSessionInstance ' . \implode(' ', $context) . ']'; } }PKt[V]=Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryList.phpnu[solution = []; $this->uri = '/Insights/QM/Categories'; } /** * Create the InsightsQuestionnairesCategoryInstance * * @param string $name The category name. * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesCategoryInstance Created * InsightsQuestionnairesCategoryInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $name, array $options = []): InsightsQuestionnairesCategoryInstance { $options = new Values($options); $data = Values::of(['Name' => $name, ]); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new InsightsQuestionnairesCategoryInstance($this->version, $payload); } /** * Streams InsightsQuestionnairesCategoryInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InsightsQuestionnairesCategoryInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InsightsQuestionnairesCategoryInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of InsightsQuestionnairesCategoryInstance records * from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InsightsQuestionnairesCategoryPage Page of * InsightsQuestionnairesCategoryInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InsightsQuestionnairesCategoryPage { $options = new Values($options); $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $headers = Values::of(['Token' => $options['token'], ]); $response = $this->version->page('GET', $this->uri, $params, [], $headers); return new InsightsQuestionnairesCategoryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InsightsQuestionnairesCategoryInstance records * from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InsightsQuestionnairesCategoryPage Page of * InsightsQuestionnairesCategoryInstance */ public function getPage(string $targetUrl): InsightsQuestionnairesCategoryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InsightsQuestionnairesCategoryPage($this->version, $response, $this->solution); } /** * Constructs a InsightsQuestionnairesCategoryContext * * @param string $categoryId Category ID to update */ public function getContext(string $categoryId): InsightsQuestionnairesCategoryContext { return new InsightsQuestionnairesCategoryContext($this->version, $categoryId); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsQuestionnairesCategoryList]'; } }PKt[L3Twilio/Rest/FlexApi/V1/InsightsUserRolesOptions.phpnu[options['authorization'] = $authorization; } /** * The Authorization HTTP request header * * @param string $authorization The Authorization HTTP request header * @return $this Fluent Builder */ public function setAuthorization(string $authorization): self { $this->options['authorization'] = $authorization; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.FetchInsightsUserRolesOptions ' . $options . ']'; } }PKt[yō& & @Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryContext.phpnu[solution = ['categoryId' => $categoryId, ]; $this->uri = '/Insights/QM/Categories/' . \rawurlencode($categoryId) . ''; } /** * Update the InsightsQuestionnairesCategoryInstance * * @param string $name The category name. * @param array|Options $options Optional Arguments * @return InsightsQuestionnairesCategoryInstance Updated * InsightsQuestionnairesCategoryInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $name, array $options = []): InsightsQuestionnairesCategoryInstance { $options = new Values($options); $data = Values::of(['Name' => $name, ]); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new InsightsQuestionnairesCategoryInstance( $this->version, $payload, $this->solution['categoryId'] ); } /** * Delete the InsightsQuestionnairesCategoryInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['Token' => $options['token'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FlexApi.V1.InsightsQuestionnairesCategoryContext ' . \implode(' ', $context) . ']'; } }PKt[,a}WW/Twilio/Rest/FlexApi/V1/ConfigurationOptions.phpnu[options['uiVersion'] = $uiVersion; } /** * The Pinned UI version of the Configuration resource to fetch. * * @param string $uiVersion The Pinned UI version of the Configuration resource * to fetch * @return $this Fluent Builder */ public function setUiVersion(string $uiVersion): self { $this->options['uiVersion'] = $uiVersion; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V1.FetchConfigurationOptions ' . $options . ']'; } }PKt[ 9Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentList.phpnu[solution = []; $this->uri = '/Insights/QM/Assessments/Comments'; } /** * Create the InsightsAssessmentsCommentInstance * * @param string $categoryId Category ID * @param string $categoryName Category name * @param string $comment The comment. * @param string $segmentId Segment Id. * @param string $userName The user name. * @param string $userEmail The user email id. * @param string $agentId Agent Id. * @param string $offset Offset. * @param array|Options $options Optional Arguments * @return InsightsAssessmentsCommentInstance Created * InsightsAssessmentsCommentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $categoryId, string $categoryName, string $comment, string $segmentId, string $userName, string $userEmail, string $agentId, string $offset, array $options = []): InsightsAssessmentsCommentInstance { $options = new Values($options); $data = Values::of([ 'CategoryId' => $categoryId, 'CategoryName' => $categoryName, 'Comment' => $comment, 'SegmentId' => $segmentId, 'UserName' => $userName, 'UserEmail' => $userEmail, 'AgentId' => $agentId, 'Offset' => $offset, ]); $headers = Values::of(['Token' => $options['token'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new InsightsAssessmentsCommentInstance($this->version, $payload); } /** * Streams InsightsAssessmentsCommentInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InsightsAssessmentsCommentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InsightsAssessmentsCommentInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of InsightsAssessmentsCommentInstance records from * the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InsightsAssessmentsCommentPage Page of * InsightsAssessmentsCommentInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InsightsAssessmentsCommentPage { $options = new Values($options); $params = Values::of([ 'SegmentId' => $options['segmentId'], 'AgentId' => $options['agentId'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $headers = Values::of(['Token' => $options['token'], ]); $response = $this->version->page('GET', $this->uri, $params, [], $headers); return new InsightsAssessmentsCommentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InsightsAssessmentsCommentInstance records from * the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InsightsAssessmentsCommentPage Page of * InsightsAssessmentsCommentInstance */ public function getPage(string $targetUrl): InsightsAssessmentsCommentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InsightsAssessmentsCommentPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InsightsAssessmentsCommentList]'; } }PKt[ؔ”*Twilio/Rest/FlexApi/V1/InteractionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InteractionInstance \Twilio\Rest\FlexApi\V1\InteractionInstance */ public function buildInstance(array $payload): InteractionInstance { return new InteractionInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1.InteractionPage]'; } }PKt[l!l!Twilio/Rest/FlexApi/V1.phpnu[version = 'v1'; } protected function getChannel(): ChannelList { if (!$this->_channel) { $this->_channel = new ChannelList($this); } return $this->_channel; } protected function getConfiguration(): ConfigurationList { if (!$this->_configuration) { $this->_configuration = new ConfigurationList($this); } return $this->_configuration; } protected function getFlexFlow(): FlexFlowList { if (!$this->_flexFlow) { $this->_flexFlow = new FlexFlowList($this); } return $this->_flexFlow; } protected function getAssessments(): AssessmentsList { if (!$this->_assessments) { $this->_assessments = new AssessmentsList($this); } return $this->_assessments; } protected function getInsightsAssessmentsComment(): InsightsAssessmentsCommentList { if (!$this->_insightsAssessmentsComment) { $this->_insightsAssessmentsComment = new InsightsAssessmentsCommentList($this); } return $this->_insightsAssessmentsComment; } protected function getInsightsQuestionnaires(): InsightsQuestionnairesList { if (!$this->_insightsQuestionnaires) { $this->_insightsQuestionnaires = new InsightsQuestionnairesList($this); } return $this->_insightsQuestionnaires; } protected function getInsightsQuestionnairesCategory(): InsightsQuestionnairesCategoryList { if (!$this->_insightsQuestionnairesCategory) { $this->_insightsQuestionnairesCategory = new InsightsQuestionnairesCategoryList($this); } return $this->_insightsQuestionnairesCategory; } protected function getInsightsQuestionnairesQuestion(): InsightsQuestionnairesQuestionList { if (!$this->_insightsQuestionnairesQuestion) { $this->_insightsQuestionnairesQuestion = new InsightsQuestionnairesQuestionList($this); } return $this->_insightsQuestionnairesQuestion; } protected function getInsightsSegments(): InsightsSegmentsList { if (!$this->_insightsSegments) { $this->_insightsSegments = new InsightsSegmentsList($this); } return $this->_insightsSegments; } protected function getInsightsSession(): InsightsSessionList { if (!$this->_insightsSession) { $this->_insightsSession = new InsightsSessionList($this); } return $this->_insightsSession; } protected function getInsightsSettingsAnswerSets(): InsightsSettingsAnswerSetsList { if (!$this->_insightsSettingsAnswerSets) { $this->_insightsSettingsAnswerSets = new InsightsSettingsAnswerSetsList($this); } return $this->_insightsSettingsAnswerSets; } protected function getInsightsSettingsComment(): InsightsSettingsCommentList { if (!$this->_insightsSettingsComment) { $this->_insightsSettingsComment = new InsightsSettingsCommentList($this); } return $this->_insightsSettingsComment; } protected function getInsightsUserRoles(): InsightsUserRolesList { if (!$this->_insightsUserRoles) { $this->_insightsUserRoles = new InsightsUserRolesList($this); } return $this->_insightsUserRoles; } protected function getInteraction(): InteractionList { if (!$this->_interaction) { $this->_interaction = new InteractionList($this); } return $this->_interaction; } protected function getWebChannel(): WebChannelList { if (!$this->_webChannel) { $this->_webChannel = new WebChannelList($this); } return $this->_webChannel; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V1]'; } }PKt[O*Twilio/Rest/FlexApi/V2/WebChannelsList.phpnu[solution = []; $this->uri = '/WebChats'; } /** * Create the WebChannelsInstance * * @param string $addressSid The SID of the Conversations Address * @param array|Options $options Optional Arguments * @return WebChannelsInstance Created WebChannelsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $addressSid, array $options = []): WebChannelsInstance { $options = new Values($options); $data = Values::of([ 'AddressSid' => $addressSid, 'ChatFriendlyName' => $options['chatFriendlyName'], 'CustomerFriendlyName' => $options['customerFriendlyName'], 'PreEngagementData' => $options['preEngagementData'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WebChannelsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V2.WebChannelsList]'; } }PKt[] -Twilio/Rest/FlexApi/V2/WebChannelsOptions.phpnu[options['chatFriendlyName'] = $chatFriendlyName; $this->options['customerFriendlyName'] = $customerFriendlyName; $this->options['preEngagementData'] = $preEngagementData; } /** * The Conversation's friendly name. See the [Conversation resource](https://www.twilio.com/docs/conversations/api/conversation-resource) for an example. * * @param string $chatFriendlyName The Conversation's friendly name * @return $this Fluent Builder */ public function setChatFriendlyName(string $chatFriendlyName): self { $this->options['chatFriendlyName'] = $chatFriendlyName; return $this; } /** * The Conversation participant's friendly name. See the [Conversation Participant Resource](https://www.twilio.com/docs/conversations/api/conversation-participant-resource) for an example. * * @param string $customerFriendlyName The Conversation participant's friendly * name * @return $this Fluent Builder */ public function setCustomerFriendlyName(string $customerFriendlyName): self { $this->options['customerFriendlyName'] = $customerFriendlyName; return $this; } /** * The pre-engagement data. * * @param string $preEngagementData The pre-engagement data * @return $this Fluent Builder */ public function setPreEngagementData(string $preEngagementData): self { $this->options['preEngagementData'] = $preEngagementData; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FlexApi.V2.CreateWebChannelsOptions ' . $options . ']'; } }PKt[\.Twilio/Rest/FlexApi/V2/WebChannelsInstance.phpnu[properties = [ 'conversationSid' => Values::array_get($payload, 'conversation_sid'), 'identity' => Values::array_get($payload, 'identity'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V2.WebChannelsInstance]'; } }PKt[v*Twilio/Rest/FlexApi/V2/WebChannelsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WebChannelsInstance \Twilio\Rest\FlexApi\V2\WebChannelsInstance */ public function buildInstance(array $payload): WebChannelsInstance { return new WebChannelsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V2.WebChannelsPage]'; } }PKt[UTwilio/Rest/FlexApi/V2.phpnu[version = 'v2'; } protected function getWebChannels(): WebChannelsList { if (!$this->_webChannels) { $this->_webChannels = new WebChannelsList($this); } return $this->_webChannels; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi.V2]'; } }PKt[T%Twilio/Rest/Oauth/V1/UserInfoList.phpnu[solution = []; } /** * Constructs a UserInfoContext */ public function getContext(): UserInfoContext { return new UserInfoContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.UserInfoList]'; } }PKt[Y ,Twilio/Rest/Oauth/V1/OpenidDiscoveryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return OpenidDiscoveryInstance \Twilio\Rest\Oauth\V1\OpenidDiscoveryInstance */ public function buildInstance(array $payload): OpenidDiscoveryInstance { return new OpenidDiscoveryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.OpenidDiscoveryPage]'; } }PKt[:a )Twilio/Rest/Oauth/V1/UserInfoInstance.phpnu[properties = [ 'userSid' => Values::array_get($payload, 'user_sid'), 'firstName' => Values::array_get($payload, 'first_name'), 'lastName' => Values::array_get($payload, 'last_name'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'email' => Values::array_get($payload, 'email'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserInfoContext Context for this UserInfoInstance */ protected function proxy(): UserInfoContext { if (!$this->context) { $this->context = new UserInfoContext($this->version); } return $this->context; } /** * Fetch the UserInfoInstance * * @return UserInfoInstance Fetched UserInfoInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInfoInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Oauth.V1.UserInfoInstance ' . \implode(' ', $context) . ']'; } }PKt[+Twilio/Rest/Oauth/V1/DeviceCodeInstance.phpnu[properties = [ 'deviceCode' => Values::array_get($payload, 'device_code'), 'userCode' => Values::array_get($payload, 'user_code'), 'verificationUri' => Values::array_get($payload, 'verification_uri'), 'verificationUriComplete' => Values::array_get($payload, 'verification_uri_complete'), 'expiresIn' => Values::array_get($payload, 'expires_in'), 'interval' => Values::array_get($payload, 'interval'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.DeviceCodeInstance]'; } }PKt['Twilio/Rest/Oauth/V1/DeviceCodePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DeviceCodeInstance \Twilio\Rest\Oauth\V1\DeviceCodeInstance */ public function buildInstance(array $payload): DeviceCodeInstance { return new DeviceCodeInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.DeviceCodePage]'; } }PKt[LT &Twilio/Rest/Oauth/V1/OauthInstance.phpnu[properties = [ 'keys' => Values::array_get($payload, 'keys'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return OauthContext Context for this OauthInstance */ protected function proxy(): OauthContext { if (!$this->context) { $this->context = new OauthContext($this->version); } return $this->context; } /** * Fetch the OauthInstance * * @return OauthInstance Fetched OauthInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): OauthInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Oauth.V1.OauthInstance ' . \implode(' ', $context) . ']'; } }PKt[bа--%Twilio/Rest/Oauth/V1/OauthContext.phpnu[solution = []; $this->uri = '/certs'; } /** * Fetch the OauthInstance * * @return OauthInstance Fetched OauthInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): OauthInstance { $payload = $this->version->fetch('GET', $this->uri); return new OauthInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Oauth.V1.OauthContext ' . \implode(' ', $context) . ']'; } }PKt[r2"Twilio/Rest/Oauth/V1/TokenList.phpnu[solution = []; $this->uri = '/token'; } /** * Create the TokenInstance * * @param string $grantType A way of representing resource owner's to obtain * access token * @param string $clientSid A string that uniquely identifies this oauth app * @param array|Options $options Optional Arguments * @return TokenInstance Created TokenInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $grantType, string $clientSid, array $options = []): TokenInstance { $options = new Values($options); $data = Values::of([ 'GrantType' => $grantType, 'ClientSid' => $clientSid, 'ClientSecret' => $options['clientSecret'], 'Code' => $options['code'], 'CodeVerifier' => $options['codeVerifier'], 'DeviceCode' => $options['deviceCode'], 'RefreshToken' => $options['refreshToken'], 'DeviceId' => $options['deviceId'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TokenInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.TokenList]'; } }PKt[uF%Twilio/Rest/Oauth/V1/TokenOptions.phpnu[options['clientSecret'] = $clientSecret; $this->options['code'] = $code; $this->options['codeVerifier'] = $codeVerifier; $this->options['deviceCode'] = $deviceCode; $this->options['refreshToken'] = $refreshToken; $this->options['deviceId'] = $deviceId; } /** * The credential for confidential OAuth App. * * @param string $clientSecret The credential for confidential OAuth App * @return $this Fluent Builder */ public function setClientSecret(string $clientSecret): self { $this->options['clientSecret'] = $clientSecret; return $this; } /** * JWT token related to the authorization code grant type. * * @param string $code Jwt token * @return $this Fluent Builder */ public function setCode(string $code): self { $this->options['code'] = $code; return $this; } /** * A code which is generation cryptographically. * * @param string $codeVerifier The cryptographically generated code * @return $this Fluent Builder */ public function setCodeVerifier(string $codeVerifier): self { $this->options['codeVerifier'] = $codeVerifier; return $this; } /** * JWT token related to the device code grant type. * * @param string $deviceCode Jwt token * @return $this Fluent Builder */ public function setDeviceCode(string $deviceCode): self { $this->options['deviceCode'] = $deviceCode; return $this; } /** * JWT token related to the refresh token grant type. * * @param string $refreshToken Jwt token * @return $this Fluent Builder */ public function setRefreshToken(string $refreshToken): self { $this->options['refreshToken'] = $refreshToken; return $this; } /** * The Id of the device associated with the token (refresh token). * * @param string $deviceId An Id of device * @return $this Fluent Builder */ public function setDeviceId(string $deviceId): self { $this->options['deviceId'] = $deviceId; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Oauth.V1.CreateTokenOptions ' . $options . ']'; } }PKt[-ejj"Twilio/Rest/Oauth/V1/TokenPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TokenInstance \Twilio\Rest\Oauth\V1\TokenInstance */ public function buildInstance(array $payload): TokenInstance { return new TokenInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.TokenPage]'; } }PKt[Ğu,Twilio/Rest/Oauth/V1/OpenidDiscoveryList.phpnu[solution = []; } /** * Constructs a OpenidDiscoveryContext */ public function getContext(): OpenidDiscoveryContext { return new OpenidDiscoveryContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.OpenidDiscoveryList]'; } }PKt[HH(Twilio/Rest/Oauth/V1/UserInfoContext.phpnu[solution = []; $this->uri = '/userinfo'; } /** * Fetch the UserInfoInstance * * @return UserInfoInstance Fetched UserInfoInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInfoInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserInfoInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Oauth.V1.UserInfoContext ' . \implode(' ', $context) . ']'; } }PKt[~6*Twilio/Rest/Oauth/V1/DeviceCodeOptions.phpnu[options['audiences'] = $audiences; } /** * An array of intended audiences for token requests * * @param string[] $audiences An array of intended audiences * @return $this Fluent Builder */ public function setAudiences(array $audiences): self { $this->options['audiences'] = $audiences; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Oauth.V1.CreateDeviceCodeOptions ' . $options . ']'; } }PKt[&'Twilio/Rest/Oauth/V1/DeviceCodeList.phpnu[solution = []; $this->uri = '/device/code'; } /** * Create the DeviceCodeInstance * * @param string $clientSid A string that uniquely identifies this oauth app * @param string[] $scopes An Array of scopes * @param array|Options $options Optional Arguments * @return DeviceCodeInstance Created DeviceCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $clientSid, array $scopes, array $options = []): DeviceCodeInstance { $options = new Values($options); $data = Values::of([ 'ClientSid' => $clientSid, 'Scopes' => Serialize::map($scopes, function($e) { return $e; }), 'Audiences' => Serialize::map($options['audiences'], function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new DeviceCodeInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.DeviceCodeList]'; } }PKt[ƌ/Twilio/Rest/Oauth/V1/OpenidDiscoveryContext.phpnu[solution = []; $this->uri = '/.well-known/openid-configuration'; } /** * Fetch the OpenidDiscoveryInstance * * @return OpenidDiscoveryInstance Fetched OpenidDiscoveryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): OpenidDiscoveryInstance { $payload = $this->version->fetch('GET', $this->uri); return new OpenidDiscoveryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Oauth.V1.OpenidDiscoveryContext ' . \implode(' ', $context) . ']'; } }PKt[jj"Twilio/Rest/Oauth/V1/OauthPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return OauthInstance \Twilio\Rest\Oauth\V1\OauthInstance */ public function buildInstance(array $payload): OauthInstance { return new OauthInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.OauthPage]'; } }PKt[_br~~&Twilio/Rest/Oauth/V1/TokenInstance.phpnu[properties = [ 'accessToken' => Values::array_get($payload, 'access_token'), 'refreshToken' => Values::array_get($payload, 'refresh_token'), 'idToken' => Values::array_get($payload, 'id_token'), 'refreshTokenExpiresAt' => Deserialize::dateTime(Values::array_get($payload, 'refresh_token_expires_at')), 'accessTokenExpiresAt' => Deserialize::dateTime(Values::array_get($payload, 'access_token_expires_at')), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.TokenInstance]'; } }PKt[ ||%Twilio/Rest/Oauth/V1/UserInfoPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserInfoInstance \Twilio\Rest\Oauth\V1\UserInfoInstance */ public function buildInstance(array $payload): UserInfoInstance { return new UserInfoInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.UserInfoPage]'; } }PKt[ ~mm"Twilio/Rest/Oauth/V1/OauthList.phpnu[solution = []; } /** * Constructs a OauthContext */ public function getContext(): OauthContext { return new OauthContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1.OauthList]'; } }PKt[~0Twilio/Rest/Oauth/V1/OpenidDiscoveryInstance.phpnu[properties = [ 'issuer' => Values::array_get($payload, 'issuer'), 'authorizationEndpoint' => Values::array_get($payload, 'authorization_endpoint'), 'deviceAuthorizationEndpoint' => Values::array_get($payload, 'device_authorization_endpoint'), 'tokenEndpoint' => Values::array_get($payload, 'token_endpoint'), 'userinfoEndpoint' => Values::array_get($payload, 'userinfo_endpoint'), 'revocationEndpoint' => Values::array_get($payload, 'revocation_endpoint'), 'jwkUri' => Values::array_get($payload, 'jwk_uri'), 'responseTypeSupported' => Values::array_get($payload, 'response_type_supported'), 'subjectTypeSupported' => Values::array_get($payload, 'subject_type_supported'), 'idTokenSigningAlgValuesSupported' => Values::array_get($payload, 'id_token_signing_alg_values_supported'), 'scopesSupported' => Values::array_get($payload, 'scopes_supported'), 'claimsSupported' => Values::array_get($payload, 'claims_supported'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return OpenidDiscoveryContext Context for this OpenidDiscoveryInstance */ protected function proxy(): OpenidDiscoveryContext { if (!$this->context) { $this->context = new OpenidDiscoveryContext($this->version); } return $this->context; } /** * Fetch the OpenidDiscoveryInstance * * @return OpenidDiscoveryInstance Fetched OpenidDiscoveryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): OpenidDiscoveryInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Oauth.V1.OpenidDiscoveryInstance ' . \implode(' ', $context) . ']'; } }PKt[gƬ Twilio/Rest/Oauth/V1.phpnu[version = 'v1'; } protected function getOauth(): OauthList { if (!$this->_oauth) { $this->_oauth = new OauthList($this); } return $this->_oauth; } protected function getDeviceCode(): DeviceCodeList { if (!$this->_deviceCode) { $this->_deviceCode = new DeviceCodeList($this); } return $this->_deviceCode; } protected function getOpenidDiscovery(): OpenidDiscoveryList { if (!$this->_openidDiscovery) { $this->_openidDiscovery = new OpenidDiscoveryList($this); } return $this->_openidDiscovery; } protected function getToken(): TokenList { if (!$this->_token) { $this->_token = new TokenList($this); } return $this->_token; } protected function getUserInfo(): UserInfoList { if (!$this->_userInfo) { $this->_userInfo = new UserInfoList($this); } return $this->_userInfo; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Oauth.V1]'; } }PKt[E6Fgg"Twilio/Rest/Studio/V1/FlowPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FlowInstance \Twilio\Rest\Studio\V1\FlowInstance */ public function buildInstance(array $payload): FlowInstance { return new FlowInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.FlowPage]'; } }PKt[8?CC&Twilio/Rest/Studio/V1/FlowInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'status' => Values::array_get($payload, 'status'), 'version' => Values::array_get($payload, 'version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FlowContext Context for this FlowInstance */ protected function proxy(): FlowContext { if (!$this->context) { $this->context = new FlowContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the FlowInstance * * @return FlowInstance Fetched FlowInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FlowInstance { return $this->proxy()->fetch(); } /** * Delete the FlowInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the engagements */ protected function getEngagements(): EngagementList { return $this->proxy()->engagements; } /** * Access the executions */ protected function getExecutions(): ExecutionList { return $this->proxy()->executions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.FlowInstance ' . \implode(' ', $context) . ']'; } }PKt[@;%Twilio/Rest/Studio/V1/FlowContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Flows/' . \rawurlencode($sid) . ''; } /** * Fetch the FlowInstance * * @return FlowInstance Fetched FlowInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FlowInstance { $payload = $this->version->fetch('GET', $this->uri); return new FlowInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the FlowInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the engagements */ protected function getEngagements(): EngagementList { if (!$this->_engagements) { $this->_engagements = new EngagementList($this->version, $this->solution['sid']); } return $this->_engagements; } /** * Access the executions */ protected function getExecutions(): ExecutionList { if (!$this->_executions) { $this->_executions = new ExecutionList($this->version, $this->solution['sid']); } return $this->_executions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.FlowContext ' . \implode(' ', $context) . ']'; } }PKt[ѐ"Twilio/Rest/Studio/V1/FlowList.phpnu[solution = []; $this->uri = '/Flows'; } /** * Streams FlowInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FlowInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FlowInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FlowInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FlowPage Page of FlowInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FlowPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FlowPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FlowInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FlowPage Page of FlowInstance */ public function getPage(string $targetUrl): FlowPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FlowPage($this->version, $response, $this->solution); } /** * Constructs a FlowContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): FlowContext { return new FlowContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.FlowList]'; } }PKt[. CTwilio/Rest/Studio/V1/Flow/Engagement/EngagementContextInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'context' => Values::array_get($payload, 'context'), 'engagementSid' => Values::array_get($payload, 'engagement_sid'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EngagementContextContext Context for this EngagementContextInstance */ protected function proxy(): EngagementContextContext { if (!$this->context) { $this->context = new EngagementContextContext( $this->version, $this->solution['flowSid'], $this->solution['engagementSid'] ); } return $this->context; } /** * Fetch the EngagementContextInstance * * @return EngagementContextInstance Fetched EngagementContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EngagementContextInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.EngagementContextInstance ' . \implode(' ', $context) . ']'; } }PKt[qq2Twilio/Rest/Studio/V1/Flow/Engagement/StepList.phpnu[solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements/' . \rawurlencode($engagementSid) . '/Steps'; } /** * Streams StepInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads StepInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return StepInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of StepInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return StepPage Page of StepInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): StepPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new StepPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of StepInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return StepPage Page of StepInstance */ public function getPage(string $targetUrl): StepPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new StepPage($this->version, $response, $this->solution); } /** * Constructs a StepContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): StepContext { return new StepContext( $this->version, $this->solution['flowSid'], $this->solution['engagementSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.StepList]'; } }PKt[?Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextList.phpnu[solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, ]; } /** * Constructs a EngagementContextContext */ public function getContext(): EngagementContextContext { return new EngagementContextContext( $this->version, $this->solution['flowSid'], $this->solution['engagementSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.EngagementContextList]'; } }PKt[H`||5Twilio/Rest/Studio/V1/Flow/Engagement/StepContext.phpnu[solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, 'sid' => $sid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements/' . \rawurlencode($engagementSid) . '/Steps/' . \rawurlencode($sid) . ''; } /** * Fetch the StepInstance * * @return StepInstance Fetched StepInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): StepInstance { $payload = $this->version->fetch('GET', $this->uri); return new StepInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['engagementSid'], $this->solution['sid'] ); } /** * Access the stepContext */ protected function getStepContext(): StepContextList { if (!$this->_stepContext) { $this->_stepContext = new StepContextList( $this->version, $this->solution['flowSid'], $this->solution['engagementSid'], $this->solution['sid'] ); } return $this->_stepContext; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.StepContext ' . \implode(' ', $context) . ']'; } }PKt[~YY6Twilio/Rest/Studio/V1/Flow/Engagement/StepInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'engagementSid' => Values::array_get($payload, 'engagement_sid'), 'name' => Values::array_get($payload, 'name'), 'context' => Values::array_get($payload, 'context'), 'transitionedFrom' => Values::array_get($payload, 'transitioned_from'), 'transitionedTo' => Values::array_get($payload, 'transitioned_to'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'flowSid' => $flowSid, 'engagementSid' => $engagementSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return StepContext Context for this StepInstance */ protected function proxy(): StepContext { if (!$this->context) { $this->context = new StepContext( $this->version, $this->solution['flowSid'], $this->solution['engagementSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the StepInstance * * @return StepInstance Fetched StepInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): StepInstance { return $this->proxy()->fetch(); } /** * Access the stepContext */ protected function getStepContext(): StepContextList { return $this->proxy()->stepContext; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.StepInstance ' . \implode(' ', $context) . ']'; } }PKt[w BTwilio/Rest/Studio/V1/Flow/Engagement/EngagementContextContext.phpnu[solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements/' . \rawurlencode($engagementSid) . '/Context'; } /** * Fetch the EngagementContextInstance * * @return EngagementContextInstance Fetched EngagementContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EngagementContextInstance { $payload = $this->version->fetch('GET', $this->uri); return new EngagementContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['engagementSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.EngagementContextContext ' . \implode(' ', $context) . ']'; } }PKt[ 2Twilio/Rest/Studio/V1/Flow/Engagement/StepPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return StepInstance \Twilio\Rest\Studio\V1\Flow\Engagement\StepInstance */ public function buildInstance(array $payload): StepInstance { return new StepInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['engagementSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.StepPage]'; } }PKt[[[>Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return StepContextInstance \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextInstance */ public function buildInstance(array $payload): StepContextInstance { return new StepContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['engagementSid'], $this->solution['stepSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.StepContextPage]'; } }PKt[ O!]]>Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextList.phpnu[solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, 'stepSid' => $stepSid, ]; } /** * Constructs a StepContextContext */ public function getContext(): StepContextContext { return new StepContextContext( $this->version, $this->solution['flowSid'], $this->solution['engagementSid'], $this->solution['stepSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.StepContextList]'; } }PKt[1NH8 BTwilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'context' => Values::array_get($payload, 'context'), 'engagementSid' => Values::array_get($payload, 'engagement_sid'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'stepSid' => Values::array_get($payload, 'step_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, 'stepSid' => $stepSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return StepContextContext Context for this StepContextInstance */ protected function proxy(): StepContextContext { if (!$this->context) { $this->context = new StepContextContext( $this->version, $this->solution['flowSid'], $this->solution['engagementSid'], $this->solution['stepSid'] ); } return $this->context; } /** * Fetch the StepContextInstance * * @return StepContextInstance Fetched StepContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): StepContextInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.StepContextInstance ' . \implode(' ', $context) . ']'; } }PKt[6@ATwilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextContext.phpnu[solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, 'stepSid' => $stepSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements/' . \rawurlencode($engagementSid) . '/Steps/' . \rawurlencode($stepSid) . '/Context'; } /** * Fetch the StepContextInstance * * @return StepContextInstance Fetched StepContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): StepContextInstance { $payload = $this->version->fetch('GET', $this->uri); return new StepContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['engagementSid'], $this->solution['stepSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.StepContextContext ' . \implode(' ', $context) . ']'; } }PKt[OZ|LMM?Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EngagementContextInstance \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextInstance */ public function buildInstance(array $payload): EngagementContextInstance { return new EngagementContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['engagementSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.EngagementContextPage]'; } }PKt[6Sl0Twilio/Rest/Studio/V1/Flow/EngagementContext.phpnu[solution = ['flowSid' => $flowSid, 'sid' => $sid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements/' . \rawurlencode($sid) . ''; } /** * Fetch the EngagementInstance * * @return EngagementInstance Fetched EngagementInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EngagementInstance { $payload = $this->version->fetch('GET', $this->uri); return new EngagementInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['sid'] ); } /** * Delete the EngagementInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the steps */ protected function getSteps(): StepList { if (!$this->_steps) { $this->_steps = new StepList($this->version, $this->solution['flowSid'], $this->solution['sid']); } return $this->_steps; } /** * Access the engagementContext */ protected function getEngagementContext(): EngagementContextList { if (!$this->_engagementContext) { $this->_engagementContext = new EngagementContextList( $this->version, $this->solution['flowSid'], $this->solution['sid'] ); } return $this->_engagementContext; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.EngagementContext ' . \implode(' ', $context) . ']'; } }PKt[ ה`-Twilio/Rest/Studio/V1/Flow/EngagementList.phpnu[solution = ['flowSid' => $flowSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements'; } /** * Streams EngagementInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EngagementInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EngagementInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of EngagementInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EngagementPage Page of EngagementInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EngagementPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EngagementPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EngagementInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EngagementPage Page of EngagementInstance */ public function getPage(string $targetUrl): EngagementPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EngagementPage($this->version, $response, $this->solution); } /** * Create the EngagementInstance * * @param string $to The Contact phone number to start a Studio Flow Engagement * @param string $from The Twilio phone number to send messages or initiate * calls from during the Flow Engagement * @param array|Options $options Optional Arguments * @return EngagementInstance Created EngagementInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $to, string $from, array $options = []): EngagementInstance { $options = new Values($options); $data = Values::of([ 'To' => $to, 'From' => $from, 'Parameters' => Serialize::jsonObject($options['parameters']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new EngagementInstance($this->version, $payload, $this->solution['flowSid']); } /** * Constructs a EngagementContext * * @param string $sid The SID of the Engagement resource to fetch */ public function getContext(string $sid): EngagementContext { return new EngagementContext($this->version, $this->solution['flowSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.EngagementList]'; } }PKt[_B>EE1Twilio/Rest/Studio/V1/Flow/EngagementInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'contactSid' => Values::array_get($payload, 'contact_sid'), 'contactChannelAddress' => Values::array_get($payload, 'contact_channel_address'), 'context' => Values::array_get($payload, 'context'), 'status' => Values::array_get($payload, 'status'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['flowSid' => $flowSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EngagementContext Context for this EngagementInstance */ protected function proxy(): EngagementContext { if (!$this->context) { $this->context = new EngagementContext( $this->version, $this->solution['flowSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the EngagementInstance * * @return EngagementInstance Fetched EngagementInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EngagementInstance { return $this->proxy()->fetch(); } /** * Delete the EngagementInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the steps */ protected function getSteps(): StepList { return $this->proxy()->steps; } /** * Access the engagementContext */ protected function getEngagementContext(): EngagementContextList { return $this->proxy()->engagementContext; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.EngagementInstance ' . \implode(' ', $context) . ']'; } }PKt[.[[/Twilio/Rest/Studio/V1/Flow/ExecutionOptions.phpnu[options['dateCreatedFrom'] = $dateCreatedFrom; $this->options['dateCreatedTo'] = $dateCreatedTo; } /** * Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. * * @param \DateTime $dateCreatedFrom Only show Executions that started on or * after this ISO 8601 date-time * @return $this Fluent Builder */ public function setDateCreatedFrom(\DateTime $dateCreatedFrom): self { $this->options['dateCreatedFrom'] = $dateCreatedFrom; return $this; } /** * Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. * * @param \DateTime $dateCreatedTo Only show Executions that started before * this ISO 8601 date-time * @return $this Fluent Builder */ public function setDateCreatedTo(\DateTime $dateCreatedTo): self { $this->options['dateCreatedTo'] = $dateCreatedTo; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Studio.V1.ReadExecutionOptions ' . $options . ']'; } } class CreateExecutionOptions extends Options { /** * @param array $parameters JSON data that will be added to the Flow's context */ public function __construct(array $parameters = Values::ARRAY_NONE) { $this->options['parameters'] = $parameters; } /** * JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={"name":"Zeke"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns "Zeke". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. * * @param array $parameters JSON data that will be added to the Flow's context * @return $this Fluent Builder */ public function setParameters(array $parameters): self { $this->options['parameters'] = $parameters; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Studio.V1.CreateExecutionOptions ' . $options . ']'; } }PKt[]X,Twilio/Rest/Studio/V1/Flow/ExecutionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExecutionInstance \Twilio\Rest\Studio\V1\Flow\ExecutionInstance */ public function buildInstance(array $payload): ExecutionInstance { return new ExecutionInstance($this->version, $payload, $this->solution['flowSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.ExecutionPage]'; } }PKt[瘞-Twilio/Rest/Studio/V1/Flow/EngagementPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EngagementInstance \Twilio\Rest\Studio\V1\Flow\EngagementInstance */ public function buildInstance(array $payload): EngagementInstance { return new EngagementInstance($this->version, $payload, $this->solution['flowSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.EngagementPage]'; } }PKt[{{/Twilio/Rest/Studio/V1/Flow/ExecutionContext.phpnu[solution = ['flowSid' => $flowSid, 'sid' => $sid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($sid) . ''; } /** * Fetch the ExecutionInstance * * @return ExecutionInstance Fetched ExecutionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionInstance { $payload = $this->version->fetch('GET', $this->uri); return new ExecutionInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['sid'] ); } /** * Delete the ExecutionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ExecutionInstance * * @param string $status The status of the Execution * @return ExecutionInstance Updated ExecutionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): ExecutionInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ExecutionInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['sid'] ); } /** * Access the steps */ protected function getSteps(): ExecutionStepList { if (!$this->_steps) { $this->_steps = new ExecutionStepList( $this->version, $this->solution['flowSid'], $this->solution['sid'] ); } return $this->_steps; } /** * Access the executionContext */ protected function getExecutionContext(): ExecutionContextList { if (!$this->_executionContext) { $this->_executionContext = new ExecutionContextList( $this->version, $this->solution['flowSid'], $this->solution['sid'] ); } return $this->_executionContext; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.ExecutionContext ' . \implode(' ', $context) . ']'; } }PKt[<0Twilio/Rest/Studio/V1/Flow/EngagementOptions.phpnu[options['parameters'] = $parameters; } /** * A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string. * * @param array $parameters A JSON string we will add to your flow's context * and that you can access as variables inside your * flow * @return $this Fluent Builder */ public function setParameters(array $parameters): self { $this->options['parameters'] = $parameters; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Studio.V1.CreateEngagementOptions ' . $options . ']'; } }PKt[dKI0Twilio/Rest/Studio/V1/Flow/ExecutionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'contactSid' => Values::array_get($payload, 'contact_sid'), 'contactChannelAddress' => Values::array_get($payload, 'contact_channel_address'), 'context' => Values::array_get($payload, 'context'), 'status' => Values::array_get($payload, 'status'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['flowSid' => $flowSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ExecutionContext Context for this ExecutionInstance */ protected function proxy(): ExecutionContext { if (!$this->context) { $this->context = new ExecutionContext( $this->version, $this->solution['flowSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ExecutionInstance * * @return ExecutionInstance Fetched ExecutionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionInstance { return $this->proxy()->fetch(); } /** * Delete the ExecutionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ExecutionInstance * * @param string $status The status of the Execution * @return ExecutionInstance Updated ExecutionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): ExecutionInstance { return $this->proxy()->update($status); } /** * Access the steps */ protected function getSteps(): ExecutionStepList { return $this->proxy()->steps; } /** * Access the executionContext */ protected function getExecutionContext(): ExecutionContextList { return $this->proxy()->executionContext; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.ExecutionInstance ' . \implode(' ', $context) . ']'; } }PKt[,IDD=Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExecutionContextInstance \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextInstance */ public function buildInstance(array $payload): ExecutionContextInstance { return new ExecutionContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.ExecutionContextPage]'; } }PKt[U ATwilio/Rest/Studio/V1/Flow/Execution/ExecutionContextInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'context' => Values::array_get($payload, 'context'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'executionSid' => Values::array_get($payload, 'execution_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ExecutionContextContext Context for this ExecutionContextInstance */ protected function proxy(): ExecutionContextContext { if (!$this->context) { $this->context = new ExecutionContextContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'] ); } return $this->context; } /** * Fetch the ExecutionContextInstance * * @return ExecutionContextInstance Fetched ExecutionContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionContextInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.ExecutionContextInstance ' . \implode(' ', $context) . ']'; } }PKt[9!$$@Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextContext.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Context'; } /** * Fetch the ExecutionContextInstance * * @return ExecutionContextInstance Fetched ExecutionContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionContextInstance { $payload = $this->version->fetch('GET', $this->uri); return new ExecutionContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.ExecutionContextContext ' . \implode(' ', $context) . ']'; } }PKt[8@>Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'executionSid' => Values::array_get($payload, 'execution_sid'), 'name' => Values::array_get($payload, 'name'), 'context' => Values::array_get($payload, 'context'), 'transitionedFrom' => Values::array_get($payload, 'transitioned_from'), 'transitionedTo' => Values::array_get($payload, 'transitioned_to'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'flowSid' => $flowSid, 'executionSid' => $executionSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ExecutionStepContext Context for this ExecutionStepInstance */ protected function proxy(): ExecutionStepContext { if (!$this->context) { $this->context = new ExecutionStepContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ExecutionStepInstance * * @return ExecutionStepInstance Fetched ExecutionStepInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionStepInstance { return $this->proxy()->fetch(); } /** * Access the stepContext */ protected function getStepContext(): ExecutionStepContextList { return $this->proxy()->stepContext; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.ExecutionStepInstance ' . \implode(' ', $context) . ']'; } }PKt[f~22:Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExecutionStepInstance \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepInstance */ public function buildInstance(array $payload): ExecutionStepInstance { return new ExecutionStepInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.ExecutionStepPage]'; } }PKt[=Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextList.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, ]; } /** * Constructs a ExecutionContextContext */ public function getContext(): ExecutionContextContext { return new ExecutionContextContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.ExecutionContextList]'; } }PKt[%f:Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepList.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Steps'; } /** * Streams ExecutionStepInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ExecutionStepInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ExecutionStepInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ExecutionStepInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ExecutionStepPage Page of ExecutionStepInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ExecutionStepPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ExecutionStepPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ExecutionStepInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ExecutionStepPage Page of ExecutionStepInstance */ public function getPage(string $targetUrl): ExecutionStepPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ExecutionStepPage($this->version, $response, $this->solution); } /** * Constructs a ExecutionStepContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ExecutionStepContext { return new ExecutionStepContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.ExecutionStepList]'; } }PKt[ kRTwilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextContext.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, 'stepSid' => $stepSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Steps/' . \rawurlencode($stepSid) . '/Context'; } /** * Fetch the ExecutionStepContextInstance * * @return ExecutionStepContextInstance Fetched ExecutionStepContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionStepContextInstance { $payload = $this->version->fetch('GET', $this->uri); return new ExecutionStepContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['stepSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.ExecutionStepContextContext ' . \implode(' ', $context) . ']'; } }PKt[ J..STwilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'context' => Values::array_get($payload, 'context'), 'executionSid' => Values::array_get($payload, 'execution_sid'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'stepSid' => Values::array_get($payload, 'step_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, 'stepSid' => $stepSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ExecutionStepContextContext Context for this * ExecutionStepContextInstance */ protected function proxy(): ExecutionStepContextContext { if (!$this->context) { $this->context = new ExecutionStepContextContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['stepSid'] ); } return $this->context; } /** * Fetch the ExecutionStepContextInstance * * @return ExecutionStepContextInstance Fetched ExecutionStepContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionStepContextInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.ExecutionStepContextInstance ' . \implode(' ', $context) . ']'; } }PKt[tOTwilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextList.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, 'stepSid' => $stepSid, ]; } /** * Constructs a ExecutionStepContextContext */ public function getContext(): ExecutionStepContextContext { return new ExecutionStepContextContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['stepSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.ExecutionStepContextList]'; } }PKt[t OTwilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExecutionStepContextInstance \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextInstance */ public function buildInstance(array $payload): ExecutionStepContextInstance { return new ExecutionStepContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['stepSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.ExecutionStepContextPage]'; } }PKt[B=Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepContext.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, 'sid' => $sid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Steps/' . \rawurlencode($sid) . ''; } /** * Fetch the ExecutionStepInstance * * @return ExecutionStepInstance Fetched ExecutionStepInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionStepInstance { $payload = $this->version->fetch('GET', $this->uri); return new ExecutionStepInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['sid'] ); } /** * Access the stepContext */ protected function getStepContext(): ExecutionStepContextList { if (!$this->_stepContext) { $this->_stepContext = new ExecutionStepContextList( $this->version, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['sid'] ); } return $this->_stepContext; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V1.ExecutionStepContext ' . \implode(' ', $context) . ']'; } }PKt[fo,Twilio/Rest/Studio/V1/Flow/ExecutionList.phpnu[solution = ['flowSid' => $flowSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions'; } /** * Streams ExecutionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ExecutionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ExecutionInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ExecutionInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ExecutionPage Page of ExecutionInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ExecutionPage { $options = new Values($options); $params = Values::of([ 'DateCreatedFrom' => Serialize::iso8601DateTime($options['dateCreatedFrom']), 'DateCreatedTo' => Serialize::iso8601DateTime($options['dateCreatedTo']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ExecutionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ExecutionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ExecutionPage Page of ExecutionInstance */ public function getPage(string $targetUrl): ExecutionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ExecutionPage($this->version, $response, $this->solution); } /** * Create the ExecutionInstance * * @param string $to The Contact phone number to start a Studio Flow Execution * @param string $from The Twilio phone number or Messaging Service SID to send * messages or initiate calls from during the Flow Execution * @param array|Options $options Optional Arguments * @return ExecutionInstance Created ExecutionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $to, string $from, array $options = []): ExecutionInstance { $options = new Values($options); $data = Values::of([ 'To' => $to, 'From' => $from, 'Parameters' => Serialize::jsonObject($options['parameters']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ExecutionInstance($this->version, $payload, $this->solution['flowSid']); } /** * Constructs a ExecutionContext * * @param string $sid The SID of the Execution resource to fetch */ public function getContext(string $sid): ExecutionContext { return new ExecutionContext($this->version, $this->solution['flowSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1.ExecutionList]'; } }PKt[F숼||Twilio/Rest/Studio/V1.phpnu[version = 'v1'; } protected function getFlows(): FlowList { if (!$this->_flows) { $this->_flows = new FlowList($this); } return $this->_flows; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V1]'; } }PKt[)??.Twilio/Rest/Studio/V2/FlowValidateInstance.phpnu[properties = ['valid' => Values::array_get($payload, 'valid'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.FlowValidateInstance]'; } }PKt[@[gg"Twilio/Rest/Studio/V2/FlowPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FlowInstance \Twilio\Rest\Studio\V2\FlowInstance */ public function buildInstance(array $payload): FlowInstance { return new FlowInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.FlowPage]'; } }PKt[Ha**&Twilio/Rest/Studio/V2/FlowInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'definition' => Values::array_get($payload, 'definition'), 'status' => Values::array_get($payload, 'status'), 'revision' => Values::array_get($payload, 'revision'), 'commitMessage' => Values::array_get($payload, 'commit_message'), 'valid' => Values::array_get($payload, 'valid'), 'errors' => Values::array_get($payload, 'errors'), 'warnings' => Values::array_get($payload, 'warnings'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'webhookUrl' => Values::array_get($payload, 'webhook_url'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FlowContext Context for this FlowInstance */ protected function proxy(): FlowContext { if (!$this->context) { $this->context = new FlowContext($this->version, $this->solution['sid']); } return $this->context; } /** * Update the FlowInstance * * @param string $status The status of the Flow * @param array|Options $options Optional Arguments * @return FlowInstance Updated FlowInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): FlowInstance { return $this->proxy()->update($status, $options); } /** * Fetch the FlowInstance * * @return FlowInstance Fetched FlowInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FlowInstance { return $this->proxy()->fetch(); } /** * Delete the FlowInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the revisions */ protected function getRevisions(): FlowRevisionList { return $this->proxy()->revisions; } /** * Access the testUsers */ protected function getTestUsers(): FlowTestUserList { return $this->proxy()->testUsers; } /** * Access the executions */ protected function getExecutions(): ExecutionList { return $this->proxy()->executions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.FlowInstance ' . \implode(' ', $context) . ']'; } }PKt[Zj*Twilio/Rest/Studio/V2/FlowValidatePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FlowValidateInstance \Twilio\Rest\Studio\V2\FlowValidateInstance */ public function buildInstance(array $payload): FlowValidateInstance { return new FlowValidateInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.FlowValidatePage]'; } }PKt[!II%Twilio/Rest/Studio/V2/FlowContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Flows/' . \rawurlencode($sid) . ''; } /** * Update the FlowInstance * * @param string $status The status of the Flow * @param array|Options $options Optional Arguments * @return FlowInstance Updated FlowInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status, array $options = []): FlowInstance { $options = new Values($options); $data = Values::of([ 'Status' => $status, 'FriendlyName' => $options['friendlyName'], 'Definition' => Serialize::jsonObject($options['definition']), 'CommitMessage' => $options['commitMessage'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FlowInstance($this->version, $payload, $this->solution['sid']); } /** * Fetch the FlowInstance * * @return FlowInstance Fetched FlowInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FlowInstance { $payload = $this->version->fetch('GET', $this->uri); return new FlowInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the FlowInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the revisions */ protected function getRevisions(): FlowRevisionList { if (!$this->_revisions) { $this->_revisions = new FlowRevisionList($this->version, $this->solution['sid']); } return $this->_revisions; } /** * Access the testUsers */ protected function getTestUsers(): FlowTestUserList { if (!$this->_testUsers) { $this->_testUsers = new FlowTestUserList($this->version, $this->solution['sid']); } return $this->_testUsers; } /** * Access the executions */ protected function getExecutions(): ExecutionList { if (!$this->_executions) { $this->_executions = new ExecutionList($this->version, $this->solution['sid']); } return $this->_executions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.FlowContext ' . \implode(' ', $context) . ']'; } }PKt[G1"Twilio/Rest/Studio/V2/FlowList.phpnu[solution = []; $this->uri = '/Flows'; } /** * Create the FlowInstance * * @param string $friendlyName The string that you assigned to describe the Flow * @param string $status The status of the Flow * @param array $definition JSON representation of flow definition * @param array|Options $options Optional Arguments * @return FlowInstance Created FlowInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $status, array $definition, array $options = []): FlowInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Status' => $status, 'Definition' => Serialize::jsonObject($definition), 'CommitMessage' => $options['commitMessage'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FlowInstance($this->version, $payload); } /** * Streams FlowInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FlowInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FlowInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FlowInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FlowPage Page of FlowInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FlowPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FlowPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FlowInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FlowPage Page of FlowInstance */ public function getPage(string $targetUrl): FlowPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FlowPage($this->version, $response, $this->solution); } /** * Constructs a FlowContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): FlowContext { return new FlowContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.FlowList]'; } }PKt[, <3Twilio/Rest/Studio/V2/Flow/FlowRevisionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'definition' => Values::array_get($payload, 'definition'), 'status' => Values::array_get($payload, 'status'), 'revision' => Values::array_get($payload, 'revision'), 'commitMessage' => Values::array_get($payload, 'commit_message'), 'valid' => Values::array_get($payload, 'valid'), 'errors' => Values::array_get($payload, 'errors'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid, 'revision' => $revision ?: $this->properties['revision'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FlowRevisionContext Context for this FlowRevisionInstance */ protected function proxy(): FlowRevisionContext { if (!$this->context) { $this->context = new FlowRevisionContext( $this->version, $this->solution['sid'], $this->solution['revision'] ); } return $this->context; } /** * Fetch the FlowRevisionInstance * * @return FlowRevisionInstance Fetched FlowRevisionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FlowRevisionInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.FlowRevisionInstance ' . \implode(' ', $context) . ']'; } }PKt[]X  /Twilio/Rest/Studio/V2/Flow/FlowTestUserList.phpnu[solution = ['sid' => $sid, ]; } /** * Constructs a FlowTestUserContext */ public function getContext(): FlowTestUserContext { return new FlowTestUserContext($this->version, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.FlowTestUserList]'; } }PKt[5+hII/Twilio/Rest/Studio/V2/Flow/FlowRevisionList.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Flows/' . \rawurlencode($sid) . '/Revisions'; } /** * Streams FlowRevisionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FlowRevisionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FlowRevisionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FlowRevisionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FlowRevisionPage Page of FlowRevisionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FlowRevisionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FlowRevisionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FlowRevisionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FlowRevisionPage Page of FlowRevisionInstance */ public function getPage(string $targetUrl): FlowRevisionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FlowRevisionPage($this->version, $response, $this->solution); } /** * Constructs a FlowRevisionContext * * @param string $revision Specific Revision number or can be `LatestPublished` * and `LatestRevision` */ public function getContext(string $revision): FlowRevisionContext { return new FlowRevisionContext($this->version, $this->solution['sid'], $revision); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.FlowRevisionList]'; } }PKt[J [[/Twilio/Rest/Studio/V2/Flow/ExecutionOptions.phpnu[options['dateCreatedFrom'] = $dateCreatedFrom; $this->options['dateCreatedTo'] = $dateCreatedTo; } /** * Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. * * @param \DateTime $dateCreatedFrom Only show Executions that started on or * after this ISO 8601 date-time * @return $this Fluent Builder */ public function setDateCreatedFrom(\DateTime $dateCreatedFrom): self { $this->options['dateCreatedFrom'] = $dateCreatedFrom; return $this; } /** * Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. * * @param \DateTime $dateCreatedTo Only show Executions that started before * this ISO 8601 date-time * @return $this Fluent Builder */ public function setDateCreatedTo(\DateTime $dateCreatedTo): self { $this->options['dateCreatedTo'] = $dateCreatedTo; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Studio.V2.ReadExecutionOptions ' . $options . ']'; } } class CreateExecutionOptions extends Options { /** * @param array $parameters JSON data that will be added to the Flow's context */ public function __construct(array $parameters = Values::ARRAY_NONE) { $this->options['parameters'] = $parameters; } /** * JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={"name":"Zeke"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns "Zeke". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. * * @param array $parameters JSON data that will be added to the Flow's context * @return $this Fluent Builder */ public function setParameters(array $parameters): self { $this->options['parameters'] = $parameters; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Studio.V2.CreateExecutionOptions ' . $options . ']'; } }PKt[]{C˫,Twilio/Rest/Studio/V2/Flow/ExecutionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExecutionInstance \Twilio\Rest\Studio\V2\Flow\ExecutionInstance */ public function buildInstance(array $payload): ExecutionInstance { return new ExecutionInstance($this->version, $payload, $this->solution['flowSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.ExecutionPage]'; } }PKt[~{{/Twilio/Rest/Studio/V2/Flow/ExecutionContext.phpnu[solution = ['flowSid' => $flowSid, 'sid' => $sid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($sid) . ''; } /** * Fetch the ExecutionInstance * * @return ExecutionInstance Fetched ExecutionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionInstance { $payload = $this->version->fetch('GET', $this->uri); return new ExecutionInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['sid'] ); } /** * Delete the ExecutionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ExecutionInstance * * @param string $status The status of the Execution * @return ExecutionInstance Updated ExecutionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): ExecutionInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ExecutionInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['sid'] ); } /** * Access the steps */ protected function getSteps(): ExecutionStepList { if (!$this->_steps) { $this->_steps = new ExecutionStepList( $this->version, $this->solution['flowSid'], $this->solution['sid'] ); } return $this->_steps; } /** * Access the executionContext */ protected function getExecutionContext(): ExecutionContextList { if (!$this->_executionContext) { $this->_executionContext = new ExecutionContextList( $this->version, $this->solution['flowSid'], $this->solution['sid'] ); } return $this->_executionContext; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.ExecutionContext ' . \implode(' ', $context) . ']'; } }PKt[e2Twilio/Rest/Studio/V2/Flow/FlowTestUserContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Flows/' . \rawurlencode($sid) . '/TestUsers'; } /** * Fetch the FlowTestUserInstance * * @return FlowTestUserInstance Fetched FlowTestUserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FlowTestUserInstance { $payload = $this->version->fetch('GET', $this->uri); return new FlowTestUserInstance($this->version, $payload, $this->solution['sid']); } /** * Update the FlowTestUserInstance * * @param string[] $testUsers List of test user identities that can test draft * versions of the flow. * @return FlowTestUserInstance Updated FlowTestUserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $testUsers): FlowTestUserInstance { $data = Values::of(['TestUsers' => Serialize::map($testUsers, function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FlowTestUserInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.FlowTestUserContext ' . \implode(' ', $context) . ']'; } }PKt[ ݹ/Twilio/Rest/Studio/V2/Flow/FlowRevisionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FlowRevisionInstance \Twilio\Rest\Studio\V2\Flow\FlowRevisionInstance */ public function buildInstance(array $payload): FlowRevisionInstance { return new FlowRevisionInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.FlowRevisionPage]'; } }PKt[Y/Twilio/Rest/Studio/V2/Flow/FlowTestUserPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FlowTestUserInstance \Twilio\Rest\Studio\V2\Flow\FlowTestUserInstance */ public function buildInstance(array $payload): FlowTestUserInstance { return new FlowTestUserInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.FlowTestUserPage]'; } }PKt[Jz::0Twilio/Rest/Studio/V2/Flow/ExecutionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'contactChannelAddress' => Values::array_get($payload, 'contact_channel_address'), 'context' => Values::array_get($payload, 'context'), 'status' => Values::array_get($payload, 'status'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['flowSid' => $flowSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ExecutionContext Context for this ExecutionInstance */ protected function proxy(): ExecutionContext { if (!$this->context) { $this->context = new ExecutionContext( $this->version, $this->solution['flowSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ExecutionInstance * * @return ExecutionInstance Fetched ExecutionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionInstance { return $this->proxy()->fetch(); } /** * Delete the ExecutionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ExecutionInstance * * @param string $status The status of the Execution * @return ExecutionInstance Updated ExecutionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): ExecutionInstance { return $this->proxy()->update($status); } /** * Access the steps */ protected function getSteps(): ExecutionStepList { return $this->proxy()->steps; } /** * Access the executionContext */ protected function getExecutionContext(): ExecutionContextList { return $this->proxy()->executionContext; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.ExecutionInstance ' . \implode(' ', $context) . ']'; } }PKt[y}t 3Twilio/Rest/Studio/V2/Flow/FlowTestUserInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'testUsers' => Values::array_get($payload, 'test_users'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FlowTestUserContext Context for this FlowTestUserInstance */ protected function proxy(): FlowTestUserContext { if (!$this->context) { $this->context = new FlowTestUserContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the FlowTestUserInstance * * @return FlowTestUserInstance Fetched FlowTestUserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FlowTestUserInstance { return $this->proxy()->fetch(); } /** * Update the FlowTestUserInstance * * @param string[] $testUsers List of test user identities that can test draft * versions of the flow. * @return FlowTestUserInstance Updated FlowTestUserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $testUsers): FlowTestUserInstance { return $this->proxy()->update($testUsers); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.FlowTestUserInstance ' . \implode(' ', $context) . ']'; } }PKt[3 DD=Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExecutionContextInstance \Twilio\Rest\Studio\V2\Flow\Execution\ExecutionContextInstance */ public function buildInstance(array $payload): ExecutionContextInstance { return new ExecutionContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.ExecutionContextPage]'; } }PKt[= ATwilio/Rest/Studio/V2/Flow/Execution/ExecutionContextInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'context' => Values::array_get($payload, 'context'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'executionSid' => Values::array_get($payload, 'execution_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ExecutionContextContext Context for this ExecutionContextInstance */ protected function proxy(): ExecutionContextContext { if (!$this->context) { $this->context = new ExecutionContextContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'] ); } return $this->context; } /** * Fetch the ExecutionContextInstance * * @return ExecutionContextInstance Fetched ExecutionContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionContextInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.ExecutionContextInstance ' . \implode(' ', $context) . ']'; } }PKt[^k)$$@Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextContext.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Context'; } /** * Fetch the ExecutionContextInstance * * @return ExecutionContextInstance Fetched ExecutionContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionContextInstance { $payload = $this->version->fetch('GET', $this->uri); return new ExecutionContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.ExecutionContextContext ' . \implode(' ', $context) . ']'; } }PKt[&J1>Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'executionSid' => Values::array_get($payload, 'execution_sid'), 'name' => Values::array_get($payload, 'name'), 'context' => Values::array_get($payload, 'context'), 'transitionedFrom' => Values::array_get($payload, 'transitioned_from'), 'transitionedTo' => Values::array_get($payload, 'transitioned_to'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'flowSid' => $flowSid, 'executionSid' => $executionSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ExecutionStepContext Context for this ExecutionStepInstance */ protected function proxy(): ExecutionStepContext { if (!$this->context) { $this->context = new ExecutionStepContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ExecutionStepInstance * * @return ExecutionStepInstance Fetched ExecutionStepInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionStepInstance { return $this->proxy()->fetch(); } /** * Access the stepContext */ protected function getStepContext(): ExecutionStepContextList { return $this->proxy()->stepContext; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.ExecutionStepInstance ' . \implode(' ', $context) . ']'; } }PKt[622:Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExecutionStepInstance \Twilio\Rest\Studio\V2\Flow\Execution\ExecutionStepInstance */ public function buildInstance(array $payload): ExecutionStepInstance { return new ExecutionStepInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.ExecutionStepPage]'; } }PKt[Rl=Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextList.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, ]; } /** * Constructs a ExecutionContextContext */ public function getContext(): ExecutionContextContext { return new ExecutionContextContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.ExecutionContextList]'; } }PKt[H6:Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepList.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Steps'; } /** * Streams ExecutionStepInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ExecutionStepInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ExecutionStepInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ExecutionStepInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ExecutionStepPage Page of ExecutionStepInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ExecutionStepPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ExecutionStepPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ExecutionStepInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ExecutionStepPage Page of ExecutionStepInstance */ public function getPage(string $targetUrl): ExecutionStepPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ExecutionStepPage($this->version, $response, $this->solution); } /** * Constructs a ExecutionStepContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ExecutionStepContext { return new ExecutionStepContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.ExecutionStepList]'; } }PKt[@RTwilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextContext.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, 'stepSid' => $stepSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Steps/' . \rawurlencode($stepSid) . '/Context'; } /** * Fetch the ExecutionStepContextInstance * * @return ExecutionStepContextInstance Fetched ExecutionStepContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionStepContextInstance { $payload = $this->version->fetch('GET', $this->uri); return new ExecutionStepContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['stepSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.ExecutionStepContextContext ' . \implode(' ', $context) . ']'; } }PKt[..STwilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'context' => Values::array_get($payload, 'context'), 'executionSid' => Values::array_get($payload, 'execution_sid'), 'flowSid' => Values::array_get($payload, 'flow_sid'), 'stepSid' => Values::array_get($payload, 'step_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, 'stepSid' => $stepSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ExecutionStepContextContext Context for this * ExecutionStepContextInstance */ protected function proxy(): ExecutionStepContextContext { if (!$this->context) { $this->context = new ExecutionStepContextContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['stepSid'] ); } return $this->context; } /** * Fetch the ExecutionStepContextInstance * * @return ExecutionStepContextInstance Fetched ExecutionStepContextInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionStepContextInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.ExecutionStepContextInstance ' . \implode(' ', $context) . ']'; } }PKt[lOTwilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextList.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, 'stepSid' => $stepSid, ]; } /** * Constructs a ExecutionStepContextContext */ public function getContext(): ExecutionStepContextContext { return new ExecutionStepContextContext( $this->version, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['stepSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.ExecutionStepContextList]'; } }PKt[ ?OTwilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExecutionStepContextInstance \Twilio\Rest\Studio\V2\Flow\Execution\ExecutionStep\ExecutionStepContextInstance */ public function buildInstance(array $payload): ExecutionStepContextInstance { return new ExecutionStepContextInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['stepSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.ExecutionStepContextPage]'; } }PKt[h=Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepContext.phpnu[solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, 'sid' => $sid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Steps/' . \rawurlencode($sid) . ''; } /** * Fetch the ExecutionStepInstance * * @return ExecutionStepInstance Fetched ExecutionStepInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ExecutionStepInstance { $payload = $this->version->fetch('GET', $this->uri); return new ExecutionStepInstance( $this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['sid'] ); } /** * Access the stepContext */ protected function getStepContext(): ExecutionStepContextList { if (!$this->_stepContext) { $this->_stepContext = new ExecutionStepContextList( $this->version, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['sid'] ); } return $this->_stepContext; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.ExecutionStepContext ' . \implode(' ', $context) . ']'; } }PKt[,Twilio/Rest/Studio/V2/Flow/ExecutionList.phpnu[solution = ['flowSid' => $flowSid, ]; $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions'; } /** * Streams ExecutionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ExecutionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ExecutionInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ExecutionInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ExecutionPage Page of ExecutionInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ExecutionPage { $options = new Values($options); $params = Values::of([ 'DateCreatedFrom' => Serialize::iso8601DateTime($options['dateCreatedFrom']), 'DateCreatedTo' => Serialize::iso8601DateTime($options['dateCreatedTo']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ExecutionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ExecutionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ExecutionPage Page of ExecutionInstance */ public function getPage(string $targetUrl): ExecutionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ExecutionPage($this->version, $response, $this->solution); } /** * Create the ExecutionInstance * * @param string $to The Contact phone number to start a Studio Flow Execution * @param string $from The Twilio phone number or Messaging Service SID to send * messages or initiate calls from during the Flow Execution * @param array|Options $options Optional Arguments * @return ExecutionInstance Created ExecutionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $to, string $from, array $options = []): ExecutionInstance { $options = new Values($options); $data = Values::of([ 'To' => $to, 'From' => $from, 'Parameters' => Serialize::jsonObject($options['parameters']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ExecutionInstance($this->version, $payload, $this->solution['flowSid']); } /** * Constructs a ExecutionContext * * @param string $sid The SID of the Execution resource to fetch */ public function getContext(string $sid): ExecutionContext { return new ExecutionContext($this->version, $this->solution['flowSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.ExecutionList]'; } }PKt[++2Twilio/Rest/Studio/V2/Flow/FlowRevisionContext.phpnu[solution = ['sid' => $sid, 'revision' => $revision, ]; $this->uri = '/Flows/' . \rawurlencode($sid) . '/Revisions/' . \rawurlencode($revision) . ''; } /** * Fetch the FlowRevisionInstance * * @return FlowRevisionInstance Fetched FlowRevisionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FlowRevisionInstance { $payload = $this->version->fetch('GET', $this->uri); return new FlowRevisionInstance( $this->version, $payload, $this->solution['sid'], $this->solution['revision'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Studio.V2.FlowRevisionContext ' . \implode(' ', $context) . ']'; } }PKt[-Twilio/Rest/Studio/V2/FlowValidateOptions.phpnu[options['commitMessage'] = $commitMessage; } /** * Description of change made in the revision. * * @param string $commitMessage Description of change made in the revision * @return $this Fluent Builder */ public function setCommitMessage(string $commitMessage): self { $this->options['commitMessage'] = $commitMessage; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Studio.V2.UpdateFlowValidateOptions ' . $options . ']'; } }PKt[[xx%Twilio/Rest/Studio/V2/FlowOptions.phpnu[options['commitMessage'] = $commitMessage; } /** * Description of change made in the revision. * * @param string $commitMessage Description of change made in the revision * @return $this Fluent Builder */ public function setCommitMessage(string $commitMessage): self { $this->options['commitMessage'] = $commitMessage; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Studio.V2.CreateFlowOptions ' . $options . ']'; } } class UpdateFlowOptions extends Options { /** * @param string $friendlyName The string that you assigned to describe the Flow * @param array $definition JSON representation of flow definition * @param string $commitMessage Description of change made in the revision */ public function __construct(string $friendlyName = Values::NONE, array $definition = Values::ARRAY_NONE, string $commitMessage = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['definition'] = $definition; $this->options['commitMessage'] = $commitMessage; } /** * The string that you assigned to describe the Flow. * * @param string $friendlyName The string that you assigned to describe the Flow * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * JSON representation of flow definition. * * @param array $definition JSON representation of flow definition * @return $this Fluent Builder */ public function setDefinition(array $definition): self { $this->options['definition'] = $definition; return $this; } /** * Description of change made in the revision. * * @param string $commitMessage Description of change made in the revision * @return $this Fluent Builder */ public function setCommitMessage(string $commitMessage): self { $this->options['commitMessage'] = $commitMessage; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Studio.V2.UpdateFlowOptions ' . $options . ']'; } }PKt[Ijj*Twilio/Rest/Studio/V2/FlowValidateList.phpnu[solution = []; $this->uri = '/Flows/Validate'; } /** * Update the FlowValidateInstance * * @param string $friendlyName The string that you assigned to describe the Flow * @param string $status The status of the Flow * @param array $definition JSON representation of flow definition * @param array|Options $options Optional Arguments * @return FlowValidateInstance Updated FlowValidateInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName, string $status, array $definition, array $options = []): FlowValidateInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Status' => $status, 'Definition' => Serialize::jsonObject($definition), 'CommitMessage' => $options['commitMessage'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FlowValidateInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2.FlowValidateList]'; } }PKt[N%n Twilio/Rest/Studio/V2.phpnu[version = 'v2'; } protected function getFlows(): FlowList { if (!$this->_flows) { $this->_flows = new FlowList($this); } return $this->_flows; } protected function getFlowValidate(): FlowValidateList { if (!$this->_flowValidate) { $this->_flowValidate = new FlowValidateList($this); } return $this->_flowValidate; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio.V2]'; } }PKt[ʜ&&5Twilio/Rest/Serverless/V1/Service/EnvironmentList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments'; } /** * Streams EnvironmentInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EnvironmentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EnvironmentInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of EnvironmentInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EnvironmentPage Page of EnvironmentInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EnvironmentPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EnvironmentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EnvironmentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EnvironmentPage Page of EnvironmentInstance */ public function getPage(string $targetUrl): EnvironmentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EnvironmentPage($this->version, $response, $this->solution); } /** * Create the EnvironmentInstance * * @param string $uniqueName A user-defined string that uniquely identifies the * Environment resource * @param array|Options $options Optional Arguments * @return EnvironmentInstance Created EnvironmentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $uniqueName, array $options = []): EnvironmentInstance { $options = new Values($options); $data = Values::of(['UniqueName' => $uniqueName, 'DomainSuffix' => $options['domainSuffix'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new EnvironmentInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Constructs a EnvironmentContext * * @param string $sid The SID of the Environment resource to fetch */ public function getContext(string $sid): EnvironmentContext { return new EnvironmentContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.EnvironmentList]'; } }PKt[/Twilio/Rest/Serverless/V1/Service/BuildList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Builds'; } /** * Streams BuildInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BuildInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BuildInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of BuildInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BuildPage Page of BuildInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BuildPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BuildPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BuildInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BuildPage Page of BuildInstance */ public function getPage(string $targetUrl): BuildPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BuildPage($this->version, $response, $this->solution); } /** * Create the BuildInstance * * @param array|Options $options Optional Arguments * @return BuildInstance Created BuildInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): BuildInstance { $options = new Values($options); $data = Values::of([ 'AssetVersions' => Serialize::map($options['assetVersions'], function($e) { return $e; }), 'FunctionVersions' => Serialize::map($options['functionVersions'], function($e) { return $e; }), 'Dependencies' => $options['dependencies'], 'Runtime' => $options['runtime'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new BuildInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Constructs a BuildContext * * @param string $sid The SID of the Build resource to fetch */ public function getContext(string $sid): BuildContext { return new BuildContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.BuildList]'; } }PKt[89Twilio/Rest/Serverless/V1/Service/Environment/LogList.phpnu[solution = ['serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Logs'; } /** * Streams LogInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads LogInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return LogInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of LogInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return LogPage Page of LogInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): LogPage { $options = new Values($options); $params = Values::of([ 'FunctionSid' => $options['functionSid'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new LogPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of LogInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return LogPage Page of LogInstance */ public function getPage(string $targetUrl): LogPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new LogPage($this->version, $response, $this->solution); } /** * Constructs a LogContext * * @param string $sid The SID that identifies the Log resource to fetch */ public function getContext(string $sid): LogContext { return new LogContext( $this->version, $this->solution['serviceSid'], $this->solution['environmentSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.LogList]'; } }PKt[CTwilio/Rest/Serverless/V1/Service/Environment/DeploymentContext.phpnu[solution = ['serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Deployments/' . \rawurlencode($sid) . ''; } /** * Fetch the DeploymentInstance * * @return DeploymentInstance Fetched DeploymentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeploymentInstance { $payload = $this->version->fetch('GET', $this->uri); return new DeploymentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.DeploymentContext ' . \implode(' ', $context) . ']'; } }PKt[pCTwilio/Rest/Serverless/V1/Service/Environment/DeploymentOptions.phpnu[options['buildSid'] = $buildSid; } /** * The SID of the Build for the Deployment. * * @param string $buildSid The SID of the Build for the Deployment * @return $this Fluent Builder */ public function setBuildSid(string $buildSid): self { $this->options['buildSid'] = $buildSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Serverless.V1.CreateDeploymentOptions ' . $options . ']'; } }PKt[8e>Twilio/Rest/Serverless/V1/Service/Environment/VariablePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return VariableInstance \Twilio\Rest\Serverless\V1\Service\Environment\VariableInstance */ public function buildInstance(array $payload): VariableInstance { return new VariableInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.VariablePage]'; } }PKt[y DTwilio/Rest/Serverless/V1/Service/Environment/DeploymentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'environmentSid' => Values::array_get($payload, 'environment_sid'), 'buildSid' => Values::array_get($payload, 'build_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DeploymentContext Context for this DeploymentInstance */ protected function proxy(): DeploymentContext { if (!$this->context) { $this->context = new DeploymentContext( $this->version, $this->solution['serviceSid'], $this->solution['environmentSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DeploymentInstance * * @return DeploymentInstance Fetched DeploymentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeploymentInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.DeploymentInstance ' . \implode(' ', $context) . ']'; } }PKt[[BR<Twilio/Rest/Serverless/V1/Service/Environment/LogContext.phpnu[solution = ['serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Logs/' . \rawurlencode($sid) . ''; } /** * Fetch the LogInstance * * @return LogInstance Fetched LogInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): LogInstance { $payload = $this->version->fetch('GET', $this->uri); return new LogInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.LogContext ' . \implode(' ', $context) . ']'; } }PKt[c]]=Twilio/Rest/Serverless/V1/Service/Environment/LogInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'environmentSid' => Values::array_get($payload, 'environment_sid'), 'buildSid' => Values::array_get($payload, 'build_sid'), 'deploymentSid' => Values::array_get($payload, 'deployment_sid'), 'functionSid' => Values::array_get($payload, 'function_sid'), 'requestSid' => Values::array_get($payload, 'request_sid'), 'level' => Values::array_get($payload, 'level'), 'message' => Values::array_get($payload, 'message'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return LogContext Context for this LogInstance */ protected function proxy(): LogContext { if (!$this->context) { $this->context = new LogContext( $this->version, $this->solution['serviceSid'], $this->solution['environmentSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the LogInstance * * @return LogInstance Fetched LogInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): LogInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.LogInstance ' . \implode(' ', $context) . ']'; } }PKt[ A-@Twilio/Rest/Serverless/V1/Service/Environment/DeploymentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DeploymentInstance \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentInstance */ public function buildInstance(array $payload): DeploymentInstance { return new DeploymentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.DeploymentPage]'; } }PKt[û@Twilio/Rest/Serverless/V1/Service/Environment/DeploymentList.phpnu[solution = ['serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Deployments'; } /** * Streams DeploymentInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DeploymentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DeploymentInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DeploymentInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DeploymentPage Page of DeploymentInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DeploymentPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DeploymentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DeploymentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DeploymentPage Page of DeploymentInstance */ public function getPage(string $targetUrl): DeploymentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DeploymentPage($this->version, $response, $this->solution); } /** * Create the DeploymentInstance * * @param array|Options $options Optional Arguments * @return DeploymentInstance Created DeploymentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): DeploymentInstance { $options = new Values($options); $data = Values::of(['BuildSid' => $options['buildSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new DeploymentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid'] ); } /** * Constructs a DeploymentContext * * @param string $sid The SID that identifies the Deployment resource to fetch */ public function getContext(string $sid): DeploymentContext { return new DeploymentContext( $this->version, $this->solution['serviceSid'], $this->solution['environmentSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.DeploymentList]'; } }PKt[9Twilio/Rest/Serverless/V1/Service/Environment/LogPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return LogInstance \Twilio\Rest\Serverless\V1\Service\Environment\LogInstance */ public function buildInstance(array $payload): LogInstance { return new LogInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.LogPage]'; } }PKt[7' ATwilio/Rest/Serverless/V1/Service/Environment/VariableContext.phpnu[solution = ['serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Variables/' . \rawurlencode($sid) . ''; } /** * Fetch the VariableInstance * * @return VariableInstance Fetched VariableInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): VariableInstance { $payload = $this->version->fetch('GET', $this->uri); return new VariableInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid'], $this->solution['sid'] ); } /** * Update the VariableInstance * * @param array|Options $options Optional Arguments * @return VariableInstance Updated VariableInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): VariableInstance { $options = new Values($options); $data = Values::of(['Key' => $options['key'], 'Value' => $options['value'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new VariableInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid'], $this->solution['sid'] ); } /** * Delete the VariableInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.VariableContext ' . \implode(' ', $context) . ']'; } }PKt[S+ <Twilio/Rest/Serverless/V1/Service/Environment/LogOptions.phpnu[options['functionSid'] = $functionSid; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; } /** * The SID of the function whose invocation produced the Log resources to read. * * @param string $functionSid The SID of the function whose invocation produced * the Log resources to read * @return $this Fluent Builder */ public function setFunctionSid(string $functionSid): self { $this->options['functionSid'] = $functionSid; return $this; } /** * The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time. * * @param \DateTime $startDate The date and time after which the Log resources * must have been created. * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time. * * @param \DateTime $endDate The date and time before which the Log resource * must have been created. * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Serverless.V1.ReadLogOptions ' . $options . ']'; } }PKt[NATwilio/Rest/Serverless/V1/Service/Environment/VariableOptions.phpnu[options['key'] = $key; $this->options['value'] = $value; } /** * A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. * * @param string $key A string by which the Variable resource can be referenced * @return $this Fluent Builder */ public function setKey(string $key): self { $this->options['key'] = $key; return $this; } /** * A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. * * @param string $value A string that contains the actual value of the Variable * @return $this Fluent Builder */ public function setValue(string $value): self { $this->options['value'] = $value; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Serverless.V1.UpdateVariableOptions ' . $options . ']'; } }PKt[FBTwilio/Rest/Serverless/V1/Service/Environment/VariableInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'environmentSid' => Values::array_get($payload, 'environment_sid'), 'key' => Values::array_get($payload, 'key'), 'value' => Values::array_get($payload, 'value'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return VariableContext Context for this VariableInstance */ protected function proxy(): VariableContext { if (!$this->context) { $this->context = new VariableContext( $this->version, $this->solution['serviceSid'], $this->solution['environmentSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the VariableInstance * * @return VariableInstance Fetched VariableInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): VariableInstance { return $this->proxy()->fetch(); } /** * Update the VariableInstance * * @param array|Options $options Optional Arguments * @return VariableInstance Updated VariableInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): VariableInstance { return $this->proxy()->update($options); } /** * Delete the VariableInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.VariableInstance ' . \implode(' ', $context) . ']'; } }PKt[)>Twilio/Rest/Serverless/V1/Service/Environment/VariableList.phpnu[solution = ['serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Variables'; } /** * Streams VariableInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads VariableInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return VariableInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of VariableInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return VariablePage Page of VariableInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): VariablePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new VariablePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of VariableInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return VariablePage Page of VariableInstance */ public function getPage(string $targetUrl): VariablePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new VariablePage($this->version, $response, $this->solution); } /** * Create the VariableInstance * * @param string $key A string by which the Variable resource can be referenced * @param string $value A string that contains the actual value of the Variable * @return VariableInstance Created VariableInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $key, string $value): VariableInstance { $data = Values::of(['Key' => $key, 'Value' => $value, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new VariableInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid'] ); } /** * Constructs a VariableContext * * @param string $sid The SID of the Variable resource to fetch */ public function getContext(string $sid): VariableContext { return new VariableContext( $this->version, $this->solution['serviceSid'], $this->solution['environmentSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.VariableList]'; } }PKt[629Twilio/Rest/Serverless/V1/Service/EnvironmentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'buildSid' => Values::array_get($payload, 'build_sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'domainSuffix' => Values::array_get($payload, 'domain_suffix'), 'domainName' => Values::array_get($payload, 'domain_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EnvironmentContext Context for this EnvironmentInstance */ protected function proxy(): EnvironmentContext { if (!$this->context) { $this->context = new EnvironmentContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the EnvironmentInstance * * @return EnvironmentInstance Fetched EnvironmentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EnvironmentInstance { return $this->proxy()->fetch(); } /** * Delete the EnvironmentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the variables */ protected function getVariables(): VariableList { return $this->proxy()->variables; } /** * Access the deployments */ protected function getDeployments(): DeploymentList { return $this->proxy()->deployments; } /** * Access the logs */ protected function getLogs(): LogList { return $this->proxy()->logs; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.EnvironmentInstance ' . \implode(' ', $context) . ']'; } }PKt[==5Twilio/Rest/Serverless/V1/Service/EnvironmentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EnvironmentInstance \Twilio\Rest\Serverless\V1\Service\EnvironmentInstance */ public function buildInstance(array $payload): EnvironmentInstance { return new EnvironmentInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.EnvironmentPage]'; } }PKt[sz/Twilio/Rest/Serverless/V1/Service/AssetList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Assets'; } /** * Streams AssetInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AssetInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AssetInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AssetInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AssetPage Page of AssetInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AssetPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AssetPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AssetInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AssetPage Page of AssetInstance */ public function getPage(string $targetUrl): AssetPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AssetPage($this->version, $response, $this->solution); } /** * Create the AssetInstance * * @param string $friendlyName A string to describe the Asset resource * @return AssetInstance Created AssetInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): AssetInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AssetInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Constructs a AssetContext * * @param string $sid The SID that identifies the Asset resource to fetch */ public function getContext(string $sid): AssetContext { return new AssetContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.AssetList]'; } }PKt[86Twilio/Rest/Serverless/V1/Service/FunctionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FunctionContext Context for this FunctionInstance */ protected function proxy(): FunctionContext { if (!$this->context) { $this->context = new FunctionContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FunctionInstance * * @return FunctionInstance Fetched FunctionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FunctionInstance { return $this->proxy()->fetch(); } /** * Delete the FunctionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the FunctionInstance * * @param string $friendlyName A string to describe the Function resource * @return FunctionInstance Updated FunctionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): FunctionInstance { return $this->proxy()->update($friendlyName); } /** * Access the functionVersions */ protected function getFunctionVersions(): FunctionVersionList { return $this->proxy()->functionVersions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.FunctionInstance ' . \implode(' ', $context) . ']'; } }PKt[SoLKTwilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionContext.phpnu[solution = ['serviceSid' => $serviceSid, 'functionSid' => $functionSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Functions/' . \rawurlencode($functionSid) . '/Versions/' . \rawurlencode($sid) . ''; } /** * Fetch the FunctionVersionInstance * * @return FunctionVersionInstance Fetched FunctionVersionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FunctionVersionInstance { $payload = $this->version->fetch('GET', $this->uri); return new FunctionVersionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['functionSid'], $this->solution['sid'] ); } /** * Access the functionVersionContent */ protected function getFunctionVersionContent(): FunctionVersionContentList { if (!$this->_functionVersionContent) { $this->_functionVersionContent = new FunctionVersionContentList( $this->version, $this->solution['serviceSid'], $this->solution['functionSid'], $this->solution['sid'] ); } return $this->_functionVersionContent; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.FunctionVersionContext ' . \implode(' ', $context) . ']'; } }PKt[HTwilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FunctionVersionInstance \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionInstance */ public function buildInstance(array $payload): FunctionVersionInstance { return new FunctionVersionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['functionSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.FunctionVersionPage]'; } }PKt[t[o o bTwilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersion/FunctionVersionContentContext.phpnu[solution = ['serviceSid' => $serviceSid, 'functionSid' => $functionSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Functions/' . \rawurlencode($functionSid) . '/Versions/' . \rawurlencode($sid) . '/Content'; } /** * Fetch the FunctionVersionContentInstance * * @return FunctionVersionContentInstance Fetched FunctionVersionContentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FunctionVersionContentInstance { $payload = $this->version->fetch('GET', $this->uri); return new FunctionVersionContentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['functionSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.FunctionVersionContentContext ' . \implode(' ', $context) . ']'; } }PKt[%BX_Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersion/FunctionVersionContentList.phpnu[solution = ['serviceSid' => $serviceSid, 'functionSid' => $functionSid, 'sid' => $sid, ]; } /** * Constructs a FunctionVersionContentContext */ public function getContext(): FunctionVersionContentContext { return new FunctionVersionContentContext( $this->version, $this->solution['serviceSid'], $this->solution['functionSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.FunctionVersionContentList]'; } }PKt[cTwilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersion/FunctionVersionContentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'functionSid' => Values::array_get($payload, 'function_sid'), 'content' => Values::array_get($payload, 'content'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'functionSid' => $functionSid, 'sid' => $sid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FunctionVersionContentContext Context for this * FunctionVersionContentInstance */ protected function proxy(): FunctionVersionContentContext { if (!$this->context) { $this->context = new FunctionVersionContentContext( $this->version, $this->solution['serviceSid'], $this->solution['functionSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FunctionVersionContentInstance * * @return FunctionVersionContentInstance Fetched FunctionVersionContentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FunctionVersionContentInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.FunctionVersionContentInstance ' . \implode(' ', $context) . ']'; } }PKt[;;_Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersion/FunctionVersionContentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FunctionVersionContentInstance \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersion\FunctionVersionContentInstance */ public function buildInstance(array $payload): FunctionVersionContentInstance { return new FunctionVersionContentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['functionSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.FunctionVersionContentPage]'; } }PKt[  HTwilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionList.phpnu[solution = ['serviceSid' => $serviceSid, 'functionSid' => $functionSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Functions/' . \rawurlencode($functionSid) . '/Versions'; } /** * Streams FunctionVersionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FunctionVersionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FunctionVersionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FunctionVersionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FunctionVersionPage Page of FunctionVersionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FunctionVersionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FunctionVersionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FunctionVersionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FunctionVersionPage Page of FunctionVersionInstance */ public function getPage(string $targetUrl): FunctionVersionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FunctionVersionPage($this->version, $response, $this->solution); } /** * Constructs a FunctionVersionContext * * @param string $sid The SID that identifies the Function Version resource to * fetch */ public function getContext(string $sid): FunctionVersionContext { return new FunctionVersionContext( $this->version, $this->solution['serviceSid'], $this->solution['functionSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.FunctionVersionList]'; } }PKt[͵&&LTwilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'functionSid' => Values::array_get($payload, 'function_sid'), 'path' => Values::array_get($payload, 'path'), 'visibility' => Values::array_get($payload, 'visibility'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'functionSid' => $functionSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FunctionVersionContext Context for this FunctionVersionInstance */ protected function proxy(): FunctionVersionContext { if (!$this->context) { $this->context = new FunctionVersionContext( $this->version, $this->solution['serviceSid'], $this->solution['functionSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FunctionVersionInstance * * @return FunctionVersionInstance Fetched FunctionVersionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FunctionVersionInstance { return $this->proxy()->fetch(); } /** * Access the functionVersionContent */ protected function getFunctionVersionContent(): FunctionVersionContentList { return $this->proxy()->functionVersionContent; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.FunctionVersionInstance ' . \implode(' ', $context) . ']'; } }PKt[?`PVV5Twilio/Rest/Serverless/V1/Service/FunctionContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Functions/' . \rawurlencode($sid) . ''; } /** * Fetch the FunctionInstance * * @return FunctionInstance Fetched FunctionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FunctionInstance { $payload = $this->version->fetch('GET', $this->uri); return new FunctionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the FunctionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the FunctionInstance * * @param string $friendlyName A string to describe the Function resource * @return FunctionInstance Updated FunctionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): FunctionInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FunctionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the functionVersions */ protected function getFunctionVersions(): FunctionVersionList { if (!$this->_functionVersions) { $this->_functionVersions = new FunctionVersionList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_functionVersions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.FunctionContext ' . \implode(' ', $context) . ']'; } }PKt[j 2Twilio/Rest/Serverless/V1/Service/AssetContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Assets/' . \rawurlencode($sid) . ''; } /** * Fetch the AssetInstance * * @return AssetInstance Fetched AssetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssetInstance { $payload = $this->version->fetch('GET', $this->uri); return new AssetInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the AssetInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the AssetInstance * * @param string $friendlyName A string to describe the Asset resource * @return AssetInstance Updated AssetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): AssetInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AssetInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the assetVersions */ protected function getAssetVersions(): AssetVersionList { if (!$this->_assetVersions) { $this->_assetVersions = new AssetVersionList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_assetVersions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.AssetContext ' . \implode(' ', $context) . ']'; } }PKt[68Twilio/Rest/Serverless/V1/Service/EnvironmentContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($sid) . ''; } /** * Fetch the EnvironmentInstance * * @return EnvironmentInstance Fetched EnvironmentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EnvironmentInstance { $payload = $this->version->fetch('GET', $this->uri); return new EnvironmentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the EnvironmentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the variables */ protected function getVariables(): VariableList { if (!$this->_variables) { $this->_variables = new VariableList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_variables; } /** * Access the deployments */ protected function getDeployments(): DeploymentList { if (!$this->_deployments) { $this->_deployments = new DeploymentList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_deployments; } /** * Access the logs */ protected function getLogs(): LogList { if (!$this->_logs) { $this->_logs = new LogList($this->version, $this->solution['serviceSid'], $this->solution['sid']); } return $this->_logs; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.EnvironmentContext ' . \implode(' ', $context) . ']'; } }PKt[ e2Twilio/Rest/Serverless/V1/Service/FunctionList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Functions'; } /** * Streams FunctionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FunctionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FunctionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FunctionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FunctionPage Page of FunctionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FunctionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FunctionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FunctionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FunctionPage Page of FunctionInstance */ public function getPage(string $targetUrl): FunctionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FunctionPage($this->version, $response, $this->solution); } /** * Create the FunctionInstance * * @param string $friendlyName A string to describe the Function resource * @return FunctionInstance Created FunctionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): FunctionInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FunctionInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Constructs a FunctionContext * * @param string $sid The SID of the Function resource to fetch */ public function getContext(string $sid): FunctionContext { return new FunctionContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.FunctionList]'; } }PKt[7e;;3Twilio/Rest/Serverless/V1/Service/AssetInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssetContext Context for this AssetInstance */ protected function proxy(): AssetContext { if (!$this->context) { $this->context = new AssetContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AssetInstance * * @return AssetInstance Fetched AssetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssetInstance { return $this->proxy()->fetch(); } /** * Delete the AssetInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the AssetInstance * * @param string $friendlyName A string to describe the Asset resource * @return AssetInstance Updated AssetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName): AssetInstance { return $this->proxy()->update($friendlyName); } /** * Access the assetVersions */ protected function getAssetVersions(): AssetVersionList { return $this->proxy()->assetVersions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.AssetInstance ' . \implode(' ', $context) . ']'; } }PKt[Ī##@Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'assetSid' => Values::array_get($payload, 'asset_sid'), 'path' => Values::array_get($payload, 'path'), 'visibility' => Values::array_get($payload, 'visibility'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'assetSid' => $assetSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssetVersionContext Context for this AssetVersionInstance */ protected function proxy(): AssetVersionContext { if (!$this->context) { $this->context = new AssetVersionContext( $this->version, $this->solution['serviceSid'], $this->solution['assetSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AssetVersionInstance * * @return AssetVersionInstance Fetched AssetVersionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssetVersionInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.AssetVersionInstance ' . \implode(' ', $context) . ']'; } }PKt[M??<Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionList.phpnu[solution = ['serviceSid' => $serviceSid, 'assetSid' => $assetSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Assets/' . \rawurlencode($assetSid) . '/Versions'; } /** * Streams AssetVersionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AssetVersionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AssetVersionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AssetVersionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AssetVersionPage Page of AssetVersionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AssetVersionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AssetVersionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AssetVersionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AssetVersionPage Page of AssetVersionInstance */ public function getPage(string $targetUrl): AssetVersionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AssetVersionPage($this->version, $response, $this->solution); } /** * Constructs a AssetVersionContext * * @param string $sid The SID that identifies the Asset Version resource to * fetch */ public function getContext(string $sid): AssetVersionContext { return new AssetVersionContext( $this->version, $this->solution['serviceSid'], $this->solution['assetSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.AssetVersionList]'; } }PKt[Hæ<Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AssetVersionInstance \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionInstance */ public function buildInstance(array $payload): AssetVersionInstance { return new AssetVersionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['assetSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.AssetVersionPage]'; } }PKt[>~?Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionContext.phpnu[solution = ['serviceSid' => $serviceSid, 'assetSid' => $assetSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Assets/' . \rawurlencode($assetSid) . '/Versions/' . \rawurlencode($sid) . ''; } /** * Fetch the AssetVersionInstance * * @return AssetVersionInstance Fetched AssetVersionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssetVersionInstance { $payload = $this->version->fetch('GET', $this->uri); return new AssetVersionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['assetSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.AssetVersionContext ' . \implode(' ', $context) . ']'; } }PKt[%\\3Twilio/Rest/Serverless/V1/Service/BuildInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'status' => Values::array_get($payload, 'status'), 'assetVersions' => Values::array_get($payload, 'asset_versions'), 'functionVersions' => Values::array_get($payload, 'function_versions'), 'dependencies' => Values::array_get($payload, 'dependencies'), 'runtime' => Values::array_get($payload, 'runtime'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return BuildContext Context for this BuildInstance */ protected function proxy(): BuildContext { if (!$this->context) { $this->context = new BuildContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the BuildInstance * * @return BuildInstance Fetched BuildInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BuildInstance { return $this->proxy()->fetch(); } /** * Delete the BuildInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the buildStatus */ protected function getBuildStatus(): BuildStatusList { return $this->proxy()->buildStatus; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.BuildInstance ' . \implode(' ', $context) . ']'; } }PKt[EϛUU2Twilio/Rest/Serverless/V1/Service/BuildContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Builds/' . \rawurlencode($sid) . ''; } /** * Fetch the BuildInstance * * @return BuildInstance Fetched BuildInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BuildInstance { $payload = $this->version->fetch('GET', $this->uri); return new BuildInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the BuildInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the buildStatus */ protected function getBuildStatus(): BuildStatusList { if (!$this->_buildStatus) { $this->_buildStatus = new BuildStatusList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_buildStatus; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.BuildContext ' . \implode(' ', $context) . ']'; } }PKt['qc c ?Twilio/Rest/Serverless/V1/Service/Build/BuildStatusInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'status' => Values::array_get($payload, 'status'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return BuildStatusContext Context for this BuildStatusInstance */ protected function proxy(): BuildStatusContext { if (!$this->context) { $this->context = new BuildStatusContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the BuildStatusInstance * * @return BuildStatusInstance Fetched BuildStatusInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BuildStatusInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.BuildStatusInstance ' . \implode(' ', $context) . ']'; } }PKt[΋>j>Twilio/Rest/Serverless/V1/Service/Build/BuildStatusContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Builds/' . \rawurlencode($sid) . '/Status'; } /** * Fetch the BuildStatusInstance * * @return BuildStatusInstance Fetched BuildStatusInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BuildStatusInstance { $payload = $this->version->fetch('GET', $this->uri); return new BuildStatusInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.BuildStatusContext ' . \implode(' ', $context) . ']'; } }PKt[քD^;Twilio/Rest/Serverless/V1/Service/Build/BuildStatusPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BuildStatusInstance \Twilio\Rest\Serverless\V1\Service\Build\BuildStatusInstance */ public function buildInstance(array $payload): BuildStatusInstance { return new BuildStatusInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.BuildStatusPage]'; } }PKt[(~;Twilio/Rest/Serverless/V1/Service/Build/BuildStatusList.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; } /** * Constructs a BuildStatusContext */ public function getContext(): BuildStatusContext { return new BuildStatusContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.BuildStatusList]'; } }PKt[iV!!8Twilio/Rest/Serverless/V1/Service/EnvironmentOptions.phpnu[options['domainSuffix'] = $domainSuffix; } /** * A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters. * * @param string $domainSuffix A URL-friendly name that represents the * environment * @return $this Fluent Builder */ public function setDomainSuffix(string $domainSuffix): self { $this->options['domainSuffix'] = $domainSuffix; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Serverless.V1.CreateEnvironmentOptions ' . $options . ']'; } }PKt[g/Twilio/Rest/Serverless/V1/Service/BuildPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BuildInstance \Twilio\Rest\Serverless\V1\Service\BuildInstance */ public function buildInstance(array $payload): BuildInstance { return new BuildInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.BuildPage]'; } }PKt[l++2Twilio/Rest/Serverless/V1/Service/FunctionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FunctionInstance \Twilio\Rest\Serverless\V1\Service\FunctionInstance */ public function buildInstance(array $payload): FunctionInstance { return new FunctionInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.FunctionPage]'; } }PKt[&n;;2Twilio/Rest/Serverless/V1/Service/BuildOptions.phpnu[options['assetVersions'] = $assetVersions; $this->options['functionVersions'] = $functionVersions; $this->options['dependencies'] = $dependencies; $this->options['runtime'] = $runtime; } /** * The list of Asset Version resource SIDs to include in the Build. * * @param string[] $assetVersions The list of Asset Version resource SIDs to * include in the Build * @return $this Fluent Builder */ public function setAssetVersions(array $assetVersions): self { $this->options['assetVersions'] = $assetVersions; return $this; } /** * The list of the Function Version resource SIDs to include in the Build. * * @param string[] $functionVersions The list of the Function Version resource * SIDs to include in the Build * @return $this Fluent Builder */ public function setFunctionVersions(array $functionVersions): self { $this->options['functionVersions'] = $functionVersions; return $this; } /** * A list of objects that describe the Dependencies included in the Build. Each object contains the `name` and `version` of the dependency. * * @param string $dependencies A list of objects that describe the Dependencies * included in the Build * @return $this Fluent Builder */ public function setDependencies(string $dependencies): self { $this->options['dependencies'] = $dependencies; return $this; } /** * The Runtime version that will be used to run the Build resource when it is deployed. * * @param string $runtime The Runtime version that will be used to run the * Build. * @return $this Fluent Builder */ public function setRuntime(string $runtime): self { $this->options['runtime'] = $runtime; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Serverless.V1.CreateBuildOptions ' . $options . ']'; } }PKt[/W-/Twilio/Rest/Serverless/V1/Service/AssetPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AssetInstance \Twilio\Rest\Serverless\V1\Service\AssetInstance */ public function buildInstance(array $payload): AssetInstance { return new AssetInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.AssetPage]'; } }PKt[]9-Twilio/Rest/Serverless/V1/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'includeCredentials' => Values::array_get($payload, 'include_credentials'), 'uiEditable' => Values::array_get($payload, 'ui_editable'), 'domainBase' => Values::array_get($payload, 'domain_base'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Access the environments */ protected function getEnvironments(): EnvironmentList { return $this->proxy()->environments; } /** * Access the functions */ protected function getFunctions(): FunctionList { return $this->proxy()->functions; } /** * Access the assets */ protected function getAssets(): AssetList { return $this->proxy()->assets; } /** * Access the builds */ protected function getBuilds(): BuildList { return $this->proxy()->builds; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[%)Twilio/Rest/Serverless/V1/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Create the ServiceInstance * * @param string $uniqueName A user-defined string that uniquely identifies the * Service resource * @param string $friendlyName A string to describe the Service resource * @param array|Options $options Optional Arguments * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $uniqueName, string $friendlyName, array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $uniqueName, 'FriendlyName' => $friendlyName, 'IncludeCredentials' => Serialize::booleanToString($options['includeCredentials']), 'UiEditable' => Serialize::booleanToString($options['uiEditable']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Constructs a ServiceContext * * @param string $sid The SID of the Service resource to fetch */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.ServiceList]'; } }PKt[LZZ,Twilio/Rest/Serverless/V1/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'IncludeCredentials' => Serialize::booleanToString($options['includeCredentials']), 'FriendlyName' => $options['friendlyName'], 'UiEditable' => Serialize::booleanToString($options['uiEditable']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the environments */ protected function getEnvironments(): EnvironmentList { if (!$this->_environments) { $this->_environments = new EnvironmentList($this->version, $this->solution['sid']); } return $this->_environments; } /** * Access the functions */ protected function getFunctions(): FunctionList { if (!$this->_functions) { $this->_functions = new FunctionList($this->version, $this->solution['sid']); } return $this->_functions; } /** * Access the assets */ protected function getAssets(): AssetList { if (!$this->_assets) { $this->_assets = new AssetList($this->version, $this->solution['sid']); } return $this->_assets; } /** * Access the builds */ protected function getBuilds(): BuildList { if (!$this->_builds) { $this->_builds = new BuildList($this->version, $this->solution['sid']); } return $this->_builds; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Serverless.V1.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[tZ,Twilio/Rest/Serverless/V1/ServiceOptions.phpnu[options['includeCredentials'] = $includeCredentials; $this->options['uiEditable'] = $uiEditable; } /** * Whether to inject Account credentials into a function invocation context. The default value is `true`. * * @param bool $includeCredentials Whether to inject Account credentials into a * function invocation context * @return $this Fluent Builder */ public function setIncludeCredentials(bool $includeCredentials): self { $this->options['includeCredentials'] = $includeCredentials; return $this; } /** * Whether the Service's properties and subresources can be edited via the UI. The default value is `false`. * * @param bool $uiEditable Whether the Service's properties and subresources * can be edited via the UI * @return $this Fluent Builder */ public function setUiEditable(bool $uiEditable): self { $this->options['uiEditable'] = $uiEditable; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Serverless.V1.CreateServiceOptions ' . $options . ']'; } } class UpdateServiceOptions extends Options { /** * @param bool $includeCredentials Whether to inject Account credentials into a * function invocation context * @param string $friendlyName A string to describe the Service resource * @param bool $uiEditable Whether the Service resource's properties and * subresources can be edited via the UI */ public function __construct(bool $includeCredentials = Values::NONE, string $friendlyName = Values::NONE, bool $uiEditable = Values::NONE) { $this->options['includeCredentials'] = $includeCredentials; $this->options['friendlyName'] = $friendlyName; $this->options['uiEditable'] = $uiEditable; } /** * Whether to inject Account credentials into a function invocation context. * * @param bool $includeCredentials Whether to inject Account credentials into a * function invocation context * @return $this Fluent Builder */ public function setIncludeCredentials(bool $includeCredentials): self { $this->options['includeCredentials'] = $includeCredentials; return $this; } /** * A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. * * @param string $friendlyName A string to describe the Service resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether the Service resource's properties and subresources can be edited via the UI. The default value is `false`. * * @param bool $uiEditable Whether the Service resource's properties and * subresources can be edited via the UI * @return $this Fluent Builder */ public function setUiEditable(bool $uiEditable): self { $this->options['uiEditable'] = $uiEditable; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Serverless.V1.UpdateServiceOptions ' . $options . ']'; } }PKt[IR)Twilio/Rest/Serverless/V1/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\Serverless\V1\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1.ServicePage]'; } }PKt[Twilio/Rest/Serverless/V1.phpnu[version = 'v1'; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless.V1]'; } }PKt[!d' .Twilio/Rest/Media/V1/MediaRecordingOptions.phpnu[options['order'] = $order; $this->options['status'] = $status; $this->options['processorSid'] = $processorSid; $this->options['sourceSid'] = $sourceSid; } /** * The sort order of the list by `date_created`. Can be: `asc` (ascending) or `desc` (descending) with `desc` as the default. * * @param string $order The sort order of the list * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * Status to filter by, with possible values `processing`, `completed`, `deleted`, or `failed`. * * @param string $status Status to filter by * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * SID of a MediaProcessor to filter by. * * @param string $processorSid MediaProcessor to filter by * @return $this Fluent Builder */ public function setProcessorSid(string $processorSid): self { $this->options['processorSid'] = $processorSid; return $this; } /** * SID of a MediaRecording source to filter by. * * @param string $sourceSid Source SID to filter by * @return $this Fluent Builder */ public function setSourceSid(string $sourceSid): self { $this->options['sourceSid'] = $sourceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Media.V1.ReadMediaRecordingOptions ' . $options . ']'; } }PKt[n[vv+Twilio/Rest/Media/V1/MediaRecordingList.phpnu[solution = []; $this->uri = '/MediaRecordings'; } /** * Streams MediaRecordingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MediaRecordingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MediaRecordingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MediaRecordingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MediaRecordingPage Page of MediaRecordingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MediaRecordingPage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'Status' => $options['status'], 'ProcessorSid' => $options['processorSid'], 'SourceSid' => $options['sourceSid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MediaRecordingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MediaRecordingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MediaRecordingPage Page of MediaRecordingInstance */ public function getPage(string $targetUrl): MediaRecordingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MediaRecordingPage($this->version, $response, $this->solution); } /** * Constructs a MediaRecordingContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): MediaRecordingContext { return new MediaRecordingContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Media.V1.MediaRecordingList]'; } }PKt[_>"9Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PlaybackGrantInstance \Twilio\Rest\Media\V1\PlayerStreamer\PlaybackGrantInstance */ public function buildInstance(array $payload): PlaybackGrantInstance { return new PlaybackGrantInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Media.V1.PlaybackGrantPage]'; } }PKt[T  <Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantOptions.phpnu[options['ttl'] = $ttl; $this->options['accessControlAllowOrigin'] = $accessControlAllowOrigin; } /** * The time to live of the PlaybackGrant. Default value is 15 seconds. Maximum value is 60 seconds. * * @param int $ttl The time to live of the PlaybackGrant * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * The full origin URL where the livestream can be streamed. If this is not provided, it can be streamed from any domain. * * @param string $accessControlAllowOrigin The full URL that is authorized to * play back the livestream * @return $this Fluent Builder */ public function setAccessControlAllowOrigin(string $accessControlAllowOrigin): self { $this->options['accessControlAllowOrigin'] = $accessControlAllowOrigin; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Media.V1.CreatePlaybackGrantOptions ' . $options . ']'; } }PKt[Cmm9Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantList.phpnu[solution = ['sid' => $sid, ]; } /** * Constructs a PlaybackGrantContext */ public function getContext(): PlaybackGrantContext { return new PlaybackGrantContext($this->version, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Media.V1.PlaybackGrantList]'; } }PKt[dﮄ =Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'grant' => Values::array_get($payload, 'grant'), ]; $this->solution = ['sid' => $sid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PlaybackGrantContext Context for this PlaybackGrantInstance */ protected function proxy(): PlaybackGrantContext { if (!$this->context) { $this->context = new PlaybackGrantContext($this->version, $this->solution['sid']); } return $this->context; } /** * Create the PlaybackGrantInstance * * @param array|Options $options Optional Arguments * @return PlaybackGrantInstance Created PlaybackGrantInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): PlaybackGrantInstance { return $this->proxy()->create($options); } /** * Fetch the PlaybackGrantInstance * * @return PlaybackGrantInstance Fetched PlaybackGrantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PlaybackGrantInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Media.V1.PlaybackGrantInstance ' . \implode(' ', $context) . ']'; } }PKt[yC<Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/PlayerStreamers/' . \rawurlencode($sid) . '/PlaybackGrant'; } /** * Create the PlaybackGrantInstance * * @param array|Options $options Optional Arguments * @return PlaybackGrantInstance Created PlaybackGrantInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): PlaybackGrantInstance { $options = new Values($options); $data = Values::of([ 'Ttl' => $options['ttl'], 'AccessControlAllowOrigin' => $options['accessControlAllowOrigin'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new PlaybackGrantInstance($this->version, $payload, $this->solution['sid']); } /** * Fetch the PlaybackGrantInstance * * @return PlaybackGrantInstance Fetched PlaybackGrantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PlaybackGrantInstance { $payload = $this->version->fetch('GET', $this->uri); return new PlaybackGrantInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Media.V1.PlaybackGrantContext ' . \implode(' ', $context) . ']'; } }PKt[Y+Twilio/Rest/Media/V1/MediaProcessorPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MediaProcessorInstance \Twilio\Rest\Media\V1\MediaProcessorInstance */ public function buildInstance(array $payload): MediaProcessorInstance { return new MediaProcessorInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Media.V1.MediaProcessorPage]'; } }PKt[ Q4@@/Twilio/Rest/Media/V1/MediaRecordingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'duration' => Values::array_get($payload, 'duration'), 'format' => Values::array_get($payload, 'format'), 'links' => Values::array_get($payload, 'links'), 'processorSid' => Values::array_get($payload, 'processor_sid'), 'resolution' => Values::array_get($payload, 'resolution'), 'sourceSid' => Values::array_get($payload, 'source_sid'), 'sid' => Values::array_get($payload, 'sid'), 'mediaSize' => Values::array_get($payload, 'media_size'), 'status' => Values::array_get($payload, 'status'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MediaRecordingContext Context for this MediaRecordingInstance */ protected function proxy(): MediaRecordingContext { if (!$this->context) { $this->context = new MediaRecordingContext($this->version, $this->solution['sid']); } return $this->context; } /** * Delete the MediaRecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the MediaRecordingInstance * * @return MediaRecordingInstance Fetched MediaRecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MediaRecordingInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Media.V1.MediaRecordingInstance ' . \implode(' ', $context) . ']'; } }PKt['77.Twilio/Rest/Media/V1/MediaProcessorContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/MediaProcessors/' . \rawurlencode($sid) . ''; } /** * Fetch the MediaProcessorInstance * * @return MediaProcessorInstance Fetched MediaProcessorInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MediaProcessorInstance { $payload = $this->version->fetch('GET', $this->uri); return new MediaProcessorInstance($this->version, $payload, $this->solution['sid']); } /** * Update the MediaProcessorInstance * * @param string $status The status of the MediaProcessor * @return MediaProcessorInstance Updated MediaProcessorInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): MediaProcessorInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new MediaProcessorInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Media.V1.MediaProcessorContext ' . \implode(' ', $context) . ']'; } }PKt[=N".Twilio/Rest/Media/V1/PlayerStreamerOptions.phpnu[options['video'] = $video; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['maxDuration'] = $maxDuration; } /** * Specifies whether the PlayerStreamer is configured to stream video. Defaults to `true`. * * @param bool $video Whether the PlayerStreamer is configured to stream video * @return $this Fluent Builder */ public function setVideo(bool $video): self { $this->options['video'] = $video; return $this; } /** * The URL to which Twilio will send asynchronous webhook requests for every PlayerStreamer event. See [Status Callbacks](/docs/live/status-callbacks) for more details. * * @param string $statusCallback The URL to which Twilio will send * PlayerStreamer event updates * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method Twilio should use to call the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`. * * @param string $statusCallbackMethod The HTTP method Twilio should use to * call the `status_callback` URL * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The maximum time, in seconds, that the PlayerStreamer is active (`created` or `started`) before automatically ends. The default value is 300 seconds, and the maximum value is 90000 seconds. Once this maximum duration is reached, Twilio will end the PlayerStreamer, regardless of whether media is still streaming. * * @param int $maxDuration Maximum PlayerStreamer duration in seconds * @return $this Fluent Builder */ public function setMaxDuration(int $maxDuration): self { $this->options['maxDuration'] = $maxDuration; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Media.V1.CreatePlayerStreamerOptions ' . $options . ']'; } } class ReadPlayerStreamerOptions extends Options { /** * @param string $order The sort order of the list * @param string $status Status to filter by */ public function __construct(string $order = Values::NONE, string $status = Values::NONE) { $this->options['order'] = $order; $this->options['status'] = $status; } /** * The sort order of the list by `date_created`. Can be: `asc` (ascending) or `desc` (descending) with `desc` as the default. * * @param string $order The sort order of the list * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * Status to filter by, with possible values `created`, `started`, `ended`, or `failed`. * * @param string $status Status to filter by * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Media.V1.ReadPlayerStreamerOptions ' . $options . ']'; } }PKt[T.Twilio/Rest/Media/V1/MediaRecordingContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/MediaRecordings/' . \rawurlencode($sid) . ''; } /** * Delete the MediaRecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the MediaRecordingInstance * * @return MediaRecordingInstance Fetched MediaRecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MediaRecordingInstance { $payload = $this->version->fetch('GET', $this->uri); return new MediaRecordingInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Media.V1.MediaRecordingContext ' . \implode(' ', $context) . ']'; } }PKt[ p+Twilio/Rest/Media/V1/PlayerStreamerPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PlayerStreamerInstance \Twilio\Rest\Media\V1\PlayerStreamerInstance */ public function buildInstance(array $payload): PlayerStreamerInstance { return new PlayerStreamerInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Media.V1.PlayerStreamerPage]'; } }PKt[jP+Twilio/Rest/Media/V1/MediaProcessorList.phpnu[solution = []; $this->uri = '/MediaProcessors'; } /** * Create the MediaProcessorInstance * * @param string $extension The Media Extension name or URL * @param string $extensionContext The Media Extension context * @param array|Options $options Optional Arguments * @return MediaProcessorInstance Created MediaProcessorInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $extension, string $extensionContext, array $options = []): MediaProcessorInstance { $options = new Values($options); $data = Values::of([ 'Extension' => $extension, 'ExtensionContext' => $extensionContext, 'ExtensionEnvironment' => Serialize::jsonObject($options['extensionEnvironment']), 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'MaxDuration' => $options['maxDuration'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MediaProcessorInstance($this->version, $payload); } /** * Streams MediaProcessorInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MediaProcessorInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MediaProcessorInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MediaProcessorInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MediaProcessorPage Page of MediaProcessorInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MediaProcessorPage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MediaProcessorPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MediaProcessorInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MediaProcessorPage Page of MediaProcessorInstance */ public function getPage(string $targetUrl): MediaProcessorPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MediaProcessorPage($this->version, $response, $this->solution); } /** * Constructs a MediaProcessorContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): MediaProcessorContext { return new MediaProcessorContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Media.V1.MediaProcessorList]'; } }PKt[[kk+Twilio/Rest/Media/V1/MediaRecordingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MediaRecordingInstance \Twilio\Rest\Media\V1\MediaRecordingInstance */ public function buildInstance(array $payload): MediaRecordingInstance { return new MediaRecordingInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Media.V1.MediaRecordingPage]'; } }PKt[wϪ+Twilio/Rest/Media/V1/PlayerStreamerList.phpnu[solution = []; $this->uri = '/PlayerStreamers'; } /** * Create the PlayerStreamerInstance * * @param array|Options $options Optional Arguments * @return PlayerStreamerInstance Created PlayerStreamerInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): PlayerStreamerInstance { $options = new Values($options); $data = Values::of([ 'Video' => Serialize::booleanToString($options['video']), 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'MaxDuration' => $options['maxDuration'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new PlayerStreamerInstance($this->version, $payload); } /** * Streams PlayerStreamerInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads PlayerStreamerInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return PlayerStreamerInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of PlayerStreamerInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return PlayerStreamerPage Page of PlayerStreamerInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): PlayerStreamerPage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new PlayerStreamerPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of PlayerStreamerInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return PlayerStreamerPage Page of PlayerStreamerInstance */ public function getPage(string $targetUrl): PlayerStreamerPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new PlayerStreamerPage($this->version, $response, $this->solution); } /** * Constructs a PlayerStreamerContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): PlayerStreamerContext { return new PlayerStreamerContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Media.V1.PlayerStreamerList]'; } }PKt[5/Twilio/Rest/Media/V1/MediaProcessorInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'extension' => Values::array_get($payload, 'extension'), 'extensionContext' => Values::array_get($payload, 'extension_context'), 'status' => Values::array_get($payload, 'status'), 'url' => Values::array_get($payload, 'url'), 'endedReason' => Values::array_get($payload, 'ended_reason'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'maxDuration' => Values::array_get($payload, 'max_duration'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MediaProcessorContext Context for this MediaProcessorInstance */ protected function proxy(): MediaProcessorContext { if (!$this->context) { $this->context = new MediaProcessorContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the MediaProcessorInstance * * @return MediaProcessorInstance Fetched MediaProcessorInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MediaProcessorInstance { return $this->proxy()->fetch(); } /** * Update the MediaProcessorInstance * * @param string $status The status of the MediaProcessor * @return MediaProcessorInstance Updated MediaProcessorInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): MediaProcessorInstance { return $this->proxy()->update($status); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Media.V1.MediaProcessorInstance ' . \implode(' ', $context) . ']'; } }PKt[=.Twilio/Rest/Media/V1/PlayerStreamerContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/PlayerStreamers/' . \rawurlencode($sid) . ''; } /** * Fetch the PlayerStreamerInstance * * @return PlayerStreamerInstance Fetched PlayerStreamerInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PlayerStreamerInstance { $payload = $this->version->fetch('GET', $this->uri); return new PlayerStreamerInstance($this->version, $payload, $this->solution['sid']); } /** * Update the PlayerStreamerInstance * * @param string $status The status the PlayerStreamer should be transitioned to * @return PlayerStreamerInstance Updated PlayerStreamerInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): PlayerStreamerInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new PlayerStreamerInstance($this->version, $payload, $this->solution['sid']); } /** * Access the playbackGrant */ protected function getPlaybackGrant(): PlaybackGrantList { if (!$this->_playbackGrant) { $this->_playbackGrant = new PlaybackGrantList($this->version, $this->solution['sid']); } return $this->_playbackGrant; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Media.V1.PlayerStreamerContext ' . \implode(' ', $context) . ']'; } }PKt[=Q/Twilio/Rest/Media/V1/PlayerStreamerInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'video' => Values::array_get($payload, 'video'), 'links' => Values::array_get($payload, 'links'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'url' => Values::array_get($payload, 'url'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'endedReason' => Values::array_get($payload, 'ended_reason'), 'maxDuration' => Values::array_get($payload, 'max_duration'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PlayerStreamerContext Context for this PlayerStreamerInstance */ protected function proxy(): PlayerStreamerContext { if (!$this->context) { $this->context = new PlayerStreamerContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the PlayerStreamerInstance * * @return PlayerStreamerInstance Fetched PlayerStreamerInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PlayerStreamerInstance { return $this->proxy()->fetch(); } /** * Update the PlayerStreamerInstance * * @param string $status The status the PlayerStreamer should be transitioned to * @return PlayerStreamerInstance Updated PlayerStreamerInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): PlayerStreamerInstance { return $this->proxy()->update($status); } /** * Access the playbackGrant */ protected function getPlaybackGrant(): PlaybackGrantList { return $this->proxy()->playbackGrant; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Media.V1.PlayerStreamerInstance ' . \implode(' ', $context) . ']'; } }PKt[Jr.Twilio/Rest/Media/V1/MediaProcessorOptions.phpnu[options['extensionEnvironment'] = $extensionEnvironment; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['maxDuration'] = $maxDuration; } /** * User-defined environment variables for the Media Extension, represented as a JSON dictionary of key/value strings. See the documentation for the specific [Media Extension](/docs/live/api/media-extensions-overview) you are using for more information about whether you need to provide this. * * @param array $extensionEnvironment The Media Extension environment * @return $this Fluent Builder */ public function setExtensionEnvironment(array $extensionEnvironment): self { $this->options['extensionEnvironment'] = $extensionEnvironment; return $this; } /** * The URL to which Twilio will send asynchronous webhook requests for every MediaProcessor event. See [Status Callbacks](/docs/live/status-callbacks) for details. * * @param string $statusCallback The URL to send MediaProcessor event updates * to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method Twilio should use to call the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`. * * @param string $statusCallbackMethod The HTTP method Twilio should use to * call the `status_callback` URL * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The maximum time, in seconds, that the MediaProcessor can run before automatically ends. The default value is 300 seconds, and the maximum value is 90000 seconds. Once this maximum duration is reached, Twilio will end the MediaProcessor, regardless of whether media is still streaming. * * @param int $maxDuration Maximum MediaProcessor duration in minutes * @return $this Fluent Builder */ public function setMaxDuration(int $maxDuration): self { $this->options['maxDuration'] = $maxDuration; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Media.V1.CreateMediaProcessorOptions ' . $options . ']'; } } class ReadMediaProcessorOptions extends Options { /** * @param string $order The sort order of the list * @param string $status Status to filter by */ public function __construct(string $order = Values::NONE, string $status = Values::NONE) { $this->options['order'] = $order; $this->options['status'] = $status; } /** * The sort order of the list by `date_created`. Can be: `asc` (ascending) or `desc` (descending) with `desc` as the default. * * @param string $order The sort order of the list * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * Status to filter by, with possible values `started`, `ended` or `failed`. * * @param string $status Status to filter by * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Media.V1.ReadMediaProcessorOptions ' . $options . ']'; } }PKt[!z)P P Twilio/Rest/Media/V1.phpnu[version = 'v1'; } protected function getMediaProcessor(): MediaProcessorList { if (!$this->_mediaProcessor) { $this->_mediaProcessor = new MediaProcessorList($this); } return $this->_mediaProcessor; } protected function getMediaRecording(): MediaRecordingList { if (!$this->_mediaRecording) { $this->_mediaRecording = new MediaRecordingList($this); } return $this->_mediaRecording; } protected function getPlayerStreamer(): PlayerStreamerList { if (!$this->_playerStreamer) { $this->_playerStreamer = new PlayerStreamerList($this); } return $this->_playerStreamer; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Media.V1]'; } }PKt[\-Twilio/Rest/Messaging/V1/DomainConfigPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DomainConfigInstance \Twilio\Rest\Messaging\V1\DomainConfigInstance */ public function buildInstance(array $payload): DomainConfigInstance { return new DomainConfigInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.DomainConfigPage]'; } }PKt[tm5Twilio/Rest/Messaging/V1/BrandRegistrationContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/a2p/BrandRegistrations/' . \rawurlencode($sid) . ''; } /** * Fetch the BrandRegistrationInstance * * @return BrandRegistrationInstance Fetched BrandRegistrationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BrandRegistrationInstance { $payload = $this->version->fetch('GET', $this->uri); return new BrandRegistrationInstance($this->version, $payload, $this->solution['sid']); } /** * Update the BrandRegistrationInstance * * @return BrandRegistrationInstance Updated BrandRegistrationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(): BrandRegistrationInstance { $payload = $this->version->update('POST', $this->uri); return new BrandRegistrationInstance($this->version, $payload, $this->solution['sid']); } /** * Access the brandVettings */ protected function getBrandVettings(): BrandVettingList { if (!$this->_brandVettings) { $this->_brandVettings = new BrandVettingList($this->version, $this->solution['sid']); } return $this->_brandVettings; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.BrandRegistrationContext ' . \implode(' ', $context) . ']'; } }PKt[E$L1Twilio/Rest/Messaging/V1/ExternalCampaignList.phpnu[solution = []; $this->uri = '/Services/PreregisteredUsa2p'; } /** * Create the ExternalCampaignInstance * * @param string $campaignId ID of the preregistered campaign. * @param string $messagingServiceSid The SID of the Messaging Service the * resource is associated with * @return ExternalCampaignInstance Created ExternalCampaignInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $campaignId, string $messagingServiceSid): ExternalCampaignInstance { $data = Values::of(['CampaignId' => $campaignId, 'MessagingServiceSid' => $messagingServiceSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ExternalCampaignInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.ExternalCampaignList]'; } }PKt[L8Twilio/Rest/Messaging/V1/TollfreeVerificationContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Tollfree/Verifications/' . \rawurlencode($sid) . ''; } /** * Fetch the TollfreeVerificationInstance * * @return TollfreeVerificationInstance Fetched TollfreeVerificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TollfreeVerificationInstance { $payload = $this->version->fetch('GET', $this->uri); return new TollfreeVerificationInstance($this->version, $payload, $this->solution['sid']); } /** * Update the TollfreeVerificationInstance * * @param array|Options $options Optional Arguments * @return TollfreeVerificationInstance Updated TollfreeVerificationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TollfreeVerificationInstance { $options = new Values($options); $data = Values::of([ 'BusinessName' => $options['businessName'], 'BusinessWebsite' => $options['businessWebsite'], 'NotificationEmail' => $options['notificationEmail'], 'UseCaseCategories' => Serialize::map($options['useCaseCategories'], function($e) { return $e; }), 'UseCaseSummary' => $options['useCaseSummary'], 'ProductionMessageSample' => $options['productionMessageSample'], 'OptInImageUrls' => Serialize::map($options['optInImageUrls'], function($e) { return $e; }), 'OptInType' => $options['optInType'], 'MessageVolume' => $options['messageVolume'], 'BusinessStreetAddress' => $options['businessStreetAddress'], 'BusinessStreetAddress2' => $options['businessStreetAddress2'], 'BusinessCity' => $options['businessCity'], 'BusinessStateProvinceRegion' => $options['businessStateProvinceRegion'], 'BusinessPostalCode' => $options['businessPostalCode'], 'BusinessCountry' => $options['businessCountry'], 'AdditionalInformation' => $options['additionalInformation'], 'BusinessContactFirstName' => $options['businessContactFirstName'], 'BusinessContactLastName' => $options['businessContactLastName'], 'BusinessContactEmail' => $options['businessContactEmail'], 'BusinessContactPhone' => $options['businessContactPhone'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TollfreeVerificationInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.TollfreeVerificationContext ' . \implode(' ', $context) . ']'; } }PKt[q))1Twilio/Rest/Messaging/V1/ExternalCampaignPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ExternalCampaignInstance \Twilio\Rest\Messaging\V1\ExternalCampaignInstance */ public function buildInstance(array $payload): ExternalCampaignInstance { return new ExternalCampaignInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.ExternalCampaignPage]'; } }PKt[2Twilio/Rest/Messaging/V1/BrandRegistrationList.phpnu[solution = []; $this->uri = '/a2p/BrandRegistrations'; } /** * Streams BrandRegistrationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BrandRegistrationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BrandRegistrationInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of BrandRegistrationInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BrandRegistrationPage Page of BrandRegistrationInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BrandRegistrationPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BrandRegistrationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BrandRegistrationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BrandRegistrationPage Page of BrandRegistrationInstance */ public function getPage(string $targetUrl): BrandRegistrationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BrandRegistrationPage($this->version, $response, $this->solution); } /** * Create the BrandRegistrationInstance * * @param string $customerProfileBundleSid Customer Profile Bundle Sid * @param string $a2PProfileBundleSid A2P Messaging Profile Bundle Sid * @param array|Options $options Optional Arguments * @return BrandRegistrationInstance Created BrandRegistrationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $customerProfileBundleSid, string $a2PProfileBundleSid, array $options = []): BrandRegistrationInstance { $options = new Values($options); $data = Values::of([ 'CustomerProfileBundleSid' => $customerProfileBundleSid, 'A2PProfileBundleSid' => $a2PProfileBundleSid, 'BrandType' => $options['brandType'], 'Mock' => Serialize::booleanToString($options['mock']), 'SkipAutomaticSecVet' => Serialize::booleanToString($options['skipAutomaticSecVet']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new BrandRegistrationInstance($this->version, $payload); } /** * Constructs a BrandRegistrationContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): BrandRegistrationContext { return new BrandRegistrationContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.BrandRegistrationList]'; } }PKt[`Բ889Twilio/Rest/Messaging/V1/TollfreeVerificationInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'customerProfileSid' => Values::array_get($payload, 'customer_profile_sid'), 'trustProductSid' => Values::array_get($payload, 'trust_product_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'regulatedItemSid' => Values::array_get($payload, 'regulated_item_sid'), 'businessName' => Values::array_get($payload, 'business_name'), 'businessStreetAddress' => Values::array_get($payload, 'business_street_address'), 'businessStreetAddress2' => Values::array_get($payload, 'business_street_address2'), 'businessCity' => Values::array_get($payload, 'business_city'), 'businessStateProvinceRegion' => Values::array_get($payload, 'business_state_province_region'), 'businessPostalCode' => Values::array_get($payload, 'business_postal_code'), 'businessCountry' => Values::array_get($payload, 'business_country'), 'businessWebsite' => Values::array_get($payload, 'business_website'), 'businessContactFirstName' => Values::array_get($payload, 'business_contact_first_name'), 'businessContactLastName' => Values::array_get($payload, 'business_contact_last_name'), 'businessContactEmail' => Values::array_get($payload, 'business_contact_email'), 'businessContactPhone' => Values::array_get($payload, 'business_contact_phone'), 'notificationEmail' => Values::array_get($payload, 'notification_email'), 'useCaseCategories' => Values::array_get($payload, 'use_case_categories'), 'useCaseSummary' => Values::array_get($payload, 'use_case_summary'), 'productionMessageSample' => Values::array_get($payload, 'production_message_sample'), 'optInImageUrls' => Values::array_get($payload, 'opt_in_image_urls'), 'optInType' => Values::array_get($payload, 'opt_in_type'), 'messageVolume' => Values::array_get($payload, 'message_volume'), 'additionalInformation' => Values::array_get($payload, 'additional_information'), 'tollfreePhoneNumberSid' => Values::array_get($payload, 'tollfree_phone_number_sid'), 'status' => Values::array_get($payload, 'status'), 'url' => Values::array_get($payload, 'url'), 'resourceLinks' => Values::array_get($payload, 'resource_links'), 'externalReferenceId' => Values::array_get($payload, 'external_reference_id'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TollfreeVerificationContext Context for this * TollfreeVerificationInstance */ protected function proxy(): TollfreeVerificationContext { if (!$this->context) { $this->context = new TollfreeVerificationContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the TollfreeVerificationInstance * * @return TollfreeVerificationInstance Fetched TollfreeVerificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TollfreeVerificationInstance { return $this->proxy()->fetch(); } /** * Update the TollfreeVerificationInstance * * @param array|Options $options Optional Arguments * @return TollfreeVerificationInstance Updated TollfreeVerificationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TollfreeVerificationInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.TollfreeVerificationInstance ' . \implode(' ', $context) . ']'; } }PKt[SH.Twilio/Rest/Messaging/V1/DeactivationsList.phpnu[solution = []; } /** * Constructs a DeactivationsContext */ public function getContext(): DeactivationsContext { return new DeactivationsContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.DeactivationsList]'; } }PKt[*5Twilio/Rest/Messaging/V1/BrandRegistrationOptions.phpnu[options['brandType'] = $brandType; $this->options['mock'] = $mock; $this->options['skipAutomaticSecVet'] = $skipAutomaticSecVet; } /** * Type of brand being created. One of: "STANDARD", "STARTER". STARTER is for low volume, starter use cases. STANDARD is for all other use cases. * * @param string $brandType Type of brand being created. One of: "STANDARD", * "STARTER". * @return $this Fluent Builder */ public function setBrandType(string $brandType): self { $this->options['brandType'] = $brandType; return $this; } /** * A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided. * * @param bool $mock A boolean that specifies whether brand should be a mock or * not. If true, brand will be registered as a mock brand. * Defaults to false if no value is provided. * @return $this Fluent Builder */ public function setMock(bool $mock): self { $this->options['mock'] = $mock; return $this; } /** * A flag to disable automatic secondary vetting for brands which it would otherwise be done. * * @param bool $skipAutomaticSecVet Skip Automatic Secondary Vetting * @return $this Fluent Builder */ public function setSkipAutomaticSecVet(bool $skipAutomaticSecVet): self { $this->options['skipAutomaticSecVet'] = $skipAutomaticSecVet; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.CreateBrandRegistrationOptions ' . $options . ']'; } }PKt[l//2Twilio/Rest/Messaging/V1/BrandRegistrationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BrandRegistrationInstance \Twilio\Rest\Messaging\V1\BrandRegistrationInstance */ public function buildInstance(array $payload): BrandRegistrationInstance { return new BrandRegistrationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.BrandRegistrationPage]'; } }PKt[7&&2Twilio/Rest/Messaging/V1/Service/ShortCodeList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/ShortCodes'; } /** * Create the ShortCodeInstance * * @param string $shortCodeSid The SID of the ShortCode being added to the * Service * @return ShortCodeInstance Created ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $shortCodeSid): ShortCodeInstance { $data = Values::of(['ShortCodeSid' => $shortCodeSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams ShortCodeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ShortCodeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ShortCodeInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ShortCodeInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ShortCodePage Page of ShortCodeInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ShortCodePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ShortCodePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ShortCodeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ShortCodePage Page of ShortCodeInstance */ public function getPage(string $targetUrl): ShortCodePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ShortCodePage($this->version, $response, $this->solution); } /** * Constructs a ShortCodeContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): ShortCodeContext { return new ShortCodeContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.ShortCodeList]'; } }PKt[1m57Twilio/Rest/Messaging/V1/Service/AlphaSenderContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/AlphaSenders/' . \rawurlencode($sid) . ''; } /** * Fetch the AlphaSenderInstance * * @return AlphaSenderInstance Fetched AlphaSenderInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AlphaSenderInstance { $payload = $this->version->fetch('GET', $this->uri); return new AlphaSenderInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the AlphaSenderInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.AlphaSenderContext ' . \implode(' ', $context) . ']'; } }PKt[ͻ'6Twilio/Rest/Messaging/V1/Service/UsAppToPersonList.phpnu[solution = ['messagingServiceSid' => $messagingServiceSid, ]; $this->uri = '/Services/' . \rawurlencode($messagingServiceSid) . '/Compliance/Usa2p'; } /** * Create the UsAppToPersonInstance * * @param string $brandRegistrationSid A2P Brand Registration SID * @param string $description A short description of what this SMS campaign does * @param string $messageFlow The message flow of the campaign * @param string[] $messageSamples Message samples * @param string $usAppToPersonUsecase A2P Campaign Use Case. * @param bool $hasEmbeddedLinks Indicates that this SMS campaign will send * messages that contain links * @param bool $hasEmbeddedPhone Indicates that this SMS campaign will send * messages that contain phone numbers * @param array|Options $options Optional Arguments * @return UsAppToPersonInstance Created UsAppToPersonInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $brandRegistrationSid, string $description, string $messageFlow, array $messageSamples, string $usAppToPersonUsecase, bool $hasEmbeddedLinks, bool $hasEmbeddedPhone, array $options = []): UsAppToPersonInstance { $options = new Values($options); $data = Values::of([ 'BrandRegistrationSid' => $brandRegistrationSid, 'Description' => $description, 'MessageFlow' => $messageFlow, 'MessageSamples' => Serialize::map($messageSamples, function($e) { return $e; }), 'UsAppToPersonUsecase' => $usAppToPersonUsecase, 'HasEmbeddedLinks' => Serialize::booleanToString($hasEmbeddedLinks), 'HasEmbeddedPhone' => Serialize::booleanToString($hasEmbeddedPhone), 'OptInMessage' => $options['optInMessage'], 'OptOutMessage' => $options['optOutMessage'], 'HelpMessage' => $options['helpMessage'], 'OptInKeywords' => Serialize::map($options['optInKeywords'], function($e) { return $e; }), 'OptOutKeywords' => Serialize::map($options['optOutKeywords'], function($e) { return $e; }), 'HelpKeywords' => Serialize::map($options['helpKeywords'], function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new UsAppToPersonInstance($this->version, $payload, $this->solution['messagingServiceSid']); } /** * Streams UsAppToPersonInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UsAppToPersonInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UsAppToPersonInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UsAppToPersonInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UsAppToPersonPage Page of UsAppToPersonInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UsAppToPersonPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UsAppToPersonPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UsAppToPersonInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UsAppToPersonPage Page of UsAppToPersonInstance */ public function getPage(string $targetUrl): UsAppToPersonPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UsAppToPersonPage($this->version, $response, $this->solution); } /** * Constructs a UsAppToPersonContext * * @param string $sid The SID that identifies the US A2P Compliance resource to * fetch */ public function getContext(string $sid): UsAppToPersonContext { return new UsAppToPersonContext($this->version, $this->solution['messagingServiceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.UsAppToPersonList]'; } }PKt[^Kg::4Twilio/Rest/Messaging/V1/Service/PhoneNumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PhoneNumberInstance \Twilio\Rest\Messaging\V1\Service\PhoneNumberInstance */ public function buildInstance(array $payload): PhoneNumberInstance { return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.PhoneNumberPage]'; } }PKt[B..2Twilio/Rest/Messaging/V1/Service/ShortCodePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ShortCodeInstance \Twilio\Rest\Messaging\V1\Service\ShortCodeInstance */ public function buildInstance(array $payload): ShortCodeInstance { return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.ShortCodePage]'; } }PKt[E 9Twilio/Rest/Messaging/V1/Service/UsAppToPersonOptions.phpnu[options['optInMessage'] = $optInMessage; $this->options['optOutMessage'] = $optOutMessage; $this->options['helpMessage'] = $helpMessage; $this->options['optInKeywords'] = $optInKeywords; $this->options['optOutKeywords'] = $optOutKeywords; $this->options['helpKeywords'] = $helpKeywords; } /** * If end users can text in a keyword to start receiving messages from this campaign, the auto-reply messages sent to the end users must be provided. The opt-in response should include the Brand name, confirmation of opt-in enrollment to a recurring message campaign, how to get help, and clear description of how to opt-out. This field is required if end users can text in a keyword to start receiving messages from this campaign. 20 character minimum. 320 character maximum. * * @param string $optInMessage Opt In Message * @return $this Fluent Builder */ public function setOptInMessage(string $optInMessage): self { $this->options['optInMessage'] = $optInMessage; return $this; } /** * Upon receiving the opt-out keywords from the end users, Twilio customers are expected to send back an auto-generated response, which must provide acknowledgment of the opt-out request and confirmation that no further messages will be sent. It is also recommended that these opt-out messages include the brand name. This field is required if managing opt out keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). 20 character minimum. 320 character maximum. * * @param string $optOutMessage Opt Out Message * @return $this Fluent Builder */ public function setOptOutMessage(string $optOutMessage): self { $this->options['optOutMessage'] = $optOutMessage; return $this; } /** * When customers receive the help keywords from their end users, Twilio customers are expected to send back an auto-generated response; this may include the brand name and additional support contact information. This field is required if managing help keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). 20 character minimum. 320 character maximum. * * @param string $helpMessage Help Message * @return $this Fluent Builder */ public function setHelpMessage(string $helpMessage): self { $this->options['helpMessage'] = $helpMessage; return $this; } /** * If end users can text in a keyword to start receiving messages from this campaign, those keywords must be provided. This field is required if end users can text in a keyword to start receiving messages from this campaign. Values must be alphanumeric. 255 character maximum. * * @param string[] $optInKeywords Opt In Keywords * @return $this Fluent Builder */ public function setOptInKeywords(array $optInKeywords): self { $this->options['optInKeywords'] = $optInKeywords; return $this; } /** * End users should be able to text in a keyword to stop receiving messages from this campaign. Those keywords must be provided. This field is required if managing opt out keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). Values must be alphanumeric. 255 character maximum. * * @param string[] $optOutKeywords Opt Out Keywords * @return $this Fluent Builder */ public function setOptOutKeywords(array $optOutKeywords): self { $this->options['optOutKeywords'] = $optOutKeywords; return $this; } /** * End users should be able to text in a keyword to receive help. Those keywords must be provided as part of the campaign registration request. This field is required if managing help keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). Values must be alphanumeric. 255 character maximum. * * @param string[] $helpKeywords Help Keywords * @return $this Fluent Builder */ public function setHelpKeywords(array $helpKeywords): self { $this->options['helpKeywords'] = $helpKeywords; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.CreateUsAppToPersonOptions ' . $options . ']'; } }PKt[-7Twilio/Rest/Messaging/V1/Service/PhoneNumberContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/PhoneNumbers/' . \rawurlencode($sid) . ''; } /** * Delete the PhoneNumberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the PhoneNumberInstance * * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PhoneNumberInstance { $payload = $this->version->fetch('GET', $this->uri); return new PhoneNumberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.PhoneNumberContext ' . \implode(' ', $context) . ']'; } }PKt[n:Twilio/Rest/Messaging/V1/Service/UsAppToPersonInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'brandRegistrationSid' => Values::array_get($payload, 'brand_registration_sid'), 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), 'description' => Values::array_get($payload, 'description'), 'messageSamples' => Values::array_get($payload, 'message_samples'), 'usAppToPersonUsecase' => Values::array_get($payload, 'us_app_to_person_usecase'), 'hasEmbeddedLinks' => Values::array_get($payload, 'has_embedded_links'), 'hasEmbeddedPhone' => Values::array_get($payload, 'has_embedded_phone'), 'campaignStatus' => Values::array_get($payload, 'campaign_status'), 'campaignId' => Values::array_get($payload, 'campaign_id'), 'isExternallyRegistered' => Values::array_get($payload, 'is_externally_registered'), 'rateLimits' => Values::array_get($payload, 'rate_limits'), 'messageFlow' => Values::array_get($payload, 'message_flow'), 'optInMessage' => Values::array_get($payload, 'opt_in_message'), 'optOutMessage' => Values::array_get($payload, 'opt_out_message'), 'helpMessage' => Values::array_get($payload, 'help_message'), 'optInKeywords' => Values::array_get($payload, 'opt_in_keywords'), 'optOutKeywords' => Values::array_get($payload, 'opt_out_keywords'), 'helpKeywords' => Values::array_get($payload, 'help_keywords'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'mock' => Values::array_get($payload, 'mock'), ]; $this->solution = [ 'messagingServiceSid' => $messagingServiceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UsAppToPersonContext Context for this UsAppToPersonInstance */ protected function proxy(): UsAppToPersonContext { if (!$this->context) { $this->context = new UsAppToPersonContext( $this->version, $this->solution['messagingServiceSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the UsAppToPersonInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the UsAppToPersonInstance * * @return UsAppToPersonInstance Fetched UsAppToPersonInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UsAppToPersonInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.UsAppToPersonInstance ' . \implode(' ', $context) . ']'; } }PKt[ċm::4Twilio/Rest/Messaging/V1/Service/AlphaSenderPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AlphaSenderInstance \Twilio\Rest\Messaging\V1\Service\AlphaSenderInstance */ public function buildInstance(array $payload): AlphaSenderInstance { return new AlphaSenderInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.AlphaSenderPage]'; } }PKt[$GdA5Twilio/Rest/Messaging/V1/Service/ShortCodeContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/ShortCodes/' . \rawurlencode($sid) . ''; } /** * Delete the ShortCodeInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the ShortCodeInstance * * @return ShortCodeInstance Fetched ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ShortCodeInstance { $payload = $this->version->fetch('GET', $this->uri); return new ShortCodeInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.ShortCodeContext ' . \implode(' ', $context) . ']'; } }PKt[tQv@Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseOptions.phpnu[options['brandRegistrationSid'] = $brandRegistrationSid; } /** * The unique string to identify the A2P brand. * * @param string $brandRegistrationSid A2P Brand Registration SID * @return $this Fluent Builder */ public function setBrandRegistrationSid(string $brandRegistrationSid): self { $this->options['brandRegistrationSid'] = $brandRegistrationSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.FetchUsAppToPersonUsecaseOptions ' . $options . ']'; } }PKt[$4Twilio/Rest/Messaging/V1/Service/AlphaSenderList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/AlphaSenders'; } /** * Create the AlphaSenderInstance * * @param string $alphaSender The Alphanumeric Sender ID string * @return AlphaSenderInstance Created AlphaSenderInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $alphaSender): AlphaSenderInstance { $data = Values::of(['AlphaSender' => $alphaSender, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AlphaSenderInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams AlphaSenderInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AlphaSenderInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AlphaSenderInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AlphaSenderInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AlphaSenderPage Page of AlphaSenderInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AlphaSenderPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AlphaSenderPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AlphaSenderInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AlphaSenderPage Page of AlphaSenderInstance */ public function getPage(string $targetUrl): AlphaSenderPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AlphaSenderPage($this->version, $response, $this->solution); } /** * Constructs a AlphaSenderContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): AlphaSenderContext { return new AlphaSenderContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.AlphaSenderList]'; } }PKt[ ee4Twilio/Rest/Messaging/V1/Service/PhoneNumberList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/PhoneNumbers'; } /** * Create the PhoneNumberInstance * * @param string $phoneNumberSid The SID of the Phone Number being added to the * Service * @return PhoneNumberInstance Created PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumberSid): PhoneNumberInstance { $data = Values::of(['PhoneNumberSid' => $phoneNumberSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams PhoneNumberInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads PhoneNumberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return PhoneNumberInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of PhoneNumberInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return PhoneNumberPage Page of PhoneNumberInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): PhoneNumberPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new PhoneNumberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of PhoneNumberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return PhoneNumberPage Page of PhoneNumberInstance */ public function getPage(string $targetUrl): PhoneNumberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new PhoneNumberPage($this->version, $response, $this->solution); } /** * Constructs a PhoneNumberContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): PhoneNumberContext { return new PhoneNumberContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.PhoneNumberList]'; } }PKt[ΞZOO6Twilio/Rest/Messaging/V1/Service/UsAppToPersonPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UsAppToPersonInstance \Twilio\Rest\Messaging\V1\Service\UsAppToPersonInstance */ public function buildInstance(array $payload): UsAppToPersonInstance { return new UsAppToPersonInstance($this->version, $payload, $this->solution['messagingServiceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.UsAppToPersonPage]'; } }PKt[eATwilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseInstance.phpnu[properties = [ 'usAppToPersonUsecases' => Values::array_get($payload, 'us_app_to_person_usecases'), ]; $this->solution = ['messagingServiceSid' => $messagingServiceSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.UsAppToPersonUsecaseInstance]'; } }PKt[G_=Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseList.phpnu[solution = ['messagingServiceSid' => $messagingServiceSid, ]; $this->uri = '/Services/' . \rawurlencode($messagingServiceSid) . '/Compliance/Usa2p/Usecases'; } /** * Fetch the UsAppToPersonUsecaseInstance * * @param array|Options $options Optional Arguments * @return UsAppToPersonUsecaseInstance Fetched UsAppToPersonUsecaseInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): UsAppToPersonUsecaseInstance { $options = new Values($options); $params = Values::of(['BrandRegistrationSid' => $options['brandRegistrationSid'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new UsAppToPersonUsecaseInstance( $this->version, $payload, $this->solution['messagingServiceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.UsAppToPersonUsecaseList]'; } }PKt[UA A 9Twilio/Rest/Messaging/V1/Service/UsAppToPersonContext.phpnu[solution = ['messagingServiceSid' => $messagingServiceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($messagingServiceSid) . '/Compliance/Usa2p/' . \rawurlencode($sid) . ''; } /** * Delete the UsAppToPersonInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the UsAppToPersonInstance * * @return UsAppToPersonInstance Fetched UsAppToPersonInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UsAppToPersonInstance { $payload = $this->version->fetch('GET', $this->uri); return new UsAppToPersonInstance( $this->version, $payload, $this->solution['messagingServiceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.UsAppToPersonContext ' . \implode(' ', $context) . ']'; } }PKt[Cs8Twilio/Rest/Messaging/V1/Service/AlphaSenderInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'alphaSender' => Values::array_get($payload, 'alpha_sender'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AlphaSenderContext Context for this AlphaSenderInstance */ protected function proxy(): AlphaSenderContext { if (!$this->context) { $this->context = new AlphaSenderContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AlphaSenderInstance * * @return AlphaSenderInstance Fetched AlphaSenderInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AlphaSenderInstance { return $this->proxy()->fetch(); } /** * Delete the AlphaSenderInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.AlphaSenderInstance ' . \implode(' ', $context) . ']'; } }PKt[%SK8Twilio/Rest/Messaging/V1/Service/PhoneNumberInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'countryCode' => Values::array_get($payload, 'country_code'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PhoneNumberContext Context for this PhoneNumberInstance */ protected function proxy(): PhoneNumberContext { if (!$this->context) { $this->context = new PhoneNumberContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the PhoneNumberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the PhoneNumberInstance * * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PhoneNumberInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.PhoneNumberInstance ' . \implode(' ', $context) . ']'; } }PKt[^r\hh6Twilio/Rest/Messaging/V1/Service/ShortCodeInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'shortCode' => Values::array_get($payload, 'short_code'), 'countryCode' => Values::array_get($payload, 'country_code'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ShortCodeContext Context for this ShortCodeInstance */ protected function proxy(): ShortCodeContext { if (!$this->context) { $this->context = new ShortCodeContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the ShortCodeInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the ShortCodeInstance * * @return ShortCodeInstance Fetched ShortCodeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ShortCodeInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.ShortCodeInstance ' . \implode(' ', $context) . ']'; } }PKt[$=Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecasePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UsAppToPersonUsecaseInstance \Twilio\Rest\Messaging\V1\Service\UsAppToPersonUsecaseInstance */ public function buildInstance(array $payload): UsAppToPersonUsecaseInstance { return new UsAppToPersonUsecaseInstance( $this->version, $payload, $this->solution['messagingServiceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.UsAppToPersonUsecasePage]'; } }PKt[7!&S S 2Twilio/Rest/Messaging/V1/DeactivationsInstance.phpnu[properties = ['redirectTo' => Values::array_get($payload, 'redirect_to'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DeactivationsContext Context for this DeactivationsInstance */ protected function proxy(): DeactivationsContext { if (!$this->context) { $this->context = new DeactivationsContext($this->version); } return $this->context; } /** * Fetch the DeactivationsInstance * * @param array|Options $options Optional Arguments * @return DeactivationsInstance Fetched DeactivationsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): DeactivationsInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.DeactivationsInstance ' . \implode(' ', $context) . ']'; } }PKt[Mgn<<,Twilio/Rest/Messaging/V1/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'inboundRequestUrl' => Values::array_get($payload, 'inbound_request_url'), 'inboundMethod' => Values::array_get($payload, 'inbound_method'), 'fallbackUrl' => Values::array_get($payload, 'fallback_url'), 'fallbackMethod' => Values::array_get($payload, 'fallback_method'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'stickySender' => Values::array_get($payload, 'sticky_sender'), 'mmsConverter' => Values::array_get($payload, 'mms_converter'), 'smartEncoding' => Values::array_get($payload, 'smart_encoding'), 'scanMessageContent' => Values::array_get($payload, 'scan_message_content'), 'fallbackToLongCode' => Values::array_get($payload, 'fallback_to_long_code'), 'areaCodeGeomatch' => Values::array_get($payload, 'area_code_geomatch'), 'synchronousValidation' => Values::array_get($payload, 'synchronous_validation'), 'validityPeriod' => Values::array_get($payload, 'validity_period'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'usecase' => Values::array_get($payload, 'usecase'), 'usAppToPersonRegistered' => Values::array_get($payload, 'us_app_to_person_registered'), 'useInboundWebhookOnNumber' => Values::array_get($payload, 'use_inbound_webhook_on_number'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the phoneNumbers */ protected function getPhoneNumbers(): PhoneNumberList { return $this->proxy()->phoneNumbers; } /** * Access the shortCodes */ protected function getShortCodes(): ShortCodeList { return $this->proxy()->shortCodes; } /** * Access the alphaSenders */ protected function getAlphaSenders(): AlphaSenderList { return $this->proxy()->alphaSenders; } /** * Access the usAppToPerson */ protected function getUsAppToPerson(): UsAppToPersonList { return $this->proxy()->usAppToPerson; } /** * Access the usAppToPersonUsecases */ protected function getUsAppToPersonUsecases(): UsAppToPersonUsecaseList { return $this->proxy()->usAppToPersonUsecases; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[ #]O(Twilio/Rest/Messaging/V1/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Create the ServiceInstance * * @param string $friendlyName A string to describe the resource * @param array|Options $options Optional Arguments * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'InboundRequestUrl' => $options['inboundRequestUrl'], 'InboundMethod' => $options['inboundMethod'], 'FallbackUrl' => $options['fallbackUrl'], 'FallbackMethod' => $options['fallbackMethod'], 'StatusCallback' => $options['statusCallback'], 'StickySender' => Serialize::booleanToString($options['stickySender']), 'MmsConverter' => Serialize::booleanToString($options['mmsConverter']), 'SmartEncoding' => Serialize::booleanToString($options['smartEncoding']), 'ScanMessageContent' => $options['scanMessageContent'], 'FallbackToLongCode' => Serialize::booleanToString($options['fallbackToLongCode']), 'AreaCodeGeomatch' => Serialize::booleanToString($options['areaCodeGeomatch']), 'ValidityPeriod' => $options['validityPeriod'], 'SynchronousValidation' => Serialize::booleanToString($options['synchronousValidation']), 'Usecase' => $options['usecase'], 'UseInboundWebhookOnNumber' => Serialize::booleanToString($options['useInboundWebhookOnNumber']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Constructs a ServiceContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.ServiceList]'; } }PKt[gÃ+Twilio/Rest/Messaging/V1/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'InboundRequestUrl' => $options['inboundRequestUrl'], 'InboundMethod' => $options['inboundMethod'], 'FallbackUrl' => $options['fallbackUrl'], 'FallbackMethod' => $options['fallbackMethod'], 'StatusCallback' => $options['statusCallback'], 'StickySender' => Serialize::booleanToString($options['stickySender']), 'MmsConverter' => Serialize::booleanToString($options['mmsConverter']), 'SmartEncoding' => Serialize::booleanToString($options['smartEncoding']), 'ScanMessageContent' => $options['scanMessageContent'], 'FallbackToLongCode' => Serialize::booleanToString($options['fallbackToLongCode']), 'AreaCodeGeomatch' => Serialize::booleanToString($options['areaCodeGeomatch']), 'ValidityPeriod' => $options['validityPeriod'], 'SynchronousValidation' => Serialize::booleanToString($options['synchronousValidation']), 'Usecase' => $options['usecase'], 'UseInboundWebhookOnNumber' => Serialize::booleanToString($options['useInboundWebhookOnNumber']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the phoneNumbers */ protected function getPhoneNumbers(): PhoneNumberList { if (!$this->_phoneNumbers) { $this->_phoneNumbers = new PhoneNumberList($this->version, $this->solution['sid']); } return $this->_phoneNumbers; } /** * Access the shortCodes */ protected function getShortCodes(): ShortCodeList { if (!$this->_shortCodes) { $this->_shortCodes = new ShortCodeList($this->version, $this->solution['sid']); } return $this->_shortCodes; } /** * Access the alphaSenders */ protected function getAlphaSenders(): AlphaSenderList { if (!$this->_alphaSenders) { $this->_alphaSenders = new AlphaSenderList($this->version, $this->solution['sid']); } return $this->_alphaSenders; } /** * Access the usAppToPerson */ protected function getUsAppToPerson(): UsAppToPersonList { if (!$this->_usAppToPerson) { $this->_usAppToPerson = new UsAppToPersonList($this->version, $this->solution['sid']); } return $this->_usAppToPerson; } /** * Access the usAppToPersonUsecases */ protected function getUsAppToPersonUsecases(): UsAppToPersonUsecaseList { if (!$this->_usAppToPersonUsecases) { $this->_usAppToPersonUsecases = new UsAppToPersonUsecaseList( $this->version, $this->solution['sid'] ); } return $this->_usAppToPersonUsecases; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[,"(Twilio/Rest/Messaging/V1/UsecaseList.phpnu[solution = []; $this->uri = '/Services/Usecases'; } /** * Fetch the UsecaseInstance * * @return UsecaseInstance Fetched UsecaseInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UsecaseInstance { $payload = $this->version->fetch('GET', $this->uri); return new UsecaseInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.UsecaseList]'; } }PKt[~M=JJ0Twilio/Rest/Messaging/V1/DomainCertsInstance.phpnu[properties = [ 'domainSid' => Values::array_get($payload, 'domain_sid'), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'dateExpires' => Deserialize::dateTime(Values::array_get($payload, 'date_expires')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'domainName' => Values::array_get($payload, 'domain_name'), 'certificateSid' => Values::array_get($payload, 'certificate_sid'), 'url' => Values::array_get($payload, 'url'), 'validated' => Values::array_get($payload, 'validated'), ]; $this->solution = ['domainSid' => $domainSid ?: $this->properties['domainSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DomainCertsContext Context for this DomainCertsInstance */ protected function proxy(): DomainCertsContext { if (!$this->context) { $this->context = new DomainCertsContext($this->version, $this->solution['domainSid']); } return $this->context; } /** * Update the DomainCertsInstance * * @param string $tlsCert Certificate and private key information for this * domain. * @return DomainCertsInstance Updated DomainCertsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $tlsCert): DomainCertsInstance { return $this->proxy()->update($tlsCert); } /** * Fetch the DomainCertsInstance * * @return DomainCertsInstance Fetched DomainCertsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DomainCertsInstance { return $this->proxy()->fetch(); } /** * Delete the DomainCertsInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.DomainCertsInstance ' . \implode(' ', $context) . ']'; } }PKt[pT-Twilio/Rest/Messaging/V1/DomainConfigList.phpnu[solution = []; } /** * Constructs a DomainConfigContext * * @param string $domainSid Unique string used to identify the domain that this * config should be associated with. */ public function getContext(string $domainSid): DomainConfigContext { return new DomainConfigContext($this->version, $domainSid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.DomainConfigList]'; } }PKt[v XX8Twilio/Rest/Messaging/V1/TollfreeVerificationOptions.phpnu[options['tollfreePhoneNumberSid'] = $tollfreePhoneNumberSid; $this->options['status'] = $status; } /** * The SID of the Phone Number associated with the Tollfree Verification. * * @param string $tollfreePhoneNumberSid The SID of the Phone Number associated * with the Tollfree Verification * @return $this Fluent Builder */ public function setTollfreePhoneNumberSid(string $tollfreePhoneNumberSid): self { $this->options['tollfreePhoneNumberSid'] = $tollfreePhoneNumberSid; return $this; } /** * The compliance status of the Tollfree Verification record. * * @param string $status The compliance status of the Tollfree Verification * record. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.ReadTollfreeVerificationOptions ' . $options . ']'; } } class CreateTollfreeVerificationOptions extends Options { /** * @param string $customerProfileSid Customer's Profile Bundle BundleSid * @param string $businessStreetAddress The address of the business or * organization using the Tollfree number * @param string $businessStreetAddress2 The address of the business or * organization using the Tollfree number * @param string $businessCity The city of the business or organization using * the Tollfree number * @param string $businessStateProvinceRegion The state/province/region of the * business or organization using * the Tollfree number * @param string $businessPostalCode The postal code of the business or * organization using the Tollfree number * @param string $businessCountry The country of the business or organization * using the Tollfree number * @param string $additionalInformation Additional information to be provided * for verification * @param string $businessContactFirstName The first name of the contact for * the business or organization using * the Tollfree number * @param string $businessContactLastName The last name of the contact for the * business or organization using the * Tollfree number * @param string $businessContactEmail The email address of the contact for the * business or organization using the * Tollfree number * @param string $businessContactPhone The phone number of the contact for the * business or organization using the * Tollfree number * @param string $externalReferenceId An optional external reference ID * supplied by customer and echoed back on * status retrieval */ public function __construct(string $customerProfileSid = Values::NONE, string $businessStreetAddress = Values::NONE, string $businessStreetAddress2 = Values::NONE, string $businessCity = Values::NONE, string $businessStateProvinceRegion = Values::NONE, string $businessPostalCode = Values::NONE, string $businessCountry = Values::NONE, string $additionalInformation = Values::NONE, string $businessContactFirstName = Values::NONE, string $businessContactLastName = Values::NONE, string $businessContactEmail = Values::NONE, string $businessContactPhone = Values::NONE, string $externalReferenceId = Values::NONE) { $this->options['customerProfileSid'] = $customerProfileSid; $this->options['businessStreetAddress'] = $businessStreetAddress; $this->options['businessStreetAddress2'] = $businessStreetAddress2; $this->options['businessCity'] = $businessCity; $this->options['businessStateProvinceRegion'] = $businessStateProvinceRegion; $this->options['businessPostalCode'] = $businessPostalCode; $this->options['businessCountry'] = $businessCountry; $this->options['additionalInformation'] = $additionalInformation; $this->options['businessContactFirstName'] = $businessContactFirstName; $this->options['businessContactLastName'] = $businessContactLastName; $this->options['businessContactEmail'] = $businessContactEmail; $this->options['businessContactPhone'] = $businessContactPhone; $this->options['externalReferenceId'] = $externalReferenceId; } /** * Customer's Profile Bundle BundleSid. * * @param string $customerProfileSid Customer's Profile Bundle BundleSid * @return $this Fluent Builder */ public function setCustomerProfileSid(string $customerProfileSid): self { $this->options['customerProfileSid'] = $customerProfileSid; return $this; } /** * The address of the business or organization using the Tollfree number. * * @param string $businessStreetAddress The address of the business or * organization using the Tollfree number * @return $this Fluent Builder */ public function setBusinessStreetAddress(string $businessStreetAddress): self { $this->options['businessStreetAddress'] = $businessStreetAddress; return $this; } /** * The address of the business or organization using the Tollfree number. * * @param string $businessStreetAddress2 The address of the business or * organization using the Tollfree number * @return $this Fluent Builder */ public function setBusinessStreetAddress2(string $businessStreetAddress2): self { $this->options['businessStreetAddress2'] = $businessStreetAddress2; return $this; } /** * The city of the business or organization using the Tollfree number. * * @param string $businessCity The city of the business or organization using * the Tollfree number * @return $this Fluent Builder */ public function setBusinessCity(string $businessCity): self { $this->options['businessCity'] = $businessCity; return $this; } /** * The state/province/region of the business or organization using the Tollfree number. * * @param string $businessStateProvinceRegion The state/province/region of the * business or organization using * the Tollfree number * @return $this Fluent Builder */ public function setBusinessStateProvinceRegion(string $businessStateProvinceRegion): self { $this->options['businessStateProvinceRegion'] = $businessStateProvinceRegion; return $this; } /** * The postal code of the business or organization using the Tollfree number. * * @param string $businessPostalCode The postal code of the business or * organization using the Tollfree number * @return $this Fluent Builder */ public function setBusinessPostalCode(string $businessPostalCode): self { $this->options['businessPostalCode'] = $businessPostalCode; return $this; } /** * The country of the business or organization using the Tollfree number. * * @param string $businessCountry The country of the business or organization * using the Tollfree number * @return $this Fluent Builder */ public function setBusinessCountry(string $businessCountry): self { $this->options['businessCountry'] = $businessCountry; return $this; } /** * Additional information to be provided for verification. * * @param string $additionalInformation Additional information to be provided * for verification * @return $this Fluent Builder */ public function setAdditionalInformation(string $additionalInformation): self { $this->options['additionalInformation'] = $additionalInformation; return $this; } /** * The first name of the contact for the business or organization using the Tollfree number. * * @param string $businessContactFirstName The first name of the contact for * the business or organization using * the Tollfree number * @return $this Fluent Builder */ public function setBusinessContactFirstName(string $businessContactFirstName): self { $this->options['businessContactFirstName'] = $businessContactFirstName; return $this; } /** * The last name of the contact for the business or organization using the Tollfree number. * * @param string $businessContactLastName The last name of the contact for the * business or organization using the * Tollfree number * @return $this Fluent Builder */ public function setBusinessContactLastName(string $businessContactLastName): self { $this->options['businessContactLastName'] = $businessContactLastName; return $this; } /** * The email address of the contact for the business or organization using the Tollfree number. * * @param string $businessContactEmail The email address of the contact for the * business or organization using the * Tollfree number * @return $this Fluent Builder */ public function setBusinessContactEmail(string $businessContactEmail): self { $this->options['businessContactEmail'] = $businessContactEmail; return $this; } /** * The phone number of the contact for the business or organization using the Tollfree number. * * @param string $businessContactPhone The phone number of the contact for the * business or organization using the * Tollfree number * @return $this Fluent Builder */ public function setBusinessContactPhone(string $businessContactPhone): self { $this->options['businessContactPhone'] = $businessContactPhone; return $this; } /** * An optional external reference ID supplied by customer and echoed back on status retrieval. * * @param string $externalReferenceId An optional external reference ID * supplied by customer and echoed back on * status retrieval * @return $this Fluent Builder */ public function setExternalReferenceId(string $externalReferenceId): self { $this->options['externalReferenceId'] = $externalReferenceId; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.CreateTollfreeVerificationOptions ' . $options . ']'; } } class UpdateTollfreeVerificationOptions extends Options { /** * @param string $businessName The name of the business or organization using * the Tollfree number * @param string $businessWebsite The website of the business or organization * using the Tollfree number * @param string $notificationEmail The email address to receive the * notification about the verification result. * @param string[] $useCaseCategories The category of the use case for the * Tollfree Number. List as many are * applicable. * @param string $useCaseSummary Further explaination on how messaging is used * by the business or organization * @param string $productionMessageSample An example of message content, i.e. a * sample message * @param string[] $optInImageUrls Link to an image that shows the opt-in * workflow. Multiple images allowed and must * be a publicly hosted URL * @param string $optInType Describe how a user opts-in to text messages * @param string $messageVolume Estimate monthly volume of messages from the * Tollfree Number * @param string $businessStreetAddress The address of the business or * organization using the Tollfree number * @param string $businessStreetAddress2 The address of the business or * organization using the Tollfree number * @param string $businessCity The city of the business or organization using * the Tollfree number * @param string $businessStateProvinceRegion The state/province/region of the * business or organization using * the Tollfree number * @param string $businessPostalCode The postal code of the business or * organization using the Tollfree number * @param string $businessCountry The country of the business or organization * using the Tollfree number * @param string $additionalInformation Additional information to be provided * for verification * @param string $businessContactFirstName The first name of the contact for * the business or organization using * the Tollfree number * @param string $businessContactLastName The last name of the contact for the * business or organization using the * Tollfree number * @param string $businessContactEmail The email address of the contact for the * business or organization using the * Tollfree number * @param string $businessContactPhone The phone number of the contact for the * business or organization using the * Tollfree number */ public function __construct(string $businessName = Values::NONE, string $businessWebsite = Values::NONE, string $notificationEmail = Values::NONE, array $useCaseCategories = Values::ARRAY_NONE, string $useCaseSummary = Values::NONE, string $productionMessageSample = Values::NONE, array $optInImageUrls = Values::ARRAY_NONE, string $optInType = Values::NONE, string $messageVolume = Values::NONE, string $businessStreetAddress = Values::NONE, string $businessStreetAddress2 = Values::NONE, string $businessCity = Values::NONE, string $businessStateProvinceRegion = Values::NONE, string $businessPostalCode = Values::NONE, string $businessCountry = Values::NONE, string $additionalInformation = Values::NONE, string $businessContactFirstName = Values::NONE, string $businessContactLastName = Values::NONE, string $businessContactEmail = Values::NONE, string $businessContactPhone = Values::NONE) { $this->options['businessName'] = $businessName; $this->options['businessWebsite'] = $businessWebsite; $this->options['notificationEmail'] = $notificationEmail; $this->options['useCaseCategories'] = $useCaseCategories; $this->options['useCaseSummary'] = $useCaseSummary; $this->options['productionMessageSample'] = $productionMessageSample; $this->options['optInImageUrls'] = $optInImageUrls; $this->options['optInType'] = $optInType; $this->options['messageVolume'] = $messageVolume; $this->options['businessStreetAddress'] = $businessStreetAddress; $this->options['businessStreetAddress2'] = $businessStreetAddress2; $this->options['businessCity'] = $businessCity; $this->options['businessStateProvinceRegion'] = $businessStateProvinceRegion; $this->options['businessPostalCode'] = $businessPostalCode; $this->options['businessCountry'] = $businessCountry; $this->options['additionalInformation'] = $additionalInformation; $this->options['businessContactFirstName'] = $businessContactFirstName; $this->options['businessContactLastName'] = $businessContactLastName; $this->options['businessContactEmail'] = $businessContactEmail; $this->options['businessContactPhone'] = $businessContactPhone; } /** * The name of the business or organization using the Tollfree number. * * @param string $businessName The name of the business or organization using * the Tollfree number * @return $this Fluent Builder */ public function setBusinessName(string $businessName): self { $this->options['businessName'] = $businessName; return $this; } /** * The website of the business or organization using the Tollfree number. * * @param string $businessWebsite The website of the business or organization * using the Tollfree number * @return $this Fluent Builder */ public function setBusinessWebsite(string $businessWebsite): self { $this->options['businessWebsite'] = $businessWebsite; return $this; } /** * The email address to receive the notification about the verification result. . * * @param string $notificationEmail The email address to receive the * notification about the verification result. * @return $this Fluent Builder */ public function setNotificationEmail(string $notificationEmail): self { $this->options['notificationEmail'] = $notificationEmail; return $this; } /** * The category of the use case for the Tollfree Number. List as many are applicable.. * * @param string[] $useCaseCategories The category of the use case for the * Tollfree Number. List as many are * applicable. * @return $this Fluent Builder */ public function setUseCaseCategories(array $useCaseCategories): self { $this->options['useCaseCategories'] = $useCaseCategories; return $this; } /** * Use this to further explain how messaging is used by the business or organization. * * @param string $useCaseSummary Further explaination on how messaging is used * by the business or organization * @return $this Fluent Builder */ public function setUseCaseSummary(string $useCaseSummary): self { $this->options['useCaseSummary'] = $useCaseSummary; return $this; } /** * An example of message content, i.e. a sample message. * * @param string $productionMessageSample An example of message content, i.e. a * sample message * @return $this Fluent Builder */ public function setProductionMessageSample(string $productionMessageSample): self { $this->options['productionMessageSample'] = $productionMessageSample; return $this; } /** * Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL. * * @param string[] $optInImageUrls Link to an image that shows the opt-in * workflow. Multiple images allowed and must * be a publicly hosted URL * @return $this Fluent Builder */ public function setOptInImageUrls(array $optInImageUrls): self { $this->options['optInImageUrls'] = $optInImageUrls; return $this; } /** * Describe how a user opts-in to text messages. * * @param string $optInType Describe how a user opts-in to text messages * @return $this Fluent Builder */ public function setOptInType(string $optInType): self { $this->options['optInType'] = $optInType; return $this; } /** * Estimate monthly volume of messages from the Tollfree Number. * * @param string $messageVolume Estimate monthly volume of messages from the * Tollfree Number * @return $this Fluent Builder */ public function setMessageVolume(string $messageVolume): self { $this->options['messageVolume'] = $messageVolume; return $this; } /** * The address of the business or organization using the Tollfree number. * * @param string $businessStreetAddress The address of the business or * organization using the Tollfree number * @return $this Fluent Builder */ public function setBusinessStreetAddress(string $businessStreetAddress): self { $this->options['businessStreetAddress'] = $businessStreetAddress; return $this; } /** * The address of the business or organization using the Tollfree number. * * @param string $businessStreetAddress2 The address of the business or * organization using the Tollfree number * @return $this Fluent Builder */ public function setBusinessStreetAddress2(string $businessStreetAddress2): self { $this->options['businessStreetAddress2'] = $businessStreetAddress2; return $this; } /** * The city of the business or organization using the Tollfree number. * * @param string $businessCity The city of the business or organization using * the Tollfree number * @return $this Fluent Builder */ public function setBusinessCity(string $businessCity): self { $this->options['businessCity'] = $businessCity; return $this; } /** * The state/province/region of the business or organization using the Tollfree number. * * @param string $businessStateProvinceRegion The state/province/region of the * business or organization using * the Tollfree number * @return $this Fluent Builder */ public function setBusinessStateProvinceRegion(string $businessStateProvinceRegion): self { $this->options['businessStateProvinceRegion'] = $businessStateProvinceRegion; return $this; } /** * The postal code of the business or organization using the Tollfree number. * * @param string $businessPostalCode The postal code of the business or * organization using the Tollfree number * @return $this Fluent Builder */ public function setBusinessPostalCode(string $businessPostalCode): self { $this->options['businessPostalCode'] = $businessPostalCode; return $this; } /** * The country of the business or organization using the Tollfree number. * * @param string $businessCountry The country of the business or organization * using the Tollfree number * @return $this Fluent Builder */ public function setBusinessCountry(string $businessCountry): self { $this->options['businessCountry'] = $businessCountry; return $this; } /** * Additional information to be provided for verification. * * @param string $additionalInformation Additional information to be provided * for verification * @return $this Fluent Builder */ public function setAdditionalInformation(string $additionalInformation): self { $this->options['additionalInformation'] = $additionalInformation; return $this; } /** * The first name of the contact for the business or organization using the Tollfree number. * * @param string $businessContactFirstName The first name of the contact for * the business or organization using * the Tollfree number * @return $this Fluent Builder */ public function setBusinessContactFirstName(string $businessContactFirstName): self { $this->options['businessContactFirstName'] = $businessContactFirstName; return $this; } /** * The last name of the contact for the business or organization using the Tollfree number. * * @param string $businessContactLastName The last name of the contact for the * business or organization using the * Tollfree number * @return $this Fluent Builder */ public function setBusinessContactLastName(string $businessContactLastName): self { $this->options['businessContactLastName'] = $businessContactLastName; return $this; } /** * The email address of the contact for the business or organization using the Tollfree number. * * @param string $businessContactEmail The email address of the contact for the * business or organization using the * Tollfree number * @return $this Fluent Builder */ public function setBusinessContactEmail(string $businessContactEmail): self { $this->options['businessContactEmail'] = $businessContactEmail; return $this; } /** * The phone number of the contact for the business or organization using the Tollfree number. * * @param string $businessContactPhone The phone number of the contact for the * business or organization using the * Tollfree number * @return $this Fluent Builder */ public function setBusinessContactPhone(string $businessContactPhone): self { $this->options['businessContactPhone'] = $businessContactPhone; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.UpdateTollfreeVerificationOptions ' . $options . ']'; } }PKt[gT. . 0Twilio/Rest/Messaging/V1/DomainConfigContext.phpnu[solution = ['domainSid' => $domainSid, ]; $this->uri = '/LinkShortening/Domains/' . \rawurlencode($domainSid) . '/Config'; } /** * Update the DomainConfigInstance * * @param string[] $messagingServiceSids A list of messagingServiceSids (with * prefix MG) * @param array|Options $options Optional Arguments * @return DomainConfigInstance Updated DomainConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $messagingServiceSids, array $options = []): DomainConfigInstance { $options = new Values($options); $data = Values::of([ 'MessagingServiceSids' => Serialize::map($messagingServiceSids, function($e) { return $e; }), 'FallbackUrl' => $options['fallbackUrl'], 'CallbackUrl' => $options['callbackUrl'], 'MessagingServiceSidsAction' => $options['messagingServiceSidsAction'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DomainConfigInstance($this->version, $payload, $this->solution['domainSid']); } /** * Fetch the DomainConfigInstance * * @return DomainConfigInstance Fetched DomainConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DomainConfigInstance { $payload = $this->version->fetch('GET', $this->uri); return new DomainConfigInstance($this->version, $payload, $this->solution['domainSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.DomainConfigContext ' . \implode(' ', $context) . ']'; } }PKt["mB0Twilio/Rest/Messaging/V1/DomainConfigOptions.phpnu[options['fallbackUrl'] = $fallbackUrl; $this->options['callbackUrl'] = $callbackUrl; $this->options['messagingServiceSidsAction'] = $messagingServiceSidsAction; } /** * Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping. * * @param string $fallbackUrl We will redirect requests to urls we are unable * to identify to this url. * @return $this Fluent Builder */ public function setFallbackUrl(string $fallbackUrl): self { $this->options['fallbackUrl'] = $fallbackUrl; return $this; } /** * URL to receive click events to your webhook whenever the recipients click on the shortened links * * @param string $callbackUrl URL to receive click events to your webhook * whenever the recipients click on the shortened * links * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * An action type for messaging_service_sids operation (ADD, DELETE, REPLACE) * * @param string $messagingServiceSidsAction An action type for * messaging_service_sids operation * (ADD, DELETE, REPLACE) * @return $this Fluent Builder */ public function setMessagingServiceSidsAction(string $messagingServiceSidsAction): self { $this->options['messagingServiceSidsAction'] = $messagingServiceSidsAction; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.UpdateDomainConfigOptions ' . $options . ']'; } }PKt[Ì$$5Twilio/Rest/Messaging/V1/TollfreeVerificationList.phpnu[solution = []; $this->uri = '/Tollfree/Verifications'; } /** * Streams TollfreeVerificationInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TollfreeVerificationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TollfreeVerificationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TollfreeVerificationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TollfreeVerificationPage Page of TollfreeVerificationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TollfreeVerificationPage { $options = new Values($options); $params = Values::of([ 'TollfreePhoneNumberSid' => $options['tollfreePhoneNumberSid'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TollfreeVerificationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TollfreeVerificationInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TollfreeVerificationPage Page of TollfreeVerificationInstance */ public function getPage(string $targetUrl): TollfreeVerificationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TollfreeVerificationPage($this->version, $response, $this->solution); } /** * Create the TollfreeVerificationInstance * * @param string $businessName The name of the business or organization using * the Tollfree number * @param string $businessWebsite The website of the business or organization * using the Tollfree number * @param string $notificationEmail The email address to receive the * notification about the verification result. * @param string[] $useCaseCategories The category of the use case for the * Tollfree Number. List as many are * applicable. * @param string $useCaseSummary Further explaination on how messaging is used * by the business or organization * @param string $productionMessageSample An example of message content, i.e. a * sample message * @param string[] $optInImageUrls Link to an image that shows the opt-in * workflow. Multiple images allowed and must * be a publicly hosted URL * @param string $optInType Describe how a user opts-in to text messages * @param string $messageVolume Estimate monthly volume of messages from the * Tollfree Number * @param string $tollfreePhoneNumberSid The SID of the Phone Number associated * with the Tollfree Verification * @param array|Options $options Optional Arguments * @return TollfreeVerificationInstance Created TollfreeVerificationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $businessName, string $businessWebsite, string $notificationEmail, array $useCaseCategories, string $useCaseSummary, string $productionMessageSample, array $optInImageUrls, string $optInType, string $messageVolume, string $tollfreePhoneNumberSid, array $options = []): TollfreeVerificationInstance { $options = new Values($options); $data = Values::of([ 'BusinessName' => $businessName, 'BusinessWebsite' => $businessWebsite, 'NotificationEmail' => $notificationEmail, 'UseCaseCategories' => Serialize::map($useCaseCategories, function($e) { return $e; }), 'UseCaseSummary' => $useCaseSummary, 'ProductionMessageSample' => $productionMessageSample, 'OptInImageUrls' => Serialize::map($optInImageUrls, function($e) { return $e; }), 'OptInType' => $optInType, 'MessageVolume' => $messageVolume, 'TollfreePhoneNumberSid' => $tollfreePhoneNumberSid, 'CustomerProfileSid' => $options['customerProfileSid'], 'BusinessStreetAddress' => $options['businessStreetAddress'], 'BusinessStreetAddress2' => $options['businessStreetAddress2'], 'BusinessCity' => $options['businessCity'], 'BusinessStateProvinceRegion' => $options['businessStateProvinceRegion'], 'BusinessPostalCode' => $options['businessPostalCode'], 'BusinessCountry' => $options['businessCountry'], 'AdditionalInformation' => $options['additionalInformation'], 'BusinessContactFirstName' => $options['businessContactFirstName'], 'BusinessContactLastName' => $options['businessContactLastName'], 'BusinessContactEmail' => $options['businessContactEmail'], 'BusinessContactPhone' => $options['businessContactPhone'], 'ExternalReferenceId' => $options['externalReferenceId'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TollfreeVerificationInstance($this->version, $payload); } /** * Constructs a TollfreeVerificationContext * * @param string $sid Tollfree Verification Sid */ public function getContext(string $sid): TollfreeVerificationContext { return new TollfreeVerificationContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.TollfreeVerificationList]'; } }PKt[c׸,Twilio/Rest/Messaging/V1/DomainCertsList.phpnu[solution = []; } /** * Constructs a DomainCertsContext * * @param string $domainSid Unique string used to identify the domain that this * certificate should be associated with. */ public function getContext(string $domainSid): DomainCertsContext { return new DomainCertsContext($this->version, $domainSid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.DomainCertsList]'; } }PKt[-RT||1Twilio/Rest/Messaging/V1/DeactivationsContext.phpnu[solution = []; $this->uri = '/Deactivations'; } /** * Fetch the DeactivationsInstance * * @param array|Options $options Optional Arguments * @return DeactivationsInstance Fetched DeactivationsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): DeactivationsInstance { $options = new Values($options); $params = Values::of(['Date' => Serialize::iso8601Date($options['date']), ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new DeactivationsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.DeactivationsContext ' . \implode(' ', $context) . ']'; } }PKt[/AA5Twilio/Rest/Messaging/V1/TollfreeVerificationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TollfreeVerificationInstance \Twilio\Rest\Messaging\V1\TollfreeVerificationInstance */ public function buildInstance(array $payload): TollfreeVerificationInstance { return new TollfreeVerificationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.TollfreeVerificationPage]'; } }PKt[HŦ.Twilio/Rest/Messaging/V1/DeactivationsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DeactivationsInstance \Twilio\Rest\Messaging\V1\DeactivationsInstance */ public function buildInstance(array $payload): DeactivationsInstance { return new DeactivationsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.DeactivationsPage]'; } }PKt[4(Twilio/Rest/Messaging/V1/UsecasePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UsecaseInstance \Twilio\Rest\Messaging\V1\UsecaseInstance */ public function buildInstance(array $payload): UsecaseInstance { return new UsecaseInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.UsecasePage]'; } }PKt[m  ,Twilio/Rest/Messaging/V1/DomainCertsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DomainCertsInstance \Twilio\Rest\Messaging\V1\DomainCertsInstance */ public function buildInstance(array $payload): DomainCertsInstance { return new DomainCertsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.DomainCertsPage]'; } }PKt[@1Twilio/Rest/Messaging/V1/DeactivationsOptions.phpnu[options['date'] = $date; } /** * The request will return a list of all United States Phone Numbers that were deactivated on the day specified by this parameter. This date should be specified in YYYY-MM-DD format. * * @param \DateTime $date The date to retrieve deactivated numbers for. * @return $this Fluent Builder */ public function setDate(\DateTime $date): self { $this->options['date'] = $date; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.FetchDeactivationsOptions ' . $options . ']'; } }PKt[}Ę+Twilio/Rest/Messaging/V1/ServiceOptions.phpnu[options['inboundRequestUrl'] = $inboundRequestUrl; $this->options['inboundMethod'] = $inboundMethod; $this->options['fallbackUrl'] = $fallbackUrl; $this->options['fallbackMethod'] = $fallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['stickySender'] = $stickySender; $this->options['mmsConverter'] = $mmsConverter; $this->options['smartEncoding'] = $smartEncoding; $this->options['scanMessageContent'] = $scanMessageContent; $this->options['fallbackToLongCode'] = $fallbackToLongCode; $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; $this->options['validityPeriod'] = $validityPeriod; $this->options['synchronousValidation'] = $synchronousValidation; $this->options['usecase'] = $usecase; $this->options['useInboundWebhookOnNumber'] = $useInboundWebhookOnNumber; } /** * The URL we call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. All messages sent to the Twilio phone number or short code will not be logged and received on the Account. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `inbound_request_url` defined for the Messaging Service. * * @param string $inboundRequestUrl The URL we call using inbound_method when a * message is received by any phone number or * short code in the Service. This field will * be overridden if the * `use_inbound_webhook_on_number` field is * enabled. * @return $this Fluent Builder */ public function setInboundRequestUrl(string $inboundRequestUrl): self { $this->options['inboundRequestUrl'] = $inboundRequestUrl; return $this; } /** * The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. * * @param string $inboundMethod The HTTP method we should use to call * inbound_request_url * @return $this Fluent Builder */ public function setInboundMethod(string $inboundMethod): self { $this->options['inboundMethod'] = $inboundMethod; return $this; } /** * The URL that we call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `fallback_url` defined for the Messaging Service. * * @param string $fallbackUrl The URL that we call using fallback_method if an * error occurs while retrieving or executing the * TwiML from the Inbound Request URL. This field * will be overridden if the * `use_inbound_webhook_on_number` field is enabled. * @return $this Fluent Builder */ public function setFallbackUrl(string $fallbackUrl): self { $this->options['fallbackUrl'] = $fallbackUrl; return $this; } /** * The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. * * @param string $fallbackMethod The HTTP method we should use to call * fallback_url * @return $this Fluent Builder */ public function setFallbackMethod(string $fallbackMethod): self { $this->options['fallbackMethod'] = $fallbackMethod; return $this; } /** * The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. * * @param string $statusCallback The URL we should call to pass status updates * about message delivery * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance. * * @param bool $stickySender Whether to enable Sticky Sender on the Service * instance * @return $this Fluent Builder */ public function setStickySender(bool $stickySender): self { $this->options['stickySender'] = $stickySender; return $this; } /** * Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance. * * @param bool $mmsConverter Whether to enable the MMS Converter for messages * sent through the Service instance * @return $this Fluent Builder */ public function setMmsConverter(bool $mmsConverter): self { $this->options['mmsConverter'] = $mmsConverter; return $this; } /** * Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance. * * @param bool $smartEncoding Whether to enable Encoding for messages sent * through the Service instance * @return $this Fluent Builder */ public function setSmartEncoding(bool $smartEncoding): self { $this->options['smartEncoding'] = $smartEncoding; return $this; } /** * Reserved. * * @param string $scanMessageContent Reserved * @return $this Fluent Builder */ public function setScanMessageContent(string $scanMessageContent): self { $this->options['scanMessageContent'] = $scanMessageContent; return $this; } /** * Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance. * * @param bool $fallbackToLongCode Whether to enable Fallback to Long Code for * messages sent through the Service instance * @return $this Fluent Builder */ public function setFallbackToLongCode(bool $fallbackToLongCode): self { $this->options['fallbackToLongCode'] = $fallbackToLongCode; return $this; } /** * Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance. * * @param bool $areaCodeGeomatch Whether to enable Area Code Geomatch on the * Service Instance * @return $this Fluent Builder */ public function setAreaCodeGeomatch(bool $areaCodeGeomatch): self { $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; return $this; } /** * How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. * * @param int $validityPeriod How long, in seconds, messages sent from the * Service are valid * @return $this Fluent Builder */ public function setValidityPeriod(int $validityPeriod): self { $this->options['validityPeriod'] = $validityPeriod; return $this; } /** * Reserved. * * @param bool $synchronousValidation Reserved * @return $this Fluent Builder */ public function setSynchronousValidation(bool $synchronousValidation): self { $this->options['synchronousValidation'] = $synchronousValidation; return $this; } /** * A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..]. * * @param string $usecase A string describing the scenario in which the * Messaging Service will be used * @return $this Fluent Builder */ public function setUsecase(string $usecase): self { $this->options['usecase'] = $usecase; return $this; } /** * A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service. * * @param bool $useInboundWebhookOnNumber If enabled, the webhook url * configured on the phone number will * be used and will override the * `inbound_request_url`/`fallback_url` * url called when an inbound message is * received. * @return $this Fluent Builder */ public function setUseInboundWebhookOnNumber(bool $useInboundWebhookOnNumber): self { $this->options['useInboundWebhookOnNumber'] = $useInboundWebhookOnNumber; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.CreateServiceOptions ' . $options . ']'; } } class UpdateServiceOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $inboundRequestUrl The URL we call using inbound_method when a * message is received by any phone number or * short code in the Service. This field will * be overridden if the * `use_inbound_webhook_on_number` field is * enabled. * @param string $inboundMethod The HTTP method we should use to call * inbound_request_url * @param string $fallbackUrl The URL that we call using fallback_method if an * error occurs while retrieving or executing the * TwiML from the Inbound Request URL. This field * will be overridden if the * `use_inbound_webhook_on_number` field is enabled. * @param string $fallbackMethod The HTTP method we should use to call * fallback_url * @param string $statusCallback The URL we should call to pass status updates * about message delivery * @param bool $stickySender Whether to enable Sticky Sender on the Service * instance * @param bool $mmsConverter Whether to enable the MMS Converter for messages * sent through the Service instance * @param bool $smartEncoding Whether to enable Encoding for messages sent * through the Service instance * @param string $scanMessageContent Reserved * @param bool $fallbackToLongCode Whether to enable Fallback to Long Code for * messages sent through the Service instance * @param bool $areaCodeGeomatch Whether to enable Area Code Geomatch on the * Service Instance * @param int $validityPeriod How long, in seconds, messages sent from the * Service are valid * @param bool $synchronousValidation Reserved * @param string $usecase A string describing the scenario in which the * Messaging Service will be used * @param bool $useInboundWebhookOnNumber If enabled, the webhook url * configured on the phone number will * be used and will override the * `inbound_request_url`/`fallback_url` * url called when an inbound message is * received. */ public function __construct(string $friendlyName = Values::NONE, string $inboundRequestUrl = Values::NONE, string $inboundMethod = Values::NONE, string $fallbackUrl = Values::NONE, string $fallbackMethod = Values::NONE, string $statusCallback = Values::NONE, bool $stickySender = Values::NONE, bool $mmsConverter = Values::NONE, bool $smartEncoding = Values::NONE, string $scanMessageContent = Values::NONE, bool $fallbackToLongCode = Values::NONE, bool $areaCodeGeomatch = Values::NONE, int $validityPeriod = Values::NONE, bool $synchronousValidation = Values::NONE, string $usecase = Values::NONE, bool $useInboundWebhookOnNumber = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['inboundRequestUrl'] = $inboundRequestUrl; $this->options['inboundMethod'] = $inboundMethod; $this->options['fallbackUrl'] = $fallbackUrl; $this->options['fallbackMethod'] = $fallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['stickySender'] = $stickySender; $this->options['mmsConverter'] = $mmsConverter; $this->options['smartEncoding'] = $smartEncoding; $this->options['scanMessageContent'] = $scanMessageContent; $this->options['fallbackToLongCode'] = $fallbackToLongCode; $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; $this->options['validityPeriod'] = $validityPeriod; $this->options['synchronousValidation'] = $synchronousValidation; $this->options['usecase'] = $usecase; $this->options['useInboundWebhookOnNumber'] = $useInboundWebhookOnNumber; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The URL we call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. All messages sent to the Twilio phone number or short code will not be logged and received on the Account. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `inbound_request_url` defined for the Messaging Service. * * @param string $inboundRequestUrl The URL we call using inbound_method when a * message is received by any phone number or * short code in the Service. This field will * be overridden if the * `use_inbound_webhook_on_number` field is * enabled. * @return $this Fluent Builder */ public function setInboundRequestUrl(string $inboundRequestUrl): self { $this->options['inboundRequestUrl'] = $inboundRequestUrl; return $this; } /** * The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. * * @param string $inboundMethod The HTTP method we should use to call * inbound_request_url * @return $this Fluent Builder */ public function setInboundMethod(string $inboundMethod): self { $this->options['inboundMethod'] = $inboundMethod; return $this; } /** * The URL that we call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `fallback_url` defined for the Messaging Service. * * @param string $fallbackUrl The URL that we call using fallback_method if an * error occurs while retrieving or executing the * TwiML from the Inbound Request URL. This field * will be overridden if the * `use_inbound_webhook_on_number` field is enabled. * @return $this Fluent Builder */ public function setFallbackUrl(string $fallbackUrl): self { $this->options['fallbackUrl'] = $fallbackUrl; return $this; } /** * The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. * * @param string $fallbackMethod The HTTP method we should use to call * fallback_url * @return $this Fluent Builder */ public function setFallbackMethod(string $fallbackMethod): self { $this->options['fallbackMethod'] = $fallbackMethod; return $this; } /** * The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. * * @param string $statusCallback The URL we should call to pass status updates * about message delivery * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance. * * @param bool $stickySender Whether to enable Sticky Sender on the Service * instance * @return $this Fluent Builder */ public function setStickySender(bool $stickySender): self { $this->options['stickySender'] = $stickySender; return $this; } /** * Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance. * * @param bool $mmsConverter Whether to enable the MMS Converter for messages * sent through the Service instance * @return $this Fluent Builder */ public function setMmsConverter(bool $mmsConverter): self { $this->options['mmsConverter'] = $mmsConverter; return $this; } /** * Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance. * * @param bool $smartEncoding Whether to enable Encoding for messages sent * through the Service instance * @return $this Fluent Builder */ public function setSmartEncoding(bool $smartEncoding): self { $this->options['smartEncoding'] = $smartEncoding; return $this; } /** * Reserved. * * @param string $scanMessageContent Reserved * @return $this Fluent Builder */ public function setScanMessageContent(string $scanMessageContent): self { $this->options['scanMessageContent'] = $scanMessageContent; return $this; } /** * Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance. * * @param bool $fallbackToLongCode Whether to enable Fallback to Long Code for * messages sent through the Service instance * @return $this Fluent Builder */ public function setFallbackToLongCode(bool $fallbackToLongCode): self { $this->options['fallbackToLongCode'] = $fallbackToLongCode; return $this; } /** * Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance. * * @param bool $areaCodeGeomatch Whether to enable Area Code Geomatch on the * Service Instance * @return $this Fluent Builder */ public function setAreaCodeGeomatch(bool $areaCodeGeomatch): self { $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; return $this; } /** * How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. * * @param int $validityPeriod How long, in seconds, messages sent from the * Service are valid * @return $this Fluent Builder */ public function setValidityPeriod(int $validityPeriod): self { $this->options['validityPeriod'] = $validityPeriod; return $this; } /** * Reserved. * * @param bool $synchronousValidation Reserved * @return $this Fluent Builder */ public function setSynchronousValidation(bool $synchronousValidation): self { $this->options['synchronousValidation'] = $synchronousValidation; return $this; } /** * A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..] * * @param string $usecase A string describing the scenario in which the * Messaging Service will be used * @return $this Fluent Builder */ public function setUsecase(string $usecase): self { $this->options['usecase'] = $usecase; return $this; } /** * A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service. * * @param bool $useInboundWebhookOnNumber If enabled, the webhook url * configured on the phone number will * be used and will override the * `inbound_request_url`/`fallback_url` * url called when an inbound message is * received. * @return $this Fluent Builder */ public function setUseInboundWebhookOnNumber(bool $useInboundWebhookOnNumber): self { $this->options['useInboundWebhookOnNumber'] = $useInboundWebhookOnNumber; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.UpdateServiceOptions ' . $options . ']'; } }PKt[N޿5Twilio/Rest/Messaging/V1/ExternalCampaignInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'campaignId' => Values::array_get($payload, 'campaign_id'), 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.ExternalCampaignInstance]'; } }PKt[ P(Twilio/Rest/Messaging/V1/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\Messaging\V1\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.ServicePage]'; } }PKt[Z>j j /Twilio/Rest/Messaging/V1/DomainCertsContext.phpnu[solution = ['domainSid' => $domainSid, ]; $this->uri = '/LinkShortening/Domains/' . \rawurlencode($domainSid) . '/Certificate'; } /** * Update the DomainCertsInstance * * @param string $tlsCert Certificate and private key information for this * domain. * @return DomainCertsInstance Updated DomainCertsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $tlsCert): DomainCertsInstance { $data = Values::of(['TlsCert' => $tlsCert, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DomainCertsInstance($this->version, $payload, $this->solution['domainSid']); } /** * Fetch the DomainCertsInstance * * @return DomainCertsInstance Fetched DomainCertsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DomainCertsInstance { $payload = $this->version->fetch('GET', $this->uri); return new DomainCertsInstance($this->version, $payload, $this->solution['domainSid']); } /** * Delete the DomainCertsInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.DomainCertsContext ' . \implode(' ', $context) . ']'; } }PKt[  BTwilio/Rest/Messaging/V1/BrandRegistration/BrandVettingOptions.phpnu[options['vettingId'] = $vettingId; } /** * The unique ID of the vetting * * @param string $vettingId The unique ID of the vetting * @return $this Fluent Builder */ public function setVettingId(string $vettingId): self { $this->options['vettingId'] = $vettingId; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.CreateBrandVettingOptions ' . $options . ']'; } } class ReadBrandVettingOptions extends Options { /** * @param string $vettingProvider Third-party provider of the vettings to create */ public function __construct(string $vettingProvider = Values::NONE) { $this->options['vettingProvider'] = $vettingProvider; } /** * The third-party provider of the vettings to read * * @param string $vettingProvider Third-party provider of the vettings to create * @return $this Fluent Builder */ public function setVettingProvider(string $vettingProvider): self { $this->options['vettingProvider'] = $vettingProvider; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Messaging.V1.ReadBrandVettingOptions ' . $options . ']'; } }PKt[8\qq?Twilio/Rest/Messaging/V1/BrandRegistration/BrandVettingList.phpnu[solution = ['brandSid' => $brandSid, ]; $this->uri = '/a2p/BrandRegistrations/' . \rawurlencode($brandSid) . '/Vettings'; } /** * Create the BrandVettingInstance * * @param string $vettingProvider Third-party provider of the vettings to create * @param array|Options $options Optional Arguments * @return BrandVettingInstance Created BrandVettingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $vettingProvider, array $options = []): BrandVettingInstance { $options = new Values($options); $data = Values::of(['VettingProvider' => $vettingProvider, 'VettingId' => $options['vettingId'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new BrandVettingInstance($this->version, $payload, $this->solution['brandSid']); } /** * Streams BrandVettingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BrandVettingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BrandVettingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of BrandVettingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BrandVettingPage Page of BrandVettingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BrandVettingPage { $options = new Values($options); $params = Values::of([ 'VettingProvider' => $options['vettingProvider'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BrandVettingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BrandVettingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BrandVettingPage Page of BrandVettingInstance */ public function getPage(string $targetUrl): BrandVettingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BrandVettingPage($this->version, $response, $this->solution); } /** * Constructs a BrandVettingContext * * @param string $brandVettingSid SID for third-party vetting record */ public function getContext(string $brandVettingSid): BrandVettingContext { return new BrandVettingContext($this->version, $this->solution['brandSid'], $brandVettingSid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.BrandVettingList]'; } }PKt[e99CTwilio/Rest/Messaging/V1/BrandRegistration/BrandVettingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'brandSid' => Values::array_get($payload, 'brand_sid'), 'brandVettingSid' => Values::array_get($payload, 'brand_vetting_sid'), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'vettingId' => Values::array_get($payload, 'vetting_id'), 'vettingClass' => Values::array_get($payload, 'vetting_class'), 'vettingStatus' => Values::array_get($payload, 'vetting_status'), 'vettingProvider' => Values::array_get($payload, 'vetting_provider'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'brandSid' => $brandSid, 'brandVettingSid' => $brandVettingSid ?: $this->properties['brandVettingSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return BrandVettingContext Context for this BrandVettingInstance */ protected function proxy(): BrandVettingContext { if (!$this->context) { $this->context = new BrandVettingContext( $this->version, $this->solution['brandSid'], $this->solution['brandVettingSid'] ); } return $this->context; } /** * Fetch the BrandVettingInstance * * @return BrandVettingInstance Fetched BrandVettingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BrandVettingInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.BrandVettingInstance ' . \implode(' ', $context) . ']'; } }PKt[- .BTwilio/Rest/Messaging/V1/BrandRegistration/BrandVettingContext.phpnu[solution = ['brandSid' => $brandSid, 'brandVettingSid' => $brandVettingSid, ]; $this->uri = '/a2p/BrandRegistrations/' . \rawurlencode($brandSid) . '/Vettings/' . \rawurlencode($brandVettingSid) . ''; } /** * Fetch the BrandVettingInstance * * @return BrandVettingInstance Fetched BrandVettingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BrandVettingInstance { $payload = $this->version->fetch('GET', $this->uri); return new BrandVettingInstance( $this->version, $payload, $this->solution['brandSid'], $this->solution['brandVettingSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.BrandVettingContext ' . \implode(' ', $context) . ']'; } }PKt[:$aRR?Twilio/Rest/Messaging/V1/BrandRegistration/BrandVettingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BrandVettingInstance \Twilio\Rest\Messaging\V1\BrandRegistration\BrandVettingInstance */ public function buildInstance(array $payload): BrandVettingInstance { return new BrandVettingInstance($this->version, $payload, $this->solution['brandSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.BrandVettingPage]'; } }PKt[JL,Twilio/Rest/Messaging/V1/UsecaseInstance.phpnu[properties = ['usecases' => Values::array_get($payload, 'usecases'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1.UsecaseInstance]'; } }PKt[ֺy1Twilio/Rest/Messaging/V1/DomainConfigInstance.phpnu[properties = [ 'domainSid' => Values::array_get($payload, 'domain_sid'), 'configSid' => Values::array_get($payload, 'config_sid'), 'messagingServiceSids' => Values::array_get($payload, 'messaging_service_sids'), 'fallbackUrl' => Values::array_get($payload, 'fallback_url'), 'callbackUrl' => Values::array_get($payload, 'callback_url'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['domainSid' => $domainSid ?: $this->properties['domainSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DomainConfigContext Context for this DomainConfigInstance */ protected function proxy(): DomainConfigContext { if (!$this->context) { $this->context = new DomainConfigContext($this->version, $this->solution['domainSid']); } return $this->context; } /** * Update the DomainConfigInstance * * @param string[] $messagingServiceSids A list of messagingServiceSids (with * prefix MG) * @param array|Options $options Optional Arguments * @return DomainConfigInstance Updated DomainConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $messagingServiceSids, array $options = []): DomainConfigInstance { return $this->proxy()->update($messagingServiceSids, $options); } /** * Fetch the DomainConfigInstance * * @return DomainConfigInstance Fetched DomainConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DomainConfigInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.DomainConfigInstance ' . \implode(' ', $context) . ']'; } }PKt[6Twilio/Rest/Messaging/V1/BrandRegistrationInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'customerProfileBundleSid' => Values::array_get($payload, 'customer_profile_bundle_sid'), 'a2PProfileBundleSid' => Values::array_get($payload, 'a2p_profile_bundle_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'brandType' => Values::array_get($payload, 'brand_type'), 'status' => Values::array_get($payload, 'status'), 'tcrId' => Values::array_get($payload, 'tcr_id'), 'failureReason' => Values::array_get($payload, 'failure_reason'), 'url' => Values::array_get($payload, 'url'), 'brandScore' => Values::array_get($payload, 'brand_score'), 'brandFeedback' => Values::array_get($payload, 'brand_feedback'), 'identityStatus' => Values::array_get($payload, 'identity_status'), 'russell3000' => Values::array_get($payload, 'russell_3000'), 'governmentEntity' => Values::array_get($payload, 'government_entity'), 'taxExemptStatus' => Values::array_get($payload, 'tax_exempt_status'), 'skipAutomaticSecVet' => Values::array_get($payload, 'skip_automatic_sec_vet'), 'mock' => Values::array_get($payload, 'mock'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return BrandRegistrationContext Context for this BrandRegistrationInstance */ protected function proxy(): BrandRegistrationContext { if (!$this->context) { $this->context = new BrandRegistrationContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the BrandRegistrationInstance * * @return BrandRegistrationInstance Fetched BrandRegistrationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BrandRegistrationInstance { return $this->proxy()->fetch(); } /** * Update the BrandRegistrationInstance * * @return BrandRegistrationInstance Updated BrandRegistrationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(): BrandRegistrationInstance { return $this->proxy()->update(); } /** * Access the brandVettings */ protected function getBrandVettings(): BrandVettingList { return $this->proxy()->brandVettings; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Messaging.V1.BrandRegistrationInstance ' . \implode(' ', $context) . ']'; } }PKt[GTwilio/Rest/Messaging/V1.phpnu[version = 'v1'; } protected function getBrandRegistrations(): BrandRegistrationList { if (!$this->_brandRegistrations) { $this->_brandRegistrations = new BrandRegistrationList($this); } return $this->_brandRegistrations; } protected function getDeactivations(): DeactivationsList { if (!$this->_deactivations) { $this->_deactivations = new DeactivationsList($this); } return $this->_deactivations; } protected function getDomainCerts(): DomainCertsList { if (!$this->_domainCerts) { $this->_domainCerts = new DomainCertsList($this); } return $this->_domainCerts; } protected function getDomainConfig(): DomainConfigList { if (!$this->_domainConfig) { $this->_domainConfig = new DomainConfigList($this); } return $this->_domainConfig; } protected function getExternalCampaign(): ExternalCampaignList { if (!$this->_externalCampaign) { $this->_externalCampaign = new ExternalCampaignList($this); } return $this->_externalCampaign; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } protected function getTollfreeVerifications(): TollfreeVerificationList { if (!$this->_tollfreeVerifications) { $this->_tollfreeVerifications = new TollfreeVerificationList($this); } return $this->_tollfreeVerifications; } protected function getUsecases(): UsecaseList { if (!$this->_usecases) { $this->_usecases = new UsecaseList($this); } return $this->_usecases; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging.V1]'; } }PKt[{bY7Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncMapItemInstance \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemInstance */ public function buildInstance(array $payload): SyncMapItemInstance { return new SyncMapItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncMapItemPage]'; } }PKt[dDCC=Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncMapPermissionInstance \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionInstance */ public function buildInstance(array $payload): SyncMapPermissionInstance { return new SyncMapPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncMapPermissionPage]'; } }PKt[Ꭼz{{;Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemInstance.phpnu[properties = [ 'key' => Values::array_get($payload, 'key'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'mapSid' => Values::array_get($payload, 'map_sid'), 'url' => Values::array_get($payload, 'url'), 'revision' => Values::array_get($payload, 'revision'), 'data' => Values::array_get($payload, 'data'), 'dateExpires' => Deserialize::dateTime(Values::array_get($payload, 'date_expires')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'key' => $key ?: $this->properties['key'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncMapItemContext Context for this SyncMapItemInstance */ protected function proxy(): SyncMapItemContext { if (!$this->context) { $this->context = new SyncMapItemContext( $this->version, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['key'] ); } return $this->context; } /** * Fetch the SyncMapItemInstance * * @return SyncMapItemInstance Fetched SyncMapItemInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapItemInstance { return $this->proxy()->fetch(); } /** * Delete the SyncMapItemInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the SyncMapItemInstance * * @param array|Options $options Optional Arguments * @return SyncMapItemInstance Updated SyncMapItemInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SyncMapItemInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncMapItemInstance ' . \implode(' ', $context) . ']'; } }PKt[ܸ @Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionContext.phpnu[solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'identity' => $identity, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Permissions/' . \rawurlencode($identity) . ''; } /** * Fetch the SyncMapPermissionInstance * * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapPermissionInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncMapPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['identity'] ); } /** * Delete the SyncMapPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the SyncMapPermissionInstance * * @param bool $read Read access * @param bool $write Write access * @param bool $manage Manage access * @return SyncMapPermissionInstance Updated SyncMapPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): SyncMapPermissionInstance { $data = Values::of([ 'Read' => Serialize::booleanToString($read), 'Write' => Serialize::booleanToString($write), 'Manage' => Serialize::booleanToString($manage), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SyncMapPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['identity'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncMapPermissionContext ' . \implode(' ', $context) . ']'; } }PKt[ON:Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemContext.phpnu[solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'key' => $key, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Items/' . \rawurlencode($key) . ''; } /** * Fetch the SyncMapItemInstance * * @return SyncMapItemInstance Fetched SyncMapItemInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapItemInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncMapItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['key'] ); } /** * Delete the SyncMapItemInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the SyncMapItemInstance * * @param array|Options $options Optional Arguments * @return SyncMapItemInstance Updated SyncMapItemInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SyncMapItemInstance { $options = new Values($options); $data = Values::of([ 'Data' => Serialize::jsonObject($options['data']), 'Ttl' => $options['ttl'], 'ItemTtl' => $options['itemTtl'], 'CollectionTtl' => $options['collectionTtl'], ]); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new SyncMapItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['key'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncMapItemContext ' . \implode(' ', $context) . ']'; } }PKt[=@7Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemList.phpnu[solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Items'; } /** * Create the SyncMapItemInstance * * @param string $key The unique, user-defined key for the Map Item * @param array $data A JSON string that represents an arbitrary, schema-less * object that the Map Item stores * @param array|Options $options Optional Arguments * @return SyncMapItemInstance Created SyncMapItemInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $key, array $data, array $options = []): SyncMapItemInstance { $options = new Values($options); $data = Values::of([ 'Key' => $key, 'Data' => Serialize::jsonObject($data), 'Ttl' => $options['ttl'], 'ItemTtl' => $options['itemTtl'], 'CollectionTtl' => $options['collectionTtl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SyncMapItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'] ); } /** * Streams SyncMapItemInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncMapItemInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncMapItemInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SyncMapItemInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncMapItemPage Page of SyncMapItemInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncMapItemPage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'From' => $options['from'], 'Bounds' => $options['bounds'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncMapItemPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncMapItemInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncMapItemPage Page of SyncMapItemInstance */ public function getPage(string $targetUrl): SyncMapItemPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncMapItemPage($this->version, $response, $this->solution); } /** * Constructs a SyncMapItemContext * * @param string $key The key value of the Sync Map Item resource to fetch */ public function getContext(string $key): SyncMapItemContext { return new SyncMapItemContext( $this->version, $this->solution['serviceSid'], $this->solution['mapSid'], $key ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncMapItemList]'; } }PKt[?(-=Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionList.phpnu[solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Permissions'; } /** * Streams SyncMapPermissionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncMapPermissionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncMapPermissionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SyncMapPermissionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncMapPermissionPage Page of SyncMapPermissionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncMapPermissionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncMapPermissionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncMapPermissionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncMapPermissionPage Page of SyncMapPermissionInstance */ public function getPage(string $targetUrl): SyncMapPermissionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncMapPermissionPage($this->version, $response, $this->solution); } /** * Constructs a SyncMapPermissionContext * * @param string $identity The application-defined string that uniquely * identifies the User's Sync Map Permission resource * to fetch */ public function getContext(string $identity): SyncMapPermissionContext { return new SyncMapPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['mapSid'], $identity ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncMapPermissionList]'; } }PKt[D..:Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.phpnu[options['ifMatch'] = $ifMatch; } /** * If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.DeleteSyncMapItemOptions ' . $options . ']'; } } class CreateSyncMapItemOptions extends Options { /** * @param int $ttl An alias for item_ttl * @param int $itemTtl How long, in seconds, before the Map Item expires * @param int $collectionTtl How long, in seconds, before the Map Item's parent * Sync Map expires and is deleted */ public function __construct(int $ttl = Values::NONE, int $itemTtl = Values::NONE, int $collectionTtl = Values::NONE) { $this->options['ttl'] = $ttl; $this->options['itemTtl'] = $itemTtl; $this->options['collectionTtl'] = $collectionTtl; } /** * An alias for `item_ttl`. If both parameters are provided, this value is ignored. * * @param int $ttl An alias for item_ttl * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item expires (time-to-live) and is deleted. * * @param int $itemTtl How long, in seconds, before the Map Item expires * @return $this Fluent Builder */ public function setItemTtl(int $itemTtl): self { $this->options['itemTtl'] = $itemTtl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item's parent Sync Map expires (time-to-live) and is deleted. * * @param int $collectionTtl How long, in seconds, before the Map Item's parent * Sync Map expires and is deleted * @return $this Fluent Builder */ public function setCollectionTtl(int $collectionTtl): self { $this->options['collectionTtl'] = $collectionTtl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.CreateSyncMapItemOptions ' . $options . ']'; } } class ReadSyncMapItemOptions extends Options { /** * @param string $order How to order the Map Items returned by their key value * @param string $from The index of the first Sync Map Item resource to read * @param string $bounds Whether to include the Map Item referenced by the from * parameter */ public function __construct(string $order = Values::NONE, string $from = Values::NONE, string $bounds = Values::NONE) { $this->options['order'] = $order; $this->options['from'] = $from; $this->options['bounds'] = $bounds; } /** * How to order the Map Items returned by their `key` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. Map Items are [ordered lexicographically](https://en.wikipedia.org/wiki/Lexicographical_order) by Item key. * * @param string $order How to order the Map Items returned by their key value * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * The `key` of the first Sync Map Item resource to read. See also `bounds`. * * @param string $from The index of the first Sync Map Item resource to read * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * Whether to include the Map Item referenced by the `from` parameter. Can be: `inclusive` to include the Map Item referenced by the `from` parameter or `exclusive` to start with the next Map Item. The default value is `inclusive`. * * @param string $bounds Whether to include the Map Item referenced by the from * parameter * @return $this Fluent Builder */ public function setBounds(string $bounds): self { $this->options['bounds'] = $bounds; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.ReadSyncMapItemOptions ' . $options . ']'; } } class UpdateSyncMapItemOptions extends Options { /** * @param array $data A JSON string that represents an arbitrary, schema-less * object that the Map Item stores * @param int $ttl An alias for item_ttl * @param int $itemTtl How long, in seconds, before the Map Item expires * @param int $collectionTtl How long, in seconds, before the Map Item's parent * Sync Map expires and is deleted * @param string $ifMatch The If-Match HTTP request header */ public function __construct(array $data = Values::ARRAY_NONE, int $ttl = Values::NONE, int $itemTtl = Values::NONE, int $collectionTtl = Values::NONE, string $ifMatch = Values::NONE) { $this->options['data'] = $data; $this->options['ttl'] = $ttl; $this->options['itemTtl'] = $itemTtl; $this->options['collectionTtl'] = $collectionTtl; $this->options['ifMatch'] = $ifMatch; } /** * A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. * * @param array $data A JSON string that represents an arbitrary, schema-less * object that the Map Item stores * @return $this Fluent Builder */ public function setData(array $data): self { $this->options['data'] = $data; return $this; } /** * An alias for `item_ttl`. If both parameters are provided, this value is ignored. * * @param int $ttl An alias for item_ttl * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item expires (time-to-live) and is deleted. * * @param int $itemTtl How long, in seconds, before the Map Item expires * @return $this Fluent Builder */ public function setItemTtl(int $itemTtl): self { $this->options['itemTtl'] = $itemTtl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item's parent Sync Map expires (time-to-live) and is deleted. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request. * * @param int $collectionTtl How long, in seconds, before the Map Item's parent * Sync Map expires and is deleted * @return $this Fluent Builder */ public function setCollectionTtl(int $collectionTtl): self { $this->options['collectionTtl'] = $collectionTtl; return $this; } /** * If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.UpdateSyncMapItemOptions ' . $options . ']'; } }PKt[0ATwilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'mapSid' => Values::array_get($payload, 'map_sid'), 'identity' => Values::array_get($payload, 'identity'), 'read' => Values::array_get($payload, 'read'), 'write' => Values::array_get($payload, 'write'), 'manage' => Values::array_get($payload, 'manage'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'identity' => $identity ?: $this->properties['identity'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncMapPermissionContext Context for this SyncMapPermissionInstance */ protected function proxy(): SyncMapPermissionContext { if (!$this->context) { $this->context = new SyncMapPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['identity'] ); } return $this->context; } /** * Fetch the SyncMapPermissionInstance * * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapPermissionInstance { return $this->proxy()->fetch(); } /** * Delete the SyncMapPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the SyncMapPermissionInstance * * @param bool $read Read access * @param bool $write Write access * @param bool $manage Manage access * @return SyncMapPermissionInstance Updated SyncMapPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): SyncMapPermissionInstance { return $this->proxy()->update($read, $write, $manage); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncMapPermissionInstance ' . \implode(' ', $context) . ']'; } }PKt[bs./Twilio/Rest/Sync/V1/Service/DocumentOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['data'] = $data; $this->options['ttl'] = $ttl; } /** * An application-defined string that uniquely identifies the Sync Document * * @param string $uniqueName An application-defined string that uniquely * identifies the Sync Document * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. * * @param array $data A JSON string that represents an arbitrary, schema-less * object that the Sync Document stores * @return $this Fluent Builder */ public function setData(array $data): self { $this->options['data'] = $data; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Document expires and is deleted (the Sync Document's time-to-live). * * @param int $ttl How long, in seconds, before the Sync Document expires and * is deleted * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.CreateDocumentOptions ' . $options . ']'; } } class UpdateDocumentOptions extends Options { /** * @param array $data A JSON string that represents an arbitrary, schema-less * object that the Sync Document stores * @param int $ttl How long, in seconds, before the Document resource expires * and is deleted * @param string $ifMatch The If-Match HTTP request header */ public function __construct(array $data = Values::ARRAY_NONE, int $ttl = Values::NONE, string $ifMatch = Values::NONE) { $this->options['data'] = $data; $this->options['ttl'] = $ttl; $this->options['ifMatch'] = $ifMatch; } /** * A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. * * @param array $data A JSON string that represents an arbitrary, schema-less * object that the Sync Document stores * @return $this Fluent Builder */ public function setData(array $data): self { $this->options['data'] = $data; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Document expires and is deleted (time-to-live). * * @param int $ttl How long, in seconds, before the Document resource expires * and is deleted * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * The If-Match HTTP request header * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.UpdateDocumentOptions ' . $options . ']'; } }PKt[AK/Twilio/Rest/Sync/V1/Service/DocumentContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($sid) . ''; } /** * Fetch the DocumentInstance * * @return DocumentInstance Fetched DocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DocumentInstance { $payload = $this->version->fetch('GET', $this->uri); return new DocumentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the DocumentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the DocumentInstance * * @param array|Options $options Optional Arguments * @return DocumentInstance Updated DocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DocumentInstance { $options = new Values($options); $data = Values::of(['Data' => Serialize::jsonObject($options['data']), 'Ttl' => $options['ttl'], ]); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new DocumentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the documentPermissions */ protected function getDocumentPermissions(): DocumentPermissionList { if (!$this->_documentPermissions) { $this->_documentPermissions = new DocumentPermissionList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_documentPermissions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.DocumentContext ' . \implode(' ', $context) . ']'; } }PKt[?.Twilio/Rest/Sync/V1/Service/SyncMapContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($sid) . ''; } /** * Fetch the SyncMapInstance * * @return SyncMapInstance Fetched SyncMapInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncMapInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the SyncMapInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the SyncMapInstance * * @param array|Options $options Optional Arguments * @return SyncMapInstance Updated SyncMapInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SyncMapInstance { $options = new Values($options); $data = Values::of(['Ttl' => $options['ttl'], 'CollectionTtl' => $options['collectionTtl'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SyncMapInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the syncMapItems */ protected function getSyncMapItems(): SyncMapItemList { if (!$this->_syncMapItems) { $this->_syncMapItems = new SyncMapItemList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_syncMapItems; } /** * Access the syncMapPermissions */ protected function getSyncMapPermissions(): SyncMapPermissionList { if (!$this->_syncMapPermissions) { $this->_syncMapPermissions = new SyncMapPermissionList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_syncMapPermissions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncMapContext ' . \implode(' ', $context) . ']'; } }PKt[ɼG%%,Twilio/Rest/Sync/V1/Service/DocumentList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents'; } /** * Create the DocumentInstance * * @param array|Options $options Optional Arguments * @return DocumentInstance Created DocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): DocumentInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'Data' => Serialize::jsonObject($options['data']), 'Ttl' => $options['ttl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new DocumentInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams DocumentInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DocumentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DocumentInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DocumentInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DocumentPage Page of DocumentInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DocumentPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DocumentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DocumentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DocumentPage Page of DocumentInstance */ public function getPage(string $targetUrl): DocumentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DocumentPage($this->version, $response, $this->solution); } /** * Constructs a DocumentContext * * @param string $sid The SID of the Document resource to fetch */ public function getContext(string $sid): DocumentContext { return new DocumentContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.DocumentList]'; } }PKt[dv^^?Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionList.phpnu[solution = ['serviceSid' => $serviceSid, 'documentSid' => $documentSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($documentSid) . '/Permissions'; } /** * Streams DocumentPermissionInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DocumentPermissionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DocumentPermissionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DocumentPermissionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DocumentPermissionPage Page of DocumentPermissionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DocumentPermissionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DocumentPermissionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DocumentPermissionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DocumentPermissionPage Page of DocumentPermissionInstance */ public function getPage(string $targetUrl): DocumentPermissionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DocumentPermissionPage($this->version, $response, $this->solution); } /** * Constructs a DocumentPermissionContext * * @param string $identity The application-defined string that uniquely * identifies the User's Document Permission resource * to fetch */ public function getContext(string $identity): DocumentPermissionContext { return new DocumentPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['documentSid'], $identity ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.DocumentPermissionList]'; } }PKt[X_DDBTwilio/Rest/Sync/V1/Service/Document/DocumentPermissionContext.phpnu[solution = [ 'serviceSid' => $serviceSid, 'documentSid' => $documentSid, 'identity' => $identity, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($documentSid) . '/Permissions/' . \rawurlencode($identity) . ''; } /** * Fetch the DocumentPermissionInstance * * @return DocumentPermissionInstance Fetched DocumentPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DocumentPermissionInstance { $payload = $this->version->fetch('GET', $this->uri); return new DocumentPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['documentSid'], $this->solution['identity'] ); } /** * Delete the DocumentPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the DocumentPermissionInstance * * @param bool $read Read access * @param bool $write Write access * @param bool $manage Manage access * @return DocumentPermissionInstance Updated DocumentPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): DocumentPermissionInstance { $data = Values::of([ 'Read' => Serialize::booleanToString($read), 'Write' => Serialize::booleanToString($write), 'Manage' => Serialize::booleanToString($manage), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DocumentPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['documentSid'], $this->solution['identity'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.DocumentPermissionContext ' . \implode(' ', $context) . ']'; } }PKt[U$PP?Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DocumentPermissionInstance \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionInstance */ public function buildInstance(array $payload): DocumentPermissionInstance { return new DocumentPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['documentSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.DocumentPermissionPage]'; } }PKt[[>CTwilio/Rest/Sync/V1/Service/Document/DocumentPermissionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'documentSid' => Values::array_get($payload, 'document_sid'), 'identity' => Values::array_get($payload, 'identity'), 'read' => Values::array_get($payload, 'read'), 'write' => Values::array_get($payload, 'write'), 'manage' => Values::array_get($payload, 'manage'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'documentSid' => $documentSid, 'identity' => $identity ?: $this->properties['identity'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DocumentPermissionContext Context for this DocumentPermissionInstance */ protected function proxy(): DocumentPermissionContext { if (!$this->context) { $this->context = new DocumentPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['documentSid'], $this->solution['identity'] ); } return $this->context; } /** * Fetch the DocumentPermissionInstance * * @return DocumentPermissionInstance Fetched DocumentPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DocumentPermissionInstance { return $this->proxy()->fetch(); } /** * Delete the DocumentPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the DocumentPermissionInstance * * @param bool $read Read access * @param bool $write Write access * @param bool $manage Manage access * @return DocumentPermissionInstance Updated DocumentPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): DocumentPermissionInstance { return $this->proxy()->update($read, $write, $manage); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.DocumentPermissionInstance ' . \implode(' ', $context) . ']'; } }PKt[.Y @Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'data' => Values::array_get($payload, 'data'), ]; $this->solution = ['serviceSid' => $serviceSid, 'streamSid' => $streamSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.StreamMessageInstance]'; } }PKt[Դ:d44<Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return StreamMessageInstance \Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageInstance */ public function buildInstance(array $payload): StreamMessageInstance { return new StreamMessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['streamSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.StreamMessagePage]'; } }PKt[E<Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageList.phpnu[solution = ['serviceSid' => $serviceSid, 'streamSid' => $streamSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Streams/' . \rawurlencode($streamSid) . '/Messages'; } /** * Create the StreamMessageInstance * * @param array $data A JSON string that represents an arbitrary, schema-less * object that makes up the Stream Message body * @return StreamMessageInstance Created StreamMessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $data): StreamMessageInstance { $data = Values::of(['Data' => Serialize::jsonObject($data), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new StreamMessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['streamSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.StreamMessageList]'; } }PKt[Vih,Twilio/Rest/Sync/V1/Service/SyncListPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncListInstance \Twilio\Rest\Sync\V1\Service\SyncListInstance */ public function buildInstance(array $payload): SyncListInstance { return new SyncListInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncListPage]'; } }PKt[W oo/Twilio/Rest/Sync/V1/Service/SyncListOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['ttl'] = $ttl; $this->options['collectionTtl'] = $collectionTtl; } /** * An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Alias for collection_ttl. If both are provided, this value is ignored. * * @param int $ttl Alias for collection_ttl * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync List expires (time-to-live) and is deleted. * * @param int $collectionTtl How long, in seconds, before the Sync List expires * and is deleted * @return $this Fluent Builder */ public function setCollectionTtl(int $collectionTtl): self { $this->options['collectionTtl'] = $collectionTtl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.CreateSyncListOptions ' . $options . ']'; } } class UpdateSyncListOptions extends Options { /** * @param int $ttl An alias for collection_ttl * @param int $collectionTtl How long, in seconds, before the Sync List expires * and is deleted */ public function __construct(int $ttl = Values::NONE, int $collectionTtl = Values::NONE) { $this->options['ttl'] = $ttl; $this->options['collectionTtl'] = $collectionTtl; } /** * An alias for `collection_ttl`. If both are provided, this value is ignored. * * @param int $ttl An alias for collection_ttl * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync List expires (time-to-live) and is deleted. * * @param int $collectionTtl How long, in seconds, before the Sync List expires * and is deleted * @return $this Fluent Builder */ public function setCollectionTtl(int $collectionTtl): self { $this->options['collectionTtl'] = $collectionTtl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.UpdateSyncListOptions ' . $options . ']'; } }PKt[\]((/Twilio/Rest/Sync/V1/Service/SyncMapInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'revision' => Values::array_get($payload, 'revision'), 'dateExpires' => Deserialize::dateTime(Values::array_get($payload, 'date_expires')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncMapContext Context for this SyncMapInstance */ protected function proxy(): SyncMapContext { if (!$this->context) { $this->context = new SyncMapContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SyncMapInstance * * @return SyncMapInstance Fetched SyncMapInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapInstance { return $this->proxy()->fetch(); } /** * Delete the SyncMapInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the SyncMapInstance * * @param array|Options $options Optional Arguments * @return SyncMapInstance Updated SyncMapInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SyncMapInstance { return $this->proxy()->update($options); } /** * Access the syncMapItems */ protected function getSyncMapItems(): SyncMapItemList { return $this->proxy()->syncMapItems; } /** * Access the syncMapPermissions */ protected function getSyncMapPermissions(): SyncMapPermissionList { return $this->proxy()->syncMapPermissions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncMapInstance ' . \implode(' ', $context) . ']'; } }PKt[_ BTwilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionContext.phpnu[solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, 'identity' => $identity, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Permissions/' . \rawurlencode($identity) . ''; } /** * Fetch the SyncListPermissionInstance * * @return SyncListPermissionInstance Fetched SyncListPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListPermissionInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncListPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['identity'] ); } /** * Delete the SyncListPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the SyncListPermissionInstance * * @param bool $read Read access * @param bool $write Write access * @param bool $manage Manage access * @return SyncListPermissionInstance Updated SyncListPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): SyncListPermissionInstance { $data = Values::of([ 'Read' => Serialize::booleanToString($read), 'Write' => Serialize::booleanToString($write), 'Manage' => Serialize::booleanToString($manage), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SyncListPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['identity'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncListPermissionContext ' . \implode(' ', $context) . ']'; } }PKt[hLL?Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncListPermissionInstance \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionInstance */ public function buildInstance(array $payload): SyncListPermissionInstance { return new SyncListPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncListPermissionPage]'; } }PKt[Nɞ?Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionList.phpnu[solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Permissions'; } /** * Streams SyncListPermissionInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncListPermissionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncListPermissionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SyncListPermissionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncListPermissionPage Page of SyncListPermissionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncListPermissionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncListPermissionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncListPermissionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncListPermissionPage Page of SyncListPermissionInstance */ public function getPage(string $targetUrl): SyncListPermissionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncListPermissionPage($this->version, $response, $this->solution); } /** * Constructs a SyncListPermissionContext * * @param string $identity The application-defined string that uniquely * identifies the User's Sync List Permission resource * to fetch */ public function getContext(string $identity): SyncListPermissionContext { return new SyncListPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['listSid'], $identity ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncListPermissionList]'; } }PKt[=I.''<Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemContext.phpnu[solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, 'index' => $index, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Items/' . \rawurlencode($index) . ''; } /** * Fetch the SyncListItemInstance * * @return SyncListItemInstance Fetched SyncListItemInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListItemInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncListItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['index'] ); } /** * Delete the SyncListItemInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the SyncListItemInstance * * @param array|Options $options Optional Arguments * @return SyncListItemInstance Updated SyncListItemInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SyncListItemInstance { $options = new Values($options); $data = Values::of([ 'Data' => Serialize::jsonObject($options['data']), 'Ttl' => $options['ttl'], 'ItemTtl' => $options['itemTtl'], 'CollectionTtl' => $options['collectionTtl'], ]); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new SyncListItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['index'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncListItemContext ' . \implode(' ', $context) . ']'; } }PKt[!#%B-B-<Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.phpnu[options['ifMatch'] = $ifMatch; } /** * If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.DeleteSyncListItemOptions ' . $options . ']'; } } class CreateSyncListItemOptions extends Options { /** * @param int $ttl An alias for item_ttl * @param int $itemTtl How long, in seconds, before the List Item expires * @param int $collectionTtl How long, in seconds, before the List Item's * parent Sync List expires */ public function __construct(int $ttl = Values::NONE, int $itemTtl = Values::NONE, int $collectionTtl = Values::NONE) { $this->options['ttl'] = $ttl; $this->options['itemTtl'] = $itemTtl; $this->options['collectionTtl'] = $collectionTtl; } /** * An alias for `item_ttl`. If both parameters are provided, this value is ignored. * * @param int $ttl An alias for item_ttl * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item expires (time-to-live) and is deleted. * * @param int $itemTtl How long, in seconds, before the List Item expires * @return $this Fluent Builder */ public function setItemTtl(int $itemTtl): self { $this->options['itemTtl'] = $itemTtl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item's parent Sync List expires (time-to-live) and is deleted. * * @param int $collectionTtl How long, in seconds, before the List Item's * parent Sync List expires * @return $this Fluent Builder */ public function setCollectionTtl(int $collectionTtl): self { $this->options['collectionTtl'] = $collectionTtl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.CreateSyncListItemOptions ' . $options . ']'; } } class ReadSyncListItemOptions extends Options { /** * @param string $order The order to return the List Items * @param string $from The index of the first Sync List Item resource to read * @param string $bounds Whether to include the List Item referenced by the * from parameter */ public function __construct(string $order = Values::NONE, string $from = Values::NONE, string $bounds = Values::NONE) { $this->options['order'] = $order; $this->options['from'] = $from; $this->options['bounds'] = $bounds; } /** * How to order the List Items returned by their `index` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. * * @param string $order The order to return the List Items * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * The `index` of the first Sync List Item resource to read. See also `bounds`. * * @param string $from The index of the first Sync List Item resource to read * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * Whether to include the List Item referenced by the `from` parameter. Can be: `inclusive` to include the List Item referenced by the `from` parameter or `exclusive` to start with the next List Item. The default value is `inclusive`. * * @param string $bounds Whether to include the List Item referenced by the * from parameter * @return $this Fluent Builder */ public function setBounds(string $bounds): self { $this->options['bounds'] = $bounds; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.ReadSyncListItemOptions ' . $options . ']'; } } class UpdateSyncListItemOptions extends Options { /** * @param array $data A JSON string that represents an arbitrary, schema-less * object that the List Item stores * @param int $ttl An alias for item_ttl * @param int $itemTtl How long, in seconds, before the List Item expires * @param int $collectionTtl How long, in seconds, before the List Item's * parent Sync List expires * @param string $ifMatch The If-Match HTTP request header */ public function __construct(array $data = Values::ARRAY_NONE, int $ttl = Values::NONE, int $itemTtl = Values::NONE, int $collectionTtl = Values::NONE, string $ifMatch = Values::NONE) { $this->options['data'] = $data; $this->options['ttl'] = $ttl; $this->options['itemTtl'] = $itemTtl; $this->options['collectionTtl'] = $collectionTtl; $this->options['ifMatch'] = $ifMatch; } /** * A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. * * @param array $data A JSON string that represents an arbitrary, schema-less * object that the List Item stores * @return $this Fluent Builder */ public function setData(array $data): self { $this->options['data'] = $data; return $this; } /** * An alias for `item_ttl`. If both parameters are provided, this value is ignored. * * @param int $ttl An alias for item_ttl * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item expires (time-to-live) and is deleted. * * @param int $itemTtl How long, in seconds, before the List Item expires * @return $this Fluent Builder */ public function setItemTtl(int $itemTtl): self { $this->options['itemTtl'] = $itemTtl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item's parent Sync List expires (time-to-live) and is deleted. This parameter can only be used when the List Item's `data` or `ttl` is updated in the same request. * * @param int $collectionTtl How long, in seconds, before the List Item's * parent Sync List expires * @return $this Fluent Builder */ public function setCollectionTtl(int $collectionTtl): self { $this->options['collectionTtl'] = $collectionTtl; return $this; } /** * If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.UpdateSyncListItemOptions ' . $options . ']'; } }PKt[LS8rr9Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemList.phpnu[solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Items'; } /** * Create the SyncListItemInstance * * @param array $data A JSON string that represents an arbitrary, schema-less * object that the List Item stores * @param array|Options $options Optional Arguments * @return SyncListItemInstance Created SyncListItemInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $data, array $options = []): SyncListItemInstance { $options = new Values($options); $data = Values::of([ 'Data' => Serialize::jsonObject($data), 'Ttl' => $options['ttl'], 'ItemTtl' => $options['itemTtl'], 'CollectionTtl' => $options['collectionTtl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SyncListItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'] ); } /** * Streams SyncListItemInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncListItemInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncListItemInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SyncListItemInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncListItemPage Page of SyncListItemInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncListItemPage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'From' => $options['from'], 'Bounds' => $options['bounds'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncListItemPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncListItemInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncListItemPage Page of SyncListItemInstance */ public function getPage(string $targetUrl): SyncListItemPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncListItemPage($this->version, $response, $this->solution); } /** * Constructs a SyncListItemContext * * @param int $index The index of the Sync List Item resource to fetch */ public function getContext(int $index): SyncListItemContext { return new SyncListItemContext( $this->version, $this->solution['serviceSid'], $this->solution['listSid'], $index ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncListItemList]'; } }PKt[s((9Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncListItemInstance \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemInstance */ public function buildInstance(array $payload): SyncListItemInstance { return new SyncListItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncListItemPage]'; } }PKt[p{CTwilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'listSid' => Values::array_get($payload, 'list_sid'), 'identity' => Values::array_get($payload, 'identity'), 'read' => Values::array_get($payload, 'read'), 'write' => Values::array_get($payload, 'write'), 'manage' => Values::array_get($payload, 'manage'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'listSid' => $listSid, 'identity' => $identity ?: $this->properties['identity'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncListPermissionContext Context for this SyncListPermissionInstance */ protected function proxy(): SyncListPermissionContext { if (!$this->context) { $this->context = new SyncListPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['identity'] ); } return $this->context; } /** * Fetch the SyncListPermissionInstance * * @return SyncListPermissionInstance Fetched SyncListPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListPermissionInstance { return $this->proxy()->fetch(); } /** * Delete the SyncListPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the SyncListPermissionInstance * * @param bool $read Read access * @param bool $write Write access * @param bool $manage Manage access * @return SyncListPermissionInstance Updated SyncListPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): SyncListPermissionInstance { return $this->proxy()->update($read, $write, $manage); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncListPermissionInstance ' . \implode(' ', $context) . ']'; } }PKt[mj=Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemInstance.phpnu[properties = [ 'index' => Values::array_get($payload, 'index'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'listSid' => Values::array_get($payload, 'list_sid'), 'url' => Values::array_get($payload, 'url'), 'revision' => Values::array_get($payload, 'revision'), 'data' => Values::array_get($payload, 'data'), 'dateExpires' => Deserialize::dateTime(Values::array_get($payload, 'date_expires')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'listSid' => $listSid, 'index' => $index ?: $this->properties['index'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncListItemContext Context for this SyncListItemInstance */ protected function proxy(): SyncListItemContext { if (!$this->context) { $this->context = new SyncListItemContext( $this->version, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['index'] ); } return $this->context; } /** * Fetch the SyncListItemInstance * * @return SyncListItemInstance Fetched SyncListItemInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListItemInstance { return $this->proxy()->fetch(); } /** * Delete the SyncListItemInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the SyncListItemInstance * * @param array|Options $options Optional Arguments * @return SyncListItemInstance Updated SyncListItemInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SyncListItemInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncListItemInstance ' . \implode(' ', $context) . ']'; } }PKt[B4+Twilio/Rest/Sync/V1/Service/SyncMapList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps'; } /** * Create the SyncMapInstance * * @param array|Options $options Optional Arguments * @return SyncMapInstance Created SyncMapInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): SyncMapInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'Ttl' => $options['ttl'], 'CollectionTtl' => $options['collectionTtl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SyncMapInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams SyncMapInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncMapInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncMapInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SyncMapInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncMapPage Page of SyncMapInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncMapPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncMapPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncMapInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncMapPage Page of SyncMapInstance */ public function getPage(string $targetUrl): SyncMapPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncMapPage($this->version, $response, $this->solution); } /** * Constructs a SyncMapContext * * @param string $sid The SID of the Sync Map resource to fetch */ public function getContext(string $sid): SyncMapContext { return new SyncMapContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncMapList]'; } }PKt[0Twilio/Rest/Sync/V1/Service/DocumentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'revision' => Values::array_get($payload, 'revision'), 'data' => Values::array_get($payload, 'data'), 'dateExpires' => Deserialize::dateTime(Values::array_get($payload, 'date_expires')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DocumentContext Context for this DocumentInstance */ protected function proxy(): DocumentContext { if (!$this->context) { $this->context = new DocumentContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DocumentInstance * * @return DocumentInstance Fetched DocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DocumentInstance { return $this->proxy()->fetch(); } /** * Delete the DocumentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the DocumentInstance * * @param array|Options $options Optional Arguments * @return DocumentInstance Updated DocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DocumentInstance { return $this->proxy()->update($options); } /** * Access the documentPermissions */ protected function getDocumentPermissions(): DocumentPermissionList { return $this->proxy()->documentPermissions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.DocumentInstance ' . \implode(' ', $context) . ']'; } }PKt[olee1Twilio/Rest/Sync/V1/Service/SyncStreamOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['ttl'] = $ttl; } /** * An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Stream expires and is deleted (time-to-live). * * @param int $ttl How long, in seconds, before the Stream expires and is * deleted * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.CreateSyncStreamOptions ' . $options . ']'; } } class UpdateSyncStreamOptions extends Options { /** * @param int $ttl How long, in seconds, before the Stream expires and is * deleted */ public function __construct(int $ttl = Values::NONE) { $this->options['ttl'] = $ttl; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Stream expires and is deleted (time-to-live). * * @param int $ttl How long, in seconds, before the Stream expires and is * deleted * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.UpdateSyncStreamOptions ' . $options . ']'; } }PKt[07.Twilio/Rest/Sync/V1/Service/SyncStreamList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Streams'; } /** * Create the SyncStreamInstance * * @param array|Options $options Optional Arguments * @return SyncStreamInstance Created SyncStreamInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): SyncStreamInstance { $options = new Values($options); $data = Values::of(['UniqueName' => $options['uniqueName'], 'Ttl' => $options['ttl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SyncStreamInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams SyncStreamInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncStreamInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncStreamInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SyncStreamInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncStreamPage Page of SyncStreamInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncStreamPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncStreamPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncStreamInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncStreamPage Page of SyncStreamInstance */ public function getPage(string $targetUrl): SyncStreamPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncStreamPage($this->version, $response, $this->solution); } /** * Constructs a SyncStreamContext * * @param string $sid The SID of the Stream resource to fetch */ public function getContext(string $sid): SyncStreamContext { return new SyncStreamContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncStreamList]'; } }PKt[cK".Twilio/Rest/Sync/V1/Service/SyncStreamPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncStreamInstance \Twilio\Rest\Sync\V1\Service\SyncStreamInstance */ public function buildInstance(array $payload): SyncStreamInstance { return new SyncStreamInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncStreamPage]'; } }PKt[5**,Twilio/Rest/Sync/V1/Service/DocumentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DocumentInstance \Twilio\Rest\Sync\V1\Service\DocumentInstance */ public function buildInstance(array $payload): DocumentInstance { return new DocumentInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.DocumentPage]'; } }PKt[[*GG0Twilio/Rest/Sync/V1/Service/SyncListInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'revision' => Values::array_get($payload, 'revision'), 'dateExpires' => Deserialize::dateTime(Values::array_get($payload, 'date_expires')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncListContext Context for this SyncListInstance */ protected function proxy(): SyncListContext { if (!$this->context) { $this->context = new SyncListContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SyncListInstance * * @return SyncListInstance Fetched SyncListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListInstance { return $this->proxy()->fetch(); } /** * Delete the SyncListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the SyncListInstance * * @param array|Options $options Optional Arguments * @return SyncListInstance Updated SyncListInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SyncListInstance { return $this->proxy()->update($options); } /** * Access the syncListItems */ protected function getSyncListItems(): SyncListItemList { return $this->proxy()->syncListItems; } /** * Access the syncListPermissions */ protected function getSyncListPermissions(): SyncListPermissionList { return $this->proxy()->syncListPermissions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncListInstance ' . \implode(' ', $context) . ']'; } }PKt[X52Twilio/Rest/Sync/V1/Service/SyncStreamInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'dateExpires' => Deserialize::dateTime(Values::array_get($payload, 'date_expires')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncStreamContext Context for this SyncStreamInstance */ protected function proxy(): SyncStreamContext { if (!$this->context) { $this->context = new SyncStreamContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SyncStreamInstance * * @return SyncStreamInstance Fetched SyncStreamInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncStreamInstance { return $this->proxy()->fetch(); } /** * Delete the SyncStreamInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the SyncStreamInstance * * @param array|Options $options Optional Arguments * @return SyncStreamInstance Updated SyncStreamInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SyncStreamInstance { return $this->proxy()->update($options); } /** * Access the streamMessages */ protected function getStreamMessages(): StreamMessageList { return $this->proxy()->streamMessages; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncStreamInstance ' . \implode(' ', $context) . ']'; } }PKt[;jMQ,Twilio/Rest/Sync/V1/Service/SyncListList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists'; } /** * Create the SyncListInstance * * @param array|Options $options Optional Arguments * @return SyncListInstance Created SyncListInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): SyncListInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'Ttl' => $options['ttl'], 'CollectionTtl' => $options['collectionTtl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SyncListInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams SyncListInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncListInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncListInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SyncListInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncListPage Page of SyncListInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncListPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncListPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncListInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncListPage Page of SyncListInstance */ public function getPage(string $targetUrl): SyncListPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncListPage($this->version, $response, $this->solution); } /** * Constructs a SyncListContext * * @param string $sid The SID of the Sync List resource to fetch */ public function getContext(string $sid): SyncListContext { return new SyncListContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncListList]'; } }PKt[䷈Ϣ+Twilio/Rest/Sync/V1/Service/SyncMapPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncMapInstance \Twilio\Rest\Sync\V1\Service\SyncMapInstance */ public function buildInstance(array $payload): SyncMapInstance { return new SyncMapInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.SyncMapPage]'; } }PKt[/</Twilio/Rest/Sync/V1/Service/SyncListContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($sid) . ''; } /** * Fetch the SyncListInstance * * @return SyncListInstance Fetched SyncListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncListInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the SyncListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the SyncListInstance * * @param array|Options $options Optional Arguments * @return SyncListInstance Updated SyncListInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SyncListInstance { $options = new Values($options); $data = Values::of(['Ttl' => $options['ttl'], 'CollectionTtl' => $options['collectionTtl'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SyncListInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the syncListItems */ protected function getSyncListItems(): SyncListItemList { if (!$this->_syncListItems) { $this->_syncListItems = new SyncListItemList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_syncListItems; } /** * Access the syncListPermissions */ protected function getSyncListPermissions(): SyncListPermissionList { if (!$this->_syncListPermissions) { $this->_syncListPermissions = new SyncListPermissionList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_syncListPermissions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncListContext ' . \implode(' ', $context) . ']'; } }PKt[.Twilio/Rest/Sync/V1/Service/SyncMapOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['ttl'] = $ttl; $this->options['collectionTtl'] = $collectionTtl; } /** * An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * An alias for `collection_ttl`. If both parameters are provided, this value is ignored. * * @param int $ttl An alias for collection_ttl * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Map expires (time-to-live) and is deleted. * * @param int $collectionTtl How long, in seconds, before the Sync Map expires * and is deleted * @return $this Fluent Builder */ public function setCollectionTtl(int $collectionTtl): self { $this->options['collectionTtl'] = $collectionTtl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.CreateSyncMapOptions ' . $options . ']'; } } class UpdateSyncMapOptions extends Options { /** * @param int $ttl An alias for collection_ttl * @param int $collectionTtl How long, in seconds, before the Sync Map expires * and is deleted */ public function __construct(int $ttl = Values::NONE, int $collectionTtl = Values::NONE) { $this->options['ttl'] = $ttl; $this->options['collectionTtl'] = $collectionTtl; } /** * An alias for `collection_ttl`. If both parameters are provided, this value is ignored. * * @param int $ttl An alias for collection_ttl * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Map expires (time-to-live) and is deleted. * * @param int $collectionTtl How long, in seconds, before the Sync Map expires * and is deleted * @return $this Fluent Builder */ public function setCollectionTtl(int $collectionTtl): self { $this->options['collectionTtl'] = $collectionTtl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.UpdateSyncMapOptions ' . $options . ']'; } }PKt[ƨ4G1Twilio/Rest/Sync/V1/Service/SyncStreamContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Streams/' . \rawurlencode($sid) . ''; } /** * Fetch the SyncStreamInstance * * @return SyncStreamInstance Fetched SyncStreamInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncStreamInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncStreamInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the SyncStreamInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the SyncStreamInstance * * @param array|Options $options Optional Arguments * @return SyncStreamInstance Updated SyncStreamInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SyncStreamInstance { $options = new Values($options); $data = Values::of(['Ttl' => $options['ttl'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SyncStreamInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the streamMessages */ protected function getStreamMessages(): StreamMessageList { if (!$this->_streamMessages) { $this->_streamMessages = new StreamMessageList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_streamMessages; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.SyncStreamContext ' . \implode(' ', $context) . ']'; } }PKt[?Sbb'Twilio/Rest/Sync/V1/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'webhookUrl' => Values::array_get($payload, 'webhook_url'), 'webhooksFromRestEnabled' => Values::array_get($payload, 'webhooks_from_rest_enabled'), 'reachabilityWebhooksEnabled' => Values::array_get($payload, 'reachability_webhooks_enabled'), 'aclEnabled' => Values::array_get($payload, 'acl_enabled'), 'reachabilityDebouncingEnabled' => Values::array_get($payload, 'reachability_debouncing_enabled'), 'reachabilityDebouncingWindow' => Values::array_get($payload, 'reachability_debouncing_window'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Access the documents */ protected function getDocuments(): DocumentList { return $this->proxy()->documents; } /** * Access the syncLists */ protected function getSyncLists(): SyncListList { return $this->proxy()->syncLists; } /** * Access the syncMaps */ protected function getSyncMaps(): SyncMapList { return $this->proxy()->syncMaps; } /** * Access the syncStreams */ protected function getSyncStreams(): SyncStreamList { return $this->proxy()->syncStreams; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[x#Twilio/Rest/Sync/V1/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Create the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'WebhookUrl' => $options['webhookUrl'], 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']), 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']), 'ReachabilityDebouncingEnabled' => Serialize::booleanToString($options['reachabilityDebouncingEnabled']), 'ReachabilityDebouncingWindow' => $options['reachabilityDebouncingWindow'], 'WebhooksFromRestEnabled' => Serialize::booleanToString($options['webhooksFromRestEnabled']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Constructs a ServiceContext * * @param string $sid The SID of the Service resource to fetch */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.ServiceList]'; } }PKt[DVdd&Twilio/Rest/Sync/V1/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'WebhookUrl' => $options['webhookUrl'], 'FriendlyName' => $options['friendlyName'], 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']), 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']), 'ReachabilityDebouncingEnabled' => Serialize::booleanToString($options['reachabilityDebouncingEnabled']), 'ReachabilityDebouncingWindow' => $options['reachabilityDebouncingWindow'], 'WebhooksFromRestEnabled' => Serialize::booleanToString($options['webhooksFromRestEnabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the documents */ protected function getDocuments(): DocumentList { if (!$this->_documents) { $this->_documents = new DocumentList($this->version, $this->solution['sid']); } return $this->_documents; } /** * Access the syncLists */ protected function getSyncLists(): SyncListList { if (!$this->_syncLists) { $this->_syncLists = new SyncListList($this->version, $this->solution['sid']); } return $this->_syncLists; } /** * Access the syncMaps */ protected function getSyncMaps(): SyncMapList { if (!$this->_syncMaps) { $this->_syncMaps = new SyncMapList($this->version, $this->solution['sid']); } return $this->_syncMaps; } /** * Access the syncStreams */ protected function getSyncStreams(): SyncStreamList { if (!$this->_syncStreams) { $this->_syncStreams = new SyncStreamList($this->version, $this->solution['sid']); } return $this->_syncStreams; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Sync.V1.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[" fCC&Twilio/Rest/Sync/V1/ServiceOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['webhookUrl'] = $webhookUrl; $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; $this->options['aclEnabled'] = $aclEnabled; $this->options['reachabilityDebouncingEnabled'] = $reachabilityDebouncingEnabled; $this->options['reachabilityDebouncingWindow'] = $reachabilityDebouncingWindow; $this->options['webhooksFromRestEnabled'] = $webhooksFromRestEnabled; } /** * A string that you assign to describe the resource. * * @param string $friendlyName A string that you assign to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The URL we should call when Sync objects are manipulated. * * @param string $webhookUrl The URL we should call when Sync objects are * manipulated * @return $this Fluent Builder */ public function setWebhookUrl(string $webhookUrl): self { $this->options['webhookUrl'] = $webhookUrl; return $this; } /** * Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. * * @param bool $reachabilityWebhooksEnabled Whether the service instance should * call webhook_url when client * endpoints connect to Sync * @return $this Fluent Builder */ public function setReachabilityWebhooksEnabled(bool $reachabilityWebhooksEnabled): self { $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; return $this; } /** * Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. * * @param bool $aclEnabled Whether token identities in the Service must be * granted access to Sync objects by using the * Permissions resource * @return $this Fluent Builder */ public function setAclEnabled(bool $aclEnabled): self { $this->options['aclEnabled'] = $aclEnabled; return $this; } /** * Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event. * * @param bool $reachabilityDebouncingEnabled Whether every * endpoint_disconnected event * occurs after a configurable delay * @return $this Fluent Builder */ public function setReachabilityDebouncingEnabled(bool $reachabilityDebouncingEnabled): self { $this->options['reachabilityDebouncingEnabled'] = $reachabilityDebouncingEnabled; return $this; } /** * The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the `webhook_url` is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the call to `webhook_url`. * * @param int $reachabilityDebouncingWindow The reachability event delay in * milliseconds * @return $this Fluent Builder */ public function setReachabilityDebouncingWindow(int $reachabilityDebouncingWindow): self { $this->options['reachabilityDebouncingWindow'] = $reachabilityDebouncingWindow; return $this; } /** * Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. * * @param bool $webhooksFromRestEnabled Whether the Service instance should * call webhook_url when the REST API is * used to update Sync objects * @return $this Fluent Builder */ public function setWebhooksFromRestEnabled(bool $webhooksFromRestEnabled): self { $this->options['webhooksFromRestEnabled'] = $webhooksFromRestEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.CreateServiceOptions ' . $options . ']'; } } class UpdateServiceOptions extends Options { /** * @param string $webhookUrl The URL we should call when Sync objects are * manipulated * @param string $friendlyName A string that you assign to describe the resource * @param bool $reachabilityWebhooksEnabled Whether the service instance should * call webhook_url when client * endpoints connect to Sync * @param bool $aclEnabled Whether token identities in the Service must be * granted access to Sync objects by using the * Permissions resource * @param bool $reachabilityDebouncingEnabled Whether every * endpoint_disconnected event * occurs after a configurable delay * @param int $reachabilityDebouncingWindow The reachability event delay in * milliseconds * @param bool $webhooksFromRestEnabled Whether the Service instance should * call webhook_url when the REST API is * used to update Sync objects */ public function __construct(string $webhookUrl = Values::NONE, string $friendlyName = Values::NONE, bool $reachabilityWebhooksEnabled = Values::NONE, bool $aclEnabled = Values::NONE, bool $reachabilityDebouncingEnabled = Values::NONE, int $reachabilityDebouncingWindow = Values::NONE, bool $webhooksFromRestEnabled = Values::NONE) { $this->options['webhookUrl'] = $webhookUrl; $this->options['friendlyName'] = $friendlyName; $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; $this->options['aclEnabled'] = $aclEnabled; $this->options['reachabilityDebouncingEnabled'] = $reachabilityDebouncingEnabled; $this->options['reachabilityDebouncingWindow'] = $reachabilityDebouncingWindow; $this->options['webhooksFromRestEnabled'] = $webhooksFromRestEnabled; } /** * The URL we should call when Sync objects are manipulated. * * @param string $webhookUrl The URL we should call when Sync objects are * manipulated * @return $this Fluent Builder */ public function setWebhookUrl(string $webhookUrl): self { $this->options['webhookUrl'] = $webhookUrl; return $this; } /** * A string that you assign to describe the resource. * * @param string $friendlyName A string that you assign to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. * * @param bool $reachabilityWebhooksEnabled Whether the service instance should * call webhook_url when client * endpoints connect to Sync * @return $this Fluent Builder */ public function setReachabilityWebhooksEnabled(bool $reachabilityWebhooksEnabled): self { $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; return $this; } /** * Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. * * @param bool $aclEnabled Whether token identities in the Service must be * granted access to Sync objects by using the * Permissions resource * @return $this Fluent Builder */ public function setAclEnabled(bool $aclEnabled): self { $this->options['aclEnabled'] = $aclEnabled; return $this; } /** * Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event. * * @param bool $reachabilityDebouncingEnabled Whether every * endpoint_disconnected event * occurs after a configurable delay * @return $this Fluent Builder */ public function setReachabilityDebouncingEnabled(bool $reachabilityDebouncingEnabled): self { $this->options['reachabilityDebouncingEnabled'] = $reachabilityDebouncingEnabled; return $this; } /** * The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the webhook is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the webhook from being called. * * @param int $reachabilityDebouncingWindow The reachability event delay in * milliseconds * @return $this Fluent Builder */ public function setReachabilityDebouncingWindow(int $reachabilityDebouncingWindow): self { $this->options['reachabilityDebouncingWindow'] = $reachabilityDebouncingWindow; return $this; } /** * Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. * * @param bool $webhooksFromRestEnabled Whether the Service instance should * call webhook_url when the REST API is * used to update Sync objects * @return $this Fluent Builder */ public function setWebhooksFromRestEnabled(bool $webhooksFromRestEnabled): self { $this->options['webhooksFromRestEnabled'] = $webhooksFromRestEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Sync.V1.UpdateServiceOptions ' . $options . ']'; } }PKt[DWss#Twilio/Rest/Sync/V1/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\Sync\V1\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1.ServicePage]'; } }PKt[<ʖTwilio/Rest/Sync/V1.phpnu[version = 'v1'; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync.V1]'; } }PKt[ц Twilio/Rest/Sync.phpnu[baseUrl = 'https://sync.twilio.com'; } /** * @return V1 Version v1 of sync */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getServices(): \Twilio\Rest\Sync\V1\ServiceList { return $this->v1->services; } /** * @param string $sid The SID of the Service resource to fetch */ protected function contextServices(string $sid): \Twilio\Rest\Sync\V1\ServiceContext { return $this->v1->services($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Sync]'; } }PKt[g Twilio/Rest/Routes.phpnu[baseUrl = 'https://routes.twilio.com'; } /** * @return V2 Version v2 of routes */ protected function getV2(): V2 { if (!$this->_v2) { $this->_v2 = new V2($this); } return $this->_v2; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getPhoneNumbers(): \Twilio\Rest\Routes\V2\PhoneNumberList { return $this->v2->phoneNumbers; } /** * @param string $phoneNumber The phone number */ protected function contextPhoneNumbers(string $phoneNumber): \Twilio\Rest\Routes\V2\PhoneNumberContext { return $this->v2->phoneNumbers($phoneNumber); } protected function getSipDomains(): \Twilio\Rest\Routes\V2\SipDomainList { return $this->v2->sipDomains; } /** * @param string $sipDomain The sip_domain */ protected function contextSipDomains(string $sipDomain): \Twilio\Rest\Routes\V2\SipDomainContext { return $this->v2->sipDomains($sipDomain); } protected function getTrunks(): \Twilio\Rest\Routes\V2\TrunkList { return $this->v2->trunks; } /** * @param string $sipTrunkDomain The SIP Trunk */ protected function contextTrunks(string $sipTrunkDomain): \Twilio\Rest\Routes\V2\TrunkContext { return $this->v2->trunks($sipTrunkDomain); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Routes]'; } }PKt['p  (Twilio/Rest/Monitor/V1/AlertInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'alertText' => Values::array_get($payload, 'alert_text'), 'apiVersion' => Values::array_get($payload, 'api_version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateGenerated' => Deserialize::dateTime(Values::array_get($payload, 'date_generated')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'errorCode' => Values::array_get($payload, 'error_code'), 'logLevel' => Values::array_get($payload, 'log_level'), 'moreInfo' => Values::array_get($payload, 'more_info'), 'requestMethod' => Values::array_get($payload, 'request_method'), 'requestUrl' => Values::array_get($payload, 'request_url'), 'requestVariables' => Values::array_get($payload, 'request_variables'), 'resourceSid' => Values::array_get($payload, 'resource_sid'), 'responseBody' => Values::array_get($payload, 'response_body'), 'responseHeaders' => Values::array_get($payload, 'response_headers'), 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), 'requestHeaders' => Values::array_get($payload, 'request_headers'), 'serviceSid' => Values::array_get($payload, 'service_sid'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AlertContext Context for this AlertInstance */ protected function proxy(): AlertContext { if (!$this->context) { $this->context = new AlertContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the AlertInstance * * @return AlertInstance Fetched AlertInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AlertInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Monitor.V1.AlertInstance ' . \implode(' ', $context) . ']'; } }PKt[ֿ$Twilio/Rest/Monitor/V1/EventList.phpnu[solution = []; $this->uri = '/Events'; } /** * Streams EventInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EventInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EventInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of EventInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EventPage Page of EventInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EventPage { $options = new Values($options); $params = Values::of([ 'ActorSid' => $options['actorSid'], 'EventType' => $options['eventType'], 'ResourceSid' => $options['resourceSid'], 'SourceIpAddress' => $options['sourceIpAddress'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EventPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EventInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EventPage Page of EventInstance */ public function getPage(string $targetUrl): EventPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EventPage($this->version, $response, $this->solution); } /** * Constructs a EventContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): EventContext { return new EventContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Monitor.V1.EventList]'; } }PKt[a^+pp$Twilio/Rest/Monitor/V1/EventPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EventInstance \Twilio\Rest\Monitor\V1\EventInstance */ public function buildInstance(array $payload): EventInstance { return new EventInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Monitor.V1.EventPage]'; } }PKt[Z$Twilio/Rest/Monitor/V1/AlertList.phpnu[solution = []; $this->uri = '/Alerts'; } /** * Streams AlertInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AlertInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AlertInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of AlertInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AlertPage Page of AlertInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AlertPage { $options = new Values($options); $params = Values::of([ 'LogLevel' => $options['logLevel'], 'StartDate' => Serialize::iso8601DateTime($options['startDate']), 'EndDate' => Serialize::iso8601DateTime($options['endDate']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AlertPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AlertInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AlertPage Page of AlertInstance */ public function getPage(string $targetUrl): AlertPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AlertPage($this->version, $response, $this->solution); } /** * Constructs a AlertContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): AlertContext { return new AlertContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Monitor.V1.AlertList]'; } }PKt[C * 'Twilio/Rest/Monitor/V1/AlertOptions.phpnu[options['logLevel'] = $logLevel; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; } /** * Only show alerts for this log-level. Can be: `error`, `warning`, `notice`, or `debug`. * * @param string $logLevel Only show alerts for this log-level * @return $this Fluent Builder */ public function setLogLevel(string $logLevel): self { $this->options['logLevel'] = $logLevel; return $this; } /** * Only include alerts that occurred on or after this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported. * * @param \DateTime $startDate Only include alerts that occurred on or after * this date and time * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include alerts that occurred on or before this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported. * * @param \DateTime $endDate Only include alerts that occurred on or before * this date and time * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Monitor.V1.ReadAlertOptions ' . $options . ']'; } }PKt[q,'XX'Twilio/Rest/Monitor/V1/EventOptions.phpnu[options['actorSid'] = $actorSid; $this->options['eventType'] = $eventType; $this->options['resourceSid'] = $resourceSid; $this->options['sourceIpAddress'] = $sourceIpAddress; $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; } /** * Only include events initiated by this Actor. Useful for auditing actions taken by specific users or API credentials. * * @param string $actorSid Only include events initiated by this Actor * @return $this Fluent Builder */ public function setActorSid(string $actorSid): self { $this->options['actorSid'] = $actorSid; return $this; } /** * Only include events of this [Event Type](https://www.twilio.com/docs/usage/monitor-events#event-types). * * @param string $eventType Only include events of this Event Type * @return $this Fluent Builder */ public function setEventType(string $eventType): self { $this->options['eventType'] = $eventType; return $this; } /** * Only include events that refer to this resource. Useful for discovering the history of a specific resource. * * @param string $resourceSid Only include events that refer to this resource * @return $this Fluent Builder */ public function setResourceSid(string $resourceSid): self { $this->options['resourceSid'] = $resourceSid; return $this; } /** * Only include events that originated from this IP address. Useful for tracking suspicious activity originating from the API or the Twilio Console. * * @param string $sourceIpAddress Only include events that originated from this * IP address * @return $this Fluent Builder */ public function setSourceIpAddress(string $sourceIpAddress): self { $this->options['sourceIpAddress'] = $sourceIpAddress; return $this; } /** * Only include events that occurred on or after this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $startDate Only include events that occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include events that occurred on or before this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * * @param \DateTime $endDate Only include events that occurred on or before * this date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Monitor.V1.ReadEventOptions ' . $options . ']'; } }PKt[+'Twilio/Rest/Monitor/V1/EventContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Events/' . \rawurlencode($sid) . ''; } /** * Fetch the EventInstance * * @return EventInstance Fetched EventInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EventInstance { $payload = $this->version->fetch('GET', $this->uri); return new EventInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Monitor.V1.EventContext ' . \implode(' ', $context) . ']'; } }PKt[Q'Twilio/Rest/Monitor/V1/AlertContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Alerts/' . \rawurlencode($sid) . ''; } /** * Fetch the AlertInstance * * @return AlertInstance Fetched AlertInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AlertInstance { $payload = $this->version->fetch('GET', $this->uri); return new AlertInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Monitor.V1.AlertContext ' . \implode(' ', $context) . ']'; } }PKt[b pp$Twilio/Rest/Monitor/V1/AlertPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AlertInstance \Twilio\Rest\Monitor\V1\AlertInstance */ public function buildInstance(array $payload): AlertInstance { return new AlertInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Monitor.V1.AlertPage]'; } }PKt[6+|||(Twilio/Rest/Monitor/V1/EventInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'actorSid' => Values::array_get($payload, 'actor_sid'), 'actorType' => Values::array_get($payload, 'actor_type'), 'description' => Values::array_get($payload, 'description'), 'eventData' => Values::array_get($payload, 'event_data'), 'eventDate' => Deserialize::dateTime(Values::array_get($payload, 'event_date')), 'eventType' => Values::array_get($payload, 'event_type'), 'resourceSid' => Values::array_get($payload, 'resource_sid'), 'resourceType' => Values::array_get($payload, 'resource_type'), 'sid' => Values::array_get($payload, 'sid'), 'source' => Values::array_get($payload, 'source'), 'sourceIpAddress' => Values::array_get($payload, 'source_ip_address'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EventContext Context for this EventInstance */ protected function proxy(): EventContext { if (!$this->context) { $this->context = new EventContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the EventInstance * * @return EventInstance Fetched EventInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EventInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Monitor.V1.EventInstance ' . \implode(' ', $context) . ']'; } }PKt[' Twilio/Rest/Monitor/V1.phpnu[version = 'v1'; } protected function getAlerts(): AlertList { if (!$this->_alerts) { $this->_alerts = new AlertList($this); } return $this->_alerts; } protected function getEvents(): EventList { if (!$this->_events) { $this->_events = new EventList($this); } return $this->_events; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Monitor.V1]'; } }PKt[=`Twilio/Rest/Messaging.phpnu[baseUrl = 'https://messaging.twilio.com'; } /** * @return V1 Version v1 of messaging */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getBrandRegistrations(): \Twilio\Rest\Messaging\V1\BrandRegistrationList { return $this->v1->brandRegistrations; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextBrandRegistrations(string $sid): \Twilio\Rest\Messaging\V1\BrandRegistrationContext { return $this->v1->brandRegistrations($sid); } protected function getDeactivations(): \Twilio\Rest\Messaging\V1\DeactivationsList { return $this->v1->deactivations; } protected function contextDeactivations(): \Twilio\Rest\Messaging\V1\DeactivationsContext { return $this->v1->deactivations(); } protected function getDomainCerts(): \Twilio\Rest\Messaging\V1\DomainCertsList { return $this->v1->domainCerts; } /** * @param string $domainSid Unique string used to identify the domain that this * certificate should be associated with. */ protected function contextDomainCerts(string $domainSid): \Twilio\Rest\Messaging\V1\DomainCertsContext { return $this->v1->domainCerts($domainSid); } protected function getDomainConfig(): \Twilio\Rest\Messaging\V1\DomainConfigList { return $this->v1->domainConfig; } /** * @param string $domainSid Unique string used to identify the domain that this * config should be associated with. */ protected function contextDomainConfig(string $domainSid): \Twilio\Rest\Messaging\V1\DomainConfigContext { return $this->v1->domainConfig($domainSid); } protected function getExternalCampaign(): \Twilio\Rest\Messaging\V1\ExternalCampaignList { return $this->v1->externalCampaign; } protected function getServices(): \Twilio\Rest\Messaging\V1\ServiceList { return $this->v1->services; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextServices(string $sid): \Twilio\Rest\Messaging\V1\ServiceContext { return $this->v1->services($sid); } protected function getTollfreeVerifications(): \Twilio\Rest\Messaging\V1\TollfreeVerificationList { return $this->v1->tollfreeVerifications; } /** * @param string $sid Tollfree Verification Sid */ protected function contextTollfreeVerifications(string $sid): \Twilio\Rest\Messaging\V1\TollfreeVerificationContext { return $this->v1->tollfreeVerifications($sid); } protected function getUsecases(): \Twilio\Rest\Messaging\V1\UsecaseList { return $this->v1->usecases; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Messaging]'; } }PKt[UVNΑ Twilio/Rest/Accounts.phpnu[baseUrl = 'https://accounts.twilio.com'; } /** * @return V1 Version v1 of accounts */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getAuthTokenPromotion(): \Twilio\Rest\Accounts\V1\AuthTokenPromotionList { return $this->v1->authTokenPromotion; } protected function contextAuthTokenPromotion(): \Twilio\Rest\Accounts\V1\AuthTokenPromotionContext { return $this->v1->authTokenPromotion(); } protected function getCredentials(): \Twilio\Rest\Accounts\V1\CredentialList { return $this->v1->credentials; } protected function getSecondaryAuthToken(): \Twilio\Rest\Accounts\V1\SecondaryAuthTokenList { return $this->v1->secondaryAuthToken; } protected function contextSecondaryAuthToken(): \Twilio\Rest\Accounts\V1\SecondaryAuthTokenContext { return $this->v1->secondaryAuthToken(); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts]'; } }PKt[L33,Twilio/Rest/FrontlineApi/V1/UserInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'identity' => Values::array_get($payload, 'identity'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'avatar' => Values::array_get($payload, 'avatar'), 'state' => Values::array_get($payload, 'state'), 'isAvailable' => Values::array_get($payload, 'is_available'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserContext Context for this UserInstance */ protected function proxy(): UserContext { if (!$this->context) { $this->context = new UserContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { return $this->proxy()->fetch(); } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FrontlineApi.V1.UserInstance ' . \implode(' ', $context) . ']'; } }PKt[Qf[kk+Twilio/Rest/FrontlineApi/V1/UserOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['avatar'] = $avatar; $this->options['state'] = $state; $this->options['isAvailable'] = $isAvailable; } /** * The string that you assigned to describe the User. * * @param string $friendlyName The string that you assigned to describe the User * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The avatar URL which will be shown in Frontline application. * * @param string $avatar The avatar URL which will be shown in Frontline * application * @return $this Fluent Builder */ public function setAvatar(string $avatar): self { $this->options['avatar'] = $avatar; return $this; } /** * Current state of this user. Can be either `active` or `deactivated`. * * @param string $state Current state of this user * @return $this Fluent Builder */ public function setState(string $state): self { $this->options['state'] = $state; return $this; } /** * Whether the User is available for new conversations. Set to `false` to prevent User from receiving new inbound conversations if you are using [Pool Routing](https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing). * * @param bool $isAvailable Whether the User is available for new conversations * @return $this Fluent Builder */ public function setIsAvailable(bool $isAvailable): self { $this->options['isAvailable'] = $isAvailable; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.FrontlineApi.V1.UpdateUserOptions ' . $options . ']'; } }PKt[xaI I +Twilio/Rest/FrontlineApi/V1/UserContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Users/' . \rawurlencode($sid) . ''; } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserInstance($this->version, $payload, $this->solution['sid']); } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Avatar' => $options['avatar'], 'State' => $options['state'], 'IsAvailable' => Serialize::booleanToString($options['isAvailable']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new UserInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.FrontlineApi.V1.UserContext ' . \implode(' ', $context) . ']'; } }PKt[P(Twilio/Rest/FrontlineApi/V1/UserPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserInstance \Twilio\Rest\FrontlineApi\V1\UserInstance */ public function buildInstance(array $payload): UserInstance { return new UserInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FrontlineApi.V1.UserPage]'; } }PKt[B>>(Twilio/Rest/FrontlineApi/V1/UserList.phpnu[solution = []; } /** * Constructs a UserContext * * @param string $sid The SID of the User resource to fetch */ public function getContext(string $sid): UserContext { return new UserContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FrontlineApi.V1.UserList]'; } }PKt[eSTwilio/Rest/FrontlineApi/V1.phpnu[version = 'v1'; } protected function getUsers(): UserList { if (!$this->_users) { $this->_users = new UserList($this); } return $this->_users; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FrontlineApi.V1]'; } }PKt[2(Twilio/Rest/Notify/V1/CredentialPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialInstance \Twilio\Rest\Notify\V1\CredentialInstance */ public function buildInstance(array $payload): CredentialInstance { return new CredentialInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify.V1.CredentialPage]'; } }PKt[)9.9.+Twilio/Rest/Notify/V1/CredentialOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` * * @param string $certificate [APN only] The URL-encoded representation of the * certificate * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END RSA PRIVATE KEY-----` * * @param string $privateKey [APN only] URL-encoded representation of the * private key * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. * * @param string $apiKey [GCM only] The `Server key` of your project from * Firebase console under Settings / Cloud messaging * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. * * @param string $secret [FCM only] The `Server key` of your project from * Firebase console under Settings / Cloud messaging * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Notify.V1.CreateCredentialOptions ' . $options . ']'; } } class UpdateCredentialOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $certificate [APN only] The URL-encoded representation of the * certificate * @param string $privateKey [APN only] URL-encoded representation of the * private key * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs * @param string $apiKey [GCM only] The `Server key` of your project from * Firebase console under Settings / Cloud messaging * @param string $secret [FCM only] The `Server key` of your project from * Firebase console under Settings / Cloud messaging */ public function __construct(string $friendlyName = Values::NONE, string $certificate = Values::NONE, string $privateKey = Values::NONE, bool $sandbox = Values::NONE, string $apiKey = Values::NONE, string $secret = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` * * @param string $certificate [APN only] The URL-encoded representation of the * certificate * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END RSA PRIVATE KEY-----` * * @param string $privateKey [APN only] URL-encoded representation of the * private key * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. * * @param string $apiKey [GCM only] The `Server key` of your project from * Firebase console under Settings / Cloud messaging * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. * * @param string $secret [FCM only] The `Server key` of your project from * Firebase console under Settings / Cloud messaging * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Notify.V1.UpdateCredentialOptions ' . $options . ']'; } }PKt[?߳Ihh0Twilio/Rest/Notify/V1/Service/BindingContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings/' . \rawurlencode($sid) . ''; } /** * Fetch the BindingInstance * * @return BindingInstance Fetched BindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BindingInstance { $payload = $this->version->fetch('GET', $this->uri); return new BindingInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the BindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Notify.V1.BindingContext ' . \implode(' ', $context) . ']'; } }PKt[Ch0Twilio/Rest/Notify/V1/Service/BindingOptions.phpnu[options['tag'] = $tag; $this->options['notificationProtocolVersion'] = $notificationProtocolVersion; $this->options['credentialSid'] = $credentialSid; $this->options['endpoint'] = $endpoint; } /** * A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags. * * @param string[] $tag A tag that can be used to select the Bindings to notify * @return $this Fluent Builder */ public function setTag(array $tag): self { $this->options['tag'] = $tag; return $this; } /** * The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `"3"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed. * * @param string $notificationProtocolVersion The protocol version to use to * send the notification * @return $this Fluent Builder */ public function setNotificationProtocolVersion(string $notificationProtocolVersion): self { $this->options['notificationProtocolVersion'] = $notificationProtocolVersion; return $this; } /** * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applies to only `apn`, `fcm`, and `gcm` type Bindings. * * @param string $credentialSid The SID of the Credential resource to be used * to send notifications to this Binding * @return $this Fluent Builder */ public function setCredentialSid(string $credentialSid): self { $this->options['credentialSid'] = $credentialSid; return $this; } /** * Deprecated. * * @param string $endpoint Deprecated * @return $this Fluent Builder */ public function setEndpoint(string $endpoint): self { $this->options['endpoint'] = $endpoint; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Notify.V1.CreateBindingOptions ' . $options . ']'; } } class ReadBindingOptions extends Options { /** * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @param \DateTime $endDate Only include usage that occurred on or before this * date * @param string[] $identity The `identity` value of the resources to read * @param string[] $tag Only list Bindings that have all of the specified Tags */ public function __construct(\DateTime $startDate = Values::NONE, \DateTime $endDate = Values::NONE, array $identity = Values::ARRAY_NONE, array $tag = Values::ARRAY_NONE) { $this->options['startDate'] = $startDate; $this->options['endDate'] = $endDate; $this->options['identity'] = $identity; $this->options['tag'] = $tag; } /** * Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. * * @param \DateTime $startDate Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStartDate(\DateTime $startDate): self { $this->options['startDate'] = $startDate; return $this; } /** * Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. * * @param \DateTime $endDate Only include usage that occurred on or before this * date * @return $this Fluent Builder */ public function setEndDate(\DateTime $endDate): self { $this->options['endDate'] = $endDate; return $this; } /** * The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. * * @param string[] $identity The `identity` value of the resources to read * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Only list Bindings that have all of the specified Tags. The following implicit tags are available: `all`, `apn`, `fcm`, `gcm`, `sms`, `facebook-messenger`. Up to 5 tags are allowed. * * @param string[] $tag Only list Bindings that have all of the specified Tags * @return $this Fluent Builder */ public function setTag(array $tag): self { $this->options['tag'] = $tag; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Notify.V1.ReadBindingOptions ' . $options . ']'; } }PKt[`Ȇ 2Twilio/Rest/Notify/V1/Service/NotificationList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Notifications'; } /** * Create the NotificationInstance * * @param array|Options $options Optional Arguments * @return NotificationInstance Created NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): NotificationInstance { $options = new Values($options); $data = Values::of([ 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'Tag' => Serialize::map($options['tag'], function($e) { return $e; }), 'Body' => $options['body'], 'Priority' => $options['priority'], 'Ttl' => $options['ttl'], 'Title' => $options['title'], 'Sound' => $options['sound'], 'Action' => $options['action'], 'Data' => Serialize::jsonObject($options['data']), 'Apn' => Serialize::jsonObject($options['apn']), 'Gcm' => Serialize::jsonObject($options['gcm']), 'Sms' => Serialize::jsonObject($options['sms']), 'FacebookMessenger' => Serialize::jsonObject($options['facebookMessenger']), 'Fcm' => Serialize::jsonObject($options['fcm']), 'Segment' => Serialize::map($options['segment'], function($e) { return $e; }), 'Alexa' => Serialize::jsonObject($options['alexa']), 'ToBinding' => Serialize::map($options['toBinding'], function($e) { return $e; }), 'DeliveryCallbackUrl' => $options['deliveryCallbackUrl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new NotificationInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify.V1.NotificationList]'; } }PKt[~772Twilio/Rest/Notify/V1/Service/NotificationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NotificationInstance \Twilio\Rest\Notify\V1\Service\NotificationInstance */ public function buildInstance(array $payload): NotificationInstance { return new NotificationInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify.V1.NotificationPage]'; } }PKt[q~~6Twilio/Rest/Notify/V1/Service/NotificationInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'identities' => Values::array_get($payload, 'identities'), 'tags' => Values::array_get($payload, 'tags'), 'segments' => Values::array_get($payload, 'segments'), 'priority' => Values::array_get($payload, 'priority'), 'ttl' => Values::array_get($payload, 'ttl'), 'title' => Values::array_get($payload, 'title'), 'body' => Values::array_get($payload, 'body'), 'sound' => Values::array_get($payload, 'sound'), 'action' => Values::array_get($payload, 'action'), 'data' => Values::array_get($payload, 'data'), 'apn' => Values::array_get($payload, 'apn'), 'gcm' => Values::array_get($payload, 'gcm'), 'fcm' => Values::array_get($payload, 'fcm'), 'sms' => Values::array_get($payload, 'sms'), 'facebookMessenger' => Values::array_get($payload, 'facebook_messenger'), 'alexa' => Values::array_get($payload, 'alexa'), ]; $this->solution = ['serviceSid' => $serviceSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify.V1.NotificationInstance]'; } }PKt[&[ɿCC5Twilio/Rest/Notify/V1/Service/NotificationOptions.phpnu[options['identity'] = $identity; $this->options['tag'] = $tag; $this->options['body'] = $body; $this->options['priority'] = $priority; $this->options['ttl'] = $ttl; $this->options['title'] = $title; $this->options['sound'] = $sound; $this->options['action'] = $action; $this->options['data'] = $data; $this->options['apn'] = $apn; $this->options['gcm'] = $gcm; $this->options['sms'] = $sms; $this->options['facebookMessenger'] = $facebookMessenger; $this->options['fcm'] = $fcm; $this->options['segment'] = $segment; $this->options['alexa'] = $alexa; $this->options['toBinding'] = $toBinding; $this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl; } /** * The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Delivery will be attempted only to Bindings with an Identity in this list. No more than 20 items are allowed in this list. * * @param string[] $identity The `identity` value that identifies the new * resource's User * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * A tag that selects the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 5 tags. The implicit tag `all` is available to notify all Bindings in a Service instance. Similarly, the implicit tags `apn`, `fcm`, `gcm`, `sms` and `facebook-messenger` are available to notify all Bindings in a specific channel. * * @param string[] $tag A tag that selects the Bindings to notify * @return $this Fluent Builder */ public function setTag(array $tag): self { $this->options['tag'] = $tag; return $this; } /** * The notification text. For FCM and GCM, translates to `data.twi_body`. For APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS requires either this `body` value, or `media_urls` attribute defined in the `sms` parameter of the notification. * * @param string $body The notification body text * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The priority of the notification. Can be: `low` or `high` and the default is `high`. A value of `low` optimizes the client app's battery consumption; however, notifications may be delivered with unspecified delay. For FCM and GCM, `low` priority is the same as `Normal` priority. For APNS `low` priority is the same as `5`. A value of `high` sends the notification immediately, and can wake up a sleeping device. For FCM and GCM, `high` is the same as `High` priority. For APNS, `high` is a priority `10`. SMS does not support this property. * * @param string $priority The priority of the notification * @return $this Fluent Builder */ public function setPriority(string $priority): self { $this->options['priority'] = $priority; return $this; } /** * How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property. * * @param int $ttl How long, in seconds, the notification is valid * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * The notification title. For FCM and GCM, this translates to the `data.twi_title` value. For APNS, this translates to the `aps.alert.title` value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices. * * @param string $title The notification title * @return $this Fluent Builder */ public function setTitle(string $title): self { $this->options['title'] = $title; return $this; } /** * The name of the sound to be played for the notification. For FCM and GCM, this Translates to `data.twi_sound`. For APNS, this translates to `aps.sound`. SMS does not support this property. * * @param string $sound The name of the sound to be played for the notification * @return $this Fluent Builder */ public function setSound(string $sound): self { $this->options['sound'] = $sound; return $this; } /** * The actions to display for the notification. For APNS, translates to the `aps.category` value. For GCM, translates to the `data.twi_action` value. For SMS, this parameter is not supported and is omitted from deliveries to those channels. * * @param string $action The actions to display for the notification * @return $this Fluent Builder */ public function setAction(string $action): self { $this->options['action'] = $action; return $this; } /** * The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. * * @param array $data The custom key-value pairs of the notification's payload * @return $this Fluent Builder */ public function setData(array $data): self { $this->options['data'] = $data; return $this; } /** * The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. * * @param array $apn The APNS-specific payload that overrides corresponding * attributes in a generic payload for APNS Bindings * @return $this Fluent Builder */ public function setApn(array $apn): self { $this->options['apn'] = $apn; return $this; } /** * The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). * * @param array $gcm The GCM-specific payload that overrides corresponding * attributes in generic payload for GCM Bindings * @return $this Fluent Builder */ public function setGcm(array $gcm): self { $this->options['gcm'] = $gcm; return $this; } /** * The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. * * @param array $sms The SMS-specific payload that overrides corresponding * attributes in generic payload for SMS Bindings * @return $this Fluent Builder */ public function setSms(array $sms): self { $this->options['sms'] = $sms; return $this; } /** * Deprecated. * * @param array $facebookMessenger Deprecated * @return $this Fluent Builder */ public function setFacebookMessenger(array $facebookMessenger): self { $this->options['facebookMessenger'] = $facebookMessenger; return $this; } /** * The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. * * @param array $fcm The FCM-specific payload that overrides corresponding * attributes in generic payload for FCM Bindings * @return $this Fluent Builder */ public function setFcm(array $fcm): self { $this->options['fcm'] = $fcm; return $this; } /** * The Segment resource is deprecated. Use the `tag` parameter, instead. * * @param string[] $segment A Segment to notify * @return $this Fluent Builder */ public function setSegment(array $segment): self { $this->options['segment'] = $segment; return $this; } /** * Deprecated. * * @param array $alexa Deprecated * @return $this Fluent Builder */ public function setAlexa(array $alexa): self { $this->options['alexa'] = $alexa; return $this; } /** * The destination address specified as a JSON string. Multiple `to_binding` parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers. * * @param string[] $toBinding The destination address specified as a JSON string * @return $this Fluent Builder */ public function setToBinding(array $toBinding): self { $this->options['toBinding'] = $toBinding; return $this; } /** * URL to send webhooks. * * @param string $deliveryCallbackUrl URL to send webhooks * @return $this Fluent Builder */ public function setDeliveryCallbackUrl(string $deliveryCallbackUrl): self { $this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Notify.V1.CreateNotificationOptions ' . $options . ']'; } }PKt[~-Twilio/Rest/Notify/V1/Service/BindingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BindingInstance \Twilio\Rest\Notify\V1\Service\BindingInstance */ public function buildInstance(array $payload): BindingInstance { return new BindingInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify.V1.BindingPage]'; } }PKt[ORR1Twilio/Rest/Notify/V1/Service/BindingInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'credentialSid' => Values::array_get($payload, 'credential_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'notificationProtocolVersion' => Values::array_get($payload, 'notification_protocol_version'), 'endpoint' => Values::array_get($payload, 'endpoint'), 'identity' => Values::array_get($payload, 'identity'), 'bindingType' => Values::array_get($payload, 'binding_type'), 'address' => Values::array_get($payload, 'address'), 'tags' => Values::array_get($payload, 'tags'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return BindingContext Context for this BindingInstance */ protected function proxy(): BindingContext { if (!$this->context) { $this->context = new BindingContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the BindingInstance * * @return BindingInstance Fetched BindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BindingInstance { return $this->proxy()->fetch(); } /** * Delete the BindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Notify.V1.BindingInstance ' . \implode(' ', $context) . ']'; } }PKt[((-Twilio/Rest/Notify/V1/Service/BindingList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings'; } /** * Create the BindingInstance * * @param string $identity The `identity` value that identifies the new * resource's User * @param string $bindingType The type of the Binding * @param string $address The channel-specific address * @param array|Options $options Optional Arguments * @return BindingInstance Created BindingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, string $bindingType, string $address, array $options = []): BindingInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $identity, 'BindingType' => $bindingType, 'Address' => $address, 'Tag' => Serialize::map($options['tag'], function($e) { return $e; }), 'NotificationProtocolVersion' => $options['notificationProtocolVersion'], 'CredentialSid' => $options['credentialSid'], 'Endpoint' => $options['endpoint'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new BindingInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams BindingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BindingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BindingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of BindingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BindingPage Page of BindingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BindingPage { $options = new Values($options); $params = Values::of([ 'StartDate' => Serialize::iso8601Date($options['startDate']), 'EndDate' => Serialize::iso8601Date($options['endDate']), 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'Tag' => Serialize::map($options['tag'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BindingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BindingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BindingPage Page of BindingInstance */ public function getPage(string $targetUrl): BindingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BindingPage($this->version, $response, $this->solution); } /** * Constructs a BindingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): BindingContext { return new BindingContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify.V1.BindingList]'; } }PKt[d/)Twilio/Rest/Notify/V1/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'apnCredentialSid' => Values::array_get($payload, 'apn_credential_sid'), 'gcmCredentialSid' => Values::array_get($payload, 'gcm_credential_sid'), 'fcmCredentialSid' => Values::array_get($payload, 'fcm_credential_sid'), 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), 'facebookMessengerPageId' => Values::array_get($payload, 'facebook_messenger_page_id'), 'defaultApnNotificationProtocolVersion' => Values::array_get($payload, 'default_apn_notification_protocol_version'), 'defaultGcmNotificationProtocolVersion' => Values::array_get($payload, 'default_gcm_notification_protocol_version'), 'defaultFcmNotificationProtocolVersion' => Values::array_get($payload, 'default_fcm_notification_protocol_version'), 'logEnabled' => Values::array_get($payload, 'log_enabled'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'alexaSkillId' => Values::array_get($payload, 'alexa_skill_id'), 'defaultAlexaNotificationProtocolVersion' => Values::array_get($payload, 'default_alexa_notification_protocol_version'), 'deliveryCallbackUrl' => Values::array_get($payload, 'delivery_callback_url'), 'deliveryCallbackEnabled' => Values::array_get($payload, 'delivery_callback_enabled'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Access the bindings */ protected function getBindings(): BindingList { return $this->proxy()->bindings; } /** * Access the notifications */ protected function getNotifications(): NotificationList { return $this->proxy()->notifications; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Notify.V1.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[%Twilio/Rest/Notify/V1/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Create the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'ApnCredentialSid' => $options['apnCredentialSid'], 'GcmCredentialSid' => $options['gcmCredentialSid'], 'MessagingServiceSid' => $options['messagingServiceSid'], 'FacebookMessengerPageId' => $options['facebookMessengerPageId'], 'DefaultApnNotificationProtocolVersion' => $options['defaultApnNotificationProtocolVersion'], 'DefaultGcmNotificationProtocolVersion' => $options['defaultGcmNotificationProtocolVersion'], 'FcmCredentialSid' => $options['fcmCredentialSid'], 'DefaultFcmNotificationProtocolVersion' => $options['defaultFcmNotificationProtocolVersion'], 'LogEnabled' => Serialize::booleanToString($options['logEnabled']), 'AlexaSkillId' => $options['alexaSkillId'], 'DefaultAlexaNotificationProtocolVersion' => $options['defaultAlexaNotificationProtocolVersion'], 'DeliveryCallbackUrl' => $options['deliveryCallbackUrl'], 'DeliveryCallbackEnabled' => Serialize::booleanToString($options['deliveryCallbackEnabled']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Constructs a ServiceContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify.V1.ServiceList]'; } }PKt[t>(Twilio/Rest/Notify/V1/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'ApnCredentialSid' => $options['apnCredentialSid'], 'GcmCredentialSid' => $options['gcmCredentialSid'], 'MessagingServiceSid' => $options['messagingServiceSid'], 'FacebookMessengerPageId' => $options['facebookMessengerPageId'], 'DefaultApnNotificationProtocolVersion' => $options['defaultApnNotificationProtocolVersion'], 'DefaultGcmNotificationProtocolVersion' => $options['defaultGcmNotificationProtocolVersion'], 'FcmCredentialSid' => $options['fcmCredentialSid'], 'DefaultFcmNotificationProtocolVersion' => $options['defaultFcmNotificationProtocolVersion'], 'LogEnabled' => Serialize::booleanToString($options['logEnabled']), 'AlexaSkillId' => $options['alexaSkillId'], 'DefaultAlexaNotificationProtocolVersion' => $options['defaultAlexaNotificationProtocolVersion'], 'DeliveryCallbackUrl' => $options['deliveryCallbackUrl'], 'DeliveryCallbackEnabled' => Serialize::booleanToString($options['deliveryCallbackEnabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the bindings */ protected function getBindings(): BindingList { if (!$this->_bindings) { $this->_bindings = new BindingList($this->version, $this->solution['sid']); } return $this->_bindings; } /** * Access the notifications */ protected function getNotifications(): NotificationList { if (!$this->_notifications) { $this->_notifications = new NotificationList($this->version, $this->solution['sid']); } return $this->_notifications; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Notify.V1.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[&Z  +Twilio/Rest/Notify/V1/CredentialContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Credentials/' . \rawurlencode($sid) . ''; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Notify.V1.CredentialContext ' . \implode(' ', $context) . ']'; } }PKt[#`(Twilio/Rest/Notify/V1/CredentialList.phpnu[solution = []; $this->uri = '/Credentials'; } /** * Streams CredentialInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CredentialInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CredentialInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CredentialInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CredentialPage Page of CredentialInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialPage Page of CredentialInstance */ public function getPage(string $targetUrl): CredentialPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialPage($this->version, $response, $this->solution); } /** * Create the CredentialInstance * * @param string $type The Credential type * @param array|Options $options Optional Arguments * @return CredentialInstance Created CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'Type' => $type, 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload); } /** * Constructs a CredentialContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): CredentialContext { return new CredentialContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify.V1.CredentialList]'; } }PKt[XRR,Twilio/Rest/Notify/V1/CredentialInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'sandbox' => Values::array_get($payload, 'sandbox'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialContext Context for this CredentialInstance */ protected function proxy(): CredentialContext { if (!$this->context) { $this->context = new CredentialContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { return $this->proxy()->fetch(); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { return $this->proxy()->update($options); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Notify.V1.CredentialInstance ' . \implode(' ', $context) . ']'; } }PKt[roo(Twilio/Rest/Notify/V1/ServiceOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['apnCredentialSid'] = $apnCredentialSid; $this->options['gcmCredentialSid'] = $gcmCredentialSid; $this->options['messagingServiceSid'] = $messagingServiceSid; $this->options['facebookMessengerPageId'] = $facebookMessengerPageId; $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion; $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion; $this->options['fcmCredentialSid'] = $fcmCredentialSid; $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion; $this->options['logEnabled'] = $logEnabled; $this->options['alexaSkillId'] = $alexaSkillId; $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion; $this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl; $this->options['deliveryCallbackEnabled'] = $deliveryCallbackEnabled; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. * * @param string $apnCredentialSid The SID of the Credential to use for APN * Bindings * @return $this Fluent Builder */ public function setApnCredentialSid(string $apnCredentialSid): self { $this->options['apnCredentialSid'] = $apnCredentialSid; return $this; } /** * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. * * @param string $gcmCredentialSid The SID of the Credential to use for GCM * Bindings * @return $this Fluent Builder */ public function setGcmCredentialSid(string $gcmCredentialSid): self { $this->options['gcmCredentialSid'] = $gcmCredentialSid; return $this; } /** * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. * * @param string $messagingServiceSid The SID of the Messaging Service to use * for SMS Bindings * @return $this Fluent Builder */ public function setMessagingServiceSid(string $messagingServiceSid): self { $this->options['messagingServiceSid'] = $messagingServiceSid; return $this; } /** * Deprecated. * * @param string $facebookMessengerPageId Deprecated * @return $this Fluent Builder */ public function setFacebookMessengerPageId(string $facebookMessengerPageId): self { $this->options['facebookMessengerPageId'] = $facebookMessengerPageId; return $this; } /** * The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. * * @param string $defaultApnNotificationProtocolVersion The protocol version to * use for sending APNS * notifications * @return $this Fluent Builder */ public function setDefaultApnNotificationProtocolVersion(string $defaultApnNotificationProtocolVersion): self { $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion; return $this; } /** * The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. * * @param string $defaultGcmNotificationProtocolVersion The protocol version to * use for sending GCM * notifications * @return $this Fluent Builder */ public function setDefaultGcmNotificationProtocolVersion(string $defaultGcmNotificationProtocolVersion): self { $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion; return $this; } /** * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. * * @param string $fcmCredentialSid The SID of the Credential to use for FCM * Bindings * @return $this Fluent Builder */ public function setFcmCredentialSid(string $fcmCredentialSid): self { $this->options['fcmCredentialSid'] = $fcmCredentialSid; return $this; } /** * The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. * * @param string $defaultFcmNotificationProtocolVersion The protocol version to * use for sending FCM * notifications * @return $this Fluent Builder */ public function setDefaultFcmNotificationProtocolVersion(string $defaultFcmNotificationProtocolVersion): self { $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion; return $this; } /** * Whether to log notifications. Can be: `true` or `false` and the default is `true`. * * @param bool $logEnabled Whether to log notifications * @return $this Fluent Builder */ public function setLogEnabled(bool $logEnabled): self { $this->options['logEnabled'] = $logEnabled; return $this; } /** * Deprecated. * * @param string $alexaSkillId Deprecated * @return $this Fluent Builder */ public function setAlexaSkillId(string $alexaSkillId): self { $this->options['alexaSkillId'] = $alexaSkillId; return $this; } /** * Deprecated. * * @param string $defaultAlexaNotificationProtocolVersion Deprecated * @return $this Fluent Builder */ public function setDefaultAlexaNotificationProtocolVersion(string $defaultAlexaNotificationProtocolVersion): self { $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion; return $this; } /** * URL to send delivery status callback. * * @param string $deliveryCallbackUrl Webhook URL * @return $this Fluent Builder */ public function setDeliveryCallbackUrl(string $deliveryCallbackUrl): self { $this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl; return $this; } /** * Callback configuration that enables delivery callbacks, default false * * @param bool $deliveryCallbackEnabled Enable delivery callbacks * @return $this Fluent Builder */ public function setDeliveryCallbackEnabled(bool $deliveryCallbackEnabled): self { $this->options['deliveryCallbackEnabled'] = $deliveryCallbackEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Notify.V1.CreateServiceOptions ' . $options . ']'; } } class ReadServiceOptions extends Options { /** * @param string $friendlyName The string that identifies the Service resources * to read */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * The string that identifies the Service resources to read. * * @param string $friendlyName The string that identifies the Service resources * to read * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Notify.V1.ReadServiceOptions ' . $options . ']'; } } class UpdateServiceOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $apnCredentialSid The SID of the Credential to use for APN * Bindings * @param string $gcmCredentialSid The SID of the Credential to use for GCM * Bindings * @param string $messagingServiceSid The SID of the Messaging Service to use * for SMS Bindings * @param string $facebookMessengerPageId Deprecated * @param string $defaultApnNotificationProtocolVersion The protocol version to * use for sending APNS * notifications * @param string $defaultGcmNotificationProtocolVersion The protocol version to * use for sending GCM * notifications * @param string $fcmCredentialSid The SID of the Credential to use for FCM * Bindings * @param string $defaultFcmNotificationProtocolVersion The protocol version to * use for sending FCM * notifications * @param bool $logEnabled Whether to log notifications * @param string $alexaSkillId Deprecated * @param string $defaultAlexaNotificationProtocolVersion Deprecated * @param string $deliveryCallbackUrl Webhook URL * @param bool $deliveryCallbackEnabled Enable delivery callbacks */ public function __construct(string $friendlyName = Values::NONE, string $apnCredentialSid = Values::NONE, string $gcmCredentialSid = Values::NONE, string $messagingServiceSid = Values::NONE, string $facebookMessengerPageId = Values::NONE, string $defaultApnNotificationProtocolVersion = Values::NONE, string $defaultGcmNotificationProtocolVersion = Values::NONE, string $fcmCredentialSid = Values::NONE, string $defaultFcmNotificationProtocolVersion = Values::NONE, bool $logEnabled = Values::NONE, string $alexaSkillId = Values::NONE, string $defaultAlexaNotificationProtocolVersion = Values::NONE, string $deliveryCallbackUrl = Values::NONE, bool $deliveryCallbackEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['apnCredentialSid'] = $apnCredentialSid; $this->options['gcmCredentialSid'] = $gcmCredentialSid; $this->options['messagingServiceSid'] = $messagingServiceSid; $this->options['facebookMessengerPageId'] = $facebookMessengerPageId; $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion; $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion; $this->options['fcmCredentialSid'] = $fcmCredentialSid; $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion; $this->options['logEnabled'] = $logEnabled; $this->options['alexaSkillId'] = $alexaSkillId; $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion; $this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl; $this->options['deliveryCallbackEnabled'] = $deliveryCallbackEnabled; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. * * @param string $apnCredentialSid The SID of the Credential to use for APN * Bindings * @return $this Fluent Builder */ public function setApnCredentialSid(string $apnCredentialSid): self { $this->options['apnCredentialSid'] = $apnCredentialSid; return $this; } /** * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. * * @param string $gcmCredentialSid The SID of the Credential to use for GCM * Bindings * @return $this Fluent Builder */ public function setGcmCredentialSid(string $gcmCredentialSid): self { $this->options['gcmCredentialSid'] = $gcmCredentialSid; return $this; } /** * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. * * @param string $messagingServiceSid The SID of the Messaging Service to use * for SMS Bindings * @return $this Fluent Builder */ public function setMessagingServiceSid(string $messagingServiceSid): self { $this->options['messagingServiceSid'] = $messagingServiceSid; return $this; } /** * Deprecated. * * @param string $facebookMessengerPageId Deprecated * @return $this Fluent Builder */ public function setFacebookMessengerPageId(string $facebookMessengerPageId): self { $this->options['facebookMessengerPageId'] = $facebookMessengerPageId; return $this; } /** * The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. * * @param string $defaultApnNotificationProtocolVersion The protocol version to * use for sending APNS * notifications * @return $this Fluent Builder */ public function setDefaultApnNotificationProtocolVersion(string $defaultApnNotificationProtocolVersion): self { $this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion; return $this; } /** * The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. * * @param string $defaultGcmNotificationProtocolVersion The protocol version to * use for sending GCM * notifications * @return $this Fluent Builder */ public function setDefaultGcmNotificationProtocolVersion(string $defaultGcmNotificationProtocolVersion): self { $this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion; return $this; } /** * The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. * * @param string $fcmCredentialSid The SID of the Credential to use for FCM * Bindings * @return $this Fluent Builder */ public function setFcmCredentialSid(string $fcmCredentialSid): self { $this->options['fcmCredentialSid'] = $fcmCredentialSid; return $this; } /** * The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. * * @param string $defaultFcmNotificationProtocolVersion The protocol version to * use for sending FCM * notifications * @return $this Fluent Builder */ public function setDefaultFcmNotificationProtocolVersion(string $defaultFcmNotificationProtocolVersion): self { $this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion; return $this; } /** * Whether to log notifications. Can be: `true` or `false` and the default is `true`. * * @param bool $logEnabled Whether to log notifications * @return $this Fluent Builder */ public function setLogEnabled(bool $logEnabled): self { $this->options['logEnabled'] = $logEnabled; return $this; } /** * Deprecated. * * @param string $alexaSkillId Deprecated * @return $this Fluent Builder */ public function setAlexaSkillId(string $alexaSkillId): self { $this->options['alexaSkillId'] = $alexaSkillId; return $this; } /** * Deprecated. * * @param string $defaultAlexaNotificationProtocolVersion Deprecated * @return $this Fluent Builder */ public function setDefaultAlexaNotificationProtocolVersion(string $defaultAlexaNotificationProtocolVersion): self { $this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion; return $this; } /** * URL to send delivery status callback. * * @param string $deliveryCallbackUrl Webhook URL * @return $this Fluent Builder */ public function setDeliveryCallbackUrl(string $deliveryCallbackUrl): self { $this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl; return $this; } /** * Callback configuration that enables delivery callbacks, default false * * @param bool $deliveryCallbackEnabled Enable delivery callbacks * @return $this Fluent Builder */ public function setDeliveryCallbackEnabled(bool $deliveryCallbackEnabled): self { $this->options['deliveryCallbackEnabled'] = $deliveryCallbackEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Notify.V1.UpdateServiceOptions ' . $options . ']'; } }PKt[! C%Twilio/Rest/Notify/V1/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\Notify\V1\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify.V1.ServicePage]'; } }PKt[ۚ- - Twilio/Rest/Notify/V1.phpnu[version = 'v1'; } protected function getCredentials(): CredentialList { if (!$this->_credentials) { $this->_credentials = new CredentialList($this); } return $this->_credentials; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify.V1]'; } }PKt[1Twilio/Rest/Autopilot/V1/RestoreAssistantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RestoreAssistantInstance \Twilio\Rest\Autopilot\V1\RestoreAssistantInstance */ public function buildInstance(array $payload): RestoreAssistantInstance { return new RestoreAssistantInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.RestoreAssistantPage]'; } }PKt[KH=aa1Twilio/Rest/Autopilot/V1/RestoreAssistantList.phpnu[solution = []; $this->uri = '/Assistants/Restore'; } /** * Update the RestoreAssistantInstance * * @param string $assistant The unique string that identifies the resource * @return RestoreAssistantInstance Updated RestoreAssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $assistant): RestoreAssistantInstance { $data = Values::of(['Assistant' => $assistant, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RestoreAssistantInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.RestoreAssistantList]'; } }PKt[+2Twilio/Rest/Autopilot/V1/Assistant/WebhookPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WebhookInstance \Twilio\Rest\Autopilot\V1\Assistant\WebhookInstance */ public function buildInstance(array $payload): WebhookInstance { return new WebhookInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.WebhookPage]'; } }PKt[NE8Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.phpnu[options['statusCallback'] = $statusCallback; $this->options['uniqueName'] = $uniqueName; } /** * The URL we should call using a POST method to send status information to your application. * * @param string $statusCallback The URL we should call using a POST method to * send status information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the new resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.CreateModelBuildOptions ' . $options . ']'; } } class UpdateModelBuildOptions extends Options { /** * @param string $uniqueName An application-defined string that uniquely * identifies the resource */ public function __construct(string $uniqueName = Values::NONE) { $this->options['uniqueName'] = $uniqueName; } /** * An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.UpdateModelBuildOptions ' . $options . ']'; } }PKt[2888Twilio/Rest/Autopilot/V1/Assistant/FieldTypeInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'links' => Values::array_get($payload, 'links'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FieldTypeContext Context for this FieldTypeInstance */ protected function proxy(): FieldTypeContext { if (!$this->context) { $this->context = new FieldTypeContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FieldTypeInstance * * @return FieldTypeInstance Fetched FieldTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldTypeInstance { return $this->proxy()->fetch(); } /** * Update the FieldTypeInstance * * @param array|Options $options Optional Arguments * @return FieldTypeInstance Updated FieldTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FieldTypeInstance { return $this->proxy()->update($options); } /** * Delete the FieldTypeInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the fieldValues */ protected function getFieldValues(): FieldValueList { return $this->proxy()->fieldValues; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.FieldTypeInstance ' . \implode(' ', $context) . ']'; } }PKt[ 26Twilio/Rest/Autopilot/V1/Assistant/DialogueContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Dialogues/' . \rawurlencode($sid) . ''; } /** * Fetch the DialogueInstance * * @return DialogueInstance Fetched DialogueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DialogueInstance { $payload = $this->version->fetch('GET', $this->uri); return new DialogueInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.DialogueContext ' . \implode(' ', $context) . ']'; } }PKt[kf_BB5Twilio/Rest/Autopilot/V1/Assistant/StyleSheetList.phpnu[solution = ['assistantSid' => $assistantSid, ]; } /** * Constructs a StyleSheetContext */ public function getContext(): StyleSheetContext { return new StyleSheetContext($this->version, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.StyleSheetList]'; } }PKt[EyD9Twilio/Rest/Autopilot/V1/Assistant/ModelBuildInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), 'buildDuration' => Values::array_get($payload, 'build_duration'), 'errorCode' => Values::array_get($payload, 'error_code'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ModelBuildContext Context for this ModelBuildInstance */ protected function proxy(): ModelBuildContext { if (!$this->context) { $this->context = new ModelBuildContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ModelBuildInstance * * @return ModelBuildInstance Fetched ModelBuildInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ModelBuildInstance { return $this->proxy()->fetch(); } /** * Update the ModelBuildInstance * * @param array|Options $options Optional Arguments * @return ModelBuildInstance Updated ModelBuildInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ModelBuildInstance { return $this->proxy()->update($options); } /** * Delete the ModelBuildInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.ModelBuildInstance ' . \implode(' ', $context) . ']'; } }PKt[JA 3Twilio/Rest/Autopilot/V1/Assistant/QueryContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Queries/' . \rawurlencode($sid) . ''; } /** * Fetch the QueryInstance * * @return QueryInstance Fetched QueryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): QueryInstance { $payload = $this->version->fetch('GET', $this->uri); return new QueryInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Update the QueryInstance * * @param array|Options $options Optional Arguments * @return QueryInstance Updated QueryInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): QueryInstance { $options = new Values($options); $data = Values::of(['SampleSid' => $options['sampleSid'], 'Status' => $options['status'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new QueryInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Delete the QueryInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.QueryContext ' . \implode(' ', $context) . ']'; } }PKt[452Twilio/Rest/Autopilot/V1/Assistant/WebhookList.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Webhooks'; } /** * Streams WebhookInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WebhookInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WebhookInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of WebhookInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WebhookPage Page of WebhookInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WebhookPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WebhookPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WebhookInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WebhookPage Page of WebhookInstance */ public function getPage(string $targetUrl): WebhookPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WebhookPage($this->version, $response, $this->solution); } /** * Create the WebhookInstance * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param string $events The list of space-separated events that this Webhook * will subscribe to. * @param string $webhookUrl The URL associated with this Webhook. * @param array|Options $options Optional Arguments * @return WebhookInstance Created WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $uniqueName, string $events, string $webhookUrl, array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $uniqueName, 'Events' => $events, 'WebhookUrl' => $webhookUrl, 'WebhookMethod' => $options['webhookMethod'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WebhookInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Constructs a WebhookContext * * @param string $sid The unique string that identifies the resource to fetch */ public function getContext(string $sid): WebhookContext { return new WebhookContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.WebhookList]'; } }PKt[\+ 8Twilio/Rest/Autopilot/V1/Assistant/StyleSheetContext.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/StyleSheet'; } /** * Fetch the StyleSheetInstance * * @return StyleSheetInstance Fetched StyleSheetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): StyleSheetInstance { $payload = $this->version->fetch('GET', $this->uri); return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Update the StyleSheetInstance * * @param array|Options $options Optional Arguments * @return StyleSheetInstance Updated StyleSheetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): StyleSheetInstance { $options = new Values($options); $data = Values::of(['StyleSheet' => Serialize::jsonObject($options['styleSheet']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.StyleSheetContext ' . \implode(' ', $context) . ']'; } }PKt[kc2Twilio/Rest/Autopilot/V1/Assistant/TaskContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($sid) . ''; } /** * Fetch the TaskInstance * * @return TaskInstance Fetched TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskInstance { $payload = $this->version->fetch('GET', $this->uri); return new TaskInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Update the TaskInstance * * @param array|Options $options Optional Arguments * @return TaskInstance Updated TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Actions' => Serialize::jsonObject($options['actions']), 'ActionsUrl' => $options['actionsUrl'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TaskInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Delete the TaskInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the fields */ protected function getFields(): FieldList { if (!$this->_fields) { $this->_fields = new FieldList( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->_fields; } /** * Access the samples */ protected function getSamples(): SampleList { if (!$this->_samples) { $this->_samples = new SampleList( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->_samples; } /** * Access the taskActions */ protected function getTaskActions(): TaskActionsList { if (!$this->_taskActions) { $this->_taskActions = new TaskActionsList( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->_taskActions; } /** * Access the statistics */ protected function getStatistics(): TaskStatisticsList { if (!$this->_statistics) { $this->_statistics = new TaskStatisticsList( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->_statistics; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.TaskContext ' . \implode(' ', $context) . ']'; } }PKt[ >Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsContext.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Actions'; } /** * Fetch the TaskActionsInstance * * @return TaskActionsInstance Fetched TaskActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskActionsInstance { $payload = $this->version->fetch('GET', $this->uri); return new TaskActionsInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Update the TaskActionsInstance * * @param array|Options $options Optional Arguments * @return TaskActionsInstance Updated TaskActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskActionsInstance { $options = new Values($options); $data = Values::of(['Actions' => Serialize::jsonObject($options['actions']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TaskActionsInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.TaskActionsContext ' . \implode(' ', $context) . ']'; } }PKt[|z  >Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskStatisticsInstance \Twilio\Rest\Autopilot\V1\Assistant\Task\TaskStatisticsInstance */ public function buildInstance(array $payload): TaskStatisticsInstance { return new TaskStatisticsInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.TaskStatisticsPage]'; } }PKt[?Jhh:Twilio/Rest/Autopilot/V1/Assistant/Task/SampleInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'taskSid' => Values::array_get($payload, 'task_sid'), 'language' => Values::array_get($payload, 'language'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'taggedText' => Values::array_get($payload, 'tagged_text'), 'url' => Values::array_get($payload, 'url'), 'sourceChannel' => Values::array_get($payload, 'source_channel'), ]; $this->solution = [ 'assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SampleContext Context for this SampleInstance */ protected function proxy(): SampleContext { if (!$this->context) { $this->context = new SampleContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SampleInstance * * @return SampleInstance Fetched SampleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SampleInstance { return $this->proxy()->fetch(); } /** * Update the SampleInstance * * @param array|Options $options Optional Arguments * @return SampleInstance Updated SampleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SampleInstance { return $this->proxy()->update($options); } /** * Delete the SampleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.SampleInstance ' . \implode(' ', $context) . ']'; } }PKt[*'';Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsList.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; } /** * Constructs a TaskActionsContext */ public function getContext(): TaskActionsContext { return new TaskActionsContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.TaskActionsList]'; } }PKt[5dATwilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsContext.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Statistics'; } /** * Fetch the TaskStatisticsInstance * * @return TaskStatisticsInstance Fetched TaskStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskStatisticsInstance { $payload = $this->version->fetch('GET', $this->uri); return new TaskStatisticsInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.TaskStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[V`` ` 9Twilio/Rest/Autopilot/V1/Assistant/Task/SampleContext.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Samples/' . \rawurlencode($sid) . ''; } /** * Fetch the SampleInstance * * @return SampleInstance Fetched SampleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SampleInstance { $payload = $this->version->fetch('GET', $this->uri); return new SampleInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'], $this->solution['sid'] ); } /** * Update the SampleInstance * * @param array|Options $options Optional Arguments * @return SampleInstance Updated SampleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SampleInstance { $options = new Values($options); $data = Values::of([ 'Language' => $options['language'], 'TaggedText' => $options['taggedText'], 'SourceChannel' => $options['sourceChannel'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SampleInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'], $this->solution['sid'] ); } /** * Delete the SampleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.SampleContext ' . \implode(' ', $context) . ']'; } }PKt[?6Twilio/Rest/Autopilot/V1/Assistant/Task/SampleList.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Samples'; } /** * Streams SampleInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SampleInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SampleInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SampleInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SamplePage Page of SampleInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SamplePage { $options = new Values($options); $params = Values::of([ 'Language' => $options['language'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SamplePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SampleInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SamplePage Page of SampleInstance */ public function getPage(string $targetUrl): SamplePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SamplePage($this->version, $response, $this->solution); } /** * Create the SampleInstance * * @param string $language The ISO language-country string that specifies the * language used for the new sample * @param string $taggedText The text example of how end users might express * the task * @param array|Options $options Optional Arguments * @return SampleInstance Created SampleInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $language, string $taggedText, array $options = []): SampleInstance { $options = new Values($options); $data = Values::of([ 'Language' => $language, 'TaggedText' => $taggedText, 'SourceChannel' => $options['sourceChannel'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SampleInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Constructs a SampleContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): SampleContext { return new SampleContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.SampleList]'; } }PKt[o5Twilio/Rest/Autopilot/V1/Assistant/Task/FieldPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FieldInstance \Twilio\Rest\Autopilot\V1\Assistant\Task\FieldInstance */ public function buildInstance(array $payload): FieldInstance { return new FieldInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.FieldPage]'; } }PKt[:+9Twilio/Rest/Autopilot/V1/Assistant/Task/FieldInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'fieldType' => Values::array_get($payload, 'field_type'), 'taskSid' => Values::array_get($payload, 'task_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FieldContext Context for this FieldInstance */ protected function proxy(): FieldContext { if (!$this->context) { $this->context = new FieldContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FieldInstance * * @return FieldInstance Fetched FieldInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldInstance { return $this->proxy()->fetch(); } /** * Delete the FieldInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.FieldInstance ' . \implode(' ', $context) . ']'; } }PKt[6Twilio/Rest/Autopilot/V1/Assistant/Task/SamplePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SampleInstance \Twilio\Rest\Autopilot\V1\Assistant\Task\SampleInstance */ public function buildInstance(array $payload): SampleInstance { return new SampleInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.SamplePage]'; } }PKt[Sy*dd5Twilio/Rest/Autopilot/V1/Assistant/Task/FieldList.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Fields'; } /** * Streams FieldInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FieldInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FieldInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FieldInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FieldPage Page of FieldInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FieldPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FieldPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FieldInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FieldPage Page of FieldInstance */ public function getPage(string $targetUrl): FieldPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FieldPage($this->version, $response, $this->solution); } /** * Create the FieldInstance * * @param string $fieldType The Field Type of this field * @param string $uniqueName An application-defined string that uniquely * identifies the new resource * @return FieldInstance Created FieldInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $fieldType, string $uniqueName): FieldInstance { $data = Values::of(['FieldType' => $fieldType, 'UniqueName' => $uniqueName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FieldInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Constructs a FieldContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): FieldContext { return new FieldContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.FieldList]'; } }PKt[EUTxx?Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'taskSid' => Values::array_get($payload, 'task_sid'), 'url' => Values::array_get($payload, 'url'), 'data' => Values::array_get($payload, 'data'), ]; $this->solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskActionsContext Context for this TaskActionsInstance */ protected function proxy(): TaskActionsContext { if (!$this->context) { $this->context = new TaskActionsContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'] ); } return $this->context; } /** * Fetch the TaskActionsInstance * * @return TaskActionsInstance Fetched TaskActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskActionsInstance { return $this->proxy()->fetch(); } /** * Update the TaskActionsInstance * * @param array|Options $options Optional Arguments * @return TaskActionsInstance Updated TaskActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskActionsInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.TaskActionsInstance ' . \implode(' ', $context) . ']'; } }PKt[q;Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskActionsInstance \Twilio\Rest\Autopilot\V1\Assistant\Task\TaskActionsInstance */ public function buildInstance(array $payload): TaskActionsInstance { return new TaskActionsInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.TaskActionsPage]'; } }PKt[Kp69Twilio/Rest/Autopilot/V1/Assistant/Task/SampleOptions.phpnu[options['language'] = $language; } /** * The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`. * * @param string $language The ISO language-country string that specifies the * language used for the sample * @return $this Fluent Builder */ public function setLanguage(string $language): self { $this->options['language'] = $language; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.ReadSampleOptions ' . $options . ']'; } } class CreateSampleOptions extends Options { /** * @param string $sourceChannel The communication channel from which the new * sample was captured */ public function __construct(string $sourceChannel = Values::NONE) { $this->options['sourceChannel'] = $sourceChannel; } /** * The communication channel from which the new sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. * * @param string $sourceChannel The communication channel from which the new * sample was captured * @return $this Fluent Builder */ public function setSourceChannel(string $sourceChannel): self { $this->options['sourceChannel'] = $sourceChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.CreateSampleOptions ' . $options . ']'; } } class UpdateSampleOptions extends Options { /** * @param string $language The ISO language-country string that specifies the * language used for the sample * @param string $taggedText The text example of how end users might express * the task * @param string $sourceChannel The communication channel from which the sample * was captured */ public function __construct(string $language = Values::NONE, string $taggedText = Values::NONE, string $sourceChannel = Values::NONE) { $this->options['language'] = $language; $this->options['taggedText'] = $taggedText; $this->options['sourceChannel'] = $sourceChannel; } /** * The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`. * * @param string $language The ISO language-country string that specifies the * language used for the sample * @return $this Fluent Builder */ public function setLanguage(string $language): self { $this->options['language'] = $language; return $this; } /** * The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). * * @param string $taggedText The text example of how end users might express * the task * @return $this Fluent Builder */ public function setTaggedText(string $taggedText): self { $this->options['taggedText'] = $taggedText; return $this; } /** * The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. * * @param string $sourceChannel The communication channel from which the sample * was captured * @return $this Fluent Builder */ public function setSourceChannel(string $sourceChannel): self { $this->options['sourceChannel'] = $sourceChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.UpdateSampleOptions ' . $options . ']'; } }PKt[Q > > 8Twilio/Rest/Autopilot/V1/Assistant/Task/FieldContext.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Fields/' . \rawurlencode($sid) . ''; } /** * Fetch the FieldInstance * * @return FieldInstance Fetched FieldInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldInstance { $payload = $this->version->fetch('GET', $this->uri); return new FieldInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'], $this->solution['sid'] ); } /** * Delete the FieldInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.FieldContext ' . \implode(' ', $context) . ']'; } }PKt[XPBTwilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'taskSid' => Values::array_get($payload, 'task_sid'), 'samplesCount' => Values::array_get($payload, 'samples_count'), 'fieldsCount' => Values::array_get($payload, 'fields_count'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskStatisticsContext Context for this TaskStatisticsInstance */ protected function proxy(): TaskStatisticsContext { if (!$this->context) { $this->context = new TaskStatisticsContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'] ); } return $this->context; } /** * Fetch the TaskStatisticsInstance * * @return TaskStatisticsInstance Fetched TaskStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskStatisticsInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.TaskStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[bb>Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsList.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; } /** * Constructs a TaskStatisticsContext */ public function getContext(): TaskStatisticsContext { return new TaskStatisticsContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.TaskStatisticsList]'; } }PKt[@JR;>Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsOptions.phpnu[options['actions'] = $actions; } /** * The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. * * @param array $actions The JSON string that specifies the actions that * instruct the Assistant on how to perform the task * @return $this Fluent Builder */ public function setActions(array $actions): self { $this->options['actions'] = $actions; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.UpdateTaskActionsOptions ' . $options . ']'; } }PKt[hִp5Twilio/Rest/Autopilot/V1/Assistant/ModelBuildList.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/ModelBuilds'; } /** * Streams ModelBuildInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ModelBuildInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ModelBuildInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ModelBuildInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ModelBuildPage Page of ModelBuildInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ModelBuildPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ModelBuildPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ModelBuildInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ModelBuildPage Page of ModelBuildInstance */ public function getPage(string $targetUrl): ModelBuildPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ModelBuildPage($this->version, $response, $this->solution); } /** * Create the ModelBuildInstance * * @param array|Options $options Optional Arguments * @return ModelBuildInstance Created ModelBuildInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ModelBuildInstance { $options = new Values($options); $data = Values::of([ 'StatusCallback' => $options['statusCallback'], 'UniqueName' => $options['uniqueName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ModelBuildInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Constructs a ModelBuildContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ModelBuildContext { return new ModelBuildContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.ModelBuildList]'; } }PKt[ _663Twilio/Rest/Autopilot/V1/Assistant/DefaultsList.phpnu[solution = ['assistantSid' => $assistantSid, ]; } /** * Constructs a DefaultsContext */ public function getContext(): DefaultsContext { return new DefaultsContext($this->version, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.DefaultsList]'; } }PKt[Me 7Twilio/Rest/Autopilot/V1/Assistant/DefaultsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'url' => Values::array_get($payload, 'url'), 'data' => Values::array_get($payload, 'data'), ]; $this->solution = ['assistantSid' => $assistantSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DefaultsContext Context for this DefaultsInstance */ protected function proxy(): DefaultsContext { if (!$this->context) { $this->context = new DefaultsContext($this->version, $this->solution['assistantSid']); } return $this->context; } /** * Fetch the DefaultsInstance * * @return DefaultsInstance Fetched DefaultsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DefaultsInstance { return $this->proxy()->fetch(); } /** * Update the DefaultsInstance * * @param array|Options $options Optional Arguments * @return DefaultsInstance Updated DefaultsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DefaultsInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.DefaultsInstance ' . \implode(' ', $context) . ']'; } }PKt[MH9Twilio/Rest/Autopilot/V1/Assistant/StyleSheetInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'url' => Values::array_get($payload, 'url'), 'data' => Values::array_get($payload, 'data'), ]; $this->solution = ['assistantSid' => $assistantSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return StyleSheetContext Context for this StyleSheetInstance */ protected function proxy(): StyleSheetContext { if (!$this->context) { $this->context = new StyleSheetContext($this->version, $this->solution['assistantSid']); } return $this->context; } /** * Fetch the StyleSheetInstance * * @return StyleSheetInstance Fetched StyleSheetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): StyleSheetInstance { return $this->proxy()->fetch(); } /** * Update the StyleSheetInstance * * @param array|Options $options Optional Arguments * @return StyleSheetInstance Updated StyleSheetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): StyleSheetInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.StyleSheetInstance ' . \implode(' ', $context) . ']'; } }PKt[h4Twilio/Rest/Autopilot/V1/Assistant/FieldTypePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FieldTypeInstance \Twilio\Rest\Autopilot\V1\Assistant\FieldTypeInstance */ public function buildInstance(array $payload): FieldTypeInstance { return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.FieldTypePage]'; } }PKt[3Twilio/Rest/Autopilot/V1/Assistant/DialoguePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DialogueInstance \Twilio\Rest\Autopilot\V1\Assistant\DialogueInstance */ public function buildInstance(array $payload): DialogueInstance { return new DialogueInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.DialoguePage]'; } }PKt[0Twilio/Rest/Autopilot/V1/Assistant/QueryList.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Queries'; } /** * Streams QueryInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads QueryInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return QueryInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of QueryInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return QueryPage Page of QueryInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): QueryPage { $options = new Values($options); $params = Values::of([ 'Language' => $options['language'], 'ModelBuild' => $options['modelBuild'], 'Status' => $options['status'], 'DialogueSid' => $options['dialogueSid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new QueryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of QueryInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return QueryPage Page of QueryInstance */ public function getPage(string $targetUrl): QueryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new QueryPage($this->version, $response, $this->solution); } /** * Create the QueryInstance * * @param string $language The ISO language-country string that specifies the * language used for the new query * @param string $query The end-user's natural language input * @param array|Options $options Optional Arguments * @return QueryInstance Created QueryInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $language, string $query, array $options = []): QueryInstance { $options = new Values($options); $data = Values::of([ 'Language' => $language, 'Query' => $query, 'Tasks' => $options['tasks'], 'ModelBuild' => $options['modelBuild'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new QueryInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Constructs a QueryContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): QueryContext { return new QueryContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.QueryList]'; } }PKt[< 4Twilio/Rest/Autopilot/V1/Assistant/QueryInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'results' => Values::array_get($payload, 'results'), 'language' => Values::array_get($payload, 'language'), 'modelBuildSid' => Values::array_get($payload, 'model_build_sid'), 'query' => Values::array_get($payload, 'query'), 'sampleSid' => Values::array_get($payload, 'sample_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'url' => Values::array_get($payload, 'url'), 'sourceChannel' => Values::array_get($payload, 'source_channel'), 'dialogueSid' => Values::array_get($payload, 'dialogue_sid'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return QueryContext Context for this QueryInstance */ protected function proxy(): QueryContext { if (!$this->context) { $this->context = new QueryContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the QueryInstance * * @return QueryInstance Fetched QueryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): QueryInstance { return $this->proxy()->fetch(); } /** * Update the QueryInstance * * @param array|Options $options Optional Arguments * @return QueryInstance Updated QueryInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): QueryInstance { return $this->proxy()->update($options); } /** * Delete the QueryInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.QueryInstance ' . \implode(' ', $context) . ']'; } }PKt[8vv0Twilio/Rest/Autopilot/V1/Assistant/QueryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return QueryInstance \Twilio\Rest\Autopilot\V1\Assistant\QueryInstance */ public function buildInstance(array $payload): QueryInstance { return new QueryInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.QueryPage]'; } }PKt[l3Twilio/Rest/Autopilot/V1/Assistant/DefaultsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DefaultsInstance \Twilio\Rest\Autopilot\V1\Assistant\DefaultsInstance */ public function buildInstance(array $payload): DefaultsInstance { return new DefaultsInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.DefaultsPage]'; } }PKt[[3Twilio/Rest/Autopilot/V1/Assistant/TaskInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'links' => Values::array_get($payload, 'links'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'actionsUrl' => Values::array_get($payload, 'actions_url'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskContext Context for this TaskInstance */ protected function proxy(): TaskContext { if (!$this->context) { $this->context = new TaskContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TaskInstance * * @return TaskInstance Fetched TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskInstance { return $this->proxy()->fetch(); } /** * Update the TaskInstance * * @param array|Options $options Optional Arguments * @return TaskInstance Updated TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskInstance { return $this->proxy()->update($options); } /** * Delete the TaskInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the fields */ protected function getFields(): FieldList { return $this->proxy()->fields; } /** * Access the samples */ protected function getSamples(): SampleList { return $this->proxy()->samples; } /** * Access the taskActions */ protected function getTaskActions(): TaskActionsList { return $this->proxy()->taskActions; } /** * Access the statistics */ protected function getStatistics(): TaskStatisticsList { return $this->proxy()->statistics; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.TaskInstance ' . \implode(' ', $context) . ']'; } }PKt[hu u 5Twilio/Rest/Autopilot/V1/Assistant/WebhookContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Webhooks/' . \rawurlencode($sid) . ''; } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { $payload = $this->version->fetch('GET', $this->uri); return new WebhookInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'Events' => $options['events'], 'WebhookUrl' => $options['webhookUrl'], 'WebhookMethod' => $options['webhookMethod'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WebhookInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.WebhookContext ' . \implode(' ', $context) . ']'; } }PKt[z7Twilio/Rest/Autopilot/V1/Assistant/FieldTypeContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($sid) . ''; } /** * Fetch the FieldTypeInstance * * @return FieldTypeInstance Fetched FieldTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldTypeInstance { $payload = $this->version->fetch('GET', $this->uri); return new FieldTypeInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Update the FieldTypeInstance * * @param array|Options $options Optional Arguments * @return FieldTypeInstance Updated FieldTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FieldTypeInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FieldTypeInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Delete the FieldTypeInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the fieldValues */ protected function getFieldValues(): FieldValueList { if (!$this->_fieldValues) { $this->_fieldValues = new FieldValueList( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->_fieldValues; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.FieldTypeContext ' . \implode(' ', $context) . ']'; } }PKt[PKx3Twilio/Rest/Autopilot/V1/Assistant/DialogueList.phpnu[solution = ['assistantSid' => $assistantSid, ]; } /** * Constructs a DialogueContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): DialogueContext { return new DialogueContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.DialogueList]'; } }PKt[x5Twilio/Rest/Autopilot/V1/Assistant/ModelBuildPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ModelBuildInstance \Twilio\Rest\Autopilot\V1\Assistant\ModelBuildInstance */ public function buildInstance(array $payload): ModelBuildInstance { return new ModelBuildInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.ModelBuildPage]'; } }PKt[2Twilio/Rest/Autopilot/V1/Assistant/TaskOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['actions'] = $actions; $this->options['actionsUrl'] = $actionsUrl; } /** * A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName descriptive string that you create to describe * the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. It is optional and not unique. * * @param array $actions The JSON string that specifies the actions that * instruct the Assistant on how to perform the task * @return $this Fluent Builder */ public function setActions(array $actions): self { $this->options['actions'] = $actions; return $this; } /** * The URL from which the Assistant can fetch actions. * * @param string $actionsUrl The URL from which the Assistant can fetch actions * @return $this Fluent Builder */ public function setActionsUrl(string $actionsUrl): self { $this->options['actionsUrl'] = $actionsUrl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.CreateTaskOptions ' . $options . ']'; } } class UpdateTaskOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param array $actions The JSON string that specifies the actions that * instruct the Assistant on how to perform the task * @param string $actionsUrl The URL from which the Assistant can fetch actions */ public function __construct(string $friendlyName = Values::NONE, string $uniqueName = Values::NONE, array $actions = Values::ARRAY_NONE, string $actionsUrl = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['actions'] = $actions; $this->options['actionsUrl'] = $actionsUrl; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An application-defined string that uniquely identifies the resource. This value must be 64 characters or less in length and be unique. It can be used as an alternative to the `sid` in the URL path to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. * * @param array $actions The JSON string that specifies the actions that * instruct the Assistant on how to perform the task * @return $this Fluent Builder */ public function setActions(array $actions): self { $this->options['actions'] = $actions; return $this; } /** * The URL from which the Assistant can fetch actions. * * @param string $actionsUrl The URL from which the Assistant can fetch actions * @return $this Fluent Builder */ public function setActionsUrl(string $actionsUrl): self { $this->options['actionsUrl'] = $actionsUrl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.UpdateTaskOptions ' . $options . ']'; } }PKt[VV4Twilio/Rest/Autopilot/V1/Assistant/FieldTypeList.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes'; } /** * Streams FieldTypeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FieldTypeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FieldTypeInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FieldTypeInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FieldTypePage Page of FieldTypeInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FieldTypePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FieldTypePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FieldTypeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FieldTypePage Page of FieldTypeInstance */ public function getPage(string $targetUrl): FieldTypePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FieldTypePage($this->version, $response, $this->solution); } /** * Create the FieldTypeInstance * * @param string $uniqueName An application-defined string that uniquely * identifies the new resource * @param array|Options $options Optional Arguments * @return FieldTypeInstance Created FieldTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $uniqueName, array $options = []): FieldTypeInstance { $options = new Values($options); $data = Values::of(['UniqueName' => $uniqueName, 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Constructs a FieldTypeContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): FieldTypeContext { return new FieldTypeContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.FieldTypeList]'; } }PKt[_Yz8!8!3Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.phpnu[options['language'] = $language; $this->options['modelBuild'] = $modelBuild; $this->options['status'] = $status; $this->options['dialogueSid'] = $dialogueSid; } /** * The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query resources to read. For example: `en-US`. * * @param string $language The ISO language-country string that specifies the * language used by the Query resources to read * @return $this Fluent Builder */ public function setLanguage(string $language): self { $this->options['language'] = $language; return $this; } /** * The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried. * * @param string $modelBuild The SID or unique name of the Model Build to be * queried * @return $this Fluent Builder */ public function setModelBuild(string $modelBuild): self { $this->options['modelBuild'] = $modelBuild; return $this; } /** * The status of the resources to read. Can be: `pending-review`, `reviewed`, or `discarded` * * @param string $status The status of the resources to read * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue). * * @param string $dialogueSid The SID of the * [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue). * @return $this Fluent Builder */ public function setDialogueSid(string $dialogueSid): self { $this->options['dialogueSid'] = $dialogueSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.ReadQueryOptions ' . $options . ']'; } } class CreateQueryOptions extends Options { /** * @param string $tasks The list of tasks to limit the new query to * @param string $modelBuild The SID or unique name of the Model Build to be * queried */ public function __construct(string $tasks = Values::NONE, string $modelBuild = Values::NONE) { $this->options['tasks'] = $tasks; $this->options['modelBuild'] = $modelBuild; } /** * The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take. * * @param string $tasks The list of tasks to limit the new query to * @return $this Fluent Builder */ public function setTasks(string $tasks): self { $this->options['tasks'] = $tasks; return $this; } /** * The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried. * * @param string $modelBuild The SID or unique name of the Model Build to be * queried * @return $this Fluent Builder */ public function setModelBuild(string $modelBuild): self { $this->options['modelBuild'] = $modelBuild; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.CreateQueryOptions ' . $options . ']'; } } class UpdateQueryOptions extends Options { /** * @param string $sampleSid The SID of an optional reference to the Sample * created from the query * @param string $status The new status of the resource */ public function __construct(string $sampleSid = Values::NONE, string $status = Values::NONE) { $this->options['sampleSid'] = $sampleSid; $this->options['status'] = $status; } /** * The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query. * * @param string $sampleSid The SID of an optional reference to the Sample * created from the query * @return $this Fluent Builder */ public function setSampleSid(string $sampleSid): self { $this->options['sampleSid'] = $sampleSid; return $this; } /** * The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded` * * @param string $status The new status of the resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.UpdateQueryOptions ' . $options . ']'; } }PKt[P.F F BTwilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.phpnu[options['language'] = $language; } /** * The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US` * * @param string $language The ISO language-country tag that identifies the * language of the value * @return $this Fluent Builder */ public function setLanguage(string $language): self { $this->options['language'] = $language; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.ReadFieldValueOptions ' . $options . ']'; } } class CreateFieldValueOptions extends Options { /** * @param string $synonymOf The string value that indicates which word the * field value is a synonym of */ public function __construct(string $synonymOf = Values::NONE) { $this->options['synonymOf'] = $synonymOf; } /** * The string value that indicates which word the field value is a synonym of. * * @param string $synonymOf The string value that indicates which word the * field value is a synonym of * @return $this Fluent Builder */ public function setSynonymOf(string $synonymOf): self { $this->options['synonymOf'] = $synonymOf; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.CreateFieldValueOptions ' . $options . ']'; } }PKt[nnCTwilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'fieldTypeSid' => Values::array_get($payload, 'field_type_sid'), 'language' => Values::array_get($payload, 'language'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'value' => Values::array_get($payload, 'value'), 'url' => Values::array_get($payload, 'url'), 'synonymOf' => Values::array_get($payload, 'synonym_of'), ]; $this->solution = [ 'assistantSid' => $assistantSid, 'fieldTypeSid' => $fieldTypeSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FieldValueContext Context for this FieldValueInstance */ protected function proxy(): FieldValueContext { if (!$this->context) { $this->context = new FieldValueContext( $this->version, $this->solution['assistantSid'], $this->solution['fieldTypeSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FieldValueInstance * * @return FieldValueInstance Fetched FieldValueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldValueInstance { return $this->proxy()->fetch(); } /** * Delete the FieldValueInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.FieldValueInstance ' . \implode(' ', $context) . ']'; } }PKt[ BTwilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueContext.phpnu[solution = ['assistantSid' => $assistantSid, 'fieldTypeSid' => $fieldTypeSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($fieldTypeSid) . '/FieldValues/' . \rawurlencode($sid) . ''; } /** * Fetch the FieldValueInstance * * @return FieldValueInstance Fetched FieldValueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldValueInstance { $payload = $this->version->fetch('GET', $this->uri); return new FieldValueInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['fieldTypeSid'], $this->solution['sid'] ); } /** * Delete the FieldValueInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.FieldValueContext ' . \implode(' ', $context) . ']'; } }PKt[ĸ ?Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValuePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FieldValueInstance \Twilio\Rest\Autopilot\V1\Assistant\FieldType\FieldValueInstance */ public function buildInstance(array $payload): FieldValueInstance { return new FieldValueInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['fieldTypeSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.FieldValuePage]'; } }PKt[Q%%?Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueList.phpnu[solution = ['assistantSid' => $assistantSid, 'fieldTypeSid' => $fieldTypeSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($fieldTypeSid) . '/FieldValues'; } /** * Streams FieldValueInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FieldValueInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FieldValueInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of FieldValueInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FieldValuePage Page of FieldValueInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FieldValuePage { $options = new Values($options); $params = Values::of([ 'Language' => $options['language'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FieldValuePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FieldValueInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FieldValuePage Page of FieldValueInstance */ public function getPage(string $targetUrl): FieldValuePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FieldValuePage($this->version, $response, $this->solution); } /** * Create the FieldValueInstance * * @param string $language The ISO language-country tag that identifies the * language of the value * @param string $value The Field Value data * @param array|Options $options Optional Arguments * @return FieldValueInstance Created FieldValueInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $language, string $value, array $options = []): FieldValueInstance { $options = new Values($options); $data = Values::of([ 'Language' => $language, 'Value' => $value, 'SynonymOf' => $options['synonymOf'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FieldValueInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['fieldTypeSid'] ); } /** * Constructs a FieldValueContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): FieldValueContext { return new FieldValueContext( $this->version, $this->solution['assistantSid'], $this->solution['fieldTypeSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.FieldValueList]'; } }PKt[Q 7Twilio/Rest/Autopilot/V1/Assistant/DialogueInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'data' => Values::array_get($payload, 'data'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DialogueContext Context for this DialogueInstance */ protected function proxy(): DialogueContext { if (!$this->context) { $this->context = new DialogueContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DialogueInstance * * @return DialogueInstance Fetched DialogueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DialogueInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.DialogueInstance ' . \implode(' ', $context) . ']'; } }PKt[5/Twilio/Rest/Autopilot/V1/Assistant/TaskList.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks'; } /** * Streams TaskInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TaskInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TaskInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of TaskInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TaskPage Page of TaskInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TaskPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TaskPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TaskInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TaskPage Page of TaskInstance */ public function getPage(string $targetUrl): TaskPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TaskPage($this->version, $response, $this->solution); } /** * Create the TaskInstance * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param array|Options $options Optional Arguments * @return TaskInstance Created TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $uniqueName, array $options = []): TaskInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $uniqueName, 'FriendlyName' => $options['friendlyName'], 'Actions' => Serialize::jsonObject($options['actions']), 'ActionsUrl' => $options['actionsUrl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TaskInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Constructs a TaskContext * * @param string $sid The unique string that identifies the resource to fetch */ public function getContext(string $sid): TaskContext { return new TaskContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.TaskList]'; } }PKt[yg 6Twilio/Rest/Autopilot/V1/Assistant/DefaultsContext.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Defaults'; } /** * Fetch the DefaultsInstance * * @return DefaultsInstance Fetched DefaultsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DefaultsInstance { $payload = $this->version->fetch('GET', $this->uri); return new DefaultsInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Update the DefaultsInstance * * @param array|Options $options Optional Arguments * @return DefaultsInstance Updated DefaultsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DefaultsInstance { $options = new Values($options); $data = Values::of(['Defaults' => Serialize::jsonObject($options['defaults']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DefaultsInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.DefaultsContext ' . \implode(' ', $context) . ']'; } }PKt[8Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.phpnu[options['styleSheet'] = $styleSheet; } /** * The JSON string that describes the style sheet object. * * @param array $styleSheet The JSON string that describes the style sheet * object * @return $this Fluent Builder */ public function setStyleSheet(array $styleSheet): self { $this->options['styleSheet'] = $styleSheet; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.UpdateStyleSheetOptions ' . $options . ']'; } }PKt[|6-5Twilio/Rest/Autopilot/V1/Assistant/StyleSheetPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return StyleSheetInstance \Twilio\Rest\Autopilot\V1\Assistant\StyleSheetInstance */ public function buildInstance(array $payload): StyleSheetInstance { return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.StyleSheetPage]'; } }PKt[ 8Twilio/Rest/Autopilot/V1/Assistant/ModelBuildContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/ModelBuilds/' . \rawurlencode($sid) . ''; } /** * Fetch the ModelBuildInstance * * @return ModelBuildInstance Fetched ModelBuildInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ModelBuildInstance { $payload = $this->version->fetch('GET', $this->uri); return new ModelBuildInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Update the ModelBuildInstance * * @param array|Options $options Optional Arguments * @return ModelBuildInstance Updated ModelBuildInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ModelBuildInstance { $options = new Values($options); $data = Values::of(['UniqueName' => $options['uniqueName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ModelBuildInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Delete the ModelBuildInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.ModelBuildContext ' . \implode(' ', $context) . ']'; } }PKt[p7Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.CreateFieldTypeOptions ' . $options . ']'; } } class UpdateFieldTypeOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $uniqueName An application-defined string that uniquely * identifies the resource */ public function __construct(string $friendlyName = Values::NONE, string $uniqueName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.UpdateFieldTypeOptions ' . $options . ']'; } }PKt[6Twilio/Rest/Autopilot/V1/Assistant/WebhookInstance.phpnu[properties = [ 'url' => Values::array_get($payload, 'url'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'events' => Values::array_get($payload, 'events'), 'webhookUrl' => Values::array_get($payload, 'webhook_url'), 'webhookMethod' => Values::array_get($payload, 'webhook_method'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WebhookContext Context for this WebhookInstance */ protected function proxy(): WebhookContext { if (!$this->context) { $this->context = new WebhookContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { return $this->proxy()->fetch(); } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { return $this->proxy()->update($options); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.WebhookInstance ' . \implode(' ', $context) . ']'; } }PKt[ 5Twilio/Rest/Autopilot/V1/Assistant/WebhookOptions.phpnu[options['webhookMethod'] = $webhookMethod; } /** * The method to be used when calling the webhook's URL. * * @param string $webhookMethod The method to be used when calling the * webhook's URL. * @return $this Fluent Builder */ public function setWebhookMethod(string $webhookMethod): self { $this->options['webhookMethod'] = $webhookMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.CreateWebhookOptions ' . $options . ']'; } } class UpdateWebhookOptions extends Options { /** * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param string $events The list of space-separated events that this Webhook * will subscribe to. * @param string $webhookUrl The URL associated with this Webhook. * @param string $webhookMethod The method to be used when calling the * webhook's URL. */ public function __construct(string $uniqueName = Values::NONE, string $events = Values::NONE, string $webhookUrl = Values::NONE, string $webhookMethod = Values::NONE) { $this->options['uniqueName'] = $uniqueName; $this->options['events'] = $events; $this->options['webhookUrl'] = $webhookUrl; $this->options['webhookMethod'] = $webhookMethod; } /** * An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The list of space-separated events that this Webhook will subscribe to. * * @param string $events The list of space-separated events that this Webhook * will subscribe to. * @return $this Fluent Builder */ public function setEvents(string $events): self { $this->options['events'] = $events; return $this; } /** * The URL associated with this Webhook. * * @param string $webhookUrl The URL associated with this Webhook. * @return $this Fluent Builder */ public function setWebhookUrl(string $webhookUrl): self { $this->options['webhookUrl'] = $webhookUrl; return $this; } /** * The method to be used when calling the webhook's URL. * * @param string $webhookMethod The method to be used when calling the * webhook's URL. * @return $this Fluent Builder */ public function setWebhookMethod(string $webhookMethod): self { $this->options['webhookMethod'] = $webhookMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.UpdateWebhookOptions ' . $options . ']'; } }PKt[ pp/Twilio/Rest/Autopilot/V1/Assistant/TaskPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskInstance \Twilio\Rest\Autopilot\V1\Assistant\TaskInstance */ public function buildInstance(array $payload): TaskInstance { return new TaskInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.TaskPage]'; } }PKt[[s6Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.phpnu[options['defaults'] = $defaults; } /** * A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations. * * @param array $defaults A JSON string that describes the default task links. * @return $this Fluent Builder */ public function setDefaults(array $defaults): self { $this->options['defaults'] = $defaults; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.UpdateDefaultsOptions ' . $options . ']'; } }PKt[*Twilio/Rest/Autopilot/V1/AssistantList.phpnu[solution = []; $this->uri = '/Assistants'; } /** * Streams AssistantInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AssistantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AssistantInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AssistantInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AssistantPage Page of AssistantInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AssistantPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AssistantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AssistantInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AssistantPage Page of AssistantInstance */ public function getPage(string $targetUrl): AssistantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AssistantPage($this->version, $response, $this->solution); } /** * Create the AssistantInstance * * @param array|Options $options Optional Arguments * @return AssistantInstance Created AssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): AssistantInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'LogQueries' => Serialize::booleanToString($options['logQueries']), 'UniqueName' => $options['uniqueName'], 'CallbackUrl' => $options['callbackUrl'], 'CallbackEvents' => $options['callbackEvents'], 'StyleSheet' => Serialize::jsonObject($options['styleSheet']), 'Defaults' => Serialize::jsonObject($options['defaults']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AssistantInstance($this->version, $payload); } /** * Constructs a AssistantContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AssistantContext { return new AssistantContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.AssistantList]'; } }PKt[MLL-Twilio/Rest/Autopilot/V1/AssistantContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($sid) . ''; } /** * Fetch the AssistantInstance * * @return AssistantInstance Fetched AssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssistantInstance { $payload = $this->version->fetch('GET', $this->uri); return new AssistantInstance($this->version, $payload, $this->solution['sid']); } /** * Update the AssistantInstance * * @param array|Options $options Optional Arguments * @return AssistantInstance Updated AssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AssistantInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'LogQueries' => Serialize::booleanToString($options['logQueries']), 'UniqueName' => $options['uniqueName'], 'CallbackUrl' => $options['callbackUrl'], 'CallbackEvents' => $options['callbackEvents'], 'StyleSheet' => Serialize::jsonObject($options['styleSheet']), 'Defaults' => Serialize::jsonObject($options['defaults']), 'DevelopmentStage' => $options['developmentStage'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AssistantInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the AssistantInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the fieldTypes */ protected function getFieldTypes(): FieldTypeList { if (!$this->_fieldTypes) { $this->_fieldTypes = new FieldTypeList($this->version, $this->solution['sid']); } return $this->_fieldTypes; } /** * Access the tasks */ protected function getTasks(): TaskList { if (!$this->_tasks) { $this->_tasks = new TaskList($this->version, $this->solution['sid']); } return $this->_tasks; } /** * Access the modelBuilds */ protected function getModelBuilds(): ModelBuildList { if (!$this->_modelBuilds) { $this->_modelBuilds = new ModelBuildList($this->version, $this->solution['sid']); } return $this->_modelBuilds; } /** * Access the queries */ protected function getQueries(): QueryList { if (!$this->_queries) { $this->_queries = new QueryList($this->version, $this->solution['sid']); } return $this->_queries; } /** * Access the styleSheet */ protected function getStyleSheet(): StyleSheetList { if (!$this->_styleSheet) { $this->_styleSheet = new StyleSheetList($this->version, $this->solution['sid']); } return $this->_styleSheet; } /** * Access the defaults */ protected function getDefaults(): DefaultsList { if (!$this->_defaults) { $this->_defaults = new DefaultsList($this->version, $this->solution['sid']); } return $this->_defaults; } /** * Access the dialogues */ protected function getDialogues(): DialogueList { if (!$this->_dialogues) { $this->_dialogues = new DialogueList($this->version, $this->solution['sid']); } return $this->_dialogues; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { if (!$this->_webhooks) { $this->_webhooks = new WebhookList($this->version, $this->solution['sid']); } return $this->_webhooks; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.AssistantContext ' . \implode(' ', $context) . ']'; } }PKt[:B B 5Twilio/Rest/Autopilot/V1/RestoreAssistantInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'needsModelBuild' => Values::array_get($payload, 'needs_model_build'), 'latestModelBuildSid' => Values::array_get($payload, 'latest_model_build_sid'), 'logQueries' => Values::array_get($payload, 'log_queries'), 'developmentStage' => Values::array_get($payload, 'development_stage'), 'callbackUrl' => Values::array_get($payload, 'callback_url'), 'callbackEvents' => Values::array_get($payload, 'callback_events'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.RestoreAssistantInstance]'; } }PKt[kE kk.Twilio/Rest/Autopilot/V1/AssistantInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'latestModelBuildSid' => Values::array_get($payload, 'latest_model_build_sid'), 'links' => Values::array_get($payload, 'links'), 'logQueries' => Values::array_get($payload, 'log_queries'), 'developmentStage' => Values::array_get($payload, 'development_stage'), 'needsModelBuild' => Values::array_get($payload, 'needs_model_build'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), 'callbackUrl' => Values::array_get($payload, 'callback_url'), 'callbackEvents' => Values::array_get($payload, 'callback_events'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssistantContext Context for this AssistantInstance */ protected function proxy(): AssistantContext { if (!$this->context) { $this->context = new AssistantContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the AssistantInstance * * @return AssistantInstance Fetched AssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssistantInstance { return $this->proxy()->fetch(); } /** * Update the AssistantInstance * * @param array|Options $options Optional Arguments * @return AssistantInstance Updated AssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AssistantInstance { return $this->proxy()->update($options); } /** * Delete the AssistantInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the fieldTypes */ protected function getFieldTypes(): FieldTypeList { return $this->proxy()->fieldTypes; } /** * Access the tasks */ protected function getTasks(): TaskList { return $this->proxy()->tasks; } /** * Access the modelBuilds */ protected function getModelBuilds(): ModelBuildList { return $this->proxy()->modelBuilds; } /** * Access the queries */ protected function getQueries(): QueryList { return $this->proxy()->queries; } /** * Access the styleSheet */ protected function getStyleSheet(): StyleSheetList { return $this->proxy()->styleSheet; } /** * Access the defaults */ protected function getDefaults(): DefaultsList { return $this->proxy()->defaults; } /** * Access the dialogues */ protected function getDialogues(): DialogueList { return $this->proxy()->dialogues; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { return $this->proxy()->webhooks; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Autopilot.V1.AssistantInstance ' . \implode(' ', $context) . ']'; } }PKt[%4%4-Twilio/Rest/Autopilot/V1/AssistantOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['logQueries'] = $logQueries; $this->options['uniqueName'] = $uniqueName; $this->options['callbackUrl'] = $callbackUrl; $this->options['callbackEvents'] = $callbackEvents; $this->options['styleSheet'] = $styleSheet; $this->options['defaults'] = $defaults; } /** * A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored. * * @param bool $logQueries Whether queries should be logged and kept after * training * @return $this Fluent Builder */ public function setLogQueries(bool $logQueries): self { $this->options['logQueries'] = $logQueries; return $this; } /** * An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * * @param string $uniqueName An application-defined string that uniquely * identifies the new resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Reserved. * * @param string $callbackUrl Reserved * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * Reserved. * * @param string $callbackEvents Reserved * @return $this Fluent Builder */ public function setCallbackEvents(string $callbackEvents): self { $this->options['callbackEvents'] = $callbackEvents; return $this; } /** * The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) * * @param array $styleSheet A JSON string that defines the Assistant's style * sheet * @return $this Fluent Builder */ public function setStyleSheet(array $styleSheet): self { $this->options['styleSheet'] = $styleSheet; return $this; } /** * A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks. * * @param array $defaults A JSON object that defines the Assistant's default * tasks for various scenarios * @return $this Fluent Builder */ public function setDefaults(array $defaults): self { $this->options['defaults'] = $defaults; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.CreateAssistantOptions ' . $options . ']'; } } class UpdateAssistantOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param bool $logQueries Whether queries should be logged and kept after * training * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param string $callbackUrl Reserved * @param string $callbackEvents Reserved * @param array $styleSheet A JSON string that defines the Assistant's style * sheet * @param array $defaults A JSON object that defines the Assistant's [default * tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios * @param string $developmentStage A string describing the state of the * assistant. */ public function __construct(string $friendlyName = Values::NONE, bool $logQueries = Values::NONE, string $uniqueName = Values::NONE, string $callbackUrl = Values::NONE, string $callbackEvents = Values::NONE, array $styleSheet = Values::ARRAY_NONE, array $defaults = Values::ARRAY_NONE, string $developmentStage = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['logQueries'] = $logQueries; $this->options['uniqueName'] = $uniqueName; $this->options['callbackUrl'] = $callbackUrl; $this->options['callbackEvents'] = $callbackEvents; $this->options['styleSheet'] = $styleSheet; $this->options['defaults'] = $defaults; $this->options['developmentStage'] = $developmentStage; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored. * * @param bool $logQueries Whether queries should be logged and kept after * training * @return $this Fluent Builder */ public function setLogQueries(bool $logQueries): self { $this->options['logQueries'] = $logQueries; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Reserved. * * @param string $callbackUrl Reserved * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * Reserved. * * @param string $callbackEvents Reserved * @return $this Fluent Builder */ public function setCallbackEvents(string $callbackEvents): self { $this->options['callbackEvents'] = $callbackEvents; return $this; } /** * The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) * * @param array $styleSheet A JSON string that defines the Assistant's style * sheet * @return $this Fluent Builder */ public function setStyleSheet(array $styleSheet): self { $this->options['styleSheet'] = $styleSheet; return $this; } /** * A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks. * * @param array $defaults A JSON object that defines the Assistant's [default * tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios * @return $this Fluent Builder */ public function setDefaults(array $defaults): self { $this->options['defaults'] = $defaults; return $this; } /** * A string describing the state of the assistant. * * @param string $developmentStage A string describing the state of the * assistant. * @return $this Fluent Builder */ public function setDevelopmentStage(string $developmentStage): self { $this->options['developmentStage'] = $developmentStage; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Autopilot.V1.UpdateAssistantOptions ' . $options . ']'; } }PKt[*slYY*Twilio/Rest/Autopilot/V1/AssistantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AssistantInstance \Twilio\Rest\Autopilot\V1\AssistantInstance */ public function buildInstance(array $payload): AssistantInstance { return new AssistantInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1.AssistantPage]'; } }PKt[2@ @ Twilio/Rest/Autopilot/V1.phpnu[version = 'v1'; } protected function getAssistants(): AssistantList { if (!$this->_assistants) { $this->_assistants = new AssistantList($this); } return $this->_assistants; } protected function getRestoreAssistant(): RestoreAssistantList { if (!$this->_restoreAssistant) { $this->_restoreAssistant = new RestoreAssistantList($this); } return $this->_restoreAssistant; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot.V1]'; } }PKt[f 'Twilio/Rest/Events/V1/SchemaContext.phpnu[solution = ['id' => $id, ]; $this->uri = '/Schemas/' . \rawurlencode($id) . ''; } /** * Fetch the SchemaInstance * * @return SchemaInstance Fetched SchemaInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SchemaInstance { $payload = $this->version->fetch('GET', $this->uri); return new SchemaInstance($this->version, $payload, $this->solution['id']); } /** * Access the versions */ protected function getVersions(): SchemaVersionList { if (!$this->_versions) { $this->_versions = new SchemaVersionList($this->version, $this->solution['id']); } return $this->_versions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.SchemaContext ' . \implode(' ', $context) . ']'; } }PKt[vi i +Twilio/Rest/Events/V1/EventTypeInstance.phpnu[properties = [ 'type' => Values::array_get($payload, 'type'), 'schemaId' => Values::array_get($payload, 'schema_id'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'description' => Values::array_get($payload, 'description'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['type' => $type ?: $this->properties['type'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EventTypeContext Context for this EventTypeInstance */ protected function proxy(): EventTypeContext { if (!$this->context) { $this->context = new EventTypeContext($this->version, $this->solution['type']); } return $this->context; } /** * Fetch the EventTypeInstance * * @return EventTypeInstance Fetched EventTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EventTypeInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.EventTypeInstance ' . \implode(' ', $context) . ']'; } }PKt[d -Twilio/Rest/Events/V1/SubscriptionOptions.phpnu[options['sinkSid'] = $sinkSid; } /** * The SID of the sink that the list of Subscriptions should be filtered by. * * @param string $sinkSid Sink SID. * @return $this Fluent Builder */ public function setSinkSid(string $sinkSid): self { $this->options['sinkSid'] = $sinkSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Events.V1.ReadSubscriptionOptions ' . $options . ']'; } } class UpdateSubscriptionOptions extends Options { /** * @param string $description Subscription description. * @param string $sinkSid Sink SID. */ public function __construct(string $description = Values::NONE, string $sinkSid = Values::NONE) { $this->options['description'] = $description; $this->options['sinkSid'] = $sinkSid; } /** * A human readable description for the Subscription. * * @param string $description Subscription description. * @return $this Fluent Builder */ public function setDescription(string $description): self { $this->options['description'] = $description; return $this; } /** * The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. * * @param string $sinkSid Sink SID. * @return $this Fluent Builder */ public function setSinkSid(string $sinkSid): self { $this->options['sinkSid'] = $sinkSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Events.V1.UpdateSubscriptionOptions ' . $options . ']'; } }PKt[F}"Twilio/Rest/Events/V1/SinkPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SinkInstance \Twilio\Rest\Events\V1\SinkInstance */ public function buildInstance(array $payload): SinkInstance { return new SinkInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SinkPage]'; } }PKt[_`--'Twilio/Rest/Events/V1/EventTypeList.phpnu[solution = []; $this->uri = '/Types'; } /** * Streams EventTypeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EventTypeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EventTypeInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of EventTypeInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EventTypePage Page of EventTypeInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EventTypePage { $options = new Values($options); $params = Values::of([ 'SchemaId' => $options['schemaId'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EventTypePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EventTypeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EventTypePage Page of EventTypeInstance */ public function getPage(string $targetUrl): EventTypePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EventTypePage($this->version, $response, $this->solution); } /** * Constructs a EventTypeContext * * @param string $type A string that uniquely identifies this Event Type. */ public function getContext(string $type): EventTypeContext { return new EventTypeContext($this->version, $type); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.EventTypeList]'; } }PKt[~hdd5Twilio/Rest/Events/V1/Schema/SchemaVersionContext.phpnu[solution = ['id' => $id, 'schemaVersion' => $schemaVersion, ]; $this->uri = '/Schemas/' . \rawurlencode($id) . '/Versions/' . \rawurlencode($schemaVersion) . ''; } /** * Fetch the SchemaVersionInstance * * @return SchemaVersionInstance Fetched SchemaVersionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SchemaVersionInstance { $payload = $this->version->fetch('GET', $this->uri); return new SchemaVersionInstance( $this->version, $payload, $this->solution['id'], $this->solution['schemaVersion'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.SchemaVersionContext ' . \implode(' ', $context) . ']'; } }PKt[UĿ= 6Twilio/Rest/Events/V1/Schema/SchemaVersionInstance.phpnu[properties = [ 'id' => Values::array_get($payload, 'id'), 'schemaVersion' => Values::array_get($payload, 'schema_version'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), 'raw' => Values::array_get($payload, 'raw'), ]; $this->solution = [ 'id' => $id, 'schemaVersion' => $schemaVersion ?: $this->properties['schemaVersion'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SchemaVersionContext Context for this SchemaVersionInstance */ protected function proxy(): SchemaVersionContext { if (!$this->context) { $this->context = new SchemaVersionContext( $this->version, $this->solution['id'], $this->solution['schemaVersion'] ); } return $this->context; } /** * Fetch the SchemaVersionInstance * * @return SchemaVersionInstance Fetched SchemaVersionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SchemaVersionInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.SchemaVersionInstance ' . \implode(' ', $context) . ']'; } }PKt[2zz2Twilio/Rest/Events/V1/Schema/SchemaVersionList.phpnu[solution = ['id' => $id, ]; $this->uri = '/Schemas/' . \rawurlencode($id) . '/Versions'; } /** * Streams SchemaVersionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SchemaVersionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SchemaVersionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SchemaVersionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SchemaVersionPage Page of SchemaVersionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SchemaVersionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SchemaVersionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SchemaVersionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SchemaVersionPage Page of SchemaVersionInstance */ public function getPage(string $targetUrl): SchemaVersionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SchemaVersionPage($this->version, $response, $this->solution); } /** * Constructs a SchemaVersionContext * * @param int $schemaVersion The version of the schema */ public function getContext(int $schemaVersion): SchemaVersionContext { return new SchemaVersionContext($this->version, $this->solution['id'], $schemaVersion); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SchemaVersionList]'; } }PKt[=332Twilio/Rest/Events/V1/Schema/SchemaVersionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SchemaVersionInstance \Twilio\Rest\Events\V1\Schema\SchemaVersionInstance */ public function buildInstance(array $payload): SchemaVersionInstance { return new SchemaVersionInstance($this->version, $payload, $this->solution['id']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SchemaVersionPage]'; } }PKt[$Twilio/Rest/Events/V1/SchemaPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SchemaInstance \Twilio\Rest\Events\V1\SchemaInstance */ public function buildInstance(array $payload): SchemaInstance { return new SchemaInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SchemaPage]'; } }PKt[l݋!*Twilio/Rest/Events/V1/SubscriptionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SubscriptionInstance \Twilio\Rest\Events\V1\SubscriptionInstance */ public function buildInstance(array $payload): SubscriptionInstance { return new SubscriptionInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SubscriptionPage]'; } }PKt[0&Twilio/Rest/Events/V1/SinkInstance.phpnu[properties = [ 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'description' => Values::array_get($payload, 'description'), 'sid' => Values::array_get($payload, 'sid'), 'sinkConfiguration' => Values::array_get($payload, 'sink_configuration'), 'sinkType' => Values::array_get($payload, 'sink_type'), 'status' => Values::array_get($payload, 'status'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SinkContext Context for this SinkInstance */ protected function proxy(): SinkContext { if (!$this->context) { $this->context = new SinkContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SinkInstance * * @return SinkInstance Fetched SinkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SinkInstance { return $this->proxy()->fetch(); } /** * Delete the SinkInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the SinkInstance * * @param string $description Sink Description * @return SinkInstance Updated SinkInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $description): SinkInstance { return $this->proxy()->update($description); } /** * Access the sinkTest */ protected function getSinkTest(): SinkTestList { return $this->proxy()->sinkTest; } /** * Access the sinkValidate */ protected function getSinkValidate(): SinkValidateList { return $this->proxy()->sinkValidate; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.SinkInstance ' . \implode(' ', $context) . ']'; } }PKt[LDD"Twilio/Rest/Events/V1/SinkList.phpnu[solution = []; $this->uri = '/Sinks'; } /** * Create the SinkInstance * * @param string $description Sink Description. * @param array $sinkConfiguration JSON Sink configuration. * @param string $sinkType Sink type. * @return SinkInstance Created SinkInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $description, array $sinkConfiguration, string $sinkType): SinkInstance { $data = Values::of([ 'Description' => $description, 'SinkConfiguration' => Serialize::jsonObject($sinkConfiguration), 'SinkType' => $sinkType, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SinkInstance($this->version, $payload); } /** * Streams SinkInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SinkInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SinkInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SinkInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SinkPage Page of SinkInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SinkPage { $options = new Values($options); $params = Values::of([ 'InUse' => Serialize::booleanToString($options['inUse']), 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SinkPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SinkInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SinkPage Page of SinkInstance */ public function getPage(string $targetUrl): SinkPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SinkPage($this->version, $response, $this->solution); } /** * Constructs a SinkContext * * @param string $sid A string that uniquely identifies this Sink. */ public function getContext(string $sid): SinkContext { return new SinkContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SinkList]'; } }PKt[fY^/Twilio/Rest/Events/V1/Sink/SinkValidateList.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Sinks/' . \rawurlencode($sid) . '/Validate'; } /** * Create the SinkValidateInstance * * @param string $testId A string that uniquely identifies the test event for a * Sink being validated. * @return SinkValidateInstance Created SinkValidateInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $testId): SinkValidateInstance { $data = Values::of(['TestId' => $testId, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SinkValidateInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SinkValidateList]'; } }PKt[=3Twilio/Rest/Events/V1/Sink/SinkValidateInstance.phpnu[properties = ['result' => Values::array_get($payload, 'result'), ]; $this->solution = ['sid' => $sid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SinkValidateInstance]'; } }PKt[+Twilio/Rest/Events/V1/Sink/SinkTestList.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Sinks/' . \rawurlencode($sid) . '/Test'; } /** * Create the SinkTestInstance * * @return SinkTestInstance Created SinkTestInstance * @throws TwilioException When an HTTP error occurs. */ public function create(): SinkTestInstance { $payload = $this->version->create('POST', $this->uri); return new SinkTestInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SinkTestList]'; } }PKt[X?@+Twilio/Rest/Events/V1/Sink/SinkTestPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SinkTestInstance \Twilio\Rest\Events\V1\Sink\SinkTestInstance */ public function buildInstance(array $payload): SinkTestInstance { return new SinkTestInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SinkTestPage]'; } }PKt[[**/Twilio/Rest/Events/V1/Sink/SinkValidatePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SinkValidateInstance \Twilio\Rest\Events\V1\Sink\SinkValidateInstance */ public function buildInstance(array $payload): SinkValidateInstance { return new SinkValidateInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SinkValidatePage]'; } }PKt[CE  /Twilio/Rest/Events/V1/Sink/SinkTestInstance.phpnu[properties = ['result' => Values::array_get($payload, 'result'), ]; $this->solution = ['sid' => $sid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SinkTestInstance]'; } }PKt[R R (Twilio/Rest/Events/V1/SchemaInstance.phpnu[properties = [ 'id' => Values::array_get($payload, 'id'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'latestVersionDateCreated' => Deserialize::dateTime(Values::array_get($payload, 'latest_version_date_created')), 'latestVersion' => Values::array_get($payload, 'latest_version'), ]; $this->solution = ['id' => $id ?: $this->properties['id'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SchemaContext Context for this SchemaInstance */ protected function proxy(): SchemaContext { if (!$this->context) { $this->context = new SchemaContext($this->version, $this->solution['id']); } return $this->context; } /** * Fetch the SchemaInstance * * @return SchemaInstance Fetched SchemaInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SchemaInstance { return $this->proxy()->fetch(); } /** * Access the versions */ protected function getVersions(): SchemaVersionList { return $this->proxy()->versions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.SchemaInstance ' . \implode(' ', $context) . ']'; } }PKt[(;nn%Twilio/Rest/Events/V1/SinkOptions.phpnu[options['inUse'] = $inUse; $this->options['status'] = $status; } /** * A boolean query parameter filtering the results to return sinks used/not used by a subscription. * * @param bool $inUse A boolean to return sinks used/not used by a subscription. * @return $this Fluent Builder */ public function setInUse(bool $inUse): self { $this->options['inUse'] = $inUse; return $this; } /** * A String query parameter filtering the results by status `initialized`, `validating`, `active` or `failed`. * * @param string $status A string to filter sinks by status. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Events.V1.ReadSinkOptions ' . $options . ']'; } }PKt[2op*Twilio/Rest/Events/V1/SubscriptionList.phpnu[solution = []; $this->uri = '/Subscriptions'; } /** * Streams SubscriptionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SubscriptionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SubscriptionInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SubscriptionInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SubscriptionPage Page of SubscriptionInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SubscriptionPage { $options = new Values($options); $params = Values::of([ 'SinkSid' => $options['sinkSid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SubscriptionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SubscriptionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SubscriptionPage Page of SubscriptionInstance */ public function getPage(string $targetUrl): SubscriptionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SubscriptionPage($this->version, $response, $this->solution); } /** * Create the SubscriptionInstance * * @param string $description Subscription description * @param string $sinkSid Sink SID. * @param array[] $types Subscribed Event Types * @return SubscriptionInstance Created SubscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $description, string $sinkSid, array $types): SubscriptionInstance { $data = Values::of([ 'Description' => $description, 'SinkSid' => $sinkSid, 'Types' => Serialize::map($types, function($e) { return Serialize::jsonObject($e); }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SubscriptionInstance($this->version, $payload); } /** * Constructs a SubscriptionContext * * @param string $sid A string that uniquely identifies this Subscription. */ public function getContext(string $sid): SubscriptionContext { return new SubscriptionContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SubscriptionList]'; } }PKt['Twilio/Rest/Events/V1/EventTypePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EventTypeInstance \Twilio\Rest\Events\V1\EventTypeInstance */ public function buildInstance(array $payload): EventTypeInstance { return new EventTypeInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.EventTypePage]'; } }PKt[Ȟ(e e =Twilio/Rest/Events/V1/Subscription/SubscribedEventOptions.phpnu[options['schemaVersion'] = $schemaVersion; } /** * The schema version that the subscription should use. * * @param int $schemaVersion The schema version that the subscription should * use. * @return $this Fluent Builder */ public function setSchemaVersion(int $schemaVersion): self { $this->options['schemaVersion'] = $schemaVersion; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Events.V1.CreateSubscribedEventOptions ' . $options . ']'; } } class UpdateSubscribedEventOptions extends Options { /** * @param int $schemaVersion The schema version that the subscription should * use. */ public function __construct(int $schemaVersion = Values::NONE) { $this->options['schemaVersion'] = $schemaVersion; } /** * The schema version that the subscription should use. * * @param int $schemaVersion The schema version that the subscription should * use. * @return $this Fluent Builder */ public function setSchemaVersion(int $schemaVersion): self { $this->options['schemaVersion'] = $schemaVersion; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Events.V1.UpdateSubscribedEventOptions ' . $options . ']'; } }PKt['II>Twilio/Rest/Events/V1/Subscription/SubscribedEventInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'type' => Values::array_get($payload, 'type'), 'schemaVersion' => Values::array_get($payload, 'schema_version'), 'subscriptionSid' => Values::array_get($payload, 'subscription_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'subscriptionSid' => $subscriptionSid, 'type' => $type ?: $this->properties['type'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SubscribedEventContext Context for this SubscribedEventInstance */ protected function proxy(): SubscribedEventContext { if (!$this->context) { $this->context = new SubscribedEventContext( $this->version, $this->solution['subscriptionSid'], $this->solution['type'] ); } return $this->context; } /** * Fetch the SubscribedEventInstance * * @return SubscribedEventInstance Fetched SubscribedEventInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SubscribedEventInstance { return $this->proxy()->fetch(); } /** * Update the SubscribedEventInstance * * @param array|Options $options Optional Arguments * @return SubscribedEventInstance Updated SubscribedEventInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SubscribedEventInstance { return $this->proxy()->update($options); } /** * Delete the SubscribedEventInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.SubscribedEventInstance ' . \implode(' ', $context) . ']'; } }PKt[ =Twilio/Rest/Events/V1/Subscription/SubscribedEventContext.phpnu[solution = ['subscriptionSid' => $subscriptionSid, 'type' => $type, ]; $this->uri = '/Subscriptions/' . \rawurlencode($subscriptionSid) . '/SubscribedEvents/' . \rawurlencode($type) . ''; } /** * Fetch the SubscribedEventInstance * * @return SubscribedEventInstance Fetched SubscribedEventInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SubscribedEventInstance { $payload = $this->version->fetch('GET', $this->uri); return new SubscribedEventInstance( $this->version, $payload, $this->solution['subscriptionSid'], $this->solution['type'] ); } /** * Update the SubscribedEventInstance * * @param array|Options $options Optional Arguments * @return SubscribedEventInstance Updated SubscribedEventInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SubscribedEventInstance { $options = new Values($options); $data = Values::of(['SchemaVersion' => $options['schemaVersion'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SubscribedEventInstance( $this->version, $payload, $this->solution['subscriptionSid'], $this->solution['type'] ); } /** * Delete the SubscribedEventInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.SubscribedEventContext ' . \implode(' ', $context) . ']'; } }PKt[ѺT:Twilio/Rest/Events/V1/Subscription/SubscribedEventList.phpnu[solution = ['subscriptionSid' => $subscriptionSid, ]; $this->uri = '/Subscriptions/' . \rawurlencode($subscriptionSid) . '/SubscribedEvents'; } /** * Streams SubscribedEventInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SubscribedEventInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SubscribedEventInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SubscribedEventInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SubscribedEventPage Page of SubscribedEventInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SubscribedEventPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SubscribedEventPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SubscribedEventInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SubscribedEventPage Page of SubscribedEventInstance */ public function getPage(string $targetUrl): SubscribedEventPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SubscribedEventPage($this->version, $response, $this->solution); } /** * Create the SubscribedEventInstance * * @param string $type Type of event being subscribed to. * @param array|Options $options Optional Arguments * @return SubscribedEventInstance Created SubscribedEventInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, array $options = []): SubscribedEventInstance { $options = new Values($options); $data = Values::of(['Type' => $type, 'SchemaVersion' => $options['schemaVersion'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SubscribedEventInstance($this->version, $payload, $this->solution['subscriptionSid']); } /** * Constructs a SubscribedEventContext * * @param string $type Type of event being subscribed to. */ public function getContext(string $type): SubscribedEventContext { return new SubscribedEventContext($this->version, $this->solution['subscriptionSid'], $type); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SubscribedEventList]'; } }PKt[ RXX:Twilio/Rest/Events/V1/Subscription/SubscribedEventPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SubscribedEventInstance \Twilio\Rest\Events\V1\Subscription\SubscribedEventInstance */ public function buildInstance(array $payload): SubscribedEventInstance { return new SubscribedEventInstance($this->version, $payload, $this->solution['subscriptionSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SubscribedEventPage]'; } }PKt[[J##*Twilio/Rest/Events/V1/EventTypeOptions.phpnu[options['schemaId'] = $schemaId; } /** * A string parameter filtering the results to return only the Event Types using a given schema. * * @param string $schemaId A string to filter Event Types by schema. * @return $this Fluent Builder */ public function setSchemaId(string $schemaId): self { $this->options['schemaId'] = $schemaId; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Events.V1.ReadEventTypeOptions ' . $options . ']'; } }PKt[\\*Twilio/Rest/Events/V1/EventTypeContext.phpnu[solution = ['type' => $type, ]; $this->uri = '/Types/' . \rawurlencode($type) . ''; } /** * Fetch the EventTypeInstance * * @return EventTypeInstance Fetched EventTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EventTypeInstance { $payload = $this->version->fetch('GET', $this->uri); return new EventTypeInstance($this->version, $payload, $this->solution['type']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.EventTypeContext ' . \implode(' ', $context) . ']'; } }PKt[ E::$Twilio/Rest/Events/V1/SchemaList.phpnu[solution = []; } /** * Constructs a SchemaContext * * @param string $id The unique identifier of the schema. */ public function getContext(string $id): SchemaContext { return new SchemaContext($this->version, $id); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1.SchemaList]'; } }PKt[q@5.Twilio/Rest/Events/V1/SubscriptionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'description' => Values::array_get($payload, 'description'), 'sinkSid' => Values::array_get($payload, 'sink_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SubscriptionContext Context for this SubscriptionInstance */ protected function proxy(): SubscriptionContext { if (!$this->context) { $this->context = new SubscriptionContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SubscriptionInstance * * @return SubscriptionInstance Fetched SubscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SubscriptionInstance { return $this->proxy()->fetch(); } /** * Update the SubscriptionInstance * * @param array|Options $options Optional Arguments * @return SubscriptionInstance Updated SubscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SubscriptionInstance { return $this->proxy()->update($options); } /** * Delete the SubscriptionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the subscribedEvents */ protected function getSubscribedEvents(): SubscribedEventList { return $this->proxy()->subscribedEvents; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.SubscriptionInstance ' . \implode(' ', $context) . ']'; } }PKt[W_p-Twilio/Rest/Events/V1/SubscriptionContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Subscriptions/' . \rawurlencode($sid) . ''; } /** * Fetch the SubscriptionInstance * * @return SubscriptionInstance Fetched SubscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SubscriptionInstance { $payload = $this->version->fetch('GET', $this->uri); return new SubscriptionInstance($this->version, $payload, $this->solution['sid']); } /** * Update the SubscriptionInstance * * @param array|Options $options Optional Arguments * @return SubscriptionInstance Updated SubscriptionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SubscriptionInstance { $options = new Values($options); $data = Values::of(['Description' => $options['description'], 'SinkSid' => $options['sinkSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SubscriptionInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the SubscriptionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the subscribedEvents */ protected function getSubscribedEvents(): SubscribedEventList { if (!$this->_subscribedEvents) { $this->_subscribedEvents = new SubscribedEventList($this->version, $this->solution['sid']); } return $this->_subscribedEvents; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.SubscriptionContext ' . \implode(' ', $context) . ']'; } }PKt['%Twilio/Rest/Events/V1/SinkContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Sinks/' . \rawurlencode($sid) . ''; } /** * Fetch the SinkInstance * * @return SinkInstance Fetched SinkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SinkInstance { $payload = $this->version->fetch('GET', $this->uri); return new SinkInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the SinkInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the SinkInstance * * @param string $description Sink Description * @return SinkInstance Updated SinkInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $description): SinkInstance { $data = Values::of(['Description' => $description, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SinkInstance($this->version, $payload, $this->solution['sid']); } /** * Access the sinkTest */ protected function getSinkTest(): SinkTestList { if (!$this->_sinkTest) { $this->_sinkTest = new SinkTestList($this->version, $this->solution['sid']); } return $this->_sinkTest; } /** * Access the sinkValidate */ protected function getSinkValidate(): SinkValidateList { if (!$this->_sinkValidate) { $this->_sinkValidate = new SinkValidateList($this->version, $this->solution['sid']); } return $this->_sinkValidate; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Events.V1.SinkContext ' . \implode(' ', $context) . ']'; } }PKt[_ Twilio/Rest/Events/V1.phpnu[version = 'v1'; } protected function getEventTypes(): EventTypeList { if (!$this->_eventTypes) { $this->_eventTypes = new EventTypeList($this); } return $this->_eventTypes; } protected function getSchemas(): SchemaList { if (!$this->_schemas) { $this->_schemas = new SchemaList($this); } return $this->_schemas; } protected function getSinks(): SinkList { if (!$this->_sinks) { $this->_sinks = new SinkList($this); } return $this->_sinks; } protected function getSubscriptions(): SubscriptionList { if (!$this->_subscriptions) { $this->_subscriptions = new SubscriptionList($this); } return $this->_subscriptions; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Events.V1]'; } }PKt[&I  Twilio/Rest/FrontlineApi.phpnu[baseUrl = 'https://frontline-api.twilio.com'; } /** * @return V1 Version v1 of frontline_api */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getUsers(): \Twilio\Rest\FrontlineApi\V1\UserList { return $this->v1->users; } /** * @param string $sid The SID of the User resource to fetch */ protected function contextUsers(string $sid): \Twilio\Rest\FrontlineApi\V1\UserContext { return $this->v1->users($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FrontlineApi]'; } }PKt[A6 Twilio/Rest/Preview/Wireless.phpnu[version = 'wireless'; } protected function getCommands(): CommandList { if (!$this->_commands) { $this->_commands = new CommandList($this); } return $this->_commands; } protected function getRatePlans(): RatePlanList { if (!$this->_ratePlans) { $this->_ratePlans = new RatePlanList($this); } return $this->_ratePlans; } protected function getSims(): SimList { if (!$this->_sims) { $this->_sims = new SimList($this); } return $this->_sims; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Wireless]'; } }PKt[n++CTwilio/Rest/Preview/HostedNumbers/AuthorizationDocumentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'status' => Values::array_get($payload, 'status'), 'email' => Values::array_get($payload, 'email'), 'ccEmails' => Values::array_get($payload, 'cc_emails'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AuthorizationDocumentContext Context for this * AuthorizationDocumentInstance */ protected function proxy(): AuthorizationDocumentContext { if (!$this->context) { $this->context = new AuthorizationDocumentContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the AuthorizationDocumentInstance * * @return AuthorizationDocumentInstance Fetched AuthorizationDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthorizationDocumentInstance { return $this->proxy()->fetch(); } /** * Update the AuthorizationDocumentInstance * * @param array|Options $options Optional Arguments * @return AuthorizationDocumentInstance Updated AuthorizationDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AuthorizationDocumentInstance { return $this->proxy()->update($options); } /** * Access the dependentHostedNumberOrders */ protected function getDependentHostedNumberOrders(): DependentHostedNumberOrderList { return $this->proxy()->dependentHostedNumberOrders; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.HostedNumbers.AuthorizationDocumentInstance ' . \implode(' ', $context) . ']'; } }PKt[Jf?Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'incomingPhoneNumberSid' => Values::array_get($payload, 'incoming_phone_number_sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'signingDocumentSid' => Values::array_get($payload, 'signing_document_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'status' => Values::array_get($payload, 'status'), 'failureReason' => Values::array_get($payload, 'failure_reason'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'verificationAttempts' => Values::array_get($payload, 'verification_attempts'), 'email' => Values::array_get($payload, 'email'), 'ccEmails' => Values::array_get($payload, 'cc_emails'), 'url' => Values::array_get($payload, 'url'), 'verificationType' => Values::array_get($payload, 'verification_type'), 'verificationDocumentSid' => Values::array_get($payload, 'verification_document_sid'), 'extension' => Values::array_get($payload, 'extension'), 'callDelay' => Values::array_get($payload, 'call_delay'), 'verificationCode' => Values::array_get($payload, 'verification_code'), 'verificationCallSids' => Values::array_get($payload, 'verification_call_sids'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return HostedNumberOrderContext Context for this HostedNumberOrderInstance */ protected function proxy(): HostedNumberOrderContext { if (!$this->context) { $this->context = new HostedNumberOrderContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the HostedNumberOrderInstance * * @return HostedNumberOrderInstance Fetched HostedNumberOrderInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): HostedNumberOrderInstance { return $this->proxy()->fetch(); } /** * Delete the HostedNumberOrderInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the HostedNumberOrderInstance * * @param array|Options $options Optional Arguments * @return HostedNumberOrderInstance Updated HostedNumberOrderInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): HostedNumberOrderInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.HostedNumbers.HostedNumberOrderInstance ' . \implode(' ', $context) . ']'; } }PKt[#Pd;Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return HostedNumberOrderInstance \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderInstance */ public function buildInstance(array $payload): HostedNumberOrderInstance { return new HostedNumberOrderInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.HostedNumbers.HostedNumberOrderPage]'; } }PKt[ok[[>Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['email'] = $email; $this->options['ccEmails'] = $ccEmails; $this->options['status'] = $status; $this->options['verificationCode'] = $verificationCode; $this->options['verificationType'] = $verificationType; $this->options['verificationDocumentSid'] = $verificationDocumentSid; $this->options['extension'] = $extension; $this->options['callDelay'] = $callDelay; } /** * A 64 character string that is a human readable text that describes this resource. * * @param string $friendlyName A human readable description of this resource. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. * * @param string $uniqueName A unique, developer assigned name of this * HostedNumberOrder. * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Email of the owner of this phone number that is being hosted. * * @param string $email Email. * @return $this Fluent Builder */ public function setEmail(string $email): self { $this->options['email'] = $email; return $this; } /** * Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to. * * @param string[] $ccEmails A list of emails. * @return $this Fluent Builder */ public function setCcEmails(array $ccEmails): self { $this->options['ccEmails'] = $ccEmails; return $this; } /** * User can only post to `pending-verification` status to transition the HostedNumberOrder to initiate a verification call or verification of ownership with a copy of a phone bill. * * @param string $status The Status of this HostedNumberOrder. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * A verification code that is given to the user via a phone call to the phone number that is being hosted. * * @param string $verificationCode A verification code. * @return $this Fluent Builder */ public function setVerificationCode(string $verificationCode): self { $this->options['verificationCode'] = $verificationCode; return $this; } /** * Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. * * @param string $verificationType Verification Type. * @return $this Fluent Builder */ public function setVerificationType(string $verificationType): self { $this->options['verificationType'] = $verificationType; return $this; } /** * Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill. * * @param string $verificationDocumentSid Verification Document Sid * @return $this Fluent Builder */ public function setVerificationDocumentSid(string $verificationDocumentSid): self { $this->options['verificationDocumentSid'] = $verificationDocumentSid; return $this; } /** * Digits to dial after connecting the verification call. * * @param string $extension Digits to dial after connecting the verification * call. * @return $this Fluent Builder */ public function setExtension(string $extension): self { $this->options['extension'] = $extension; return $this; } /** * The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0. * * @param int $callDelay The number of seconds, between 0 and 60, to delay * before initiating the verification call. * @return $this Fluent Builder */ public function setCallDelay(int $callDelay): self { $this->options['callDelay'] = $callDelay; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.HostedNumbers.UpdateHostedNumberOrderOptions ' . $options . ']'; } } class ReadHostedNumberOrderOptions extends Options { /** * @param string $status The Status of this HostedNumberOrder. * @param string $phoneNumber An E164 formatted phone number. * @param string $incomingPhoneNumberSid IncomingPhoneNumber sid. * @param string $friendlyName A human readable description of this resource. * @param string $uniqueName A unique, developer assigned name of this * HostedNumberOrder. */ public function __construct(string $status = Values::NONE, string $phoneNumber = Values::NONE, string $incomingPhoneNumberSid = Values::NONE, string $friendlyName = Values::NONE, string $uniqueName = Values::NONE) { $this->options['status'] = $status; $this->options['phoneNumber'] = $phoneNumber; $this->options['incomingPhoneNumberSid'] = $incomingPhoneNumberSid; $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; } /** * The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`. * * @param string $status The Status of this HostedNumberOrder. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * An E164 formatted phone number hosted by this HostedNumberOrder. * * @param string $phoneNumber An E164 formatted phone number. * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. * * @param string $incomingPhoneNumberSid IncomingPhoneNumber sid. * @return $this Fluent Builder */ public function setIncomingPhoneNumberSid(string $incomingPhoneNumberSid): self { $this->options['incomingPhoneNumberSid'] = $incomingPhoneNumberSid; return $this; } /** * A human readable description of this resource, up to 64 characters. * * @param string $friendlyName A human readable description of this resource. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. * * @param string $uniqueName A unique, developer assigned name of this * HostedNumberOrder. * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.HostedNumbers.ReadHostedNumberOrderOptions ' . $options . ']'; } } class CreateHostedNumberOrderOptions extends Options { /** * @param string $accountSid Account Sid. * @param string $friendlyName A human readable description of this resource. * @param string $uniqueName A unique, developer assigned name of this * HostedNumberOrder. * @param string[] $ccEmails A list of emails. * @param string $smsUrl SMS URL. * @param string $smsMethod SMS Method. * @param string $smsFallbackUrl SMS Fallback URL. * @param string $smsFallbackMethod SMS Fallback Method. * @param string $statusCallbackUrl Status Callback URL. * @param string $statusCallbackMethod Status Callback Method. * @param string $smsApplicationSid SMS Application Sid. * @param string $addressSid Address sid. * @param string $email Email. * @param string $verificationType Verification Type. * @param string $verificationDocumentSid Verification Document Sid */ public function __construct(string $accountSid = Values::NONE, string $friendlyName = Values::NONE, string $uniqueName = Values::NONE, array $ccEmails = Values::ARRAY_NONE, string $smsUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsFallbackMethod = Values::NONE, string $statusCallbackUrl = Values::NONE, string $statusCallbackMethod = Values::NONE, string $smsApplicationSid = Values::NONE, string $addressSid = Values::NONE, string $email = Values::NONE, string $verificationType = Values::NONE, string $verificationDocumentSid = Values::NONE) { $this->options['accountSid'] = $accountSid; $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['ccEmails'] = $ccEmails; $this->options['smsUrl'] = $smsUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['statusCallbackUrl'] = $statusCallbackUrl; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['smsApplicationSid'] = $smsApplicationSid; $this->options['addressSid'] = $addressSid; $this->options['email'] = $email; $this->options['verificationType'] = $verificationType; $this->options['verificationDocumentSid'] = $verificationDocumentSid; } /** * This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to. * * @param string $accountSid Account Sid. * @return $this Fluent Builder */ public function setAccountSid(string $accountSid): self { $this->options['accountSid'] = $accountSid; return $this; } /** * A 64 character string that is a human readable text that describes this resource. * * @param string $friendlyName A human readable description of this resource. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. * * @param string $uniqueName A unique, developer assigned name of this * HostedNumberOrder. * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to. * * @param string[] $ccEmails A list of emails. * @return $this Fluent Builder */ public function setCcEmails(array $ccEmails): self { $this->options['ccEmails'] = $ccEmails; return $this; } /** * The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource. * * @param string $smsUrl SMS URL. * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. * * @param string $smsMethod SMS Method. * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource. * * @param string $smsFallbackUrl SMS Fallback URL. * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. * * @param string $smsFallbackMethod SMS Fallback Method. * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * Optional. The Status Callback URL attached to the IncomingPhoneNumber resource. * * @param string $statusCallbackUrl Status Callback URL. * @return $this Fluent Builder */ public function setStatusCallbackUrl(string $statusCallbackUrl): self { $this->options['statusCallbackUrl'] = $statusCallbackUrl; return $this; } /** * Optional. The Status Callback Method attached to the IncomingPhoneNumber resource. * * @param string $statusCallbackMethod Status Callback Method. * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application. * * @param string $smsApplicationSid SMS Application Sid. * @return $this Fluent Builder */ public function setSmsApplicationSid(string $smsApplicationSid): self { $this->options['smsApplicationSid'] = $smsApplicationSid; return $this; } /** * Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number. * * @param string $addressSid Address sid. * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * Optional. Email of the owner of this phone number that is being hosted. * * @param string $email Email. * @return $this Fluent Builder */ public function setEmail(string $email): self { $this->options['email'] = $email; return $this; } /** * Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. * * @param string $verificationType Verification Type. * @return $this Fluent Builder */ public function setVerificationType(string $verificationType): self { $this->options['verificationType'] = $verificationType; return $this; } /** * Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill. * * @param string $verificationDocumentSid Verification Document Sid * @return $this Fluent Builder */ public function setVerificationDocumentSid(string $verificationDocumentSid): self { $this->options['verificationDocumentSid'] = $verificationDocumentSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.HostedNumbers.CreateHostedNumberOrderOptions ' . $options . ']'; } }PKt[3Q%?Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AuthorizationDocumentInstance \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentInstance */ public function buildInstance(array $payload): AuthorizationDocumentInstance { return new AuthorizationDocumentInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.HostedNumbers.AuthorizationDocumentPage]'; } }PKt[U3ZTwilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderList.phpnu[solution = ['signingDocumentSid' => $signingDocumentSid, ]; $this->uri = '/AuthorizationDocuments/' . \rawurlencode($signingDocumentSid) . '/DependentHostedNumberOrders'; } /** * Streams DependentHostedNumberOrderInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DependentHostedNumberOrderInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DependentHostedNumberOrderInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of DependentHostedNumberOrderInstance records from * the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DependentHostedNumberOrderPage Page of * DependentHostedNumberOrderInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DependentHostedNumberOrderPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'PhoneNumber' => $options['phoneNumber'], 'IncomingPhoneNumberSid' => $options['incomingPhoneNumberSid'], 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DependentHostedNumberOrderPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DependentHostedNumberOrderInstance records from * the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DependentHostedNumberOrderPage Page of * DependentHostedNumberOrderInstance */ public function getPage(string $targetUrl): DependentHostedNumberOrderPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DependentHostedNumberOrderPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.HostedNumbers.DependentHostedNumberOrderList]'; } }PKt[3GG]Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderOptions.phpnu[options['status'] = $status; $this->options['phoneNumber'] = $phoneNumber; $this->options['incomingPhoneNumberSid'] = $incomingPhoneNumberSid; $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; } /** * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. * * @param string $status The Status of this HostedNumberOrder. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * An E164 formatted phone number hosted by this HostedNumberOrder. * * @param string $phoneNumber An E164 formatted phone number. * @return $this Fluent Builder */ public function setPhoneNumber(string $phoneNumber): self { $this->options['phoneNumber'] = $phoneNumber; return $this; } /** * A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. * * @param string $incomingPhoneNumberSid IncomingPhoneNumber sid. * @return $this Fluent Builder */ public function setIncomingPhoneNumberSid(string $incomingPhoneNumberSid): self { $this->options['incomingPhoneNumberSid'] = $incomingPhoneNumberSid; return $this; } /** * A human readable description of this resource, up to 64 characters. * * @param string $friendlyName A human readable description of this resource. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. * * @param string $uniqueName A unique, developer assigned name of this * HostedNumberOrder. * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.HostedNumbers.ReadDependentHostedNumberOrderOptions ' . $options . ']'; } }PKt[J^Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'incomingPhoneNumberSid' => Values::array_get($payload, 'incoming_phone_number_sid'), 'addressSid' => Values::array_get($payload, 'address_sid'), 'signingDocumentSid' => Values::array_get($payload, 'signing_document_sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'capabilities' => Values::array_get($payload, 'capabilities'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'status' => Values::array_get($payload, 'status'), 'failureReason' => Values::array_get($payload, 'failure_reason'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'verificationAttempts' => Values::array_get($payload, 'verification_attempts'), 'email' => Values::array_get($payload, 'email'), 'ccEmails' => Values::array_get($payload, 'cc_emails'), 'verificationType' => Values::array_get($payload, 'verification_type'), 'verificationDocumentSid' => Values::array_get($payload, 'verification_document_sid'), 'extension' => Values::array_get($payload, 'extension'), 'callDelay' => Values::array_get($payload, 'call_delay'), 'verificationCode' => Values::array_get($payload, 'verification_code'), 'verificationCallSids' => Values::array_get($payload, 'verification_call_sids'), ]; $this->solution = ['signingDocumentSid' => $signingDocumentSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.HostedNumbers.DependentHostedNumberOrderInstance]'; } }PKt[\6[[ZTwilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DependentHostedNumberOrderInstance \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument\DependentHostedNumberOrderInstance */ public function buildInstance(array $payload): DependentHostedNumberOrderInstance { return new DependentHostedNumberOrderInstance( $this->version, $payload, $this->solution['signingDocumentSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.HostedNumbers.DependentHostedNumberOrderPage]'; } }PKt[@La<<;Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.phpnu[solution = []; $this->uri = '/HostedNumberOrders'; } /** * Streams HostedNumberOrderInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads HostedNumberOrderInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return HostedNumberOrderInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of HostedNumberOrderInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return HostedNumberOrderPage Page of HostedNumberOrderInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): HostedNumberOrderPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'PhoneNumber' => $options['phoneNumber'], 'IncomingPhoneNumberSid' => $options['incomingPhoneNumberSid'], 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new HostedNumberOrderPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of HostedNumberOrderInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return HostedNumberOrderPage Page of HostedNumberOrderInstance */ public function getPage(string $targetUrl): HostedNumberOrderPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new HostedNumberOrderPage($this->version, $response, $this->solution); } /** * Create the HostedNumberOrderInstance * * @param string $phoneNumber An E164 formatted phone number. * @param bool $smsCapability Specify SMS capability to host. * @param array|Options $options Optional Arguments * @return HostedNumberOrderInstance Created HostedNumberOrderInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber, bool $smsCapability, array $options = []): HostedNumberOrderInstance { $options = new Values($options); $data = Values::of([ 'PhoneNumber' => $phoneNumber, 'SmsCapability' => Serialize::booleanToString($smsCapability), 'AccountSid' => $options['accountSid'], 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'CcEmails' => Serialize::map($options['ccEmails'], function($e) { return $e; }), 'SmsUrl' => $options['smsUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'StatusCallbackUrl' => $options['statusCallbackUrl'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'SmsApplicationSid' => $options['smsApplicationSid'], 'AddressSid' => $options['addressSid'], 'Email' => $options['email'], 'VerificationType' => $options['verificationType'], 'VerificationDocumentSid' => $options['verificationDocumentSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new HostedNumberOrderInstance($this->version, $payload); } /** * Constructs a HostedNumberOrderContext * * @param string $sid HostedNumberOrder sid. */ public function getContext(string $sid): HostedNumberOrderContext { return new HostedNumberOrderContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.HostedNumbers.HostedNumberOrderList]'; } }PKt[hX >Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/HostedNumberOrders/' . \rawurlencode($sid) . ''; } /** * Fetch the HostedNumberOrderInstance * * @return HostedNumberOrderInstance Fetched HostedNumberOrderInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): HostedNumberOrderInstance { $payload = $this->version->fetch('GET', $this->uri); return new HostedNumberOrderInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the HostedNumberOrderInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the HostedNumberOrderInstance * * @param array|Options $options Optional Arguments * @return HostedNumberOrderInstance Updated HostedNumberOrderInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): HostedNumberOrderInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Email' => $options['email'], 'CcEmails' => Serialize::map($options['ccEmails'], function($e) { return $e; }), 'Status' => $options['status'], 'VerificationCode' => $options['verificationCode'], 'VerificationType' => $options['verificationType'], 'VerificationDocumentSid' => $options['verificationDocumentSid'], 'Extension' => $options['extension'], 'CallDelay' => $options['callDelay'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new HostedNumberOrderInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.HostedNumbers.HostedNumberOrderContext ' . \implode(' ', $context) . ']'; } }PKt[EBTwilio/Rest/Preview/HostedNumbers/AuthorizationDocumentContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/AuthorizationDocuments/' . \rawurlencode($sid) . ''; } /** * Fetch the AuthorizationDocumentInstance * * @return AuthorizationDocumentInstance Fetched AuthorizationDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AuthorizationDocumentInstance { $payload = $this->version->fetch('GET', $this->uri); return new AuthorizationDocumentInstance($this->version, $payload, $this->solution['sid']); } /** * Update the AuthorizationDocumentInstance * * @param array|Options $options Optional Arguments * @return AuthorizationDocumentInstance Updated AuthorizationDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AuthorizationDocumentInstance { $options = new Values($options); $data = Values::of([ 'HostedNumberOrderSids' => Serialize::map($options['hostedNumberOrderSids'], function($e) { return $e; }), 'AddressSid' => $options['addressSid'], 'Email' => $options['email'], 'CcEmails' => Serialize::map($options['ccEmails'], function($e) { return $e; }), 'Status' => $options['status'], 'ContactTitle' => $options['contactTitle'], 'ContactPhoneNumber' => $options['contactPhoneNumber'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AuthorizationDocumentInstance($this->version, $payload, $this->solution['sid']); } /** * Access the dependentHostedNumberOrders */ protected function getDependentHostedNumberOrders(): DependentHostedNumberOrderList { if (!$this->_dependentHostedNumberOrders) { $this->_dependentHostedNumberOrders = new DependentHostedNumberOrderList( $this->version, $this->solution['sid'] ); } return $this->_dependentHostedNumberOrders; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.HostedNumbers.AuthorizationDocumentContext ' . \implode(' ', $context) . ']'; } }PKt[?Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentList.phpnu[solution = []; $this->uri = '/AuthorizationDocuments'; } /** * Streams AuthorizationDocumentInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AuthorizationDocumentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AuthorizationDocumentInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of AuthorizationDocumentInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AuthorizationDocumentPage Page of AuthorizationDocumentInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AuthorizationDocumentPage { $options = new Values($options); $params = Values::of([ 'Email' => $options['email'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AuthorizationDocumentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AuthorizationDocumentInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AuthorizationDocumentPage Page of AuthorizationDocumentInstance */ public function getPage(string $targetUrl): AuthorizationDocumentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AuthorizationDocumentPage($this->version, $response, $this->solution); } /** * Create the AuthorizationDocumentInstance * * @param string[] $hostedNumberOrderSids A list of HostedNumberOrder sids. * @param string $addressSid Address sid. * @param string $email Email. * @param string $contactTitle Title of signee of this Authorization Document. * @param string $contactPhoneNumber Authorization Document's signee's phone * number. * @param array|Options $options Optional Arguments * @return AuthorizationDocumentInstance Created AuthorizationDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $hostedNumberOrderSids, string $addressSid, string $email, string $contactTitle, string $contactPhoneNumber, array $options = []): AuthorizationDocumentInstance { $options = new Values($options); $data = Values::of([ 'HostedNumberOrderSids' => Serialize::map($hostedNumberOrderSids, function($e) { return $e; }), 'AddressSid' => $addressSid, 'Email' => $email, 'ContactTitle' => $contactTitle, 'ContactPhoneNumber' => $contactPhoneNumber, 'CcEmails' => Serialize::map($options['ccEmails'], function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AuthorizationDocumentInstance($this->version, $payload); } /** * Constructs a AuthorizationDocumentContext * * @param string $sid AuthorizationDocument sid. */ public function getContext(string $sid): AuthorizationDocumentContext { return new AuthorizationDocumentContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.HostedNumbers.AuthorizationDocumentList]'; } }PKt[ m=$=$BTwilio/Rest/Preview/HostedNumbers/AuthorizationDocumentOptions.phpnu[options['hostedNumberOrderSids'] = $hostedNumberOrderSids; $this->options['addressSid'] = $addressSid; $this->options['email'] = $email; $this->options['ccEmails'] = $ccEmails; $this->options['status'] = $status; $this->options['contactTitle'] = $contactTitle; $this->options['contactPhoneNumber'] = $contactPhoneNumber; } /** * A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. * * @param string[] $hostedNumberOrderSids A list of HostedNumberOrder sids. * @return $this Fluent Builder */ public function setHostedNumberOrderSids(array $hostedNumberOrderSids): self { $this->options['hostedNumberOrderSids'] = $hostedNumberOrderSids; return $this; } /** * A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. * * @param string $addressSid Address sid. * @return $this Fluent Builder */ public function setAddressSid(string $addressSid): self { $this->options['addressSid'] = $addressSid; return $this; } /** * Email that this AuthorizationDocument will be sent to for signing. * * @param string $email Email. * @return $this Fluent Builder */ public function setEmail(string $email): self { $this->options['email'] = $email; return $this; } /** * Email recipients who will be informed when an Authorization Document has been sent and signed * * @param string[] $ccEmails A list of emails. * @return $this Fluent Builder */ public function setCcEmails(array $ccEmails): self { $this->options['ccEmails'] = $ccEmails; return $this; } /** * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. * * @param string $status The Status of this AuthorizationDocument. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The title of the person authorized to sign the Authorization Document for this phone number. * * @param string $contactTitle Title of signee of this Authorization Document. * @return $this Fluent Builder */ public function setContactTitle(string $contactTitle): self { $this->options['contactTitle'] = $contactTitle; return $this; } /** * The contact phone number of the person authorized to sign the Authorization Document. * * @param string $contactPhoneNumber Authorization Document's signee's phone * number. * @return $this Fluent Builder */ public function setContactPhoneNumber(string $contactPhoneNumber): self { $this->options['contactPhoneNumber'] = $contactPhoneNumber; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.HostedNumbers.UpdateAuthorizationDocumentOptions ' . $options . ']'; } } class ReadAuthorizationDocumentOptions extends Options { /** * @param string $email Email. * @param string $status The Status of this AuthorizationDocument. */ public function __construct(string $email = Values::NONE, string $status = Values::NONE) { $this->options['email'] = $email; $this->options['status'] = $status; } /** * Email that this AuthorizationDocument will be sent to for signing. * * @param string $email Email. * @return $this Fluent Builder */ public function setEmail(string $email): self { $this->options['email'] = $email; return $this; } /** * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. * * @param string $status The Status of this AuthorizationDocument. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.HostedNumbers.ReadAuthorizationDocumentOptions ' . $options . ']'; } } class CreateAuthorizationDocumentOptions extends Options { /** * @param string[] $ccEmails A list of emails. */ public function __construct(array $ccEmails = Values::ARRAY_NONE) { $this->options['ccEmails'] = $ccEmails; } /** * Email recipients who will be informed when an Authorization Document has been sent and signed. * * @param string[] $ccEmails A list of emails. * @return $this Fluent Builder */ public function setCcEmails(array $ccEmails): self { $this->options['ccEmails'] = $ccEmails; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.HostedNumbers.CreateAuthorizationDocumentOptions ' . $options . ']'; } }PKt[vH>4Twilio/Rest/Preview/DeployedDevices/FleetOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * Provides a human readable descriptive text for this Fleet, up to 256 characters long. * * @param string $friendlyName A human readable description for this Fleet. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.CreateFleetOptions ' . $options . ']'; } } class UpdateFleetOptions extends Options { /** * @param string $friendlyName A human readable description for this Fleet. * @param string $defaultDeploymentSid A default Deployment SID. */ public function __construct(string $friendlyName = Values::NONE, string $defaultDeploymentSid = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['defaultDeploymentSid'] = $defaultDeploymentSid; } /** * Provides a human readable descriptive text for this Fleet, up to 256 characters long. * * @param string $friendlyName A human readable description for this Fleet. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides a string identifier of a Deployment that is going to be used as a default one for this Fleet. * * @param string $defaultDeploymentSid A default Deployment SID. * @return $this Fluent Builder */ public function setDefaultDeploymentSid(string $defaultDeploymentSid): self { $this->options['defaultDeploymentSid'] = $defaultDeploymentSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.UpdateFleetOptions ' . $options . ']'; } }PKt[,8Twilio/Rest/Preview/DeployedDevices/Fleet/KeyOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['deviceSid'] = $deviceSid; } /** * Provides a human readable descriptive text for this Key credential, up to 256 characters long. * * @param string $friendlyName The human readable description for this Key. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides the unique string identifier of an existing Device to become authenticated with this Key credential. * * @param string $deviceSid The unique identifier of a Key to be authenticated. * @return $this Fluent Builder */ public function setDeviceSid(string $deviceSid): self { $this->options['deviceSid'] = $deviceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.CreateKeyOptions ' . $options . ']'; } } class ReadKeyOptions extends Options { /** * @param string $deviceSid Find all Keys authenticating specified Device. */ public function __construct(string $deviceSid = Values::NONE) { $this->options['deviceSid'] = $deviceSid; } /** * Filters the resulting list of Keys by a unique string identifier of an authenticated Device. * * @param string $deviceSid Find all Keys authenticating specified Device. * @return $this Fluent Builder */ public function setDeviceSid(string $deviceSid): self { $this->options['deviceSid'] = $deviceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.ReadKeyOptions ' . $options . ']'; } } class UpdateKeyOptions extends Options { /** * @param string $friendlyName The human readable description for this Key. * @param string $deviceSid The unique identifier of a Key to be authenticated. */ public function __construct(string $friendlyName = Values::NONE, string $deviceSid = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['deviceSid'] = $deviceSid; } /** * Provides a human readable descriptive text for this Key credential, up to 256 characters long. * * @param string $friendlyName The human readable description for this Key. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides the unique string identifier of an existing Device to become authenticated with this Key credential. * * @param string $deviceSid The unique identifier of a Key to be authenticated. * @return $this Fluent Builder */ public function setDeviceSid(string $deviceSid): self { $this->options['deviceSid'] = $deviceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.UpdateKeyOptions ' . $options . ']'; } }PKt[S` ` 8Twilio/Rest/Preview/DeployedDevices/Fleet/KeyContext.phpnu[solution = ['fleetSid' => $fleetSid, 'sid' => $sid, ]; $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Keys/' . \rawurlencode($sid) . ''; } /** * Fetch the KeyInstance * * @return KeyInstance Fetched KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): KeyInstance { $payload = $this->version->fetch('GET', $this->uri); return new KeyInstance( $this->version, $payload, $this->solution['fleetSid'], $this->solution['sid'] ); } /** * Delete the KeyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the KeyInstance * * @param array|Options $options Optional Arguments * @return KeyInstance Updated KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): KeyInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DeviceSid' => $options['deviceSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new KeyInstance( $this->version, $payload, $this->solution['fleetSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.DeployedDevices.KeyContext ' . \implode(' ', $context) . ']'; } }PKt[tF  @Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['deviceSid'] = $deviceSid; } /** * Provides a human readable descriptive text for this Certificate credential, up to 256 characters long. * * @param string $friendlyName The human readable description for this * Certificate. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential. * * @param string $deviceSid The unique identifier of a Device to be * authenticated. * @return $this Fluent Builder */ public function setDeviceSid(string $deviceSid): self { $this->options['deviceSid'] = $deviceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.CreateCertificateOptions ' . $options . ']'; } } class ReadCertificateOptions extends Options { /** * @param string $deviceSid Find all Certificates authenticating specified * Device. */ public function __construct(string $deviceSid = Values::NONE) { $this->options['deviceSid'] = $deviceSid; } /** * Filters the resulting list of Certificates by a unique string identifier of an authenticated Device. * * @param string $deviceSid Find all Certificates authenticating specified * Device. * @return $this Fluent Builder */ public function setDeviceSid(string $deviceSid): self { $this->options['deviceSid'] = $deviceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.ReadCertificateOptions ' . $options . ']'; } } class UpdateCertificateOptions extends Options { /** * @param string $friendlyName The human readable description for this * Certificate. * @param string $deviceSid The unique identifier of a Device to be * authenticated. */ public function __construct(string $friendlyName = Values::NONE, string $deviceSid = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['deviceSid'] = $deviceSid; } /** * Provides a human readable descriptive text for this Certificate credential, up to 256 characters long. * * @param string $friendlyName The human readable description for this * Certificate. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential. * * @param string $deviceSid The unique identifier of a Device to be * authenticated. * @return $this Fluent Builder */ public function setDeviceSid(string $deviceSid): self { $this->options['deviceSid'] = $deviceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.UpdateCertificateOptions ' . $options . ']'; } }PKt[ ?Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentContext.phpnu[solution = ['fleetSid' => $fleetSid, 'sid' => $sid, ]; $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Deployments/' . \rawurlencode($sid) . ''; } /** * Fetch the DeploymentInstance * * @return DeploymentInstance Fetched DeploymentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeploymentInstance { $payload = $this->version->fetch('GET', $this->uri); return new DeploymentInstance( $this->version, $payload, $this->solution['fleetSid'], $this->solution['sid'] ); } /** * Delete the DeploymentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the DeploymentInstance * * @param array|Options $options Optional Arguments * @return DeploymentInstance Updated DeploymentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DeploymentInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'SyncServiceSid' => $options['syncServiceSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DeploymentInstance( $this->version, $payload, $this->solution['fleetSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.DeployedDevices.DeploymentContext ' . \implode(' ', $context) . ']'; } }PKt[d?Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['syncServiceSid'] = $syncServiceSid; } /** * Provides a human readable descriptive text for this Deployment, up to 256 characters long. * * @param string $friendlyName A human readable description for this Deployment. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. * * @param string $syncServiceSid The unique identifier of the Sync service * instance. * @return $this Fluent Builder */ public function setSyncServiceSid(string $syncServiceSid): self { $this->options['syncServiceSid'] = $syncServiceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.CreateDeploymentOptions ' . $options . ']'; } } class UpdateDeploymentOptions extends Options { /** * @param string $friendlyName A human readable description for this Deployment. * @param string $syncServiceSid The unique identifier of the Sync service * instance. */ public function __construct(string $friendlyName = Values::NONE, string $syncServiceSid = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['syncServiceSid'] = $syncServiceSid; } /** * Provides a human readable descriptive text for this Deployment, up to 64 characters long * * @param string $friendlyName A human readable description for this Deployment. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. * * @param string $syncServiceSid The unique identifier of the Sync service * instance. * @return $this Fluent Builder */ public function setSyncServiceSid(string $syncServiceSid): self { $this->options['syncServiceSid'] = $syncServiceSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.UpdateDeploymentOptions ' . $options . ']'; } }PKt[\=@Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'fleetSid' => Values::array_get($payload, 'fleet_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'syncServiceSid' => Values::array_get($payload, 'sync_service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['fleetSid' => $fleetSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DeploymentContext Context for this DeploymentInstance */ protected function proxy(): DeploymentContext { if (!$this->context) { $this->context = new DeploymentContext( $this->version, $this->solution['fleetSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DeploymentInstance * * @return DeploymentInstance Fetched DeploymentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeploymentInstance { return $this->proxy()->fetch(); } /** * Delete the DeploymentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the DeploymentInstance * * @param array|Options $options Optional Arguments * @return DeploymentInstance Updated DeploymentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DeploymentInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.DeployedDevices.DeploymentInstance ' . \implode(' ', $context) . ']'; } }PKt[D=Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateList.phpnu[solution = ['fleetSid' => $fleetSid, ]; $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Certificates'; } /** * Create the CertificateInstance * * @param string $certificateData The public certificate data. * @param array|Options $options Optional Arguments * @return CertificateInstance Created CertificateInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $certificateData, array $options = []): CertificateInstance { $options = new Values($options); $data = Values::of([ 'CertificateData' => $certificateData, 'FriendlyName' => $options['friendlyName'], 'DeviceSid' => $options['deviceSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CertificateInstance($this->version, $payload, $this->solution['fleetSid']); } /** * Streams CertificateInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CertificateInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CertificateInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CertificateInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CertificatePage Page of CertificateInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CertificatePage { $options = new Values($options); $params = Values::of([ 'DeviceSid' => $options['deviceSid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CertificatePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CertificateInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CertificatePage Page of CertificateInstance */ public function getPage(string $targetUrl): CertificatePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CertificatePage($this->version, $response, $this->solution); } /** * Constructs a CertificateContext * * @param string $sid A string that uniquely identifies the Certificate. */ public function getContext(string $sid): CertificateContext { return new CertificateContext($this->version, $this->solution['fleetSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices.CertificateList]'; } }PKt[K8Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceList.phpnu[solution = ['fleetSid' => $fleetSid, ]; $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Devices'; } /** * Create the DeviceInstance * * @param array|Options $options Optional Arguments * @return DeviceInstance Created DeviceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): DeviceInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'FriendlyName' => $options['friendlyName'], 'Identity' => $options['identity'], 'DeploymentSid' => $options['deploymentSid'], 'Enabled' => Serialize::booleanToString($options['enabled']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new DeviceInstance($this->version, $payload, $this->solution['fleetSid']); } /** * Streams DeviceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DeviceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DeviceInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of DeviceInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DevicePage Page of DeviceInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DevicePage { $options = new Values($options); $params = Values::of([ 'DeploymentSid' => $options['deploymentSid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DevicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DeviceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DevicePage Page of DeviceInstance */ public function getPage(string $targetUrl): DevicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DevicePage($this->version, $response, $this->solution); } /** * Constructs a DeviceContext * * @param string $sid A string that uniquely identifies the Device. */ public function getContext(string $sid): DeviceContext { return new DeviceContext($this->version, $this->solution['fleetSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices.DeviceList]'; } }PKt["<Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DeploymentInstance \Twilio\Rest\Preview\DeployedDevices\Fleet\DeploymentInstance */ public function buildInstance(array $payload): DeploymentInstance { return new DeploymentInstance($this->version, $payload, $this->solution['fleetSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices.DeploymentPage]'; } }PKt[E(5Twilio/Rest/Preview/DeployedDevices/Fleet/KeyList.phpnu[solution = ['fleetSid' => $fleetSid, ]; $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Keys'; } /** * Create the KeyInstance * * @param array|Options $options Optional Arguments * @return KeyInstance Created KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): KeyInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DeviceSid' => $options['deviceSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new KeyInstance($this->version, $payload, $this->solution['fleetSid']); } /** * Streams KeyInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads KeyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return KeyInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of KeyInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return KeyPage Page of KeyInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): KeyPage { $options = new Values($options); $params = Values::of([ 'DeviceSid' => $options['deviceSid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new KeyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of KeyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return KeyPage Page of KeyInstance */ public function getPage(string $targetUrl): KeyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new KeyPage($this->version, $response, $this->solution); } /** * Constructs a KeyContext * * @param string $sid A string that uniquely identifies the Key. */ public function getContext(string $sid): KeyContext { return new KeyContext($this->version, $this->solution['fleetSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices.KeyList]'; } }PKt[22<Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'fleetSid' => Values::array_get($payload, 'fleet_sid'), 'enabled' => Values::array_get($payload, 'enabled'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'identity' => Values::array_get($payload, 'identity'), 'deploymentSid' => Values::array_get($payload, 'deployment_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'dateAuthenticated' => Deserialize::dateTime(Values::array_get($payload, 'date_authenticated')), ]; $this->solution = ['fleetSid' => $fleetSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DeviceContext Context for this DeviceInstance */ protected function proxy(): DeviceContext { if (!$this->context) { $this->context = new DeviceContext( $this->version, $this->solution['fleetSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DeviceInstance * * @return DeviceInstance Fetched DeviceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeviceInstance { return $this->proxy()->fetch(); } /** * Delete the DeviceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the DeviceInstance * * @param array|Options $options Optional Arguments * @return DeviceInstance Updated DeviceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DeviceInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.DeployedDevices.DeviceInstance ' . \implode(' ', $context) . ']'; } }PKt[M<Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentList.phpnu[solution = ['fleetSid' => $fleetSid, ]; $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Deployments'; } /** * Create the DeploymentInstance * * @param array|Options $options Optional Arguments * @return DeploymentInstance Created DeploymentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): DeploymentInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'SyncServiceSid' => $options['syncServiceSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new DeploymentInstance($this->version, $payload, $this->solution['fleetSid']); } /** * Streams DeploymentInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DeploymentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DeploymentInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DeploymentInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DeploymentPage Page of DeploymentInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DeploymentPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DeploymentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DeploymentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DeploymentPage Page of DeploymentInstance */ public function getPage(string $targetUrl): DeploymentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DeploymentPage($this->version, $response, $this->solution); } /** * Constructs a DeploymentContext * * @param string $sid A string that uniquely identifies the Deployment. */ public function getContext(string $sid): DeploymentContext { return new DeploymentContext($this->version, $this->solution['fleetSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices.DeploymentList]'; } }PKt[E]( ( ;Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceContext.phpnu[solution = ['fleetSid' => $fleetSid, 'sid' => $sid, ]; $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Devices/' . \rawurlencode($sid) . ''; } /** * Fetch the DeviceInstance * * @return DeviceInstance Fetched DeviceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeviceInstance { $payload = $this->version->fetch('GET', $this->uri); return new DeviceInstance( $this->version, $payload, $this->solution['fleetSid'], $this->solution['sid'] ); } /** * Delete the DeviceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the DeviceInstance * * @param array|Options $options Optional Arguments * @return DeviceInstance Updated DeviceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DeviceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Identity' => $options['identity'], 'DeploymentSid' => $options['deploymentSid'], 'Enabled' => Serialize::booleanToString($options['enabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DeviceInstance( $this->version, $payload, $this->solution['fleetSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.DeployedDevices.DeviceContext ' . \implode(' ', $context) . ']'; } }PKt[Ӈ"";Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['friendlyName'] = $friendlyName; $this->options['identity'] = $identity; $this->options['deploymentSid'] = $deploymentSid; $this->options['enabled'] = $enabled; } /** * Provides a unique and addressable name to be assigned to this Device, to be used in addition to SID, up to 128 characters long. * * @param string $uniqueName A unique, addressable name of this Device. * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. * * @param string $friendlyName A human readable description for this Device. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. * * @param string $identity An identifier of the Device user. * @return $this Fluent Builder */ public function setIdentity(string $identity): self { $this->options['identity'] = $identity; return $this; } /** * Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. * * @param string $deploymentSid The unique SID of the Deployment group. * @return $this Fluent Builder */ public function setDeploymentSid(string $deploymentSid): self { $this->options['deploymentSid'] = $deploymentSid; return $this; } /** * The enabled * * @param bool $enabled The enabled * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.CreateDeviceOptions ' . $options . ']'; } } class ReadDeviceOptions extends Options { /** * @param string $deploymentSid Find all Devices grouped under the specified * Deployment. */ public function __construct(string $deploymentSid = Values::NONE) { $this->options['deploymentSid'] = $deploymentSid; } /** * Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with. * * @param string $deploymentSid Find all Devices grouped under the specified * Deployment. * @return $this Fluent Builder */ public function setDeploymentSid(string $deploymentSid): self { $this->options['deploymentSid'] = $deploymentSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.ReadDeviceOptions ' . $options . ']'; } } class UpdateDeviceOptions extends Options { /** * @param string $friendlyName A human readable description for this Device. * @param string $identity An identifier of the Device user. * @param string $deploymentSid The unique SID of the Deployment group. * @param bool $enabled The enabled */ public function __construct(string $friendlyName = Values::NONE, string $identity = Values::NONE, string $deploymentSid = Values::NONE, bool $enabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['identity'] = $identity; $this->options['deploymentSid'] = $deploymentSid; $this->options['enabled'] = $enabled; } /** * Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. * * @param string $friendlyName A human readable description for this Device. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. * * @param string $identity An identifier of the Device user. * @return $this Fluent Builder */ public function setIdentity(string $identity): self { $this->options['identity'] = $identity; return $this; } /** * Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. * * @param string $deploymentSid The unique SID of the Deployment group. * @return $this Fluent Builder */ public function setDeploymentSid(string $deploymentSid): self { $this->options['deploymentSid'] = $deploymentSid; return $this; } /** * The enabled * * @param bool $enabled The enabled * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.DeployedDevices.UpdateDeviceOptions ' . $options . ']'; } }PKt[n9Twilio/Rest/Preview/DeployedDevices/Fleet/KeyInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'fleetSid' => Values::array_get($payload, 'fleet_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'deviceSid' => Values::array_get($payload, 'device_sid'), 'secret' => Values::array_get($payload, 'secret'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['fleetSid' => $fleetSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return KeyContext Context for this KeyInstance */ protected function proxy(): KeyContext { if (!$this->context) { $this->context = new KeyContext( $this->version, $this->solution['fleetSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the KeyInstance * * @return KeyInstance Fetched KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): KeyInstance { return $this->proxy()->fetch(); } /** * Delete the KeyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the KeyInstance * * @param array|Options $options Optional Arguments * @return KeyInstance Updated KeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): KeyInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.DeployedDevices.KeyInstance ' . \implode(' ', $context) . ']'; } }PKt[Y=Twilio/Rest/Preview/DeployedDevices/Fleet/CertificatePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CertificateInstance \Twilio\Rest\Preview\DeployedDevices\Fleet\CertificateInstance */ public function buildInstance(array $payload): CertificateInstance { return new CertificateInstance($this->version, $payload, $this->solution['fleetSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices.CertificatePage]'; } }PKt[$xn5Twilio/Rest/Preview/DeployedDevices/Fleet/KeyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return KeyInstance \Twilio\Rest\Preview\DeployedDevices\Fleet\KeyInstance */ public function buildInstance(array $payload): KeyInstance { return new KeyInstance($this->version, $payload, $this->solution['fleetSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices.KeyPage]'; } }PKt[&&ATwilio/Rest/Preview/DeployedDevices/Fleet/CertificateInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'fleetSid' => Values::array_get($payload, 'fleet_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'deviceSid' => Values::array_get($payload, 'device_sid'), 'thumbprint' => Values::array_get($payload, 'thumbprint'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['fleetSid' => $fleetSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CertificateContext Context for this CertificateInstance */ protected function proxy(): CertificateContext { if (!$this->context) { $this->context = new CertificateContext( $this->version, $this->solution['fleetSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CertificateInstance * * @return CertificateInstance Fetched CertificateInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CertificateInstance { return $this->proxy()->fetch(); } /** * Delete the CertificateInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the CertificateInstance * * @param array|Options $options Optional Arguments * @return CertificateInstance Updated CertificateInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CertificateInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.DeployedDevices.CertificateInstance ' . \implode(' ', $context) . ']'; } }PKt[=8Twilio/Rest/Preview/DeployedDevices/Fleet/DevicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DeviceInstance \Twilio\Rest\Preview\DeployedDevices\Fleet\DeviceInstance */ public function buildInstance(array $payload): DeviceInstance { return new DeviceInstance($this->version, $payload, $this->solution['fleetSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices.DevicePage]'; } }PKt[S @Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateContext.phpnu[solution = ['fleetSid' => $fleetSid, 'sid' => $sid, ]; $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Certificates/' . \rawurlencode($sid) . ''; } /** * Fetch the CertificateInstance * * @return CertificateInstance Fetched CertificateInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CertificateInstance { $payload = $this->version->fetch('GET', $this->uri); return new CertificateInstance( $this->version, $payload, $this->solution['fleetSid'], $this->solution['sid'] ); } /** * Delete the CertificateInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the CertificateInstance * * @param array|Options $options Optional Arguments * @return CertificateInstance Updated CertificateInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CertificateInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DeviceSid' => $options['deviceSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CertificateInstance( $this->version, $payload, $this->solution['fleetSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.DeployedDevices.CertificateContext ' . \implode(' ', $context) . ']'; } }PKt[^3Y1Twilio/Rest/Preview/DeployedDevices/FleetList.phpnu[solution = []; $this->uri = '/Fleets'; } /** * Create the FleetInstance * * @param array|Options $options Optional Arguments * @return FleetInstance Created FleetInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): FleetInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FleetInstance($this->version, $payload); } /** * Streams FleetInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FleetInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FleetInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FleetInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FleetPage Page of FleetInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FleetPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FleetPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FleetInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FleetPage Page of FleetInstance */ public function getPage(string $targetUrl): FleetPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FleetPage($this->version, $response, $this->solution); } /** * Constructs a FleetContext * * @param string $sid A string that uniquely identifies the Fleet. */ public function getContext(string $sid): FleetContext { return new FleetContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices.FleetList]'; } }PKt[! Mbb1Twilio/Rest/Preview/DeployedDevices/FleetPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FleetInstance \Twilio\Rest\Preview\DeployedDevices\FleetInstance */ public function buildInstance(array $payload): FleetInstance { return new FleetInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices.FleetPage]'; } }PKt[s.5Twilio/Rest/Preview/DeployedDevices/FleetInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'defaultDeploymentSid' => Values::array_get($payload, 'default_deployment_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FleetContext Context for this FleetInstance */ protected function proxy(): FleetContext { if (!$this->context) { $this->context = new FleetContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the FleetInstance * * @return FleetInstance Fetched FleetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FleetInstance { return $this->proxy()->fetch(); } /** * Delete the FleetInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the FleetInstance * * @param array|Options $options Optional Arguments * @return FleetInstance Updated FleetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FleetInstance { return $this->proxy()->update($options); } /** * Access the devices */ protected function getDevices(): DeviceList { return $this->proxy()->devices; } /** * Access the deployments */ protected function getDeployments(): DeploymentList { return $this->proxy()->deployments; } /** * Access the certificates */ protected function getCertificates(): CertificateList { return $this->proxy()->certificates; } /** * Access the keys */ protected function getKeys(): KeyList { return $this->proxy()->keys; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.DeployedDevices.FleetInstance ' . \implode(' ', $context) . ']'; } }PKt[g }}4Twilio/Rest/Preview/DeployedDevices/FleetContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Fleets/' . \rawurlencode($sid) . ''; } /** * Fetch the FleetInstance * * @return FleetInstance Fetched FleetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FleetInstance { $payload = $this->version->fetch('GET', $this->uri); return new FleetInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the FleetInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the FleetInstance * * @param array|Options $options Optional Arguments * @return FleetInstance Updated FleetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FleetInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DefaultDeploymentSid' => $options['defaultDeploymentSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FleetInstance($this->version, $payload, $this->solution['sid']); } /** * Access the devices */ protected function getDevices(): DeviceList { if (!$this->_devices) { $this->_devices = new DeviceList($this->version, $this->solution['sid']); } return $this->_devices; } /** * Access the deployments */ protected function getDeployments(): DeploymentList { if (!$this->_deployments) { $this->_deployments = new DeploymentList($this->version, $this->solution['sid']); } return $this->_deployments; } /** * Access the certificates */ protected function getCertificates(): CertificateList { if (!$this->_certificates) { $this->_certificates = new CertificateList($this->version, $this->solution['sid']); } return $this->_certificates; } /** * Access the keys */ protected function getKeys(): KeyList { if (!$this->_keys) { $this->_keys = new KeyList($this->version, $this->solution['sid']); } return $this->_keys; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.DeployedDevices.FleetContext ' . \implode(' ', $context) . ']'; } }PKt[Tz-<Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncMapItemInstance \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemInstance */ public function buildInstance(array $payload): SyncMapItemInstance { return new SyncMapItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncMapItemPage]'; } }PKt[t.hBTwilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncMapPermissionInstance \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionInstance */ public function buildInstance(array $payload): SyncMapPermissionInstance { return new SyncMapPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncMapPermissionPage]'; } }PKt[ WW@Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemInstance.phpnu[properties = [ 'key' => Values::array_get($payload, 'key'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'mapSid' => Values::array_get($payload, 'map_sid'), 'url' => Values::array_get($payload, 'url'), 'revision' => Values::array_get($payload, 'revision'), 'data' => Values::array_get($payload, 'data'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'key' => $key ?: $this->properties['key'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncMapItemContext Context for this SyncMapItemInstance */ protected function proxy(): SyncMapItemContext { if (!$this->context) { $this->context = new SyncMapItemContext( $this->version, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['key'] ); } return $this->context; } /** * Fetch the SyncMapItemInstance * * @return SyncMapItemInstance Fetched SyncMapItemInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapItemInstance { return $this->proxy()->fetch(); } /** * Delete the SyncMapItemInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the SyncMapItemInstance * * @param array $data The data * @param array|Options $options Optional Arguments * @return SyncMapItemInstance Updated SyncMapItemInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $data, array $options = []): SyncMapItemInstance { return $this->proxy()->update($data, $options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncMapItemInstance ' . \implode(' ', $context) . ']'; } }PKt[c^# ETwilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionContext.phpnu[solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'identity' => $identity, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Permissions/' . \rawurlencode($identity) . ''; } /** * Fetch the SyncMapPermissionInstance * * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapPermissionInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncMapPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['identity'] ); } /** * Delete the SyncMapPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the SyncMapPermissionInstance * * @param bool $read Read access. * @param bool $write Write access. * @param bool $manage Manage access. * @return SyncMapPermissionInstance Updated SyncMapPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): SyncMapPermissionInstance { $data = Values::of([ 'Read' => Serialize::booleanToString($read), 'Write' => Serialize::booleanToString($write), 'Manage' => Serialize::booleanToString($manage), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SyncMapPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['identity'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncMapPermissionContext ' . \implode(' ', $context) . ']'; } }PKt[d ?Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemContext.phpnu[solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'key' => $key, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Items/' . \rawurlencode($key) . ''; } /** * Fetch the SyncMapItemInstance * * @return SyncMapItemInstance Fetched SyncMapItemInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapItemInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncMapItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['key'] ); } /** * Delete the SyncMapItemInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the SyncMapItemInstance * * @param array $data The data * @param array|Options $options Optional Arguments * @return SyncMapItemInstance Updated SyncMapItemInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $data, array $options = []): SyncMapItemInstance { $options = new Values($options); $data = Values::of(['Data' => Serialize::jsonObject($data), ]); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new SyncMapItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['key'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncMapItemContext ' . \implode(' ', $context) . ']'; } }PKt[ 1A;;<Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.phpnu[solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Items'; } /** * Create the SyncMapItemInstance * * @param string $key The key * @param array $data The data * @return SyncMapItemInstance Created SyncMapItemInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $key, array $data): SyncMapItemInstance { $data = Values::of(['Key' => $key, 'Data' => Serialize::jsonObject($data), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SyncMapItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid'] ); } /** * Streams SyncMapItemInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncMapItemInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncMapItemInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SyncMapItemInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncMapItemPage Page of SyncMapItemInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncMapItemPage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'From' => $options['from'], 'Bounds' => $options['bounds'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncMapItemPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncMapItemInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncMapItemPage Page of SyncMapItemInstance */ public function getPage(string $targetUrl): SyncMapItemPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncMapItemPage($this->version, $response, $this->solution); } /** * Constructs a SyncMapItemContext * * @param string $key The key */ public function getContext(string $key): SyncMapItemContext { return new SyncMapItemContext( $this->version, $this->solution['serviceSid'], $this->solution['mapSid'], $key ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncMapItemList]'; } }PKt[d\\BTwilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionList.phpnu[solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Permissions'; } /** * Streams SyncMapPermissionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncMapPermissionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncMapPermissionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SyncMapPermissionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncMapPermissionPage Page of SyncMapPermissionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncMapPermissionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncMapPermissionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncMapPermissionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncMapPermissionPage Page of SyncMapPermissionInstance */ public function getPage(string $targetUrl): SyncMapPermissionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncMapPermissionPage($this->version, $response, $this->solution); } /** * Constructs a SyncMapPermissionContext * * @param string $identity Identity of the user to whom the Sync Map Permission * applies. */ public function getContext(string $identity): SyncMapPermissionContext { return new SyncMapPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['mapSid'], $identity ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncMapPermissionList]'; } }PKt[$!!?Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.phpnu[options['ifMatch'] = $ifMatch; } /** * The If-Match HTTP request header * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.DeleteSyncMapItemOptions ' . $options . ']'; } } class ReadSyncMapItemOptions extends Options { /** * @param string $order The order * @param string $from The from * @param string $bounds The bounds */ public function __construct(string $order = Values::NONE, string $from = Values::NONE, string $bounds = Values::NONE) { $this->options['order'] = $order; $this->options['from'] = $from; $this->options['bounds'] = $bounds; } /** * The order * * @param string $order The order * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * The from * * @param string $from The from * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The bounds * * @param string $bounds The bounds * @return $this Fluent Builder */ public function setBounds(string $bounds): self { $this->options['bounds'] = $bounds; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.ReadSyncMapItemOptions ' . $options . ']'; } } class UpdateSyncMapItemOptions extends Options { /** * @param string $ifMatch The If-Match HTTP request header */ public function __construct(string $ifMatch = Values::NONE) { $this->options['ifMatch'] = $ifMatch; } /** * The If-Match HTTP request header * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.UpdateSyncMapItemOptions ' . $options . ']'; } }PKt[KFTwilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'mapSid' => Values::array_get($payload, 'map_sid'), 'identity' => Values::array_get($payload, 'identity'), 'read' => Values::array_get($payload, 'read'), 'write' => Values::array_get($payload, 'write'), 'manage' => Values::array_get($payload, 'manage'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'identity' => $identity ?: $this->properties['identity'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncMapPermissionContext Context for this SyncMapPermissionInstance */ protected function proxy(): SyncMapPermissionContext { if (!$this->context) { $this->context = new SyncMapPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['mapSid'], $this->solution['identity'] ); } return $this->context; } /** * Fetch the SyncMapPermissionInstance * * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapPermissionInstance { return $this->proxy()->fetch(); } /** * Delete the SyncMapPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the SyncMapPermissionInstance * * @param bool $read Read access. * @param bool $write Write access. * @param bool $manage Manage access. * @return SyncMapPermissionInstance Updated SyncMapPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): SyncMapPermissionInstance { return $this->proxy()->update($read, $write, $manage); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncMapPermissionInstance ' . \implode(' ', $context) . ']'; } }PKt[ ! ! 4Twilio/Rest/Preview/Sync/Service/DocumentOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['data'] = $data; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The data * * @param array $data The data * @return $this Fluent Builder */ public function setData(array $data): self { $this->options['data'] = $data; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.CreateDocumentOptions ' . $options . ']'; } } class UpdateDocumentOptions extends Options { /** * @param string $ifMatch The If-Match HTTP request header */ public function __construct(string $ifMatch = Values::NONE) { $this->options['ifMatch'] = $ifMatch; } /** * The If-Match HTTP request header * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.UpdateDocumentOptions ' . $options . ']'; } }PKt[""4Twilio/Rest/Preview/Sync/Service/DocumentContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($sid) . ''; } /** * Fetch the DocumentInstance * * @return DocumentInstance Fetched DocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DocumentInstance { $payload = $this->version->fetch('GET', $this->uri); return new DocumentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the DocumentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the DocumentInstance * * @param array $data The data * @param array|Options $options Optional Arguments * @return DocumentInstance Updated DocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $data, array $options = []): DocumentInstance { $options = new Values($options); $data = Values::of(['Data' => Serialize::jsonObject($data), ]); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new DocumentInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the documentPermissions */ protected function getDocumentPermissions(): DocumentPermissionList { if (!$this->_documentPermissions) { $this->_documentPermissions = new DocumentPermissionList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_documentPermissions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.DocumentContext ' . \implode(' ', $context) . ']'; } }PKt[ Q**3Twilio/Rest/Preview/Sync/Service/SyncMapContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($sid) . ''; } /** * Fetch the SyncMapInstance * * @return SyncMapInstance Fetched SyncMapInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncMapInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the SyncMapInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the syncMapItems */ protected function getSyncMapItems(): SyncMapItemList { if (!$this->_syncMapItems) { $this->_syncMapItems = new SyncMapItemList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_syncMapItems; } /** * Access the syncMapPermissions */ protected function getSyncMapPermissions(): SyncMapPermissionList { if (!$this->_syncMapPermissions) { $this->_syncMapPermissions = new SyncMapPermissionList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_syncMapPermissions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncMapContext ' . \implode(' ', $context) . ']'; } }PKt[u=``1Twilio/Rest/Preview/Sync/Service/DocumentList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents'; } /** * Create the DocumentInstance * * @param array|Options $options Optional Arguments * @return DocumentInstance Created DocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): DocumentInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'Data' => Serialize::jsonObject($options['data']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new DocumentInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams DocumentInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DocumentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DocumentInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DocumentInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DocumentPage Page of DocumentInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DocumentPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DocumentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DocumentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DocumentPage Page of DocumentInstance */ public function getPage(string $targetUrl): DocumentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DocumentPage($this->version, $response, $this->solution); } /** * Constructs a DocumentContext * * @param string $sid The sid */ public function getContext(string $sid): DocumentContext { return new DocumentContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.DocumentList]'; } }PKt[]&DTwilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.phpnu[solution = ['serviceSid' => $serviceSid, 'documentSid' => $documentSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($documentSid) . '/Permissions'; } /** * Streams DocumentPermissionInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DocumentPermissionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DocumentPermissionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DocumentPermissionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DocumentPermissionPage Page of DocumentPermissionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DocumentPermissionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DocumentPermissionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DocumentPermissionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DocumentPermissionPage Page of DocumentPermissionInstance */ public function getPage(string $targetUrl): DocumentPermissionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DocumentPermissionPage($this->version, $response, $this->solution); } /** * Constructs a DocumentPermissionContext * * @param string $identity Identity of the user to whom the Sync Document * Permission applies. */ public function getContext(string $identity): DocumentPermissionContext { return new DocumentPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['documentSid'], $identity ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.DocumentPermissionList]'; } }PKt[]^//GTwilio/Rest/Preview/Sync/Service/Document/DocumentPermissionContext.phpnu[solution = [ 'serviceSid' => $serviceSid, 'documentSid' => $documentSid, 'identity' => $identity, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($documentSid) . '/Permissions/' . \rawurlencode($identity) . ''; } /** * Fetch the DocumentPermissionInstance * * @return DocumentPermissionInstance Fetched DocumentPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DocumentPermissionInstance { $payload = $this->version->fetch('GET', $this->uri); return new DocumentPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['documentSid'], $this->solution['identity'] ); } /** * Delete the DocumentPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the DocumentPermissionInstance * * @param bool $read Read access. * @param bool $write Write access. * @param bool $manage Manage access. * @return DocumentPermissionInstance Updated DocumentPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): DocumentPermissionInstance { $data = Values::of([ 'Read' => Serialize::booleanToString($read), 'Write' => Serialize::booleanToString($write), 'Manage' => Serialize::booleanToString($manage), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DocumentPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['documentSid'], $this->solution['identity'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.DocumentPermissionContext ' . \implode(' ', $context) . ']'; } }PKt[p**DTwilio/Rest/Preview/Sync/Service/Document/DocumentPermissionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DocumentPermissionInstance \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionInstance */ public function buildInstance(array $payload): DocumentPermissionInstance { return new DocumentPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['documentSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.DocumentPermissionPage]'; } }PKt[{HTwilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'documentSid' => Values::array_get($payload, 'document_sid'), 'identity' => Values::array_get($payload, 'identity'), 'read' => Values::array_get($payload, 'read'), 'write' => Values::array_get($payload, 'write'), 'manage' => Values::array_get($payload, 'manage'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'documentSid' => $documentSid, 'identity' => $identity ?: $this->properties['identity'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DocumentPermissionContext Context for this DocumentPermissionInstance */ protected function proxy(): DocumentPermissionContext { if (!$this->context) { $this->context = new DocumentPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['documentSid'], $this->solution['identity'] ); } return $this->context; } /** * Fetch the DocumentPermissionInstance * * @return DocumentPermissionInstance Fetched DocumentPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DocumentPermissionInstance { return $this->proxy()->fetch(); } /** * Delete the DocumentPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the DocumentPermissionInstance * * @param bool $read Read access. * @param bool $write Write access. * @param bool $manage Manage access. * @return DocumentPermissionInstance Updated DocumentPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): DocumentPermissionInstance { return $this->proxy()->update($read, $write, $manage); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.DocumentPermissionInstance ' . \implode(' ', $context) . ']'; } }PKt[ !x1Twilio/Rest/Preview/Sync/Service/SyncListPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncListInstance \Twilio\Rest\Preview\Sync\Service\SyncListInstance */ public function buildInstance(array $payload): SyncListInstance { return new SyncListInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncListPage]'; } }PKt[yi  4Twilio/Rest/Preview/Sync/Service/SyncListOptions.phpnu[options['uniqueName'] = $uniqueName; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.CreateSyncListOptions ' . $options . ']'; } }PKt[4Twilio/Rest/Preview/Sync/Service/SyncMapInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'revision' => Values::array_get($payload, 'revision'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncMapContext Context for this SyncMapInstance */ protected function proxy(): SyncMapContext { if (!$this->context) { $this->context = new SyncMapContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SyncMapInstance * * @return SyncMapInstance Fetched SyncMapInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncMapInstance { return $this->proxy()->fetch(); } /** * Delete the SyncMapInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the syncMapItems */ protected function getSyncMapItems(): SyncMapItemList { return $this->proxy()->syncMapItems; } /** * Access the syncMapPermissions */ protected function getSyncMapPermissions(): SyncMapPermissionList { return $this->proxy()->syncMapPermissions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncMapInstance ' . \implode(' ', $context) . ']'; } }PKt[\E GTwilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.phpnu[solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, 'identity' => $identity, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Permissions/' . \rawurlencode($identity) . ''; } /** * Fetch the SyncListPermissionInstance * * @return SyncListPermissionInstance Fetched SyncListPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListPermissionInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncListPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['identity'] ); } /** * Delete the SyncListPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the SyncListPermissionInstance * * @param bool $read Read access. * @param bool $write Write access. * @param bool $manage Manage access. * @return SyncListPermissionInstance Updated SyncListPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): SyncListPermissionInstance { $data = Values::of([ 'Read' => Serialize::booleanToString($read), 'Write' => Serialize::booleanToString($write), 'Manage' => Serialize::booleanToString($manage), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SyncListPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['identity'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncListPermissionContext ' . \implode(' ', $context) . ']'; } }PKt[*&&DTwilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncListPermissionInstance \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionInstance */ public function buildInstance(array $payload): SyncListPermissionInstance { return new SyncListPermissionInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncListPermissionPage]'; } }PKt[DTwilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionList.phpnu[solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Permissions'; } /** * Streams SyncListPermissionInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncListPermissionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncListPermissionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SyncListPermissionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncListPermissionPage Page of SyncListPermissionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncListPermissionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncListPermissionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncListPermissionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncListPermissionPage Page of SyncListPermissionInstance */ public function getPage(string $targetUrl): SyncListPermissionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncListPermissionPage($this->version, $response, $this->solution); } /** * Constructs a SyncListPermissionContext * * @param string $identity Identity of the user to whom the Sync List * Permission applies. */ public function getContext(string $identity): SyncListPermissionContext { return new SyncListPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['listSid'], $identity ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncListPermissionList]'; } }PKt[N ATwilio/Rest/Preview/Sync/Service/SyncList/SyncListItemContext.phpnu[solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, 'index' => $index, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Items/' . \rawurlencode($index) . ''; } /** * Fetch the SyncListItemInstance * * @return SyncListItemInstance Fetched SyncListItemInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListItemInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncListItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['index'] ); } /** * Delete the SyncListItemInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the SyncListItemInstance * * @param array $data The data * @param array|Options $options Optional Arguments * @return SyncListItemInstance Updated SyncListItemInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $data, array $options = []): SyncListItemInstance { $options = new Values($options); $data = Values::of(['Data' => Serialize::jsonObject($data), ]); $headers = Values::of(['If-Match' => $options['ifMatch'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new SyncListItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['index'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncListItemContext ' . \implode(' ', $context) . ']'; } }PKt[YD22ATwilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.phpnu[options['ifMatch'] = $ifMatch; } /** * The If-Match HTTP request header * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.DeleteSyncListItemOptions ' . $options . ']'; } } class ReadSyncListItemOptions extends Options { /** * @param string $order The order * @param string $from The from * @param string $bounds The bounds */ public function __construct(string $order = Values::NONE, string $from = Values::NONE, string $bounds = Values::NONE) { $this->options['order'] = $order; $this->options['from'] = $from; $this->options['bounds'] = $bounds; } /** * The order * * @param string $order The order * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * The from * * @param string $from The from * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The bounds * * @param string $bounds The bounds * @return $this Fluent Builder */ public function setBounds(string $bounds): self { $this->options['bounds'] = $bounds; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.ReadSyncListItemOptions ' . $options . ']'; } } class UpdateSyncListItemOptions extends Options { /** * @param string $ifMatch The If-Match HTTP request header */ public function __construct(string $ifMatch = Values::NONE) { $this->options['ifMatch'] = $ifMatch; } /** * The If-Match HTTP request header * * @param string $ifMatch The If-Match HTTP request header * @return $this Fluent Builder */ public function setIfMatch(string $ifMatch): self { $this->options['ifMatch'] = $ifMatch; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.UpdateSyncListItemOptions ' . $options . ']'; } }PKt[5R!!>Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.phpnu[solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Items'; } /** * Create the SyncListItemInstance * * @param array $data The data * @return SyncListItemInstance Created SyncListItemInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $data): SyncListItemInstance { $data = Values::of(['Data' => Serialize::jsonObject($data), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SyncListItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'] ); } /** * Streams SyncListItemInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncListItemInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncListItemInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SyncListItemInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncListItemPage Page of SyncListItemInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncListItemPage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'From' => $options['from'], 'Bounds' => $options['bounds'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncListItemPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncListItemInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncListItemPage Page of SyncListItemInstance */ public function getPage(string $targetUrl): SyncListItemPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncListItemPage($this->version, $response, $this->solution); } /** * Constructs a SyncListItemContext * * @param int $index The index */ public function getContext(int $index): SyncListItemContext { return new SyncListItemContext( $this->version, $this->solution['serviceSid'], $this->solution['listSid'], $index ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncListItemList]'; } }PKt[Q4>Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncListItemInstance \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemInstance */ public function buildInstance(array $payload): SyncListItemInstance { return new SyncListItemInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncListItemPage]'; } }PKt[1HTwilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'listSid' => Values::array_get($payload, 'list_sid'), 'identity' => Values::array_get($payload, 'identity'), 'read' => Values::array_get($payload, 'read'), 'write' => Values::array_get($payload, 'write'), 'manage' => Values::array_get($payload, 'manage'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'listSid' => $listSid, 'identity' => $identity ?: $this->properties['identity'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncListPermissionContext Context for this SyncListPermissionInstance */ protected function proxy(): SyncListPermissionContext { if (!$this->context) { $this->context = new SyncListPermissionContext( $this->version, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['identity'] ); } return $this->context; } /** * Fetch the SyncListPermissionInstance * * @return SyncListPermissionInstance Fetched SyncListPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListPermissionInstance { return $this->proxy()->fetch(); } /** * Delete the SyncListPermissionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the SyncListPermissionInstance * * @param bool $read Read access. * @param bool $write Write access. * @param bool $manage Manage access. * @return SyncListPermissionInstance Updated SyncListPermissionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $read, bool $write, bool $manage): SyncListPermissionInstance { return $this->proxy()->update($read, $write, $manage); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncListPermissionInstance ' . \implode(' ', $context) . ']'; } }PKt[B||BTwilio/Rest/Preview/Sync/Service/SyncList/SyncListItemInstance.phpnu[properties = [ 'index' => Values::array_get($payload, 'index'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'listSid' => Values::array_get($payload, 'list_sid'), 'url' => Values::array_get($payload, 'url'), 'revision' => Values::array_get($payload, 'revision'), 'data' => Values::array_get($payload, 'data'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'listSid' => $listSid, 'index' => $index ?: $this->properties['index'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncListItemContext Context for this SyncListItemInstance */ protected function proxy(): SyncListItemContext { if (!$this->context) { $this->context = new SyncListItemContext( $this->version, $this->solution['serviceSid'], $this->solution['listSid'], $this->solution['index'] ); } return $this->context; } /** * Fetch the SyncListItemInstance * * @return SyncListItemInstance Fetched SyncListItemInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListItemInstance { return $this->proxy()->fetch(); } /** * Delete the SyncListItemInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the SyncListItemInstance * * @param array $data The data * @param array|Options $options Optional Arguments * @return SyncListItemInstance Updated SyncListItemInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $data, array $options = []): SyncListItemInstance { return $this->proxy()->update($data, $options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncListItemInstance ' . \implode(' ', $context) . ']'; } }PKt[`N0Twilio/Rest/Preview/Sync/Service/SyncMapList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps'; } /** * Create the SyncMapInstance * * @param array|Options $options Optional Arguments * @return SyncMapInstance Created SyncMapInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): SyncMapInstance { $options = new Values($options); $data = Values::of(['UniqueName' => $options['uniqueName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SyncMapInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams SyncMapInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncMapInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncMapInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SyncMapInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncMapPage Page of SyncMapInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncMapPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncMapPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncMapInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncMapPage Page of SyncMapInstance */ public function getPage(string $targetUrl): SyncMapPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncMapPage($this->version, $response, $this->solution); } /** * Constructs a SyncMapContext * * @param string $sid The sid */ public function getContext(string $sid): SyncMapContext { return new SyncMapContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncMapList]'; } }PKt[05Twilio/Rest/Preview/Sync/Service/DocumentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'revision' => Values::array_get($payload, 'revision'), 'data' => Values::array_get($payload, 'data'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DocumentContext Context for this DocumentInstance */ protected function proxy(): DocumentContext { if (!$this->context) { $this->context = new DocumentContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DocumentInstance * * @return DocumentInstance Fetched DocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DocumentInstance { return $this->proxy()->fetch(); } /** * Delete the DocumentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the DocumentInstance * * @param array $data The data * @param array|Options $options Optional Arguments * @return DocumentInstance Updated DocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $data, array $options = []): DocumentInstance { return $this->proxy()->update($data, $options); } /** * Access the documentPermissions */ protected function getDocumentPermissions(): DocumentPermissionList { return $this->proxy()->documentPermissions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.DocumentInstance ' . \implode(' ', $context) . ']'; } }PKt[톺V1Twilio/Rest/Preview/Sync/Service/DocumentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DocumentInstance \Twilio\Rest\Preview\Sync\Service\DocumentInstance */ public function buildInstance(array $payload): DocumentInstance { return new DocumentInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.DocumentPage]'; } }PKt[zQ5Twilio/Rest/Preview/Sync/Service/SyncListInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'revision' => Values::array_get($payload, 'revision'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SyncListContext Context for this SyncListInstance */ protected function proxy(): SyncListContext { if (!$this->context) { $this->context = new SyncListContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SyncListInstance * * @return SyncListInstance Fetched SyncListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListInstance { return $this->proxy()->fetch(); } /** * Delete the SyncListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the syncListItems */ protected function getSyncListItems(): SyncListItemList { return $this->proxy()->syncListItems; } /** * Access the syncListPermissions */ protected function getSyncListPermissions(): SyncListPermissionList { return $this->proxy()->syncListPermissions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncListInstance ' . \implode(' ', $context) . ']'; } }PKt[1Twilio/Rest/Preview/Sync/Service/SyncListList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists'; } /** * Create the SyncListInstance * * @param array|Options $options Optional Arguments * @return SyncListInstance Created SyncListInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): SyncListInstance { $options = new Values($options); $data = Values::of(['UniqueName' => $options['uniqueName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SyncListInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams SyncListInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SyncListInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SyncListInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SyncListInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SyncListPage Page of SyncListInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SyncListPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SyncListPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SyncListInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SyncListPage Page of SyncListInstance */ public function getPage(string $targetUrl): SyncListPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SyncListPage($this->version, $response, $this->solution); } /** * Constructs a SyncListContext * * @param string $sid The sid */ public function getContext(string $sid): SyncListContext { return new SyncListContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncListList]'; } }PKt[H||0Twilio/Rest/Preview/Sync/Service/SyncMapPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SyncMapInstance \Twilio\Rest\Preview\Sync\Service\SyncMapInstance */ public function buildInstance(array $payload): SyncMapInstance { return new SyncMapInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.SyncMapPage]'; } }PKt['QQ4Twilio/Rest/Preview/Sync/Service/SyncListContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($sid) . ''; } /** * Fetch the SyncListInstance * * @return SyncListInstance Fetched SyncListInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SyncListInstance { $payload = $this->version->fetch('GET', $this->uri); return new SyncListInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the SyncListInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the syncListItems */ protected function getSyncListItems(): SyncListItemList { if (!$this->_syncListItems) { $this->_syncListItems = new SyncListItemList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_syncListItems; } /** * Access the syncListPermissions */ protected function getSyncListPermissions(): SyncListPermissionList { if (!$this->_syncListPermissions) { $this->_syncListPermissions = new SyncListPermissionList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_syncListPermissions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.SyncListContext ' . \implode(' ', $context) . ']'; } }PKt[RG3Twilio/Rest/Preview/Sync/Service/SyncMapOptions.phpnu[options['uniqueName'] = $uniqueName; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.CreateSyncMapOptions ' . $options . ']'; } }PKt[N,Twilio/Rest/Preview/Sync/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'webhookUrl' => Values::array_get($payload, 'webhook_url'), 'reachabilityWebhooksEnabled' => Values::array_get($payload, 'reachability_webhooks_enabled'), 'aclEnabled' => Values::array_get($payload, 'acl_enabled'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Access the documents */ protected function getDocuments(): DocumentList { return $this->proxy()->documents; } /** * Access the syncLists */ protected function getSyncLists(): SyncListList { return $this->proxy()->syncLists; } /** * Access the syncMaps */ protected function getSyncMaps(): SyncMapList { return $this->proxy()->syncMaps; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[g9..(Twilio/Rest/Preview/Sync/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Create the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'WebhookUrl' => $options['webhookUrl'], 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']), 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Constructs a ServiceContext * * @param string $sid The sid */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.ServiceList]'; } }PKt[0>+Twilio/Rest/Preview/Sync/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'WebhookUrl' => $options['webhookUrl'], 'FriendlyName' => $options['friendlyName'], 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']), 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the documents */ protected function getDocuments(): DocumentList { if (!$this->_documents) { $this->_documents = new DocumentList($this->version, $this->solution['sid']); } return $this->_documents; } /** * Access the syncLists */ protected function getSyncLists(): SyncListList { if (!$this->_syncLists) { $this->_syncLists = new SyncListList($this->version, $this->solution['sid']); } return $this->_syncLists; } /** * Access the syncMaps */ protected function getSyncMaps(): SyncMapList { if (!$this->_syncMaps) { $this->_syncMaps = new SyncMapList($this->version, $this->solution['sid']); } return $this->_syncMaps; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Sync.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[ Ikk+Twilio/Rest/Preview/Sync/ServiceOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['webhookUrl'] = $webhookUrl; $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; $this->options['aclEnabled'] = $aclEnabled; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The webhook_url * * @param string $webhookUrl The webhook_url * @return $this Fluent Builder */ public function setWebhookUrl(string $webhookUrl): self { $this->options['webhookUrl'] = $webhookUrl; return $this; } /** * The reachability_webhooks_enabled * * @param bool $reachabilityWebhooksEnabled The reachability_webhooks_enabled * @return $this Fluent Builder */ public function setReachabilityWebhooksEnabled(bool $reachabilityWebhooksEnabled): self { $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; return $this; } /** * The acl_enabled * * @param bool $aclEnabled The acl_enabled * @return $this Fluent Builder */ public function setAclEnabled(bool $aclEnabled): self { $this->options['aclEnabled'] = $aclEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.CreateServiceOptions ' . $options . ']'; } } class UpdateServiceOptions extends Options { /** * @param string $webhookUrl The webhook_url * @param string $friendlyName The friendly_name * @param bool $reachabilityWebhooksEnabled The reachability_webhooks_enabled * @param bool $aclEnabled The acl_enabled */ public function __construct(string $webhookUrl = Values::NONE, string $friendlyName = Values::NONE, bool $reachabilityWebhooksEnabled = Values::NONE, bool $aclEnabled = Values::NONE) { $this->options['webhookUrl'] = $webhookUrl; $this->options['friendlyName'] = $friendlyName; $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; $this->options['aclEnabled'] = $aclEnabled; } /** * The webhook_url * * @param string $webhookUrl The webhook_url * @return $this Fluent Builder */ public function setWebhookUrl(string $webhookUrl): self { $this->options['webhookUrl'] = $webhookUrl; return $this; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The reachability_webhooks_enabled * * @param bool $reachabilityWebhooksEnabled The reachability_webhooks_enabled * @return $this Fluent Builder */ public function setReachabilityWebhooksEnabled(bool $reachabilityWebhooksEnabled): self { $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; return $this; } /** * The acl_enabled * * @param bool $aclEnabled The acl_enabled * @return $this Fluent Builder */ public function setAclEnabled(bool $aclEnabled): self { $this->options['aclEnabled'] = $aclEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Sync.UpdateServiceOptions ' . $options . ']'; } }PKt[PJMM(Twilio/Rest/Preview/Sync/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\Preview\Sync\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync.ServicePage]'; } }PKt[Twilio/Rest/Preview/Sync.phpnu[version = 'Sync'; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Sync]'; } }PKt[ YRTwilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'installedAddOnSid' => Values::array_get($payload, 'installed_add_on_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'productName' => Values::array_get($payload, 'product_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'enabled' => Values::array_get($payload, 'enabled'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'installedAddOnSid' => $installedAddOnSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InstalledAddOnExtensionContext Context for this * InstalledAddOnExtensionInstance */ protected function proxy(): InstalledAddOnExtensionContext { if (!$this->context) { $this->context = new InstalledAddOnExtensionContext( $this->version, $this->solution['installedAddOnSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the InstalledAddOnExtensionInstance * * @return InstalledAddOnExtensionInstance Fetched * InstalledAddOnExtensionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InstalledAddOnExtensionInstance { return $this->proxy()->fetch(); } /** * Update the InstalledAddOnExtensionInstance * * @param bool $enabled Whether the Extension should be invoked * @return InstalledAddOnExtensionInstance Updated * InstalledAddOnExtensionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $enabled): InstalledAddOnExtensionInstance { return $this->proxy()->update($enabled); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionInstance ' . \implode(' ', $context) . ']'; } }PKt[j@44NTwilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InstalledAddOnExtensionInstance \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionInstance */ public function buildInstance(array $payload): InstalledAddOnExtensionInstance { return new InstalledAddOnExtensionInstance( $this->version, $payload, $this->solution['installedAddOnSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionPage]'; } }PKt[6NTwilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionList.phpnu[solution = ['installedAddOnSid' => $installedAddOnSid, ]; $this->uri = '/InstalledAddOns/' . \rawurlencode($installedAddOnSid) . '/Extensions'; } /** * Streams InstalledAddOnExtensionInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InstalledAddOnExtensionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InstalledAddOnExtensionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of InstalledAddOnExtensionInstance records from the * API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InstalledAddOnExtensionPage Page of InstalledAddOnExtensionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InstalledAddOnExtensionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new InstalledAddOnExtensionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InstalledAddOnExtensionInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InstalledAddOnExtensionPage Page of InstalledAddOnExtensionInstance */ public function getPage(string $targetUrl): InstalledAddOnExtensionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InstalledAddOnExtensionPage($this->version, $response, $this->solution); } /** * Constructs a InstalledAddOnExtensionContext * * @param string $sid The SID of the InstalledAddOn Extension resource to fetch */ public function getContext(string $sid): InstalledAddOnExtensionContext { return new InstalledAddOnExtensionContext( $this->version, $this->solution['installedAddOnSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionList]'; } }PKt[(y  QTwilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.phpnu[solution = ['installedAddOnSid' => $installedAddOnSid, 'sid' => $sid, ]; $this->uri = '/InstalledAddOns/' . \rawurlencode($installedAddOnSid) . '/Extensions/' . \rawurlencode($sid) . ''; } /** * Fetch the InstalledAddOnExtensionInstance * * @return InstalledAddOnExtensionInstance Fetched * InstalledAddOnExtensionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InstalledAddOnExtensionInstance { $payload = $this->version->fetch('GET', $this->uri); return new InstalledAddOnExtensionInstance( $this->version, $payload, $this->solution['installedAddOnSid'], $this->solution['sid'] ); } /** * Update the InstalledAddOnExtensionInstance * * @param bool $enabled Whether the Extension should be invoked * @return InstalledAddOnExtensionInstance Updated * InstalledAddOnExtensionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(bool $enabled): InstalledAddOnExtensionInstance { $data = Values::of(['Enabled' => Serialize::booleanToString($enabled), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new InstalledAddOnExtensionInstance( $this->version, $payload, $this->solution['installedAddOnSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionContext ' . \implode(' ', $context) . ']'; } }PKt[I|6Twilio/Rest/Preview/Marketplace/InstalledAddOnPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InstalledAddOnInstance \Twilio\Rest\Preview\Marketplace\InstalledAddOnInstance */ public function buildInstance(array $payload): InstalledAddOnInstance { return new InstalledAddOnInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Marketplace.InstalledAddOnPage]'; } }PKt[Z9Twilio/Rest/Preview/Marketplace/InstalledAddOnContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/InstalledAddOns/' . \rawurlencode($sid) . ''; } /** * Delete the InstalledAddOnInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the InstalledAddOnInstance * * @return InstalledAddOnInstance Fetched InstalledAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InstalledAddOnInstance { $payload = $this->version->fetch('GET', $this->uri); return new InstalledAddOnInstance($this->version, $payload, $this->solution['sid']); } /** * Update the InstalledAddOnInstance * * @param array|Options $options Optional Arguments * @return InstalledAddOnInstance Updated InstalledAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): InstalledAddOnInstance { $options = new Values($options); $data = Values::of([ 'Configuration' => Serialize::jsonObject($options['configuration']), 'UniqueName' => $options['uniqueName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new InstalledAddOnInstance($this->version, $payload, $this->solution['sid']); } /** * Access the extensions */ protected function getExtensions(): InstalledAddOnExtensionList { if (!$this->_extensions) { $this->_extensions = new InstalledAddOnExtensionList($this->version, $this->solution['sid']); } return $this->_extensions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Marketplace.InstalledAddOnContext ' . \implode(' ', $context) . ']'; } }PKt[% -6Twilio/Rest/Preview/Marketplace/InstalledAddOnList.phpnu[solution = []; $this->uri = '/InstalledAddOns'; } /** * Create the InstalledAddOnInstance * * @param string $availableAddOnSid The SID of the AvaliableAddOn to install * @param bool $acceptTermsOfService Whether the Terms of Service were accepted * @param array|Options $options Optional Arguments * @return InstalledAddOnInstance Created InstalledAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $availableAddOnSid, bool $acceptTermsOfService, array $options = []): InstalledAddOnInstance { $options = new Values($options); $data = Values::of([ 'AvailableAddOnSid' => $availableAddOnSid, 'AcceptTermsOfService' => Serialize::booleanToString($acceptTermsOfService), 'Configuration' => Serialize::jsonObject($options['configuration']), 'UniqueName' => $options['uniqueName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new InstalledAddOnInstance($this->version, $payload); } /** * Streams InstalledAddOnInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InstalledAddOnInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InstalledAddOnInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of InstalledAddOnInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InstalledAddOnPage Page of InstalledAddOnInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InstalledAddOnPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new InstalledAddOnPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InstalledAddOnInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InstalledAddOnPage Page of InstalledAddOnInstance */ public function getPage(string $targetUrl): InstalledAddOnPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InstalledAddOnPage($this->version, $response, $this->solution); } /** * Constructs a InstalledAddOnContext * * @param string $sid The SID of the InstalledAddOn resource to fetch */ public function getContext(string $sid): InstalledAddOnContext { return new InstalledAddOnContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Marketplace.InstalledAddOnList]'; } }PKt[`ohh6Twilio/Rest/Preview/Marketplace/AvailableAddOnList.phpnu[solution = []; $this->uri = '/AvailableAddOns'; } /** * Streams AvailableAddOnInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AvailableAddOnInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AvailableAddOnInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AvailableAddOnInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AvailableAddOnPage Page of AvailableAddOnInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AvailableAddOnPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AvailableAddOnPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AvailableAddOnInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AvailableAddOnPage Page of AvailableAddOnInstance */ public function getPage(string $targetUrl): AvailableAddOnPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AvailableAddOnPage($this->version, $response, $this->solution); } /** * Constructs a AvailableAddOnContext * * @param string $sid The SID of the AvailableAddOn resource to fetch */ public function getContext(string $sid): AvailableAddOnContext { return new AvailableAddOnContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Marketplace.AvailableAddOnList]'; } }PKt[{-:Twilio/Rest/Preview/Marketplace/AvailableAddOnInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'description' => Values::array_get($payload, 'description'), 'pricingType' => Values::array_get($payload, 'pricing_type'), 'configurationSchema' => Values::array_get($payload, 'configuration_schema'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AvailableAddOnContext Context for this AvailableAddOnInstance */ protected function proxy(): AvailableAddOnContext { if (!$this->context) { $this->context = new AvailableAddOnContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the AvailableAddOnInstance * * @return AvailableAddOnInstance Fetched AvailableAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AvailableAddOnInstance { return $this->proxy()->fetch(); } /** * Access the extensions */ protected function getExtensions(): AvailableAddOnExtensionList { return $this->proxy()->extensions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Marketplace.AvailableAddOnInstance ' . \implode(' ', $context) . ']'; } }PKt[4wD6Twilio/Rest/Preview/Marketplace/AvailableAddOnPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AvailableAddOnInstance \Twilio\Rest\Preview\Marketplace\AvailableAddOnInstance */ public function buildInstance(array $payload): AvailableAddOnInstance { return new AvailableAddOnInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Marketplace.AvailableAddOnPage]'; } }PKt[J0 9Twilio/Rest/Preview/Marketplace/AvailableAddOnContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/AvailableAddOns/' . \rawurlencode($sid) . ''; } /** * Fetch the AvailableAddOnInstance * * @return AvailableAddOnInstance Fetched AvailableAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AvailableAddOnInstance { $payload = $this->version->fetch('GET', $this->uri); return new AvailableAddOnInstance($this->version, $payload, $this->solution['sid']); } /** * Access the extensions */ protected function getExtensions(): AvailableAddOnExtensionList { if (!$this->_extensions) { $this->_extensions = new AvailableAddOnExtensionList($this->version, $this->solution['sid']); } return $this->_extensions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Marketplace.AvailableAddOnContext ' . \implode(' ', $context) . ']'; } }PKt[ NTwilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionList.phpnu[solution = ['availableAddOnSid' => $availableAddOnSid, ]; $this->uri = '/AvailableAddOns/' . \rawurlencode($availableAddOnSid) . '/Extensions'; } /** * Streams AvailableAddOnExtensionInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AvailableAddOnExtensionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AvailableAddOnExtensionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AvailableAddOnExtensionInstance records from the * API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AvailableAddOnExtensionPage Page of AvailableAddOnExtensionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AvailableAddOnExtensionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AvailableAddOnExtensionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AvailableAddOnExtensionInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AvailableAddOnExtensionPage Page of AvailableAddOnExtensionInstance */ public function getPage(string $targetUrl): AvailableAddOnExtensionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AvailableAddOnExtensionPage($this->version, $response, $this->solution); } /** * Constructs a AvailableAddOnExtensionContext * * @param string $sid The SID of the AvailableAddOn Extension resource to fetch */ public function getContext(string $sid): AvailableAddOnExtensionContext { return new AvailableAddOnExtensionContext( $this->version, $this->solution['availableAddOnSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionList]'; } }PKt[7UQTwilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionContext.phpnu[solution = ['availableAddOnSid' => $availableAddOnSid, 'sid' => $sid, ]; $this->uri = '/AvailableAddOns/' . \rawurlencode($availableAddOnSid) . '/Extensions/' . \rawurlencode($sid) . ''; } /** * Fetch the AvailableAddOnExtensionInstance * * @return AvailableAddOnExtensionInstance Fetched * AvailableAddOnExtensionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AvailableAddOnExtensionInstance { $payload = $this->version->fetch('GET', $this->uri); return new AvailableAddOnExtensionInstance( $this->version, $payload, $this->solution['availableAddOnSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionContext ' . \implode(' ', $context) . ']'; } }PKt[144NTwilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AvailableAddOnExtensionInstance \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionInstance */ public function buildInstance(array $payload): AvailableAddOnExtensionInstance { return new AvailableAddOnExtensionInstance( $this->version, $payload, $this->solution['availableAddOnSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionPage]'; } }PKt[їRTwilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'availableAddOnSid' => Values::array_get($payload, 'available_add_on_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'productName' => Values::array_get($payload, 'product_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'availableAddOnSid' => $availableAddOnSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AvailableAddOnExtensionContext Context for this * AvailableAddOnExtensionInstance */ protected function proxy(): AvailableAddOnExtensionContext { if (!$this->context) { $this->context = new AvailableAddOnExtensionContext( $this->version, $this->solution['availableAddOnSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AvailableAddOnExtensionInstance * * @return AvailableAddOnExtensionInstance Fetched * AvailableAddOnExtensionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AvailableAddOnExtensionInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionInstance ' . \implode(' ', $context) . ']'; } }PKt[8ZZ9Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.phpnu[options['configuration'] = $configuration; $this->options['uniqueName'] = $uniqueName; } /** * The JSON object that represents the configuration of the new Add-on being installed. * * @param array $configuration The JSON object representing the configuration * @return $this Fluent Builder */ public function setConfiguration(array $configuration): self { $this->options['configuration'] = $configuration; return $this; } /** * An application-defined string that uniquely identifies the resource. This value must be unique within the Account. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Marketplace.CreateInstalledAddOnOptions ' . $options . ']'; } } class UpdateInstalledAddOnOptions extends Options { /** * @param array $configuration The JSON object representing the configuration * @param string $uniqueName An application-defined string that uniquely * identifies the resource */ public function __construct(array $configuration = Values::ARRAY_NONE, string $uniqueName = Values::NONE) { $this->options['configuration'] = $configuration; $this->options['uniqueName'] = $uniqueName; } /** * Valid JSON object that conform to the configuration schema exposed by the associated AvailableAddOn resource. This is only required by Add-ons that need to be configured * * @param array $configuration The JSON object representing the configuration * @return $this Fluent Builder */ public function setConfiguration(array $configuration): self { $this->options['configuration'] = $configuration; return $this; } /** * An application-defined string that uniquely identifies the resource. This value must be unique within the Account. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Marketplace.UpdateInstalledAddOnOptions ' . $options . ']'; } }PKt[hsQ:Twilio/Rest/Preview/Marketplace/InstalledAddOnInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'description' => Values::array_get($payload, 'description'), 'configuration' => Values::array_get($payload, 'configuration'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InstalledAddOnContext Context for this InstalledAddOnInstance */ protected function proxy(): InstalledAddOnContext { if (!$this->context) { $this->context = new InstalledAddOnContext($this->version, $this->solution['sid']); } return $this->context; } /** * Delete the InstalledAddOnInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the InstalledAddOnInstance * * @return InstalledAddOnInstance Fetched InstalledAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InstalledAddOnInstance { return $this->proxy()->fetch(); } /** * Update the InstalledAddOnInstance * * @param array|Options $options Optional Arguments * @return InstalledAddOnInstance Updated InstalledAddOnInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): InstalledAddOnInstance { return $this->proxy()->update($options); } /** * Access the extensions */ protected function getExtensions(): InstalledAddOnExtensionList { return $this->proxy()->extensions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Marketplace.InstalledAddOnInstance ' . \implode(' ', $context) . ']'; } }PKt["Twilio/Rest/Preview/Understand.phpnu[version = 'understand'; } protected function getAssistants(): AssistantList { if (!$this->_assistants) { $this->_assistants = new AssistantList($this); } return $this->_assistants; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand]'; } }PKt[}NaaKTwilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsList.phpnu[solution = ['assistantSid' => $assistantSid, ]; } /** * Constructs a AssistantInitiationActionsContext */ public function getContext(): AssistantInitiationActionsContext { return new AssistantInitiationActionsContext($this->version, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.AssistantInitiationActionsList]'; } }PKt[4LTwilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsOptions.phpnu[options['fallbackActions'] = $fallbackActions; } /** * The fallback_actions * * @param array $fallbackActions The fallback_actions * @return $this Fluent Builder */ public function setFallbackActions(array $fallbackActions): self { $this->options['fallbackActions'] = $fallbackActions; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.UpdateAssistantFallbackActionsOptions ' . $options . ']'; } }PKt[+y {MM>Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.phpnu[options['statusCallback'] = $statusCallback; $this->options['uniqueName'] = $uniqueName; } /** * The status_callback * * @param string $statusCallback The status_callback * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 * * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. For example: v0.1 * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.CreateModelBuildOptions ' . $options . ']'; } } class UpdateModelBuildOptions extends Options { /** * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. For example: v0.1 */ public function __construct(string $uniqueName = Values::NONE) { $this->options['uniqueName'] = $uniqueName; } /** * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 * * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. For example: v0.1 * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.UpdateModelBuildOptions ' . $options . ']'; } }PKt[s>Twilio/Rest/Preview/Understand/Assistant/FieldTypeInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'links' => Values::array_get($payload, 'links'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FieldTypeContext Context for this FieldTypeInstance */ protected function proxy(): FieldTypeContext { if (!$this->context) { $this->context = new FieldTypeContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FieldTypeInstance * * @return FieldTypeInstance Fetched FieldTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldTypeInstance { return $this->proxy()->fetch(); } /** * Update the FieldTypeInstance * * @param array|Options $options Optional Arguments * @return FieldTypeInstance Updated FieldTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FieldTypeInstance { return $this->proxy()->update($options); } /** * Delete the FieldTypeInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the fieldValues */ protected function getFieldValues(): FieldValueList { return $this->proxy()->fieldValues; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.FieldTypeInstance ' . \implode(' ', $context) . ']'; } }PKt[Ꮝ<Twilio/Rest/Preview/Understand/Assistant/DialogueContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Dialogues/' . \rawurlencode($sid) . ''; } /** * Fetch the DialogueInstance * * @return DialogueInstance Fetched DialogueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DialogueInstance { $payload = $this->version->fetch('GET', $this->uri); return new DialogueInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.DialogueContext ' . \implode(' ', $context) . ']'; } }PKt[aӲ;Twilio/Rest/Preview/Understand/Assistant/StyleSheetList.phpnu[solution = ['assistantSid' => $assistantSid, ]; } /** * Constructs a StyleSheetContext */ public function getContext(): StyleSheetContext { return new StyleSheetContext($this->version, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.StyleSheetList]'; } }PKt[*xaa?Twilio/Rest/Preview/Understand/Assistant/ModelBuildInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), 'buildDuration' => Values::array_get($payload, 'build_duration'), 'errorCode' => Values::array_get($payload, 'error_code'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ModelBuildContext Context for this ModelBuildInstance */ protected function proxy(): ModelBuildContext { if (!$this->context) { $this->context = new ModelBuildContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ModelBuildInstance * * @return ModelBuildInstance Fetched ModelBuildInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ModelBuildInstance { return $this->proxy()->fetch(); } /** * Update the ModelBuildInstance * * @param array|Options $options Optional Arguments * @return ModelBuildInstance Updated ModelBuildInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ModelBuildInstance { return $this->proxy()->update($options); } /** * Delete the ModelBuildInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.ModelBuildInstance ' . \implode(' ', $context) . ']'; } }PKt[%Iy 9Twilio/Rest/Preview/Understand/Assistant/QueryContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Queries/' . \rawurlencode($sid) . ''; } /** * Fetch the QueryInstance * * @return QueryInstance Fetched QueryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): QueryInstance { $payload = $this->version->fetch('GET', $this->uri); return new QueryInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Update the QueryInstance * * @param array|Options $options Optional Arguments * @return QueryInstance Updated QueryInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): QueryInstance { $options = new Values($options); $data = Values::of(['SampleSid' => $options['sampleSid'], 'Status' => $options['status'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new QueryInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Delete the QueryInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.QueryContext ' . \implode(' ', $context) . ']'; } }PKt[ ((ITwilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AssistantFallbackActionsInstance \Twilio\Rest\Preview\Understand\Assistant\AssistantFallbackActionsInstance */ public function buildInstance(array $payload): AssistantFallbackActionsInstance { return new AssistantFallbackActionsInstance( $this->version, $payload, $this->solution['assistantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.AssistantFallbackActionsPage]'; } }PKt[m! >Twilio/Rest/Preview/Understand/Assistant/StyleSheetContext.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/StyleSheet'; } /** * Fetch the StyleSheetInstance * * @return StyleSheetInstance Fetched StyleSheetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): StyleSheetInstance { $payload = $this->version->fetch('GET', $this->uri); return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Update the StyleSheetInstance * * @param array|Options $options Optional Arguments * @return StyleSheetInstance Updated StyleSheetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): StyleSheetInstance { $options = new Values($options); $data = Values::of(['StyleSheet' => Serialize::jsonObject($options['styleSheet']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.StyleSheetContext ' . \implode(' ', $context) . ']'; } }PKt[`j8Twilio/Rest/Preview/Understand/Assistant/TaskContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($sid) . ''; } /** * Fetch the TaskInstance * * @return TaskInstance Fetched TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskInstance { $payload = $this->version->fetch('GET', $this->uri); return new TaskInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Update the TaskInstance * * @param array|Options $options Optional Arguments * @return TaskInstance Updated TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Actions' => Serialize::jsonObject($options['actions']), 'ActionsUrl' => $options['actionsUrl'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TaskInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Delete the TaskInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the fields */ protected function getFields(): FieldList { if (!$this->_fields) { $this->_fields = new FieldList( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->_fields; } /** * Access the samples */ protected function getSamples(): SampleList { if (!$this->_samples) { $this->_samples = new SampleList( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->_samples; } /** * Access the taskActions */ protected function getTaskActions(): TaskActionsList { if (!$this->_taskActions) { $this->_taskActions = new TaskActionsList( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->_taskActions; } /** * Access the statistics */ protected function getStatistics(): TaskStatisticsList { if (!$this->_statistics) { $this->_statistics = new TaskStatisticsList( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->_statistics; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.TaskContext ' . \implode(' ', $context) . ']'; } }PKt[Z DTwilio/Rest/Preview/Understand/Assistant/Task/TaskActionsContext.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Actions'; } /** * Fetch the TaskActionsInstance * * @return TaskActionsInstance Fetched TaskActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskActionsInstance { $payload = $this->version->fetch('GET', $this->uri); return new TaskActionsInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Update the TaskActionsInstance * * @param array|Options $options Optional Arguments * @return TaskActionsInstance Updated TaskActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskActionsInstance { $options = new Values($options); $data = Values::of(['Actions' => Serialize::jsonObject($options['actions']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TaskActionsInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.TaskActionsContext ' . \implode(' ', $context) . ']'; } }PKt[ВnDTwilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskStatisticsInstance \Twilio\Rest\Preview\Understand\Assistant\Task\TaskStatisticsInstance */ public function buildInstance(array $payload): TaskStatisticsInstance { return new TaskStatisticsInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.TaskStatisticsPage]'; } }PKt[ybKK@Twilio/Rest/Preview/Understand/Assistant/Task/SampleInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'taskSid' => Values::array_get($payload, 'task_sid'), 'language' => Values::array_get($payload, 'language'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'taggedText' => Values::array_get($payload, 'tagged_text'), 'url' => Values::array_get($payload, 'url'), 'sourceChannel' => Values::array_get($payload, 'source_channel'), ]; $this->solution = [ 'assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SampleContext Context for this SampleInstance */ protected function proxy(): SampleContext { if (!$this->context) { $this->context = new SampleContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SampleInstance * * @return SampleInstance Fetched SampleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SampleInstance { return $this->proxy()->fetch(); } /** * Update the SampleInstance * * @param array|Options $options Optional Arguments * @return SampleInstance Updated SampleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SampleInstance { return $this->proxy()->update($options); } /** * Delete the SampleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.SampleInstance ' . \implode(' ', $context) . ']'; } }PKt[FdATwilio/Rest/Preview/Understand/Assistant/Task/TaskActionsList.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; } /** * Constructs a TaskActionsContext */ public function getContext(): TaskActionsContext { return new TaskActionsContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.TaskActionsList]'; } }PKt[g_O@$$GTwilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsContext.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Statistics'; } /** * Fetch the TaskStatisticsInstance * * @return TaskStatisticsInstance Fetched TaskStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskStatisticsInstance { $payload = $this->version->fetch('GET', $this->uri); return new TaskStatisticsInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.TaskStatisticsContext ' . \implode(' ', $context) . ']'; } }PKt[/| ?Twilio/Rest/Preview/Understand/Assistant/Task/SampleContext.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Samples/' . \rawurlencode($sid) . ''; } /** * Fetch the SampleInstance * * @return SampleInstance Fetched SampleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SampleInstance { $payload = $this->version->fetch('GET', $this->uri); return new SampleInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'], $this->solution['sid'] ); } /** * Update the SampleInstance * * @param array|Options $options Optional Arguments * @return SampleInstance Updated SampleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SampleInstance { $options = new Values($options); $data = Values::of([ 'Language' => $options['language'], 'TaggedText' => $options['taggedText'], 'SourceChannel' => $options['sourceChannel'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SampleInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'], $this->solution['sid'] ); } /** * Delete the SampleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.SampleContext ' . \implode(' ', $context) . ']'; } }PKt[՘<Twilio/Rest/Preview/Understand/Assistant/Task/SampleList.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Samples'; } /** * Streams SampleInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SampleInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SampleInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SampleInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SamplePage Page of SampleInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SamplePage { $options = new Values($options); $params = Values::of([ 'Language' => $options['language'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SamplePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SampleInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SamplePage Page of SampleInstance */ public function getPage(string $targetUrl): SamplePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SamplePage($this->version, $response, $this->solution); } /** * Create the SampleInstance * * @param string $language An ISO language-country string of the sample. * @param string $taggedText The text example of how end-users may express this * task. The sample may contain Field tag blocks. * @param array|Options $options Optional Arguments * @return SampleInstance Created SampleInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $language, string $taggedText, array $options = []): SampleInstance { $options = new Values($options); $data = Values::of([ 'Language' => $language, 'TaggedText' => $taggedText, 'SourceChannel' => $options['sourceChannel'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SampleInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Constructs a SampleContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): SampleContext { return new SampleContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.SampleList]'; } }PKt[ ;Twilio/Rest/Preview/Understand/Assistant/Task/FieldPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FieldInstance \Twilio\Rest\Preview\Understand\Assistant\Task\FieldInstance */ public function buildInstance(array $payload): FieldInstance { return new FieldInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.FieldPage]'; } }PKt[}1kk?Twilio/Rest/Preview/Understand/Assistant/Task/FieldInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'fieldType' => Values::array_get($payload, 'field_type'), 'taskSid' => Values::array_get($payload, 'task_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FieldContext Context for this FieldInstance */ protected function proxy(): FieldContext { if (!$this->context) { $this->context = new FieldContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FieldInstance * * @return FieldInstance Fetched FieldInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldInstance { return $this->proxy()->fetch(); } /** * Delete the FieldInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.FieldInstance ' . \implode(' ', $context) . ']'; } }PKt[^,<Twilio/Rest/Preview/Understand/Assistant/Task/SamplePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SampleInstance \Twilio\Rest\Preview\Understand\Assistant\Task\SampleInstance */ public function buildInstance(array $payload): SampleInstance { return new SampleInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.SamplePage]'; } }PKt[/B3;Twilio/Rest/Preview/Understand/Assistant/Task/FieldList.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Fields'; } /** * Streams FieldInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FieldInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FieldInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FieldInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FieldPage Page of FieldInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FieldPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FieldPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FieldInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FieldPage Page of FieldInstance */ public function getPage(string $targetUrl): FieldPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FieldPage($this->version, $response, $this->solution); } /** * Create the FieldInstance * * @param string $fieldType The unique name or sid of the FieldType. It can be * any Built-in Field Type or the unique_name or sid * of a custom Field Type. * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. * @return FieldInstance Created FieldInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $fieldType, string $uniqueName): FieldInstance { $data = Values::of(['FieldType' => $fieldType, 'UniqueName' => $uniqueName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FieldInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Constructs a FieldContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): FieldContext { return new FieldContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.FieldList]'; } }PKt[S7LETwilio/Rest/Preview/Understand/Assistant/Task/TaskActionsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'taskSid' => Values::array_get($payload, 'task_sid'), 'url' => Values::array_get($payload, 'url'), 'data' => Values::array_get($payload, 'data'), ]; $this->solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskActionsContext Context for this TaskActionsInstance */ protected function proxy(): TaskActionsContext { if (!$this->context) { $this->context = new TaskActionsContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'] ); } return $this->context; } /** * Fetch the TaskActionsInstance * * @return TaskActionsInstance Fetched TaskActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskActionsInstance { return $this->proxy()->fetch(); } /** * Update the TaskActionsInstance * * @param array|Options $options Optional Arguments * @return TaskActionsInstance Updated TaskActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskActionsInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.TaskActionsInstance ' . \implode(' ', $context) . ']'; } }PKt[R  ATwilio/Rest/Preview/Understand/Assistant/Task/TaskActionsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskActionsInstance \Twilio\Rest\Preview\Understand\Assistant\Task\TaskActionsInstance */ public function buildInstance(array $payload): TaskActionsInstance { return new TaskActionsInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.TaskActionsPage]'; } }PKt[bnxkGG?Twilio/Rest/Preview/Understand/Assistant/Task/SampleOptions.phpnu[options['language'] = $language; } /** * An ISO language-country string of the sample. * * @param string $language An ISO language-country string of the sample. * @return $this Fluent Builder */ public function setLanguage(string $language): self { $this->options['language'] = $language; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.ReadSampleOptions ' . $options . ']'; } } class CreateSampleOptions extends Options { /** * @param string $sourceChannel The communication channel the sample was * captured. It can be: voice, sms, chat, alexa, * google-assistant, or slack. If not included the * value will be null */ public function __construct(string $sourceChannel = Values::NONE) { $this->options['sourceChannel'] = $sourceChannel; } /** * The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null * * @param string $sourceChannel The communication channel the sample was * captured. It can be: voice, sms, chat, alexa, * google-assistant, or slack. If not included the * value will be null * @return $this Fluent Builder */ public function setSourceChannel(string $sourceChannel): self { $this->options['sourceChannel'] = $sourceChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.CreateSampleOptions ' . $options . ']'; } } class UpdateSampleOptions extends Options { /** * @param string $language An ISO language-country string of the sample. * @param string $taggedText The text example of how end-users may express this * task. The sample may contain Field tag blocks. * @param string $sourceChannel The communication channel the sample was * captured. It can be: voice, sms, chat, alexa, * google-assistant, or slack. If not included the * value will be null */ public function __construct(string $language = Values::NONE, string $taggedText = Values::NONE, string $sourceChannel = Values::NONE) { $this->options['language'] = $language; $this->options['taggedText'] = $taggedText; $this->options['sourceChannel'] = $sourceChannel; } /** * An ISO language-country string of the sample. * * @param string $language An ISO language-country string of the sample. * @return $this Fluent Builder */ public function setLanguage(string $language): self { $this->options['language'] = $language; return $this; } /** * The text example of how end-users may express this task. The sample may contain Field tag blocks. * * @param string $taggedText The text example of how end-users may express this * task. The sample may contain Field tag blocks. * @return $this Fluent Builder */ public function setTaggedText(string $taggedText): self { $this->options['taggedText'] = $taggedText; return $this; } /** * The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null * * @param string $sourceChannel The communication channel the sample was * captured. It can be: voice, sms, chat, alexa, * google-assistant, or slack. If not included the * value will be null * @return $this Fluent Builder */ public function setSourceChannel(string $sourceChannel): self { $this->options['sourceChannel'] = $sourceChannel; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.UpdateSampleOptions ' . $options . ']'; } }PKt[,Kn >Twilio/Rest/Preview/Understand/Assistant/Task/FieldContext.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Fields/' . \rawurlencode($sid) . ''; } /** * Fetch the FieldInstance * * @return FieldInstance Fetched FieldInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldInstance { $payload = $this->version->fetch('GET', $this->uri); return new FieldInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['taskSid'], $this->solution['sid'] ); } /** * Delete the FieldInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.FieldContext ' . \implode(' ', $context) . ']'; } }PKt[WWHTwilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'taskSid' => Values::array_get($payload, 'task_sid'), 'samplesCount' => Values::array_get($payload, 'samples_count'), 'fieldsCount' => Values::array_get($payload, 'fields_count'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskStatisticsContext Context for this TaskStatisticsInstance */ protected function proxy(): TaskStatisticsContext { if (!$this->context) { $this->context = new TaskStatisticsContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'] ); } return $this->context; } /** * Fetch the TaskStatisticsInstance * * @return TaskStatisticsInstance Fetched TaskStatisticsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskStatisticsInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.TaskStatisticsInstance ' . \implode(' ', $context) . ']'; } }PKt[@wDTwilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsList.phpnu[solution = ['assistantSid' => $assistantSid, 'taskSid' => $taskSid, ]; } /** * Constructs a TaskStatisticsContext */ public function getContext(): TaskStatisticsContext { return new TaskStatisticsContext( $this->version, $this->solution['assistantSid'], $this->solution['taskSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.TaskStatisticsList]'; } }PKt[vfGGDTwilio/Rest/Preview/Understand/Assistant/Task/TaskActionsOptions.phpnu[options['actions'] = $actions; } /** * The JSON actions that instruct the Assistant how to perform this task. * * @param array $actions The JSON actions that instruct the Assistant how to * perform this task. * @return $this Fluent Builder */ public function setActions(array $actions): self { $this->options['actions'] = $actions; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.UpdateTaskActionsOptions ' . $options . ']'; } }PKt[Mi~;Twilio/Rest/Preview/Understand/Assistant/ModelBuildList.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/ModelBuilds'; } /** * Streams ModelBuildInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ModelBuildInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ModelBuildInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ModelBuildInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ModelBuildPage Page of ModelBuildInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ModelBuildPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ModelBuildPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ModelBuildInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ModelBuildPage Page of ModelBuildInstance */ public function getPage(string $targetUrl): ModelBuildPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ModelBuildPage($this->version, $response, $this->solution); } /** * Create the ModelBuildInstance * * @param array|Options $options Optional Arguments * @return ModelBuildInstance Created ModelBuildInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ModelBuildInstance { $options = new Values($options); $data = Values::of([ 'StatusCallback' => $options['statusCallback'], 'UniqueName' => $options['uniqueName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ModelBuildInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Constructs a ModelBuildContext * * @param string $sid The sid */ public function getContext(string $sid): ModelBuildContext { return new ModelBuildContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.ModelBuildList]'; } }PKt[Y4TNTwilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.phpnu[options['initiationActions'] = $initiationActions; } /** * The initiation_actions * * @param array $initiationActions The initiation_actions * @return $this Fluent Builder */ public function setInitiationActions(array $initiationActions): self { $this->options['initiationActions'] = $initiationActions; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.UpdateAssistantInitiationActionsOptions ' . $options . ']'; } }PKt[sW ?Twilio/Rest/Preview/Understand/Assistant/StyleSheetInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'url' => Values::array_get($payload, 'url'), 'data' => Values::array_get($payload, 'data'), ]; $this->solution = ['assistantSid' => $assistantSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return StyleSheetContext Context for this StyleSheetInstance */ protected function proxy(): StyleSheetContext { if (!$this->context) { $this->context = new StyleSheetContext($this->version, $this->solution['assistantSid']); } return $this->context; } /** * Fetch the StyleSheetInstance * * @return StyleSheetInstance Fetched StyleSheetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): StyleSheetInstance { return $this->proxy()->fetch(); } /** * Update the StyleSheetInstance * * @param array|Options $options Optional Arguments * @return StyleSheetInstance Updated StyleSheetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): StyleSheetInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.StyleSheetInstance ' . \implode(' ', $context) . ']'; } }PKt[':Twilio/Rest/Preview/Understand/Assistant/FieldTypePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FieldTypeInstance \Twilio\Rest\Preview\Understand\Assistant\FieldTypeInstance */ public function buildInstance(array $payload): FieldTypeInstance { return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.FieldTypePage]'; } }PKt[89Twilio/Rest/Preview/Understand/Assistant/DialoguePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DialogueInstance \Twilio\Rest\Preview\Understand\Assistant\DialogueInstance */ public function buildInstance(array $payload): DialogueInstance { return new DialogueInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.DialoguePage]'; } }PKt[16Twilio/Rest/Preview/Understand/Assistant/QueryList.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Queries'; } /** * Streams QueryInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads QueryInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return QueryInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of QueryInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return QueryPage Page of QueryInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): QueryPage { $options = new Values($options); $params = Values::of([ 'Language' => $options['language'], 'ModelBuild' => $options['modelBuild'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new QueryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of QueryInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return QueryPage Page of QueryInstance */ public function getPage(string $targetUrl): QueryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new QueryPage($this->version, $response, $this->solution); } /** * Create the QueryInstance * * @param string $language An ISO language-country string of the sample. * @param string $query A user-provided string that uniquely identifies this * resource as an alternative to the sid. It can be up to * 2048 characters long. * @param array|Options $options Optional Arguments * @return QueryInstance Created QueryInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $language, string $query, array $options = []): QueryInstance { $options = new Values($options); $data = Values::of([ 'Language' => $language, 'Query' => $query, 'Tasks' => $options['tasks'], 'ModelBuild' => $options['modelBuild'], 'Field' => $options['field'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new QueryInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Constructs a QueryContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): QueryContext { return new QueryContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.QueryList]'; } }PKt[M:Twilio/Rest/Preview/Understand/Assistant/QueryInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'results' => Values::array_get($payload, 'results'), 'language' => Values::array_get($payload, 'language'), 'modelBuildSid' => Values::array_get($payload, 'model_build_sid'), 'query' => Values::array_get($payload, 'query'), 'sampleSid' => Values::array_get($payload, 'sample_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'url' => Values::array_get($payload, 'url'), 'sourceChannel' => Values::array_get($payload, 'source_channel'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return QueryContext Context for this QueryInstance */ protected function proxy(): QueryContext { if (!$this->context) { $this->context = new QueryContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the QueryInstance * * @return QueryInstance Fetched QueryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): QueryInstance { return $this->proxy()->fetch(); } /** * Update the QueryInstance * * @param array|Options $options Optional Arguments * @return QueryInstance Updated QueryInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): QueryInstance { return $this->proxy()->update($options); } /** * Delete the QueryInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.QueryInstance ' . \implode(' ', $context) . ']'; } }PKt[ }6Twilio/Rest/Preview/Understand/Assistant/QueryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return QueryInstance \Twilio\Rest\Preview\Understand\Assistant\QueryInstance */ public function buildInstance(array $payload): QueryInstance { return new QueryInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.QueryPage]'; } }PKt[z-9Twilio/Rest/Preview/Understand/Assistant/TaskInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'links' => Values::array_get($payload, 'links'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'actionsUrl' => Values::array_get($payload, 'actions_url'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TaskContext Context for this TaskInstance */ protected function proxy(): TaskContext { if (!$this->context) { $this->context = new TaskContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TaskInstance * * @return TaskInstance Fetched TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TaskInstance { return $this->proxy()->fetch(); } /** * Update the TaskInstance * * @param array|Options $options Optional Arguments * @return TaskInstance Updated TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TaskInstance { return $this->proxy()->update($options); } /** * Delete the TaskInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the fields */ protected function getFields(): FieldList { return $this->proxy()->fields; } /** * Access the samples */ protected function getSamples(): SampleList { return $this->proxy()->samples; } /** * Access the taskActions */ protected function getTaskActions(): TaskActionsList { return $this->proxy()->taskActions; } /** * Access the statistics */ protected function getStatistics(): TaskStatisticsList { return $this->proxy()->statistics; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.TaskInstance ' . \implode(' ', $context) . ']'; } }PKt[gI44KTwilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AssistantInitiationActionsInstance \Twilio\Rest\Preview\Understand\Assistant\AssistantInitiationActionsInstance */ public function buildInstance(array $payload): AssistantInitiationActionsInstance { return new AssistantInitiationActionsInstance( $this->version, $payload, $this->solution['assistantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.AssistantInitiationActionsPage]'; } }PKt[J/S=Twilio/Rest/Preview/Understand/Assistant/FieldTypeContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($sid) . ''; } /** * Fetch the FieldTypeInstance * * @return FieldTypeInstance Fetched FieldTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldTypeInstance { $payload = $this->version->fetch('GET', $this->uri); return new FieldTypeInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Update the FieldTypeInstance * * @param array|Options $options Optional Arguments * @return FieldTypeInstance Updated FieldTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FieldTypeInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FieldTypeInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Delete the FieldTypeInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the fieldValues */ protected function getFieldValues(): FieldValueList { if (!$this->_fieldValues) { $this->_fieldValues = new FieldValueList( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->_fieldValues; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.FieldTypeContext ' . \implode(' ', $context) . ']'; } }PKt[lKDD9Twilio/Rest/Preview/Understand/Assistant/DialogueList.phpnu[solution = ['assistantSid' => $assistantSid, ]; } /** * Constructs a DialogueContext * * @param string $sid The sid */ public function getContext(string $sid): DialogueContext { return new DialogueContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.DialogueList]'; } }PKt[DxTiiMTwilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'url' => Values::array_get($payload, 'url'), 'data' => Values::array_get($payload, 'data'), ]; $this->solution = ['assistantSid' => $assistantSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssistantFallbackActionsContext Context for this * AssistantFallbackActionsInstance */ protected function proxy(): AssistantFallbackActionsContext { if (!$this->context) { $this->context = new AssistantFallbackActionsContext( $this->version, $this->solution['assistantSid'] ); } return $this->context; } /** * Fetch the AssistantFallbackActionsInstance * * @return AssistantFallbackActionsInstance Fetched * AssistantFallbackActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssistantFallbackActionsInstance { return $this->proxy()->fetch(); } /** * Update the AssistantFallbackActionsInstance * * @param array|Options $options Optional Arguments * @return AssistantFallbackActionsInstance Updated * AssistantFallbackActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AssistantFallbackActionsInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.AssistantFallbackActionsInstance ' . \implode(' ', $context) . ']'; } }PKt[Ȝy;Twilio/Rest/Preview/Understand/Assistant/ModelBuildPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ModelBuildInstance \Twilio\Rest\Preview\Understand\Assistant\ModelBuildInstance */ public function buildInstance(array $payload): ModelBuildInstance { return new ModelBuildInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.ModelBuildPage]'; } }PKt[*%  LTwilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsContext.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FallbackActions'; } /** * Fetch the AssistantFallbackActionsInstance * * @return AssistantFallbackActionsInstance Fetched * AssistantFallbackActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssistantFallbackActionsInstance { $payload = $this->version->fetch('GET', $this->uri); return new AssistantFallbackActionsInstance( $this->version, $payload, $this->solution['assistantSid'] ); } /** * Update the AssistantFallbackActionsInstance * * @param array|Options $options Optional Arguments * @return AssistantFallbackActionsInstance Updated * AssistantFallbackActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AssistantFallbackActionsInstance { $options = new Values($options); $data = Values::of(['FallbackActions' => Serialize::jsonObject($options['fallbackActions']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AssistantFallbackActionsInstance( $this->version, $payload, $this->solution['assistantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.AssistantFallbackActionsContext ' . \implode(' ', $context) . ']'; } }PKt[n""8Twilio/Rest/Preview/Understand/Assistant/TaskOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['actions'] = $actions; $this->options['actionsUrl'] = $actionsUrl; } /** * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. * * @param string $friendlyName A user-provided string that identifies this * resource. It is non-unique and can up to 255 * characters long. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique. * * @param array $actions A user-provided JSON object encoded as a string to * specify the actions for this task. It is optional and * non-unique. * @return $this Fluent Builder */ public function setActions(array $actions): self { $this->options['actions'] = $actions; return $this; } /** * User-provided HTTP endpoint where from the assistant fetches actions * * @param string $actionsUrl User-provided HTTP endpoint where from the * assistant fetches actions * @return $this Fluent Builder */ public function setActionsUrl(string $actionsUrl): self { $this->options['actionsUrl'] = $actionsUrl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.CreateTaskOptions ' . $options . ']'; } } class UpdateTaskOptions extends Options { /** * @param string $friendlyName A user-provided string that identifies this * resource. It is non-unique and can up to 255 * characters long. * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. * @param array $actions A user-provided JSON object encoded as a string to * specify the actions for this task. It is optional and * non-unique. * @param string $actionsUrl User-provided HTTP endpoint where from the * assistant fetches actions */ public function __construct(string $friendlyName = Values::NONE, string $uniqueName = Values::NONE, array $actions = Values::ARRAY_NONE, string $actionsUrl = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['actions'] = $actions; $this->options['actionsUrl'] = $actionsUrl; } /** * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. * * @param string $friendlyName A user-provided string that identifies this * resource. It is non-unique and can up to 255 * characters long. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. * * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique. * * @param array $actions A user-provided JSON object encoded as a string to * specify the actions for this task. It is optional and * non-unique. * @return $this Fluent Builder */ public function setActions(array $actions): self { $this->options['actions'] = $actions; return $this; } /** * User-provided HTTP endpoint where from the assistant fetches actions * * @param string $actionsUrl User-provided HTTP endpoint where from the * assistant fetches actions * @return $this Fluent Builder */ public function setActionsUrl(string $actionsUrl): self { $this->options['actionsUrl'] = $actionsUrl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.UpdateTaskOptions ' . $options . ']'; } }PKt['[RR:Twilio/Rest/Preview/Understand/Assistant/FieldTypeList.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes'; } /** * Streams FieldTypeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FieldTypeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FieldTypeInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FieldTypeInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FieldTypePage Page of FieldTypeInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FieldTypePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FieldTypePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FieldTypeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FieldTypePage Page of FieldTypeInstance */ public function getPage(string $targetUrl): FieldTypePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FieldTypePage($this->version, $response, $this->solution); } /** * Create the FieldTypeInstance * * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. * @param array|Options $options Optional Arguments * @return FieldTypeInstance Created FieldTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $uniqueName, array $options = []): FieldTypeInstance { $options = new Values($options); $data = Values::of(['UniqueName' => $uniqueName, 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Constructs a FieldTypeContext * * @param string $sid The sid */ public function getContext(string $sid): FieldTypeContext { return new FieldTypeContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.FieldTypeList]'; } }PKt[S?r%%9Twilio/Rest/Preview/Understand/Assistant/QueryOptions.phpnu[options['language'] = $language; $this->options['modelBuild'] = $modelBuild; $this->options['status'] = $status; } /** * An ISO language-country string of the sample. * * @param string $language An ISO language-country string of the sample. * @return $this Fluent Builder */ public function setLanguage(string $language): self { $this->options['language'] = $language; return $this; } /** * The Model Build Sid or unique name of the Model Build to be queried. * * @param string $modelBuild The Model Build Sid or unique name of the Model * Build to be queried. * @return $this Fluent Builder */ public function setModelBuild(string $modelBuild): self { $this->options['modelBuild'] = $modelBuild; return $this; } /** * A string that described the query status. The values can be: pending_review, reviewed, discarded * * @param string $status A string that described the query status. The values * can be: pending_review, reviewed, discarded * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.ReadQueryOptions ' . $options . ']'; } } class CreateQueryOptions extends Options { /** * @param string $tasks Constraints the query to a set of tasks. Useful when * you need to constrain the paths the user can take. * Tasks should be comma separated task-unique-name-1, * task-unique-name-2 * @param string $modelBuild The Model Build Sid or unique name of the Model * Build to be queried. * @param string $field Constraints the query to a given Field with an task. * Useful when you know the Field you are expecting. It * accepts one field in the format * task-unique-name-1:field-unique-name */ public function __construct(string $tasks = Values::NONE, string $modelBuild = Values::NONE, string $field = Values::NONE) { $this->options['tasks'] = $tasks; $this->options['modelBuild'] = $modelBuild; $this->options['field'] = $field; } /** * Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated *task-unique-name-1*, *task-unique-name-2* * * @param string $tasks Constraints the query to a set of tasks. Useful when * you need to constrain the paths the user can take. * Tasks should be comma separated task-unique-name-1, * task-unique-name-2 * @return $this Fluent Builder */ public function setTasks(string $tasks): self { $this->options['tasks'] = $tasks; return $this; } /** * The Model Build Sid or unique name of the Model Build to be queried. * * @param string $modelBuild The Model Build Sid or unique name of the Model * Build to be queried. * @return $this Fluent Builder */ public function setModelBuild(string $modelBuild): self { $this->options['modelBuild'] = $modelBuild; return $this; } /** * Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format *task-unique-name-1*:*field-unique-name* * * @param string $field Constraints the query to a given Field with an task. * Useful when you know the Field you are expecting. It * accepts one field in the format * task-unique-name-1:field-unique-name * @return $this Fluent Builder */ public function setField(string $field): self { $this->options['field'] = $field; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.CreateQueryOptions ' . $options . ']'; } } class UpdateQueryOptions extends Options { /** * @param string $sampleSid An optional reference to the Sample created from * this query. * @param string $status A string that described the query status. The values * can be: pending_review, reviewed, discarded */ public function __construct(string $sampleSid = Values::NONE, string $status = Values::NONE) { $this->options['sampleSid'] = $sampleSid; $this->options['status'] = $status; } /** * An optional reference to the Sample created from this query. * * @param string $sampleSid An optional reference to the Sample created from * this query. * @return $this Fluent Builder */ public function setSampleSid(string $sampleSid): self { $this->options['sampleSid'] = $sampleSid; return $this; } /** * A string that described the query status. The values can be: pending_review, reviewed, discarded * * @param string $status A string that described the query status. The values * can be: pending_review, reviewed, discarded * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.UpdateQueryOptions ' . $options . ']'; } }PKt[]@UUITwilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsList.phpnu[solution = ['assistantSid' => $assistantSid, ]; } /** * Constructs a AssistantFallbackActionsContext */ public function getContext(): AssistantFallbackActionsContext { return new AssistantFallbackActionsContext($this->version, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.AssistantFallbackActionsList]'; } }PKt[   HTwilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.phpnu[options['language'] = $language; } /** * An ISO language-country string of the value. For example: *en-US* * * @param string $language An ISO language-country string of the value. For * example: en-US * @return $this Fluent Builder */ public function setLanguage(string $language): self { $this->options['language'] = $language; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.ReadFieldValueOptions ' . $options . ']'; } } class CreateFieldValueOptions extends Options { /** * @param string $synonymOf A value that indicates this field value is a * synonym of. Empty if the value is not a synonym. */ public function __construct(string $synonymOf = Values::NONE) { $this->options['synonymOf'] = $synonymOf; } /** * A value that indicates this field value is a synonym of. Empty if the value is not a synonym. * * @param string $synonymOf A value that indicates this field value is a * synonym of. Empty if the value is not a synonym. * @return $this Fluent Builder */ public function setSynonymOf(string $synonymOf): self { $this->options['synonymOf'] = $synonymOf; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.CreateFieldValueOptions ' . $options . ']'; } }PKt[WITwilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'fieldTypeSid' => Values::array_get($payload, 'field_type_sid'), 'language' => Values::array_get($payload, 'language'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'value' => Values::array_get($payload, 'value'), 'url' => Values::array_get($payload, 'url'), 'synonymOf' => Values::array_get($payload, 'synonym_of'), ]; $this->solution = [ 'assistantSid' => $assistantSid, 'fieldTypeSid' => $fieldTypeSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FieldValueContext Context for this FieldValueInstance */ protected function proxy(): FieldValueContext { if (!$this->context) { $this->context = new FieldValueContext( $this->version, $this->solution['assistantSid'], $this->solution['fieldTypeSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the FieldValueInstance * * @return FieldValueInstance Fetched FieldValueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldValueInstance { return $this->proxy()->fetch(); } /** * Delete the FieldValueInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.FieldValueInstance ' . \implode(' ', $context) . ']'; } }PKt[;0+" HTwilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueContext.phpnu[solution = ['assistantSid' => $assistantSid, 'fieldTypeSid' => $fieldTypeSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($fieldTypeSid) . '/FieldValues/' . \rawurlencode($sid) . ''; } /** * Fetch the FieldValueInstance * * @return FieldValueInstance Fetched FieldValueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FieldValueInstance { $payload = $this->version->fetch('GET', $this->uri); return new FieldValueInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['fieldTypeSid'], $this->solution['sid'] ); } /** * Delete the FieldValueInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.FieldValueContext ' . \implode(' ', $context) . ']'; } }PKt['ETwilio/Rest/Preview/Understand/Assistant/FieldType/FieldValuePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FieldValueInstance \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueInstance */ public function buildInstance(array $payload): FieldValueInstance { return new FieldValueInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['fieldTypeSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.FieldValuePage]'; } }PKt[vS$ETwilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueList.phpnu[solution = ['assistantSid' => $assistantSid, 'fieldTypeSid' => $fieldTypeSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($fieldTypeSid) . '/FieldValues'; } /** * Streams FieldValueInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FieldValueInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FieldValueInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of FieldValueInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FieldValuePage Page of FieldValueInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FieldValuePage { $options = new Values($options); $params = Values::of([ 'Language' => $options['language'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FieldValuePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FieldValueInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FieldValuePage Page of FieldValueInstance */ public function getPage(string $targetUrl): FieldValuePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FieldValuePage($this->version, $response, $this->solution); } /** * Create the FieldValueInstance * * @param string $language An ISO language-country string of the value. * @param string $value A user-provided string that uniquely identifies this * resource as an alternative to the sid. Unique up to 64 * characters long. * @param array|Options $options Optional Arguments * @return FieldValueInstance Created FieldValueInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $language, string $value, array $options = []): FieldValueInstance { $options = new Values($options); $data = Values::of([ 'Language' => $language, 'Value' => $value, 'SynonymOf' => $options['synonymOf'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FieldValueInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['fieldTypeSid'] ); } /** * Constructs a FieldValueContext * * @param string $sid The sid */ public function getContext(string $sid): FieldValueContext { return new FieldValueContext( $this->version, $this->solution['assistantSid'], $this->solution['fieldTypeSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.FieldValueList]'; } }PKt[~Fe e =Twilio/Rest/Preview/Understand/Assistant/DialogueInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'sid' => Values::array_get($payload, 'sid'), 'data' => Values::array_get($payload, 'data'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DialogueContext Context for this DialogueInstance */ protected function proxy(): DialogueContext { if (!$this->context) { $this->context = new DialogueContext( $this->version, $this->solution['assistantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the DialogueInstance * * @return DialogueInstance Fetched DialogueInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DialogueInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.DialogueInstance ' . \implode(' ', $context) . ']'; } }PKt[ ҒnOTwilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'assistantSid' => Values::array_get($payload, 'assistant_sid'), 'url' => Values::array_get($payload, 'url'), 'data' => Values::array_get($payload, 'data'), ]; $this->solution = ['assistantSid' => $assistantSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssistantInitiationActionsContext Context for this * AssistantInitiationActionsInstance */ protected function proxy(): AssistantInitiationActionsContext { if (!$this->context) { $this->context = new AssistantInitiationActionsContext( $this->version, $this->solution['assistantSid'] ); } return $this->context; } /** * Fetch the AssistantInitiationActionsInstance * * @return AssistantInitiationActionsInstance Fetched * AssistantInitiationActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssistantInitiationActionsInstance { return $this->proxy()->fetch(); } /** * Update the AssistantInitiationActionsInstance * * @param array|Options $options Optional Arguments * @return AssistantInitiationActionsInstance Updated * AssistantInitiationActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AssistantInitiationActionsInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.AssistantInitiationActionsInstance ' . \implode(' ', $context) . ']'; } }PKt[ 7 7 NTwilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsContext.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/InitiationActions'; } /** * Fetch the AssistantInitiationActionsInstance * * @return AssistantInitiationActionsInstance Fetched * AssistantInitiationActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssistantInitiationActionsInstance { $payload = $this->version->fetch('GET', $this->uri); return new AssistantInitiationActionsInstance( $this->version, $payload, $this->solution['assistantSid'] ); } /** * Update the AssistantInitiationActionsInstance * * @param array|Options $options Optional Arguments * @return AssistantInitiationActionsInstance Updated * AssistantInitiationActionsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AssistantInitiationActionsInstance { $options = new Values($options); $data = Values::of(['InitiationActions' => Serialize::jsonObject($options['initiationActions']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AssistantInitiationActionsInstance( $this->version, $payload, $this->solution['assistantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.AssistantInitiationActionsContext ' . \implode(' ', $context) . ']'; } }PKt[7آ5Twilio/Rest/Preview/Understand/Assistant/TaskList.phpnu[solution = ['assistantSid' => $assistantSid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks'; } /** * Streams TaskInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TaskInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TaskInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of TaskInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TaskPage Page of TaskInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TaskPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TaskPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TaskInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TaskPage Page of TaskInstance */ public function getPage(string $targetUrl): TaskPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TaskPage($this->version, $response, $this->solution); } /** * Create the TaskInstance * * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. * @param array|Options $options Optional Arguments * @return TaskInstance Created TaskInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $uniqueName, array $options = []): TaskInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $uniqueName, 'FriendlyName' => $options['friendlyName'], 'Actions' => Serialize::jsonObject($options['actions']), 'ActionsUrl' => $options['actionsUrl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TaskInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Constructs a TaskContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): TaskContext { return new TaskContext($this->version, $this->solution['assistantSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.TaskList]'; } }PKt[ਗ਼]]>Twilio/Rest/Preview/Understand/Assistant/StyleSheetOptions.phpnu[options['styleSheet'] = $styleSheet; } /** * The JSON Style sheet string * * @param array $styleSheet The JSON Style sheet string * @return $this Fluent Builder */ public function setStyleSheet(array $styleSheet): self { $this->options['styleSheet'] = $styleSheet; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.UpdateStyleSheetOptions ' . $options . ']'; } }PKt[7Һ;Twilio/Rest/Preview/Understand/Assistant/StyleSheetPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return StyleSheetInstance \Twilio\Rest\Preview\Understand\Assistant\StyleSheetInstance */ public function buildInstance(array $payload): StyleSheetInstance { return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.StyleSheetPage]'; } }PKt[Qy y >Twilio/Rest/Preview/Understand/Assistant/ModelBuildContext.phpnu[solution = ['assistantSid' => $assistantSid, 'sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/ModelBuilds/' . \rawurlencode($sid) . ''; } /** * Fetch the ModelBuildInstance * * @return ModelBuildInstance Fetched ModelBuildInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ModelBuildInstance { $payload = $this->version->fetch('GET', $this->uri); return new ModelBuildInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Update the ModelBuildInstance * * @param array|Options $options Optional Arguments * @return ModelBuildInstance Updated ModelBuildInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ModelBuildInstance { $options = new Values($options); $data = Values::of(['UniqueName' => $options['uniqueName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ModelBuildInstance( $this->version, $payload, $this->solution['assistantSid'], $this->solution['sid'] ); } /** * Delete the ModelBuildInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.ModelBuildContext ' . \implode(' ', $context) . ']'; } }PKt[ J=Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. * * @param string $friendlyName A user-provided string that identifies this * resource. It is non-unique and can up to 255 * characters long. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.CreateFieldTypeOptions ' . $options . ']'; } } class UpdateFieldTypeOptions extends Options { /** * @param string $friendlyName A user-provided string that identifies this * resource. It is non-unique and can up to 255 * characters long. * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. */ public function __construct(string $friendlyName = Values::NONE, string $uniqueName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; } /** * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. * * @param string $friendlyName A user-provided string that identifies this * resource. It is non-unique and can up to 255 * characters long. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. * * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.UpdateFieldTypeOptions ' . $options . ']'; } }PKt[ҹł5Twilio/Rest/Preview/Understand/Assistant/TaskPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TaskInstance \Twilio\Rest\Preview\Understand\Assistant\TaskInstance */ public function buildInstance(array $payload): TaskInstance { return new TaskInstance($this->version, $payload, $this->solution['assistantSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.TaskPage]'; } }PKt[qX0Twilio/Rest/Preview/Understand/AssistantList.phpnu[solution = []; $this->uri = '/Assistants'; } /** * Streams AssistantInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AssistantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AssistantInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AssistantInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AssistantPage Page of AssistantInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AssistantPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AssistantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AssistantInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AssistantPage Page of AssistantInstance */ public function getPage(string $targetUrl): AssistantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AssistantPage($this->version, $response, $this->solution); } /** * Create the AssistantInstance * * @param array|Options $options Optional Arguments * @return AssistantInstance Created AssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): AssistantInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'LogQueries' => Serialize::booleanToString($options['logQueries']), 'UniqueName' => $options['uniqueName'], 'CallbackUrl' => $options['callbackUrl'], 'CallbackEvents' => $options['callbackEvents'], 'FallbackActions' => Serialize::jsonObject($options['fallbackActions']), 'InitiationActions' => Serialize::jsonObject($options['initiationActions']), 'StyleSheet' => Serialize::jsonObject($options['styleSheet']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AssistantInstance($this->version, $payload); } /** * Constructs a AssistantContext * * @param string $sid A 34 character string that uniquely identifies this * resource. */ public function getContext(string $sid): AssistantContext { return new AssistantContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.AssistantList]'; } }PKt[*Wy""3Twilio/Rest/Preview/Understand/AssistantContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Assistants/' . \rawurlencode($sid) . ''; } /** * Fetch the AssistantInstance * * @return AssistantInstance Fetched AssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssistantInstance { $payload = $this->version->fetch('GET', $this->uri); return new AssistantInstance($this->version, $payload, $this->solution['sid']); } /** * Update the AssistantInstance * * @param array|Options $options Optional Arguments * @return AssistantInstance Updated AssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AssistantInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'LogQueries' => Serialize::booleanToString($options['logQueries']), 'UniqueName' => $options['uniqueName'], 'CallbackUrl' => $options['callbackUrl'], 'CallbackEvents' => $options['callbackEvents'], 'FallbackActions' => Serialize::jsonObject($options['fallbackActions']), 'InitiationActions' => Serialize::jsonObject($options['initiationActions']), 'StyleSheet' => Serialize::jsonObject($options['styleSheet']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AssistantInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the AssistantInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the fieldTypes */ protected function getFieldTypes(): FieldTypeList { if (!$this->_fieldTypes) { $this->_fieldTypes = new FieldTypeList($this->version, $this->solution['sid']); } return $this->_fieldTypes; } /** * Access the tasks */ protected function getTasks(): TaskList { if (!$this->_tasks) { $this->_tasks = new TaskList($this->version, $this->solution['sid']); } return $this->_tasks; } /** * Access the modelBuilds */ protected function getModelBuilds(): ModelBuildList { if (!$this->_modelBuilds) { $this->_modelBuilds = new ModelBuildList($this->version, $this->solution['sid']); } return $this->_modelBuilds; } /** * Access the queries */ protected function getQueries(): QueryList { if (!$this->_queries) { $this->_queries = new QueryList($this->version, $this->solution['sid']); } return $this->_queries; } /** * Access the assistantFallbackActions */ protected function getAssistantFallbackActions(): AssistantFallbackActionsList { if (!$this->_assistantFallbackActions) { $this->_assistantFallbackActions = new AssistantFallbackActionsList( $this->version, $this->solution['sid'] ); } return $this->_assistantFallbackActions; } /** * Access the assistantInitiationActions */ protected function getAssistantInitiationActions(): AssistantInitiationActionsList { if (!$this->_assistantInitiationActions) { $this->_assistantInitiationActions = new AssistantInitiationActionsList( $this->version, $this->solution['sid'] ); } return $this->_assistantInitiationActions; } /** * Access the dialogues */ protected function getDialogues(): DialogueList { if (!$this->_dialogues) { $this->_dialogues = new DialogueList($this->version, $this->solution['sid']); } return $this->_dialogues; } /** * Access the styleSheet */ protected function getStyleSheet(): StyleSheetList { if (!$this->_styleSheet) { $this->_styleSheet = new StyleSheetList($this->version, $this->solution['sid']); } return $this->_styleSheet; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.AssistantContext ' . \implode(' ', $context) . ']'; } }PKt[K 4Twilio/Rest/Preview/Understand/AssistantInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'latestModelBuildSid' => Values::array_get($payload, 'latest_model_build_sid'), 'links' => Values::array_get($payload, 'links'), 'logQueries' => Values::array_get($payload, 'log_queries'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'url' => Values::array_get($payload, 'url'), 'callbackUrl' => Values::array_get($payload, 'callback_url'), 'callbackEvents' => Values::array_get($payload, 'callback_events'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AssistantContext Context for this AssistantInstance */ protected function proxy(): AssistantContext { if (!$this->context) { $this->context = new AssistantContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the AssistantInstance * * @return AssistantInstance Fetched AssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AssistantInstance { return $this->proxy()->fetch(); } /** * Update the AssistantInstance * * @param array|Options $options Optional Arguments * @return AssistantInstance Updated AssistantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AssistantInstance { return $this->proxy()->update($options); } /** * Delete the AssistantInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the fieldTypes */ protected function getFieldTypes(): FieldTypeList { return $this->proxy()->fieldTypes; } /** * Access the tasks */ protected function getTasks(): TaskList { return $this->proxy()->tasks; } /** * Access the modelBuilds */ protected function getModelBuilds(): ModelBuildList { return $this->proxy()->modelBuilds; } /** * Access the queries */ protected function getQueries(): QueryList { return $this->proxy()->queries; } /** * Access the assistantFallbackActions */ protected function getAssistantFallbackActions(): AssistantFallbackActionsList { return $this->proxy()->assistantFallbackActions; } /** * Access the assistantInitiationActions */ protected function getAssistantInitiationActions(): AssistantInitiationActionsList { return $this->proxy()->assistantInitiationActions; } /** * Access the dialogues */ protected function getDialogues(): DialogueList { return $this->proxy()->dialogues; } /** * Access the styleSheet */ protected function getStyleSheet(): StyleSheetList { return $this->proxy()->styleSheet; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Understand.AssistantInstance ' . \implode(' ', $context) . ']'; } }PKt[fe!;H;H3Twilio/Rest/Preview/Understand/AssistantOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['logQueries'] = $logQueries; $this->options['uniqueName'] = $uniqueName; $this->options['callbackUrl'] = $callbackUrl; $this->options['callbackEvents'] = $callbackEvents; $this->options['fallbackActions'] = $fallbackActions; $this->options['initiationActions'] = $initiationActions; $this->options['styleSheet'] = $styleSheet; } /** * A text description for the Assistant. It is non-unique and can up to 255 characters long. * * @param string $friendlyName A text description for the Assistant. It is * non-unique and can up to 255 characters long. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. * * @param bool $logQueries A boolean that specifies whether queries should be * logged for 30 days further training. If false, no * queries will be stored, if true, queries will be * stored for 30 days and deleted thereafter. Defaults * to true if no value is provided. * @return $this Fluent Builder */ public function setLogQueries(bool $logQueries): self { $this->options['logQueries'] = $logQueries; return $this; } /** * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. * * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * A user-provided URL to send event callbacks to. * * @param string $callbackUrl A user-provided URL to send event callbacks to. * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * Space-separated list of callback events that will trigger callbacks. * * @param string $callbackEvents Space-separated list of callback events that * will trigger callbacks. * @return $this Fluent Builder */ public function setCallbackEvents(string $callbackEvents): self { $this->options['callbackEvents'] = $callbackEvents; return $this; } /** * The JSON actions to be executed when the user's input is not recognized as matching any Task. * * @param array $fallbackActions The JSON actions to be executed when the * user's input is not recognized as matching any * Task. * @return $this Fluent Builder */ public function setFallbackActions(array $fallbackActions): self { $this->options['fallbackActions'] = $fallbackActions; return $this; } /** * The JSON actions to be executed on inbound phone calls when the Assistant has to say something first. * * @param array $initiationActions The JSON actions to be executed on inbound * phone calls when the Assistant has to say * something first. * @return $this Fluent Builder */ public function setInitiationActions(array $initiationActions): self { $this->options['initiationActions'] = $initiationActions; return $this; } /** * The JSON object that holds the style sheet for the assistant * * @param array $styleSheet The JSON object that holds the style sheet for the * assistant * @return $this Fluent Builder */ public function setStyleSheet(array $styleSheet): self { $this->options['styleSheet'] = $styleSheet; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.CreateAssistantOptions ' . $options . ']'; } } class UpdateAssistantOptions extends Options { /** * @param string $friendlyName A text description for the Assistant. It is * non-unique and can up to 255 characters long. * @param bool $logQueries A boolean that specifies whether queries should be * logged for 30 days further training. If false, no * queries will be stored, if true, queries will be * stored for 30 days and deleted thereafter. Defaults * to true if no value is provided. * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. * @param string $callbackUrl A user-provided URL to send event callbacks to. * @param string $callbackEvents Space-separated list of callback events that * will trigger callbacks. * @param array $fallbackActions The JSON actions to be executed when the * user's input is not recognized as matching any * Task. * @param array $initiationActions The JSON actions to be executed on inbound * phone calls when the Assistant has to say * something first. * @param array $styleSheet The JSON object that holds the style sheet for the * assistant */ public function __construct(string $friendlyName = Values::NONE, bool $logQueries = Values::NONE, string $uniqueName = Values::NONE, string $callbackUrl = Values::NONE, string $callbackEvents = Values::NONE, array $fallbackActions = Values::ARRAY_NONE, array $initiationActions = Values::ARRAY_NONE, array $styleSheet = Values::ARRAY_NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['logQueries'] = $logQueries; $this->options['uniqueName'] = $uniqueName; $this->options['callbackUrl'] = $callbackUrl; $this->options['callbackEvents'] = $callbackEvents; $this->options['fallbackActions'] = $fallbackActions; $this->options['initiationActions'] = $initiationActions; $this->options['styleSheet'] = $styleSheet; } /** * A text description for the Assistant. It is non-unique and can up to 255 characters long. * * @param string $friendlyName A text description for the Assistant. It is * non-unique and can up to 255 characters long. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. * * @param bool $logQueries A boolean that specifies whether queries should be * logged for 30 days further training. If false, no * queries will be stored, if true, queries will be * stored for 30 days and deleted thereafter. Defaults * to true if no value is provided. * @return $this Fluent Builder */ public function setLogQueries(bool $logQueries): self { $this->options['logQueries'] = $logQueries; return $this; } /** * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. * * @param string $uniqueName A user-provided string that uniquely identifies * this resource as an alternative to the sid. Unique * up to 64 characters long. * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * A user-provided URL to send event callbacks to. * * @param string $callbackUrl A user-provided URL to send event callbacks to. * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * Space-separated list of callback events that will trigger callbacks. * * @param string $callbackEvents Space-separated list of callback events that * will trigger callbacks. * @return $this Fluent Builder */ public function setCallbackEvents(string $callbackEvents): self { $this->options['callbackEvents'] = $callbackEvents; return $this; } /** * The JSON actions to be executed when the user's input is not recognized as matching any Task. * * @param array $fallbackActions The JSON actions to be executed when the * user's input is not recognized as matching any * Task. * @return $this Fluent Builder */ public function setFallbackActions(array $fallbackActions): self { $this->options['fallbackActions'] = $fallbackActions; return $this; } /** * The JSON actions to be executed on inbound phone calls when the Assistant has to say something first. * * @param array $initiationActions The JSON actions to be executed on inbound * phone calls when the Assistant has to say * something first. * @return $this Fluent Builder */ public function setInitiationActions(array $initiationActions): self { $this->options['initiationActions'] = $initiationActions; return $this; } /** * The JSON object that holds the style sheet for the assistant * * @param array $styleSheet The JSON object that holds the style sheet for the * assistant * @return $this Fluent Builder */ public function setStyleSheet(array $styleSheet): self { $this->options['styleSheet'] = $styleSheet; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Understand.UpdateAssistantOptions ' . $options . ']'; } }PKt[Zkk0Twilio/Rest/Preview/Understand/AssistantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AssistantInstance \Twilio\Rest\Preview\Understand\AssistantInstance */ public function buildInstance(array $payload): AssistantInstance { return new AssistantInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Understand.AssistantPage]'; } }PKt[Bڥ %Twilio/Rest/Preview/HostedNumbers.phpnu[version = 'HostedNumbers'; } protected function getAuthorizationDocuments(): AuthorizationDocumentList { if (!$this->_authorizationDocuments) { $this->_authorizationDocuments = new AuthorizationDocumentList($this); } return $this->_authorizationDocuments; } protected function getHostedNumberOrders(): HostedNumberOrderList { if (!$this->_hostedNumberOrders) { $this->_hostedNumberOrders = new HostedNumberOrderList($this); } return $this->_hostedNumberOrders; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.HostedNumbers]'; } }PKt[CN'Twilio/Rest/Preview/DeployedDevices.phpnu[version = 'DeployedDevices'; } protected function getFleets(): FleetList { if (!$this->_fleets) { $this->_fleets = new FleetList($this); } return $this->_fleets; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.DeployedDevices]'; } }PKt[!y #Twilio/Rest/Preview/Marketplace.phpnu[version = 'marketplace'; } protected function getAvailableAddOns(): AvailableAddOnList { if (!$this->_availableAddOns) { $this->_availableAddOns = new AvailableAddOnList($this); } return $this->_availableAddOns; } protected function getInstalledAddOns(): InstalledAddOnList { if (!$this->_installedAddOns) { $this->_installedAddOns = new InstalledAddOnList($this); } return $this->_installedAddOns; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Marketplace]'; } }PKt[ AA(Twilio/Rest/Preview/Wireless/SimPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SimInstance \Twilio\Rest\Preview\Wireless\SimInstance */ public function buildInstance(array $payload): SimInstance { return new SimInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Wireless.SimPage]'; } }PKt[ٗ,Twilio/Rest/Preview/Wireless/CommandList.phpnu[solution = []; $this->uri = '/Commands'; } /** * Streams CommandInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CommandInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CommandInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CommandInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CommandPage Page of CommandInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CommandPage { $options = new Values($options); $params = Values::of([ 'Device' => $options['device'], 'Sim' => $options['sim'], 'Status' => $options['status'], 'Direction' => $options['direction'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CommandPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CommandInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CommandPage Page of CommandInstance */ public function getPage(string $targetUrl): CommandPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CommandPage($this->version, $response, $this->solution); } /** * Create the CommandInstance * * @param string $command The command * @param array|Options $options Optional Arguments * @return CommandInstance Created CommandInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $command, array $options = []): CommandInstance { $options = new Values($options); $data = Values::of([ 'Command' => $command, 'Device' => $options['device'], 'Sim' => $options['sim'], 'CallbackMethod' => $options['callbackMethod'], 'CallbackUrl' => $options['callbackUrl'], 'CommandMode' => $options['commandMode'], 'IncludeSid' => $options['includeSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CommandInstance($this->version, $payload); } /** * Constructs a CommandContext * * @param string $sid The sid */ public function getContext(string $sid): CommandContext { return new CommandContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Wireless.CommandList]'; } }PKt[ҋhv/Twilio/Rest/Preview/Wireless/CommandContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Commands/' . \rawurlencode($sid) . ''; } /** * Fetch the CommandInstance * * @return CommandInstance Fetched CommandInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CommandInstance { $payload = $this->version->fetch('GET', $this->uri); return new CommandInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Wireless.CommandContext ' . \implode(' ', $context) . ']'; } }PKt[FXXX1Twilio/Rest/Preview/Wireless/RatePlanInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dataEnabled' => Values::array_get($payload, 'data_enabled'), 'dataMetering' => Values::array_get($payload, 'data_metering'), 'dataLimit' => Values::array_get($payload, 'data_limit'), 'messagingEnabled' => Values::array_get($payload, 'messaging_enabled'), 'voiceEnabled' => Values::array_get($payload, 'voice_enabled'), 'nationalRoamingEnabled' => Values::array_get($payload, 'national_roaming_enabled'), 'internationalRoaming' => Values::array_get($payload, 'international_roaming'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RatePlanContext Context for this RatePlanInstance */ protected function proxy(): RatePlanContext { if (!$this->context) { $this->context = new RatePlanContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the RatePlanInstance * * @return RatePlanInstance Fetched RatePlanInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RatePlanInstance { return $this->proxy()->fetch(); } /** * Update the RatePlanInstance * * @param array|Options $options Optional Arguments * @return RatePlanInstance Updated RatePlanInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): RatePlanInstance { return $this->proxy()->update($options); } /** * Delete the RatePlanInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Wireless.RatePlanInstance ' . \implode(' ', $context) . ']'; } }PKt[eѶ(Twilio/Rest/Preview/Wireless/SimList.phpnu[solution = []; $this->uri = '/Sims'; } /** * Streams SimInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SimInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SimInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SimInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SimPage Page of SimInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SimPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'Iccid' => $options['iccid'], 'RatePlan' => $options['ratePlan'], 'EId' => $options['eId'], 'SimRegistrationCode' => $options['simRegistrationCode'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SimPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SimInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SimPage Page of SimInstance */ public function getPage(string $targetUrl): SimPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SimPage($this->version, $response, $this->solution); } /** * Constructs a SimContext * * @param string $sid The sid */ public function getContext(string $sid): SimContext { return new SimContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Wireless.SimList]'; } }PKt[rYY,Twilio/Rest/Preview/Wireless/CommandPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CommandInstance \Twilio\Rest\Preview\Wireless\CommandInstance */ public function buildInstance(array $payload): CommandInstance { return new CommandInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Wireless.CommandPage]'; } }PKt[eI0Twilio/Rest/Preview/Wireless/CommandInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'deviceSid' => Values::array_get($payload, 'device_sid'), 'simSid' => Values::array_get($payload, 'sim_sid'), 'command' => Values::array_get($payload, 'command'), 'commandMode' => Values::array_get($payload, 'command_mode'), 'status' => Values::array_get($payload, 'status'), 'direction' => Values::array_get($payload, 'direction'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CommandContext Context for this CommandInstance */ protected function proxy(): CommandContext { if (!$this->context) { $this->context = new CommandContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CommandInstance * * @return CommandInstance Fetched CommandInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CommandInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Wireless.CommandInstance ' . \implode(' ', $context) . ']'; } }PKt[,Twilio/Rest/Preview/Wireless/SimInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'ratePlanSid' => Values::array_get($payload, 'rate_plan_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'iccid' => Values::array_get($payload, 'iccid'), 'eId' => Values::array_get($payload, 'e_id'), 'status' => Values::array_get($payload, 'status'), 'commandsCallbackUrl' => Values::array_get($payload, 'commands_callback_url'), 'commandsCallbackMethod' => Values::array_get($payload, 'commands_callback_method'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SimContext Context for this SimInstance */ protected function proxy(): SimContext { if (!$this->context) { $this->context = new SimContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SimInstance * * @return SimInstance Fetched SimInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SimInstance { return $this->proxy()->fetch(); } /** * Update the SimInstance * * @param array|Options $options Optional Arguments * @return SimInstance Updated SimInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SimInstance { return $this->proxy()->update($options); } /** * Access the usage */ protected function getUsage(): UsageList { return $this->proxy()->usage; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Wireless.SimInstance ' . \implode(' ', $context) . ']'; } }PKt[/!O O 0Twilio/Rest/Preview/Wireless/RatePlanContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/RatePlans/' . \rawurlencode($sid) . ''; } /** * Fetch the RatePlanInstance * * @return RatePlanInstance Fetched RatePlanInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RatePlanInstance { $payload = $this->version->fetch('GET', $this->uri); return new RatePlanInstance($this->version, $payload, $this->solution['sid']); } /** * Update the RatePlanInstance * * @param array|Options $options Optional Arguments * @return RatePlanInstance Updated RatePlanInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): RatePlanInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RatePlanInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the RatePlanInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Wireless.RatePlanContext ' . \implode(' ', $context) . ']'; } }PKt[=88+Twilio/Rest/Preview/Wireless/SimContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Sims/' . \rawurlencode($sid) . ''; } /** * Fetch the SimInstance * * @return SimInstance Fetched SimInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SimInstance { $payload = $this->version->fetch('GET', $this->uri); return new SimInstance($this->version, $payload, $this->solution['sid']); } /** * Update the SimInstance * * @param array|Options $options Optional Arguments * @return SimInstance Updated SimInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SimInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'CallbackMethod' => $options['callbackMethod'], 'CallbackUrl' => $options['callbackUrl'], 'FriendlyName' => $options['friendlyName'], 'RatePlan' => $options['ratePlan'], 'Status' => $options['status'], 'CommandsCallbackMethod' => $options['commandsCallbackMethod'], 'CommandsCallbackUrl' => $options['commandsCallbackUrl'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SimInstance($this->version, $payload, $this->solution['sid']); } /** * Access the usage */ protected function getUsage(): UsageList { if (!$this->_usage) { $this->_usage = new UsageList($this->version, $this->solution['sid']); } return $this->_usage; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Wireless.SimContext ' . \implode(' ', $context) . ']'; } }PKt[F11+Twilio/Rest/Preview/Wireless/SimOptions.phpnu[options['status'] = $status; $this->options['iccid'] = $iccid; $this->options['ratePlan'] = $ratePlan; $this->options['eId'] = $eId; $this->options['simRegistrationCode'] = $simRegistrationCode; } /** * The status * * @param string $status The status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The iccid * * @param string $iccid The iccid * @return $this Fluent Builder */ public function setIccid(string $iccid): self { $this->options['iccid'] = $iccid; return $this; } /** * The rate_plan * * @param string $ratePlan The rate_plan * @return $this Fluent Builder */ public function setRatePlan(string $ratePlan): self { $this->options['ratePlan'] = $ratePlan; return $this; } /** * The e_id * * @param string $eId The e_id * @return $this Fluent Builder */ public function setEId(string $eId): self { $this->options['eId'] = $eId; return $this; } /** * The sim_registration_code * * @param string $simRegistrationCode The sim_registration_code * @return $this Fluent Builder */ public function setSimRegistrationCode(string $simRegistrationCode): self { $this->options['simRegistrationCode'] = $simRegistrationCode; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Wireless.ReadSimOptions ' . $options . ']'; } } class UpdateSimOptions extends Options { /** * @param string $uniqueName The unique_name * @param string $callbackMethod The callback_method * @param string $callbackUrl The callback_url * @param string $friendlyName The friendly_name * @param string $ratePlan The rate_plan * @param string $status The status * @param string $commandsCallbackMethod The commands_callback_method * @param string $commandsCallbackUrl The commands_callback_url * @param string $smsFallbackMethod The sms_fallback_method * @param string $smsFallbackUrl The sms_fallback_url * @param string $smsMethod The sms_method * @param string $smsUrl The sms_url * @param string $voiceFallbackMethod The voice_fallback_method * @param string $voiceFallbackUrl The voice_fallback_url * @param string $voiceMethod The voice_method * @param string $voiceUrl The voice_url */ public function __construct(string $uniqueName = Values::NONE, string $callbackMethod = Values::NONE, string $callbackUrl = Values::NONE, string $friendlyName = Values::NONE, string $ratePlan = Values::NONE, string $status = Values::NONE, string $commandsCallbackMethod = Values::NONE, string $commandsCallbackUrl = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE) { $this->options['uniqueName'] = $uniqueName; $this->options['callbackMethod'] = $callbackMethod; $this->options['callbackUrl'] = $callbackUrl; $this->options['friendlyName'] = $friendlyName; $this->options['ratePlan'] = $ratePlan; $this->options['status'] = $status; $this->options['commandsCallbackMethod'] = $commandsCallbackMethod; $this->options['commandsCallbackUrl'] = $commandsCallbackUrl; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The callback_method * * @param string $callbackMethod The callback_method * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * The callback_url * * @param string $callbackUrl The callback_url * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The rate_plan * * @param string $ratePlan The rate_plan * @return $this Fluent Builder */ public function setRatePlan(string $ratePlan): self { $this->options['ratePlan'] = $ratePlan; return $this; } /** * The status * * @param string $status The status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The commands_callback_method * * @param string $commandsCallbackMethod The commands_callback_method * @return $this Fluent Builder */ public function setCommandsCallbackMethod(string $commandsCallbackMethod): self { $this->options['commandsCallbackMethod'] = $commandsCallbackMethod; return $this; } /** * The commands_callback_url * * @param string $commandsCallbackUrl The commands_callback_url * @return $this Fluent Builder */ public function setCommandsCallbackUrl(string $commandsCallbackUrl): self { $this->options['commandsCallbackUrl'] = $commandsCallbackUrl; return $this; } /** * The sms_fallback_method * * @param string $smsFallbackMethod The sms_fallback_method * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The sms_fallback_url * * @param string $smsFallbackUrl The sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The sms_method * * @param string $smsMethod The sms_method * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The sms_url * * @param string $smsUrl The sms_url * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * The voice_fallback_method * * @param string $voiceFallbackMethod The voice_fallback_method * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The voice_fallback_url * * @param string $voiceFallbackUrl The voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The voice_method * * @param string $voiceMethod The voice_method * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The voice_url * * @param string $voiceUrl The voice_url * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Wireless.UpdateSimOptions ' . $options . ']'; } }PKt[00-Twilio/Rest/Preview/Wireless/RatePlanList.phpnu[solution = []; $this->uri = '/RatePlans'; } /** * Streams RatePlanInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RatePlanInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RatePlanInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of RatePlanInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RatePlanPage Page of RatePlanInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RatePlanPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RatePlanPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RatePlanInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RatePlanPage Page of RatePlanInstance */ public function getPage(string $targetUrl): RatePlanPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RatePlanPage($this->version, $response, $this->solution); } /** * Create the RatePlanInstance * * @param array|Options $options Optional Arguments * @return RatePlanInstance Created RatePlanInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): RatePlanInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'FriendlyName' => $options['friendlyName'], 'DataEnabled' => Serialize::booleanToString($options['dataEnabled']), 'DataLimit' => $options['dataLimit'], 'DataMetering' => $options['dataMetering'], 'MessagingEnabled' => Serialize::booleanToString($options['messagingEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'CommandsEnabled' => Serialize::booleanToString($options['commandsEnabled']), 'NationalRoamingEnabled' => Serialize::booleanToString($options['nationalRoamingEnabled']), 'InternationalRoaming' => Serialize::map($options['internationalRoaming'], function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RatePlanInstance($this->version, $payload); } /** * Constructs a RatePlanContext * * @param string $sid The sid */ public function getContext(string $sid): RatePlanContext { return new RatePlanContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Wireless.RatePlanList]'; } }PKt[]B__-Twilio/Rest/Preview/Wireless/RatePlanPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RatePlanInstance \Twilio\Rest\Preview\Wireless\RatePlanInstance */ public function buildInstance(array $payload): RatePlanInstance { return new RatePlanInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Wireless.RatePlanPage]'; } }PKt[i' 0Twilio/Rest/Preview/Wireless/RatePlanOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['friendlyName'] = $friendlyName; $this->options['dataEnabled'] = $dataEnabled; $this->options['dataLimit'] = $dataLimit; $this->options['dataMetering'] = $dataMetering; $this->options['messagingEnabled'] = $messagingEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['commandsEnabled'] = $commandsEnabled; $this->options['nationalRoamingEnabled'] = $nationalRoamingEnabled; $this->options['internationalRoaming'] = $internationalRoaming; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The data_enabled * * @param bool $dataEnabled The data_enabled * @return $this Fluent Builder */ public function setDataEnabled(bool $dataEnabled): self { $this->options['dataEnabled'] = $dataEnabled; return $this; } /** * The data_limit * * @param int $dataLimit The data_limit * @return $this Fluent Builder */ public function setDataLimit(int $dataLimit): self { $this->options['dataLimit'] = $dataLimit; return $this; } /** * The data_metering * * @param string $dataMetering The data_metering * @return $this Fluent Builder */ public function setDataMetering(string $dataMetering): self { $this->options['dataMetering'] = $dataMetering; return $this; } /** * The messaging_enabled * * @param bool $messagingEnabled The messaging_enabled * @return $this Fluent Builder */ public function setMessagingEnabled(bool $messagingEnabled): self { $this->options['messagingEnabled'] = $messagingEnabled; return $this; } /** * The voice_enabled * * @param bool $voiceEnabled The voice_enabled * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * The commands_enabled * * @param bool $commandsEnabled The commands_enabled * @return $this Fluent Builder */ public function setCommandsEnabled(bool $commandsEnabled): self { $this->options['commandsEnabled'] = $commandsEnabled; return $this; } /** * The national_roaming_enabled * * @param bool $nationalRoamingEnabled The national_roaming_enabled * @return $this Fluent Builder */ public function setNationalRoamingEnabled(bool $nationalRoamingEnabled): self { $this->options['nationalRoamingEnabled'] = $nationalRoamingEnabled; return $this; } /** * The international_roaming * * @param string[] $internationalRoaming The international_roaming * @return $this Fluent Builder */ public function setInternationalRoaming(array $internationalRoaming): self { $this->options['internationalRoaming'] = $internationalRoaming; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Wireless.CreateRatePlanOptions ' . $options . ']'; } } class UpdateRatePlanOptions extends Options { /** * @param string $uniqueName The unique_name * @param string $friendlyName The friendly_name */ public function __construct(string $uniqueName = Values::NONE, string $friendlyName = Values::NONE) { $this->options['uniqueName'] = $uniqueName; $this->options['friendlyName'] = $friendlyName; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Wireless.UpdateRatePlanOptions ' . $options . ']'; } }PKt[P䀵.Twilio/Rest/Preview/Wireless/Sim/UsageList.phpnu[solution = ['simSid' => $simSid, ]; } /** * Constructs a UsageContext */ public function getContext(): UsageContext { return new UsageContext($this->version, $this->solution['simSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Wireless.UsageList]'; } }PKt[7mm2Twilio/Rest/Preview/Wireless/Sim/UsageInstance.phpnu[properties = [ 'simSid' => Values::array_get($payload, 'sim_sid'), 'simUniqueName' => Values::array_get($payload, 'sim_unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'period' => Values::array_get($payload, 'period'), 'commandsUsage' => Values::array_get($payload, 'commands_usage'), 'commandsCosts' => Values::array_get($payload, 'commands_costs'), 'dataUsage' => Values::array_get($payload, 'data_usage'), 'dataCosts' => Values::array_get($payload, 'data_costs'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['simSid' => $simSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UsageContext Context for this UsageInstance */ protected function proxy(): UsageContext { if (!$this->context) { $this->context = new UsageContext($this->version, $this->solution['simSid']); } return $this->context; } /** * Fetch the UsageInstance * * @param array|Options $options Optional Arguments * @return UsageInstance Fetched UsageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): UsageInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Wireless.UsageInstance ' . \implode(' ', $context) . ']'; } }PKt[01Twilio/Rest/Preview/Wireless/Sim/UsageContext.phpnu[solution = ['simSid' => $simSid, ]; $this->uri = '/Sims/' . \rawurlencode($simSid) . '/Usage'; } /** * Fetch the UsageInstance * * @param array|Options $options Optional Arguments * @return UsageInstance Fetched UsageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): UsageInstance { $options = new Values($options); $params = Values::of(['End' => $options['end'], 'Start' => $options['start'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new UsageInstance($this->version, $payload, $this->solution['simSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Preview.Wireless.UsageContext ' . \implode(' ', $context) . ']'; } }PKt[U x,,1Twilio/Rest/Preview/Wireless/Sim/UsageOptions.phpnu[options['end'] = $end; $this->options['start'] = $start; } /** * The end * * @param string $end The end * @return $this Fluent Builder */ public function setEnd(string $end): self { $this->options['end'] = $end; return $this; } /** * The start * * @param string $start The start * @return $this Fluent Builder */ public function setStart(string $start): self { $this->options['start'] = $start; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Wireless.FetchUsageOptions ' . $options . ']'; } }PKt[* pp.Twilio/Rest/Preview/Wireless/Sim/UsagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UsageInstance \Twilio\Rest\Preview\Wireless\Sim\UsageInstance */ public function buildInstance(array $payload): UsageInstance { return new UsageInstance($this->version, $payload, $this->solution['simSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Preview.Wireless.UsagePage]'; } }PKt[D/Twilio/Rest/Preview/Wireless/CommandOptions.phpnu[options['device'] = $device; $this->options['sim'] = $sim; $this->options['status'] = $status; $this->options['direction'] = $direction; } /** * The device * * @param string $device The device * @return $this Fluent Builder */ public function setDevice(string $device): self { $this->options['device'] = $device; return $this; } /** * The sim * * @param string $sim The sim * @return $this Fluent Builder */ public function setSim(string $sim): self { $this->options['sim'] = $sim; return $this; } /** * The status * * @param string $status The status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The direction * * @param string $direction The direction * @return $this Fluent Builder */ public function setDirection(string $direction): self { $this->options['direction'] = $direction; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Wireless.ReadCommandOptions ' . $options . ']'; } } class CreateCommandOptions extends Options { /** * @param string $device The device * @param string $sim The sim * @param string $callbackMethod The callback_method * @param string $callbackUrl The callback_url * @param string $commandMode The command_mode * @param string $includeSid The include_sid */ public function __construct(string $device = Values::NONE, string $sim = Values::NONE, string $callbackMethod = Values::NONE, string $callbackUrl = Values::NONE, string $commandMode = Values::NONE, string $includeSid = Values::NONE) { $this->options['device'] = $device; $this->options['sim'] = $sim; $this->options['callbackMethod'] = $callbackMethod; $this->options['callbackUrl'] = $callbackUrl; $this->options['commandMode'] = $commandMode; $this->options['includeSid'] = $includeSid; } /** * The device * * @param string $device The device * @return $this Fluent Builder */ public function setDevice(string $device): self { $this->options['device'] = $device; return $this; } /** * The sim * * @param string $sim The sim * @return $this Fluent Builder */ public function setSim(string $sim): self { $this->options['sim'] = $sim; return $this; } /** * The callback_method * * @param string $callbackMethod The callback_method * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * The callback_url * * @param string $callbackUrl The callback_url * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * The command_mode * * @param string $commandMode The command_mode * @return $this Fluent Builder */ public function setCommandMode(string $commandMode): self { $this->options['commandMode'] = $commandMode; return $this; } /** * The include_sid * * @param string $includeSid The include_sid * @return $this Fluent Builder */ public function setIncludeSid(string $includeSid): self { $this->options['includeSid'] = $includeSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Preview.Wireless.CreateCommandOptions ' . $options . ']'; } }PKt[m2Twilio/Rest/Pricing.phpnu[baseUrl = 'https://pricing.twilio.com'; } /** * @return V1 Version v1 of pricing */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * @return V2 Version v2 of pricing */ protected function getV2(): V2 { if (!$this->_v2) { $this->_v2 = new V2($this); } return $this->_v2; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getMessaging(): \Twilio\Rest\Pricing\V1\MessagingList { return $this->v1->messaging; } protected function getPhoneNumbers(): \Twilio\Rest\Pricing\V1\PhoneNumberList { return $this->v1->phoneNumbers; } protected function getVoice(): \Twilio\Rest\Pricing\V2\VoiceList { return $this->v2->voice; } protected function getCountries(): \Twilio\Rest\Pricing\V2\CountryList { return $this->v2->countries; } /** * @param string $isoCountry The ISO country code of the pricing information to * fetch */ protected function contextCountries(string $isoCountry): \Twilio\Rest\Pricing\V2\CountryContext { return $this->v2->countries($isoCountry); } protected function getNumbers(): \Twilio\Rest\Pricing\V2\NumberList { return $this->v2->numbers; } /** * @param string $destinationNumber The destination number for which to fetch * pricing information */ protected function contextNumbers(string $destinationNumber): \Twilio\Rest\Pricing\V2\NumberContext { return $this->v2->numbers($destinationNumber); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Pricing]'; } }PKt[\ Twilio/Rest/Studio.phpnu[baseUrl = 'https://studio.twilio.com'; } /** * @return V1 Version v1 of studio */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * @return V2 Version v2 of studio */ protected function getV2(): V2 { if (!$this->_v2) { $this->_v2 = new V2($this); } return $this->_v2; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getFlows(): \Twilio\Rest\Studio\V2\FlowList { return $this->v2->flows; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextFlows(string $sid): \Twilio\Rest\Studio\V2\FlowContext { return $this->v2->flows($sid); } protected function getFlowValidate(): \Twilio\Rest\Studio\V2\FlowValidateList { return $this->v2->flowValidate; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Studio]'; } }PKt[>}!Twilio/Rest/Video/V1/RoomList.phpnu[solution = []; $this->uri = '/Rooms'; } /** * Create the RoomInstance * * @param array|Options $options Optional Arguments * @return RoomInstance Created RoomInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): RoomInstance { $options = new Values($options); $data = Values::of([ 'EnableTurn' => Serialize::booleanToString($options['enableTurn']), 'Type' => $options['type'], 'UniqueName' => $options['uniqueName'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'MaxParticipants' => $options['maxParticipants'], 'RecordParticipantsOnConnect' => Serialize::booleanToString($options['recordParticipantsOnConnect']), 'VideoCodecs' => Serialize::map($options['videoCodecs'], function($e) { return $e; }), 'MediaRegion' => $options['mediaRegion'], 'RecordingRules' => Serialize::jsonObject($options['recordingRules']), 'AudioOnly' => Serialize::booleanToString($options['audioOnly']), 'MaxParticipantDuration' => $options['maxParticipantDuration'], 'EmptyRoomTimeout' => $options['emptyRoomTimeout'], 'UnusedRoomTimeout' => $options['unusedRoomTimeout'], 'LargeRoom' => Serialize::booleanToString($options['largeRoom']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RoomInstance($this->version, $payload); } /** * Streams RoomInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RoomInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RoomInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RoomInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RoomPage Page of RoomInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RoomPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'UniqueName' => $options['uniqueName'], 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RoomPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RoomInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RoomPage Page of RoomInstance */ public function getPage(string $targetUrl): RoomPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RoomPage($this->version, $response, $this->solution); } /** * Constructs a RoomContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): RoomContext { return new RoomContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RoomList]'; } }PKt[U@4Twilio/Rest/Video/V1/CompositionSettingsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'awsCredentialsSid' => Values::array_get($payload, 'aws_credentials_sid'), 'awsS3Url' => Values::array_get($payload, 'aws_s3_url'), 'awsStorageEnabled' => Values::array_get($payload, 'aws_storage_enabled'), 'encryptionKeySid' => Values::array_get($payload, 'encryption_key_sid'), 'encryptionEnabled' => Values::array_get($payload, 'encryption_enabled'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CompositionSettingsContext Context for this * CompositionSettingsInstance */ protected function proxy(): CompositionSettingsContext { if (!$this->context) { $this->context = new CompositionSettingsContext($this->version); } return $this->context; } /** * Fetch the CompositionSettingsInstance * * @return CompositionSettingsInstance Fetched CompositionSettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CompositionSettingsInstance { return $this->proxy()->fetch(); } /** * Create the CompositionSettingsInstance * * @param string $friendlyName A descriptive string that you create to describe * the resource * @param array|Options $options Optional Arguments * @return CompositionSettingsInstance Created CompositionSettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): CompositionSettingsInstance { return $this->proxy()->create($friendlyName, $options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.CompositionSettingsInstance ' . \implode(' ', $context) . ']'; } }PKt[ j  3Twilio/Rest/Video/V1/CompositionSettingsOptions.phpnu[options['awsCredentialsSid'] = $awsCredentialsSid; $this->options['encryptionKeySid'] = $encryptionKeySid; $this->options['awsS3Url'] = $awsS3Url; $this->options['awsStorageEnabled'] = $awsStorageEnabled; $this->options['encryptionEnabled'] = $encryptionEnabled; } /** * The SID of the stored Credential resource. * * @param string $awsCredentialsSid The SID of the stored Credential resource * @return $this Fluent Builder */ public function setAwsCredentialsSid(string $awsCredentialsSid): self { $this->options['awsCredentialsSid'] = $awsCredentialsSid; return $this; } /** * The SID of the Public Key resource to use for encryption. * * @param string $encryptionKeySid The SID of the Public Key resource to use * for encryption * @return $this Fluent Builder */ public function setEncryptionKeySid(string $encryptionKeySid): self { $this->options['encryptionKeySid'] = $encryptionKeySid; return $this; } /** * The URL of the AWS S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/compositions`, where `compositions` is the path in which you want the compositions to be stored. This URL accepts only URI-valid characters, as described in the RFC 3986. * * @param string $awsS3Url The URL of the AWS S3 bucket where the compositions * should be stored * @return $this Fluent Builder */ public function setAwsS3Url(string $awsS3Url): self { $this->options['awsS3Url'] = $awsS3Url; return $this; } /** * Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud. * * @param bool $awsStorageEnabled Whether all compositions should be written to * the aws_s3_url * @return $this Fluent Builder */ public function setAwsStorageEnabled(bool $awsStorageEnabled): self { $this->options['awsStorageEnabled'] = $awsStorageEnabled; return $this; } /** * Whether all compositions should be stored in an encrypted form. The default is `false`. * * @param bool $encryptionEnabled Whether all compositions should be stored in * an encrypted form * @return $this Fluent Builder */ public function setEncryptionEnabled(bool $encryptionEnabled): self { $this->options['encryptionEnabled'] = $encryptionEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.CreateCompositionSettingsOptions ' . $options . ']'; } }PKt[R=$Twilio/Rest/Video/V1/RoomContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Rooms/' . \rawurlencode($sid) . ''; } /** * Fetch the RoomInstance * * @return RoomInstance Fetched RoomInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoomInstance { $payload = $this->version->fetch('GET', $this->uri); return new RoomInstance($this->version, $payload, $this->solution['sid']); } /** * Update the RoomInstance * * @param string $status The new status of the resource * @return RoomInstance Updated RoomInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): RoomInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RoomInstance($this->version, $payload, $this->solution['sid']); } /** * Access the recordings */ protected function getRecordings(): RoomRecordingList { if (!$this->_recordings) { $this->_recordings = new RoomRecordingList($this->version, $this->solution['sid']); } return $this->_recordings; } /** * Access the participants */ protected function getParticipants(): ParticipantList { if (!$this->_participants) { $this->_participants = new ParticipantList($this->version, $this->solution['sid']); } return $this->_participants; } /** * Access the recordingRules */ protected function getRecordingRules(): RecordingRulesList { if (!$this->_recordingRules) { $this->_recordingRules = new RecordingRulesList($this->version, $this->solution['sid']); } return $this->_recordingRules; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.RoomContext ' . \implode(' ', $context) . ']'; } }PKt[L1Twilio/Rest/Video/V1/RecordingSettingsOptions.phpnu[options['awsCredentialsSid'] = $awsCredentialsSid; $this->options['encryptionKeySid'] = $encryptionKeySid; $this->options['awsS3Url'] = $awsS3Url; $this->options['awsStorageEnabled'] = $awsStorageEnabled; $this->options['encryptionEnabled'] = $encryptionEnabled; } /** * The SID of the stored Credential resource. * * @param string $awsCredentialsSid The SID of the stored Credential resource * @return $this Fluent Builder */ public function setAwsCredentialsSid(string $awsCredentialsSid): self { $this->options['awsCredentialsSid'] = $awsCredentialsSid; return $this; } /** * The SID of the Public Key resource to use for encryption. * * @param string $encryptionKeySid The SID of the Public Key resource to use * for encryption * @return $this Fluent Builder */ public function setEncryptionKeySid(string $encryptionKeySid): self { $this->options['encryptionKeySid'] = $encryptionKeySid; return $this; } /** * The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/recordings`, where `recordings` is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the RFC 3986. * * @param string $awsS3Url The URL of the AWS S3 bucket where the recordings * should be stored * @return $this Fluent Builder */ public function setAwsS3Url(string $awsS3Url): self { $this->options['awsS3Url'] = $awsS3Url; return $this; } /** * Whether all recordings should be written to the `aws_s3_url`. When `false`, all recordings are stored in our cloud. * * @param bool $awsStorageEnabled Whether all recordings should be written to * the aws_s3_url * @return $this Fluent Builder */ public function setAwsStorageEnabled(bool $awsStorageEnabled): self { $this->options['awsStorageEnabled'] = $awsStorageEnabled; return $this; } /** * Whether all recordings should be stored in an encrypted form. The default is `false`. * * @param bool $encryptionEnabled Whether all recordings should be stored in an * encrypted form * @return $this Fluent Builder */ public function setEncryptionEnabled(bool $encryptionEnabled): self { $this->options['encryptionEnabled'] = $encryptionEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.CreateRecordingSettingsOptions ' . $options . ']'; } }PKt[j:JJ&Twilio/Rest/Video/V1/RecordingList.phpnu[solution = []; $this->uri = '/Recordings'; } /** * Streams RecordingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RecordingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RecordingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RecordingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RecordingPage Page of RecordingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RecordingPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'SourceSid' => $options['sourceSid'], 'GroupingSid' => Serialize::map($options['groupingSid'], function($e) { return $e; }), 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'MediaType' => $options['mediaType'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RecordingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RecordingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RecordingPage Page of RecordingInstance */ public function getPage(string $targetUrl): RecordingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RecordingPage($this->version, $response, $this->solution); } /** * Constructs a RecordingContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): RecordingContext { return new RecordingContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RecordingList]'; } }PKt[3JEE$Twilio/Rest/Video/V1/RoomOptions.phpnu[options['enableTurn'] = $enableTurn; $this->options['type'] = $type; $this->options['uniqueName'] = $uniqueName; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['maxParticipants'] = $maxParticipants; $this->options['recordParticipantsOnConnect'] = $recordParticipantsOnConnect; $this->options['videoCodecs'] = $videoCodecs; $this->options['mediaRegion'] = $mediaRegion; $this->options['recordingRules'] = $recordingRules; $this->options['audioOnly'] = $audioOnly; $this->options['maxParticipantDuration'] = $maxParticipantDuration; $this->options['emptyRoomTimeout'] = $emptyRoomTimeout; $this->options['unusedRoomTimeout'] = $unusedRoomTimeout; $this->options['largeRoom'] = $largeRoom; } /** * Deprecated, now always considered to be true. * * @param bool $enableTurn Enable Twilio's Network Traversal TURN service * @return $this Fluent Builder */ public function setEnableTurn(bool $enableTurn): self { $this->options['enableTurn'] = $enableTurn; return $this; } /** * The type of room. Can be: `go`, `peer-to-peer`, `group-small`, or `group`. The default value is `group`. * * @param string $type The type of room * @return $this Fluent Builder */ public function setType(string $type): self { $this->options['type'] = $type; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource's `sid` in the URL to address the resource, assuming it does not contain any [reserved characters](https://tools.ietf.org/html/rfc3986#section-2.2) that would need to be URL encoded. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info. * * @param string $statusCallback The URL to send status information to your * application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be `POST` or `GET`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * The maximum number of concurrent Participants allowed in the room. Peer-to-peer rooms can have up to 10 Participants. Small Group rooms can have up to 4 Participants. Group rooms can have up to 50 Participants. * * @param int $maxParticipants The maximum number of concurrent Participants * allowed in the room * @return $this Fluent Builder */ public function setMaxParticipants(int $maxParticipants): self { $this->options['maxParticipants'] = $maxParticipants; return $this; } /** * Whether to start recording when Participants connect. ***This feature is not available in `peer-to-peer` rooms.*** * * @param bool $recordParticipantsOnConnect Whether to start recording when * Participants connect * @return $this Fluent Builder */ public function setRecordParticipantsOnConnect(bool $recordParticipantsOnConnect): self { $this->options['recordParticipantsOnConnect'] = $recordParticipantsOnConnect; return $this; } /** * An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms*** * * @param string[] $videoCodecs An array of the video codecs that are supported * when publishing a track in the room * @return $this Fluent Builder */ public function setVideoCodecs(array $videoCodecs): self { $this->options['videoCodecs'] = $videoCodecs; return $this; } /** * The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-address-whitelisting#group-rooms-media-servers). ***This feature is not available in `peer-to-peer` rooms.*** * * @param string $mediaRegion The region for the media server in Group Rooms * @return $this Fluent Builder */ public function setMediaRegion(string $mediaRegion): self { $this->options['mediaRegion'] = $mediaRegion; return $this; } /** * A collection of Recording Rules that describe how to include or exclude matching tracks for recording * * @param array $recordingRules A collection of Recording Rules * @return $this Fluent Builder */ public function setRecordingRules(array $recordingRules): self { $this->options['recordingRules'] = $recordingRules; return $this; } /** * When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed. Group rooms only. * * @param bool $audioOnly Indicates whether the room will only contain audio * track participants for group rooms. * @return $this Fluent Builder */ public function setAudioOnly(bool $audioOnly): self { $this->options['audioOnly'] = $audioOnly; return $this; } /** * The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours). * * @param int $maxParticipantDuration The maximum number of seconds a * Participant can be connected to the room * @return $this Fluent Builder */ public function setMaxParticipantDuration(int $maxParticipantDuration): self { $this->options['maxParticipantDuration'] = $maxParticipantDuration; return $this; } /** * Configures how long (in minutes) a room will remain active after last participant leaves. Valid values range from 1 to 60 minutes (no fractions). * * @param int $emptyRoomTimeout Configures the time a room will remain active * after last participant leaves. * @return $this Fluent Builder */ public function setEmptyRoomTimeout(int $emptyRoomTimeout): self { $this->options['emptyRoomTimeout'] = $emptyRoomTimeout; return $this; } /** * Configures how long (in minutes) a room will remain active if no one joins. Valid values range from 1 to 60 minutes (no fractions). * * @param int $unusedRoomTimeout Configures the time a room will remain active * when no one joins. * @return $this Fluent Builder */ public function setUnusedRoomTimeout(int $unusedRoomTimeout): self { $this->options['unusedRoomTimeout'] = $unusedRoomTimeout; return $this; } /** * When set to true, indicated that this is the large room. * * @param bool $largeRoom Indicates whether this is a large room. * @return $this Fluent Builder */ public function setLargeRoom(bool $largeRoom): self { $this->options['largeRoom'] = $largeRoom; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.CreateRoomOptions ' . $options . ']'; } } class ReadRoomOptions extends Options { /** * @param string $status Read only the rooms with this status * @param string $uniqueName Read only rooms with this unique_name * @param \DateTime $dateCreatedAfter Read only rooms that started on or after * this date, given as YYYY-MM-DD * @param \DateTime $dateCreatedBefore Read only rooms that started before this * date, given as YYYY-MM-DD */ public function __construct(string $status = Values::NONE, string $uniqueName = Values::NONE, \DateTime $dateCreatedAfter = Values::NONE, \DateTime $dateCreatedBefore = Values::NONE) { $this->options['status'] = $status; $this->options['uniqueName'] = $uniqueName; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['dateCreatedBefore'] = $dateCreatedBefore; } /** * Read only the rooms with this status. Can be: `in-progress` (default) or `completed` * * @param string $status Read only the rooms with this status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Read only rooms with the this `unique_name`. * * @param string $uniqueName Read only rooms with this unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Read only rooms that started on or after this date, given as `YYYY-MM-DD`. * * @param \DateTime $dateCreatedAfter Read only rooms that started on or after * this date, given as YYYY-MM-DD * @return $this Fluent Builder */ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Read only rooms that started before this date, given as `YYYY-MM-DD`. * * @param \DateTime $dateCreatedBefore Read only rooms that started before this * date, given as YYYY-MM-DD * @return $this Fluent Builder */ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.ReadRoomOptions ' . $options . ']'; } }PKt[87.Twilio/Rest/Video/V1/RecordingSettingsList.phpnu[solution = []; } /** * Constructs a RecordingSettingsContext */ public function getContext(): RecordingSettingsContext { return new RecordingSettingsContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RecordingSettingsList]'; } }PKt[B)Twilio/Rest/Video/V1/RecordingOptions.phpnu[options['status'] = $status; $this->options['sourceSid'] = $sourceSid; $this->options['groupingSid'] = $groupingSid; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['mediaType'] = $mediaType; } /** * Read only the recordings that have this status. Can be: `processing`, `completed`, or `deleted`. * * @param string $status Read only the recordings that have this status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Read only the recordings that have this `source_sid`. * * @param string $sourceSid Read only the recordings that have this source_sid * @return $this Fluent Builder */ public function setSourceSid(string $sourceSid): self { $this->options['sourceSid'] = $sourceSid; return $this; } /** * Read only recordings with this `grouping_sid`, which may include a `participant_sid` and/or a `room_sid`. * * @param string[] $groupingSid Read only recordings that have this grouping_sid * @return $this Fluent Builder */ public function setGroupingSid(array $groupingSid): self { $this->options['groupingSid'] = $groupingSid; return $this; } /** * Read only recordings that started on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone. * * @param \DateTime $dateCreatedAfter Read only recordings that started on or * after this [ISO * 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone * @return $this Fluent Builder */ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Read only recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone, given as `YYYY-MM-DDThh:mm:ss+|-hh:mm` or `YYYY-MM-DDThh:mm:ssZ`. * * @param \DateTime $dateCreatedBefore Read only recordings that started before * this [ISO * 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone * @return $this Fluent Builder */ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Read only recordings that have this media type. Can be either `audio` or `video`. * * @param string $mediaType Read only recordings that have this media type * @return $this Fluent Builder */ public function setMediaType(string $mediaType): self { $this->options['mediaType'] = $mediaType; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.ReadRecordingOptions ' . $options . ']'; } }PKt[åd(Twilio/Rest/Video/V1/CompositionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CompositionInstance \Twilio\Rest\Video\V1\CompositionInstance */ public function buildInstance(array $payload): CompositionInstance { return new CompositionInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.CompositionPage]'; } }PKt[X,Twilio/Rest/Video/V1/CompositionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'status' => Values::array_get($payload, 'status'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateCompleted' => Deserialize::dateTime(Values::array_get($payload, 'date_completed')), 'dateDeleted' => Deserialize::dateTime(Values::array_get($payload, 'date_deleted')), 'sid' => Values::array_get($payload, 'sid'), 'roomSid' => Values::array_get($payload, 'room_sid'), 'audioSources' => Values::array_get($payload, 'audio_sources'), 'audioSourcesExcluded' => Values::array_get($payload, 'audio_sources_excluded'), 'videoLayout' => Values::array_get($payload, 'video_layout'), 'resolution' => Values::array_get($payload, 'resolution'), 'trim' => Values::array_get($payload, 'trim'), 'format' => Values::array_get($payload, 'format'), 'bitrate' => Values::array_get($payload, 'bitrate'), 'size' => Values::array_get($payload, 'size'), 'duration' => Values::array_get($payload, 'duration'), 'mediaExternalLocation' => Values::array_get($payload, 'media_external_location'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CompositionContext Context for this CompositionInstance */ protected function proxy(): CompositionContext { if (!$this->context) { $this->context = new CompositionContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CompositionInstance * * @return CompositionInstance Fetched CompositionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CompositionInstance { return $this->proxy()->fetch(); } /** * Delete the CompositionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.CompositionInstance ' . \implode(' ', $context) . ']'; } }PKt[~1)Twilio/Rest/Video/V1/RecordingContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Recordings/' . \rawurlencode($sid) . ''; } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { $payload = $this->version->fetch('GET', $this->uri); return new RecordingInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the RecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.RecordingContext ' . \implode(' ', $context) . ']'; } }PKt[pjTT*Twilio/Rest/Video/V1/RecordingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'status' => Values::array_get($payload, 'status'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'sid' => Values::array_get($payload, 'sid'), 'sourceSid' => Values::array_get($payload, 'source_sid'), 'size' => Values::array_get($payload, 'size'), 'url' => Values::array_get($payload, 'url'), 'type' => Values::array_get($payload, 'type'), 'duration' => Values::array_get($payload, 'duration'), 'containerFormat' => Values::array_get($payload, 'container_format'), 'codec' => Values::array_get($payload, 'codec'), 'groupingSids' => Values::array_get($payload, 'grouping_sids'), 'trackName' => Values::array_get($payload, 'track_name'), 'offset' => Values::array_get($payload, 'offset'), 'mediaExternalLocation' => Values::array_get($payload, 'media_external_location'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RecordingContext Context for this RecordingInstance */ protected function proxy(): RecordingContext { if (!$this->context) { $this->context = new RecordingContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the RecordingInstance * * @return RecordingInstance Fetched RecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingInstance { return $this->proxy()->fetch(); } /** * Delete the RecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.RecordingInstance ' . \implode(' ', $context) . ']'; } }PKt[2-Twilio/Rest/Video/V1/Room/ParticipantList.phpnu[solution = ['roomSid' => $roomSid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants'; } /** * Streams ParticipantInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ParticipantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ParticipantInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ParticipantInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ParticipantPage Page of ParticipantInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ParticipantPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'Identity' => $options['identity'], 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ParticipantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ParticipantInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ParticipantPage Page of ParticipantInstance */ public function getPage(string $targetUrl): ParticipantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ParticipantPage($this->version, $response, $this->solution); } /** * Constructs a ParticipantContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): ParticipantContext { return new ParticipantContext($this->version, $this->solution['roomSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.ParticipantList]'; } }PKt[l|2Twilio/Rest/Video/V1/Room/RoomRecordingOptions.phpnu[options['status'] = $status; $this->options['sourceSid'] = $sourceSid; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['dateCreatedBefore'] = $dateCreatedBefore; } /** * Read only the recordings with this status. Can be: `processing`, `completed`, or `deleted`. * * @param string $status Read only the recordings with this status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Read only the recordings that have this `source_sid`. * * @param string $sourceSid Read only the recordings that have this source_sid * @return $this Fluent Builder */ public function setSourceSid(string $sourceSid): self { $this->options['sourceSid'] = $sourceSid; return $this; } /** * Read only recordings that started on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. * * @param \DateTime $dateCreatedAfter Read only Recordings that started on or * after this ISO 8601 datetime with time * zone * @return $this Fluent Builder */ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Read only Recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. * * @param \DateTime $dateCreatedBefore Read only Recordings that started before * this ISO 8601 date-time with time zone * @return $this Fluent Builder */ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.ReadRoomRecordingOptions ' . $options . ']'; } }PKt[oaa1Twilio/Rest/Video/V1/Room/ParticipantInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'roomSid' => Values::array_get($payload, 'room_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'status' => Values::array_get($payload, 'status'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'duration' => Values::array_get($payload, 'duration'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['roomSid' => $roomSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ParticipantContext Context for this ParticipantInstance */ protected function proxy(): ParticipantContext { if (!$this->context) { $this->context = new ParticipantContext( $this->version, $this->solution['roomSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { return $this->proxy()->fetch(); } /** * Update the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Updated ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ParticipantInstance { return $this->proxy()->update($options); } /** * Access the publishedTracks */ protected function getPublishedTracks(): PublishedTrackList { return $this->proxy()->publishedTracks; } /** * Access the subscribedTracks */ protected function getSubscribedTracks(): SubscribedTrackList { return $this->proxy()->subscribedTracks; } /** * Access the subscribeRules */ protected function getSubscribeRules(): SubscribeRulesList { return $this->proxy()->subscribeRules; } /** * Access the anonymize */ protected function getAnonymize(): AnonymizeList { return $this->proxy()->anonymize; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.ParticipantInstance ' . \implode(' ', $context) . ']'; } }PKt[x:Twilio/Rest/Video/V1/Room/Participant/AnonymizeContext.phpnu[solution = ['roomSid' => $roomSid, 'sid' => $sid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($sid) . '/Anonymize'; } /** * Update the AnonymizeInstance * * @return AnonymizeInstance Updated AnonymizeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(): AnonymizeInstance { $payload = $this->version->update('POST', $this->uri); return new AnonymizeInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.AnonymizeContext ' . \implode(' ', $context) . ']'; } }PKt[ WW;Twilio/Rest/Video/V1/Room/Participant/AnonymizeInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'roomSid' => Values::array_get($payload, 'room_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'status' => Values::array_get($payload, 'status'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'duration' => Values::array_get($payload, 'duration'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['roomSid' => $roomSid, 'sid' => $sid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AnonymizeContext Context for this AnonymizeInstance */ protected function proxy(): AnonymizeContext { if (!$this->context) { $this->context = new AnonymizeContext( $this->version, $this->solution['roomSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the AnonymizeInstance * * @return AnonymizeInstance Updated AnonymizeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(): AnonymizeInstance { return $this->proxy()->update(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.AnonymizeInstance ' . \implode(' ', $context) . ']'; } }PKt[:+too?Twilio/Rest/Video/V1/Room/Participant/PublishedTrackContext.phpnu[solution = ['roomSid' => $roomSid, 'participantSid' => $participantSid, 'sid' => $sid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . '/PublishedTracks/' . \rawurlencode($sid) . ''; } /** * Fetch the PublishedTrackInstance * * @return PublishedTrackInstance Fetched PublishedTrackInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PublishedTrackInstance { $payload = $this->version->fetch('GET', $this->uri); return new PublishedTrackInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.PublishedTrackContext ' . \implode(' ', $context) . ']'; } }PKt[=Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackList.phpnu[solution = ['roomSid' => $roomSid, 'participantSid' => $participantSid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . '/SubscribedTracks'; } /** * Streams SubscribedTrackInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SubscribedTrackInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SubscribedTrackInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SubscribedTrackInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SubscribedTrackPage Page of SubscribedTrackInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SubscribedTrackPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SubscribedTrackPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SubscribedTrackInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SubscribedTrackPage Page of SubscribedTrackInstance */ public function getPage(string $targetUrl): SubscribedTrackPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SubscribedTrackPage($this->version, $response, $this->solution); } /** * Constructs a SubscribedTrackContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): SubscribedTrackContext { return new SubscribedTrackContext( $this->version, $this->solution['roomSid'], $this->solution['participantSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.SubscribedTrackList]'; } }PKt[ 2@Twilio/Rest/Video/V1/Room/Participant/PublishedTrackInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'roomSid' => Values::array_get($payload, 'room_sid'), 'name' => Values::array_get($payload, 'name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'enabled' => Values::array_get($payload, 'enabled'), 'kind' => Values::array_get($payload, 'kind'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'roomSid' => $roomSid, 'participantSid' => $participantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PublishedTrackContext Context for this PublishedTrackInstance */ protected function proxy(): PublishedTrackContext { if (!$this->context) { $this->context = new PublishedTrackContext( $this->version, $this->solution['roomSid'], $this->solution['participantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the PublishedTrackInstance * * @return PublishedTrackInstance Fetched PublishedTrackInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PublishedTrackInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.PublishedTrackInstance ' . \implode(' ', $context) . ']'; } }PKt[ ];;<Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SubscribeRulesInstance \Twilio\Rest\Video\V1\Room\Participant\SubscribeRulesInstance */ public function buildInstance(array $payload): SubscribeRulesInstance { return new SubscribeRulesInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.SubscribeRulesPage]'; } }PKt[O77Twilio/Rest/Video/V1/Room/Participant/AnonymizePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AnonymizeInstance \Twilio\Rest\Video\V1\Room\Participant\AnonymizeInstance */ public function buildInstance(array $payload): AnonymizeInstance { return new AnonymizeInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.AnonymizePage]'; } }PKt[;<Twilio/Rest/Video/V1/Room/Participant/PublishedTrackList.phpnu[solution = ['roomSid' => $roomSid, 'participantSid' => $participantSid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . '/PublishedTracks'; } /** * Streams PublishedTrackInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads PublishedTrackInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return PublishedTrackInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of PublishedTrackInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return PublishedTrackPage Page of PublishedTrackInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): PublishedTrackPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new PublishedTrackPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of PublishedTrackInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return PublishedTrackPage Page of PublishedTrackInstance */ public function getPage(string $targetUrl): PublishedTrackPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new PublishedTrackPage($this->version, $response, $this->solution); } /** * Constructs a PublishedTrackContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): PublishedTrackContext { return new PublishedTrackContext( $this->version, $this->solution['roomSid'], $this->solution['participantSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.PublishedTrackList]'; } }PKt[*!!?Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesOptions.phpnu[options['rules'] = $rules; } /** * A JSON-encoded array of subscribe rules. See the [Specifying Subscribe Rules](https://www.twilio.com/docs/video/api/track-subscriptions#specifying-sr) section for further information. * * @param array $rules A JSON-encoded array of subscribe rules * @return $this Fluent Builder */ public function setRules(array $rules): self { $this->options['rules'] = $rules; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.UpdateSubscribeRulesOptions ' . $options . ']'; } }PKt[B <Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesList.phpnu[solution = ['roomSid' => $roomSid, 'participantSid' => $participantSid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . '/SubscribeRules'; } /** * Fetch the SubscribeRulesInstance * * @return SubscribeRulesInstance Fetched SubscribeRulesInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SubscribeRulesInstance { $payload = $this->version->fetch('GET', $this->uri); return new SubscribeRulesInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid'] ); } /** * Update the SubscribeRulesInstance * * @param array|Options $options Optional Arguments * @return SubscribeRulesInstance Updated SubscribeRulesInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SubscribeRulesInstance { $options = new Values($options); $data = Values::of(['Rules' => Serialize::jsonObject($options['rules']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SubscribeRulesInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.SubscribeRulesList]'; } }PKt[-AA=Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SubscribedTrackInstance \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackInstance */ public function buildInstance(array $payload): SubscribedTrackInstance { return new SubscribedTrackInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.SubscribedTrackPage]'; } }PKt[ZvaP;;<Twilio/Rest/Video/V1/Room/Participant/PublishedTrackPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PublishedTrackInstance \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackInstance */ public function buildInstance(array $payload): PublishedTrackInstance { return new PublishedTrackInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.PublishedTrackPage]'; } }PKt[bi&TTATwilio/Rest/Video/V1/Room/Participant/SubscribedTrackInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'participantSid' => Values::array_get($payload, 'participant_sid'), 'publisherSid' => Values::array_get($payload, 'publisher_sid'), 'roomSid' => Values::array_get($payload, 'room_sid'), 'name' => Values::array_get($payload, 'name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'enabled' => Values::array_get($payload, 'enabled'), 'kind' => Values::array_get($payload, 'kind'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'roomSid' => $roomSid, 'participantSid' => $participantSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SubscribedTrackContext Context for this SubscribedTrackInstance */ protected function proxy(): SubscribedTrackContext { if (!$this->context) { $this->context = new SubscribedTrackContext( $this->version, $this->solution['roomSid'], $this->solution['participantSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the SubscribedTrackInstance * * @return SubscribedTrackInstance Fetched SubscribedTrackInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SubscribedTrackInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.SubscribedTrackInstance ' . \implode(' ', $context) . ']'; } }PKt[ 07Twilio/Rest/Video/V1/Room/Participant/AnonymizeList.phpnu[solution = ['roomSid' => $roomSid, 'sid' => $sid, ]; } /** * Constructs a AnonymizeContext */ public function getContext(): AnonymizeContext { return new AnonymizeContext($this->version, $this->solution['roomSid'], $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.AnonymizeList]'; } }PKt[@lŠ @Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesInstance.phpnu[properties = [ 'participantSid' => Values::array_get($payload, 'participant_sid'), 'roomSid' => Values::array_get($payload, 'room_sid'), 'rules' => Values::array_get($payload, 'rules'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['roomSid' => $roomSid, 'participantSid' => $participantSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.SubscribeRulesInstance]'; } }PKt[>tt@Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackContext.phpnu[solution = ['roomSid' => $roomSid, 'participantSid' => $participantSid, 'sid' => $sid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . '/SubscribedTracks/' . \rawurlencode($sid) . ''; } /** * Fetch the SubscribedTrackInstance * * @return SubscribedTrackInstance Fetched SubscribedTrackInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SubscribedTrackInstance { $payload = $this->version->fetch('GET', $this->uri); return new SubscribedTrackInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.SubscribedTrackContext ' . \implode(' ', $context) . ']'; } }PKt[//0Twilio/Rest/Video/V1/Room/RecordingRulesList.phpnu[solution = ['roomSid' => $roomSid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/RecordingRules'; } /** * Fetch the RecordingRulesInstance * * @return RecordingRulesInstance Fetched RecordingRulesInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingRulesInstance { $payload = $this->version->fetch('GET', $this->uri); return new RecordingRulesInstance($this->version, $payload, $this->solution['roomSid']); } /** * Update the RecordingRulesInstance * * @param array|Options $options Optional Arguments * @return RecordingRulesInstance Updated RecordingRulesInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): RecordingRulesInstance { $options = new Values($options); $data = Values::of(['Rules' => Serialize::jsonObject($options['rules']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RecordingRulesInstance($this->version, $payload, $this->solution['roomSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RecordingRulesList]'; } }PKt[q0Twilio/Rest/Video/V1/Room/ParticipantContext.phpnu[solution = ['roomSid' => $roomSid, 'sid' => $sid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($sid) . ''; } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { $payload = $this->version->fetch('GET', $this->uri); return new ParticipantInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['sid'] ); } /** * Update the ParticipantInstance * * @param array|Options $options Optional Arguments * @return ParticipantInstance Updated ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ParticipantInstance { $options = new Values($options); $data = Values::of(['Status' => $options['status'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ParticipantInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['sid'] ); } /** * Access the publishedTracks */ protected function getPublishedTracks(): PublishedTrackList { if (!$this->_publishedTracks) { $this->_publishedTracks = new PublishedTrackList( $this->version, $this->solution['roomSid'], $this->solution['sid'] ); } return $this->_publishedTracks; } /** * Access the subscribedTracks */ protected function getSubscribedTracks(): SubscribedTrackList { if (!$this->_subscribedTracks) { $this->_subscribedTracks = new SubscribedTrackList( $this->version, $this->solution['roomSid'], $this->solution['sid'] ); } return $this->_subscribedTracks; } /** * Access the subscribeRules */ protected function getSubscribeRules(): SubscribeRulesList { if (!$this->_subscribeRules) { $this->_subscribeRules = new SubscribeRulesList( $this->version, $this->solution['roomSid'], $this->solution['sid'] ); } return $this->_subscribeRules; } /** * Access the anonymize */ protected function getAnonymize(): AnonymizeList { if (!$this->_anonymize) { $this->_anonymize = new AnonymizeList( $this->version, $this->solution['roomSid'], $this->solution['sid'] ); } return $this->_anonymize; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.ParticipantContext ' . \implode(' ', $context) . ']'; } }PKt[\K*P440Twilio/Rest/Video/V1/Room/ParticipantOptions.phpnu[options['status'] = $status; $this->options['identity'] = $identity; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['dateCreatedBefore'] = $dateCreatedBefore; } /** * Read only the participants with this status. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned. * * @param string $status Read only the participants with this status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Read only the Participants with this [User](https://www.twilio.com/docs/chat/rest/user-resource) `identity` value. * * @param string $identity Read only the Participants with this user identity * value * @return $this Fluent Builder */ public function setIdentity(string $identity): self { $this->options['identity'] = $identity; return $this; } /** * Read only Participants that started after this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format. * * @param \DateTime $dateCreatedAfter Read only Participants that started after * this date in UTC ISO 8601 format * @return $this Fluent Builder */ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Read only Participants that started before this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format. * * @param \DateTime $dateCreatedBefore Read only Participants that started * before this date in ISO 8601 format * @return $this Fluent Builder */ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.ReadParticipantOptions ' . $options . ']'; } } class UpdateParticipantOptions extends Options { /** * @param string $status The new status of the resource */ public function __construct(string $status = Values::NONE) { $this->options['status'] = $status; } /** * The new status of the resource. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned. * * @param string $status The new status of the resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.UpdateParticipantOptions ' . $options . ']'; } }PKt[+b0Twilio/Rest/Video/V1/Room/RecordingRulesPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RecordingRulesInstance \Twilio\Rest\Video\V1\Room\RecordingRulesInstance */ public function buildInstance(array $payload): RecordingRulesInstance { return new RecordingRulesInstance($this->version, $payload, $this->solution['roomSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RecordingRulesPage]'; } }PKt[ 'r/Twilio/Rest/Video/V1/Room/RoomRecordingList.phpnu[solution = ['roomSid' => $roomSid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Recordings'; } /** * Streams RoomRecordingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RoomRecordingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RoomRecordingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RoomRecordingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RoomRecordingPage Page of RoomRecordingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RoomRecordingPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'SourceSid' => $options['sourceSid'], 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RoomRecordingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RoomRecordingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RoomRecordingPage Page of RoomRecordingInstance */ public function getPage(string $targetUrl): RoomRecordingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RoomRecordingPage($this->version, $response, $this->solution); } /** * Constructs a RoomRecordingContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): RoomRecordingContext { return new RoomRecordingContext($this->version, $this->solution['roomSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RoomRecordingList]'; } }PKt[\Ob3Twilio/Rest/Video/V1/Room/RoomRecordingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'status' => Values::array_get($payload, 'status'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'sid' => Values::array_get($payload, 'sid'), 'sourceSid' => Values::array_get($payload, 'source_sid'), 'size' => Values::array_get($payload, 'size'), 'url' => Values::array_get($payload, 'url'), 'type' => Values::array_get($payload, 'type'), 'duration' => Values::array_get($payload, 'duration'), 'containerFormat' => Values::array_get($payload, 'container_format'), 'codec' => Values::array_get($payload, 'codec'), 'groupingSids' => Values::array_get($payload, 'grouping_sids'), 'trackName' => Values::array_get($payload, 'track_name'), 'offset' => Values::array_get($payload, 'offset'), 'mediaExternalLocation' => Values::array_get($payload, 'media_external_location'), 'roomSid' => Values::array_get($payload, 'room_sid'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['roomSid' => $roomSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RoomRecordingContext Context for this RoomRecordingInstance */ protected function proxy(): RoomRecordingContext { if (!$this->context) { $this->context = new RoomRecordingContext( $this->version, $this->solution['roomSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the RoomRecordingInstance * * @return RoomRecordingInstance Fetched RoomRecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoomRecordingInstance { return $this->proxy()->fetch(); } /** * Delete the RoomRecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.RoomRecordingInstance ' . \implode(' ', $context) . ']'; } }PKt[ۻ'-Twilio/Rest/Video/V1/Room/ParticipantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ParticipantInstance \Twilio\Rest\Video\V1\Room\ParticipantInstance */ public function buildInstance(array $payload): ParticipantInstance { return new ParticipantInstance($this->version, $payload, $this->solution['roomSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.ParticipantPage]'; } }PKt[@992Twilio/Rest/Video/V1/Room/RoomRecordingContext.phpnu[solution = ['roomSid' => $roomSid, 'sid' => $sid, ]; $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Recordings/' . \rawurlencode($sid) . ''; } /** * Fetch the RoomRecordingInstance * * @return RoomRecordingInstance Fetched RoomRecordingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoomRecordingInstance { $payload = $this->version->fetch('GET', $this->uri); return new RoomRecordingInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['sid'] ); } /** * Delete the RoomRecordingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.RoomRecordingContext ' . \implode(' ', $context) . ']'; } }PKt[HSz/Twilio/Rest/Video/V1/Room/RoomRecordingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RoomRecordingInstance \Twilio\Rest\Video\V1\Room\RoomRecordingInstance */ public function buildInstance(array $payload): RoomRecordingInstance { return new RoomRecordingInstance($this->version, $payload, $this->solution['roomSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RoomRecordingPage]'; } }PKt[=\3Twilio/Rest/Video/V1/Room/RecordingRulesOptions.phpnu[options['rules'] = $rules; } /** * A JSON-encoded array of recording rules. * * @param array $rules A JSON-encoded array of recording rules * @return $this Fluent Builder */ public function setRules(array $rules): self { $this->options['rules'] = $rules; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.UpdateRecordingRulesOptions ' . $options . ']'; } }PKt[$C]]4Twilio/Rest/Video/V1/Room/RecordingRulesInstance.phpnu[properties = [ 'roomSid' => Values::array_get($payload, 'room_sid'), 'rules' => Values::array_get($payload, 'rules'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['roomSid' => $roomSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RecordingRulesInstance]'; } }PKt[ dd!Twilio/Rest/Video/V1/RoomPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RoomInstance \Twilio\Rest\Video\V1\RoomInstance */ public function buildInstance(array $payload): RoomInstance { return new RoomInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RoomPage]'; } }PKt[<ԇ%Twilio/Rest/Video/V1/RoomInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'status' => Values::array_get($payload, 'status'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'accountSid' => Values::array_get($payload, 'account_sid'), 'enableTurn' => Values::array_get($payload, 'enable_turn'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'duration' => Values::array_get($payload, 'duration'), 'type' => Values::array_get($payload, 'type'), 'maxParticipants' => Values::array_get($payload, 'max_participants'), 'maxParticipantDuration' => Values::array_get($payload, 'max_participant_duration'), 'maxConcurrentPublishedTracks' => Values::array_get($payload, 'max_concurrent_published_tracks'), 'recordParticipantsOnConnect' => Values::array_get($payload, 'record_participants_on_connect'), 'videoCodecs' => Values::array_get($payload, 'video_codecs'), 'mediaRegion' => Values::array_get($payload, 'media_region'), 'audioOnly' => Values::array_get($payload, 'audio_only'), 'emptyRoomTimeout' => Values::array_get($payload, 'empty_room_timeout'), 'unusedRoomTimeout' => Values::array_get($payload, 'unused_room_timeout'), 'largeRoom' => Values::array_get($payload, 'large_room'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RoomContext Context for this RoomInstance */ protected function proxy(): RoomContext { if (!$this->context) { $this->context = new RoomContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the RoomInstance * * @return RoomInstance Fetched RoomInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoomInstance { return $this->proxy()->fetch(); } /** * Update the RoomInstance * * @param string $status The new status of the resource * @return RoomInstance Updated RoomInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): RoomInstance { return $this->proxy()->update($status); } /** * Access the recordings */ protected function getRecordings(): RoomRecordingList { return $this->proxy()->recordings; } /** * Access the participants */ protected function getParticipants(): ParticipantList { return $this->proxy()->participants; } /** * Access the recordingRules */ protected function getRecordingRules(): RecordingRulesList { return $this->proxy()->recordingRules; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.RoomInstance ' . \implode(' ', $context) . ']'; } }PKt[dW W 3Twilio/Rest/Video/V1/CompositionSettingsContext.phpnu[solution = []; $this->uri = '/CompositionSettings/Default'; } /** * Fetch the CompositionSettingsInstance * * @return CompositionSettingsInstance Fetched CompositionSettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CompositionSettingsInstance { $payload = $this->version->fetch('GET', $this->uri); return new CompositionSettingsInstance($this->version, $payload); } /** * Create the CompositionSettingsInstance * * @param string $friendlyName A descriptive string that you create to describe * the resource * @param array|Options $options Optional Arguments * @return CompositionSettingsInstance Created CompositionSettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): CompositionSettingsInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'AwsCredentialsSid' => $options['awsCredentialsSid'], 'EncryptionKeySid' => $options['encryptionKeySid'], 'AwsS3Url' => $options['awsS3Url'], 'AwsStorageEnabled' => Serialize::booleanToString($options['awsStorageEnabled']), 'EncryptionEnabled' => Serialize::booleanToString($options['encryptionEnabled']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CompositionSettingsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.CompositionSettingsContext ' . \implode(' ', $context) . ']'; } }PKt[ /Twilio/Rest/Video/V1/CompositionHookContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/CompositionHooks/' . \rawurlencode($sid) . ''; } /** * Fetch the CompositionHookInstance * * @return CompositionHookInstance Fetched CompositionHookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CompositionHookInstance { $payload = $this->version->fetch('GET', $this->uri); return new CompositionHookInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the CompositionHookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the CompositionHookInstance * * @param string $friendlyName A unique string to describe the resource * @param array|Options $options Optional Arguments * @return CompositionHookInstance Updated CompositionHookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName, array $options = []): CompositionHookInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Enabled' => Serialize::booleanToString($options['enabled']), 'VideoLayout' => Serialize::jsonObject($options['videoLayout']), 'AudioSources' => Serialize::map($options['audioSources'], function($e) { return $e; }), 'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function($e) { return $e; }), 'Trim' => Serialize::booleanToString($options['trim']), 'Format' => $options['format'], 'Resolution' => $options['resolution'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CompositionHookInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.CompositionHookContext ' . \implode(' ', $context) . ']'; } }PKt[[qd,Twilio/Rest/Video/V1/CompositionHookList.phpnu[solution = []; $this->uri = '/CompositionHooks'; } /** * Streams CompositionHookInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CompositionHookInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CompositionHookInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CompositionHookInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CompositionHookPage Page of CompositionHookInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CompositionHookPage { $options = new Values($options); $params = Values::of([ 'Enabled' => Serialize::booleanToString($options['enabled']), 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'FriendlyName' => $options['friendlyName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CompositionHookPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CompositionHookInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CompositionHookPage Page of CompositionHookInstance */ public function getPage(string $targetUrl): CompositionHookPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CompositionHookPage($this->version, $response, $this->solution); } /** * Create the CompositionHookInstance * * @param string $friendlyName A unique string to describe the resource * @param array|Options $options Optional Arguments * @return CompositionHookInstance Created CompositionHookInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): CompositionHookInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Enabled' => Serialize::booleanToString($options['enabled']), 'VideoLayout' => Serialize::jsonObject($options['videoLayout']), 'AudioSources' => Serialize::map($options['audioSources'], function($e) { return $e; }), 'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function($e) { return $e; }), 'Resolution' => $options['resolution'], 'Format' => $options['format'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'Trim' => Serialize::booleanToString($options['trim']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CompositionHookInstance($this->version, $payload); } /** * Constructs a CompositionHookContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): CompositionHookContext { return new CompositionHookContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.CompositionHookList]'; } }PKt[l 1Twilio/Rest/Video/V1/RecordingSettingsContext.phpnu[solution = []; $this->uri = '/RecordingSettings/Default'; } /** * Fetch the RecordingSettingsInstance * * @return RecordingSettingsInstance Fetched RecordingSettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingSettingsInstance { $payload = $this->version->fetch('GET', $this->uri); return new RecordingSettingsInstance($this->version, $payload); } /** * Create the RecordingSettingsInstance * * @param string $friendlyName A string to describe the resource * @param array|Options $options Optional Arguments * @return RecordingSettingsInstance Created RecordingSettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): RecordingSettingsInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'AwsCredentialsSid' => $options['awsCredentialsSid'], 'EncryptionKeySid' => $options['encryptionKeySid'], 'AwsS3Url' => $options['awsS3Url'], 'AwsStorageEnabled' => Serialize::booleanToString($options['awsStorageEnabled']), 'EncryptionEnabled' => Serialize::booleanToString($options['encryptionEnabled']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RecordingSettingsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.RecordingSettingsContext ' . \implode(' ', $context) . ']'; } }PKt[k&Twilio/Rest/Video/V1/RecordingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RecordingInstance \Twilio\Rest\Video\V1\RecordingInstance */ public function buildInstance(array $payload): RecordingInstance { return new RecordingInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RecordingPage]'; } }PKt[Y;;2Twilio/Rest/Video/V1/RecordingSettingsInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'awsCredentialsSid' => Values::array_get($payload, 'aws_credentials_sid'), 'awsS3Url' => Values::array_get($payload, 'aws_s3_url'), 'awsStorageEnabled' => Values::array_get($payload, 'aws_storage_enabled'), 'encryptionKeySid' => Values::array_get($payload, 'encryption_key_sid'), 'encryptionEnabled' => Values::array_get($payload, 'encryption_enabled'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RecordingSettingsContext Context for this RecordingSettingsInstance */ protected function proxy(): RecordingSettingsContext { if (!$this->context) { $this->context = new RecordingSettingsContext($this->version); } return $this->context; } /** * Fetch the RecordingSettingsInstance * * @return RecordingSettingsInstance Fetched RecordingSettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RecordingSettingsInstance { return $this->proxy()->fetch(); } /** * Create the RecordingSettingsInstance * * @param string $friendlyName A string to describe the resource * @param array|Options $options Optional Arguments * @return RecordingSettingsInstance Created RecordingSettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): RecordingSettingsInstance { return $this->proxy()->create($friendlyName, $options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.RecordingSettingsInstance ' . \implode(' ', $context) . ']'; } }PKt[ƿ0,Twilio/Rest/Video/V1/CompositionHookPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CompositionHookInstance \Twilio\Rest\Video\V1\CompositionHookInstance */ public function buildInstance(array $payload): CompositionHookInstance { return new CompositionHookInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.CompositionHookPage]'; } }PKt[@?ݾ0Twilio/Rest/Video/V1/CompositionSettingsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CompositionSettingsInstance \Twilio\Rest\Video\V1\CompositionSettingsInstance */ public function buildInstance(array $payload): CompositionSettingsInstance { return new CompositionSettingsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.CompositionSettingsPage]'; } }PKt[!+Twilio/Rest/Video/V1/CompositionContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Compositions/' . \rawurlencode($sid) . ''; } /** * Fetch the CompositionInstance * * @return CompositionInstance Fetched CompositionInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CompositionInstance { $payload = $this->version->fetch('GET', $this->uri); return new CompositionInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the CompositionInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.CompositionContext ' . \implode(' ', $context) . ']'; } }PKt[Mgg/Twilio/Rest/Video/V1/CompositionHookOptions.phpnu[options['enabled'] = $enabled; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['friendlyName'] = $friendlyName; } /** * Read only CompositionHook resources with an `enabled` value that matches this parameter. * * @param bool $enabled Read only CompositionHook resources with an enabled * value that matches this parameter * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. * * @param \DateTime $dateCreatedAfter Read only CompositionHook resources * created on or after this ISO 8601 * datetime with time zone * @return $this Fluent Builder */ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. * * @param \DateTime $dateCreatedBefore Read only CompositionHook resources * created before this ISO 8601 datetime * with time zone * @return $this Fluent Builder */ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match. * * @param string $friendlyName Read only CompositionHook resources with * friendly names that match this string * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.ReadCompositionHookOptions ' . $options . ']'; } } class CreateCompositionHookOptions extends Options { /** * @param bool $enabled Whether the composition hook is active * @param array $videoLayout An object that describes the video layout of the * composition hook * @param string[] $audioSources An array of track names from the same group * room to merge * @param string[] $audioSourcesExcluded An array of track names to exclude * @param string $resolution A string that describes the rows (width) and * columns (height) of the generated composed video * in pixels * @param string $format The container format of the media files used by the * compositions created by the composition hook * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param bool $trim Whether to clip the intervals where there is no active * media in the Compositions triggered by the composition hook */ public function __construct(bool $enabled = Values::NONE, array $videoLayout = Values::ARRAY_NONE, array $audioSources = Values::ARRAY_NONE, array $audioSourcesExcluded = Values::ARRAY_NONE, string $resolution = Values::NONE, string $format = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, bool $trim = Values::NONE) { $this->options['enabled'] = $enabled; $this->options['videoLayout'] = $videoLayout; $this->options['audioSources'] = $audioSources; $this->options['audioSourcesExcluded'] = $audioSourcesExcluded; $this->options['resolution'] = $resolution; $this->options['format'] = $format; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['trim'] = $trim; } /** * Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook will never be triggered. * * @param bool $enabled Whether the composition hook is active * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * * @param array $videoLayout An object that describes the video layout of the * composition hook * @return $this Fluent Builder */ public function setVideoLayout(array $videoLayout): self { $this->options['videoLayout'] = $videoLayout; return $this; } /** * An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`. * * @param string[] $audioSources An array of track names from the same group * room to merge * @return $this Fluent Builder */ public function setAudioSources(array $audioSources): self { $this->options['audioSources'] = $audioSources; return $this; } /** * An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. * * @param string[] $audioSourcesExcluded An array of track names to exclude * @return $this Fluent Builder */ public function setAudioSourcesExcluded(array $audioSourcesExcluded): self { $this->options['audioSourcesExcluded'] = $audioSourcesExcluded; return $this; } /** * A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * * @param string $resolution A string that describes the rows (width) and * columns (height) of the generated composed video * in pixels * @return $this Fluent Builder */ public function setResolution(string $resolution): self { $this->options['resolution'] = $resolution; return $this; } /** * The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs. * * @param string $format The container format of the media files used by the * compositions created by the composition hook * @return $this Fluent Builder */ public function setFormat(string $format): self { $this->options['format'] = $format; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * * @param bool $trim Whether to clip the intervals where there is no active * media in the Compositions triggered by the composition hook * @return $this Fluent Builder */ public function setTrim(bool $trim): self { $this->options['trim'] = $trim; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.CreateCompositionHookOptions ' . $options . ']'; } } class UpdateCompositionHookOptions extends Options { /** * @param bool $enabled Whether the composition hook is active * @param array $videoLayout A JSON object that describes the video layout of * the composition hook * @param string[] $audioSources An array of track names from the same group * room to merge * @param string[] $audioSourcesExcluded An array of track names to exclude * @param bool $trim Whether to clip the intervals where there is no active * media in the Compositions triggered by the composition hook * @param string $format The container format of the media files used by the * compositions created by the composition hook * @param string $resolution A string that describes the columns (width) and * rows (height) of the generated composed video in * pixels * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback */ public function __construct(bool $enabled = Values::NONE, array $videoLayout = Values::ARRAY_NONE, array $audioSources = Values::ARRAY_NONE, array $audioSourcesExcluded = Values::ARRAY_NONE, bool $trim = Values::NONE, string $format = Values::NONE, string $resolution = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE) { $this->options['enabled'] = $enabled; $this->options['videoLayout'] = $videoLayout; $this->options['audioSources'] = $audioSources; $this->options['audioSourcesExcluded'] = $audioSourcesExcluded; $this->options['trim'] = $trim; $this->options['format'] = $format; $this->options['resolution'] = $resolution; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; } /** * Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers. * * @param bool $enabled Whether the composition hook is active * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * * @param array $videoLayout A JSON object that describes the video layout of * the composition hook * @return $this Fluent Builder */ public function setVideoLayout(array $videoLayout): self { $this->options['videoLayout'] = $videoLayout; return $this; } /** * An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`. * * @param string[] $audioSources An array of track names from the same group * room to merge * @return $this Fluent Builder */ public function setAudioSources(array $audioSources): self { $this->options['audioSources'] = $audioSources; return $this; } /** * An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. * * @param string[] $audioSourcesExcluded An array of track names to exclude * @return $this Fluent Builder */ public function setAudioSourcesExcluded(array $audioSourcesExcluded): self { $this->options['audioSourcesExcluded'] = $audioSourcesExcluded; return $this; } /** * Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * * @param bool $trim Whether to clip the intervals where there is no active * media in the Compositions triggered by the composition hook * @return $this Fluent Builder */ public function setTrim(bool $trim): self { $this->options['trim'] = $trim; return $this; } /** * The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs. * * @param string $format The container format of the media files used by the * compositions created by the composition hook * @return $this Fluent Builder */ public function setFormat(string $format): self { $this->options['format'] = $format; return $this; } /** * A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * * @param string $resolution A string that describes the columns (width) and * rows (height) of the generated composed video in * pixels * @return $this Fluent Builder */ public function setResolution(string $resolution): self { $this->options['resolution'] = $resolution; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.UpdateCompositionHookOptions ' . $options . ']'; } }PKt[rb80Twilio/Rest/Video/V1/CompositionSettingsList.phpnu[solution = []; } /** * Constructs a CompositionSettingsContext */ public function getContext(): CompositionSettingsContext { return new CompositionSettingsContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.CompositionSettingsList]'; } }PKt[<..(Twilio/Rest/Video/V1/CompositionList.phpnu[solution = []; $this->uri = '/Compositions'; } /** * Streams CompositionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CompositionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CompositionInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CompositionInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CompositionPage Page of CompositionInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CompositionPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'RoomSid' => $options['roomSid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CompositionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CompositionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CompositionPage Page of CompositionInstance */ public function getPage(string $targetUrl): CompositionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CompositionPage($this->version, $response, $this->solution); } /** * Create the CompositionInstance * * @param string $roomSid The SID of the Group Room with the media tracks to be * used as composition sources * @param array|Options $options Optional Arguments * @return CompositionInstance Created CompositionInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $roomSid, array $options = []): CompositionInstance { $options = new Values($options); $data = Values::of([ 'RoomSid' => $roomSid, 'VideoLayout' => Serialize::jsonObject($options['videoLayout']), 'AudioSources' => Serialize::map($options['audioSources'], function($e) { return $e; }), 'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function($e) { return $e; }), 'Resolution' => $options['resolution'], 'Format' => $options['format'], 'StatusCallback' => $options['statusCallback'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'Trim' => Serialize::booleanToString($options['trim']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CompositionInstance($this->version, $payload); } /** * Constructs a CompositionContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): CompositionContext { return new CompositionContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.CompositionList]'; } }PKt[(L.Twilio/Rest/Video/V1/RecordingSettingsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RecordingSettingsInstance \Twilio\Rest\Video\V1\RecordingSettingsInstance */ public function buildInstance(array $payload): RecordingSettingsInstance { return new RecordingSettingsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1.RecordingSettingsPage]'; } }PKt[K77+Twilio/Rest/Video/V1/CompositionOptions.phpnu[options['status'] = $status; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['roomSid'] = $roomSid; } /** * Read only Composition resources with this status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`. * * @param string $status Read only Composition resources with this status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Read only Composition resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone. * * @param \DateTime $dateCreatedAfter Read only Composition resources created * on or after this [ISO * 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone * @return $this Fluent Builder */ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Read only Composition resources created before this ISO 8601 date-time with time zone. * * @param \DateTime $dateCreatedBefore Read only Composition resources created * before this ISO 8601 date-time with time * zone * @return $this Fluent Builder */ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Read only Composition resources with this Room SID. * * @param string $roomSid Read only Composition resources with this Room SID * @return $this Fluent Builder */ public function setRoomSid(string $roomSid): self { $this->options['roomSid'] = $roomSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.ReadCompositionOptions ' . $options . ']'; } } class CreateCompositionOptions extends Options { /** * @param array $videoLayout An object that describes the video layout of the * composition * @param string[] $audioSources An array of track names from the same group * room to merge * @param string[] $audioSourcesExcluded An array of track names to exclude * @param string $resolution A string that describes the columns (width) and * rows (height) of the generated composed video in * pixels * @param string $format The container format of the composition's media files * @param string $statusCallback The URL we should call to send status * information to your application * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @param bool $trim Whether to clip the intervals where there is no active * media in the composition */ public function __construct(array $videoLayout = Values::ARRAY_NONE, array $audioSources = Values::ARRAY_NONE, array $audioSourcesExcluded = Values::ARRAY_NONE, string $resolution = Values::NONE, string $format = Values::NONE, string $statusCallback = Values::NONE, string $statusCallbackMethod = Values::NONE, bool $trim = Values::NONE) { $this->options['videoLayout'] = $videoLayout; $this->options['audioSources'] = $audioSources; $this->options['audioSourcesExcluded'] = $audioSourcesExcluded; $this->options['resolution'] = $resolution; $this->options['format'] = $format; $this->options['statusCallback'] = $statusCallback; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['trim'] = $trim; } /** * An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request * * @param array $videoLayout An object that describes the video layout of the * composition * @return $this Fluent Builder */ public function setVideoLayout(array $videoLayout): self { $this->options['videoLayout'] = $videoLayout; return $this; } /** * An array of track names from the same group room to merge into the new composition. Can include zero or more track names. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` includes `student` as well as `studentTeam`. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request * * @param string[] $audioSources An array of track names from the same group * room to merge * @return $this Fluent Builder */ public function setAudioSources(array $audioSources): self { $this->options['audioSources'] = $audioSources; return $this; } /** * An array of track names to exclude. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. * * @param string[] $audioSourcesExcluded An array of track names to exclude * @return $this Fluent Builder */ public function setAudioSourcesExcluded(array $audioSourcesExcluded): self { $this->options['audioSourcesExcluded'] = $audioSourcesExcluded; return $this; } /** * A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * * @param string $resolution A string that describes the columns (width) and * rows (height) of the generated composed video in * pixels * @return $this Fluent Builder */ public function setResolution(string $resolution): self { $this->options['resolution'] = $resolution; return $this; } /** * The container format of the composition's media files. Can be: `mp4` or `webm` and the default is `webm`. If you specify `mp4` or `webm`, you must also specify one or more `audio_sources` and/or a `video_layout` element that contains a valid `video_sources` list, otherwise an error occurs. * * @param string $format The container format of the composition's media files * @return $this Fluent Builder */ public function setFormat(string $format): self { $this->options['format'] = $format; return $this; } /** * The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. * * @param string $statusCallback The URL we should call to send status * information to your application * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. * * @param bool $trim Whether to clip the intervals where there is no active * media in the composition * @return $this Fluent Builder */ public function setTrim(bool $trim): self { $this->options['trim'] = $trim; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Video.V1.CreateCompositionOptions ' . $options . ']'; } }PKt[30Twilio/Rest/Video/V1/CompositionHookInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'enabled' => Values::array_get($payload, 'enabled'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'sid' => Values::array_get($payload, 'sid'), 'audioSources' => Values::array_get($payload, 'audio_sources'), 'audioSourcesExcluded' => Values::array_get($payload, 'audio_sources_excluded'), 'videoLayout' => Values::array_get($payload, 'video_layout'), 'resolution' => Values::array_get($payload, 'resolution'), 'trim' => Values::array_get($payload, 'trim'), 'format' => Values::array_get($payload, 'format'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CompositionHookContext Context for this CompositionHookInstance */ protected function proxy(): CompositionHookContext { if (!$this->context) { $this->context = new CompositionHookContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CompositionHookInstance * * @return CompositionHookInstance Fetched CompositionHookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CompositionHookInstance { return $this->proxy()->fetch(); } /** * Delete the CompositionHookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the CompositionHookInstance * * @param string $friendlyName A unique string to describe the resource * @param array|Options $options Optional Arguments * @return CompositionHookInstance Updated CompositionHookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $friendlyName, array $options = []): CompositionHookInstance { return $this->proxy()->update($friendlyName, $options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Video.V1.CompositionHookInstance ' . \implode(' ', $context) . ']'; } }PKt[X0:ffTwilio/Rest/Video/V1.phpnu[version = 'v1'; } protected function getCompositions(): CompositionList { if (!$this->_compositions) { $this->_compositions = new CompositionList($this); } return $this->_compositions; } protected function getCompositionHooks(): CompositionHookList { if (!$this->_compositionHooks) { $this->_compositionHooks = new CompositionHookList($this); } return $this->_compositionHooks; } protected function getCompositionSettings(): CompositionSettingsList { if (!$this->_compositionSettings) { $this->_compositionSettings = new CompositionSettingsList($this); } return $this->_compositionSettings; } protected function getRecordings(): RecordingList { if (!$this->_recordings) { $this->_recordings = new RecordingList($this); } return $this->_recordings; } protected function getRecordingSettings(): RecordingSettingsList { if (!$this->_recordingSettings) { $this->_recordingSettings = new RecordingSettingsList($this); } return $this->_recordingSettings; } protected function getRooms(): RoomList { if (!$this->_rooms) { $this->_rooms = new RoomList($this); } return $this->_rooms; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video.V1]'; } }PKt[3-,ssTwilio/Rest/Video.phpnu[baseUrl = 'https://video.twilio.com'; } /** * @return V1 Version v1 of video */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getCompositions(): \Twilio\Rest\Video\V1\CompositionList { return $this->v1->compositions; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextCompositions(string $sid): \Twilio\Rest\Video\V1\CompositionContext { return $this->v1->compositions($sid); } protected function getCompositionHooks(): \Twilio\Rest\Video\V1\CompositionHookList { return $this->v1->compositionHooks; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextCompositionHooks(string $sid): \Twilio\Rest\Video\V1\CompositionHookContext { return $this->v1->compositionHooks($sid); } protected function getCompositionSettings(): \Twilio\Rest\Video\V1\CompositionSettingsList { return $this->v1->compositionSettings; } protected function contextCompositionSettings(): \Twilio\Rest\Video\V1\CompositionSettingsContext { return $this->v1->compositionSettings(); } protected function getRecordings(): \Twilio\Rest\Video\V1\RecordingList { return $this->v1->recordings; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextRecordings(string $sid): \Twilio\Rest\Video\V1\RecordingContext { return $this->v1->recordings($sid); } protected function getRecordingSettings(): \Twilio\Rest\Video\V1\RecordingSettingsList { return $this->v1->recordingSettings; } protected function contextRecordingSettings(): \Twilio\Rest\Video\V1\RecordingSettingsContext { return $this->v1->recordingSettings(); } protected function getRooms(): \Twilio\Rest\Video\V1\RoomList { return $this->v1->rooms; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextRooms(string $sid): \Twilio\Rest\Video\V1\RoomContext { return $this->v1->rooms($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Video]'; } }PKt[-XTwilio/Rest/Trusthub.phpnu[baseUrl = 'https://trusthub.twilio.com'; } /** * @return V1 Version v1 of trusthub */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getCustomerProfiles(): \Twilio\Rest\Trusthub\V1\CustomerProfilesList { return $this->v1->customerProfiles; } /** * @param string $sid The unique string that identifies the resource. */ protected function contextCustomerProfiles(string $sid): \Twilio\Rest\Trusthub\V1\CustomerProfilesContext { return $this->v1->customerProfiles($sid); } protected function getEndUsers(): \Twilio\Rest\Trusthub\V1\EndUserList { return $this->v1->endUsers; } /** * @param string $sid The unique string that identifies the resource */ protected function contextEndUsers(string $sid): \Twilio\Rest\Trusthub\V1\EndUserContext { return $this->v1->endUsers($sid); } protected function getEndUserTypes(): \Twilio\Rest\Trusthub\V1\EndUserTypeList { return $this->v1->endUserTypes; } /** * @param string $sid The unique string that identifies the End-User Type * resource */ protected function contextEndUserTypes(string $sid): \Twilio\Rest\Trusthub\V1\EndUserTypeContext { return $this->v1->endUserTypes($sid); } protected function getPolicies(): \Twilio\Rest\Trusthub\V1\PoliciesList { return $this->v1->policies; } /** * @param string $sid The unique string that identifies the Policy resource */ protected function contextPolicies(string $sid): \Twilio\Rest\Trusthub\V1\PoliciesContext { return $this->v1->policies($sid); } protected function getSupportingDocuments(): \Twilio\Rest\Trusthub\V1\SupportingDocumentList { return $this->v1->supportingDocuments; } /** * @param string $sid The unique string that identifies the resource */ protected function contextSupportingDocuments(string $sid): \Twilio\Rest\Trusthub\V1\SupportingDocumentContext { return $this->v1->supportingDocuments($sid); } protected function getSupportingDocumentTypes(): \Twilio\Rest\Trusthub\V1\SupportingDocumentTypeList { return $this->v1->supportingDocumentTypes; } /** * @param string $sid The unique string that identifies the Supporting Document * Type resource */ protected function contextSupportingDocumentTypes(string $sid): \Twilio\Rest\Trusthub\V1\SupportingDocumentTypeContext { return $this->v1->supportingDocumentTypes($sid); } protected function getTrustProducts(): \Twilio\Rest\Trusthub\V1\TrustProductsList { return $this->v1->trustProducts; } /** * @param string $sid The unique string that identifies the resource. */ protected function contextTrustProducts(string $sid): \Twilio\Rest\Trusthub\V1\TrustProductsContext { return $this->v1->trustProducts($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub]'; } }PKt[0 Twilio/Rest/Proxy.phpnu[baseUrl = 'https://proxy.twilio.com'; } /** * @return V1 Version v1 of proxy */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getServices(): \Twilio\Rest\Proxy\V1\ServiceList { return $this->v1->services; } /** * @param string $sid The unique string that identifies the resource */ protected function contextServices(string $sid): \Twilio\Rest\Proxy\V1\ServiceContext { return $this->v1->services($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Proxy]'; } }PKt[9GTwilio/Rest/Microvisor.phpnu[baseUrl = 'https://microvisor.twilio.com'; } /** * @return V1 Version v1 of microvisor */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getAccountConfigs(): \Twilio\Rest\Microvisor\V1\AccountConfigList { return $this->v1->accountConfigs; } /** * @param string $key The config key. */ protected function contextAccountConfigs(string $key): \Twilio\Rest\Microvisor\V1\AccountConfigContext { return $this->v1->accountConfigs($key); } protected function getAccountSecrets(): \Twilio\Rest\Microvisor\V1\AccountSecretList { return $this->v1->accountSecrets; } /** * @param string $key The secret key. */ protected function contextAccountSecrets(string $key): \Twilio\Rest\Microvisor\V1\AccountSecretContext { return $this->v1->accountSecrets($key); } protected function getApps(): \Twilio\Rest\Microvisor\V1\AppList { return $this->v1->apps; } /** * @param string $sid A string that uniquely identifies this App. */ protected function contextApps(string $sid): \Twilio\Rest\Microvisor\V1\AppContext { return $this->v1->apps($sid); } protected function getDevices(): \Twilio\Rest\Microvisor\V1\DeviceList { return $this->v1->devices; } /** * @param string $sid A string that uniquely identifies this Device. */ protected function contextDevices(string $sid): \Twilio\Rest\Microvisor\V1\DeviceContext { return $this->v1->devices($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor]'; } }PKt[sP  Twilio/Rest/Serverless.phpnu[baseUrl = 'https://serverless.twilio.com'; } /** * @return V1 Version v1 of serverless */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getServices(): \Twilio\Rest\Serverless\V1\ServiceList { return $this->v1->services; } /** * @param string $sid The SID of the Service resource to fetch */ protected function contextServices(string $sid): \Twilio\Rest\Serverless\V1\ServiceContext { return $this->v1->services($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Serverless]'; } }PKt[.3Twilio/Rest/Microvisor/V1/AccountSecretInstance.phpnu[properties = [ 'key' => Values::array_get($payload, 'key'), 'dateRotated' => Deserialize::dateTime(Values::array_get($payload, 'date_rotated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['key' => $key ?: $this->properties['key'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AccountSecretContext Context for this AccountSecretInstance */ protected function proxy(): AccountSecretContext { if (!$this->context) { $this->context = new AccountSecretContext($this->version, $this->solution['key']); } return $this->context; } /** * Fetch the AccountSecretInstance * * @return AccountSecretInstance Fetched AccountSecretInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AccountSecretInstance { return $this->proxy()->fetch(); } /** * Update the AccountSecretInstance * * @param string $value The secret value. * @return AccountSecretInstance Updated AccountSecretInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $value): AccountSecretInstance { return $this->proxy()->update($value); } /** * Delete the AccountSecretInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.AccountSecretInstance ' . \implode(' ', $context) . ']'; } }PKt[ /Twilio/Rest/Microvisor/V1/AccountConfigList.phpnu[solution = []; $this->uri = '/Configs'; } /** * Streams AccountConfigInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AccountConfigInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AccountConfigInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AccountConfigInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AccountConfigPage Page of AccountConfigInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AccountConfigPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AccountConfigPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AccountConfigInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AccountConfigPage Page of AccountConfigInstance */ public function getPage(string $targetUrl): AccountConfigPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AccountConfigPage($this->version, $response, $this->solution); } /** * Create the AccountConfigInstance * * @param string $key The config key. * @param string $value The config value. * @return AccountConfigInstance Created AccountConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $key, string $value): AccountConfigInstance { $data = Values::of(['Key' => $key, 'Value' => $value, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AccountConfigInstance($this->version, $payload); } /** * Constructs a AccountConfigContext * * @param string $key The config key. */ public function getContext(string $key): AccountConfigContext { return new AccountConfigContext($this->version, $key); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.AccountConfigList]'; } }PKt[+$ 2Twilio/Rest/Microvisor/V1/AccountSecretContext.phpnu[solution = ['key' => $key, ]; $this->uri = '/Secrets/' . \rawurlencode($key) . ''; } /** * Fetch the AccountSecretInstance * * @return AccountSecretInstance Fetched AccountSecretInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AccountSecretInstance { $payload = $this->version->fetch('GET', $this->uri); return new AccountSecretInstance($this->version, $payload, $this->solution['key']); } /** * Update the AccountSecretInstance * * @param string $value The secret value. * @return AccountSecretInstance Updated AccountSecretInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $value): AccountSecretInstance { $data = Values::of(['Value' => $value, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AccountSecretInstance($this->version, $payload, $this->solution['key']); } /** * Delete the AccountSecretInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.AccountSecretContext ' . \implode(' ', $context) . ']'; } }PKt[ 4||%Twilio/Rest/Microvisor/V1/AppList.phpnu[solution = []; $this->uri = '/Apps'; } /** * Streams AppInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AppInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AppInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AppInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AppPage Page of AppInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AppPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AppPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AppInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AppPage Page of AppInstance */ public function getPage(string $targetUrl): AppPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AppPage($this->version, $response, $this->solution); } /** * Constructs a AppContext * * @param string $sid A string that uniquely identifies this App. */ public function getContext(string $sid): AppContext { return new AppContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.AppList]'; } }PKt[]]5Twilio/Rest/Microvisor/V1/Device/DeviceSecretList.phpnu[solution = ['deviceSid' => $deviceSid, ]; $this->uri = '/Devices/' . \rawurlencode($deviceSid) . '/Secrets'; } /** * Streams DeviceSecretInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DeviceSecretInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DeviceSecretInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DeviceSecretInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DeviceSecretPage Page of DeviceSecretInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DeviceSecretPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DeviceSecretPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DeviceSecretInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DeviceSecretPage Page of DeviceSecretInstance */ public function getPage(string $targetUrl): DeviceSecretPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DeviceSecretPage($this->version, $response, $this->solution); } /** * Create the DeviceSecretInstance * * @param string $key The secret key. * @param string $value The secret value. * @return DeviceSecretInstance Created DeviceSecretInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $key, string $value): DeviceSecretInstance { $data = Values::of(['Key' => $key, 'Value' => $value, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new DeviceSecretInstance($this->version, $payload, $this->solution['deviceSid']); } /** * Constructs a DeviceSecretContext * * @param string $key The secret key. */ public function getContext(string $key): DeviceSecretContext { return new DeviceSecretContext($this->version, $this->solution['deviceSid'], $key); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.DeviceSecretList]'; } }PKt[eY5Twilio/Rest/Microvisor/V1/Device/DeviceSecretPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DeviceSecretInstance \Twilio\Rest\Microvisor\V1\Device\DeviceSecretInstance */ public function buildInstance(array $payload): DeviceSecretInstance { return new DeviceSecretInstance($this->version, $payload, $this->solution['deviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.DeviceSecretPage]'; } }PKt[y_$$9Twilio/Rest/Microvisor/V1/Device/DeviceConfigInstance.phpnu[properties = [ 'deviceSid' => Values::array_get($payload, 'device_sid'), 'key' => Values::array_get($payload, 'key'), 'value' => Values::array_get($payload, 'value'), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['deviceSid' => $deviceSid, 'key' => $key ?: $this->properties['key'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DeviceConfigContext Context for this DeviceConfigInstance */ protected function proxy(): DeviceConfigContext { if (!$this->context) { $this->context = new DeviceConfigContext( $this->version, $this->solution['deviceSid'], $this->solution['key'] ); } return $this->context; } /** * Fetch the DeviceConfigInstance * * @return DeviceConfigInstance Fetched DeviceConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeviceConfigInstance { return $this->proxy()->fetch(); } /** * Update the DeviceConfigInstance * * @param string $value The config value. * @return DeviceConfigInstance Updated DeviceConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $value): DeviceConfigInstance { return $this->proxy()->update($value); } /** * Delete the DeviceConfigInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.DeviceConfigInstance ' . \implode(' ', $context) . ']'; } }PKt[ܮw=- - 8Twilio/Rest/Microvisor/V1/Device/DeviceSecretContext.phpnu[solution = ['deviceSid' => $deviceSid, 'key' => $key, ]; $this->uri = '/Devices/' . \rawurlencode($deviceSid) . '/Secrets/' . \rawurlencode($key) . ''; } /** * Fetch the DeviceSecretInstance * * @return DeviceSecretInstance Fetched DeviceSecretInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeviceSecretInstance { $payload = $this->version->fetch('GET', $this->uri); return new DeviceSecretInstance( $this->version, $payload, $this->solution['deviceSid'], $this->solution['key'] ); } /** * Update the DeviceSecretInstance * * @param string $value The secret value. * @return DeviceSecretInstance Updated DeviceSecretInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $value): DeviceSecretInstance { $data = Values::of(['Value' => $value, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DeviceSecretInstance( $this->version, $payload, $this->solution['deviceSid'], $this->solution['key'] ); } /** * Delete the DeviceSecretInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.DeviceSecretContext ' . \implode(' ', $context) . ']'; } }PKt[mZ9]]5Twilio/Rest/Microvisor/V1/Device/DeviceConfigList.phpnu[solution = ['deviceSid' => $deviceSid, ]; $this->uri = '/Devices/' . \rawurlencode($deviceSid) . '/Configs'; } /** * Streams DeviceConfigInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DeviceConfigInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DeviceConfigInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DeviceConfigInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DeviceConfigPage Page of DeviceConfigInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DeviceConfigPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DeviceConfigPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DeviceConfigInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DeviceConfigPage Page of DeviceConfigInstance */ public function getPage(string $targetUrl): DeviceConfigPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DeviceConfigPage($this->version, $response, $this->solution); } /** * Create the DeviceConfigInstance * * @param string $key The config key. * @param string $value The config value. * @return DeviceConfigInstance Created DeviceConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $key, string $value): DeviceConfigInstance { $data = Values::of(['Key' => $key, 'Value' => $value, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new DeviceConfigInstance($this->version, $payload, $this->solution['deviceSid']); } /** * Constructs a DeviceConfigContext * * @param string $key The config key. */ public function getContext(string $key): DeviceConfigContext { return new DeviceConfigContext($this->version, $this->solution['deviceSid'], $key); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.DeviceConfigList]'; } }PKt[Gt- - 8Twilio/Rest/Microvisor/V1/Device/DeviceConfigContext.phpnu[solution = ['deviceSid' => $deviceSid, 'key' => $key, ]; $this->uri = '/Devices/' . \rawurlencode($deviceSid) . '/Configs/' . \rawurlencode($key) . ''; } /** * Fetch the DeviceConfigInstance * * @return DeviceConfigInstance Fetched DeviceConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeviceConfigInstance { $payload = $this->version->fetch('GET', $this->uri); return new DeviceConfigInstance( $this->version, $payload, $this->solution['deviceSid'], $this->solution['key'] ); } /** * Update the DeviceConfigInstance * * @param string $value The config value. * @return DeviceConfigInstance Updated DeviceConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $value): DeviceConfigInstance { $data = Values::of(['Value' => $value, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DeviceConfigInstance( $this->version, $payload, $this->solution['deviceSid'], $this->solution['key'] ); } /** * Delete the DeviceConfigInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.DeviceConfigContext ' . \implode(' ', $context) . ']'; } }PKt[SO5Twilio/Rest/Microvisor/V1/Device/DeviceConfigPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DeviceConfigInstance \Twilio\Rest\Microvisor\V1\Device\DeviceConfigInstance */ public function buildInstance(array $payload): DeviceConfigInstance { return new DeviceConfigInstance($this->version, $payload, $this->solution['deviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.DeviceConfigPage]'; } }PKt[ Z9Twilio/Rest/Microvisor/V1/Device/DeviceSecretInstance.phpnu[properties = [ 'deviceSid' => Values::array_get($payload, 'device_sid'), 'key' => Values::array_get($payload, 'key'), 'dateRotated' => Deserialize::dateTime(Values::array_get($payload, 'date_rotated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['deviceSid' => $deviceSid, 'key' => $key ?: $this->properties['key'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DeviceSecretContext Context for this DeviceSecretInstance */ protected function proxy(): DeviceSecretContext { if (!$this->context) { $this->context = new DeviceSecretContext( $this->version, $this->solution['deviceSid'], $this->solution['key'] ); } return $this->context; } /** * Fetch the DeviceSecretInstance * * @return DeviceSecretInstance Fetched DeviceSecretInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeviceSecretInstance { return $this->proxy()->fetch(); } /** * Update the DeviceSecretInstance * * @param string $value The secret value. * @return DeviceSecretInstance Updated DeviceSecretInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $value): DeviceSecretInstance { return $this->proxy()->update($value); } /** * Delete the DeviceSecretInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.DeviceSecretInstance ' . \implode(' ', $context) . ']'; } }PKt[ W||)Twilio/Rest/Microvisor/V1/AppInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'hash' => Values::array_get($payload, 'hash'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AppContext Context for this AppInstance */ protected function proxy(): AppContext { if (!$this->context) { $this->context = new AppContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the AppInstance * * @return AppInstance Fetched AppInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AppInstance { return $this->proxy()->fetch(); } /** * Delete the AppInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.AppInstance ' . \implode(' ', $context) . ']'; } }PKt[(Twilio/Rest/Microvisor/V1/DeviceList.phpnu[solution = []; $this->uri = '/Devices'; } /** * Streams DeviceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DeviceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DeviceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DeviceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DevicePage Page of DeviceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DevicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DevicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DeviceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DevicePage Page of DeviceInstance */ public function getPage(string $targetUrl): DevicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DevicePage($this->version, $response, $this->solution); } /** * Constructs a DeviceContext * * @param string $sid A string that uniquely identifies this Device. */ public function getContext(string $sid): DeviceContext { return new DeviceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.DeviceList]'; } }PKt[ʜ/Twilio/Rest/Microvisor/V1/AccountSecretList.phpnu[solution = []; $this->uri = '/Secrets'; } /** * Streams AccountSecretInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AccountSecretInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AccountSecretInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AccountSecretInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AccountSecretPage Page of AccountSecretInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AccountSecretPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AccountSecretPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AccountSecretInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AccountSecretPage Page of AccountSecretInstance */ public function getPage(string $targetUrl): AccountSecretPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AccountSecretPage($this->version, $response, $this->solution); } /** * Create the AccountSecretInstance * * @param string $key The secret key. * @param string $value The secret value. * @return AccountSecretInstance Created AccountSecretInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $key, string $value): AccountSecretInstance { $data = Values::of(['Key' => $key, 'Value' => $value, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AccountSecretInstance($this->version, $payload); } /** * Constructs a AccountSecretContext * * @param string $key The secret key. */ public function getContext(string $key): AccountSecretContext { return new AccountSecretContext($this->version, $key); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.AccountSecretList]'; } }PKt[j6,Twilio/Rest/Microvisor/V1/DeviceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'app' => Values::array_get($payload, 'app'), 'logging' => Values::array_get($payload, 'logging'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return DeviceContext Context for this DeviceInstance */ protected function proxy(): DeviceContext { if (!$this->context) { $this->context = new DeviceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the DeviceInstance * * @return DeviceInstance Fetched DeviceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeviceInstance { return $this->proxy()->fetch(); } /** * Update the DeviceInstance * * @param array|Options $options Optional Arguments * @return DeviceInstance Updated DeviceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DeviceInstance { return $this->proxy()->update($options); } /** * Access the deviceConfigs */ protected function getDeviceConfigs(): DeviceConfigList { return $this->proxy()->deviceConfigs; } /** * Access the deviceSecrets */ protected function getDeviceSecrets(): DeviceSecretList { return $this->proxy()->deviceSecrets; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.DeviceInstance ' . \implode(' ', $context) . ']'; } }PKt[ ~3Twilio/Rest/Microvisor/V1/AccountConfigInstance.phpnu[properties = [ 'key' => Values::array_get($payload, 'key'), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'value' => Values::array_get($payload, 'value'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['key' => $key ?: $this->properties['key'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AccountConfigContext Context for this AccountConfigInstance */ protected function proxy(): AccountConfigContext { if (!$this->context) { $this->context = new AccountConfigContext($this->version, $this->solution['key']); } return $this->context; } /** * Fetch the AccountConfigInstance * * @return AccountConfigInstance Fetched AccountConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AccountConfigInstance { return $this->proxy()->fetch(); } /** * Update the AccountConfigInstance * * @param string $value The config value. * @return AccountConfigInstance Updated AccountConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $value): AccountConfigInstance { return $this->proxy()->update($value); } /** * Delete the AccountConfigInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.AccountConfigInstance ' . \implode(' ', $context) . ']'; } }PKt[_tt/Twilio/Rest/Microvisor/V1/AccountConfigPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AccountConfigInstance \Twilio\Rest\Microvisor\V1\AccountConfigInstance */ public function buildInstance(array $payload): AccountConfigInstance { return new AccountConfigInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.AccountConfigPage]'; } }PKt[F>>+Twilio/Rest/Microvisor/V1/DeviceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Devices/' . \rawurlencode($sid) . ''; } /** * Fetch the DeviceInstance * * @return DeviceInstance Fetched DeviceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): DeviceInstance { $payload = $this->version->fetch('GET', $this->uri); return new DeviceInstance($this->version, $payload, $this->solution['sid']); } /** * Update the DeviceInstance * * @param array|Options $options Optional Arguments * @return DeviceInstance Updated DeviceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): DeviceInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'TargetApp' => $options['targetApp'], 'LoggingEnabled' => Serialize::booleanToString($options['loggingEnabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new DeviceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the deviceConfigs */ protected function getDeviceConfigs(): DeviceConfigList { if (!$this->_deviceConfigs) { $this->_deviceConfigs = new DeviceConfigList($this->version, $this->solution['sid']); } return $this->_deviceConfigs; } /** * Access the deviceSecrets */ protected function getDeviceSecrets(): DeviceSecretList { if (!$this->_deviceSecrets) { $this->_deviceSecrets = new DeviceSecretList($this->version, $this->solution['sid']); } return $this->_deviceSecrets; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.DeviceContext ' . \implode(' ', $context) . ']'; } }PKt[ޏtt/Twilio/Rest/Microvisor/V1/AccountSecretPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AccountSecretInstance \Twilio\Rest\Microvisor\V1\AccountSecretInstance */ public function buildInstance(array $payload): AccountSecretInstance { return new AccountSecretInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.AccountSecretPage]'; } }PKt[az +Twilio/Rest/Microvisor/V1/DeviceOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['targetApp'] = $targetApp; $this->options['loggingEnabled'] = $loggingEnabled; } /** * A unique and addressable name to be assigned to this Device by the developer. It may be used in place of the Device SID. * * @param string $uniqueName A unique, developer-assigned name for this Device. * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The SID or unique name of the App to be targeted to the Device. * * @param string $targetApp The target App SID or unique name. * @return $this Fluent Builder */ public function setTargetApp(string $targetApp): self { $this->options['targetApp'] = $targetApp; return $this; } /** * A Boolean flag specifying whether to enable application logging. Logs will be enabled or extended for 24 hours. * * @param bool $loggingEnabled Whether to enable logging. * @return $this Fluent Builder */ public function setLoggingEnabled(bool $loggingEnabled): self { $this->options['loggingEnabled'] = $loggingEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Microvisor.V1.UpdateDeviceOptions ' . $options . ']'; } }PKt[288%Twilio/Rest/Microvisor/V1/AppPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AppInstance \Twilio\Rest\Microvisor\V1\AppInstance */ public function buildInstance(array $payload): AppInstance { return new AppInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.AppPage]'; } }PKt[EW 2Twilio/Rest/Microvisor/V1/AccountConfigContext.phpnu[solution = ['key' => $key, ]; $this->uri = '/Configs/' . \rawurlencode($key) . ''; } /** * Fetch the AccountConfigInstance * * @return AccountConfigInstance Fetched AccountConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AccountConfigInstance { $payload = $this->version->fetch('GET', $this->uri); return new AccountConfigInstance($this->version, $payload, $this->solution['key']); } /** * Update the AccountConfigInstance * * @param string $value The config value. * @return AccountConfigInstance Updated AccountConfigInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $value): AccountConfigInstance { $data = Values::of(['Value' => $value, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AccountConfigInstance($this->version, $payload, $this->solution['key']); } /** * Delete the AccountConfigInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.AccountConfigContext ' . \implode(' ', $context) . ']'; } }PKt[f(Twilio/Rest/Microvisor/V1/AppContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Apps/' . \rawurlencode($sid) . ''; } /** * Fetch the AppInstance * * @return AppInstance Fetched AppInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AppInstance { $payload = $this->version->fetch('GET', $this->uri); return new AppInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the AppInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Microvisor.V1.AppContext ' . \implode(' ', $context) . ']'; } }PKt[1rJJ(Twilio/Rest/Microvisor/V1/DevicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DeviceInstance \Twilio\Rest\Microvisor\V1\DeviceInstance */ public function buildInstance(array $payload): DeviceInstance { return new DeviceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1.DevicePage]'; } }PKt[V[ [ Twilio/Rest/Microvisor/V1.phpnu[version = 'v1'; } protected function getAccountConfigs(): AccountConfigList { if (!$this->_accountConfigs) { $this->_accountConfigs = new AccountConfigList($this); } return $this->_accountConfigs; } protected function getAccountSecrets(): AccountSecretList { if (!$this->_accountSecrets) { $this->_accountSecrets = new AccountSecretList($this); } return $this->_accountSecrets; } protected function getApps(): AppList { if (!$this->_apps) { $this->_apps = new AppList($this); } return $this->_apps; } protected function getDevices(): DeviceList { if (!$this->_devices) { $this->_devices = new DeviceList($this); } return $this->_devices; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Microvisor.V1]'; } }PKt[?Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'attributes' => Values::array_get($payload, 'attributes'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EndUserContext Context for this EndUserInstance */ protected function proxy(): EndUserContext { if (!$this->context) { $this->context = new EndUserContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the EndUserInstance * * @return EndUserInstance Fetched EndUserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EndUserInstance { return $this->proxy()->fetch(); } /** * Update the EndUserInstance * * @param array|Options $options Optional Arguments * @return EndUserInstance Updated EndUserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): EndUserInstance { return $this->proxy()->update($options); } /** * Delete the EndUserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.EndUserInstance ' . \implode(' ', $context) . ']'; } }PKt[cK ATwilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationOptions.phpnu[options['endUserType'] = $endUserType; $this->options['isoCountry'] = $isoCountry; $this->options['numberType'] = $numberType; } /** * The type of End User the regulation requires - can be `individual` or `business`. * * @param string $endUserType The type of End User of the Regulation resource * @return $this Fluent Builder */ public function setEndUserType(string $endUserType): self { $this->options['endUserType'] = $endUserType; return $this; } /** * The ISO country code of the phone number's country. * * @param string $isoCountry The ISO country code of the phone number's country * @return $this Fluent Builder */ public function setIsoCountry(string $isoCountry): self { $this->options['isoCountry'] = $isoCountry; return $this; } /** * The type of phone number that the regulatory requiremnt is restricting. * * @param string $numberType The type of phone number being regulated * @return $this Fluent Builder */ public function setNumberType(string $numberType): self { $this->options['numberType'] = $numberType; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Numbers.V2.ReadRegulationOptions ' . $options . ']'; } }PKt[Q>Twilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RegulationInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\RegulationInstance */ public function buildInstance(array $payload): RegulationInstance { return new RegulationInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.RegulationPage]'; } }PKt[{PMM=Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleOptions.phpnu[=` or * `ValidUntilDate<=`. Both can be used in * conjunction as well. * @param string $validUntilDate Date to filter Bundles having their * `valid_until_date` before or after the * specified date. Can be `ValidUntilDate>=` or * `ValidUntilDate<=`. Both can be used in * conjunction as well. * @param string $validUntilDateAfter Date to filter Bundles having their * `valid_until_date` before or after the * specified date. Can be `ValidUntilDate>=` * or `ValidUntilDate<=`. Both can be used * in conjunction as well. * @return ReadBundleOptions Options builder */ public static function read(string $status = Values::NONE, string $friendlyName = Values::NONE, string $regulationSid = Values::NONE, string $isoCountry = Values::NONE, string $numberType = Values::NONE, bool $hasValidUntilDate = Values::NONE, string $sortBy = Values::NONE, string $sortDirection = Values::NONE, string $validUntilDateBefore = Values::NONE, string $validUntilDate = Values::NONE, string $validUntilDateAfter = Values::NONE): ReadBundleOptions { return new ReadBundleOptions($status, $friendlyName, $regulationSid, $isoCountry, $numberType, $hasValidUntilDate, $sortBy, $sortDirection, $validUntilDateBefore, $validUntilDate, $validUntilDateAfter); } /** * @param string $status The verification status of the Bundle resource * @param string $statusCallback The URL we call to inform your application of * status changes. * @param string $friendlyName The string that you assigned to describe the * resource * @param string $email The email address * @return UpdateBundleOptions Options builder */ public static function update(string $status = Values::NONE, string $statusCallback = Values::NONE, string $friendlyName = Values::NONE, string $email = Values::NONE): UpdateBundleOptions { return new UpdateBundleOptions($status, $statusCallback, $friendlyName, $email); } } class CreateBundleOptions extends Options { /** * @param string $statusCallback The URL we call to inform your application of * status changes. * @param string $regulationSid The unique string of a regulation. * @param string $isoCountry The ISO country code of the country * @param string $endUserType The type of End User of the Bundle resource * @param string $numberType The type of phone number */ public function __construct(string $statusCallback = Values::NONE, string $regulationSid = Values::NONE, string $isoCountry = Values::NONE, string $endUserType = Values::NONE, string $numberType = Values::NONE) { $this->options['statusCallback'] = $statusCallback; $this->options['regulationSid'] = $regulationSid; $this->options['isoCountry'] = $isoCountry; $this->options['endUserType'] = $endUserType; $this->options['numberType'] = $numberType; } /** * The URL we call to inform your application of status changes. * * @param string $statusCallback The URL we call to inform your application of * status changes. * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The unique string of a regulation that is associated to the Bundle resource. * * @param string $regulationSid The unique string of a regulation. * @return $this Fluent Builder */ public function setRegulationSid(string $regulationSid): self { $this->options['regulationSid'] = $regulationSid; return $this; } /** * The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle's phone number country ownership request. * * @param string $isoCountry The ISO country code of the country * @return $this Fluent Builder */ public function setIsoCountry(string $isoCountry): self { $this->options['isoCountry'] = $isoCountry; return $this; } /** * The [type of End User](https://www.twilio.com/docs/phone-numbers/regulatory/api/end-user-types) of the Bundle resource. * * @param string $endUserType The type of End User of the Bundle resource * @return $this Fluent Builder */ public function setEndUserType(string $endUserType): self { $this->options['endUserType'] = $endUserType; return $this; } /** * The type of phone number of the Bundle's ownership request. Can be `local`, `mobile`, `national`, or `toll free`. * * @param string $numberType The type of phone number * @return $this Fluent Builder */ public function setNumberType(string $numberType): self { $this->options['numberType'] = $numberType; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Numbers.V2.CreateBundleOptions ' . $options . ']'; } } class ReadBundleOptions extends Options { /** * @param string $status The verification status of the Bundle resource * @param string $friendlyName The string that you assigned to describe the * resource * @param string $regulationSid The unique string of a regulation. * @param string $isoCountry The ISO country code of the country * @param string $numberType The type of phone number * @param bool $hasValidUntilDate Indicates that the Bundle is a valid Bundle * until a specified expiration date. * @param string $sortBy Can be `valid-until` or `date-updated`. Defaults to * `date-created`. * @param string $sortDirection Default is `DESC`. Can be `ASC` or `DESC`. * @param string $validUntilDateBefore Date to filter Bundles having their * `valid_until_date` before or after the * specified date. Can be * `ValidUntilDate>=` or * `ValidUntilDate<=`. Both can be used in * conjunction as well. * @param string $validUntilDate Date to filter Bundles having their * `valid_until_date` before or after the * specified date. Can be `ValidUntilDate>=` or * `ValidUntilDate<=`. Both can be used in * conjunction as well. * @param string $validUntilDateAfter Date to filter Bundles having their * `valid_until_date` before or after the * specified date. Can be `ValidUntilDate>=` * or `ValidUntilDate<=`. Both can be used * in conjunction as well. */ public function __construct(string $status = Values::NONE, string $friendlyName = Values::NONE, string $regulationSid = Values::NONE, string $isoCountry = Values::NONE, string $numberType = Values::NONE, bool $hasValidUntilDate = Values::NONE, string $sortBy = Values::NONE, string $sortDirection = Values::NONE, string $validUntilDateBefore = Values::NONE, string $validUntilDate = Values::NONE, string $validUntilDateAfter = Values::NONE) { $this->options['status'] = $status; $this->options['friendlyName'] = $friendlyName; $this->options['regulationSid'] = $regulationSid; $this->options['isoCountry'] = $isoCountry; $this->options['numberType'] = $numberType; $this->options['hasValidUntilDate'] = $hasValidUntilDate; $this->options['sortBy'] = $sortBy; $this->options['sortDirection'] = $sortDirection; $this->options['validUntilDateBefore'] = $validUntilDateBefore; $this->options['validUntilDate'] = $validUntilDate; $this->options['validUntilDateAfter'] = $validUntilDateAfter; } /** * The verification status of the Bundle resource. Please refer to [Bundle Statuses](https://www.twilio.com/docs/phone-numbers/regulatory/api/bundles#bundle-statuses) for more details. * * @param string $status The verification status of the Bundle resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The string that you assigned to describe the resource. The column can contain 255 variable characters. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The unique string of a [Regulation resource](https://www.twilio.com/docs/phone-numbers/regulatory/api/regulations) that is associated to the Bundle resource. * * @param string $regulationSid The unique string of a regulation. * @return $this Fluent Builder */ public function setRegulationSid(string $regulationSid): self { $this->options['regulationSid'] = $regulationSid; return $this; } /** * The 2-digit [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle's phone number country ownership request. * * @param string $isoCountry The ISO country code of the country * @return $this Fluent Builder */ public function setIsoCountry(string $isoCountry): self { $this->options['isoCountry'] = $isoCountry; return $this; } /** * The type of phone number of the Bundle's ownership request. Can be `local`, `mobile`, `national`, or `tollfree`. * * @param string $numberType The type of phone number * @return $this Fluent Builder */ public function setNumberType(string $numberType): self { $this->options['numberType'] = $numberType; return $this; } /** * Indicates that the Bundle is a valid Bundle until a specified expiration date. * * @param bool $hasValidUntilDate Indicates that the Bundle is a valid Bundle * until a specified expiration date. * @return $this Fluent Builder */ public function setHasValidUntilDate(bool $hasValidUntilDate): self { $this->options['hasValidUntilDate'] = $hasValidUntilDate; return $this; } /** * Can be `valid-until` or `date-updated`. Defaults to `date-created`. * * @param string $sortBy Can be `valid-until` or `date-updated`. Defaults to * `date-created`. * @return $this Fluent Builder */ public function setSortBy(string $sortBy): self { $this->options['sortBy'] = $sortBy; return $this; } /** * Default is `DESC`. Can be `ASC` or `DESC`. * * @param string $sortDirection Default is `DESC`. Can be `ASC` or `DESC`. * @return $this Fluent Builder */ public function setSortDirection(string $sortDirection): self { $this->options['sortDirection'] = $sortDirection; return $this; } /** * Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. * * @param string $validUntilDateBefore Date to filter Bundles having their * `valid_until_date` before or after the * specified date. Can be * `ValidUntilDate>=` or * `ValidUntilDate<=`. Both can be used in * conjunction as well. * @return $this Fluent Builder */ public function setValidUntilDateBefore(string $validUntilDateBefore): self { $this->options['validUntilDateBefore'] = $validUntilDateBefore; return $this; } /** * Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. * * @param string $validUntilDate Date to filter Bundles having their * `valid_until_date` before or after the * specified date. Can be `ValidUntilDate>=` or * `ValidUntilDate<=`. Both can be used in * conjunction as well. * @return $this Fluent Builder */ public function setValidUntilDate(string $validUntilDate): self { $this->options['validUntilDate'] = $validUntilDate; return $this; } /** * Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format. * * @param string $validUntilDateAfter Date to filter Bundles having their * `valid_until_date` before or after the * specified date. Can be `ValidUntilDate>=` * or `ValidUntilDate<=`. Both can be used * in conjunction as well. * @return $this Fluent Builder */ public function setValidUntilDateAfter(string $validUntilDateAfter): self { $this->options['validUntilDateAfter'] = $validUntilDateAfter; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Numbers.V2.ReadBundleOptions ' . $options . ']'; } } class UpdateBundleOptions extends Options { /** * @param string $status The verification status of the Bundle resource * @param string $statusCallback The URL we call to inform your application of * status changes. * @param string $friendlyName The string that you assigned to describe the * resource * @param string $email The email address */ public function __construct(string $status = Values::NONE, string $statusCallback = Values::NONE, string $friendlyName = Values::NONE, string $email = Values::NONE) { $this->options['status'] = $status; $this->options['statusCallback'] = $statusCallback; $this->options['friendlyName'] = $friendlyName; $this->options['email'] = $email; } /** * The verification status of the Bundle resource. * * @param string $status The verification status of the Bundle resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The URL we call to inform your application of status changes. * * @param string $statusCallback The URL we call to inform your application of * status changes. * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The email address that will receive updates when the Bundle resource changes status. * * @param string $email The email address * @return $this Fluent Builder */ public function setEmail(string $email): self { $this->options['email'] = $email; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Numbers.V2.UpdateBundleOptions ' . $options . ']'; } }PKt[^MTwilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/RegulatoryCompliance/SupportingDocumentTypes/' . \rawurlencode($sid) . ''; } /** * Fetch the SupportingDocumentTypeInstance * * @return SupportingDocumentTypeInstance Fetched SupportingDocumentTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SupportingDocumentTypeInstance { $payload = $this->version->fetch('GET', $this->uri); return new SupportingDocumentTypeInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.SupportingDocumentTypeContext ' . \implode(' ', $context) . ']'; } }PKt[rFJTwilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SupportingDocumentTypeInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentTypeInstance */ public function buildInstance(array $payload): SupportingDocumentTypeInstance { return new SupportingDocumentTypeInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.SupportingDocumentTypePage]'; } }PKt[GTwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsList.phpnu[solution = ['bundleSid' => $bundleSid, ]; $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($bundleSid) . '/ReplaceItems'; } /** * Create the ReplaceItemsInstance * * @param string $fromBundleSid The source bundle sid to copy the item * assignments from * @return ReplaceItemsInstance Created ReplaceItemsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $fromBundleSid): ReplaceItemsInstance { $data = Values::of(['FromBundleSid' => $fromBundleSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ReplaceItemsInstance($this->version, $payload, $this->solution['bundleSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.ReplaceItemsList]'; } }PKt[6%MTwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'bundleSid' => Values::array_get($payload, 'bundle_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'objectSid' => Values::array_get($payload, 'object_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['bundleSid' => $bundleSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ItemAssignmentContext Context for this ItemAssignmentInstance */ protected function proxy(): ItemAssignmentContext { if (!$this->context) { $this->context = new ItemAssignmentContext( $this->version, $this->solution['bundleSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ItemAssignmentInstance * * @return ItemAssignmentInstance Fetched ItemAssignmentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ItemAssignmentInstance { return $this->proxy()->fetch(); } /** * Delete the ItemAssignmentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.ItemAssignmentInstance ' . \implode(' ', $context) . ']'; } }PKt[vj j KTwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'regulationSid' => Values::array_get($payload, 'regulation_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'status' => Values::array_get($payload, 'status'), 'validUntil' => Deserialize::dateTime(Values::array_get($payload, 'valid_until')), 'email' => Values::array_get($payload, 'email'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['bundleSid' => $bundleSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.ReplaceItemsInstance]'; } }PKt[(pITwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentList.phpnu[solution = ['bundleSid' => $bundleSid, ]; $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($bundleSid) . '/ItemAssignments'; } /** * Create the ItemAssignmentInstance * * @param string $objectSid The sid of an object bag * @return ItemAssignmentInstance Created ItemAssignmentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $objectSid): ItemAssignmentInstance { $data = Values::of(['ObjectSid' => $objectSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ItemAssignmentInstance($this->version, $payload, $this->solution['bundleSid']); } /** * Streams ItemAssignmentInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ItemAssignmentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ItemAssignmentInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ItemAssignmentInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ItemAssignmentPage Page of ItemAssignmentInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ItemAssignmentPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ItemAssignmentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ItemAssignmentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ItemAssignmentPage Page of ItemAssignmentInstance */ public function getPage(string $targetUrl): ItemAssignmentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ItemAssignmentPage($this->version, $response, $this->solution); } /** * Constructs a ItemAssignmentContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ItemAssignmentContext { return new ItemAssignmentContext($this->version, $this->solution['bundleSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.ItemAssignmentList]'; } }PKt[l"aaGTwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ReplaceItemsInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ReplaceItemsInstance */ public function buildInstance(array $payload): ReplaceItemsInstance { return new ReplaceItemsInstance($this->version, $payload, $this->solution['bundleSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.ReplaceItemsPage]'; } }PKt[XDMMITwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'regulationSid' => Values::array_get($payload, 'regulation_sid'), 'bundleSid' => Values::array_get($payload, 'bundle_sid'), 'status' => Values::array_get($payload, 'status'), 'results' => Values::array_get($payload, 'results'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['bundleSid' => $bundleSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EvaluationContext Context for this EvaluationInstance */ protected function proxy(): EvaluationContext { if (!$this->context) { $this->context = new EvaluationContext( $this->version, $this->solution['bundleSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the EvaluationInstance * * @return EvaluationInstance Fetched EvaluationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EvaluationInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.EvaluationInstance ' . \implode(' ', $context) . ']'; } }PKt[UUETwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BundleCopyInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\BundleCopyInstance */ public function buildInstance(array $payload): BundleCopyInstance { return new BundleCopyInstance($this->version, $payload, $this->solution['bundleSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.BundleCopyPage]'; } }PKt[|ITwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ItemAssignmentInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentInstance */ public function buildInstance(array $payload): ItemAssignmentInstance { return new ItemAssignmentInstance($this->version, $payload, $this->solution['bundleSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.ItemAssignmentPage]'; } }PKt[&ETwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EvaluationInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\EvaluationInstance */ public function buildInstance(array $payload): EvaluationInstance { return new EvaluationInstance($this->version, $payload, $this->solution['bundleSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.EvaluationPage]'; } }PKt[Vsd d ITwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'regulationSid' => Values::array_get($payload, 'regulation_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'status' => Values::array_get($payload, 'status'), 'validUntil' => Deserialize::dateTime(Values::array_get($payload, 'valid_until')), 'email' => Values::array_get($payload, 'email'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['bundleSid' => $bundleSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.BundleCopyInstance]'; } }PKt[}HTwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * The string that you assigned to describe the copied bundle. * * @param string $friendlyName The string that you assigned to describe the * copied bundle * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Numbers.V2.CreateBundleCopyOptions ' . $options . ']'; } }PKt[OwETwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationList.phpnu[solution = ['bundleSid' => $bundleSid, ]; $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($bundleSid) . '/Evaluations'; } /** * Create the EvaluationInstance * * @return EvaluationInstance Created EvaluationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(): EvaluationInstance { $payload = $this->version->create('POST', $this->uri); return new EvaluationInstance($this->version, $payload, $this->solution['bundleSid']); } /** * Streams EvaluationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EvaluationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EvaluationInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of EvaluationInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EvaluationPage Page of EvaluationInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EvaluationPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EvaluationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EvaluationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EvaluationPage Page of EvaluationInstance */ public function getPage(string $targetUrl): EvaluationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EvaluationPage($this->version, $response, $this->solution); } /** * Constructs a EvaluationContext * * @param string $sid The unique string that identifies the Evaluation resource */ public function getContext(string $sid): EvaluationContext { return new EvaluationContext($this->version, $this->solution['bundleSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.EvaluationList]'; } }PKt[GV%%HTwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationContext.phpnu[solution = ['bundleSid' => $bundleSid, 'sid' => $sid, ]; $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($bundleSid) . '/Evaluations/' . \rawurlencode($sid) . ''; } /** * Fetch the EvaluationInstance * * @return EvaluationInstance Fetched EvaluationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EvaluationInstance { $payload = $this->version->fetch('GET', $this->uri); return new EvaluationInstance( $this->version, $payload, $this->solution['bundleSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.EvaluationContext ' . \implode(' ', $context) . ']'; } }PKt[k  ETwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyList.phpnu[solution = ['bundleSid' => $bundleSid, ]; $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($bundleSid) . '/Copies'; } /** * Create the BundleCopyInstance * * @param array|Options $options Optional Arguments * @return BundleCopyInstance Created BundleCopyInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): BundleCopyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new BundleCopyInstance($this->version, $payload, $this->solution['bundleSid']); } /** * Streams BundleCopyInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BundleCopyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BundleCopyInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of BundleCopyInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BundleCopyPage Page of BundleCopyInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BundleCopyPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BundleCopyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BundleCopyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BundleCopyPage Page of BundleCopyInstance */ public function getPage(string $targetUrl): BundleCopyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BundleCopyPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.BundleCopyList]'; } }PKt[FM__LTwilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentContext.phpnu[solution = ['bundleSid' => $bundleSid, 'sid' => $sid, ]; $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($bundleSid) . '/ItemAssignments/' . \rawurlencode($sid) . ''; } /** * Fetch the ItemAssignmentInstance * * @return ItemAssignmentInstance Fetched ItemAssignmentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ItemAssignmentInstance { $payload = $this->version->fetch('GET', $this->uri); return new ItemAssignmentInstance( $this->version, $payload, $this->solution['bundleSid'], $this->solution['sid'] ); } /** * Delete the ItemAssignmentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.ItemAssignmentContext ' . \implode(' ', $context) . ']'; } }PKt[N>Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserOptions.phpnu[options['attributes'] = $attributes; } /** * The set of parameters that are the attributes of the End User resource which are derived End User Types. * * @param array $attributes The set of parameters that compose the End User * resource * @return $this Fluent Builder */ public function setAttributes(array $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Numbers.V2.CreateEndUserOptions ' . $options . ']'; } } class UpdateEndUserOptions extends Options { /** * @param string $friendlyName The string that you assigned to describe the * resource * @param array $attributes The set of parameters that compose the End User * resource */ public function __construct(string $friendlyName = Values::NONE, array $attributes = Values::ARRAY_NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['attributes'] = $attributes; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The set of parameters that are the attributes of the End User resource which are derived End User Types. * * @param array $attributes The set of parameters that compose the End User * resource * @return $this Fluent Builder */ public function setAttributes(array $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Numbers.V2.UpdateEndUserOptions ' . $options . ']'; } }PKt[%&&ATwilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/RegulatoryCompliance/Regulations/' . \rawurlencode($sid) . ''; } /** * Fetch the RegulationInstance * * @return RegulationInstance Fetched RegulationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RegulationInstance { $payload = $this->version->fetch('GET', $this->uri); return new RegulationInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.RegulationContext ' . \implode(' ', $context) . ']'; } }PKt[xI BTwilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'numberType' => Values::array_get($payload, 'number_type'), 'endUserType' => Values::array_get($payload, 'end_user_type'), 'requirements' => Values::array_get($payload, 'requirements'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RegulationContext Context for this RegulationInstance */ protected function proxy(): RegulationContext { if (!$this->context) { $this->context = new RegulationContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the RegulationInstance * * @return RegulationInstance Fetched RegulationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RegulationInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.RegulationInstance ' . \implode(' ', $context) . ']'; } }PKt[R;Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserList.phpnu[solution = []; $this->uri = '/RegulatoryCompliance/EndUsers'; } /** * Create the EndUserInstance * * @param string $friendlyName The string that you assigned to describe the * resource * @param string $type The type of end user of the Bundle resource * @param array|Options $options Optional Arguments * @return EndUserInstance Created EndUserInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $type, array $options = []): EndUserInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Type' => $type, 'Attributes' => Serialize::jsonObject($options['attributes']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new EndUserInstance($this->version, $payload); } /** * Streams EndUserInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EndUserInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EndUserInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of EndUserInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EndUserPage Page of EndUserInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EndUserPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EndUserPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EndUserInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EndUserPage Page of EndUserInstance */ public function getPage(string $targetUrl): EndUserPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EndUserPage($this->version, $response, $this->solution); } /** * Constructs a EndUserContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): EndUserContext { return new EndUserContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.EndUserList]'; } }PKt[|xFTwilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SupportingDocumentInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentInstance */ public function buildInstance(array $payload): SupportingDocumentInstance { return new SupportingDocumentInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.SupportingDocumentPage]'; } }PKt[{R ITwilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/RegulatoryCompliance/SupportingDocuments/' . \rawurlencode($sid) . ''; } /** * Fetch the SupportingDocumentInstance * * @return SupportingDocumentInstance Fetched SupportingDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SupportingDocumentInstance { $payload = $this->version->fetch('GET', $this->uri); return new SupportingDocumentInstance($this->version, $payload, $this->solution['sid']); } /** * Update the SupportingDocumentInstance * * @param array|Options $options Optional Arguments * @return SupportingDocumentInstance Updated SupportingDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SupportingDocumentInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Attributes' => Serialize::jsonObject($options['attributes']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SupportingDocumentInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the SupportingDocumentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.SupportingDocumentContext ' . \implode(' ', $context) . ']'; } }PKt[ NTwilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'machineName' => Values::array_get($payload, 'machine_name'), 'fields' => Values::array_get($payload, 'fields'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SupportingDocumentTypeContext Context for this * SupportingDocumentTypeInstance */ protected function proxy(): SupportingDocumentTypeContext { if (!$this->context) { $this->context = new SupportingDocumentTypeContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SupportingDocumentTypeInstance * * @return SupportingDocumentTypeInstance Fetched SupportingDocumentTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SupportingDocumentTypeInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.SupportingDocumentTypeInstance ' . \implode(' ', $context) . ']'; } }PKt[vH5 5 CTwilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'machineName' => Values::array_get($payload, 'machine_name'), 'fields' => Values::array_get($payload, 'fields'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EndUserTypeContext Context for this EndUserTypeInstance */ protected function proxy(): EndUserTypeContext { if (!$this->context) { $this->context = new EndUserTypeContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the EndUserTypeInstance * * @return EndUserTypeInstance Fetched EndUserTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EndUserTypeInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.EndUserTypeInstance ' . \implode(' ', $context) . ']'; } }PKt[cc=Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($sid) . ''; } /** * Fetch the BundleInstance * * @return BundleInstance Fetched BundleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BundleInstance { $payload = $this->version->fetch('GET', $this->uri); return new BundleInstance($this->version, $payload, $this->solution['sid']); } /** * Update the BundleInstance * * @param array|Options $options Optional Arguments * @return BundleInstance Updated BundleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): BundleInstance { $options = new Values($options); $data = Values::of([ 'Status' => $options['status'], 'StatusCallback' => $options['statusCallback'], 'FriendlyName' => $options['friendlyName'], 'Email' => $options['email'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new BundleInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the BundleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the evaluations */ protected function getEvaluations(): EvaluationList { if (!$this->_evaluations) { $this->_evaluations = new EvaluationList($this->version, $this->solution['sid']); } return $this->_evaluations; } /** * Access the itemAssignments */ protected function getItemAssignments(): ItemAssignmentList { if (!$this->_itemAssignments) { $this->_itemAssignments = new ItemAssignmentList($this->version, $this->solution['sid']); } return $this->_itemAssignments; } /** * Access the bundleCopies */ protected function getBundleCopies(): BundleCopyList { if (!$this->_bundleCopies) { $this->_bundleCopies = new BundleCopyList($this->version, $this->solution['sid']); } return $this->_bundleCopies; } /** * Access the replaceItems */ protected function getReplaceItems(): ReplaceItemsList { if (!$this->_replaceItems) { $this->_replaceItems = new ReplaceItemsList($this->version, $this->solution['sid']); } return $this->_replaceItems; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.BundleContext ' . \implode(' ', $context) . ']'; } }PKt[r>Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'regulationSid' => Values::array_get($payload, 'regulation_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'status' => Values::array_get($payload, 'status'), 'validUntil' => Deserialize::dateTime(Values::array_get($payload, 'valid_until')), 'email' => Values::array_get($payload, 'email'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return BundleContext Context for this BundleInstance */ protected function proxy(): BundleContext { if (!$this->context) { $this->context = new BundleContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the BundleInstance * * @return BundleInstance Fetched BundleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BundleInstance { return $this->proxy()->fetch(); } /** * Update the BundleInstance * * @param array|Options $options Optional Arguments * @return BundleInstance Updated BundleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): BundleInstance { return $this->proxy()->update($options); } /** * Delete the BundleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the evaluations */ protected function getEvaluations(): EvaluationList { return $this->proxy()->evaluations; } /** * Access the itemAssignments */ protected function getItemAssignments(): ItemAssignmentList { return $this->proxy()->itemAssignments; } /** * Access the bundleCopies */ protected function getBundleCopies(): BundleCopyList { return $this->proxy()->bundleCopies; } /** * Access the replaceItems */ protected function getReplaceItems(): ReplaceItemsList { return $this->proxy()->replaceItems; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.BundleInstance ' . \implode(' ', $context) . ']'; } }PKt[(Ҿ?Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EndUserTypeInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeInstance */ public function buildInstance(array $payload): EndUserTypeInstance { return new EndUserTypeInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.EndUserTypePage]'; } }PKt[á  ITwilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentOptions.phpnu[options['attributes'] = $attributes; } /** * The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types. * * @param array $attributes The set of parameters that compose the Supporting * Documents resource * @return $this Fluent Builder */ public function setAttributes(array $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Numbers.V2.CreateSupportingDocumentOptions ' . $options . ']'; } } class UpdateSupportingDocumentOptions extends Options { /** * @param string $friendlyName The string that you assigned to describe the * resource * @param array $attributes The set of parameters that compose the Supporting * Document resource */ public function __construct(string $friendlyName = Values::NONE, array $attributes = Values::ARRAY_NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['attributes'] = $attributes; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types. * * @param array $attributes The set of parameters that compose the Supporting * Document resource * @return $this Fluent Builder */ public function setAttributes(array $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Numbers.V2.UpdateSupportingDocumentOptions ' . $options . ']'; } }PKt[u;Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EndUserInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserInstance */ public function buildInstance(array $payload): EndUserInstance { return new EndUserInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.EndUserPage]'; } }PKt[Ƞ:Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundlePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BundleInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleInstance */ public function buildInstance(array $payload): BundleInstance { return new BundleInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.BundlePage]'; } }PKt[R9b >Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/RegulatoryCompliance/EndUsers/' . \rawurlencode($sid) . ''; } /** * Fetch the EndUserInstance * * @return EndUserInstance Fetched EndUserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EndUserInstance { $payload = $this->version->fetch('GET', $this->uri); return new EndUserInstance($this->version, $payload, $this->solution['sid']); } /** * Update the EndUserInstance * * @param array|Options $options Optional Arguments * @return EndUserInstance Updated EndUserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): EndUserInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Attributes' => Serialize::jsonObject($options['attributes']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new EndUserInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the EndUserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.EndUserContext ' . \implode(' ', $context) . ']'; } }PKt[HJTwilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'mimeType' => Values::array_get($payload, 'mime_type'), 'status' => Values::array_get($payload, 'status'), 'failureReason' => Values::array_get($payload, 'failure_reason'), 'type' => Values::array_get($payload, 'type'), 'attributes' => Values::array_get($payload, 'attributes'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SupportingDocumentContext Context for this SupportingDocumentInstance */ protected function proxy(): SupportingDocumentContext { if (!$this->context) { $this->context = new SupportingDocumentContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SupportingDocumentInstance * * @return SupportingDocumentInstance Fetched SupportingDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SupportingDocumentInstance { return $this->proxy()->fetch(); } /** * Update the SupportingDocumentInstance * * @param array|Options $options Optional Arguments * @return SupportingDocumentInstance Updated SupportingDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SupportingDocumentInstance { return $this->proxy()->update($options); } /** * Delete the SupportingDocumentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.SupportingDocumentInstance ' . \implode(' ', $context) . ']'; } }PKt[w?Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeList.phpnu[solution = []; $this->uri = '/RegulatoryCompliance/EndUserTypes'; } /** * Streams EndUserTypeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EndUserTypeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EndUserTypeInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of EndUserTypeInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EndUserTypePage Page of EndUserTypeInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EndUserTypePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EndUserTypePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EndUserTypeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EndUserTypePage Page of EndUserTypeInstance */ public function getPage(string $targetUrl): EndUserTypePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EndUserTypePage($this->version, $response, $this->solution); } /** * Constructs a EndUserTypeContext * * @param string $sid The unique string that identifies the End-User Type * resource */ public function getContext(string $sid): EndUserTypeContext { return new EndUserTypeContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.EndUserTypeList]'; } }PKt[N7H֜JTwilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeList.phpnu[solution = []; $this->uri = '/RegulatoryCompliance/SupportingDocumentTypes'; } /** * Streams SupportingDocumentTypeInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SupportingDocumentTypeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SupportingDocumentTypeInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SupportingDocumentTypeInstance records from the * API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SupportingDocumentTypePage Page of SupportingDocumentTypeInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SupportingDocumentTypePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SupportingDocumentTypePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SupportingDocumentTypeInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SupportingDocumentTypePage Page of SupportingDocumentTypeInstance */ public function getPage(string $targetUrl): SupportingDocumentTypePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SupportingDocumentTypePage($this->version, $response, $this->solution); } /** * Constructs a SupportingDocumentTypeContext * * @param string $sid The unique string that identifies the Supporting Document * Type resource */ public function getContext(string $sid): SupportingDocumentTypeContext { return new SupportingDocumentTypeContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.SupportingDocumentTypeList]'; } }PKt[css>Twilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationList.phpnu[solution = []; $this->uri = '/RegulatoryCompliance/Regulations'; } /** * Streams RegulationInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RegulationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RegulationInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RegulationInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RegulationPage Page of RegulationInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RegulationPage { $options = new Values($options); $params = Values::of([ 'EndUserType' => $options['endUserType'], 'IsoCountry' => $options['isoCountry'], 'NumberType' => $options['numberType'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RegulationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RegulationInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RegulationPage Page of RegulationInstance */ public function getPage(string $targetUrl): RegulationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RegulationPage($this->version, $response, $this->solution); } /** * Constructs a RegulationContext * * @param string $sid The unique string that identifies the Regulation resource */ public function getContext(string $sid): RegulationContext { return new RegulationContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.RegulationList]'; } }PKt[jjsFTwilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentList.phpnu[solution = []; $this->uri = '/RegulatoryCompliance/SupportingDocuments'; } /** * Create the SupportingDocumentInstance * * @param string $friendlyName The string that you assigned to describe the * resource * @param string $type The type of the Supporting Document * @param array|Options $options Optional Arguments * @return SupportingDocumentInstance Created SupportingDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $type, array $options = []): SupportingDocumentInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Type' => $type, 'Attributes' => Serialize::jsonObject($options['attributes']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SupportingDocumentInstance($this->version, $payload); } /** * Streams SupportingDocumentInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SupportingDocumentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SupportingDocumentInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SupportingDocumentInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SupportingDocumentPage Page of SupportingDocumentInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SupportingDocumentPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SupportingDocumentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SupportingDocumentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SupportingDocumentPage Page of SupportingDocumentInstance */ public function getPage(string $targetUrl): SupportingDocumentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SupportingDocumentPage($this->version, $response, $this->solution); } /** * Constructs a SupportingDocumentContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): SupportingDocumentContext { return new SupportingDocumentContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.SupportingDocumentList]'; } }PKt[LLBTwilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/RegulatoryCompliance/EndUserTypes/' . \rawurlencode($sid) . ''; } /** * Fetch the EndUserTypeInstance * * @return EndUserTypeInstance Fetched EndUserTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EndUserTypeInstance { $payload = $this->version->fetch('GET', $this->uri); return new EndUserTypeInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Numbers.V2.EndUserTypeContext ' . \implode(' ', $context) . ']'; } }PKt[:Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleList.phpnu[solution = []; $this->uri = '/RegulatoryCompliance/Bundles'; } /** * Create the BundleInstance * * @param string $friendlyName The string that you assigned to describe the * resource * @param string $email The email address * @param array|Options $options Optional Arguments * @return BundleInstance Created BundleInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $email, array $options = []): BundleInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Email' => $email, 'StatusCallback' => $options['statusCallback'], 'RegulationSid' => $options['regulationSid'], 'IsoCountry' => $options['isoCountry'], 'EndUserType' => $options['endUserType'], 'NumberType' => $options['numberType'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new BundleInstance($this->version, $payload); } /** * Streams BundleInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BundleInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BundleInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of BundleInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BundlePage Page of BundleInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BundlePage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'FriendlyName' => $options['friendlyName'], 'RegulationSid' => $options['regulationSid'], 'IsoCountry' => $options['isoCountry'], 'NumberType' => $options['numberType'], 'HasValidUntilDate' => Serialize::booleanToString($options['hasValidUntilDate']), 'SortBy' => $options['sortBy'], 'SortDirection' => $options['sortDirection'], 'ValidUntilDate<' => Serialize::iso8601DateTime($options['validUntilDateBefore']), 'ValidUntilDate' => Serialize::iso8601DateTime($options['validUntilDate']), 'ValidUntilDate>' => Serialize::iso8601DateTime($options['validUntilDateAfter']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BundlePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BundleInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BundlePage Page of BundleInstance */ public function getPage(string $targetUrl): BundlePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BundlePage($this->version, $response, $this->solution); } /** * Constructs a BundleContext * * @param string $sid The unique string that identifies the resource. */ public function getContext(string $sid): BundleContext { return new BundleContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.BundleList]'; } }PKt[q3Twilio/Rest/Numbers/V2/RegulatoryCompliancePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RegulatoryComplianceInstance \Twilio\Rest\Numbers\V2\RegulatoryComplianceInstance */ public function buildInstance(array $payload): RegulatoryComplianceInstance { return new RegulatoryComplianceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.RegulatoryCompliancePage]'; } }PKt[J=553Twilio/Rest/Numbers/V2/RegulatoryComplianceList.phpnu[solution = []; } /** * Access the bundles */ protected function getBundles(): BundleList { if (!$this->_bundles) { $this->_bundles = new BundleList($this->version); } return $this->_bundles; } /** * Access the endUsers */ protected function getEndUsers(): EndUserList { if (!$this->_endUsers) { $this->_endUsers = new EndUserList($this->version); } return $this->_endUsers; } /** * Access the endUserTypes */ protected function getEndUserTypes(): EndUserTypeList { if (!$this->_endUserTypes) { $this->_endUserTypes = new EndUserTypeList($this->version); } return $this->_endUserTypes; } /** * Access the regulations */ protected function getRegulations(): RegulationList { if (!$this->_regulations) { $this->_regulations = new RegulationList($this->version); } return $this->_regulations; } /** * Access the supportingDocuments */ protected function getSupportingDocuments(): SupportingDocumentList { if (!$this->_supportingDocuments) { $this->_supportingDocuments = new SupportingDocumentList($this->version); } return $this->_supportingDocuments; } /** * Access the supportingDocumentTypes */ protected function getSupportingDocumentTypes(): SupportingDocumentTypeList { if (!$this->_supportingDocumentTypes) { $this->_supportingDocumentTypes = new SupportingDocumentTypeList($this->version); } return $this->_supportingDocumentTypes; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.RegulatoryComplianceList]'; } }PKt[W7Twilio/Rest/Numbers/V2/RegulatoryComplianceInstance.phpnu[solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2.RegulatoryComplianceInstance]'; } }PKt[S^Twilio/Rest/Numbers/V2.phpnu[version = 'v2'; } protected function getRegulatoryCompliance(): RegulatoryComplianceList { if (!$this->_regulatoryCompliance) { $this->_regulatoryCompliance = new RegulatoryComplianceList($this); } return $this->_regulatoryCompliance; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Numbers.V2]'; } }PKt[U. Twilio/Rest/Trunking.phpnu[baseUrl = 'https://trunking.twilio.com'; } /** * @return V1 Version v1 of trunking */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getTrunks(): \Twilio\Rest\Trunking\V1\TrunkList { return $this->v1->trunks; } /** * @param string $sid The unique string that identifies the resource */ protected function contextTrunks(string $sid): \Twilio\Rest\Trunking\V1\TrunkContext { return $this->v1->trunks($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trunking]'; } }PKt[=& |7|7Twilio/Rest/Api.phpnu[baseUrl = 'https://api.twilio.com'; } /** * @return V2010 Version v2010 of api */ protected function getV2010(): V2010 { if (!$this->_v2010) { $this->_v2010 = new V2010($this); } return $this->_v2010; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } /** * @return \Twilio\Rest\Api\V2010\AccountContext Account provided as the * authenticating account */ protected function getAccount(): \Twilio\Rest\Api\V2010\AccountContext { return $this->v2010->account; } protected function getAccounts(): \Twilio\Rest\Api\V2010\AccountList { return $this->v2010->accounts; } /** * @param string $sid Fetch by unique Account Sid */ protected function contextAccounts(string $sid): \Twilio\Rest\Api\V2010\AccountContext { return $this->v2010->accounts($sid); } protected function getAddresses(): \Twilio\Rest\Api\V2010\Account\AddressList { return $this->v2010->account->addresses; } /** * @param string $sid The unique string that identifies the resource */ protected function contextAddresses(string $sid): \Twilio\Rest\Api\V2010\Account\AddressContext { return $this->v2010->account->addresses($sid); } protected function getApplications(): \Twilio\Rest\Api\V2010\Account\ApplicationList { return $this->v2010->account->applications; } /** * @param string $sid The unique string that identifies the resource */ protected function contextApplications(string $sid): \Twilio\Rest\Api\V2010\Account\ApplicationContext { return $this->v2010->account->applications($sid); } protected function getAuthorizedConnectApps(): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList { return $this->v2010->account->authorizedConnectApps; } /** * @param string $connectAppSid The SID of the Connect App to fetch */ protected function contextAuthorizedConnectApps(string $connectAppSid): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext { return $this->v2010->account->authorizedConnectApps($connectAppSid); } protected function getAvailablePhoneNumbers(): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList { return $this->v2010->account->availablePhoneNumbers; } /** * @param string $countryCode The ISO country code of the country to fetch * available phone number information about */ protected function contextAvailablePhoneNumbers(string $countryCode): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext { return $this->v2010->account->availablePhoneNumbers($countryCode); } protected function getBalance(): \Twilio\Rest\Api\V2010\Account\BalanceList { return $this->v2010->account->balance; } protected function getCalls(): \Twilio\Rest\Api\V2010\Account\CallList { return $this->v2010->account->calls; } /** * @param string $sid The SID of the Call resource to fetch */ protected function contextCalls(string $sid): \Twilio\Rest\Api\V2010\Account\CallContext { return $this->v2010->account->calls($sid); } protected function getConferences(): \Twilio\Rest\Api\V2010\Account\ConferenceList { return $this->v2010->account->conferences; } /** * @param string $sid The unique string that identifies this resource */ protected function contextConferences(string $sid): \Twilio\Rest\Api\V2010\Account\ConferenceContext { return $this->v2010->account->conferences($sid); } protected function getConnectApps(): \Twilio\Rest\Api\V2010\Account\ConnectAppList { return $this->v2010->account->connectApps; } /** * @param string $sid The unique string that identifies the resource */ protected function contextConnectApps(string $sid): \Twilio\Rest\Api\V2010\Account\ConnectAppContext { return $this->v2010->account->connectApps($sid); } protected function getIncomingPhoneNumbers(): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList { return $this->v2010->account->incomingPhoneNumbers; } /** * @param string $sid The unique string that identifies the resource */ protected function contextIncomingPhoneNumbers(string $sid): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext { return $this->v2010->account->incomingPhoneNumbers($sid); } protected function getKeys(): \Twilio\Rest\Api\V2010\Account\KeyList { return $this->v2010->account->keys; } /** * @param string $sid The unique string that identifies the resource */ protected function contextKeys(string $sid): \Twilio\Rest\Api\V2010\Account\KeyContext { return $this->v2010->account->keys($sid); } protected function getMessages(): \Twilio\Rest\Api\V2010\Account\MessageList { return $this->v2010->account->messages; } /** * @param string $sid The unique string that identifies the resource */ protected function contextMessages(string $sid): \Twilio\Rest\Api\V2010\Account\MessageContext { return $this->v2010->account->messages($sid); } protected function getNewKeys(): \Twilio\Rest\Api\V2010\Account\NewKeyList { return $this->v2010->account->newKeys; } protected function getNewSigningKeys(): \Twilio\Rest\Api\V2010\Account\NewSigningKeyList { return $this->v2010->account->newSigningKeys; } protected function getNotifications(): \Twilio\Rest\Api\V2010\Account\NotificationList { return $this->v2010->account->notifications; } /** * @param string $sid The unique string that identifies the resource */ protected function contextNotifications(string $sid): \Twilio\Rest\Api\V2010\Account\NotificationContext { return $this->v2010->account->notifications($sid); } protected function getOutgoingCallerIds(): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList { return $this->v2010->account->outgoingCallerIds; } /** * @param string $sid The unique string that identifies the resource */ protected function contextOutgoingCallerIds(string $sid): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext { return $this->v2010->account->outgoingCallerIds($sid); } protected function getQueues(): \Twilio\Rest\Api\V2010\Account\QueueList { return $this->v2010->account->queues; } /** * @param string $sid The unique string that identifies this resource */ protected function contextQueues(string $sid): \Twilio\Rest\Api\V2010\Account\QueueContext { return $this->v2010->account->queues($sid); } protected function getRecordings(): \Twilio\Rest\Api\V2010\Account\RecordingList { return $this->v2010->account->recordings; } /** * @param string $sid The unique string that identifies the resource */ protected function contextRecordings(string $sid): \Twilio\Rest\Api\V2010\Account\RecordingContext { return $this->v2010->account->recordings($sid); } protected function getSigningKeys(): \Twilio\Rest\Api\V2010\Account\SigningKeyList { return $this->v2010->account->signingKeys; } /** * @param string $sid The sid */ protected function contextSigningKeys(string $sid): \Twilio\Rest\Api\V2010\Account\SigningKeyContext { return $this->v2010->account->signingKeys($sid); } protected function getSip(): \Twilio\Rest\Api\V2010\Account\SipList { return $this->v2010->account->sip; } protected function getShortCodes(): \Twilio\Rest\Api\V2010\Account\ShortCodeList { return $this->v2010->account->shortCodes; } /** * @param string $sid The unique string that identifies this resource */ protected function contextShortCodes(string $sid): \Twilio\Rest\Api\V2010\Account\ShortCodeContext { return $this->v2010->account->shortCodes($sid); } protected function getTokens(): \Twilio\Rest\Api\V2010\Account\TokenList { return $this->v2010->account->tokens; } protected function getTranscriptions(): \Twilio\Rest\Api\V2010\Account\TranscriptionList { return $this->v2010->account->transcriptions; } /** * @param string $sid The unique string that identifies the resource */ protected function contextTranscriptions(string $sid): \Twilio\Rest\Api\V2010\Account\TranscriptionContext { return $this->v2010->account->transcriptions($sid); } protected function getUsage(): \Twilio\Rest\Api\V2010\Account\UsageList { return $this->v2010->account->usage; } protected function getValidationRequests(): \Twilio\Rest\Api\V2010\Account\ValidationRequestList { return $this->v2010->account->validationRequests; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Api]'; } }PKt[ Twilio/Rest/Voice.phpnu[baseUrl = 'https://voice.twilio.com'; } /** * @return V1 Version v1 of voice */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getArchivedCalls(): \Twilio\Rest\Voice\V1\ArchivedCallList { return $this->v1->archivedCalls; } /** * @param \DateTime $date The date of the Call in UTC. * @param string $sid The unique string that identifies this resource */ protected function contextArchivedCalls(\DateTime $date, string $sid): \Twilio\Rest\Voice\V1\ArchivedCallContext { return $this->v1->archivedCalls($date, $sid); } protected function getByocTrunks(): \Twilio\Rest\Voice\V1\ByocTrunkList { return $this->v1->byocTrunks; } /** * @param string $sid The unique string that identifies the resource */ protected function contextByocTrunks(string $sid): \Twilio\Rest\Voice\V1\ByocTrunkContext { return $this->v1->byocTrunks($sid); } protected function getConnectionPolicies(): \Twilio\Rest\Voice\V1\ConnectionPolicyList { return $this->v1->connectionPolicies; } /** * @param string $sid The unique string that identifies the resource */ protected function contextConnectionPolicies(string $sid): \Twilio\Rest\Voice\V1\ConnectionPolicyContext { return $this->v1->connectionPolicies($sid); } protected function getDialingPermissions(): \Twilio\Rest\Voice\V1\DialingPermissionsList { return $this->v1->dialingPermissions; } protected function getIpRecords(): \Twilio\Rest\Voice\V1\IpRecordList { return $this->v1->ipRecords; } /** * @param string $sid The unique string that identifies the resource */ protected function contextIpRecords(string $sid): \Twilio\Rest\Voice\V1\IpRecordContext { return $this->v1->ipRecords($sid); } protected function getSourceIpMappings(): \Twilio\Rest\Voice\V1\SourceIpMappingList { return $this->v1->sourceIpMappings; } /** * @param string $sid The unique string that identifies the resource */ protected function contextSourceIpMappings(string $sid): \Twilio\Rest\Voice\V1\SourceIpMappingContext { return $this->v1->sourceIpMappings($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice]'; } }PKt[`ڏ//Twilio/Rest/Chat.phpnu[baseUrl = 'https://chat.twilio.com'; } /** * @return V1 Version v1 of chat */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * @return V2 Version v2 of chat */ protected function getV2(): V2 { if (!$this->_v2) { $this->_v2 = new V2($this); } return $this->_v2; } /** * @return V3 Version v3 of chat */ protected function getV3(): V3 { if (!$this->_v3) { $this->_v3 = new V3($this); } return $this->_v3; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getCredentials(): \Twilio\Rest\Chat\V2\CredentialList { return $this->v2->credentials; } /** * @param string $sid The SID of the Credential resource to fetch */ protected function contextCredentials(string $sid): \Twilio\Rest\Chat\V2\CredentialContext { return $this->v2->credentials($sid); } protected function getServices(): \Twilio\Rest\Chat\V2\ServiceList { return $this->v2->services; } /** * @param string $sid The SID of the Service resource to fetch */ protected function contextServices(string $sid): \Twilio\Rest\Chat\V2\ServiceContext { return $this->v2->services($sid); } protected function getChannels(): \Twilio\Rest\Chat\V3\ChannelList { return $this->v3->channels; } /** * @param string $serviceSid Service Sid. * @param string $sid A string that uniquely identifies this Channel. */ protected function contextChannels(string $serviceSid, string $sid): \Twilio\Rest\Chat\V3\ChannelContext { return $this->v3->channels($serviceSid, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat]'; } }PKt[(G>>)Twilio/Rest/Content/V1/ContentContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Content/' . \rawurlencode($sid) . ''; } /** * Fetch the ContentInstance * * @return ContentInstance Fetched ContentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ContentInstance { $payload = $this->version->fetch('GET', $this->uri); return new ContentInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ContentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the approvalFetch */ protected function getApprovalFetch(): ApprovalFetchList { if (!$this->_approvalFetch) { $this->_approvalFetch = new ApprovalFetchList($this->version, $this->solution['sid']); } return $this->_approvalFetch; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Content.V1.ContentContext ' . \implode(' ', $context) . ']'; } }PKt[D7Xkk,Twilio/Rest/Content/V1/LegacyContentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return LegacyContentInstance \Twilio\Rest\Content\V1\LegacyContentInstance */ public function buildInstance(array $payload): LegacyContentInstance { return new LegacyContentInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Content.V1.LegacyContentPage]'; } }PKt[&Wg&Twilio/Rest/Content/V1/ContentList.phpnu[solution = []; $this->uri = '/Content'; } /** * Streams ContentInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ContentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ContentInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ContentInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ContentPage Page of ContentInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ContentPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ContentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ContentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ContentPage Page of ContentInstance */ public function getPage(string $targetUrl): ContentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ContentPage($this->version, $response, $this->solution); } /** * Constructs a ContentContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ContentContext { return new ContentContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Content.V1.ContentList]'; } }PKt[m#GG&Twilio/Rest/Content/V1/ContentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ContentInstance \Twilio\Rest\Content\V1\ContentInstance */ public function buildInstance(array $payload): ContentInstance { return new ContentInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Content.V1.ContentPage]'; } }PKt[g4Twilio/Rest/Content/V1/Content/ApprovalFetchList.phpnu[solution = ['sid' => $sid, ]; } /** * Constructs a ApprovalFetchContext */ public function getContext(): ApprovalFetchContext { return new ApprovalFetchContext($this->version, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Content.V1.ApprovalFetchList]'; } }PKt[܂k7Twilio/Rest/Content/V1/Content/ApprovalFetchContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Content/' . \rawurlencode($sid) . '/ApprovalRequests'; } /** * Fetch the ApprovalFetchInstance * * @return ApprovalFetchInstance Fetched ApprovalFetchInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ApprovalFetchInstance { $payload = $this->version->fetch('GET', $this->uri); return new ApprovalFetchInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Content.V1.ApprovalFetchContext ' . \implode(' ', $context) . ']'; } }PKt[^f4Twilio/Rest/Content/V1/Content/ApprovalFetchPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ApprovalFetchInstance \Twilio\Rest\Content\V1\Content\ApprovalFetchInstance */ public function buildInstance(array $payload): ApprovalFetchInstance { return new ApprovalFetchInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Content.V1.ApprovalFetchPage]'; } }PKt[*|T T 8Twilio/Rest/Content/V1/Content/ApprovalFetchInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'whatsapp' => Values::array_get($payload, 'whatsapp'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ApprovalFetchContext Context for this ApprovalFetchInstance */ protected function proxy(): ApprovalFetchContext { if (!$this->context) { $this->context = new ApprovalFetchContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ApprovalFetchInstance * * @return ApprovalFetchInstance Fetched ApprovalFetchInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ApprovalFetchInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Content.V1.ApprovalFetchInstance ' . \implode(' ', $context) . ']'; } }PKt["z*Twilio/Rest/Content/V1/ContentInstance.phpnu[properties = [ 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'language' => Values::array_get($payload, 'language'), 'variables' => Values::array_get($payload, 'variables'), 'types' => Values::array_get($payload, 'types'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ContentContext Context for this ContentInstance */ protected function proxy(): ContentContext { if (!$this->context) { $this->context = new ContentContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ContentInstance * * @return ContentInstance Fetched ContentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ContentInstance { return $this->proxy()->fetch(); } /** * Delete the ContentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the approvalFetch */ protected function getApprovalFetch(): ApprovalFetchList { return $this->proxy()->approvalFetch; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Content.V1.ContentInstance ' . \implode(' ', $context) . ']'; } }PKt[ i i 0Twilio/Rest/Content/V1/LegacyContentInstance.phpnu[properties = [ 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'language' => Values::array_get($payload, 'language'), 'variables' => Values::array_get($payload, 'variables'), 'types' => Values::array_get($payload, 'types'), 'legacyTemplateName' => Values::array_get($payload, 'legacy_template_name'), 'legacyBody' => Values::array_get($payload, 'legacy_body'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Content.V1.LegacyContentInstance]'; } }PKt[U--,Twilio/Rest/Content/V1/LegacyContentList.phpnu[solution = []; $this->uri = '/LegacyContent'; } /** * Streams LegacyContentInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads LegacyContentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return LegacyContentInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of LegacyContentInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return LegacyContentPage Page of LegacyContentInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): LegacyContentPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new LegacyContentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of LegacyContentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return LegacyContentPage Page of LegacyContentInstance */ public function getPage(string $targetUrl): LegacyContentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new LegacyContentPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Content.V1.LegacyContentList]'; } }PKt[   Twilio/Rest/Content/V1.phpnu[version = 'v1'; } protected function getContents(): ContentList { if (!$this->_contents) { $this->_contents = new ContentList($this); } return $this->_contents; } protected function getLegacyContents(): LegacyContentList { if (!$this->_legacyContents) { $this->_legacyContents = new LegacyContentList($this); } return $this->_legacyContents; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Content.V1]'; } }PKt[@@$Twilio/Rest/Insights/V1/RoomList.phpnu[solution = []; $this->uri = '/Video/Rooms'; } /** * Streams RoomInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RoomInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RoomInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of RoomInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RoomPage Page of RoomInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RoomPage { $options = new Values($options); $params = Values::of([ 'RoomType' => Serialize::map($options['roomType'], function($e) { return $e; }), 'Codec' => Serialize::map($options['codec'], function($e) { return $e; }), 'RoomName' => $options['roomName'], 'CreatedAfter' => Serialize::iso8601DateTime($options['createdAfter']), 'CreatedBefore' => Serialize::iso8601DateTime($options['createdBefore']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RoomPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RoomInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RoomPage Page of RoomInstance */ public function getPage(string $targetUrl): RoomPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RoomPage($this->version, $response, $this->solution); } /** * Constructs a RoomContext * * @param string $roomSid The SID of the Room resource. */ public function getContext(string $roomSid): RoomContext { return new RoomContext($this->version, $roomSid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.RoomList]'; } }PKt[g 'Twilio/Rest/Insights/V1/CallContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Voice/' . \rawurlencode($sid) . ''; } /** * Fetch the CallInstance * * @return CallInstance Fetched CallInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CallInstance { $payload = $this->version->fetch('GET', $this->uri); return new CallInstance($this->version, $payload, $this->solution['sid']); } /** * Access the events */ protected function getEvents(): EventList { if (!$this->_events) { $this->_events = new EventList($this->version, $this->solution['sid']); } return $this->_events; } /** * Access the metrics */ protected function getMetrics(): MetricList { if (!$this->_metrics) { $this->_metrics = new MetricList($this->version, $this->solution['sid']); } return $this->_metrics; } /** * Access the summary */ protected function getSummary(): CallSummaryList { if (!$this->_summary) { $this->_summary = new CallSummaryList($this->version, $this->solution['sid']); } return $this->_summary; } /** * Access the annotation */ protected function getAnnotation(): AnnotationList { if (!$this->_annotation) { $this->_annotation = new AnnotationList($this->version, $this->solution['sid']); } return $this->_annotation; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.CallContext ' . \implode(' ', $context) . ']'; } }PKt[JDTwilio/Rest/Insights/V1/Conference/ConferenceParticipantInstance.phpnu[properties = [ 'participantSid' => Values::array_get($payload, 'participant_sid'), 'label' => Values::array_get($payload, 'label'), 'conferenceSid' => Values::array_get($payload, 'conference_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'callDirection' => Values::array_get($payload, 'call_direction'), 'from' => Values::array_get($payload, 'from'), 'to' => Values::array_get($payload, 'to'), 'callStatus' => Values::array_get($payload, 'call_status'), 'countryCode' => Values::array_get($payload, 'country_code'), 'isModerator' => Values::array_get($payload, 'is_moderator'), 'joinTime' => Deserialize::dateTime(Values::array_get($payload, 'join_time')), 'leaveTime' => Deserialize::dateTime(Values::array_get($payload, 'leave_time')), 'durationSeconds' => Values::array_get($payload, 'duration_seconds'), 'outboundQueueLength' => Values::array_get($payload, 'outbound_queue_length'), 'outboundTimeInQueue' => Values::array_get($payload, 'outbound_time_in_queue'), 'jitterBufferSize' => Values::array_get($payload, 'jitter_buffer_size'), 'isCoach' => Values::array_get($payload, 'is_coach'), 'coachedParticipants' => Values::array_get($payload, 'coached_participants'), 'participantRegion' => Values::array_get($payload, 'participant_region'), 'conferenceRegion' => Values::array_get($payload, 'conference_region'), 'callType' => Values::array_get($payload, 'call_type'), 'processingState' => Values::array_get($payload, 'processing_state'), 'properties' => Values::array_get($payload, 'properties'), 'events' => Values::array_get($payload, 'events'), 'metrics' => Values::array_get($payload, 'metrics'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'conferenceSid' => $conferenceSid, 'participantSid' => $participantSid ?: $this->properties['participantSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConferenceParticipantContext Context for this * ConferenceParticipantInstance */ protected function proxy(): ConferenceParticipantContext { if (!$this->context) { $this->context = new ConferenceParticipantContext( $this->version, $this->solution['conferenceSid'], $this->solution['participantSid'] ); } return $this->context; } /** * Fetch the ConferenceParticipantInstance * * @param array|Options $options Optional Arguments * @return ConferenceParticipantInstance Fetched ConferenceParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): ConferenceParticipantInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.ConferenceParticipantInstance ' . \implode(' ', $context) . ']'; } }PKt[PCTwilio/Rest/Insights/V1/Conference/ConferenceParticipantOptions.phpnu[options['events'] = $events; $this->options['metrics'] = $metrics; } /** * Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc. * * @param string $events Conference events generated by application or * participant activity. * @return $this Fluent Builder */ public function setEvents(string $events): self { $this->options['events'] = $events; return $this; } /** * Object. Contains participant call quality metrics. * * @param string $metrics Object. Contains call quality metrics. * @return $this Fluent Builder */ public function setMetrics(string $metrics): self { $this->options['metrics'] = $metrics; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.FetchConferenceParticipantOptions ' . $options . ']'; } } class ReadConferenceParticipantOptions extends Options { /** * @param string $participantSid Participant SID. * @param string $label User-specified label for a participant. * @param string $events Conference events generated by application or * participant activity. */ public function __construct(string $participantSid = Values::NONE, string $label = Values::NONE, string $events = Values::NONE) { $this->options['participantSid'] = $participantSid; $this->options['label'] = $label; $this->options['events'] = $events; } /** * The unique SID identifier of the Participant. * * @param string $participantSid Participant SID. * @return $this Fluent Builder */ public function setParticipantSid(string $participantSid): self { $this->options['participantSid'] = $participantSid; return $this; } /** * User-specified label for a participant. * * @param string $label User-specified label for a participant. * @return $this Fluent Builder */ public function setLabel(string $label): self { $this->options['label'] = $label; return $this; } /** * Conference events generated by application or participant activity; e.g. `hold`, `mute`, etc. * * @param string $events Conference events generated by application or * participant activity. * @return $this Fluent Builder */ public function setEvents(string $events): self { $this->options['events'] = $events; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.ReadConferenceParticipantOptions ' . $options . ']'; } }PKt[C@Twilio/Rest/Insights/V1/Conference/ConferenceParticipantList.phpnu[solution = ['conferenceSid' => $conferenceSid, ]; $this->uri = '/Conferences/' . \rawurlencode($conferenceSid) . '/Participants'; } /** * Streams ConferenceParticipantInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ConferenceParticipantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ConferenceParticipantInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ConferenceParticipantInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ConferenceParticipantPage Page of ConferenceParticipantInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ConferenceParticipantPage { $options = new Values($options); $params = Values::of([ 'ParticipantSid' => $options['participantSid'], 'Label' => $options['label'], 'Events' => $options['events'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ConferenceParticipantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ConferenceParticipantInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ConferenceParticipantPage Page of ConferenceParticipantInstance */ public function getPage(string $targetUrl): ConferenceParticipantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ConferenceParticipantPage($this->version, $response, $this->solution); } /** * Constructs a ConferenceParticipantContext * * @param string $participantSid Participant SID. */ public function getContext(string $participantSid): ConferenceParticipantContext { return new ConferenceParticipantContext( $this->version, $this->solution['conferenceSid'], $participantSid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.ConferenceParticipantList]'; } }PKt[KL2+ggCTwilio/Rest/Insights/V1/Conference/ConferenceParticipantContext.phpnu[solution = ['conferenceSid' => $conferenceSid, 'participantSid' => $participantSid, ]; $this->uri = '/Conferences/' . \rawurlencode($conferenceSid) . '/Participants/' . \rawurlencode($participantSid) . ''; } /** * Fetch the ConferenceParticipantInstance * * @param array|Options $options Optional Arguments * @return ConferenceParticipantInstance Fetched ConferenceParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): ConferenceParticipantInstance { $options = new Values($options); $params = Values::of(['Events' => $options['events'], 'Metrics' => $options['metrics'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new ConferenceParticipantInstance( $this->version, $payload, $this->solution['conferenceSid'], $this->solution['participantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.ConferenceParticipantContext ' . \implode(' ', $context) . ']'; } }PKt[99@Twilio/Rest/Insights/V1/Conference/ConferenceParticipantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConferenceParticipantInstance \Twilio\Rest\Insights\V1\Conference\ConferenceParticipantInstance */ public function buildInstance(array $payload): ConferenceParticipantInstance { return new ConferenceParticipantInstance( $this->version, $payload, $this->solution['conferenceSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.ConferenceParticipantPage]'; } }PKt[G 'Twilio/Rest/Insights/V1/RoomContext.phpnu[solution = ['roomSid' => $roomSid, ]; $this->uri = '/Video/Rooms/' . \rawurlencode($roomSid) . ''; } /** * Fetch the RoomInstance * * @return RoomInstance Fetched RoomInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoomInstance { $payload = $this->version->fetch('GET', $this->uri); return new RoomInstance($this->version, $payload, $this->solution['roomSid']); } /** * Access the participants */ protected function getParticipants(): ParticipantList { if (!$this->_participants) { $this->_participants = new ParticipantList($this->version, $this->solution['roomSid']); } return $this->_participants; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.RoomContext ' . \implode(' ', $context) . ']'; } }PKt[oB-Twilio/Rest/Insights/V1/CallSummariesPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CallSummariesInstance \Twilio\Rest\Insights\V1\CallSummariesInstance */ public function buildInstance(array $payload): CallSummariesInstance { return new CallSummariesInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.CallSummariesPage]'; } }PKt[ʴs'Twilio/Rest/Insights/V1/RoomOptions.phpnu[options['roomType'] = $roomType; $this->options['codec'] = $codec; $this->options['roomName'] = $roomName; $this->options['createdAfter'] = $createdAfter; $this->options['createdBefore'] = $createdBefore; } /** * Type of room. Can be `go`, `peer_to_peer`, `group`, or `group_small`. * * @param string[] $roomType Type of room. * @return $this Fluent Builder */ public function setRoomType(array $roomType): self { $this->options['roomType'] = $roomType; return $this; } /** * Codecs used by participants in the room. Can be `VP8`, `H264`, or `VP9`. * * @param string[] $codec Codecs used by participants in the room. * @return $this Fluent Builder */ public function setCodec(array $codec): self { $this->options['codec'] = $codec; return $this; } /** * Room friendly name. * * @param string $roomName Room friendly name. * @return $this Fluent Builder */ public function setRoomName(string $roomName): self { $this->options['roomName'] = $roomName; return $this; } /** * Only read rooms that started on or after this ISO 8601 timestamp. * * @param \DateTime $createdAfter Only read rooms that started on or after this * ISO 8601 timestamp. * @return $this Fluent Builder */ public function setCreatedAfter(\DateTime $createdAfter): self { $this->options['createdAfter'] = $createdAfter; return $this; } /** * Only read rooms that started before this ISO 8601 timestamp. * * @param \DateTime $createdBefore Only read rooms that started before this ISO * 8601 timestamp. * @return $this Fluent Builder */ public function setCreatedBefore(\DateTime $createdBefore): self { $this->options['createdBefore'] = $createdBefore; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.ReadRoomOptions ' . $options . ']'; } }PKt[X-$Twilio/Rest/Insights/V1/CallList.phpnu[solution = []; } /** * Constructs a CallContext * * @param string $sid The sid */ public function getContext(string $sid): CallContext { return new CallContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.CallList]'; } }PKt[u & &0Twilio/Rest/Insights/V1/CallSummariesOptions.phpnu[options['from'] = $from; $this->options['to'] = $to; $this->options['fromCarrier'] = $fromCarrier; $this->options['toCarrier'] = $toCarrier; $this->options['fromCountryCode'] = $fromCountryCode; $this->options['toCountryCode'] = $toCountryCode; $this->options['branded'] = $branded; $this->options['verifiedCaller'] = $verifiedCaller; $this->options['hasTag'] = $hasTag; $this->options['startTime'] = $startTime; $this->options['endTime'] = $endTime; $this->options['callType'] = $callType; $this->options['callState'] = $callState; $this->options['direction'] = $direction; $this->options['processingState'] = $processingState; $this->options['sortBy'] = $sortBy; $this->options['subaccount'] = $subaccount; $this->options['abnormalSession'] = $abnormalSession; } /** * The from * * @param string $from The from * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The to * * @param string $to The to * @return $this Fluent Builder */ public function setTo(string $to): self { $this->options['to'] = $to; return $this; } /** * The from_carrier * * @param string $fromCarrier The from_carrier * @return $this Fluent Builder */ public function setFromCarrier(string $fromCarrier): self { $this->options['fromCarrier'] = $fromCarrier; return $this; } /** * The to_carrier * * @param string $toCarrier The to_carrier * @return $this Fluent Builder */ public function setToCarrier(string $toCarrier): self { $this->options['toCarrier'] = $toCarrier; return $this; } /** * The from_country_code * * @param string $fromCountryCode The from_country_code * @return $this Fluent Builder */ public function setFromCountryCode(string $fromCountryCode): self { $this->options['fromCountryCode'] = $fromCountryCode; return $this; } /** * The to_country_code * * @param string $toCountryCode The to_country_code * @return $this Fluent Builder */ public function setToCountryCode(string $toCountryCode): self { $this->options['toCountryCode'] = $toCountryCode; return $this; } /** * The branded * * @param bool $branded The branded * @return $this Fluent Builder */ public function setBranded(bool $branded): self { $this->options['branded'] = $branded; return $this; } /** * The verified_caller * * @param bool $verifiedCaller The verified_caller * @return $this Fluent Builder */ public function setVerifiedCaller(bool $verifiedCaller): self { $this->options['verifiedCaller'] = $verifiedCaller; return $this; } /** * The has_tag * * @param bool $hasTag The has_tag * @return $this Fluent Builder */ public function setHasTag(bool $hasTag): self { $this->options['hasTag'] = $hasTag; return $this; } /** * The start_time * * @param string $startTime The start_time * @return $this Fluent Builder */ public function setStartTime(string $startTime): self { $this->options['startTime'] = $startTime; return $this; } /** * The end_time * * @param string $endTime The end_time * @return $this Fluent Builder */ public function setEndTime(string $endTime): self { $this->options['endTime'] = $endTime; return $this; } /** * The call_type * * @param string $callType The call_type * @return $this Fluent Builder */ public function setCallType(string $callType): self { $this->options['callType'] = $callType; return $this; } /** * The call_state * * @param string $callState The call_state * @return $this Fluent Builder */ public function setCallState(string $callState): self { $this->options['callState'] = $callState; return $this; } /** * The direction * * @param string $direction The direction * @return $this Fluent Builder */ public function setDirection(string $direction): self { $this->options['direction'] = $direction; return $this; } /** * The processing_state * * @param string $processingState The processing_state * @return $this Fluent Builder */ public function setProcessingState(string $processingState): self { $this->options['processingState'] = $processingState; return $this; } /** * The sort_by * * @param string $sortBy The sort_by * @return $this Fluent Builder */ public function setSortBy(string $sortBy): self { $this->options['sortBy'] = $sortBy; return $this; } /** * The subaccount * * @param string $subaccount The subaccount * @return $this Fluent Builder */ public function setSubaccount(string $subaccount): self { $this->options['subaccount'] = $subaccount; return $this; } /** * The abnormal_session * * @param bool $abnormalSession The abnormal_session * @return $this Fluent Builder */ public function setAbnormalSession(bool $abnormalSession): self { $this->options['abnormalSession'] = $abnormalSession; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.ReadCallSummariesOptions ' . $options . ']'; } }PKt[P"f'Twilio/Rest/Insights/V1/SettingList.phpnu[solution = []; } /** * Constructs a SettingContext */ public function getContext(): SettingContext { return new SettingContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.SettingList]'; } }PKt[1mm$Twilio/Rest/Insights/V1/CallPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CallInstance \Twilio\Rest\Insights\V1\CallInstance */ public function buildInstance(array $payload): CallInstance { return new CallInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.CallPage]'; } }PKt['`` ` -Twilio/Rest/Insights/V1/ConferenceContext.phpnu[solution = ['conferenceSid' => $conferenceSid, ]; $this->uri = '/Conferences/' . \rawurlencode($conferenceSid) . ''; } /** * Fetch the ConferenceInstance * * @return ConferenceInstance Fetched ConferenceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConferenceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConferenceInstance($this->version, $payload, $this->solution['conferenceSid']); } /** * Access the conferenceParticipants */ protected function getConferenceParticipants(): ConferenceParticipantList { if (!$this->_conferenceParticipants) { $this->_conferenceParticipants = new ConferenceParticipantList( $this->version, $this->solution['conferenceSid'] ); } return $this->_conferenceParticipants; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.ConferenceContext ' . \implode(' ', $context) . ']'; } }PKt[ݷы0Twilio/Rest/Insights/V1/Room/ParticipantList.phpnu[solution = ['roomSid' => $roomSid, ]; $this->uri = '/Video/Rooms/' . \rawurlencode($roomSid) . '/Participants'; } /** * Streams ParticipantInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ParticipantInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ParticipantInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ParticipantInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ParticipantPage Page of ParticipantInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ParticipantPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ParticipantPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ParticipantInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ParticipantPage Page of ParticipantInstance */ public function getPage(string $targetUrl): ParticipantPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ParticipantPage($this->version, $response, $this->solution); } /** * Constructs a ParticipantContext * * @param string $participantSid The SID of the Participant resource. */ public function getContext(string $participantSid): ParticipantContext { return new ParticipantContext($this->version, $this->solution['roomSid'], $participantSid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.ParticipantList]'; } }PKt[4Twilio/Rest/Insights/V1/Room/ParticipantInstance.phpnu[properties = [ 'participantSid' => Values::array_get($payload, 'participant_sid'), 'participantIdentity' => Values::array_get($payload, 'participant_identity'), 'joinTime' => Deserialize::dateTime(Values::array_get($payload, 'join_time')), 'leaveTime' => Deserialize::dateTime(Values::array_get($payload, 'leave_time')), 'durationSec' => Values::array_get($payload, 'duration_sec'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'roomSid' => Values::array_get($payload, 'room_sid'), 'status' => Values::array_get($payload, 'status'), 'codecs' => Values::array_get($payload, 'codecs'), 'endReason' => Values::array_get($payload, 'end_reason'), 'errorCode' => Values::array_get($payload, 'error_code'), 'errorCodeUrl' => Values::array_get($payload, 'error_code_url'), 'mediaRegion' => Values::array_get($payload, 'media_region'), 'properties' => Values::array_get($payload, 'properties'), 'edgeLocation' => Values::array_get($payload, 'edge_location'), 'publisherInfo' => Values::array_get($payload, 'publisher_info'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'roomSid' => $roomSid, 'participantSid' => $participantSid ?: $this->properties['participantSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ParticipantContext Context for this ParticipantInstance */ protected function proxy(): ParticipantContext { if (!$this->context) { $this->context = new ParticipantContext( $this->version, $this->solution['roomSid'], $this->solution['participantSid'] ); } return $this->context; } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.ParticipantInstance ' . \implode(' ', $context) . ']'; } }PKt[QN3Twilio/Rest/Insights/V1/Room/ParticipantContext.phpnu[solution = ['roomSid' => $roomSid, 'participantSid' => $participantSid, ]; $this->uri = '/Video/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . ''; } /** * Fetch the ParticipantInstance * * @return ParticipantInstance Fetched ParticipantInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ParticipantInstance { $payload = $this->version->fetch('GET', $this->uri); return new ParticipantInstance( $this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.ParticipantContext ' . \implode(' ', $context) . ']'; } }PKt[N|..0Twilio/Rest/Insights/V1/Room/ParticipantPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ParticipantInstance \Twilio\Rest\Insights\V1\Room\ParticipantInstance */ public function buildInstance(array $payload): ParticipantInstance { return new ParticipantInstance($this->version, $payload, $this->solution['roomSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.ParticipantPage]'; } }PKt[dw$Twilio/Rest/Insights/V1/RoomPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RoomInstance \Twilio\Rest\Insights\V1\RoomInstance */ public function buildInstance(array $payload): RoomInstance { return new RoomInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.RoomPage]'; } }PKt[Z!!(Twilio/Rest/Insights/V1/RoomInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'roomSid' => Values::array_get($payload, 'room_sid'), 'roomName' => Values::array_get($payload, 'room_name'), 'createTime' => Deserialize::dateTime(Values::array_get($payload, 'create_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'roomType' => Values::array_get($payload, 'room_type'), 'roomStatus' => Values::array_get($payload, 'room_status'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'createdMethod' => Values::array_get($payload, 'created_method'), 'endReason' => Values::array_get($payload, 'end_reason'), 'maxParticipants' => Values::array_get($payload, 'max_participants'), 'uniqueParticipants' => Values::array_get($payload, 'unique_participants'), 'uniqueParticipantIdentities' => Values::array_get($payload, 'unique_participant_identities'), 'concurrentParticipants' => Values::array_get($payload, 'concurrent_participants'), 'maxConcurrentParticipants' => Values::array_get($payload, 'max_concurrent_participants'), 'codecs' => Values::array_get($payload, 'codecs'), 'mediaRegion' => Values::array_get($payload, 'media_region'), 'durationSec' => Values::array_get($payload, 'duration_sec'), 'totalParticipantDurationSec' => Values::array_get($payload, 'total_participant_duration_sec'), 'totalRecordingDurationSec' => Values::array_get($payload, 'total_recording_duration_sec'), 'processingState' => Values::array_get($payload, 'processing_state'), 'recordingEnabled' => Values::array_get($payload, 'recording_enabled'), 'edgeLocation' => Values::array_get($payload, 'edge_location'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['roomSid' => $roomSid ?: $this->properties['roomSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RoomContext Context for this RoomInstance */ protected function proxy(): RoomContext { if (!$this->context) { $this->context = new RoomContext($this->version, $this->solution['roomSid']); } return $this->context; } /** * Fetch the RoomInstance * * @return RoomInstance Fetched RoomInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoomInstance { return $this->proxy()->fetch(); } /** * Access the participants */ protected function getParticipants(): ParticipantList { return $this->proxy()->participants; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.RoomInstance ' . \implode(' ', $context) . ']'; } }PKt[P|*Twilio/Rest/Insights/V1/ConferencePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConferenceInstance \Twilio\Rest\Insights\V1\ConferenceInstance */ public function buildInstance(array $payload): ConferenceInstance { return new ConferenceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.ConferencePage]'; } }PKt[J-Twilio/Rest/Insights/V1/ConferenceOptions.phpnu[options['conferenceSid'] = $conferenceSid; $this->options['friendlyName'] = $friendlyName; $this->options['status'] = $status; $this->options['createdAfter'] = $createdAfter; $this->options['createdBefore'] = $createdBefore; $this->options['mixerRegion'] = $mixerRegion; $this->options['tags'] = $tags; $this->options['subaccount'] = $subaccount; $this->options['detectedIssues'] = $detectedIssues; $this->options['endReason'] = $endReason; } /** * The SID of the conference. * * @param string $conferenceSid The SID of the conference. * @return $this Fluent Builder */ public function setConferenceSid(string $conferenceSid): self { $this->options['conferenceSid'] = $conferenceSid; return $this; } /** * Custom label for the conference resource, up to 64 characters. * * @param string $friendlyName Custom label for the conference. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Conference status. * * @param string $status Conference status. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Conferences created after the provided timestamp specified in ISO 8601 format * * @param string $createdAfter Conferences created after timestamp. * @return $this Fluent Builder */ public function setCreatedAfter(string $createdAfter): self { $this->options['createdAfter'] = $createdAfter; return $this; } /** * Conferences created before the provided timestamp specified in ISO 8601 format. * * @param string $createdBefore Conferences created before timestamp. * @return $this Fluent Builder */ public function setCreatedBefore(string $createdBefore): self { $this->options['createdBefore'] = $createdBefore; return $this; } /** * Twilio region where the conference media was mixed. * * @param string $mixerRegion Region where the conference was mixed. * @return $this Fluent Builder */ public function setMixerRegion(string $mixerRegion): self { $this->options['mixerRegion'] = $mixerRegion; return $this; } /** * Tags applied by Twilio for common potential configuration, quality, or performance issues. * * @param string $tags Tags applied by Twilio for common issues. * @return $this Fluent Builder */ public function setTags(string $tags): self { $this->options['tags'] = $tags; return $this; } /** * Account SID for the subaccount whose resources you wish to retrieve. * * @param string $subaccount Account SID for the subaccount. * @return $this Fluent Builder */ public function setSubaccount(string $subaccount): self { $this->options['subaccount'] = $subaccount; return $this; } /** * Potential configuration, behavior, or performance issues detected during the conference. * * @param string $detectedIssues Potential issues detected during the * conference. * @return $this Fluent Builder */ public function setDetectedIssues(string $detectedIssues): self { $this->options['detectedIssues'] = $detectedIssues; return $this; } /** * Conference end reason; e.g. last participant left, modified by API, etc. * * @param string $endReason Conference end reason. * @return $this Fluent Builder */ public function setEndReason(string $endReason): self { $this->options['endReason'] = $endReason; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.ReadConferenceOptions ' . $options . ']'; } }PKt[&۱*Twilio/Rest/Insights/V1/ConferenceList.phpnu[solution = []; $this->uri = '/Conferences'; } /** * Streams ConferenceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ConferenceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ConferenceInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ConferenceInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ConferencePage Page of ConferenceInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ConferencePage { $options = new Values($options); $params = Values::of([ 'ConferenceSid' => $options['conferenceSid'], 'FriendlyName' => $options['friendlyName'], 'Status' => $options['status'], 'CreatedAfter' => $options['createdAfter'], 'CreatedBefore' => $options['createdBefore'], 'MixerRegion' => $options['mixerRegion'], 'Tags' => $options['tags'], 'Subaccount' => $options['subaccount'], 'DetectedIssues' => $options['detectedIssues'], 'EndReason' => $options['endReason'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ConferencePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ConferenceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ConferencePage Page of ConferenceInstance */ public function getPage(string $targetUrl): ConferencePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ConferencePage($this->version, $response, $this->solution); } /** * Constructs a ConferenceContext * * @param string $conferenceSid Conference SID. */ public function getContext(string $conferenceSid): ConferenceContext { return new ConferenceContext($this->version, $conferenceSid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.ConferenceList]'; } }PKt[y.Twilio/Rest/Insights/V1/ConferenceInstance.phpnu[properties = [ 'conferenceSid' => Values::array_get($payload, 'conference_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'createTime' => Deserialize::dateTime(Values::array_get($payload, 'create_time')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'durationSeconds' => Values::array_get($payload, 'duration_seconds'), 'connectDurationSeconds' => Values::array_get($payload, 'connect_duration_seconds'), 'status' => Values::array_get($payload, 'status'), 'maxParticipants' => Values::array_get($payload, 'max_participants'), 'maxConcurrentParticipants' => Values::array_get($payload, 'max_concurrent_participants'), 'uniqueParticipants' => Values::array_get($payload, 'unique_participants'), 'endReason' => Values::array_get($payload, 'end_reason'), 'endedBy' => Values::array_get($payload, 'ended_by'), 'mixerRegion' => Values::array_get($payload, 'mixer_region'), 'mixerRegionRequested' => Values::array_get($payload, 'mixer_region_requested'), 'recordingEnabled' => Values::array_get($payload, 'recording_enabled'), 'detectedIssues' => Values::array_get($payload, 'detected_issues'), 'tags' => Values::array_get($payload, 'tags'), 'tagInfo' => Values::array_get($payload, 'tag_info'), 'processingState' => Values::array_get($payload, 'processing_state'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['conferenceSid' => $conferenceSid ?: $this->properties['conferenceSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConferenceContext Context for this ConferenceInstance */ protected function proxy(): ConferenceContext { if (!$this->context) { $this->context = new ConferenceContext($this->version, $this->solution['conferenceSid']); } return $this->context; } /** * Fetch the ConferenceInstance * * @return ConferenceInstance Fetched ConferenceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConferenceInstance { return $this->proxy()->fetch(); } /** * Access the conferenceParticipants */ protected function getConferenceParticipants(): ConferenceParticipantList { return $this->proxy()->conferenceParticipants; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.ConferenceInstance ' . \implode(' ', $context) . ']'; } }PKt[7rqm*Twilio/Rest/Insights/V1/Call/EventList.phpnu[solution = ['callSid' => $callSid, ]; $this->uri = '/Voice/' . \rawurlencode($callSid) . '/Events'; } /** * Streams EventInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EventInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EventInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of EventInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EventPage Page of EventInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EventPage { $options = new Values($options); $params = Values::of([ 'Edge' => $options['edge'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EventPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EventInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EventPage Page of EventInstance */ public function getPage(string $targetUrl): EventPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EventPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.EventList]'; } }PKt[ C C 2Twilio/Rest/Insights/V1/Call/AnnotationContext.phpnu[solution = ['callSid' => $callSid, ]; $this->uri = '/Voice/' . \rawurlencode($callSid) . '/Annotation'; } /** * Update the AnnotationInstance * * @param array|Options $options Optional Arguments * @return AnnotationInstance Updated AnnotationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AnnotationInstance { $options = new Values($options); $data = Values::of([ 'AnsweredBy' => $options['answeredBy'], 'ConnectivityIssue' => $options['connectivityIssue'], 'QualityIssues' => $options['qualityIssues'], 'Spam' => Serialize::booleanToString($options['spam']), 'CallScore' => $options['callScore'], 'Comment' => $options['comment'], 'Incident' => $options['incident'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AnnotationInstance($this->version, $payload, $this->solution['callSid']); } /** * Fetch the AnnotationInstance * * @return AnnotationInstance Fetched AnnotationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AnnotationInstance { $payload = $this->version->fetch('GET', $this->uri); return new AnnotationInstance($this->version, $payload, $this->solution['callSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.AnnotationContext ' . \implode(' ', $context) . ']'; } }PKt[}*_ss/Twilio/Rest/Insights/V1/Call/AnnotationList.phpnu[solution = ['callSid' => $callSid, ]; } /** * Constructs a AnnotationContext */ public function getContext(): AnnotationContext { return new AnnotationContext($this->version, $this->solution['callSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.AnnotationList]'; } }PKt[,)  0Twilio/Rest/Insights/V1/Call/CallSummaryList.phpnu[solution = ['callSid' => $callSid, ]; } /** * Constructs a CallSummaryContext */ public function getContext(): CallSummaryContext { return new CallSummaryContext($this->version, $this->solution['callSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.CallSummaryList]'; } }PKt[Z1<3Twilio/Rest/Insights/V1/Call/CallSummaryContext.phpnu[solution = ['callSid' => $callSid, ]; $this->uri = '/Voice/' . \rawurlencode($callSid) . '/Summary'; } /** * Fetch the CallSummaryInstance * * @param array|Options $options Optional Arguments * @return CallSummaryInstance Fetched CallSummaryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): CallSummaryInstance { $options = new Values($options); $params = Values::of(['ProcessingState' => $options['processingState'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new CallSummaryInstance($this->version, $payload, $this->solution['callSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.CallSummaryContext ' . \implode(' ', $context) . ']'; } }PKt[pxdd*Twilio/Rest/Insights/V1/Call/EventPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EventInstance \Twilio\Rest\Insights\V1\Call\EventInstance */ public function buildInstance(array $payload): EventInstance { return new EventInstance($this->version, $payload, $this->solution['callSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.EventPage]'; } }PKt[U0Twilio/Rest/Insights/V1/Call/CallSummaryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CallSummaryInstance \Twilio\Rest\Insights\V1\Call\CallSummaryInstance */ public function buildInstance(array $payload): CallSummaryInstance { return new CallSummaryInstance($this->version, $payload, $this->solution['callSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.CallSummaryPage]'; } }PKt[3Twilio/Rest/Insights/V1/Call/AnnotationInstance.phpnu[properties = [ 'callSid' => Values::array_get($payload, 'call_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'answeredBy' => Values::array_get($payload, 'answered_by'), 'connectivityIssue' => Values::array_get($payload, 'connectivity_issue'), 'qualityIssues' => Values::array_get($payload, 'quality_issues'), 'spam' => Values::array_get($payload, 'spam'), 'callScore' => Values::array_get($payload, 'call_score'), 'comment' => Values::array_get($payload, 'comment'), 'incident' => Values::array_get($payload, 'incident'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['callSid' => $callSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AnnotationContext Context for this AnnotationInstance */ protected function proxy(): AnnotationContext { if (!$this->context) { $this->context = new AnnotationContext($this->version, $this->solution['callSid']); } return $this->context; } /** * Update the AnnotationInstance * * @param array|Options $options Optional Arguments * @return AnnotationInstance Updated AnnotationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AnnotationInstance { return $this->proxy()->update($options); } /** * Fetch the AnnotationInstance * * @return AnnotationInstance Fetched AnnotationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AnnotationInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.AnnotationInstance ' . \implode(' ', $context) . ']'; } }PKt[q4Twilio/Rest/Insights/V1/Call/CallSummaryInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'callType' => Values::array_get($payload, 'call_type'), 'callState' => Values::array_get($payload, 'call_state'), 'answeredBy' => Values::array_get($payload, 'answered_by'), 'processingState' => Values::array_get($payload, 'processing_state'), 'createdTime' => Deserialize::dateTime(Values::array_get($payload, 'created_time')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'duration' => Values::array_get($payload, 'duration'), 'connectDuration' => Values::array_get($payload, 'connect_duration'), 'from' => Values::array_get($payload, 'from'), 'to' => Values::array_get($payload, 'to'), 'carrierEdge' => Values::array_get($payload, 'carrier_edge'), 'clientEdge' => Values::array_get($payload, 'client_edge'), 'sdkEdge' => Values::array_get($payload, 'sdk_edge'), 'sipEdge' => Values::array_get($payload, 'sip_edge'), 'tags' => Values::array_get($payload, 'tags'), 'url' => Values::array_get($payload, 'url'), 'attributes' => Values::array_get($payload, 'attributes'), 'properties' => Values::array_get($payload, 'properties'), 'trust' => Values::array_get($payload, 'trust'), 'annotation' => Values::array_get($payload, 'annotation'), ]; $this->solution = ['callSid' => $callSid, ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CallSummaryContext Context for this CallSummaryInstance */ protected function proxy(): CallSummaryContext { if (!$this->context) { $this->context = new CallSummaryContext($this->version, $this->solution['callSid']); } return $this->context; } /** * Fetch the CallSummaryInstance * * @param array|Options $options Optional Arguments * @return CallSummaryInstance Fetched CallSummaryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): CallSummaryInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.CallSummaryInstance ' . \implode(' ', $context) . ']'; } }PKt[pA+Twilio/Rest/Insights/V1/Call/MetricList.phpnu[solution = ['callSid' => $callSid, ]; $this->uri = '/Voice/' . \rawurlencode($callSid) . '/Metrics'; } /** * Streams MetricInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MetricInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MetricInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MetricInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MetricPage Page of MetricInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MetricPage { $options = new Values($options); $params = Values::of([ 'Edge' => $options['edge'], 'Direction' => $options['direction'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MetricPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MetricInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MetricPage Page of MetricInstance */ public function getPage(string $targetUrl): MetricPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MetricPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.MetricList]'; } }PKt['3Twilio/Rest/Insights/V1/Call/CallSummaryOptions.phpnu[options['processingState'] = $processingState; } /** * The processing_state * * @param string $processingState The processing_state * @return $this Fluent Builder */ public function setProcessingState(string $processingState): self { $this->options['processingState'] = $processingState; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.FetchCallSummaryOptions ' . $options . ']'; } }PKt[ajj+Twilio/Rest/Insights/V1/Call/MetricPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MetricInstance \Twilio\Rest\Insights\V1\Call\MetricInstance */ public function buildInstance(array $payload): MetricInstance { return new MetricInstance($this->version, $payload, $this->solution['callSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.MetricPage]'; } }PKt[8((/Twilio/Rest/Insights/V1/Call/AnnotationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AnnotationInstance \Twilio\Rest\Insights\V1\Call\AnnotationInstance */ public function buildInstance(array $payload): AnnotationInstance { return new AnnotationInstance($this->version, $payload, $this->solution['callSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.AnnotationPage]'; } }PKt[Eӆ-Twilio/Rest/Insights/V1/Call/EventOptions.phpnu[options['edge'] = $edge; } /** * The edge * * @param string $edge The edge * @return $this Fluent Builder */ public function setEdge(string $edge): self { $this->options['edge'] = $edge; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.ReadEventOptions ' . $options . ']'; } }PKt[I2Twilio/Rest/Insights/V1/Call/AnnotationOptions.phpnu[options['answeredBy'] = $answeredBy; $this->options['connectivityIssue'] = $connectivityIssue; $this->options['qualityIssues'] = $qualityIssues; $this->options['spam'] = $spam; $this->options['callScore'] = $callScore; $this->options['comment'] = $comment; $this->options['incident'] = $incident; } /** * Which entity answered the call as determined by Answering Machine Detection. Use this to provide feedback on Answering Machine Detection accuracy. Possible enumerated values, one of: human, machine. human indicates the call was answered by a person. machine indicates the call was answered by an answering machine. * * @param string $answeredBy Indicates the answering entity as determined by * Answering Machine Detection. * @return $this Fluent Builder */ public function setAnsweredBy(string $answeredBy): self { $this->options['answeredBy'] = $answeredBy; return $this; } /** * Specify if the call had any connectivity issues. Possible enumerated values, one : no_connectivity_issue, invalid_number, caller_id, dropped_call, number_reachability. * * @param string $connectivityIssue Indicates if the call had any connectivity * issue * @return $this Fluent Builder */ public function setConnectivityIssue(string $connectivityIssue): self { $this->options['connectivityIssue'] = $connectivityIssue; return $this; } /** * Specify if the call had any subjective quality issues. Possible values, one or more of: no_quality_issue, low_volume, choppy_robotic, echo, dtmf, latency, owa, static_noise. Use comma separated values to indicate multiple quality issues for the same call * * @param string $qualityIssues Indicates if the call had audio quality issues. * @return $this Fluent Builder */ public function setQualityIssues(string $qualityIssues): self { $this->options['qualityIssues'] = $qualityIssues; return $this; } /** * Specify if the call was a spam call. Use this to provide feedback on whether calls placed from your account were marked as spam, or if inbound calls received by your account were unwanted spam. Is of type Boolean: true, false. Use true if the call was a spam call. * * @param bool $spam Call spam indicator * @return $this Fluent Builder */ public function setSpam(bool $spam): self { $this->options['spam'] = $spam; return $this; } /** * Specify the call score. This is of type integer. Use a range of 1-5 to indicate the call experience score, with the following mapping as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor, 1: Bad]. * * @param int $callScore Call Score * @return $this Fluent Builder */ public function setCallScore(int $callScore): self { $this->options['callScore'] = $callScore; return $this; } /** * Specify any comments pertaining to the call. This of type string with a max limit of 100 characters. Twilio does not treat this field as PII, so don’t put any PII in here. * * @param string $comment User comments * @return $this Fluent Builder */ public function setComment(string $comment): self { $this->options['comment'] = $comment; return $this; } /** * Associate this call with an incident or support ticket. This is of type string with a max limit of 100 characters. Twilio does not treat this field as PII, so don’t put any PII in here. * * @param string $incident Call tag for incidents or support ticket * @return $this Fluent Builder */ public function setIncident(string $incident): self { $this->options['incident'] = $incident; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.UpdateAnnotationOptions ' . $options . ']'; } }PKt[rϓ-ss.Twilio/Rest/Insights/V1/Call/MetricOptions.phpnu[options['edge'] = $edge; $this->options['direction'] = $direction; } /** * The edge * * @param string $edge The edge * @return $this Fluent Builder */ public function setEdge(string $edge): self { $this->options['edge'] = $edge; return $this; } /** * The direction * * @param string $direction The direction * @return $this Fluent Builder */ public function setDirection(string $direction): self { $this->options['direction'] = $direction; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.ReadMetricOptions ' . $options . ']'; } }PKt[E\|  .Twilio/Rest/Insights/V1/Call/EventInstance.phpnu[properties = [ 'timestamp' => Values::array_get($payload, 'timestamp'), 'callSid' => Values::array_get($payload, 'call_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'edge' => Values::array_get($payload, 'edge'), 'group' => Values::array_get($payload, 'group'), 'level' => Values::array_get($payload, 'level'), 'name' => Values::array_get($payload, 'name'), 'carrierEdge' => Values::array_get($payload, 'carrier_edge'), 'sipEdge' => Values::array_get($payload, 'sip_edge'), 'sdkEdge' => Values::array_get($payload, 'sdk_edge'), 'clientEdge' => Values::array_get($payload, 'client_edge'), ]; $this->solution = ['callSid' => $callSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.EventInstance]'; } }PKt[`x  /Twilio/Rest/Insights/V1/Call/MetricInstance.phpnu[properties = [ 'timestamp' => Values::array_get($payload, 'timestamp'), 'callSid' => Values::array_get($payload, 'call_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'edge' => Values::array_get($payload, 'edge'), 'direction' => Values::array_get($payload, 'direction'), 'carrierEdge' => Values::array_get($payload, 'carrier_edge'), 'sipEdge' => Values::array_get($payload, 'sip_edge'), 'sdkEdge' => Values::array_get($payload, 'sdk_edge'), 'clientEdge' => Values::array_get($payload, 'client_edge'), ]; $this->solution = ['callSid' => $callSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.MetricInstance]'; } }PKt[ |1Twilio/Rest/Insights/V1/CallSummariesInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'callSid' => Values::array_get($payload, 'call_sid'), 'answeredBy' => Values::array_get($payload, 'answered_by'), 'callType' => Values::array_get($payload, 'call_type'), 'callState' => Values::array_get($payload, 'call_state'), 'processingState' => Values::array_get($payload, 'processing_state'), 'createdTime' => Deserialize::dateTime(Values::array_get($payload, 'created_time')), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'duration' => Values::array_get($payload, 'duration'), 'connectDuration' => Values::array_get($payload, 'connect_duration'), 'from' => Values::array_get($payload, 'from'), 'to' => Values::array_get($payload, 'to'), 'carrierEdge' => Values::array_get($payload, 'carrier_edge'), 'clientEdge' => Values::array_get($payload, 'client_edge'), 'sdkEdge' => Values::array_get($payload, 'sdk_edge'), 'sipEdge' => Values::array_get($payload, 'sip_edge'), 'tags' => Values::array_get($payload, 'tags'), 'url' => Values::array_get($payload, 'url'), 'attributes' => Values::array_get($payload, 'attributes'), 'properties' => Values::array_get($payload, 'properties'), 'trust' => Values::array_get($payload, 'trust'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.CallSummariesInstance]'; } }PKt["-Twilio/Rest/Insights/V1/CallSummariesList.phpnu[solution = []; $this->uri = '/Voice/Summaries'; } /** * Streams CallSummariesInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CallSummariesInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CallSummariesInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CallSummariesInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CallSummariesPage Page of CallSummariesInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CallSummariesPage { $options = new Values($options); $params = Values::of([ 'From' => $options['from'], 'To' => $options['to'], 'FromCarrier' => $options['fromCarrier'], 'ToCarrier' => $options['toCarrier'], 'FromCountryCode' => $options['fromCountryCode'], 'ToCountryCode' => $options['toCountryCode'], 'Branded' => Serialize::booleanToString($options['branded']), 'VerifiedCaller' => Serialize::booleanToString($options['verifiedCaller']), 'HasTag' => Serialize::booleanToString($options['hasTag']), 'StartTime' => $options['startTime'], 'EndTime' => $options['endTime'], 'CallType' => $options['callType'], 'CallState' => $options['callState'], 'Direction' => $options['direction'], 'ProcessingState' => $options['processingState'], 'SortBy' => $options['sortBy'], 'Subaccount' => $options['subaccount'], 'AbnormalSession' => Serialize::booleanToString($options['abnormalSession']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CallSummariesPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CallSummariesInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CallSummariesPage Page of CallSummariesInstance */ public function getPage(string $targetUrl): CallSummariesPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CallSummariesPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.CallSummariesList]'; } }PKt[j'Twilio/Rest/Insights/V1/SettingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SettingInstance \Twilio\Rest\Insights\V1\SettingInstance */ public function buildInstance(array $payload): SettingInstance { return new SettingInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1.SettingPage]'; } }PKt[ِQ4 4 *Twilio/Rest/Insights/V1/SettingContext.phpnu[solution = []; $this->uri = '/Voice/Settings'; } /** * Fetch the SettingInstance * * @param array|Options $options Optional Arguments * @return SettingInstance Fetched SettingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): SettingInstance { $options = new Values($options); $params = Values::of(['SubaccountSid' => $options['subaccountSid'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new SettingInstance($this->version, $payload); } /** * Update the SettingInstance * * @param array|Options $options Optional Arguments * @return SettingInstance Updated SettingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SettingInstance { $options = new Values($options); $data = Values::of([ 'AdvancedFeatures' => Serialize::booleanToString($options['advancedFeatures']), 'VoiceTrace' => Serialize::booleanToString($options['voiceTrace']), 'SubaccountSid' => $options['subaccountSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SettingInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.SettingContext ' . \implode(' ', $context) . ']'; } }PKt[y: +Twilio/Rest/Insights/V1/SettingInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'advancedFeatures' => Values::array_get($payload, 'advanced_features'), 'voiceTrace' => Values::array_get($payload, 'voice_trace'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SettingContext Context for this SettingInstance */ protected function proxy(): SettingContext { if (!$this->context) { $this->context = new SettingContext($this->version); } return $this->context; } /** * Fetch the SettingInstance * * @param array|Options $options Optional Arguments * @return SettingInstance Fetched SettingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): SettingInstance { return $this->proxy()->fetch($options); } /** * Update the SettingInstance * * @param array|Options $options Optional Arguments * @return SettingInstance Updated SettingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SettingInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.SettingInstance ' . \implode(' ', $context) . ']'; } }PKt[W M*Twilio/Rest/Insights/V1/SettingOptions.phpnu[options['subaccountSid'] = $subaccountSid; } /** * The subaccount_sid * * @param string $subaccountSid The subaccount_sid * @return $this Fluent Builder */ public function setSubaccountSid(string $subaccountSid): self { $this->options['subaccountSid'] = $subaccountSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.FetchSettingOptions ' . $options . ']'; } } class UpdateSettingOptions extends Options { /** * @param bool $advancedFeatures The advanced_features * @param bool $voiceTrace The voice_trace * @param string $subaccountSid The subaccount_sid */ public function __construct(bool $advancedFeatures = Values::NONE, bool $voiceTrace = Values::NONE, string $subaccountSid = Values::NONE) { $this->options['advancedFeatures'] = $advancedFeatures; $this->options['voiceTrace'] = $voiceTrace; $this->options['subaccountSid'] = $subaccountSid; } /** * The advanced_features * * @param bool $advancedFeatures The advanced_features * @return $this Fluent Builder */ public function setAdvancedFeatures(bool $advancedFeatures): self { $this->options['advancedFeatures'] = $advancedFeatures; return $this; } /** * The voice_trace * * @param bool $voiceTrace The voice_trace * @return $this Fluent Builder */ public function setVoiceTrace(bool $voiceTrace): self { $this->options['voiceTrace'] = $voiceTrace; return $this; } /** * The subaccount_sid * * @param string $subaccountSid The subaccount_sid * @return $this Fluent Builder */ public function setSubaccountSid(string $subaccountSid): self { $this->options['subaccountSid'] = $subaccountSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Insights.V1.UpdateSettingOptions ' . $options . ']'; } }PKt[~K6(Twilio/Rest/Insights/V1/CallInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CallContext Context for this CallInstance */ protected function proxy(): CallContext { if (!$this->context) { $this->context = new CallContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CallInstance * * @return CallInstance Fetched CallInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CallInstance { return $this->proxy()->fetch(); } /** * Access the events */ protected function getEvents(): EventList { return $this->proxy()->events; } /** * Access the metrics */ protected function getMetrics(): MetricList { return $this->proxy()->metrics; } /** * Access the summary */ protected function getSummary(): CallSummaryList { return $this->proxy()->summary; } /** * Access the annotation */ protected function getAnnotation(): AnnotationList { return $this->proxy()->annotation; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Insights.V1.CallInstance ' . \implode(' ', $context) . ']'; } }PKt[: Twilio/Rest/Insights/V1.phpnu[version = 'v1'; } protected function getSettings(): SettingList { if (!$this->_settings) { $this->_settings = new SettingList($this); } return $this->_settings; } protected function getCalls(): CallList { if (!$this->_calls) { $this->_calls = new CallList($this); } return $this->_calls; } protected function getCallSummaries(): CallSummariesList { if (!$this->_callSummaries) { $this->_callSummaries = new CallSummariesList($this); } return $this->_callSummaries; } protected function getConferences(): ConferenceList { if (!$this->_conferences) { $this->_conferences = new ConferenceList($this); } return $this->_conferences; } protected function getRooms(): RoomList { if (!$this->_rooms) { $this->_rooms = new RoomList($this); } return $this->_rooms; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Insights.V1]'; } }PKt[7&Twilio/Rest/Chat/V1/CredentialPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialInstance \Twilio\Rest\Chat\V1\CredentialInstance */ public function buildInstance(array $payload): CredentialInstance { return new CredentialInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.CredentialPage]'; } }PKt[ 嫤..)Twilio/Rest/Chat/V1/CredentialOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * A descriptive string that you create to describe the new resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----` * * @param string $certificate [APN only] The URL encoded representation of the * certificate * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----` * * @param string $privateKey [APN only] The URL encoded representation of the * private key * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. * * @param string $apiKey [GCM only] The API key for the project that was * obtained from the Google Developer console for your * GCM Service application credential * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * * @param string $secret [FCM only] The Server key of your project from * Firebase console * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.CreateCredentialOptions ' . $options . ']'; } } class UpdateCredentialOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $certificate [APN only] The URL encoded representation of the * certificate * @param string $privateKey [APN only] The URL encoded representation of the * private key * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs * @param string $apiKey [GCM only] The API key for the project that was * obtained from the Google Developer console for your * GCM Service application credential * @param string $secret [FCM only] The Server key of your project from * Firebase console */ public function __construct(string $friendlyName = Values::NONE, string $certificate = Values::NONE, string $privateKey = Values::NONE, bool $sandbox = Values::NONE, string $apiKey = Values::NONE, string $secret = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----` * * @param string $certificate [APN only] The URL encoded representation of the * certificate * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----` * * @param string $privateKey [APN only] The URL encoded representation of the * private key * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. * * @param string $apiKey [GCM only] The API key for the project that was * obtained from the Google Developer console for your * GCM Service application credential * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * * @param string $secret [FCM only] The Server key of your project from * Firebase console * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.UpdateCredentialOptions ' . $options . ']'; } }PKt[3f  ,Twilio/Rest/Chat/V1/Service/UserInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'attributes' => Values::array_get($payload, 'attributes'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'roleSid' => Values::array_get($payload, 'role_sid'), 'identity' => Values::array_get($payload, 'identity'), 'isOnline' => Values::array_get($payload, 'is_online'), 'isNotifiable' => Values::array_get($payload, 'is_notifiable'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'joinedChannelsCount' => Values::array_get($payload, 'joined_channels_count'), 'links' => Values::array_get($payload, 'links'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserContext Context for this UserInstance */ protected function proxy(): UserContext { if (!$this->context) { $this->context = new UserContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { return $this->proxy()->fetch(); } /** * Delete the UserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { return $this->proxy()->update($options); } /** * Access the userChannels */ protected function getUserChannels(): UserChannelList { return $this->proxy()->userChannels; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.UserInstance ' . \implode(' ', $context) . ']'; } }PKt[g8[+Twilio/Rest/Chat/V1/Service/UserOptions.phpnu[options['roleSid'] = $roleSid; $this->options['attributes'] = $attributes; $this->options['friendlyName'] = $friendlyName; } /** * The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User. * * @param string $roleSid The SID of the Role assigned to this user * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * A descriptive string that you create to describe the new resource. This value is often used for display purposes. * * @param string $friendlyName A string to describe the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.CreateUserOptions ' . $options . ']'; } } class UpdateUserOptions extends Options { /** * @param string $roleSid The SID id of the Role assigned to this user * @param string $attributes A valid JSON string that contains * application-specific data * @param string $friendlyName A string to describe the resource */ public function __construct(string $roleSid = Values::NONE, string $attributes = Values::NONE, string $friendlyName = Values::NONE) { $this->options['roleSid'] = $roleSid; $this->options['attributes'] = $attributes; $this->options['friendlyName'] = $friendlyName; } /** * The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user. * * @param string $roleSid The SID id of the Role assigned to this user * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * A descriptive string that you create to describe the resource. It is often used for display purposes. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.UpdateUserOptions ' . $options . ']'; } }PKt[3Bx]].Twilio/Rest/Chat/V1/Service/ChannelOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['attributes'] = $attributes; $this->options['type'] = $type; } /** * A descriptive string that you create to describe the new resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The visibility of the channel. Can be: `public` or `private` and defaults to `public`. * * @param string $type The visibility of the channel * @return $this Fluent Builder */ public function setType(string $type): self { $this->options['type'] = $type; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.CreateChannelOptions ' . $options . ']'; } } class ReadChannelOptions extends Options { /** * @param string[] $type The visibility of the channel to read */ public function __construct(array $type = Values::ARRAY_NONE) { $this->options['type'] = $type; } /** * The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. * * @param string[] $type The visibility of the channel to read * @return $this Fluent Builder */ public function setType(array $type): self { $this->options['type'] = $type; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.ReadChannelOptions ' . $options . ']'; } } class UpdateChannelOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param string $attributes A valid JSON string that contains * application-specific data */ public function __construct(string $friendlyName = Values::NONE, string $uniqueName = Values::NONE, string $attributes = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['attributes'] = $attributes; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.UpdateChannelOptions ' . $options . ']'; } }PKt[;+Twilio/Rest/Chat/V1/Service/ChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ChannelInstance \Twilio\Rest\Chat\V1\Service\ChannelInstance */ public function buildInstance(array $payload): ChannelInstance { return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.ChannelPage]'; } }PKt[y;W+Twilio/Rest/Chat/V1/Service/ChannelList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels'; } /** * Create the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Created ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ChannelInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Attributes' => $options['attributes'], 'Type' => $options['type'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams ChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ChannelInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ChannelInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ChannelPage Page of ChannelInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ChannelPage { $options = new Values($options); $params = Values::of([ 'Type' => Serialize::map($options['type'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ChannelPage Page of ChannelInstance */ public function getPage(string $targetUrl): ChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ChannelPage($this->version, $response, $this->solution); } /** * Constructs a ChannelContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ChannelContext { return new ChannelContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.ChannelList]'; } }PKt[ !5Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.phpnu[options['roleSid'] = $roleSid; } /** * The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). * * @param string $roleSid The SID of the Role to assign to the member * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.CreateMemberOptions ' . $options . ']'; } } class ReadMemberOptions extends Options { /** * @param string[] $identity The `identity` value of the resources to read */ public function __construct(array $identity = Values::ARRAY_NONE) { $this->options['identity'] = $identity; } /** * The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. * * @param string[] $identity The `identity` value of the resources to read * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.ReadMemberOptions ' . $options . ']'; } } class UpdateMemberOptions extends Options { /** * @param string $roleSid The SID of the Role to assign to the member * @param int $lastConsumedMessageIndex The index of the last consumed Message * for the Channel for the Member */ public function __construct(string $roleSid = Values::NONE, int $lastConsumedMessageIndex = Values::NONE) { $this->options['roleSid'] = $roleSid; $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; } /** * The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). * * @param string $roleSid The SID of the Role to assign to the member * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels). * * @param int $lastConsumedMessageIndex The index of the last consumed Message * for the Channel for the Member * @return $this Fluent Builder */ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self { $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.UpdateMemberOptions ' . $options . ']'; } }PKt[u 5Twilio/Rest/Chat/V1/Service/Channel/MemberContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members/' . \rawurlencode($sid) . ''; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { $payload = $this->version->fetch('GET', $this->uri); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the MemberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the MemberInstance * * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MemberInstance { $options = new Values($options); $data = Values::of([ 'RoleSid' => $options['roleSid'], 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.MemberContext ' . \implode(' ', $context) . ']'; } }PKt[;shh6Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.phpnu[options['from'] = $from; $this->options['attributes'] = $attributes; } /** * The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`. * * @param string $from The identity of the new message's author * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.CreateMessageOptions ' . $options . ']'; } } class ReadMessageOptions extends Options { /** * @param string $order The sort order of the returned messages */ public function __construct(string $order = Values::NONE) { $this->options['order'] = $order; } /** * The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default. * * @param string $order The sort order of the returned messages * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.ReadMessageOptions ' . $options . ']'; } } class UpdateMessageOptions extends Options { /** * @param string $body The message to send to the channel * @param string $attributes A valid JSON string that contains * application-specific data */ public function __construct(string $body = Values::NONE, string $attributes = Values::NONE) { $this->options['body'] = $body; $this->options['attributes'] = $attributes; } /** * The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. * * @param string $body The message to send to the channel * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.UpdateMessageOptions ' . $options . ']'; } }PKt[eUX6Twilio/Rest/Chat/V1/Service/Channel/InviteInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'roleSid' => Values::array_get($payload, 'role_sid'), 'createdBy' => Values::array_get($payload, 'created_by'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InviteContext Context for this InviteInstance */ protected function proxy(): InviteContext { if (!$this->context) { $this->context = new InviteContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the InviteInstance * * @return InviteInstance Fetched InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InviteInstance { return $this->proxy()->fetch(); } /** * Delete the InviteInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.InviteInstance ' . \implode(' ', $context) . ']'; } }PKt[p  3Twilio/Rest/Chat/V1/Service/Channel/MessagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MessageInstance \Twilio\Rest\Chat\V1\Service\Channel\MessageInstance */ public function buildInstance(array $payload): MessageInstance { return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.MessagePage]'; } }PKt[*g;443Twilio/Rest/Chat/V1/Service/Channel/MessageList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages'; } /** * Create the MessageInstance * * @param string $body The message to send to the channel * @param array|Options $options Optional Arguments * @return MessageInstance Created MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $body, array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'Body' => $body, 'From' => $options['from'], 'Attributes' => $options['attributes'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams MessageInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MessageInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MessageInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MessageInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MessagePage Page of MessageInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MessagePage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MessagePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MessageInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MessagePage Page of MessageInstance */ public function getPage(string $targetUrl): MessagePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MessagePage($this->version, $response, $this->solution); } /** * Constructs a MessageContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): MessageContext { return new MessageContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.MessageList]'; } }PKt[c,,2Twilio/Rest/Chat/V1/Service/Channel/MemberList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members'; } /** * Create the MemberInstance * * @param string $identity The `identity` value that identifies the new * resource's User * @param array|Options $options Optional Arguments * @return MemberInstance Created MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): MemberInstance { $options = new Values($options); $data = Values::of(['Identity' => $identity, 'RoleSid' => $options['roleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams MemberInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MemberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MemberInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MemberInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MemberPage Page of MemberInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MemberPage { $options = new Values($options); $params = Values::of([ 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MemberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MemberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MemberPage Page of MemberInstance */ public function getPage(string $targetUrl): MemberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MemberPage($this->version, $response, $this->solution); } /** * Constructs a MemberContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): MemberContext { return new MemberContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.MemberList]'; } }PKt[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'roleSid' => Values::array_get($payload, 'role_sid'), 'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'), 'lastConsumptionTimestamp' => Deserialize::dateTime(Values::array_get($payload, 'last_consumption_timestamp')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MemberContext Context for this MemberInstance */ protected function proxy(): MemberContext { if (!$this->context) { $this->context = new MemberContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { return $this->proxy()->fetch(); } /** * Delete the MemberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the MemberInstance * * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MemberInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.MemberInstance ' . \implode(' ', $context) . ']'; } }PKt[B2Twilio/Rest/Chat/V1/Service/Channel/MemberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MemberInstance \Twilio\Rest\Chat\V1\Service\Channel\MemberInstance */ public function buildInstance(array $payload): MemberInstance { return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.MemberPage]'; } }PKt[6 6Twilio/Rest/Chat/V1/Service/Channel/MessageContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages/' . \rawurlencode($sid) . ''; } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { $payload = $this->version->fetch('GET', $this->uri); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the MessageInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of(['Body' => $options['body'], 'Attributes' => $options['attributes'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.MessageContext ' . \implode(' ', $context) . ']'; } }PKt[V`7Twilio/Rest/Chat/V1/Service/Channel/MessageInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'attributes' => Values::array_get($payload, 'attributes'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'to' => Values::array_get($payload, 'to'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'wasEdited' => Values::array_get($payload, 'was_edited'), 'from' => Values::array_get($payload, 'from'), 'body' => Values::array_get($payload, 'body'), 'index' => Values::array_get($payload, 'index'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MessageContext Context for this MessageInstance */ protected function proxy(): MessageContext { if (!$this->context) { $this->context = new MessageContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { return $this->proxy()->fetch(); } /** * Delete the MessageInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.MessageInstance ' . \implode(' ', $context) . ']'; } }PKt[4 5Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.phpnu[options['roleSid'] = $roleSid; } /** * The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member. * * @param string $roleSid The Role assigned to the new member * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.CreateInviteOptions ' . $options . ']'; } } class ReadInviteOptions extends Options { /** * @param string[] $identity The `identity` value of the resources to read */ public function __construct(array $identity = Values::ARRAY_NONE) { $this->options['identity'] = $identity; } /** * The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. * * @param string[] $identity The `identity` value of the resources to read * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.ReadInviteOptions ' . $options . ']'; } }PKt[@Be332Twilio/Rest/Chat/V1/Service/Channel/InviteList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites'; } /** * Create the InviteInstance * * @param string $identity The `identity` value that identifies the new * resource's User * @param array|Options $options Optional Arguments * @return InviteInstance Created InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): InviteInstance { $options = new Values($options); $data = Values::of(['Identity' => $identity, 'RoleSid' => $options['roleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams InviteInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InviteInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InviteInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of InviteInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InvitePage Page of InviteInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InvitePage { $options = new Values($options); $params = Values::of([ 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new InvitePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InviteInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InvitePage Page of InviteInstance */ public function getPage(string $targetUrl): InvitePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InvitePage($this->version, $response, $this->solution); } /** * Constructs a InviteContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): InviteContext { return new InviteContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.InviteList]'; } }PKt[I*2Twilio/Rest/Chat/V1/Service/Channel/InvitePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InviteInstance \Twilio\Rest\Chat\V1\Service\Channel\InviteInstance */ public function buildInstance(array $payload): InviteInstance { return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.InvitePage]'; } }PKt[Q?5Twilio/Rest/Chat/V1/Service/Channel/InviteContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites/' . \rawurlencode($sid) . ''; } /** * Fetch the InviteInstance * * @return InviteInstance Fetched InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InviteInstance { $payload = $this->version->fetch('GET', $this->uri); return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the InviteInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.InviteContext ' . \implode(' ', $context) . ']'; } }PKt[*AԽxx+Twilio/Rest/Chat/V1/Service/UserContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($sid) . ''; } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the UserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'RoleSid' => $options['roleSid'], 'Attributes' => $options['attributes'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new UserInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the userChannels */ protected function getUserChannels(): UserChannelList { if (!$this->_userChannels) { $this->_userChannels = new UserChannelList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_userChannels; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.UserContext ' . \implode(' ', $context) . ']'; } }PKt[5K4Twilio/Rest/Chat/V1/Service/User/UserChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserChannelInstance \Twilio\Rest\Chat\V1\Service\User\UserChannelInstance */ public function buildInstance(array $payload): UserChannelInstance { return new UserChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.UserChannelPage]'; } }PKt[֋ 8Twilio/Rest/Chat/V1/Service/User/UserChannelInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'memberSid' => Values::array_get($payload, 'member_sid'), 'status' => Values::array_get($payload, 'status'), 'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'), 'unreadMessagesCount' => Values::array_get($payload, 'unread_messages_count'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.UserChannelInstance]'; } }PKt[Vg4Twilio/Rest/Chat/V1/Service/User/UserChannelList.phpnu[solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels'; } /** * Streams UserChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserChannelInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserChannelInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserChannelPage Page of UserChannelInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserChannelPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserChannelPage Page of UserChannelInstance */ public function getPage(string $targetUrl): UserChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserChannelPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.UserChannelList]'; } }PKt[+5/Twilio/Rest/Chat/V1/Service/ChannelInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'attributes' => Values::array_get($payload, 'attributes'), 'type' => Values::array_get($payload, 'type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), 'membersCount' => Values::array_get($payload, 'members_count'), 'messagesCount' => Values::array_get($payload, 'messages_count'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ChannelContext Context for this ChannelInstance */ protected function proxy(): ChannelContext { if (!$this->context) { $this->context = new ChannelContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ChannelInstance * * @return ChannelInstance Fetched ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChannelInstance { return $this->proxy()->fetch(); } /** * Delete the ChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Updated ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChannelInstance { return $this->proxy()->update($options); } /** * Access the members */ protected function getMembers(): MemberList { return $this->proxy()->members; } /** * Access the messages */ protected function getMessages(): MessageList { return $this->proxy()->messages; } /** * Access the invites */ protected function getInvites(): InviteList { return $this->proxy()->invites; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.ChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[Q.Twilio/Rest/Chat/V1/Service/ChannelContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($sid) . ''; } /** * Fetch the ChannelInstance * * @return ChannelInstance Fetched ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new ChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the ChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Updated ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChannelInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Attributes' => $options['attributes'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the members */ protected function getMembers(): MemberList { if (!$this->_members) { $this->_members = new MemberList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_members; } /** * Access the messages */ protected function getMessages(): MessageList { if (!$this->_messages) { $this->_messages = new MessageList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_messages; } /** * Access the invites */ protected function getInvites(): InviteList { if (!$this->_invites) { $this->_invites = new InviteList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_invites; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.ChannelContext ' . \implode(' ', $context) . ']'; } }PKt[ÅK(Twilio/Rest/Chat/V1/Service/UserPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserInstance \Twilio\Rest\Chat\V1\Service\UserInstance */ public function buildInstance(array $payload): UserInstance { return new UserInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.UserPage]'; } }PKt[렐(Twilio/Rest/Chat/V1/Service/RolePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RoleInstance \Twilio\Rest\Chat\V1\Service\RoleInstance */ public function buildInstance(array $payload): RoleInstance { return new RoleInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.RolePage]'; } }PKt[ '..(Twilio/Rest/Chat/V1/Service/RoleList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles'; } /** * Create the RoleInstance * * @param string $friendlyName A string to describe the new resource * @param string $type The type of role * @param string[] $permission A permission the role should have * @return RoleInstance Created RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $type, array $permission): RoleInstance { $data = Values::of([ 'FriendlyName' => $friendlyName, 'Type' => $type, 'Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RoleInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams RoleInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RoleInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RoleInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of RoleInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RolePage Page of RoleInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RolePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RolePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RoleInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RolePage Page of RoleInstance */ public function getPage(string $targetUrl): RolePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RolePage($this->version, $response, $this->solution); } /** * Constructs a RoleContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): RoleContext { return new RoleContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.RoleList]'; } }PKt[Bz$^^(Twilio/Rest/Chat/V1/Service/UserList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users'; } /** * Create the UserInstance * * @param string $identity The `identity` value that identifies the new * resource's User * @param array|Options $options Optional Arguments * @return UserInstance Created UserInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $identity, 'RoleSid' => $options['roleSid'], 'Attributes' => $options['attributes'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new UserInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams UserInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserPage Page of UserInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserPage Page of UserInstance */ public function getPage(string $targetUrl): UserPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserPage($this->version, $response, $this->solution); } /** * Constructs a UserContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): UserContext { return new UserContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.UserList]'; } }PKt[Wx x +Twilio/Rest/Chat/V1/Service/RoleContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles/' . \rawurlencode($sid) . ''; } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { $payload = $this->version->fetch('GET', $this->uri); return new RoleInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the RoleInstance * * @param string[] $permission A permission the role should have * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { $data = Values::of(['Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RoleInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.RoleContext ' . \implode(' ', $context) . ']'; } }PKt[@(,Twilio/Rest/Chat/V1/Service/RoleInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'permissions' => Values::array_get($payload, 'permissions'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RoleContext Context for this RoleInstance */ protected function proxy(): RoleContext { if (!$this->context) { $this->context = new RoleContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { return $this->proxy()->fetch(); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the RoleInstance * * @param string[] $permission A permission the role should have * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { return $this->proxy()->update($permission); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.RoleInstance ' . \implode(' ', $context) . ']'; } }PKt[$vkz}}'Twilio/Rest/Chat/V1/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'defaultServiceRoleSid' => Values::array_get($payload, 'default_service_role_sid'), 'defaultChannelRoleSid' => Values::array_get($payload, 'default_channel_role_sid'), 'defaultChannelCreatorRoleSid' => Values::array_get($payload, 'default_channel_creator_role_sid'), 'readStatusEnabled' => Values::array_get($payload, 'read_status_enabled'), 'reachabilityEnabled' => Values::array_get($payload, 'reachability_enabled'), 'typingIndicatorTimeout' => Values::array_get($payload, 'typing_indicator_timeout'), 'consumptionReportInterval' => Values::array_get($payload, 'consumption_report_interval'), 'limits' => Values::array_get($payload, 'limits'), 'webhooks' => Values::array_get($payload, 'webhooks'), 'preWebhookUrl' => Values::array_get($payload, 'pre_webhook_url'), 'postWebhookUrl' => Values::array_get($payload, 'post_webhook_url'), 'webhookMethod' => Values::array_get($payload, 'webhook_method'), 'webhookFilters' => Values::array_get($payload, 'webhook_filters'), 'notifications' => Values::array_get($payload, 'notifications'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Access the channels */ protected function getChannels(): ChannelList { return $this->proxy()->channels; } /** * Access the roles */ protected function getRoles(): RoleList { return $this->proxy()->roles; } /** * Access the users */ protected function getUsers(): UserList { return $this->proxy()->users; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[ -$$#Twilio/Rest/Chat/V1/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Create the ServiceInstance * * @param string $friendlyName A string to describe the resource * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): ServiceInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Constructs a ServiceContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.ServiceList]'; } }PKt[Z%%&Twilio/Rest/Chat/V1/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DefaultServiceRoleSid' => $options['defaultServiceRoleSid'], 'DefaultChannelRoleSid' => $options['defaultChannelRoleSid'], 'DefaultChannelCreatorRoleSid' => $options['defaultChannelCreatorRoleSid'], 'ReadStatusEnabled' => Serialize::booleanToString($options['readStatusEnabled']), 'ReachabilityEnabled' => Serialize::booleanToString($options['reachabilityEnabled']), 'TypingIndicatorTimeout' => $options['typingIndicatorTimeout'], 'ConsumptionReportInterval' => $options['consumptionReportInterval'], 'Notifications.NewMessage.Enabled' => Serialize::booleanToString($options['notificationsNewMessageEnabled']), 'Notifications.NewMessage.Template' => $options['notificationsNewMessageTemplate'], 'Notifications.AddedToChannel.Enabled' => Serialize::booleanToString($options['notificationsAddedToChannelEnabled']), 'Notifications.AddedToChannel.Template' => $options['notificationsAddedToChannelTemplate'], 'Notifications.RemovedFromChannel.Enabled' => Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']), 'Notifications.RemovedFromChannel.Template' => $options['notificationsRemovedFromChannelTemplate'], 'Notifications.InvitedToChannel.Enabled' => Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']), 'Notifications.InvitedToChannel.Template' => $options['notificationsInvitedToChannelTemplate'], 'PreWebhookUrl' => $options['preWebhookUrl'], 'PostWebhookUrl' => $options['postWebhookUrl'], 'WebhookMethod' => $options['webhookMethod'], 'WebhookFilters' => Serialize::map($options['webhookFilters'], function($e) { return $e; }), 'Webhooks.OnMessageSend.Url' => $options['webhooksOnMessageSendUrl'], 'Webhooks.OnMessageSend.Method' => $options['webhooksOnMessageSendMethod'], 'Webhooks.OnMessageUpdate.Url' => $options['webhooksOnMessageUpdateUrl'], 'Webhooks.OnMessageUpdate.Method' => $options['webhooksOnMessageUpdateMethod'], 'Webhooks.OnMessageRemove.Url' => $options['webhooksOnMessageRemoveUrl'], 'Webhooks.OnMessageRemove.Method' => $options['webhooksOnMessageRemoveMethod'], 'Webhooks.OnChannelAdd.Url' => $options['webhooksOnChannelAddUrl'], 'Webhooks.OnChannelAdd.Method' => $options['webhooksOnChannelAddMethod'], 'Webhooks.OnChannelDestroy.Url' => $options['webhooksOnChannelDestroyUrl'], 'Webhooks.OnChannelDestroy.Method' => $options['webhooksOnChannelDestroyMethod'], 'Webhooks.OnChannelUpdate.Url' => $options['webhooksOnChannelUpdateUrl'], 'Webhooks.OnChannelUpdate.Method' => $options['webhooksOnChannelUpdateMethod'], 'Webhooks.OnMemberAdd.Url' => $options['webhooksOnMemberAddUrl'], 'Webhooks.OnMemberAdd.Method' => $options['webhooksOnMemberAddMethod'], 'Webhooks.OnMemberRemove.Url' => $options['webhooksOnMemberRemoveUrl'], 'Webhooks.OnMemberRemove.Method' => $options['webhooksOnMemberRemoveMethod'], 'Webhooks.OnMessageSent.Url' => $options['webhooksOnMessageSentUrl'], 'Webhooks.OnMessageSent.Method' => $options['webhooksOnMessageSentMethod'], 'Webhooks.OnMessageUpdated.Url' => $options['webhooksOnMessageUpdatedUrl'], 'Webhooks.OnMessageUpdated.Method' => $options['webhooksOnMessageUpdatedMethod'], 'Webhooks.OnMessageRemoved.Url' => $options['webhooksOnMessageRemovedUrl'], 'Webhooks.OnMessageRemoved.Method' => $options['webhooksOnMessageRemovedMethod'], 'Webhooks.OnChannelAdded.Url' => $options['webhooksOnChannelAddedUrl'], 'Webhooks.OnChannelAdded.Method' => $options['webhooksOnChannelAddedMethod'], 'Webhooks.OnChannelDestroyed.Url' => $options['webhooksOnChannelDestroyedUrl'], 'Webhooks.OnChannelDestroyed.Method' => $options['webhooksOnChannelDestroyedMethod'], 'Webhooks.OnChannelUpdated.Url' => $options['webhooksOnChannelUpdatedUrl'], 'Webhooks.OnChannelUpdated.Method' => $options['webhooksOnChannelUpdatedMethod'], 'Webhooks.OnMemberAdded.Url' => $options['webhooksOnMemberAddedUrl'], 'Webhooks.OnMemberAdded.Method' => $options['webhooksOnMemberAddedMethod'], 'Webhooks.OnMemberRemoved.Url' => $options['webhooksOnMemberRemovedUrl'], 'Webhooks.OnMemberRemoved.Method' => $options['webhooksOnMemberRemovedMethod'], 'Limits.ChannelMembers' => $options['limitsChannelMembers'], 'Limits.UserChannels' => $options['limitsUserChannels'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the channels */ protected function getChannels(): ChannelList { if (!$this->_channels) { $this->_channels = new ChannelList($this->version, $this->solution['sid']); } return $this->_channels; } /** * Access the roles */ protected function getRoles(): RoleList { if (!$this->_roles) { $this->_roles = new RoleList($this->version, $this->solution['sid']); } return $this->_roles; } /** * Access the users */ protected function getUsers(): UserList { if (!$this->_users) { $this->_users = new UserList($this->version, $this->solution['sid']); } return $this->_users; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[ۣ )Twilio/Rest/Chat/V1/CredentialContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Credentials/' . \rawurlencode($sid) . ''; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.CredentialContext ' . \implode(' ', $context) . ']'; } }PKt[G~~~&Twilio/Rest/Chat/V1/CredentialList.phpnu[solution = []; $this->uri = '/Credentials'; } /** * Streams CredentialInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CredentialInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CredentialInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CredentialInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CredentialPage Page of CredentialInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialPage Page of CredentialInstance */ public function getPage(string $targetUrl): CredentialPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialPage($this->version, $response, $this->solution); } /** * Create the CredentialInstance * * @param string $type The type of push-notification service the credential is * for * @param array|Options $options Optional Arguments * @return CredentialInstance Created CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'Type' => $type, 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload); } /** * Constructs a CredentialContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): CredentialContext { return new CredentialContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.CredentialList]'; } }PKt[e)*Twilio/Rest/Chat/V1/CredentialInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'sandbox' => Values::array_get($payload, 'sandbox'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialContext Context for this CredentialInstance */ protected function proxy(): CredentialContext { if (!$this->context) { $this->context = new CredentialContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { return $this->proxy()->fetch(); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { return $this->proxy()->update($options); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V1.CredentialInstance ' . \implode(' ', $context) . ']'; } }PKt[/w!!&Twilio/Rest/Chat/V1/ServiceOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid; $this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid; $this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid; $this->options['readStatusEnabled'] = $readStatusEnabled; $this->options['reachabilityEnabled'] = $reachabilityEnabled; $this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout; $this->options['consumptionReportInterval'] = $consumptionReportInterval; $this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled; $this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate; $this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled; $this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate; $this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled; $this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate; $this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled; $this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate; $this->options['preWebhookUrl'] = $preWebhookUrl; $this->options['postWebhookUrl'] = $postWebhookUrl; $this->options['webhookMethod'] = $webhookMethod; $this->options['webhookFilters'] = $webhookFilters; $this->options['webhooksOnMessageSendUrl'] = $webhooksOnMessageSendUrl; $this->options['webhooksOnMessageSendMethod'] = $webhooksOnMessageSendMethod; $this->options['webhooksOnMessageUpdateUrl'] = $webhooksOnMessageUpdateUrl; $this->options['webhooksOnMessageUpdateMethod'] = $webhooksOnMessageUpdateMethod; $this->options['webhooksOnMessageRemoveUrl'] = $webhooksOnMessageRemoveUrl; $this->options['webhooksOnMessageRemoveMethod'] = $webhooksOnMessageRemoveMethod; $this->options['webhooksOnChannelAddUrl'] = $webhooksOnChannelAddUrl; $this->options['webhooksOnChannelAddMethod'] = $webhooksOnChannelAddMethod; $this->options['webhooksOnChannelDestroyUrl'] = $webhooksOnChannelDestroyUrl; $this->options['webhooksOnChannelDestroyMethod'] = $webhooksOnChannelDestroyMethod; $this->options['webhooksOnChannelUpdateUrl'] = $webhooksOnChannelUpdateUrl; $this->options['webhooksOnChannelUpdateMethod'] = $webhooksOnChannelUpdateMethod; $this->options['webhooksOnMemberAddUrl'] = $webhooksOnMemberAddUrl; $this->options['webhooksOnMemberAddMethod'] = $webhooksOnMemberAddMethod; $this->options['webhooksOnMemberRemoveUrl'] = $webhooksOnMemberRemoveUrl; $this->options['webhooksOnMemberRemoveMethod'] = $webhooksOnMemberRemoveMethod; $this->options['webhooksOnMessageSentUrl'] = $webhooksOnMessageSentUrl; $this->options['webhooksOnMessageSentMethod'] = $webhooksOnMessageSentMethod; $this->options['webhooksOnMessageUpdatedUrl'] = $webhooksOnMessageUpdatedUrl; $this->options['webhooksOnMessageUpdatedMethod'] = $webhooksOnMessageUpdatedMethod; $this->options['webhooksOnMessageRemovedUrl'] = $webhooksOnMessageRemovedUrl; $this->options['webhooksOnMessageRemovedMethod'] = $webhooksOnMessageRemovedMethod; $this->options['webhooksOnChannelAddedUrl'] = $webhooksOnChannelAddedUrl; $this->options['webhooksOnChannelAddedMethod'] = $webhooksOnChannelAddedMethod; $this->options['webhooksOnChannelDestroyedUrl'] = $webhooksOnChannelDestroyedUrl; $this->options['webhooksOnChannelDestroyedMethod'] = $webhooksOnChannelDestroyedMethod; $this->options['webhooksOnChannelUpdatedUrl'] = $webhooksOnChannelUpdatedUrl; $this->options['webhooksOnChannelUpdatedMethod'] = $webhooksOnChannelUpdatedMethod; $this->options['webhooksOnMemberAddedUrl'] = $webhooksOnMemberAddedUrl; $this->options['webhooksOnMemberAddedMethod'] = $webhooksOnMemberAddedMethod; $this->options['webhooksOnMemberRemovedUrl'] = $webhooksOnMemberRemovedUrl; $this->options['webhooksOnMemberRemovedMethod'] = $webhooksOnMemberRemovedMethod; $this->options['limitsChannelMembers'] = $limitsChannelMembers; $this->options['limitsUserChannels'] = $limitsUserChannels; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. * * @param string $defaultServiceRoleSid The service role assigned to users when * they are added to the service * @return $this Fluent Builder */ public function setDefaultServiceRoleSid(string $defaultServiceRoleSid): self { $this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid; return $this; } /** * The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. * * @param string $defaultChannelRoleSid The channel role assigned to users when * they are added to a channel * @return $this Fluent Builder */ public function setDefaultChannelRoleSid(string $defaultChannelRoleSid): self { $this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid; return $this; } /** * The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. * * @param string $defaultChannelCreatorRoleSid The channel role assigned to a * channel creator when they join a * new channel * @return $this Fluent Builder */ public function setDefaultChannelCreatorRoleSid(string $defaultChannelCreatorRoleSid): self { $this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid; return $this; } /** * Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`. * * @param bool $readStatusEnabled Whether to enable the Message Consumption * Horizon feature * @return $this Fluent Builder */ public function setReadStatusEnabled(bool $readStatusEnabled): self { $this->options['readStatusEnabled'] = $readStatusEnabled; return $this; } /** * Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`. * * @param bool $reachabilityEnabled Whether to enable the Reachability * Indicator feature for this Service instance * @return $this Fluent Builder */ public function setReachabilityEnabled(bool $reachabilityEnabled): self { $this->options['reachabilityEnabled'] = $reachabilityEnabled; return $this; } /** * How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds. * * @param int $typingIndicatorTimeout How long in seconds to wait before * assuming the user is no longer typing * @return $this Fluent Builder */ public function setTypingIndicatorTimeout(int $typingIndicatorTimeout): self { $this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout; return $this; } /** * DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints. * * @param int $consumptionReportInterval DEPRECATED * @return $this Fluent Builder */ public function setConsumptionReportInterval(int $consumptionReportInterval): self { $this->options['consumptionReportInterval'] = $consumptionReportInterval; return $this; } /** * Whether to send a notification when a new message is added to a channel. Can be: `true` or `false` and the default is `false`. * * @param bool $notificationsNewMessageEnabled Whether to send a notification * when a new message is added to a * channel * @return $this Fluent Builder */ public function setNotificationsNewMessageEnabled(bool $notificationsNewMessageEnabled): self { $this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled; return $this; } /** * The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`. * * @param string $notificationsNewMessageTemplate The template to use to create * the notification text * displayed when a new message * is added to a channel * @return $this Fluent Builder */ public function setNotificationsNewMessageTemplate(string $notificationsNewMessageTemplate): self { $this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate; return $this; } /** * Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`. * * @param bool $notificationsAddedToChannelEnabled Whether to send a * notification when a member * is added to a channel * @return $this Fluent Builder */ public function setNotificationsAddedToChannelEnabled(bool $notificationsAddedToChannelEnabled): self { $this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled; return $this; } /** * The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. * * @param string $notificationsAddedToChannelTemplate The template to use to * create the notification * text displayed when a * member is added to a * channel * @return $this Fluent Builder */ public function setNotificationsAddedToChannelTemplate(string $notificationsAddedToChannelTemplate): self { $this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate; return $this; } /** * Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`. * * @param bool $notificationsRemovedFromChannelEnabled Whether to send a * notification to a user * when they are removed * from a channel * @return $this Fluent Builder */ public function setNotificationsRemovedFromChannelEnabled(bool $notificationsRemovedFromChannelEnabled): self { $this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled; return $this; } /** * The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. * * @param string $notificationsRemovedFromChannelTemplate The template to use * to create the * notification text * displayed to a user * when they are removed * @return $this Fluent Builder */ public function setNotificationsRemovedFromChannelTemplate(string $notificationsRemovedFromChannelTemplate): self { $this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate; return $this; } /** * Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`. * * @param bool $notificationsInvitedToChannelEnabled Whether to send a * notification when a user * is invited to a channel * @return $this Fluent Builder */ public function setNotificationsInvitedToChannelEnabled(bool $notificationsInvitedToChannelEnabled): self { $this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled; return $this; } /** * The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. * * @param string $notificationsInvitedToChannelTemplate The template to use to * create the notification * text displayed when a * user is invited to a * channel * @return $this Fluent Builder */ public function setNotificationsInvitedToChannelTemplate(string $notificationsInvitedToChannelTemplate): self { $this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate; return $this; } /** * The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details. * * @param string $preWebhookUrl The webhook URL for pre-event webhooks * @return $this Fluent Builder */ public function setPreWebhookUrl(string $preWebhookUrl): self { $this->options['preWebhookUrl'] = $preWebhookUrl; return $this; } /** * The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details. * * @param string $postWebhookUrl The URL for post-event webhooks * @return $this Fluent Builder */ public function setPostWebhookUrl(string $postWebhookUrl): self { $this->options['postWebhookUrl'] = $postWebhookUrl; return $this; } /** * The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. * * @param string $webhookMethod The HTTP method to use for both PRE and POST * webhooks * @return $this Fluent Builder */ public function setWebhookMethod(string $webhookMethod): self { $this->options['webhookMethod'] = $webhookMethod; return $this; } /** * The list of WebHook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. * * @param string[] $webhookFilters The list of WebHook events that are enabled * for this Service instance * @return $this Fluent Builder */ public function setWebhookFilters(array $webhookFilters): self { $this->options['webhookFilters'] = $webhookFilters; return $this; } /** * The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method. * * @param string $webhooksOnMessageSendUrl The URL of the webhook to call in * response to the on_message_send event * @return $this Fluent Builder */ public function setWebhooksOnMessageSendUrl(string $webhooksOnMessageSendUrl): self { $this->options['webhooksOnMessageSendUrl'] = $webhooksOnMessageSendUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_message_send.url`. * * @param string $webhooksOnMessageSendMethod The HTTP method to use when * calling the * webhooks.on_message_send.url * @return $this Fluent Builder */ public function setWebhooksOnMessageSendMethod(string $webhooksOnMessageSendMethod): self { $this->options['webhooksOnMessageSendMethod'] = $webhooksOnMessageSendMethod; return $this; } /** * The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method. * * @param string $webhooksOnMessageUpdateUrl The URL of the webhook to call in * response to the on_message_update * event * @return $this Fluent Builder */ public function setWebhooksOnMessageUpdateUrl(string $webhooksOnMessageUpdateUrl): self { $this->options['webhooksOnMessageUpdateUrl'] = $webhooksOnMessageUpdateUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_message_update.url`. * * @param string $webhooksOnMessageUpdateMethod The HTTP method to use when * calling the * webhooks.on_message_update.url * @return $this Fluent Builder */ public function setWebhooksOnMessageUpdateMethod(string $webhooksOnMessageUpdateMethod): self { $this->options['webhooksOnMessageUpdateMethod'] = $webhooksOnMessageUpdateMethod; return $this; } /** * The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method. * * @param string $webhooksOnMessageRemoveUrl The URL of the webhook to call in * response to the on_message_remove * event * @return $this Fluent Builder */ public function setWebhooksOnMessageRemoveUrl(string $webhooksOnMessageRemoveUrl): self { $this->options['webhooksOnMessageRemoveUrl'] = $webhooksOnMessageRemoveUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_message_remove.url`. * * @param string $webhooksOnMessageRemoveMethod The HTTP method to use when * calling the * webhooks.on_message_remove.url * @return $this Fluent Builder */ public function setWebhooksOnMessageRemoveMethod(string $webhooksOnMessageRemoveMethod): self { $this->options['webhooksOnMessageRemoveMethod'] = $webhooksOnMessageRemoveMethod; return $this; } /** * The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method. * * @param string $webhooksOnChannelAddUrl The URL of the webhook to call in * response to the on_channel_add event * @return $this Fluent Builder */ public function setWebhooksOnChannelAddUrl(string $webhooksOnChannelAddUrl): self { $this->options['webhooksOnChannelAddUrl'] = $webhooksOnChannelAddUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_channel_add.url`. * * @param string $webhooksOnChannelAddMethod The HTTP method to use when * calling the * webhooks.on_channel_add.url * @return $this Fluent Builder */ public function setWebhooksOnChannelAddMethod(string $webhooksOnChannelAddMethod): self { $this->options['webhooksOnChannelAddMethod'] = $webhooksOnChannelAddMethod; return $this; } /** * The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method. * * @param string $webhooksOnChannelDestroyUrl The URL of the webhook to call in * response to the * on_channel_destroy event * @return $this Fluent Builder */ public function setWebhooksOnChannelDestroyUrl(string $webhooksOnChannelDestroyUrl): self { $this->options['webhooksOnChannelDestroyUrl'] = $webhooksOnChannelDestroyUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_channel_destroy.url`. * * @param string $webhooksOnChannelDestroyMethod The HTTP method to use when * calling the * webhooks.on_channel_destroy.url * @return $this Fluent Builder */ public function setWebhooksOnChannelDestroyMethod(string $webhooksOnChannelDestroyMethod): self { $this->options['webhooksOnChannelDestroyMethod'] = $webhooksOnChannelDestroyMethod; return $this; } /** * The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method. * * @param string $webhooksOnChannelUpdateUrl The URL of the webhook to call in * response to the on_channel_update * event * @return $this Fluent Builder */ public function setWebhooksOnChannelUpdateUrl(string $webhooksOnChannelUpdateUrl): self { $this->options['webhooksOnChannelUpdateUrl'] = $webhooksOnChannelUpdateUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_channel_update.url`. * * @param string $webhooksOnChannelUpdateMethod The HTTP method to use when * calling the * webhooks.on_channel_update.url * @return $this Fluent Builder */ public function setWebhooksOnChannelUpdateMethod(string $webhooksOnChannelUpdateMethod): self { $this->options['webhooksOnChannelUpdateMethod'] = $webhooksOnChannelUpdateMethod; return $this; } /** * The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method. * * @param string $webhooksOnMemberAddUrl The URL of the webhook to call in * response to the on_member_add event * @return $this Fluent Builder */ public function setWebhooksOnMemberAddUrl(string $webhooksOnMemberAddUrl): self { $this->options['webhooksOnMemberAddUrl'] = $webhooksOnMemberAddUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_member_add.url`. * * @param string $webhooksOnMemberAddMethod The HTTP method to use when calling * the webhooks.on_member_add.url * @return $this Fluent Builder */ public function setWebhooksOnMemberAddMethod(string $webhooksOnMemberAddMethod): self { $this->options['webhooksOnMemberAddMethod'] = $webhooksOnMemberAddMethod; return $this; } /** * The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method. * * @param string $webhooksOnMemberRemoveUrl The URL of the webhook to call in * response to the on_member_remove * event * @return $this Fluent Builder */ public function setWebhooksOnMemberRemoveUrl(string $webhooksOnMemberRemoveUrl): self { $this->options['webhooksOnMemberRemoveUrl'] = $webhooksOnMemberRemoveUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_member_remove.url`. * * @param string $webhooksOnMemberRemoveMethod The HTTP method to use when * calling the * webhooks.on_member_remove.url * @return $this Fluent Builder */ public function setWebhooksOnMemberRemoveMethod(string $webhooksOnMemberRemoveMethod): self { $this->options['webhooksOnMemberRemoveMethod'] = $webhooksOnMemberRemoveMethod; return $this; } /** * The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method. * * @param string $webhooksOnMessageSentUrl The URL of the webhook to call in * response to the on_message_sent event * @return $this Fluent Builder */ public function setWebhooksOnMessageSentUrl(string $webhooksOnMessageSentUrl): self { $this->options['webhooksOnMessageSentUrl'] = $webhooksOnMessageSentUrl; return $this; } /** * The URL of the webhook to call in response to the `on_message_sent` event`. * * @param string $webhooksOnMessageSentMethod The URL of the webhook to call in * response to the on_message_sent * event * @return $this Fluent Builder */ public function setWebhooksOnMessageSentMethod(string $webhooksOnMessageSentMethod): self { $this->options['webhooksOnMessageSentMethod'] = $webhooksOnMessageSentMethod; return $this; } /** * The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method. * * @param string $webhooksOnMessageUpdatedUrl The URL of the webhook to call in * response to the * on_message_updated event * @return $this Fluent Builder */ public function setWebhooksOnMessageUpdatedUrl(string $webhooksOnMessageUpdatedUrl): self { $this->options['webhooksOnMessageUpdatedUrl'] = $webhooksOnMessageUpdatedUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_message_updated.url`. * * @param string $webhooksOnMessageUpdatedMethod The HTTP method to use when * calling the * webhooks.on_message_updated.url * @return $this Fluent Builder */ public function setWebhooksOnMessageUpdatedMethod(string $webhooksOnMessageUpdatedMethod): self { $this->options['webhooksOnMessageUpdatedMethod'] = $webhooksOnMessageUpdatedMethod; return $this; } /** * The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method. * * @param string $webhooksOnMessageRemovedUrl The URL of the webhook to call in * response to the * on_message_removed event * @return $this Fluent Builder */ public function setWebhooksOnMessageRemovedUrl(string $webhooksOnMessageRemovedUrl): self { $this->options['webhooksOnMessageRemovedUrl'] = $webhooksOnMessageRemovedUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_message_removed.url`. * * @param string $webhooksOnMessageRemovedMethod The HTTP method to use when * calling the * webhooks.on_message_removed.url * @return $this Fluent Builder */ public function setWebhooksOnMessageRemovedMethod(string $webhooksOnMessageRemovedMethod): self { $this->options['webhooksOnMessageRemovedMethod'] = $webhooksOnMessageRemovedMethod; return $this; } /** * The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method. * * @param string $webhooksOnChannelAddedUrl The URL of the webhook to call in * response to the on_channel_added * event * @return $this Fluent Builder */ public function setWebhooksOnChannelAddedUrl(string $webhooksOnChannelAddedUrl): self { $this->options['webhooksOnChannelAddedUrl'] = $webhooksOnChannelAddedUrl; return $this; } /** * The URL of the webhook to call in response to the `on_channel_added` event`. * * @param string $webhooksOnChannelAddedMethod The URL of the webhook to call * in response to the * on_channel_added event * @return $this Fluent Builder */ public function setWebhooksOnChannelAddedMethod(string $webhooksOnChannelAddedMethod): self { $this->options['webhooksOnChannelAddedMethod'] = $webhooksOnChannelAddedMethod; return $this; } /** * The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method. * * @param string $webhooksOnChannelDestroyedUrl The URL of the webhook to call * in response to the * on_channel_added event * @return $this Fluent Builder */ public function setWebhooksOnChannelDestroyedUrl(string $webhooksOnChannelDestroyedUrl): self { $this->options['webhooksOnChannelDestroyedUrl'] = $webhooksOnChannelDestroyedUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`. * * @param string $webhooksOnChannelDestroyedMethod The HTTP method to use when * calling the * webhooks.on_channel_destroyed.url * @return $this Fluent Builder */ public function setWebhooksOnChannelDestroyedMethod(string $webhooksOnChannelDestroyedMethod): self { $this->options['webhooksOnChannelDestroyedMethod'] = $webhooksOnChannelDestroyedMethod; return $this; } /** * The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method. * * @param string $webhooksOnChannelUpdatedUrl he URL of the webhook to call in * response to the * on_channel_updated event * @return $this Fluent Builder */ public function setWebhooksOnChannelUpdatedUrl(string $webhooksOnChannelUpdatedUrl): self { $this->options['webhooksOnChannelUpdatedUrl'] = $webhooksOnChannelUpdatedUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_channel_updated.url`. * * @param string $webhooksOnChannelUpdatedMethod The HTTP method to use when * calling the * webhooks.on_channel_updated.url * @return $this Fluent Builder */ public function setWebhooksOnChannelUpdatedMethod(string $webhooksOnChannelUpdatedMethod): self { $this->options['webhooksOnChannelUpdatedMethod'] = $webhooksOnChannelUpdatedMethod; return $this; } /** * The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method. * * @param string $webhooksOnMemberAddedUrl The URL of the webhook to call in * response to the on_channel_updated * event * @return $this Fluent Builder */ public function setWebhooksOnMemberAddedUrl(string $webhooksOnMemberAddedUrl): self { $this->options['webhooksOnMemberAddedUrl'] = $webhooksOnMemberAddedUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_channel_updated.url`. * * @param string $webhooksOnMemberAddedMethod he HTTP method to use when * calling the * webhooks.on_channel_updated.url * @return $this Fluent Builder */ public function setWebhooksOnMemberAddedMethod(string $webhooksOnMemberAddedMethod): self { $this->options['webhooksOnMemberAddedMethod'] = $webhooksOnMemberAddedMethod; return $this; } /** * The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method. * * @param string $webhooksOnMemberRemovedUrl The URL of the webhook to call in * response to the on_member_removed * event * @return $this Fluent Builder */ public function setWebhooksOnMemberRemovedUrl(string $webhooksOnMemberRemovedUrl): self { $this->options['webhooksOnMemberRemovedUrl'] = $webhooksOnMemberRemovedUrl; return $this; } /** * The HTTP method to use when calling the `webhooks.on_member_removed.url`. * * @param string $webhooksOnMemberRemovedMethod The HTTP method to use when * calling the * webhooks.on_member_removed.url * @return $this Fluent Builder */ public function setWebhooksOnMemberRemovedMethod(string $webhooksOnMemberRemovedMethod): self { $this->options['webhooksOnMemberRemovedMethod'] = $webhooksOnMemberRemovedMethod; return $this; } /** * The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000. * * @param int $limitsChannelMembers The maximum number of Members that can be * added to Channels within this Service * @return $this Fluent Builder */ public function setLimitsChannelMembers(int $limitsChannelMembers): self { $this->options['limitsChannelMembers'] = $limitsChannelMembers; return $this; } /** * The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000. * * @param int $limitsUserChannels The maximum number of Channels Users can be a * Member of within this Service * @return $this Fluent Builder */ public function setLimitsUserChannels(int $limitsUserChannels): self { $this->options['limitsUserChannels'] = $limitsUserChannels; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V1.UpdateServiceOptions ' . $options . ']'; } }PKt[""ss#Twilio/Rest/Chat/V1/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\Chat\V1\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1.ServicePage]'; } }PKt[Z* &Twilio/Rest/Chat/V3/ChannelOptions.phpnu[options['type'] = $type; $this->options['messagingServiceSid'] = $messagingServiceSid; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * TThe Type for this Channel to migrate to. Can only be `private`. Migration to 'public' is not allowed. * * @param string $type The Type for this Channel to migrate to. * @return $this Fluent Builder */ public function setType(string $type): self { $this->options['type'] = $type; return $this; } /** * The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this channel belongs to. * * @param string $messagingServiceSid The unique ID of the Messaging Service * this channel belongs to. * @return $this Fluent Builder */ public function setMessagingServiceSid(string $messagingServiceSid): self { $this->options['messagingServiceSid'] = $messagingServiceSid; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V3.UpdateChannelOptions ' . $options . ']'; } }PKt[/r ss#Twilio/Rest/Chat/V3/ChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ChannelInstance \Twilio\Rest\Chat\V3\ChannelInstance */ public function buildInstance(array $payload): ChannelInstance { return new ChannelInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V3.ChannelPage]'; } }PKt[}n((#Twilio/Rest/Chat/V3/ChannelList.phpnu[solution = []; } /** * Constructs a ChannelContext * * @param string $serviceSid Service Sid. * @param string $sid A string that uniquely identifies this Channel. */ public function getContext(string $serviceSid, string $sid): ChannelContext { return new ChannelContext($this->version, $serviceSid, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V3.ChannelList]'; } }PKt[ςII'Twilio/Rest/Chat/V3/ChannelInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'attributes' => Values::array_get($payload, 'attributes'), 'type' => Values::array_get($payload, 'type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), 'membersCount' => Values::array_get($payload, 'members_count'), 'messagesCount' => Values::array_get($payload, 'messages_count'), 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid ?: $this->properties['serviceSid'], 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ChannelContext Context for this ChannelInstance */ protected function proxy(): ChannelContext { if (!$this->context) { $this->context = new ChannelContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Updated ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChannelInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V3.ChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[[fLL&Twilio/Rest/Chat/V3/ChannelContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($sid) . ''; } /** * Update the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Updated ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChannelInstance { $options = new Values($options); $data = Values::of([ 'Type' => $options['type'], 'MessagingServiceSid' => $options['messagingServiceSid'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new ChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V3.ChannelContext ' . \implode(' ', $context) . ']'; } }PKt[=c  Twilio/Rest/Chat/V1.phpnu[version = 'v1'; } protected function getCredentials(): CredentialList { if (!$this->_credentials) { $this->_credentials = new CredentialList($this); } return $this->_credentials; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V1]'; } }PKt[V,݅&Twilio/Rest/Chat/V2/CredentialPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialInstance \Twilio\Rest\Chat\V2\CredentialInstance */ public function buildInstance(array $payload): CredentialInstance { return new CredentialInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.CredentialPage]'; } }PKt[zP.P.)Twilio/Rest/Chat/V2/CredentialOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * A descriptive string that you create to describe the new resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----` * * @param string $certificate [APN only] The URL encoded representation of the * certificate * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----` * * @param string $privateKey [APN only] The URL encoded representation of the * private key * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. * * @param string $apiKey [GCM only] The API key for the project that was * obtained from the Google Developer console for your * GCM Service application credential * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * * @param string $secret [FCM only] The Server key of your project from * Firebase console * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.CreateCredentialOptions ' . $options . ']'; } } class UpdateCredentialOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $certificate [APN only] The URL encoded representation of the * certificate * @param string $privateKey [APN only] The URL encoded representation of the * private key * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs * @param string $apiKey [GCM only] The API key for the project that was * obtained from the Google Developer console for your * GCM Service application credential * @param string $secret [FCM only] The Server key of your project from * Firebase console */ public function __construct(string $friendlyName = Values::NONE, string $certificate = Values::NONE, string $privateKey = Values::NONE, bool $sandbox = Values::NONE, string $apiKey = Values::NONE, string $secret = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----` * * @param string $certificate [APN only] The URL encoded representation of the * certificate * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----` * * @param string $privateKey [APN only] The URL encoded representation of the * private key * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. * * @param bool $sandbox [APN only] Whether to send the credential to sandbox * APNs * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. * * @param string $apiKey [GCM only] The API key for the project that was * obtained from the Google Developer console for your * GCM Service application credential * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. * * @param string $secret [FCM only] The Server key of your project from * Firebase console * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.UpdateCredentialOptions ' . $options . ']'; } }PKt[$;.Twilio/Rest/Chat/V2/Service/BindingContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings/' . \rawurlencode($sid) . ''; } /** * Fetch the BindingInstance * * @return BindingInstance Fetched BindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BindingInstance { $payload = $this->version->fetch('GET', $this->uri); return new BindingInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the BindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.BindingContext ' . \implode(' ', $context) . ']'; } }PKt[H,Twilio/Rest/Chat/V2/Service/UserInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'attributes' => Values::array_get($payload, 'attributes'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'roleSid' => Values::array_get($payload, 'role_sid'), 'identity' => Values::array_get($payload, 'identity'), 'isOnline' => Values::array_get($payload, 'is_online'), 'isNotifiable' => Values::array_get($payload, 'is_notifiable'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'joinedChannelsCount' => Values::array_get($payload, 'joined_channels_count'), 'links' => Values::array_get($payload, 'links'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserContext Context for this UserInstance */ protected function proxy(): UserContext { if (!$this->context) { $this->context = new UserContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { return $this->proxy()->fetch(); } /** * Delete the UserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { return $this->proxy()->update($options); } /** * Access the userChannels */ protected function getUserChannels(): UserChannelList { return $this->proxy()->userChannels; } /** * Access the userBindings */ protected function getUserBindings(): UserBindingList { return $this->proxy()->userBindings; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.UserInstance ' . \implode(' ', $context) . ']'; } }PKt[ .Twilio/Rest/Chat/V2/Service/BindingOptions.phpnu[options['bindingType'] = $bindingType; $this->options['identity'] = $identity; } /** * The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. * * @param string[] $bindingType The push technology used by the Binding * resources to read * @return $this Fluent Builder */ public function setBindingType(array $bindingType): self { $this->options['bindingType'] = $bindingType; return $this; } /** * The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. * * @param string[] $identity The `identity` value of the resources to read * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.ReadBindingOptions ' . $options . ']'; } }PKt[WD+Twilio/Rest/Chat/V2/Service/UserOptions.phpnu[options['roleSid'] = $roleSid; $this->options['attributes'] = $attributes; $this->options['friendlyName'] = $friendlyName; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User. * * @param string $roleSid The SID of the Role assigned to this user * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * A descriptive string that you create to describe the new resource. This value is often used for display purposes. * * @param string $friendlyName A string to describe the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.CreateUserOptions ' . $options . ']'; } } class UpdateUserOptions extends Options { /** * @param string $roleSid The SID id of the Role assigned to this user * @param string $attributes A valid JSON string that contains * application-specific data * @param string $friendlyName A string to describe the resource * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $roleSid = Values::NONE, string $attributes = Values::NONE, string $friendlyName = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['roleSid'] = $roleSid; $this->options['attributes'] = $attributes; $this->options['friendlyName'] = $friendlyName; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User. * * @param string $roleSid The SID id of the Role assigned to this user * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * A descriptive string that you create to describe the resource. It is often used for display purposes. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.UpdateUserOptions ' . $options . ']'; } }PKt[OAA.Twilio/Rest/Chat/V2/Service/ChannelOptions.phpnu[options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.DeleteChannelOptions ' . $options . ']'; } } class CreateChannelOptions extends Options { /** * @param string $friendlyName A string to describe the new resource * @param string $uniqueName An application-defined string that uniquely * identifies the Channel resource * @param string $attributes A valid JSON string that contains * application-specific data * @param string $type The visibility of the channel * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the * resource was created * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the * resource was updated * @param string $createdBy The identity of the User that created the Channel * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $friendlyName = Values::NONE, string $uniqueName = Values::NONE, string $attributes = Values::NONE, string $type = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $createdBy = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['attributes'] = $attributes; $this->options['type'] = $type; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['createdBy'] = $createdBy; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * A descriptive string that you create to describe the new resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the new resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. * * @param string $uniqueName An application-defined string that uniquely * identifies the Channel resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The visibility of the channel. Can be: `public` or `private` and defaults to `public`. * * @param string $type The visibility of the channel * @return $this Fluent Builder */ public function setType(string $type): self { $this->options['type'] = $type; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source. * * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the * resource was created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used in cases where a Channel is being recreated from a backup/separate source and where a Message was previously updated. * * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the * resource was updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The `identity` of the User that created the channel. Default is: `system`. * * @param string $createdBy The identity of the User that created the Channel * @return $this Fluent Builder */ public function setCreatedBy(string $createdBy): self { $this->options['createdBy'] = $createdBy; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.CreateChannelOptions ' . $options . ']'; } } class ReadChannelOptions extends Options { /** * @param string[] $type The visibility of the channel to read */ public function __construct(array $type = Values::ARRAY_NONE) { $this->options['type'] = $type; } /** * The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. * * @param string[] $type The visibility of the channel to read * @return $this Fluent Builder */ public function setType(array $type): self { $this->options['type'] = $type; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.ReadChannelOptions ' . $options . ']'; } } class UpdateChannelOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param string $attributes A valid JSON string that contains * application-specific data * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the * resource was created * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the * resource was updated * @param string $createdBy The identity of the User that created the Channel * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $friendlyName = Values::NONE, string $uniqueName = Values::NONE, string $attributes = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $createdBy = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['attributes'] = $attributes; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['createdBy'] = $createdBy; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * A descriptive string that you create to describe the resource. It can be up to 256 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source. * * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the * resource was created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. * * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the * resource was updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The `identity` of the User that created the channel. Default is: `system`. * * @param string $createdBy The identity of the User that created the Channel * @return $this Fluent Builder */ public function setCreatedBy(string $createdBy): self { $this->options['createdBy'] = $createdBy; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.UpdateChannelOptions ' . $options . ']'; } }PKt[U*3+Twilio/Rest/Chat/V2/Service/ChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ChannelInstance \Twilio\Rest\Chat\V2\Service\ChannelInstance */ public function buildInstance(array $payload): ChannelInstance { return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.ChannelPage]'; } }PKt[+Twilio/Rest/Chat/V2/Service/ChannelList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels'; } /** * Create the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Created ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ChannelInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Attributes' => $options['attributes'], 'Type' => $options['type'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'CreatedBy' => $options['createdBy'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams ChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ChannelInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ChannelInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ChannelPage Page of ChannelInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ChannelPage { $options = new Values($options); $params = Values::of([ 'Type' => Serialize::map($options['type'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ChannelPage Page of ChannelInstance */ public function getPage(string $targetUrl): ChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ChannelPage($this->version, $response, $this->solution); } /** * Constructs a ChannelContext * * @param string $sid The SID of the resource */ public function getContext(string $sid): ChannelContext { return new ChannelContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.ChannelList]'; } }PKt[,f  3Twilio/Rest/Chat/V2/Service/Channel/WebhookPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WebhookInstance \Twilio\Rest\Chat\V2\Service\Channel\WebhookInstance */ public function buildInstance(array $payload): WebhookInstance { return new WebhookInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.WebhookPage]'; } }PKt[o9J9J5Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.phpnu[options['roleSid'] = $roleSid; $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). * * @param string $roleSid The SID of the Role to assign to the member * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source. * * @param int $lastConsumedMessageIndex The index of the last Message in the * Channel the Member has read * @return $this Fluent Builder */ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self { $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; return $this; } /** * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). * * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp * string representing the datetime * of the last Message read event * for the member within the Channel * @return $this Fluent Builder */ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self { $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. * * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the * resource was created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated. * * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the * resource was updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.CreateMemberOptions ' . $options . ']'; } } class ReadMemberOptions extends Options { /** * @param string[] $identity The `identity` value of the resources to read */ public function __construct(array $identity = Values::ARRAY_NONE) { $this->options['identity'] = $identity; } /** * The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. * * @param string[] $identity The `identity` value of the resources to read * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.ReadMemberOptions ' . $options . ']'; } } class DeleteMemberOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.DeleteMemberOptions ' . $options . ']'; } } class UpdateMemberOptions extends Options { /** * @param string $roleSid The SID of the Role to assign to the member * @param int $lastConsumedMessageIndex The index of the last consumed Message * for the Channel for the Member * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp * string representing the datetime * of the last Message read event * for the Member within the Channel * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the * resource was created * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the * resource was updated * @param string $attributes A valid JSON string that contains * application-specific data * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $roleSid = Values::NONE, int $lastConsumedMessageIndex = Values::NONE, \DateTime $lastConsumptionTimestamp = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $attributes = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['roleSid'] = $roleSid; $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). * * @param string $roleSid The SID of the Role to assign to the member * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels). * * @param int $lastConsumedMessageIndex The index of the last consumed Message * for the Channel for the Member * @return $this Fluent Builder */ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self { $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; return $this; } /** * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). * * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp * string representing the datetime * of the last Message read event * for the Member within the Channel * @return $this Fluent Builder */ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self { $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. * * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the * resource was created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. * * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the * resource was updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.UpdateMemberOptions ' . $options . ']'; } }PKt[ _5Twilio/Rest/Chat/V2/Service/Channel/MemberContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members/' . \rawurlencode($sid) . ''; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { $payload = $this->version->fetch('GET', $this->uri); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the MemberInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the MemberInstance * * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MemberInstance { $options = new Values($options); $data = Values::of([ 'RoleSid' => $options['roleSid'], 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'], 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']), 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.MemberContext ' . \implode(' ', $context) . ']'; } }PKt[ c3Twilio/Rest/Chat/V2/Service/Channel/WebhookList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Webhooks'; } /** * Streams WebhookInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WebhookInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WebhookInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of WebhookInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WebhookPage Page of WebhookInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WebhookPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WebhookPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WebhookInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WebhookPage Page of WebhookInstance */ public function getPage(string $targetUrl): WebhookPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WebhookPage($this->version, $response, $this->solution); } /** * Create the WebhookInstance * * @param string $type The type of webhook * @param array|Options $options Optional Arguments * @return WebhookInstance Created WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'Type' => $type, 'Configuration.Url' => $options['configurationUrl'], 'Configuration.Method' => $options['configurationMethod'], 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }), 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }), 'Configuration.FlowSid' => $options['configurationFlowSid'], 'Configuration.RetryCount' => $options['configurationRetryCount'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WebhookInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Constructs a WebhookContext * * @param string $sid The SID of the Channel Webhook resource to fetch */ public function getContext(string $sid): WebhookContext { return new WebhookContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.WebhookList]'; } }PKt[B{|'@'@6Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.phpnu[options['from'] = $from; $this->options['attributes'] = $attributes; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['lastUpdatedBy'] = $lastUpdatedBy; $this->options['body'] = $body; $this->options['mediaSid'] = $mediaSid; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`. * * @param string $from The Identity of the new message's author * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source. * * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the * resource was created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. * * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the * resource was updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. * * @param string $lastUpdatedBy The Identity of the User who last updated the * Message * @return $this Fluent Builder */ public function setLastUpdatedBy(string $lastUpdatedBy): self { $this->options['lastUpdatedBy'] = $lastUpdatedBy; return $this; } /** * The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. * * @param string $body The message to send to the channel * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message. * * @param string $mediaSid The Media Sid to be attached to the new Message * @return $this Fluent Builder */ public function setMediaSid(string $mediaSid): self { $this->options['mediaSid'] = $mediaSid; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.CreateMessageOptions ' . $options . ']'; } } class ReadMessageOptions extends Options { /** * @param string $order The sort order of the returned messages */ public function __construct(string $order = Values::NONE) { $this->options['order'] = $order; } /** * The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default. * * @param string $order The sort order of the returned messages * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.ReadMessageOptions ' . $options . ']'; } } class DeleteMessageOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.DeleteMessageOptions ' . $options . ']'; } } class UpdateMessageOptions extends Options { /** * @param string $body The message to send to the channel * @param string $attributes A valid JSON string that contains * application-specific data * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the * resource was created * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the * resource was updated * @param string $lastUpdatedBy The Identity of the User who last updated the * Message, if applicable * @param string $from The Identity of the message's author * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $body = Values::NONE, string $attributes = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $lastUpdatedBy = Values::NONE, string $from = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['body'] = $body; $this->options['attributes'] = $attributes; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['lastUpdatedBy'] = $lastUpdatedBy; $this->options['from'] = $from; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. * * @param string $body The message to send to the channel * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * A valid JSON string that contains application-specific data. * * @param string $attributes A valid JSON string that contains * application-specific data * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source. * * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the * resource was created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. * * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the * resource was updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. * * @param string $lastUpdatedBy The Identity of the User who last updated the * Message, if applicable * @return $this Fluent Builder */ public function setLastUpdatedBy(string $lastUpdatedBy): self { $this->options['lastUpdatedBy'] = $lastUpdatedBy; return $this; } /** * The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author. * * @param string $from The Identity of the message's author * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.UpdateMessageOptions ' . $options . ']'; } }PKt[6Twilio/Rest/Chat/V2/Service/Channel/InviteInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'roleSid' => Values::array_get($payload, 'role_sid'), 'createdBy' => Values::array_get($payload, 'created_by'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InviteContext Context for this InviteInstance */ protected function proxy(): InviteContext { if (!$this->context) { $this->context = new InviteContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the InviteInstance * * @return InviteInstance Fetched InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InviteInstance { return $this->proxy()->fetch(); } /** * Delete the InviteInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.InviteInstance ' . \implode(' ', $context) . ']'; } }PKt[,  3Twilio/Rest/Chat/V2/Service/Channel/MessagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MessageInstance \Twilio\Rest\Chat\V2\Service\Channel\MessageInstance */ public function buildInstance(array $payload): MessageInstance { return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.MessagePage]'; } }PKt[~͢yy3Twilio/Rest/Chat/V2/Service/Channel/MessageList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages'; } /** * Create the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Created MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'From' => $options['from'], 'Attributes' => $options['attributes'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'LastUpdatedBy' => $options['lastUpdatedBy'], 'Body' => $options['body'], 'MediaSid' => $options['mediaSid'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams MessageInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MessageInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MessageInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MessageInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MessagePage Page of MessageInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MessagePage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MessagePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MessageInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MessagePage Page of MessageInstance */ public function getPage(string $targetUrl): MessagePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MessagePage($this->version, $response, $this->solution); } /** * Constructs a MessageContext * * @param string $sid The SID of the Message resource to fetch */ public function getContext(string $sid): MessageContext { return new MessageContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.MessageList]'; } }PKt[kWBB2Twilio/Rest/Chat/V2/Service/Channel/MemberList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members'; } /** * Create the MemberInstance * * @param string $identity The `identity` value that identifies the new * resource's User * @param array|Options $options Optional Arguments * @return MemberInstance Created MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): MemberInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $identity, 'RoleSid' => $options['roleSid'], 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'], 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']), 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams MemberInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MemberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MemberInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MemberInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MemberPage Page of MemberInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MemberPage { $options = new Values($options); $params = Values::of([ 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MemberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MemberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MemberPage Page of MemberInstance */ public function getPage(string $targetUrl): MemberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MemberPage($this->version, $response, $this->solution); } /** * Constructs a MemberContext * * @param string $sid The SID of the Member resource to fetch */ public function getContext(string $sid): MemberContext { return new MemberContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.MemberList]'; } }PKt[?6Twilio/Rest/Chat/V2/Service/Channel/MemberInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'roleSid' => Values::array_get($payload, 'role_sid'), 'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'), 'lastConsumptionTimestamp' => Deserialize::dateTime(Values::array_get($payload, 'last_consumption_timestamp')), 'url' => Values::array_get($payload, 'url'), 'attributes' => Values::array_get($payload, 'attributes'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MemberContext Context for this MemberInstance */ protected function proxy(): MemberContext { if (!$this->context) { $this->context = new MemberContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { return $this->proxy()->fetch(); } /** * Delete the MemberInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the MemberInstance * * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MemberInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.MemberInstance ' . \implode(' ', $context) . ']'; } }PKt['L2Twilio/Rest/Chat/V2/Service/Channel/MemberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MemberInstance \Twilio\Rest\Chat\V2\Service\Channel\MemberInstance */ public function buildInstance(array $payload): MemberInstance { return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.MemberPage]'; } }PKt[ 6Twilio/Rest/Chat/V2/Service/Channel/WebhookContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Webhooks/' . \rawurlencode($sid) . ''; } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { $payload = $this->version->fetch('GET', $this->uri); return new WebhookInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'Configuration.Url' => $options['configurationUrl'], 'Configuration.Method' => $options['configurationMethod'], 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }), 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }), 'Configuration.FlowSid' => $options['configurationFlowSid'], 'Configuration.RetryCount' => $options['configurationRetryCount'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WebhookInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.WebhookContext ' . \implode(' ', $context) . ']'; } }PKt[E zz6Twilio/Rest/Chat/V2/Service/Channel/MessageContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages/' . \rawurlencode($sid) . ''; } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { $payload = $this->version->fetch('GET', $this->uri); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the MessageInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'Body' => $options['body'], 'Attributes' => $options['attributes'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'LastUpdatedBy' => $options['lastUpdatedBy'], 'From' => $options['from'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.MessageContext ' . \implode(' ', $context) . ']'; } }PKt[jCr7Twilio/Rest/Chat/V2/Service/Channel/MessageInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'attributes' => Values::array_get($payload, 'attributes'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'to' => Values::array_get($payload, 'to'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'lastUpdatedBy' => Values::array_get($payload, 'last_updated_by'), 'wasEdited' => Values::array_get($payload, 'was_edited'), 'from' => Values::array_get($payload, 'from'), 'body' => Values::array_get($payload, 'body'), 'index' => Values::array_get($payload, 'index'), 'type' => Values::array_get($payload, 'type'), 'media' => Values::array_get($payload, 'media'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MessageContext Context for this MessageInstance */ protected function proxy(): MessageContext { if (!$this->context) { $this->context = new MessageContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { return $this->proxy()->fetch(); } /** * Delete the MessageInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.MessageInstance ' . \implode(' ', $context) . ']'; } }PKt[&" 5Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.phpnu[options['roleSid'] = $roleSid; } /** * The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member. * * @param string $roleSid The Role assigned to the new member * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.CreateInviteOptions ' . $options . ']'; } } class ReadInviteOptions extends Options { /** * @param string[] $identity The `identity` value of the resources to read */ public function __construct(array $identity = Values::ARRAY_NONE) { $this->options['identity'] = $identity; } /** * The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. * * @param string[] $identity The `identity` value of the resources to read * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.ReadInviteOptions ' . $options . ']'; } }PKt[<,,2Twilio/Rest/Chat/V2/Service/Channel/InviteList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites'; } /** * Create the InviteInstance * * @param string $identity The `identity` value that identifies the new * resource's User * @param array|Options $options Optional Arguments * @return InviteInstance Created InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): InviteInstance { $options = new Values($options); $data = Values::of(['Identity' => $identity, 'RoleSid' => $options['roleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams InviteInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InviteInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InviteInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of InviteInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InvitePage Page of InviteInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InvitePage { $options = new Values($options); $params = Values::of([ 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new InvitePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InviteInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InvitePage Page of InviteInstance */ public function getPage(string $targetUrl): InvitePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InvitePage($this->version, $response, $this->solution); } /** * Constructs a InviteContext * * @param string $sid The SID of the Invite resource to fetch */ public function getContext(string $sid): InviteContext { return new InviteContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.InviteList]'; } }PKt[Fmu2Twilio/Rest/Chat/V2/Service/Channel/InvitePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InviteInstance \Twilio\Rest\Chat\V2\Service\Channel\InviteInstance */ public function buildInstance(array $payload): InviteInstance { return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.InvitePage]'; } }PKt[S5Twilio/Rest/Chat/V2/Service/Channel/InviteContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites/' . \rawurlencode($sid) . ''; } /** * Fetch the InviteInstance * * @return InviteInstance Fetched InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InviteInstance { $payload = $this->version->fetch('GET', $this->uri); return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the InviteInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.InviteContext ' . \implode(' ', $context) . ']'; } }PKt[ؼaa7Twilio/Rest/Chat/V2/Service/Channel/WebhookInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'type' => Values::array_get($payload, 'type'), 'url' => Values::array_get($payload, 'url'), 'configuration' => Values::array_get($payload, 'configuration'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WebhookContext Context for this WebhookInstance */ protected function proxy(): WebhookContext { if (!$this->context) { $this->context = new WebhookContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { return $this->proxy()->fetch(); } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { return $this->proxy()->update($options); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.WebhookInstance ' . \implode(' ', $context) . ']'; } }PKt[e5D666Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.phpnu[options['configurationUrl'] = $configurationUrl; $this->options['configurationMethod'] = $configurationMethod; $this->options['configurationFilters'] = $configurationFilters; $this->options['configurationTriggers'] = $configurationTriggers; $this->options['configurationFlowSid'] = $configurationFlowSid; $this->options['configurationRetryCount'] = $configurationRetryCount; } /** * The URL of the webhook to call using the `configuration.method`. * * @param string $configurationUrl The URL of the webhook to call * @return $this Fluent Builder */ public function setConfigurationUrl(string $configurationUrl): self { $this->options['configurationUrl'] = $configurationUrl; return $this; } /** * The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`. * * @param string $configurationMethod The HTTP method used to call * `configuration.url` * @return $this Fluent Builder */ public function setConfigurationMethod(string $configurationMethod): self { $this->options['configurationMethod'] = $configurationMethod; return $this; } /** * The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). * * @param string[] $configurationFilters The events that cause us to call the * Channel Webhook * @return $this Fluent Builder */ public function setConfigurationFilters(array $configurationFilters): self { $this->options['configurationFilters'] = $configurationFilters; return $this; } /** * A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. * * @param string[] $configurationTriggers A string that will cause us to call * the webhook when it is found in a * message body * @return $this Fluent Builder */ public function setConfigurationTriggers(array $configurationTriggers): self { $this->options['configurationTriggers'] = $configurationTriggers; return $this; } /** * The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`. * * @param string $configurationFlowSid The SID of the Studio Flow to call when * an event occurs * @return $this Fluent Builder */ public function setConfigurationFlowSid(string $configurationFlowSid): self { $this->options['configurationFlowSid'] = $configurationFlowSid; return $this; } /** * The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. * * @param int $configurationRetryCount The number of times to retry the webhook * if the first attempt fails * @return $this Fluent Builder */ public function setConfigurationRetryCount(int $configurationRetryCount): self { $this->options['configurationRetryCount'] = $configurationRetryCount; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.CreateWebhookOptions ' . $options . ']'; } } class UpdateWebhookOptions extends Options { /** * @param string $configurationUrl The URL of the webhook to call * @param string $configurationMethod The HTTP method used to call * `configuration.url` * @param string[] $configurationFilters The events that cause us to call the * Channel Webhook * @param string[] $configurationTriggers A string that will cause us to call * the webhook when it is found in a * message body * @param string $configurationFlowSid The SID of the Studio Flow to call when * an event occurs * @param int $configurationRetryCount The number of times to retry the webhook * if the first attempt fails */ public function __construct(string $configurationUrl = Values::NONE, string $configurationMethod = Values::NONE, array $configurationFilters = Values::ARRAY_NONE, array $configurationTriggers = Values::ARRAY_NONE, string $configurationFlowSid = Values::NONE, int $configurationRetryCount = Values::NONE) { $this->options['configurationUrl'] = $configurationUrl; $this->options['configurationMethod'] = $configurationMethod; $this->options['configurationFilters'] = $configurationFilters; $this->options['configurationTriggers'] = $configurationTriggers; $this->options['configurationFlowSid'] = $configurationFlowSid; $this->options['configurationRetryCount'] = $configurationRetryCount; } /** * The URL of the webhook to call using the `configuration.method`. * * @param string $configurationUrl The URL of the webhook to call * @return $this Fluent Builder */ public function setConfigurationUrl(string $configurationUrl): self { $this->options['configurationUrl'] = $configurationUrl; return $this; } /** * The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`. * * @param string $configurationMethod The HTTP method used to call * `configuration.url` * @return $this Fluent Builder */ public function setConfigurationMethod(string $configurationMethod): self { $this->options['configurationMethod'] = $configurationMethod; return $this; } /** * The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). * * @param string[] $configurationFilters The events that cause us to call the * Channel Webhook * @return $this Fluent Builder */ public function setConfigurationFilters(array $configurationFilters): self { $this->options['configurationFilters'] = $configurationFilters; return $this; } /** * A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. * * @param string[] $configurationTriggers A string that will cause us to call * the webhook when it is found in a * message body * @return $this Fluent Builder */ public function setConfigurationTriggers(array $configurationTriggers): self { $this->options['configurationTriggers'] = $configurationTriggers; return $this; } /** * The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`. * * @param string $configurationFlowSid The SID of the Studio Flow to call when * an event occurs * @return $this Fluent Builder */ public function setConfigurationFlowSid(string $configurationFlowSid): self { $this->options['configurationFlowSid'] = $configurationFlowSid; return $this; } /** * The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. * * @param int $configurationRetryCount The number of times to retry the webhook * if the first attempt fails * @return $this Fluent Builder */ public function setConfigurationRetryCount(int $configurationRetryCount): self { $this->options['configurationRetryCount'] = $configurationRetryCount; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.UpdateWebhookOptions ' . $options . ']'; } }PKt[1+Twilio/Rest/Chat/V2/Service/UserContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($sid) . ''; } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the UserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'RoleSid' => $options['roleSid'], 'Attributes' => $options['attributes'], 'FriendlyName' => $options['friendlyName'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new UserInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the userChannels */ protected function getUserChannels(): UserChannelList { if (!$this->_userChannels) { $this->_userChannels = new UserChannelList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_userChannels; } /** * Access the userBindings */ protected function getUserBindings(): UserBindingList { if (!$this->_userBindings) { $this->_userBindings = new UserBindingList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_userBindings; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.UserContext ' . \implode(' ', $context) . ']'; } }PKt[0½Ţ+Twilio/Rest/Chat/V2/Service/BindingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BindingInstance \Twilio\Rest\Chat\V2\Service\BindingInstance */ public function buildInstance(array $payload): BindingInstance { return new BindingInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.BindingPage]'; } }PKt[4]4Twilio/Rest/Chat/V2/Service/User/UserChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserChannelInstance \Twilio\Rest\Chat\V2\Service\User\UserChannelInstance */ public function buildInstance(array $payload): UserChannelInstance { return new UserChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.UserChannelPage]'; } }PKt[p r4Twilio/Rest/Chat/V2/Service/User/UserBindingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserBindingInstance \Twilio\Rest\Chat\V2\Service\User\UserBindingInstance */ public function buildInstance(array $payload): UserBindingInstance { return new UserBindingInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.UserBindingPage]'; } }PKt[]D*8Twilio/Rest/Chat/V2/Service/User/UserBindingInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'endpoint' => Values::array_get($payload, 'endpoint'), 'identity' => Values::array_get($payload, 'identity'), 'userSid' => Values::array_get($payload, 'user_sid'), 'credentialSid' => Values::array_get($payload, 'credential_sid'), 'bindingType' => Values::array_get($payload, 'binding_type'), 'messageTypes' => Values::array_get($payload, 'message_types'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'userSid' => $userSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserBindingContext Context for this UserBindingInstance */ protected function proxy(): UserBindingContext { if (!$this->context) { $this->context = new UserBindingContext( $this->version, $this->solution['serviceSid'], $this->solution['userSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the UserBindingInstance * * @return UserBindingInstance Fetched UserBindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserBindingInstance { return $this->proxy()->fetch(); } /** * Delete the UserBindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.UserBindingInstance ' . \implode(' ', $context) . ']'; } }PKt[oXX7Twilio/Rest/Chat/V2/Service/User/UserChannelContext.phpnu[solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels/' . \rawurlencode($channelSid) . ''; } /** * Fetch the UserChannelInstance * * @return UserChannelInstance Fetched UserChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'], $this->solution['channelSid'] ); } /** * Delete the UserChannelInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the UserChannelInstance * * @param array|Options $options Optional Arguments * @return UserChannelInstance Updated UserChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserChannelInstance { $options = new Values($options); $data = Values::of([ 'NotificationLevel' => $options['notificationLevel'], 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'], 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new UserChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.UserChannelContext ' . \implode(' ', $context) . ']'; } }PKt[o8Twilio/Rest/Chat/V2/Service/User/UserChannelInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'userSid' => Values::array_get($payload, 'user_sid'), 'memberSid' => Values::array_get($payload, 'member_sid'), 'status' => Values::array_get($payload, 'status'), 'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'), 'unreadMessagesCount' => Values::array_get($payload, 'unread_messages_count'), 'links' => Values::array_get($payload, 'links'), 'url' => Values::array_get($payload, 'url'), 'notificationLevel' => Values::array_get($payload, 'notification_level'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'userSid' => $userSid, 'channelSid' => $channelSid ?: $this->properties['channelSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserChannelContext Context for this UserChannelInstance */ protected function proxy(): UserChannelContext { if (!$this->context) { $this->context = new UserChannelContext( $this->version, $this->solution['serviceSid'], $this->solution['userSid'], $this->solution['channelSid'] ); } return $this->context; } /** * Fetch the UserChannelInstance * * @return UserChannelInstance Fetched UserChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserChannelInstance { return $this->proxy()->fetch(); } /** * Delete the UserChannelInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the UserChannelInstance * * @param array|Options $options Optional Arguments * @return UserChannelInstance Updated UserChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserChannelInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.UserChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[0H~~4Twilio/Rest/Chat/V2/Service/User/UserChannelList.phpnu[solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels'; } /** * Streams UserChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserChannelInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserChannelInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserChannelPage Page of UserChannelInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserChannelPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserChannelPage Page of UserChannelInstance */ public function getPage(string $targetUrl): UserChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserChannelPage($this->version, $response, $this->solution); } /** * Constructs a UserChannelContext * * @param string $channelSid The SID of the Channel that has the User Channel * to fetch */ public function getContext(string $channelSid): UserChannelContext { return new UserChannelContext( $this->version, $this->solution['serviceSid'], $this->solution['userSid'], $channelSid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.UserChannelList]'; } }PKt[":7Twilio/Rest/Chat/V2/Service/User/UserBindingOptions.phpnu[options['bindingType'] = $bindingType; } /** * The push technology used by the User Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. * * @param string[] $bindingType The push technology used by the User Binding * resources to read * @return $this Fluent Builder */ public function setBindingType(array $bindingType): self { $this->options['bindingType'] = $bindingType; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.ReadUserBindingOptions ' . $options . ']'; } }PKt[mxA7Twilio/Rest/Chat/V2/Service/User/UserBindingContext.phpnu[solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Bindings/' . \rawurlencode($sid) . ''; } /** * Fetch the UserBindingInstance * * @return UserBindingInstance Fetched UserBindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserBindingInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserBindingInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'], $this->solution['sid'] ); } /** * Delete the UserBindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.UserBindingContext ' . \implode(' ', $context) . ']'; } }PKt[1ep4Twilio/Rest/Chat/V2/Service/User/UserBindingList.phpnu[solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Bindings'; } /** * Streams UserBindingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserBindingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserBindingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of UserBindingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserBindingPage Page of UserBindingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserBindingPage { $options = new Values($options); $params = Values::of([ 'BindingType' => Serialize::map($options['bindingType'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserBindingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserBindingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserBindingPage Page of UserBindingInstance */ public function getPage(string $targetUrl): UserBindingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserBindingPage($this->version, $response, $this->solution); } /** * Constructs a UserBindingContext * * @param string $sid The SID of the User Binding resource to fetch */ public function getContext(string $sid): UserBindingContext { return new UserBindingContext( $this->version, $this->solution['serviceSid'], $this->solution['userSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.UserBindingList]'; } }PKt[@mm7Twilio/Rest/Chat/V2/Service/User/UserChannelOptions.phpnu[options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.DeleteUserChannelOptions ' . $options . ']'; } } class UpdateUserChannelOptions extends Options { /** * @param string $notificationLevel The push notification level to assign to * the User Channel * @param int $lastConsumedMessageIndex The index of the last Message that the * Member has read within the Channel * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp * string that represents the * datetime of the last Message read * event for the Member within the * Channel */ public function __construct(string $notificationLevel = Values::NONE, int $lastConsumedMessageIndex = Values::NONE, \DateTime $lastConsumptionTimestamp = Values::NONE) { $this->options['notificationLevel'] = $notificationLevel; $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; } /** * The push notification level to assign to the User Channel. Can be: `default` or `muted`. * * @param string $notificationLevel The push notification level to assign to * the User Channel * @return $this Fluent Builder */ public function setNotificationLevel(string $notificationLevel): self { $this->options['notificationLevel'] = $notificationLevel; return $this; } /** * The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. * * @param int $lastConsumedMessageIndex The index of the last Message that the * Member has read within the Channel * @return $this Fluent Builder */ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self { $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; return $this; } /** * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). * * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp * string that represents the * datetime of the last Message read * event for the Member within the * Channel * @return $this Fluent Builder */ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self { $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.UpdateUserChannelOptions ' . $options . ']'; } }PKt[г/Twilio/Rest/Chat/V2/Service/ChannelInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'attributes' => Values::array_get($payload, 'attributes'), 'type' => Values::array_get($payload, 'type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), 'membersCount' => Values::array_get($payload, 'members_count'), 'messagesCount' => Values::array_get($payload, 'messages_count'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ChannelContext Context for this ChannelInstance */ protected function proxy(): ChannelContext { if (!$this->context) { $this->context = new ChannelContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ChannelInstance * * @return ChannelInstance Fetched ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChannelInstance { return $this->proxy()->fetch(); } /** * Delete the ChannelInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Updated ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChannelInstance { return $this->proxy()->update($options); } /** * Access the members */ protected function getMembers(): MemberList { return $this->proxy()->members; } /** * Access the messages */ protected function getMessages(): MessageList { return $this->proxy()->messages; } /** * Access the invites */ protected function getInvites(): InviteList { return $this->proxy()->invites; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { return $this->proxy()->webhooks; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.ChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[0yy.Twilio/Rest/Chat/V2/Service/ChannelContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($sid) . ''; } /** * Fetch the ChannelInstance * * @return ChannelInstance Fetched ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new ChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the ChannelInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Updated ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChannelInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Attributes' => $options['attributes'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'CreatedBy' => $options['createdBy'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new ChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the members */ protected function getMembers(): MemberList { if (!$this->_members) { $this->_members = new MemberList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_members; } /** * Access the messages */ protected function getMessages(): MessageList { if (!$this->_messages) { $this->_messages = new MessageList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_messages; } /** * Access the invites */ protected function getInvites(): InviteList { if (!$this->_invites) { $this->_invites = new InviteList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_invites; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { if (!$this->_webhooks) { $this->_webhooks = new WebhookList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_webhooks; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.ChannelContext ' . \implode(' ', $context) . ']'; } }PKt[ڐ(Twilio/Rest/Chat/V2/Service/UserPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserInstance \Twilio\Rest\Chat\V2\Service\UserInstance */ public function buildInstance(array $payload): UserInstance { return new UserInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.UserPage]'; } }PKt[{(Twilio/Rest/Chat/V2/Service/RolePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RoleInstance \Twilio\Rest\Chat\V2\Service\RoleInstance */ public function buildInstance(array $payload): RoleInstance { return new RoleInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.RolePage]'; } }PKt[D %%(Twilio/Rest/Chat/V2/Service/RoleList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles'; } /** * Create the RoleInstance * * @param string $friendlyName A string to describe the new resource * @param string $type The type of role * @param string[] $permission A permission the role should have * @return RoleInstance Created RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $type, array $permission): RoleInstance { $data = Values::of([ 'FriendlyName' => $friendlyName, 'Type' => $type, 'Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RoleInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams RoleInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RoleInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RoleInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of RoleInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RolePage Page of RoleInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RolePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RolePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RoleInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RolePage Page of RoleInstance */ public function getPage(string $targetUrl): RolePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RolePage($this->version, $response, $this->solution); } /** * Constructs a RoleContext * * @param string $sid The SID of the Role resource to fetch */ public function getContext(string $sid): RoleContext { return new RoleContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.RoleList]'; } }PKt[</Twilio/Rest/Chat/V2/Service/BindingInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'endpoint' => Values::array_get($payload, 'endpoint'), 'identity' => Values::array_get($payload, 'identity'), 'credentialSid' => Values::array_get($payload, 'credential_sid'), 'bindingType' => Values::array_get($payload, 'binding_type'), 'messageTypes' => Values::array_get($payload, 'message_types'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return BindingContext Context for this BindingInstance */ protected function proxy(): BindingContext { if (!$this->context) { $this->context = new BindingContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the BindingInstance * * @return BindingInstance Fetched BindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BindingInstance { return $this->proxy()->fetch(); } /** * Delete the BindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.BindingInstance ' . \implode(' ', $context) . ']'; } }PKt[o~00+Twilio/Rest/Chat/V2/Service/BindingList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings'; } /** * Streams BindingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BindingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BindingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of BindingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BindingPage Page of BindingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BindingPage { $options = new Values($options); $params = Values::of([ 'BindingType' => Serialize::map($options['bindingType'], function($e) { return $e; }), 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BindingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BindingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BindingPage Page of BindingInstance */ public function getPage(string $targetUrl): BindingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BindingPage($this->version, $response, $this->solution); } /** * Constructs a BindingContext * * @param string $sid The SID of the resource to fetch */ public function getContext(string $sid): BindingContext { return new BindingContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.BindingList]'; } }PKt[F(Twilio/Rest/Chat/V2/Service/UserList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users'; } /** * Create the UserInstance * * @param string $identity The `identity` value that identifies the new * resource's User * @param array|Options $options Optional Arguments * @return UserInstance Created UserInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $identity, 'RoleSid' => $options['roleSid'], 'Attributes' => $options['attributes'], 'FriendlyName' => $options['friendlyName'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new UserInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams UserInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserPage Page of UserInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserPage Page of UserInstance */ public function getPage(string $targetUrl): UserPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserPage($this->version, $response, $this->solution); } /** * Constructs a UserContext * * @param string $sid The SID of the User resource to fetch */ public function getContext(string $sid): UserContext { return new UserContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.UserList]'; } }PKt[J o o +Twilio/Rest/Chat/V2/Service/RoleContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles/' . \rawurlencode($sid) . ''; } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { $payload = $this->version->fetch('GET', $this->uri); return new RoleInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the RoleInstance * * @param string[] $permission A permission the role should have * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { $data = Values::of(['Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RoleInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.RoleContext ' . \implode(' ', $context) . ']'; } }PKt[j,Twilio/Rest/Chat/V2/Service/RoleInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'permissions' => Values::array_get($payload, 'permissions'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RoleContext Context for this RoleInstance */ protected function proxy(): RoleContext { if (!$this->context) { $this->context = new RoleContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { return $this->proxy()->fetch(); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the RoleInstance * * @param string[] $permission A permission the role should have * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { return $this->proxy()->update($permission); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.RoleInstance ' . \implode(' ', $context) . ']'; } }PKt[TЁQQ'Twilio/Rest/Chat/V2/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'defaultServiceRoleSid' => Values::array_get($payload, 'default_service_role_sid'), 'defaultChannelRoleSid' => Values::array_get($payload, 'default_channel_role_sid'), 'defaultChannelCreatorRoleSid' => Values::array_get($payload, 'default_channel_creator_role_sid'), 'readStatusEnabled' => Values::array_get($payload, 'read_status_enabled'), 'reachabilityEnabled' => Values::array_get($payload, 'reachability_enabled'), 'typingIndicatorTimeout' => Values::array_get($payload, 'typing_indicator_timeout'), 'consumptionReportInterval' => Values::array_get($payload, 'consumption_report_interval'), 'limits' => Values::array_get($payload, 'limits'), 'preWebhookUrl' => Values::array_get($payload, 'pre_webhook_url'), 'postWebhookUrl' => Values::array_get($payload, 'post_webhook_url'), 'webhookMethod' => Values::array_get($payload, 'webhook_method'), 'webhookFilters' => Values::array_get($payload, 'webhook_filters'), 'preWebhookRetryCount' => Values::array_get($payload, 'pre_webhook_retry_count'), 'postWebhookRetryCount' => Values::array_get($payload, 'post_webhook_retry_count'), 'notifications' => Values::array_get($payload, 'notifications'), 'media' => Values::array_get($payload, 'media'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Access the channels */ protected function getChannels(): ChannelList { return $this->proxy()->channels; } /** * Access the roles */ protected function getRoles(): RoleList { return $this->proxy()->roles; } /** * Access the users */ protected function getUsers(): UserList { return $this->proxy()->users; } /** * Access the bindings */ protected function getBindings(): BindingList { return $this->proxy()->bindings; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[\$#Twilio/Rest/Chat/V2/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Create the ServiceInstance * * @param string $friendlyName A string to describe the resource * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): ServiceInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Constructs a ServiceContext * * @param string $sid The SID of the Service resource to fetch */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.ServiceList]'; } }PKt[ G&Twilio/Rest/Chat/V2/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DefaultServiceRoleSid' => $options['defaultServiceRoleSid'], 'DefaultChannelRoleSid' => $options['defaultChannelRoleSid'], 'DefaultChannelCreatorRoleSid' => $options['defaultChannelCreatorRoleSid'], 'ReadStatusEnabled' => Serialize::booleanToString($options['readStatusEnabled']), 'ReachabilityEnabled' => Serialize::booleanToString($options['reachabilityEnabled']), 'TypingIndicatorTimeout' => $options['typingIndicatorTimeout'], 'ConsumptionReportInterval' => $options['consumptionReportInterval'], 'Notifications.NewMessage.Enabled' => Serialize::booleanToString($options['notificationsNewMessageEnabled']), 'Notifications.NewMessage.Template' => $options['notificationsNewMessageTemplate'], 'Notifications.NewMessage.Sound' => $options['notificationsNewMessageSound'], 'Notifications.NewMessage.BadgeCountEnabled' => Serialize::booleanToString($options['notificationsNewMessageBadgeCountEnabled']), 'Notifications.AddedToChannel.Enabled' => Serialize::booleanToString($options['notificationsAddedToChannelEnabled']), 'Notifications.AddedToChannel.Template' => $options['notificationsAddedToChannelTemplate'], 'Notifications.AddedToChannel.Sound' => $options['notificationsAddedToChannelSound'], 'Notifications.RemovedFromChannel.Enabled' => Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']), 'Notifications.RemovedFromChannel.Template' => $options['notificationsRemovedFromChannelTemplate'], 'Notifications.RemovedFromChannel.Sound' => $options['notificationsRemovedFromChannelSound'], 'Notifications.InvitedToChannel.Enabled' => Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']), 'Notifications.InvitedToChannel.Template' => $options['notificationsInvitedToChannelTemplate'], 'Notifications.InvitedToChannel.Sound' => $options['notificationsInvitedToChannelSound'], 'PreWebhookUrl' => $options['preWebhookUrl'], 'PostWebhookUrl' => $options['postWebhookUrl'], 'WebhookMethod' => $options['webhookMethod'], 'WebhookFilters' => Serialize::map($options['webhookFilters'], function($e) { return $e; }), 'Limits.ChannelMembers' => $options['limitsChannelMembers'], 'Limits.UserChannels' => $options['limitsUserChannels'], 'Media.CompatibilityMessage' => $options['mediaCompatibilityMessage'], 'PreWebhookRetryCount' => $options['preWebhookRetryCount'], 'PostWebhookRetryCount' => $options['postWebhookRetryCount'], 'Notifications.LogEnabled' => Serialize::booleanToString($options['notificationsLogEnabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the channels */ protected function getChannels(): ChannelList { if (!$this->_channels) { $this->_channels = new ChannelList($this->version, $this->solution['sid']); } return $this->_channels; } /** * Access the roles */ protected function getRoles(): RoleList { if (!$this->_roles) { $this->_roles = new RoleList($this->version, $this->solution['sid']); } return $this->_roles; } /** * Access the users */ protected function getUsers(): UserList { if (!$this->_users) { $this->_users = new UserList($this->version, $this->solution['sid']); } return $this->_users; } /** * Access the bindings */ protected function getBindings(): BindingList { if (!$this->_bindings) { $this->_bindings = new BindingList($this->version, $this->solution['sid']); } return $this->_bindings; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[݅ )Twilio/Rest/Chat/V2/CredentialContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Credentials/' . \rawurlencode($sid) . ''; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.CredentialContext ' . \implode(' ', $context) . ']'; } }PKt[a={{&Twilio/Rest/Chat/V2/CredentialList.phpnu[solution = []; $this->uri = '/Credentials'; } /** * Streams CredentialInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CredentialInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CredentialInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CredentialInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CredentialPage Page of CredentialInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialPage Page of CredentialInstance */ public function getPage(string $targetUrl): CredentialPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialPage($this->version, $response, $this->solution); } /** * Create the CredentialInstance * * @param string $type The type of push-notification service the credential is * for * @param array|Options $options Optional Arguments * @return CredentialInstance Created CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'Type' => $type, 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload); } /** * Constructs a CredentialContext * * @param string $sid The SID of the Credential resource to fetch */ public function getContext(string $sid): CredentialContext { return new CredentialContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.CredentialList]'; } }PKt[*Twilio/Rest/Chat/V2/CredentialInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'sandbox' => Values::array_get($payload, 'sandbox'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialContext Context for this CredentialInstance */ protected function proxy(): CredentialContext { if (!$this->context) { $this->context = new CredentialContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { return $this->proxy()->fetch(); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { return $this->proxy()->update($options); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Chat.V2.CredentialInstance ' . \implode(' ', $context) . ']'; } }PKt[!z&Twilio/Rest/Chat/V2/ServiceOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid; $this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid; $this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid; $this->options['readStatusEnabled'] = $readStatusEnabled; $this->options['reachabilityEnabled'] = $reachabilityEnabled; $this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout; $this->options['consumptionReportInterval'] = $consumptionReportInterval; $this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled; $this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate; $this->options['notificationsNewMessageSound'] = $notificationsNewMessageSound; $this->options['notificationsNewMessageBadgeCountEnabled'] = $notificationsNewMessageBadgeCountEnabled; $this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled; $this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate; $this->options['notificationsAddedToChannelSound'] = $notificationsAddedToChannelSound; $this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled; $this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate; $this->options['notificationsRemovedFromChannelSound'] = $notificationsRemovedFromChannelSound; $this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled; $this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate; $this->options['notificationsInvitedToChannelSound'] = $notificationsInvitedToChannelSound; $this->options['preWebhookUrl'] = $preWebhookUrl; $this->options['postWebhookUrl'] = $postWebhookUrl; $this->options['webhookMethod'] = $webhookMethod; $this->options['webhookFilters'] = $webhookFilters; $this->options['limitsChannelMembers'] = $limitsChannelMembers; $this->options['limitsUserChannels'] = $limitsUserChannels; $this->options['mediaCompatibilityMessage'] = $mediaCompatibilityMessage; $this->options['preWebhookRetryCount'] = $preWebhookRetryCount; $this->options['postWebhookRetryCount'] = $postWebhookRetryCount; $this->options['notificationsLogEnabled'] = $notificationsLogEnabled; } /** * A descriptive string that you create to describe the resource. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. * * @param string $defaultServiceRoleSid The service role assigned to users when * they are added to the service * @return $this Fluent Builder */ public function setDefaultServiceRoleSid(string $defaultServiceRoleSid): self { $this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid; return $this; } /** * The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. * * @param string $defaultChannelRoleSid The channel role assigned to users when * they are added to a channel * @return $this Fluent Builder */ public function setDefaultChannelRoleSid(string $defaultChannelRoleSid): self { $this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid; return $this; } /** * The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. * * @param string $defaultChannelCreatorRoleSid The channel role assigned to a * channel creator when they join a * new channel * @return $this Fluent Builder */ public function setDefaultChannelCreatorRoleSid(string $defaultChannelCreatorRoleSid): self { $this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid; return $this; } /** * Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`. * * @param bool $readStatusEnabled Whether to enable the Message Consumption * Horizon feature * @return $this Fluent Builder */ public function setReadStatusEnabled(bool $readStatusEnabled): self { $this->options['readStatusEnabled'] = $readStatusEnabled; return $this; } /** * Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`. * * @param bool $reachabilityEnabled Whether to enable the Reachability * Indicator feature for this Service instance * @return $this Fluent Builder */ public function setReachabilityEnabled(bool $reachabilityEnabled): self { $this->options['reachabilityEnabled'] = $reachabilityEnabled; return $this; } /** * How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds. * * @param int $typingIndicatorTimeout How long in seconds to wait before * assuming the user is no longer typing * @return $this Fluent Builder */ public function setTypingIndicatorTimeout(int $typingIndicatorTimeout): self { $this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout; return $this; } /** * DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints. * * @param int $consumptionReportInterval DEPRECATED * @return $this Fluent Builder */ public function setConsumptionReportInterval(int $consumptionReportInterval): self { $this->options['consumptionReportInterval'] = $consumptionReportInterval; return $this; } /** * Whether to send a notification when a new message is added to a channel. The default is `false`. * * @param bool $notificationsNewMessageEnabled Whether to send a notification * when a new message is added to a * channel * @return $this Fluent Builder */ public function setNotificationsNewMessageEnabled(bool $notificationsNewMessageEnabled): self { $this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled; return $this; } /** * The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`. * * @param string $notificationsNewMessageTemplate The template to use to create * the notification text * displayed when a new message * is added to a channel * @return $this Fluent Builder */ public function setNotificationsNewMessageTemplate(string $notificationsNewMessageTemplate): self { $this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate; return $this; } /** * The name of the sound to play when a new message is added to a channel and `notifications.new_message.enabled` is `true`. * * @param string $notificationsNewMessageSound The name of the sound to play * when a new message is added to a * channel * @return $this Fluent Builder */ public function setNotificationsNewMessageSound(string $notificationsNewMessageSound): self { $this->options['notificationsNewMessageSound'] = $notificationsNewMessageSound; return $this; } /** * Whether the new message badge is enabled. The default is `false`. * * @param bool $notificationsNewMessageBadgeCountEnabled Whether the new * message badge is * enabled * @return $this Fluent Builder */ public function setNotificationsNewMessageBadgeCountEnabled(bool $notificationsNewMessageBadgeCountEnabled): self { $this->options['notificationsNewMessageBadgeCountEnabled'] = $notificationsNewMessageBadgeCountEnabled; return $this; } /** * Whether to send a notification when a member is added to a channel. The default is `false`. * * @param bool $notificationsAddedToChannelEnabled Whether to send a * notification when a member * is added to a channel * @return $this Fluent Builder */ public function setNotificationsAddedToChannelEnabled(bool $notificationsAddedToChannelEnabled): self { $this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled; return $this; } /** * The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. * * @param string $notificationsAddedToChannelTemplate The template to use to * create the notification * text displayed when a * member is added to a * channel * @return $this Fluent Builder */ public function setNotificationsAddedToChannelTemplate(string $notificationsAddedToChannelTemplate): self { $this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate; return $this; } /** * The name of the sound to play when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. * * @param string $notificationsAddedToChannelSound The name of the sound to * play when a member is added * to a channel * @return $this Fluent Builder */ public function setNotificationsAddedToChannelSound(string $notificationsAddedToChannelSound): self { $this->options['notificationsAddedToChannelSound'] = $notificationsAddedToChannelSound; return $this; } /** * Whether to send a notification to a user when they are removed from a channel. The default is `false`. * * @param bool $notificationsRemovedFromChannelEnabled Whether to send a * notification to a user * when they are removed * from a channel * @return $this Fluent Builder */ public function setNotificationsRemovedFromChannelEnabled(bool $notificationsRemovedFromChannelEnabled): self { $this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled; return $this; } /** * The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. * * @param string $notificationsRemovedFromChannelTemplate The template to use * to create the * notification text * displayed to a user * when they are removed * @return $this Fluent Builder */ public function setNotificationsRemovedFromChannelTemplate(string $notificationsRemovedFromChannelTemplate): self { $this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate; return $this; } /** * The name of the sound to play to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. * * @param string $notificationsRemovedFromChannelSound The name of the sound to * play to a user when they * are removed from a * channel * @return $this Fluent Builder */ public function setNotificationsRemovedFromChannelSound(string $notificationsRemovedFromChannelSound): self { $this->options['notificationsRemovedFromChannelSound'] = $notificationsRemovedFromChannelSound; return $this; } /** * Whether to send a notification when a user is invited to a channel. The default is `false`. * * @param bool $notificationsInvitedToChannelEnabled Whether to send a * notification when a user * is invited to a channel * @return $this Fluent Builder */ public function setNotificationsInvitedToChannelEnabled(bool $notificationsInvitedToChannelEnabled): self { $this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled; return $this; } /** * The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. * * @param string $notificationsInvitedToChannelTemplate The template to use to * create the notification * text displayed when a * user is invited to a * channel * @return $this Fluent Builder */ public function setNotificationsInvitedToChannelTemplate(string $notificationsInvitedToChannelTemplate): self { $this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate; return $this; } /** * The name of the sound to play when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. * * @param string $notificationsInvitedToChannelSound The name of the sound to * play when a user is * invited to a channel * @return $this Fluent Builder */ public function setNotificationsInvitedToChannelSound(string $notificationsInvitedToChannelSound): self { $this->options['notificationsInvitedToChannelSound'] = $notificationsInvitedToChannelSound; return $this; } /** * The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. * * @param string $preWebhookUrl The webhook URL for pre-event webhooks * @return $this Fluent Builder */ public function setPreWebhookUrl(string $preWebhookUrl): self { $this->options['preWebhookUrl'] = $preWebhookUrl; return $this; } /** * The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. * * @param string $postWebhookUrl The URL for post-event webhooks * @return $this Fluent Builder */ public function setPostWebhookUrl(string $postWebhookUrl): self { $this->options['postWebhookUrl'] = $postWebhookUrl; return $this; } /** * The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. * * @param string $webhookMethod The HTTP method to use for both PRE and POST * webhooks * @return $this Fluent Builder */ public function setWebhookMethod(string $webhookMethod): self { $this->options['webhookMethod'] = $webhookMethod; return $this; } /** * The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. * * @param string[] $webhookFilters The list of webhook events that are enabled * for this Service instance * @return $this Fluent Builder */ public function setWebhookFilters(array $webhookFilters): self { $this->options['webhookFilters'] = $webhookFilters; return $this; } /** * The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000. * * @param int $limitsChannelMembers The maximum number of Members that can be * added to Channels within this Service * @return $this Fluent Builder */ public function setLimitsChannelMembers(int $limitsChannelMembers): self { $this->options['limitsChannelMembers'] = $limitsChannelMembers; return $this; } /** * The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000. * * @param int $limitsUserChannels The maximum number of Channels Users can be a * Member of within this Service * @return $this Fluent Builder */ public function setLimitsUserChannels(int $limitsUserChannels): self { $this->options['limitsUserChannels'] = $limitsUserChannels; return $this; } /** * The message to send when a media message has no text. Can be used as placeholder message. * * @param string $mediaCompatibilityMessage The message to send when a media * message has no text * @return $this Fluent Builder */ public function setMediaCompatibilityMessage(string $mediaCompatibilityMessage): self { $this->options['mediaCompatibilityMessage'] = $mediaCompatibilityMessage; return $this; } /** * The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried. * * @param int $preWebhookRetryCount Count of times webhook will be retried in * case of timeout or 429/503/504 HTTP * responses * @return $this Fluent Builder */ public function setPreWebhookRetryCount(int $preWebhookRetryCount): self { $this->options['preWebhookRetryCount'] = $preWebhookRetryCount; return $this; } /** * The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried. * * @param int $postWebhookRetryCount The number of times calls to the * `post_webhook_url` will be retried * @return $this Fluent Builder */ public function setPostWebhookRetryCount(int $postWebhookRetryCount): self { $this->options['postWebhookRetryCount'] = $postWebhookRetryCount; return $this; } /** * Whether to log notifications. The default is `false`. * * @param bool $notificationsLogEnabled Whether to log notifications * @return $this Fluent Builder */ public function setNotificationsLogEnabled(bool $notificationsLogEnabled): self { $this->options['notificationsLogEnabled'] = $notificationsLogEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Chat.V2.UpdateServiceOptions ' . $options . ']'; } }PKt[еss#Twilio/Rest/Chat/V2/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\Chat\V2\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2.ServicePage]'; } }PKt[P}   Twilio/Rest/Chat/V2.phpnu[version = 'v2'; } protected function getCredentials(): CredentialList { if (!$this->_credentials) { $this->_credentials = new CredentialList($this); } return $this->_credentials; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V2]'; } }PKt[ԶTwilio/Rest/Chat/V3.phpnu[version = 'v3'; } protected function getChannels(): ChannelList { if (!$this->_channels) { $this->_channels = new ChannelList($this); } return $this->_channels; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Chat.V3]'; } }PKt[7 Twilio/Rest/Autopilot.phpnu[baseUrl = 'https://autopilot.twilio.com'; } /** * @return V1 Version v1 of autopilot */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getAssistants(): \Twilio\Rest\Autopilot\V1\AssistantList { return $this->v1->assistants; } /** * @param string $sid The unique string that identifies the resource */ protected function contextAssistants(string $sid): \Twilio\Rest\Autopilot\V1\AssistantContext { return $this->v1->assistants($sid); } protected function getRestoreAssistant(): \Twilio\Rest\Autopilot\V1\RestoreAssistantList { return $this->v1->restoreAssistant; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Autopilot]'; } }PKt[*Twilio/Rest/Accounts/V1/CredentialPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialInstance \Twilio\Rest\Accounts\V1\CredentialInstance */ public function buildInstance(array $payload): CredentialInstance { return new CredentialInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.CredentialPage]'; } }PKt[}5Twilio/Rest/Accounts/V1/SecondaryAuthTokenContext.phpnu[solution = []; $this->uri = '/AuthTokens/Secondary'; } /** * Create the SecondaryAuthTokenInstance * * @return SecondaryAuthTokenInstance Created SecondaryAuthTokenInstance * @throws TwilioException When an HTTP error occurs. */ public function create(): SecondaryAuthTokenInstance { $payload = $this->version->create('POST', $this->uri); return new SecondaryAuthTokenInstance($this->version, $payload); } /** * Delete the SecondaryAuthTokenInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Accounts.V1.SecondaryAuthTokenContext ' . \implode(' ', $context) . ']'; } }PKt[vOx2Twilio/Rest/Accounts/V1/AuthTokenPromotionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AuthTokenPromotionInstance \Twilio\Rest\Accounts\V1\AuthTokenPromotionInstance */ public function buildInstance(array $payload): AuthTokenPromotionInstance { return new AuthTokenPromotionInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.AuthTokenPromotionPage]'; } }PKt[>b2Twilio/Rest/Accounts/V1/AuthTokenPromotionList.phpnu[solution = []; } /** * Constructs a AuthTokenPromotionContext */ public function getContext(): AuthTokenPromotionContext { return new AuthTokenPromotionContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.AuthTokenPromotionList]'; } }PKt[YP> > 6Twilio/Rest/Accounts/V1/SecondaryAuthTokenInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'secondaryAuthToken' => Values::array_get($payload, 'secondary_auth_token'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SecondaryAuthTokenContext Context for this SecondaryAuthTokenInstance */ protected function proxy(): SecondaryAuthTokenContext { if (!$this->context) { $this->context = new SecondaryAuthTokenContext($this->version); } return $this->context; } /** * Create the SecondaryAuthTokenInstance * * @return SecondaryAuthTokenInstance Created SecondaryAuthTokenInstance * @throws TwilioException When an HTTP error occurs. */ public function create(): SecondaryAuthTokenInstance { return $this->proxy()->create(); } /** * Delete the SecondaryAuthTokenInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Accounts.V1.SecondaryAuthTokenInstance ' . \implode(' ', $context) . ']'; } }PKt[N2Twilio/Rest/Accounts/V1/SecondaryAuthTokenList.phpnu[solution = []; } /** * Constructs a SecondaryAuthTokenContext */ public function getContext(): SecondaryAuthTokenContext { return new SecondaryAuthTokenContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.SecondaryAuthTokenList]'; } }PKt[& *Twilio/Rest/Accounts/V1/CredentialList.phpnu[solution = []; } /** * Access the publicKey */ protected function getPublicKey(): PublicKeyList { if (!$this->_publicKey) { $this->_publicKey = new PublicKeyList($this->version); } return $this->_publicKey; } /** * Access the aws */ protected function getAws(): AwsList { if (!$this->_aws) { $this->_aws = new AwsList($this->version); } return $this->_aws; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.CredentialList]'; } }PKt[solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.CredentialInstance]'; } }PKt[o  6Twilio/Rest/Accounts/V1/AuthTokenPromotionInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'authToken' => Values::array_get($payload, 'auth_token'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AuthTokenPromotionContext Context for this AuthTokenPromotionInstance */ protected function proxy(): AuthTokenPromotionContext { if (!$this->context) { $this->context = new AuthTokenPromotionContext($this->version); } return $this->context; } /** * Update the AuthTokenPromotionInstance * * @return AuthTokenPromotionInstance Updated AuthTokenPromotionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(): AuthTokenPromotionInstance { return $this->proxy()->update(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Accounts.V1.AuthTokenPromotionInstance ' . \implode(' ', $context) . ']'; } }PKt[ 9h~ ~ 7Twilio/Rest/Accounts/V1/Credential/PublicKeyContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Credentials/PublicKeys/' . \rawurlencode($sid) . ''; } /** * Fetch the PublicKeyInstance * * @return PublicKeyInstance Fetched PublicKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PublicKeyInstance { $payload = $this->version->fetch('GET', $this->uri); return new PublicKeyInstance($this->version, $payload, $this->solution['sid']); } /** * Update the PublicKeyInstance * * @param array|Options $options Optional Arguments * @return PublicKeyInstance Updated PublicKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): PublicKeyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new PublicKeyInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the PublicKeyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Accounts.V1.PublicKeyContext ' . \implode(' ', $context) . ']'; } }PKt[> 1Twilio/Rest/Accounts/V1/Credential/AwsOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['accountSid'] = $accountSid; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request. * * @param string $accountSid The Subaccount this Credential should be * associated with. * @return $this Fluent Builder */ public function setAccountSid(string $accountSid): self { $this->options['accountSid'] = $accountSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Accounts.V1.CreateAwsOptions ' . $options . ']'; } } class UpdateAwsOptions extends Options { /** * @param string $friendlyName A string to describe the resource */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Accounts.V1.UpdateAwsOptions ' . $options . ']'; } }PKt[/Dž}}.Twilio/Rest/Accounts/V1/Credential/AwsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AwsInstance \Twilio\Rest\Accounts\V1\Credential\AwsInstance */ public function buildInstance(array $payload): AwsInstance { return new AwsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.AwsPage]'; } }PKt[Ptt.Twilio/Rest/Accounts/V1/Credential/AwsList.phpnu[solution = []; $this->uri = '/Credentials/AWS'; } /** * Streams AwsInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads AwsInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return AwsInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of AwsInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return AwsPage Page of AwsInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): AwsPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new AwsPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AwsInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return AwsPage Page of AwsInstance */ public function getPage(string $targetUrl): AwsPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AwsPage($this->version, $response, $this->solution); } /** * Create the AwsInstance * * @param string $credentials A string that contains the AWS access credentials * in the format * : * @param array|Options $options Optional Arguments * @return AwsInstance Created AwsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $credentials, array $options = []): AwsInstance { $options = new Values($options); $data = Values::of([ 'Credentials' => $credentials, 'FriendlyName' => $options['friendlyName'], 'AccountSid' => $options['accountSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AwsInstance($this->version, $payload); } /** * Constructs a AwsContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): AwsContext { return new AwsContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.AwsList]'; } }PKt[j4Twilio/Rest/Accounts/V1/Credential/PublicKeyList.phpnu[solution = []; $this->uri = '/Credentials/PublicKeys'; } /** * Streams PublicKeyInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads PublicKeyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return PublicKeyInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of PublicKeyInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return PublicKeyPage Page of PublicKeyInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): PublicKeyPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new PublicKeyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of PublicKeyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return PublicKeyPage Page of PublicKeyInstance */ public function getPage(string $targetUrl): PublicKeyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new PublicKeyPage($this->version, $response, $this->solution); } /** * Create the PublicKeyInstance * * @param string $publicKey A URL encoded representation of the public key * @param array|Options $options Optional Arguments * @return PublicKeyInstance Created PublicKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $publicKey, array $options = []): PublicKeyInstance { $options = new Values($options); $data = Values::of([ 'PublicKey' => $publicKey, 'FriendlyName' => $options['friendlyName'], 'AccountSid' => $options['accountSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new PublicKeyInstance($this->version, $payload); } /** * Constructs a PublicKeyContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): PublicKeyContext { return new PublicKeyContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.PublicKeyList]'; } }PKt[ӐB2Twilio/Rest/Accounts/V1/Credential/AwsInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AwsContext Context for this AwsInstance */ protected function proxy(): AwsContext { if (!$this->context) { $this->context = new AwsContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the AwsInstance * * @return AwsInstance Fetched AwsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AwsInstance { return $this->proxy()->fetch(); } /** * Update the AwsInstance * * @param array|Options $options Optional Arguments * @return AwsInstance Updated AwsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AwsInstance { return $this->proxy()->update($options); } /** * Delete the AwsInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Accounts.V1.AwsInstance ' . \implode(' ', $context) . ']'; } }PKt["# # 1Twilio/Rest/Accounts/V1/Credential/AwsContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Credentials/AWS/' . \rawurlencode($sid) . ''; } /** * Fetch the AwsInstance * * @return AwsInstance Fetched AwsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AwsInstance { $payload = $this->version->fetch('GET', $this->uri); return new AwsInstance($this->version, $payload, $this->solution['sid']); } /** * Update the AwsInstance * * @param array|Options $options Optional Arguments * @return AwsInstance Updated AwsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): AwsInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new AwsInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the AwsInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Accounts.V1.AwsContext ' . \implode(' ', $context) . ']'; } }PKt[&228Twilio/Rest/Accounts/V1/Credential/PublicKeyInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PublicKeyContext Context for this PublicKeyInstance */ protected function proxy(): PublicKeyContext { if (!$this->context) { $this->context = new PublicKeyContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the PublicKeyInstance * * @return PublicKeyInstance Fetched PublicKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PublicKeyInstance { return $this->proxy()->fetch(); } /** * Update the PublicKeyInstance * * @param array|Options $options Optional Arguments * @return PublicKeyInstance Updated PublicKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): PublicKeyInstance { return $this->proxy()->update($options); } /** * Delete the PublicKeyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Accounts.V1.PublicKeyInstance ' . \implode(' ', $context) . ']'; } }PKt[Us::7Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['accountSid'] = $accountSid; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request * * @param string $accountSid The Subaccount this Credential should be * associated with. * @return $this Fluent Builder */ public function setAccountSid(string $accountSid): self { $this->options['accountSid'] = $accountSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Accounts.V1.CreatePublicKeyOptions ' . $options . ']'; } } class UpdatePublicKeyOptions extends Options { /** * @param string $friendlyName A string to describe the resource */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It can be up to 64 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Accounts.V1.UpdatePublicKeyOptions ' . $options . ']'; } }PKt[j*4Twilio/Rest/Accounts/V1/Credential/PublicKeyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PublicKeyInstance \Twilio\Rest\Accounts\V1\Credential\PublicKeyInstance */ public function buildInstance(array $payload): PublicKeyInstance { return new PublicKeyInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.PublicKeyPage]'; } }PKt[ 5Twilio/Rest/Accounts/V1/AuthTokenPromotionContext.phpnu[solution = []; $this->uri = '/AuthTokens/Promote'; } /** * Update the AuthTokenPromotionInstance * * @return AuthTokenPromotionInstance Updated AuthTokenPromotionInstance * @throws TwilioException When an HTTP error occurs. */ public function update(): AuthTokenPromotionInstance { $payload = $this->version->update('POST', $this->uri); return new AuthTokenPromotionInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Accounts.V1.AuthTokenPromotionContext ' . \implode(' ', $context) . ']'; } }PKt[9k2Twilio/Rest/Accounts/V1/SecondaryAuthTokenPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SecondaryAuthTokenInstance \Twilio\Rest\Accounts\V1\SecondaryAuthTokenInstance */ public function buildInstance(array $payload): SecondaryAuthTokenInstance { return new SecondaryAuthTokenInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1.SecondaryAuthTokenPage]'; } }PKt[o7< Twilio/Rest/Accounts/V1.phpnu[version = 'v1'; } protected function getAuthTokenPromotion(): AuthTokenPromotionList { if (!$this->_authTokenPromotion) { $this->_authTokenPromotion = new AuthTokenPromotionList($this); } return $this->_authTokenPromotion; } protected function getCredentials(): CredentialList { if (!$this->_credentials) { $this->_credentials = new CredentialList($this); } return $this->_credentials; } protected function getSecondaryAuthToken(): SecondaryAuthTokenList { if (!$this->_secondaryAuthToken) { $this->_secondaryAuthToken = new SecondaryAuthTokenList($this); } return $this->_secondaryAuthToken; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Accounts.V1]'; } }PKt[<NNTwilio/Rest/Media.phpnu[baseUrl = 'https://media.twilio.com'; } /** * @return V1 Version v1 of media */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getMediaProcessor(): \Twilio\Rest\Media\V1\MediaProcessorList { return $this->v1->mediaProcessor; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextMediaProcessor(string $sid): \Twilio\Rest\Media\V1\MediaProcessorContext { return $this->v1->mediaProcessor($sid); } protected function getMediaRecording(): \Twilio\Rest\Media\V1\MediaRecordingList { return $this->v1->mediaRecording; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextMediaRecording(string $sid): \Twilio\Rest\Media\V1\MediaRecordingContext { return $this->v1->mediaRecording($sid); } protected function getPlayerStreamer(): \Twilio\Rest\Media\V1\PlayerStreamerList { return $this->v1->playerStreamer; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextPlayerStreamer(string $sid): \Twilio\Rest\Media\V1\PlayerStreamerContext { return $this->v1->playerStreamer($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Media]'; } }PKt[Oh,Twilio/Rest/Voice/V1/SourceIpMappingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SourceIpMappingInstance \Twilio\Rest\Voice\V1\SourceIpMappingInstance */ public function buildInstance(array $payload): SourceIpMappingInstance { return new SourceIpMappingInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.SourceIpMappingPage]'; } }PKt[ E E 0Twilio/Rest/Voice/V1/ConnectionPolicyOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Voice.V1.CreateConnectionPolicyOptions ' . $options . ']'; } } class UpdateConnectionPolicyOptions extends Options { /** * @param string $friendlyName A string to describe the resource */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Voice.V1.UpdateConnectionPolicyOptions ' . $options . ']'; } }PKt[8 /Twilio/Rest/Voice/V1/DialingPermissionsList.phpnu[solution = []; } /** * Access the countries */ protected function getCountries(): CountryList { if (!$this->_countries) { $this->_countries = new CountryList($this->version); } return $this->_countries; } /** * Access the settings */ protected function getSettings(): SettingsList { if (!$this->_settings) { $this->_settings = new SettingsList($this->version); } return $this->_settings; } /** * Access the bulkCountryUpdates */ protected function getBulkCountryUpdates(): BulkCountryUpdateList { if (!$this->_bulkCountryUpdates) { $this->_bulkCountryUpdates = new BulkCountryUpdateList($this->version); } return $this->_bulkCountryUpdates; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name) { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.DialingPermissionsList]'; } }PKt[ܐ0Twilio/Rest/Voice/V1/SourceIpMappingInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'ipRecordSid' => Values::array_get($payload, 'ip_record_sid'), 'sipDomainSid' => Values::array_get($payload, 'sip_domain_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SourceIpMappingContext Context for this SourceIpMappingInstance */ protected function proxy(): SourceIpMappingContext { if (!$this->context) { $this->context = new SourceIpMappingContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SourceIpMappingInstance * * @return SourceIpMappingInstance Fetched SourceIpMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SourceIpMappingInstance { return $this->proxy()->fetch(); } /** * Update the SourceIpMappingInstance * * @param string $sipDomainSid The unique string that identifies a SIP Domain * @return SourceIpMappingInstance Updated SourceIpMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $sipDomainSid): SourceIpMappingInstance { return $this->proxy()->update($sipDomainSid); } /** * Delete the SourceIpMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.SourceIpMappingInstance ' . \implode(' ', $context) . ']'; } }PKt[Rkk0Twilio/Rest/Voice/V1/ConnectionPolicyContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/ConnectionPolicies/' . \rawurlencode($sid) . ''; } /** * Fetch the ConnectionPolicyInstance * * @return ConnectionPolicyInstance Fetched ConnectionPolicyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConnectionPolicyInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConnectionPolicyInstance($this->version, $payload, $this->solution['sid']); } /** * Update the ConnectionPolicyInstance * * @param array|Options $options Optional Arguments * @return ConnectionPolicyInstance Updated ConnectionPolicyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConnectionPolicyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ConnectionPolicyInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ConnectionPolicyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the targets */ protected function getTargets(): ConnectionPolicyTargetList { if (!$this->_targets) { $this->_targets = new ConnectionPolicyTargetList($this->version, $this->solution['sid']); } return $this->_targets; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.ConnectionPolicyContext ' . \implode(' ', $context) . ']'; } }PKt[!3Twilio/Rest/Voice/V1/DialingPermissionsInstance.phpnu[solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.DialingPermissionsInstance]'; } }PKt[`1. -Twilio/Rest/Voice/V1/ArchivedCallInstance.phpnu[properties = [ 'date' => Deserialize::dateTime(Values::array_get($payload, 'date')), 'sid' => Values::array_get($payload, 'sid'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'date' => $date ?: $this->properties['date'], 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ArchivedCallContext Context for this ArchivedCallInstance */ protected function proxy(): ArchivedCallContext { if (!$this->context) { $this->context = new ArchivedCallContext( $this->version, $this->solution['date'], $this->solution['sid'] ); } return $this->context; } /** * Delete the ArchivedCallInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.ArchivedCallInstance ' . \implode(' ', $context) . ']'; } }PKt[g1Twilio/Rest/Voice/V1/ConnectionPolicyInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConnectionPolicyContext Context for this ConnectionPolicyInstance */ protected function proxy(): ConnectionPolicyContext { if (!$this->context) { $this->context = new ConnectionPolicyContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ConnectionPolicyInstance * * @return ConnectionPolicyInstance Fetched ConnectionPolicyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConnectionPolicyInstance { return $this->proxy()->fetch(); } /** * Update the ConnectionPolicyInstance * * @param array|Options $options Optional Arguments * @return ConnectionPolicyInstance Updated ConnectionPolicyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConnectionPolicyInstance { return $this->proxy()->update($options); } /** * Delete the ConnectionPolicyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the targets */ protected function getTargets(): ConnectionPolicyTargetList { return $this->proxy()->targets; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.ConnectionPolicyInstance ' . \implode(' ', $context) . ']'; } }PKt[[ژl)Twilio/Rest/Voice/V1/ArchivedCallList.phpnu[solution = []; } /** * Constructs a ArchivedCallContext * * @param \DateTime $date The date of the Call in UTC. * @param string $sid The unique string that identifies this resource */ public function getContext(\DateTime $date, string $sid): ArchivedCallContext { return new ArchivedCallContext($this->version, $date, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.ArchivedCallList]'; } }PKt[k+vR R (Twilio/Rest/Voice/V1/IpRecordContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/IpRecords/' . \rawurlencode($sid) . ''; } /** * Fetch the IpRecordInstance * * @return IpRecordInstance Fetched IpRecordInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpRecordInstance { $payload = $this->version->fetch('GET', $this->uri); return new IpRecordInstance($this->version, $payload, $this->solution['sid']); } /** * Update the IpRecordInstance * * @param array|Options $options Optional Arguments * @return IpRecordInstance Updated IpRecordInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): IpRecordInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new IpRecordInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the IpRecordInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.IpRecordContext ' . \implode(' ', $context) . ']'; } }PKt[#nb!CC-Twilio/Rest/Voice/V1/ConnectionPolicyList.phpnu[solution = []; $this->uri = '/ConnectionPolicies'; } /** * Create the ConnectionPolicyInstance * * @param array|Options $options Optional Arguments * @return ConnectionPolicyInstance Created ConnectionPolicyInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ConnectionPolicyInstance { $options = new Values($options); $data = Values::of(['FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ConnectionPolicyInstance($this->version, $payload); } /** * Streams ConnectionPolicyInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ConnectionPolicyInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ConnectionPolicyInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ConnectionPolicyInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ConnectionPolicyPage Page of ConnectionPolicyInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ConnectionPolicyPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ConnectionPolicyPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ConnectionPolicyInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ConnectionPolicyPage Page of ConnectionPolicyInstance */ public function getPage(string $targetUrl): ConnectionPolicyPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ConnectionPolicyPage($this->version, $response, $this->solution); } /** * Constructs a ConnectionPolicyContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ConnectionPolicyContext { return new ConnectionPolicyContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.ConnectionPolicyList]'; } }PKt[(*/Twilio/Rest/Voice/V1/DialingPermissionsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DialingPermissionsInstance \Twilio\Rest\Voice\V1\DialingPermissionsInstance */ public function buildInstance(array $payload): DialingPermissionsInstance { return new DialingPermissionsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.DialingPermissionsPage]'; } }PKt[ A^^%Twilio/Rest/Voice/V1/IpRecordList.phpnu[solution = []; $this->uri = '/IpRecords'; } /** * Create the IpRecordInstance * * @param string $ipAddress An IP address in dotted decimal notation, IPv4 only. * @param array|Options $options Optional Arguments * @return IpRecordInstance Created IpRecordInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $ipAddress, array $options = []): IpRecordInstance { $options = new Values($options); $data = Values::of([ 'IpAddress' => $ipAddress, 'FriendlyName' => $options['friendlyName'], 'CidrPrefixLength' => $options['cidrPrefixLength'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IpRecordInstance($this->version, $payload); } /** * Streams IpRecordInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads IpRecordInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return IpRecordInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of IpRecordInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return IpRecordPage Page of IpRecordInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IpRecordPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IpRecordPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IpRecordInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IpRecordPage Page of IpRecordInstance */ public function getPage(string $targetUrl): IpRecordPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IpRecordPage($this->version, $response, $this->solution); } /** * Constructs a IpRecordContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): IpRecordContext { return new IpRecordContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.IpRecordList]'; } }PKt[.dd*Twilio/Rest/Voice/V1/ByocTrunkInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'statusCallbackUrl' => Values::array_get($payload, 'status_callback_url'), 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'), 'cnamLookupEnabled' => Values::array_get($payload, 'cnam_lookup_enabled'), 'connectionPolicySid' => Values::array_get($payload, 'connection_policy_sid'), 'fromDomainSid' => Values::array_get($payload, 'from_domain_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ByocTrunkContext Context for this ByocTrunkInstance */ protected function proxy(): ByocTrunkContext { if (!$this->context) { $this->context = new ByocTrunkContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ByocTrunkInstance * * @return ByocTrunkInstance Fetched ByocTrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ByocTrunkInstance { return $this->proxy()->fetch(); } /** * Update the ByocTrunkInstance * * @param array|Options $options Optional Arguments * @return ByocTrunkInstance Updated ByocTrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ByocTrunkInstance { return $this->proxy()->update($options); } /** * Delete the ByocTrunkInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.ByocTrunkInstance ' . \implode(' ', $context) . ']'; } }PKt[*=K=K)Twilio/Rest/Voice/V1/ByocTrunkOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['voiceUrl'] = $voiceUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['statusCallbackUrl'] = $statusCallbackUrl; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['cnamLookupEnabled'] = $cnamLookupEnabled; $this->options['connectionPolicySid'] = $connectionPolicySid; $this->options['fromDomainSid'] = $fromDomainSid; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The URL we should call when the BYOC Trunk receives a call. * * @param string $voiceUrl The URL we should call when receiving a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. * * @param string $voiceMethod The HTTP method to use with voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. * * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. * * @param string $voiceFallbackMethod The HTTP method to use with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call to pass status parameters (such as call ended) to your application. * * @param string $statusCallbackUrl The URL that we should call to pass status * updates * @return $this Fluent Builder */ public function setStatusCallbackUrl(string $statusCallbackUrl): self { $this->options['statusCallbackUrl'] = $statusCallbackUrl; return $this; } /** * The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * `status_callback_url` * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. * * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup is * enabled for the trunk * @return $this Fluent Builder */ public function setCnamLookupEnabled(bool $cnamLookupEnabled): self { $this->options['cnamLookupEnabled'] = $cnamLookupEnabled; return $this; } /** * The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. * * @param string $connectionPolicySid Origination Connection Policy (to your * Carrier) * @return $this Fluent Builder */ public function setConnectionPolicySid(string $connectionPolicySid): self { $this->options['connectionPolicySid'] = $connectionPolicySid; return $this; } /** * The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to "call back" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to "sip.twilio.com". * * @param string $fromDomainSid The SID of the SIP Domain that should be used * in the `From` header of originating calls * @return $this Fluent Builder */ public function setFromDomainSid(string $fromDomainSid): self { $this->options['fromDomainSid'] = $fromDomainSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Voice.V1.CreateByocTrunkOptions ' . $options . ']'; } } class UpdateByocTrunkOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $voiceUrl The URL we should call when receiving a call * @param string $voiceMethod The HTTP method we should use with voice_url * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @param string $statusCallbackUrl The URL that we should call to pass status * updates * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback_url * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup is * enabled for the trunk * @param string $connectionPolicySid Origination Connection Policy (to your * Carrier) * @param string $fromDomainSid The SID of the SIP Domain that should be used * in the `From` header of originating calls */ public function __construct(string $friendlyName = Values::NONE, string $voiceUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $statusCallbackUrl = Values::NONE, string $statusCallbackMethod = Values::NONE, bool $cnamLookupEnabled = Values::NONE, string $connectionPolicySid = Values::NONE, string $fromDomainSid = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['voiceUrl'] = $voiceUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['statusCallbackUrl'] = $statusCallbackUrl; $this->options['statusCallbackMethod'] = $statusCallbackMethod; $this->options['cnamLookupEnabled'] = $cnamLookupEnabled; $this->options['connectionPolicySid'] = $connectionPolicySid; $this->options['fromDomainSid'] = $fromDomainSid; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The URL we should call when the BYOC Trunk receives a call. * * @param string $voiceUrl The URL we should call when receiving a call * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * The HTTP method we should use to call `voice_url` * * @param string $voiceMethod The HTTP method we should use with voice_url * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. * * @param string $voiceFallbackUrl The URL we should call when an error occurs * in executing TwiML * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. * * @param string $voiceFallbackMethod The HTTP method used with * voice_fallback_url * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * The URL that we should call to pass status parameters (such as call ended) to your application. * * @param string $statusCallbackUrl The URL that we should call to pass status * updates * @return $this Fluent Builder */ public function setStatusCallbackUrl(string $statusCallbackUrl): self { $this->options['statusCallbackUrl'] = $statusCallbackUrl; return $this; } /** * The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. * * @param string $statusCallbackMethod The HTTP method we should use to call * status_callback_url * @return $this Fluent Builder */ public function setStatusCallbackMethod(string $statusCallbackMethod): self { $this->options['statusCallbackMethod'] = $statusCallbackMethod; return $this; } /** * Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. * * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup is * enabled for the trunk * @return $this Fluent Builder */ public function setCnamLookupEnabled(bool $cnamLookupEnabled): self { $this->options['cnamLookupEnabled'] = $cnamLookupEnabled; return $this; } /** * The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. * * @param string $connectionPolicySid Origination Connection Policy (to your * Carrier) * @return $this Fluent Builder */ public function setConnectionPolicySid(string $connectionPolicySid): self { $this->options['connectionPolicySid'] = $connectionPolicySid; return $this; } /** * The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to "call back" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to "sip.twilio.com". * * @param string $fromDomainSid The SID of the SIP Domain that should be used * in the `From` header of originating calls * @return $this Fluent Builder */ public function setFromDomainSid(string $fromDomainSid): self { $this->options['fromDomainSid'] = $fromDomainSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Voice.V1.UpdateByocTrunkOptions ' . $options . ']'; } }PKt[oY  ;Twilio/Rest/Voice/V1/DialingPermissions/CountryInstance.phpnu[properties = [ 'isoCode' => Values::array_get($payload, 'iso_code'), 'name' => Values::array_get($payload, 'name'), 'continent' => Values::array_get($payload, 'continent'), 'countryCodes' => Values::array_get($payload, 'country_codes'), 'lowRiskNumbersEnabled' => Values::array_get($payload, 'low_risk_numbers_enabled'), 'highRiskSpecialNumbersEnabled' => Values::array_get($payload, 'high_risk_special_numbers_enabled'), 'highRiskTollfraudNumbersEnabled' => Values::array_get($payload, 'high_risk_tollfraud_numbers_enabled'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['isoCode' => $isoCode ?: $this->properties['isoCode'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CountryContext Context for this CountryInstance */ protected function proxy(): CountryContext { if (!$this->context) { $this->context = new CountryContext($this->version, $this->solution['isoCode']); } return $this->context; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { return $this->proxy()->fetch(); } /** * Access the highriskSpecialPrefixes */ protected function getHighriskSpecialPrefixes(): HighriskSpecialPrefixList { return $this->proxy()->highriskSpecialPrefixes; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.CountryInstance ' . \implode(' ', $context) . ']'; } }PKt[9ތpgg7Twilio/Rest/Voice/V1/DialingPermissions/CountryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CountryInstance \Twilio\Rest\Voice\V1\DialingPermissions\CountryInstance */ public function buildInstance(array $payload): CountryInstance { return new CountryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.CountryPage]'; } }PKt[cի;Twilio/Rest/Voice/V1/DialingPermissions/SettingsContext.phpnu[solution = []; $this->uri = '/Settings'; } /** * Fetch the SettingsInstance * * @return SettingsInstance Fetched SettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SettingsInstance { $payload = $this->version->fetch('GET', $this->uri); return new SettingsInstance($this->version, $payload); } /** * Update the SettingsInstance * * @param array|Options $options Optional Arguments * @return SettingsInstance Updated SettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SettingsInstance { $options = new Values($options); $data = Values::of([ 'DialingPermissionsInheritance' => Serialize::booleanToString($options['dialingPermissionsInheritance']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SettingsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.SettingsContext ' . \implode(' ', $context) . ']'; } }PKt[\!ATwilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateList.phpnu[solution = []; $this->uri = '/DialingPermissions/BulkCountryUpdates'; } /** * Create the BulkCountryUpdateInstance * * @param string $updateRequest URL encoded JSON array of update objects * @return BulkCountryUpdateInstance Created BulkCountryUpdateInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $updateRequest): BulkCountryUpdateInstance { $data = Values::of(['UpdateRequest' => $updateRequest, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new BulkCountryUpdateInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.BulkCountryUpdateList]'; } }PKt[rETwilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateInstance.phpnu[properties = [ 'updateCount' => Values::array_get($payload, 'update_count'), 'updateRequest' => Values::array_get($payload, 'update_request'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.BulkCountryUpdateInstance]'; } }PKt[ :Twilio/Rest/Voice/V1/DialingPermissions/CountryContext.phpnu[solution = ['isoCode' => $isoCode, ]; $this->uri = '/DialingPermissions/Countries/' . \rawurlencode($isoCode) . ''; } /** * Fetch the CountryInstance * * @return CountryInstance Fetched CountryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CountryInstance { $payload = $this->version->fetch('GET', $this->uri); return new CountryInstance($this->version, $payload, $this->solution['isoCode']); } /** * Access the highriskSpecialPrefixes */ protected function getHighriskSpecialPrefixes(): HighriskSpecialPrefixList { if (!$this->_highriskSpecialPrefixes) { $this->_highriskSpecialPrefixes = new HighriskSpecialPrefixList( $this->version, $this->solution['isoCode'] ); } return $this->_highriskSpecialPrefixes; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.CountryContext ' . \implode(' ', $context) . ']'; } }PKt[X :Twilio/Rest/Voice/V1/DialingPermissions/CountryOptions.phpnu[options['isoCode'] = $isoCode; $this->options['continent'] = $continent; $this->options['countryCode'] = $countryCode; $this->options['lowRiskNumbersEnabled'] = $lowRiskNumbersEnabled; $this->options['highRiskSpecialNumbersEnabled'] = $highRiskSpecialNumbersEnabled; $this->options['highRiskTollfraudNumbersEnabled'] = $highRiskTollfraudNumbersEnabled; } /** * Filter to retrieve the country permissions by specifying the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) * * @param string $isoCode Filter to retrieve the country permissions by * specifying the ISO country code * @return $this Fluent Builder */ public function setIsoCode(string $isoCode): self { $this->options['isoCode'] = $isoCode; return $this; } /** * Filter to retrieve the country permissions by specifying the continent * * @param string $continent Filter to retrieve the country permissions by * specifying the continent * @return $this Fluent Builder */ public function setContinent(string $continent): self { $this->options['continent'] = $continent; return $this; } /** * Filter the results by specified [country codes](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html) * * @param string $countryCode Country code filter * @return $this Fluent Builder */ public function setCountryCode(string $countryCode): self { $this->options['countryCode'] = $countryCode; return $this; } /** * Filter to retrieve the country permissions with dialing to low-risk numbers enabled. Can be: `true` or `false`. * * @param bool $lowRiskNumbersEnabled Filter to retrieve the country * permissions with dialing to low-risk * numbers enabled * @return $this Fluent Builder */ public function setLowRiskNumbersEnabled(bool $lowRiskNumbersEnabled): self { $this->options['lowRiskNumbersEnabled'] = $lowRiskNumbersEnabled; return $this; } /** * Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false` * * @param bool $highRiskSpecialNumbersEnabled Filter to retrieve the country * permissions with dialing to * high-risk special service numbers * enabled * @return $this Fluent Builder */ public function setHighRiskSpecialNumbersEnabled(bool $highRiskSpecialNumbersEnabled): self { $this->options['highRiskSpecialNumbersEnabled'] = $highRiskSpecialNumbersEnabled; return $this; } /** * Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled. Can be: `true` or `false`. * * @param bool $highRiskTollfraudNumbersEnabled Filter to retrieve the country * permissions with dialing to * high-risk toll fraud numbers * enabled * @return $this Fluent Builder */ public function setHighRiskTollfraudNumbersEnabled(bool $highRiskTollfraudNumbersEnabled): self { $this->options['highRiskTollfraudNumbersEnabled'] = $highRiskTollfraudNumbersEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Voice.V1.ReadCountryOptions ' . $options . ']'; } }PKt[FF7Twilio/Rest/Voice/V1/DialingPermissions/CountryList.phpnu[solution = []; $this->uri = '/DialingPermissions/Countries'; } /** * Streams CountryInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CountryInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CountryInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CountryInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CountryPage Page of CountryInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CountryPage { $options = new Values($options); $params = Values::of([ 'IsoCode' => $options['isoCode'], 'Continent' => $options['continent'], 'CountryCode' => $options['countryCode'], 'LowRiskNumbersEnabled' => Serialize::booleanToString($options['lowRiskNumbersEnabled']), 'HighRiskSpecialNumbersEnabled' => Serialize::booleanToString($options['highRiskSpecialNumbersEnabled']), 'HighRiskTollfraudNumbersEnabled' => Serialize::booleanToString($options['highRiskTollfraudNumbersEnabled']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CountryPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CountryInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CountryPage Page of CountryInstance */ public function getPage(string $targetUrl): CountryPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CountryPage($this->version, $response, $this->solution); } /** * Constructs a CountryContext * * @param string $isoCode The ISO country code */ public function getContext(string $isoCode): CountryContext { return new CountryContext($this->version, $isoCode); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.CountryList]'; } }PKt[ ҭ  ;Twilio/Rest/Voice/V1/DialingPermissions/SettingsOptions.phpnu[options['dialingPermissionsInheritance'] = $dialingPermissionsInheritance; } /** * `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`. * * @param bool $dialingPermissionsInheritance `true` for the sub-account to * inherit voice dialing permissions * from the Master Project; * otherwise `false` * @return $this Fluent Builder */ public function setDialingPermissionsInheritance(bool $dialingPermissionsInheritance): self { $this->options['dialingPermissionsInheritance'] = $dialingPermissionsInheritance; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Voice.V1.UpdateSettingsOptions ' . $options . ']'; } }PKt[3Fmm8Twilio/Rest/Voice/V1/DialingPermissions/SettingsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SettingsInstance \Twilio\Rest\Voice\V1\DialingPermissions\SettingsInstance */ public function buildInstance(array $payload): SettingsInstance { return new SettingsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.SettingsPage]'; } }PKt[ Y\ <Twilio/Rest/Voice/V1/DialingPermissions/SettingsInstance.phpnu[properties = [ 'dialingPermissionsInheritance' => Values::array_get($payload, 'dialing_permissions_inheritance'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SettingsContext Context for this SettingsInstance */ protected function proxy(): SettingsContext { if (!$this->context) { $this->context = new SettingsContext($this->version); } return $this->context; } /** * Fetch the SettingsInstance * * @return SettingsInstance Fetched SettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SettingsInstance { return $this->proxy()->fetch(); } /** * Update the SettingsInstance * * @param array|Options $options Optional Arguments * @return SettingsInstance Updated SettingsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SettingsInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.SettingsInstance ' . \implode(' ', $context) . ']'; } }PKt[-AATwilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdatePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BulkCountryUpdateInstance \Twilio\Rest\Voice\V1\DialingPermissions\BulkCountryUpdateInstance */ public function buildInstance(array $payload): BulkCountryUpdateInstance { return new BulkCountryUpdateInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.BulkCountryUpdatePage]'; } }PKt[kb]]8Twilio/Rest/Voice/V1/DialingPermissions/SettingsList.phpnu[solution = []; } /** * Constructs a SettingsContext */ public function getContext(): SettingsContext { return new SettingsContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.SettingsList]'; } }PKt[& ttMTwilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixList.phpnu[solution = ['isoCode' => $isoCode, ]; $this->uri = '/DialingPermissions/Countries/' . \rawurlencode($isoCode) . '/HighRiskSpecialPrefixes'; } /** * Streams HighriskSpecialPrefixInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads HighriskSpecialPrefixInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return HighriskSpecialPrefixInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of HighriskSpecialPrefixInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return HighriskSpecialPrefixPage Page of HighriskSpecialPrefixInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): HighriskSpecialPrefixPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new HighriskSpecialPrefixPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of HighriskSpecialPrefixInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return HighriskSpecialPrefixPage Page of HighriskSpecialPrefixInstance */ public function getPage(string $targetUrl): HighriskSpecialPrefixPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new HighriskSpecialPrefixPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.HighriskSpecialPrefixList]'; } }PKt[eMTwilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return HighriskSpecialPrefixInstance \Twilio\Rest\Voice\V1\DialingPermissions\Country\HighriskSpecialPrefixInstance */ public function buildInstance(array $payload): HighriskSpecialPrefixInstance { return new HighriskSpecialPrefixInstance($this->version, $payload, $this->solution['isoCode']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.HighriskSpecialPrefixPage]'; } }PKt[EQTwilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixInstance.phpnu[properties = ['prefix' => Values::array_get($payload, 'prefix'), ]; $this->solution = ['isoCode' => $isoCode, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.HighriskSpecialPrefixInstance]'; } }PKt[ʉ)Twilio/Rest/Voice/V1/IpRecordInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'ipAddress' => Values::array_get($payload, 'ip_address'), 'cidrPrefixLength' => Values::array_get($payload, 'cidr_prefix_length'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IpRecordContext Context for this IpRecordInstance */ protected function proxy(): IpRecordContext { if (!$this->context) { $this->context = new IpRecordContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the IpRecordInstance * * @return IpRecordInstance Fetched IpRecordInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpRecordInstance { return $this->proxy()->fetch(); } /** * Update the IpRecordInstance * * @param array|Options $options Optional Arguments * @return IpRecordInstance Updated IpRecordInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): IpRecordInstance { return $this->proxy()->update($options); } /** * Delete the IpRecordInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.IpRecordInstance ' . \implode(' ', $context) . ']'; } }PKt[dP||%Twilio/Rest/Voice/V1/IpRecordPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return IpRecordInstance \Twilio\Rest\Voice\V1\IpRecordInstance */ public function buildInstance(array $payload): IpRecordInstance { return new IpRecordInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.IpRecordPage]'; } }PKt[&Twilio/Rest/Voice/V1/ByocTrunkPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ByocTrunkInstance \Twilio\Rest\Voice\V1\ByocTrunkInstance */ public function buildInstance(array $payload): ByocTrunkInstance { return new ByocTrunkInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.ByocTrunkPage]'; } }PKt[ )Twilio/Rest/Voice/V1/ByocTrunkContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/ByocTrunks/' . \rawurlencode($sid) . ''; } /** * Fetch the ByocTrunkInstance * * @return ByocTrunkInstance Fetched ByocTrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ByocTrunkInstance { $payload = $this->version->fetch('GET', $this->uri); return new ByocTrunkInstance($this->version, $payload, $this->solution['sid']); } /** * Update the ByocTrunkInstance * * @param array|Options $options Optional Arguments * @return ByocTrunkInstance Updated ByocTrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ByocTrunkInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'VoiceUrl' => $options['voiceUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'StatusCallbackUrl' => $options['statusCallbackUrl'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'CnamLookupEnabled' => Serialize::booleanToString($options['cnamLookupEnabled']), 'ConnectionPolicySid' => $options['connectionPolicySid'], 'FromDomainSid' => $options['fromDomainSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ByocTrunkInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ByocTrunkInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.ByocTrunkContext ' . \implode(' ', $context) . ']'; } }PKt['( /Twilio/Rest/Voice/V1/SourceIpMappingContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/SourceIpMappings/' . \rawurlencode($sid) . ''; } /** * Fetch the SourceIpMappingInstance * * @return SourceIpMappingInstance Fetched SourceIpMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SourceIpMappingInstance { $payload = $this->version->fetch('GET', $this->uri); return new SourceIpMappingInstance($this->version, $payload, $this->solution['sid']); } /** * Update the SourceIpMappingInstance * * @param string $sipDomainSid The unique string that identifies a SIP Domain * @return SourceIpMappingInstance Updated SourceIpMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $sipDomainSid): SourceIpMappingInstance { $data = Values::of(['SipDomainSid' => $sipDomainSid, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SourceIpMappingInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the SourceIpMappingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.SourceIpMappingContext ' . \implode(' ', $context) . ']'; } }PKt[!,[,Twilio/Rest/Voice/V1/SourceIpMappingList.phpnu[solution = []; $this->uri = '/SourceIpMappings'; } /** * Create the SourceIpMappingInstance * * @param string $ipRecordSid The unique string that identifies an IP Record * @param string $sipDomainSid The unique string that identifies a SIP Domain * @return SourceIpMappingInstance Created SourceIpMappingInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $ipRecordSid, string $sipDomainSid): SourceIpMappingInstance { $data = Values::of(['IpRecordSid' => $ipRecordSid, 'SipDomainSid' => $sipDomainSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SourceIpMappingInstance($this->version, $payload); } /** * Streams SourceIpMappingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SourceIpMappingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SourceIpMappingInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SourceIpMappingInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SourceIpMappingPage Page of SourceIpMappingInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SourceIpMappingPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SourceIpMappingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SourceIpMappingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SourceIpMappingPage Page of SourceIpMappingInstance */ public function getPage(string $targetUrl): SourceIpMappingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SourceIpMappingPage($this->version, $response, $this->solution); } /** * Constructs a SourceIpMappingContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): SourceIpMappingContext { return new SourceIpMappingContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.SourceIpMappingList]'; } }PKt[(䎎(Twilio/Rest/Voice/V1/IpRecordOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['cidrPrefixLength'] = $cidrPrefixLength; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * An integer representing the length of the [CIDR](https://tools.ietf.org/html/rfc4632) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32. * * @param int $cidrPrefixLength An integer representing the length of the * [CIDR](https://tools.ietf.org/html/rfc4632) * prefix to use with this IP address. By default * the entire IP address is used, which for IPv4 * is value 32. * @return $this Fluent Builder */ public function setCidrPrefixLength(int $cidrPrefixLength): self { $this->options['cidrPrefixLength'] = $cidrPrefixLength; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Voice.V1.CreateIpRecordOptions ' . $options . ']'; } } class UpdateIpRecordOptions extends Options { /** * @param string $friendlyName A string to describe the resource */ public function __construct(string $friendlyName = Values::NONE) { $this->options['friendlyName'] = $friendlyName; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Voice.V1.UpdateIpRecordOptions ' . $options . ']'; } }PKt[BFHHDTwilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConnectionPolicyTargetInstance \Twilio\Rest\Voice\V1\ConnectionPolicy\ConnectionPolicyTargetInstance */ public function buildInstance(array $payload): ConnectionPolicyTargetInstance { return new ConnectionPolicyTargetInstance( $this->version, $payload, $this->solution['connectionPolicySid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.ConnectionPolicyTargetPage]'; } }PKt[(FDTwilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetList.phpnu[solution = ['connectionPolicySid' => $connectionPolicySid, ]; $this->uri = '/ConnectionPolicies/' . \rawurlencode($connectionPolicySid) . '/Targets'; } /** * Create the ConnectionPolicyTargetInstance * * @param string $target The SIP address you want Twilio to route your calls to * @param array|Options $options Optional Arguments * @return ConnectionPolicyTargetInstance Created ConnectionPolicyTargetInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $target, array $options = []): ConnectionPolicyTargetInstance { $options = new Values($options); $data = Values::of([ 'Target' => $target, 'FriendlyName' => $options['friendlyName'], 'Priority' => $options['priority'], 'Weight' => $options['weight'], 'Enabled' => Serialize::booleanToString($options['enabled']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ConnectionPolicyTargetInstance( $this->version, $payload, $this->solution['connectionPolicySid'] ); } /** * Streams ConnectionPolicyTargetInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ConnectionPolicyTargetInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ConnectionPolicyTargetInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ConnectionPolicyTargetInstance records from the * API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ConnectionPolicyTargetPage Page of ConnectionPolicyTargetInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ConnectionPolicyTargetPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ConnectionPolicyTargetPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ConnectionPolicyTargetInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ConnectionPolicyTargetPage Page of ConnectionPolicyTargetInstance */ public function getPage(string $targetUrl): ConnectionPolicyTargetPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ConnectionPolicyTargetPage($this->version, $response, $this->solution); } /** * Constructs a ConnectionPolicyTargetContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ConnectionPolicyTargetContext { return new ConnectionPolicyTargetContext( $this->version, $this->solution['connectionPolicySid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.ConnectionPolicyTargetList]'; } }PKt[kiW}}HTwilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'connectionPolicySid' => Values::array_get($payload, 'connection_policy_sid'), 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'target' => Values::array_get($payload, 'target'), 'priority' => Values::array_get($payload, 'priority'), 'weight' => Values::array_get($payload, 'weight'), 'enabled' => Values::array_get($payload, 'enabled'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'connectionPolicySid' => $connectionPolicySid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ConnectionPolicyTargetContext Context for this * ConnectionPolicyTargetInstance */ protected function proxy(): ConnectionPolicyTargetContext { if (!$this->context) { $this->context = new ConnectionPolicyTargetContext( $this->version, $this->solution['connectionPolicySid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ConnectionPolicyTargetInstance * * @return ConnectionPolicyTargetInstance Fetched ConnectionPolicyTargetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConnectionPolicyTargetInstance { return $this->proxy()->fetch(); } /** * Update the ConnectionPolicyTargetInstance * * @param array|Options $options Optional Arguments * @return ConnectionPolicyTargetInstance Updated ConnectionPolicyTargetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConnectionPolicyTargetInstance { return $this->proxy()->update($options); } /** * Delete the ConnectionPolicyTargetInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.ConnectionPolicyTargetInstance ' . \implode(' ', $context) . ']'; } }PKt[1:gGTwilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['priority'] = $priority; $this->options['weight'] = $weight; $this->options['enabled'] = $enabled; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The relative importance of the target. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important target. * * @param int $priority The relative importance of the target * @return $this Fluent Builder */ public function setPriority(int $priority): self { $this->options['priority'] = $priority; return $this; } /** * The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority. * * @param int $weight The value that determines the relative load the Target * should receive compared to others with the same priority * @return $this Fluent Builder */ public function setWeight(int $weight): self { $this->options['weight'] = $weight; return $this; } /** * Whether the Target is enabled. The default is `true`. * * @param bool $enabled Whether the Target is enabled * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Voice.V1.CreateConnectionPolicyTargetOptions ' . $options . ']'; } } class UpdateConnectionPolicyTargetOptions extends Options { /** * @param string $friendlyName A string to describe the resource * @param string $target The SIP address you want Twilio to route your calls to * @param int $priority The relative importance of the target * @param int $weight The value that determines the relative load the Target * should receive compared to others with the same priority * @param bool $enabled Whether the Target is enabled */ public function __construct(string $friendlyName = Values::NONE, string $target = Values::NONE, int $priority = Values::NONE, int $weight = Values::NONE, bool $enabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['target'] = $target; $this->options['priority'] = $priority; $this->options['weight'] = $weight; $this->options['enabled'] = $enabled; } /** * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. * * @param string $target The SIP address you want Twilio to route your calls to * @return $this Fluent Builder */ public function setTarget(string $target): self { $this->options['target'] = $target; return $this; } /** * The relative importance of the target. Can be an integer from 0 to 65535, inclusive. The lowest number represents the most important target. * * @param int $priority The relative importance of the target * @return $this Fluent Builder */ public function setPriority(int $priority): self { $this->options['priority'] = $priority; return $this; } /** * The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive. Targets with higher values receive more load than those with lower ones with the same priority. * * @param int $weight The value that determines the relative load the Target * should receive compared to others with the same priority * @return $this Fluent Builder */ public function setWeight(int $weight): self { $this->options['weight'] = $weight; return $this; } /** * Whether the Target is enabled. * * @param bool $enabled Whether the Target is enabled * @return $this Fluent Builder */ public function setEnabled(bool $enabled): self { $this->options['enabled'] = $enabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Voice.V1.UpdateConnectionPolicyTargetOptions ' . $options . ']'; } }PKt[s< GTwilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetContext.phpnu[solution = ['connectionPolicySid' => $connectionPolicySid, 'sid' => $sid, ]; $this->uri = '/ConnectionPolicies/' . \rawurlencode($connectionPolicySid) . '/Targets/' . \rawurlencode($sid) . ''; } /** * Fetch the ConnectionPolicyTargetInstance * * @return ConnectionPolicyTargetInstance Fetched ConnectionPolicyTargetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ConnectionPolicyTargetInstance { $payload = $this->version->fetch('GET', $this->uri); return new ConnectionPolicyTargetInstance( $this->version, $payload, $this->solution['connectionPolicySid'], $this->solution['sid'] ); } /** * Update the ConnectionPolicyTargetInstance * * @param array|Options $options Optional Arguments * @return ConnectionPolicyTargetInstance Updated ConnectionPolicyTargetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ConnectionPolicyTargetInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Target' => $options['target'], 'Priority' => $options['priority'], 'Weight' => $options['weight'], 'Enabled' => Serialize::booleanToString($options['enabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ConnectionPolicyTargetInstance( $this->version, $payload, $this->solution['connectionPolicySid'], $this->solution['sid'] ); } /** * Delete the ConnectionPolicyTargetInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.ConnectionPolicyTargetContext ' . \implode(' ', $context) . ']'; } }PKt[dլ-Twilio/Rest/Voice/V1/ConnectionPolicyPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ConnectionPolicyInstance \Twilio\Rest\Voice\V1\ConnectionPolicyInstance */ public function buildInstance(array $payload): ConnectionPolicyInstance { return new ConnectionPolicyInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.ConnectionPolicyPage]'; } }PKt[X)Twilio/Rest/Voice/V1/ArchivedCallPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ArchivedCallInstance \Twilio\Rest\Voice\V1\ArchivedCallInstance */ public function buildInstance(array $payload): ArchivedCallInstance { return new ArchivedCallInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.ArchivedCallPage]'; } }PKt[Qy&Twilio/Rest/Voice/V1/ByocTrunkList.phpnu[solution = []; $this->uri = '/ByocTrunks'; } /** * Create the ByocTrunkInstance * * @param array|Options $options Optional Arguments * @return ByocTrunkInstance Created ByocTrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ByocTrunkInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'VoiceUrl' => $options['voiceUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'StatusCallbackUrl' => $options['statusCallbackUrl'], 'StatusCallbackMethod' => $options['statusCallbackMethod'], 'CnamLookupEnabled' => Serialize::booleanToString($options['cnamLookupEnabled']), 'ConnectionPolicySid' => $options['connectionPolicySid'], 'FromDomainSid' => $options['fromDomainSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ByocTrunkInstance($this->version, $payload); } /** * Streams ByocTrunkInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ByocTrunkInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ByocTrunkInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ByocTrunkInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ByocTrunkPage Page of ByocTrunkInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ByocTrunkPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ByocTrunkPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ByocTrunkInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ByocTrunkPage Page of ByocTrunkInstance */ public function getPage(string $targetUrl): ByocTrunkPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ByocTrunkPage($this->version, $response, $this->solution); } /** * Constructs a ByocTrunkContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ByocTrunkContext { return new ByocTrunkContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1.ByocTrunkList]'; } }PKt[L rr,Twilio/Rest/Voice/V1/ArchivedCallContext.phpnu[solution = ['date' => $date, 'sid' => $sid, ]; $this->uri = '/Archives/' . \rawurlencode($date->format('Y-m-d')) . '/Calls/' . \rawurlencode($sid) . ''; } /** * Delete the ArchivedCallInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Voice.V1.ArchivedCallContext ' . \implode(' ', $context) . ']'; } }PKt[bTwilio/Rest/Voice/V1.phpnu[version = 'v1'; } protected function getArchivedCalls(): ArchivedCallList { if (!$this->_archivedCalls) { $this->_archivedCalls = new ArchivedCallList($this); } return $this->_archivedCalls; } protected function getByocTrunks(): ByocTrunkList { if (!$this->_byocTrunks) { $this->_byocTrunks = new ByocTrunkList($this); } return $this->_byocTrunks; } protected function getConnectionPolicies(): ConnectionPolicyList { if (!$this->_connectionPolicies) { $this->_connectionPolicies = new ConnectionPolicyList($this); } return $this->_connectionPolicies; } protected function getDialingPermissions(): DialingPermissionsList { if (!$this->_dialingPermissions) { $this->_dialingPermissions = new DialingPermissionsList($this); } return $this->_dialingPermissions; } protected function getIpRecords(): IpRecordList { if (!$this->_ipRecords) { $this->_ipRecords = new IpRecordList($this); } return $this->_ipRecords; } protected function getSourceIpMappings(): SourceIpMappingList { if (!$this->_sourceIpMappings) { $this->_sourceIpMappings = new SourceIpMappingList($this); } return $this->_sourceIpMappings; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Voice.V1]'; } }PKt[M'Twilio/Rest/Routes/V2/SipDomainList.phpnu[solution = []; } /** * Constructs a SipDomainContext * * @param string $sipDomain The sip_domain */ public function getContext(string $sipDomain): SipDomainContext { return new SipDomainContext($this->version, $sipDomain); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Routes.V2.SipDomainList]'; } }PKt[:C;&Twilio/Rest/Routes/V2/TrunkOptions.phpnu[options['voiceRegion'] = $voiceRegion; $this->options['friendlyName'] = $friendlyName; } /** * The Inbound Processing Region used for this SIP Trunk for voice * * @param string $voiceRegion The Inbound Processing Region used for this SIP * Trunk for voice * @return $this Fluent Builder */ public function setVoiceRegion(string $voiceRegion): self { $this->options['voiceRegion'] = $voiceRegion; return $this; } /** * A human readable description of this resource, up to 64 characters. * * @param string $friendlyName A human readable description of this resource. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Routes.V2.UpdateTrunkOptions ' . $options . ']'; } }PKt[PB;mm#Twilio/Rest/Routes/V2/TrunkPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TrunkInstance \Twilio\Rest\Routes\V2\TrunkInstance */ public function buildInstance(array $payload): TrunkInstance { return new TrunkInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Routes.V2.TrunkPage]'; } }PKt['Twilio/Rest/Routes/V2/SipDomainPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SipDomainInstance \Twilio\Rest\Routes\V2\SipDomainInstance */ public function buildInstance(array $payload): SipDomainInstance { return new SipDomainInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Routes.V2.SipDomainPage]'; } }PKt[ 'Twilio/Rest/Routes/V2/TrunkInstance.phpnu[properties = [ 'sipTrunkDomain' => Values::array_get($payload, 'sip_trunk_domain'), 'url' => Values::array_get($payload, 'url'), 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'voiceRegion' => Values::array_get($payload, 'voice_region'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['sipTrunkDomain' => $sipTrunkDomain ?: $this->properties['sipTrunkDomain'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TrunkContext Context for this TrunkInstance */ protected function proxy(): TrunkContext { if (!$this->context) { $this->context = new TrunkContext($this->version, $this->solution['sipTrunkDomain']); } return $this->context; } /** * Update the TrunkInstance * * @param array|Options $options Optional Arguments * @return TrunkInstance Updated TrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TrunkInstance { return $this->proxy()->update($options); } /** * Fetch the TrunkInstance * * @return TrunkInstance Fetched TrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrunkInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Routes.V2.TrunkInstance ' . \implode(' ', $context) . ']'; } }PKt[vڑ)Twilio/Rest/Routes/V2/PhoneNumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PhoneNumberInstance \Twilio\Rest\Routes\V2\PhoneNumberInstance */ public function buildInstance(array $payload): PhoneNumberInstance { return new PhoneNumberInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Routes.V2.PhoneNumberPage]'; } }PKt[ ,Twilio/Rest/Routes/V2/PhoneNumberContext.phpnu[solution = ['phoneNumber' => $phoneNumber, ]; $this->uri = '/PhoneNumbers/' . \rawurlencode($phoneNumber) . ''; } /** * Update the PhoneNumberInstance * * @param array|Options $options Optional Arguments * @return PhoneNumberInstance Updated PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): PhoneNumberInstance { $options = new Values($options); $data = Values::of([ 'VoiceRegion' => $options['voiceRegion'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new PhoneNumberInstance($this->version, $payload, $this->solution['phoneNumber']); } /** * Fetch the PhoneNumberInstance * * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PhoneNumberInstance { $payload = $this->version->fetch('GET', $this->uri); return new PhoneNumberInstance($this->version, $payload, $this->solution['phoneNumber']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Routes.V2.PhoneNumberContext ' . \implode(' ', $context) . ']'; } }PKt[oHee*Twilio/Rest/Routes/V2/SipDomainOptions.phpnu[options['voiceRegion'] = $voiceRegion; $this->options['friendlyName'] = $friendlyName; } /** * The voice_region * * @param string $voiceRegion The voice_region * @return $this Fluent Builder */ public function setVoiceRegion(string $voiceRegion): self { $this->options['voiceRegion'] = $voiceRegion; return $this; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Routes.V2.UpdateSipDomainOptions ' . $options . ']'; } }PKt[Ȍ+Twilio/Rest/Routes/V2/SipDomainInstance.phpnu[properties = [ 'sipDomain' => Values::array_get($payload, 'sip_domain'), 'url' => Values::array_get($payload, 'url'), 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'voiceRegion' => Values::array_get($payload, 'voice_region'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['sipDomain' => $sipDomain ?: $this->properties['sipDomain'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SipDomainContext Context for this SipDomainInstance */ protected function proxy(): SipDomainContext { if (!$this->context) { $this->context = new SipDomainContext($this->version, $this->solution['sipDomain']); } return $this->context; } /** * Update the SipDomainInstance * * @param array|Options $options Optional Arguments * @return SipDomainInstance Updated SipDomainInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SipDomainInstance { return $this->proxy()->update($options); } /** * Fetch the SipDomainInstance * * @return SipDomainInstance Fetched SipDomainInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SipDomainInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Routes.V2.SipDomainInstance ' . \implode(' ', $context) . ']'; } }PKt[jdb)Twilio/Rest/Routes/V2/PhoneNumberList.phpnu[solution = []; } /** * Constructs a PhoneNumberContext * * @param string $phoneNumber The phone number */ public function getContext(string $phoneNumber): PhoneNumberContext { return new PhoneNumberContext($this->version, $phoneNumber); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Routes.V2.PhoneNumberList]'; } }PKt[ &Twilio/Rest/Routes/V2/TrunkContext.phpnu[solution = ['sipTrunkDomain' => $sipTrunkDomain, ]; $this->uri = '/Trunks/' . \rawurlencode($sipTrunkDomain) . ''; } /** * Update the TrunkInstance * * @param array|Options $options Optional Arguments * @return TrunkInstance Updated TrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TrunkInstance { $options = new Values($options); $data = Values::of([ 'VoiceRegion' => $options['voiceRegion'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TrunkInstance($this->version, $payload, $this->solution['sipTrunkDomain']); } /** * Fetch the TrunkInstance * * @return TrunkInstance Fetched TrunkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrunkInstance { $payload = $this->version->fetch('GET', $this->uri); return new TrunkInstance($this->version, $payload, $this->solution['sipTrunkDomain']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Routes.V2.TrunkContext ' . \implode(' ', $context) . ']'; } }PKt[""-Twilio/Rest/Routes/V2/PhoneNumberInstance.phpnu[properties = [ 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'url' => Values::array_get($payload, 'url'), 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'voiceRegion' => Values::array_get($payload, 'voice_region'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['phoneNumber' => $phoneNumber ?: $this->properties['phoneNumber'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PhoneNumberContext Context for this PhoneNumberInstance */ protected function proxy(): PhoneNumberContext { if (!$this->context) { $this->context = new PhoneNumberContext($this->version, $this->solution['phoneNumber']); } return $this->context; } /** * Update the PhoneNumberInstance * * @param array|Options $options Optional Arguments * @return PhoneNumberInstance Updated PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): PhoneNumberInstance { return $this->proxy()->update($options); } /** * Fetch the PhoneNumberInstance * * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PhoneNumberInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Routes.V2.PhoneNumberInstance ' . \implode(' ', $context) . ']'; } }PKt[,#Twilio/Rest/Routes/V2/TrunkList.phpnu[solution = []; } /** * Constructs a TrunkContext * * @param string $sipTrunkDomain The SIP Trunk */ public function getContext(string $sipTrunkDomain): TrunkContext { return new TrunkContext($this->version, $sipTrunkDomain); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Routes.V2.TrunkList]'; } }PKt[,( ( ,Twilio/Rest/Routes/V2/PhoneNumberOptions.phpnu[options['voiceRegion'] = $voiceRegion; $this->options['friendlyName'] = $friendlyName; } /** * The Inbound Processing Region used for this phone number for voice * * @param string $voiceRegion The Inbound Processing Region used for this phone * number for voice * @return $this Fluent Builder */ public function setVoiceRegion(string $voiceRegion): self { $this->options['voiceRegion'] = $voiceRegion; return $this; } /** * A human readable description of this resource, up to 64 characters. * * @param string $friendlyName A human readable description of this resource. * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Routes.V2.UpdatePhoneNumberOptions ' . $options . ']'; } }PKt[f *Twilio/Rest/Routes/V2/SipDomainContext.phpnu[solution = ['sipDomain' => $sipDomain, ]; $this->uri = '/SipDomains/' . \rawurlencode($sipDomain) . ''; } /** * Update the SipDomainInstance * * @param array|Options $options Optional Arguments * @return SipDomainInstance Updated SipDomainInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SipDomainInstance { $options = new Values($options); $data = Values::of([ 'VoiceRegion' => $options['voiceRegion'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SipDomainInstance($this->version, $payload, $this->solution['sipDomain']); } /** * Fetch the SipDomainInstance * * @return SipDomainInstance Fetched SipDomainInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SipDomainInstance { $payload = $this->version->fetch('GET', $this->uri); return new SipDomainInstance($this->version, $payload, $this->solution['sipDomain']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Routes.V2.SipDomainContext ' . \implode(' ', $context) . ']'; } }PKt[6l Twilio/Rest/Routes/V2.phpnu[version = 'v2'; } protected function getPhoneNumbers(): PhoneNumberList { if (!$this->_phoneNumbers) { $this->_phoneNumbers = new PhoneNumberList($this); } return $this->_phoneNumbers; } protected function getSipDomains(): SipDomainList { if (!$this->_sipDomains) { $this->_sipDomains = new SipDomainList($this); } return $this->_sipDomains; } protected function getTrunks(): TrunkList { if (!$this->_trunks) { $this->_trunks = new TrunkList($this); } return $this->_trunks; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Routes.V2]'; } }PKt[6`C-Twilio/Rest/IpMessaging/V1/CredentialPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialInstance \Twilio\Rest\IpMessaging\V1\CredentialInstance */ public function buildInstance(array $payload): CredentialInstance { return new CredentialInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.CredentialPage]'; } }PKt[ӚGKK0Twilio/Rest/IpMessaging/V1/CredentialOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The certificate * * @param string $certificate The certificate * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * The private_key * * @param string $privateKey The private_key * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * The sandbox * * @param bool $sandbox The sandbox * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * The api_key * * @param string $apiKey The api_key * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * The secret * * @param string $secret The secret * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.CreateCredentialOptions ' . $options . ']'; } } class UpdateCredentialOptions extends Options { /** * @param string $friendlyName The friendly_name * @param string $certificate The certificate * @param string $privateKey The private_key * @param bool $sandbox The sandbox * @param string $apiKey The api_key * @param string $secret The secret */ public function __construct(string $friendlyName = Values::NONE, string $certificate = Values::NONE, string $privateKey = Values::NONE, bool $sandbox = Values::NONE, string $apiKey = Values::NONE, string $secret = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The certificate * * @param string $certificate The certificate * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * The private_key * * @param string $privateKey The private_key * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * The sandbox * * @param bool $sandbox The sandbox * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * The api_key * * @param string $apiKey The api_key * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * The secret * * @param string $secret The secret * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.UpdateCredentialOptions ' . $options . ']'; } }PKt[#/3Twilio/Rest/IpMessaging/V1/Service/UserInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'attributes' => Values::array_get($payload, 'attributes'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'roleSid' => Values::array_get($payload, 'role_sid'), 'identity' => Values::array_get($payload, 'identity'), 'isOnline' => Values::array_get($payload, 'is_online'), 'isNotifiable' => Values::array_get($payload, 'is_notifiable'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'joinedChannelsCount' => Values::array_get($payload, 'joined_channels_count'), 'links' => Values::array_get($payload, 'links'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserContext Context for this UserInstance */ protected function proxy(): UserContext { if (!$this->context) { $this->context = new UserContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { return $this->proxy()->fetch(); } /** * Delete the UserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { return $this->proxy()->update($options); } /** * Access the userChannels */ protected function getUserChannels(): UserChannelList { return $this->proxy()->userChannels; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.UserInstance ' . \implode(' ', $context) . ']'; } }PKt[+772Twilio/Rest/IpMessaging/V1/Service/UserOptions.phpnu[options['roleSid'] = $roleSid; $this->options['attributes'] = $attributes; $this->options['friendlyName'] = $friendlyName; } /** * The role_sid * * @param string $roleSid The role_sid * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.CreateUserOptions ' . $options . ']'; } } class UpdateUserOptions extends Options { /** * @param string $roleSid The role_sid * @param string $attributes The attributes * @param string $friendlyName The friendly_name */ public function __construct(string $roleSid = Values::NONE, string $attributes = Values::NONE, string $friendlyName = Values::NONE) { $this->options['roleSid'] = $roleSid; $this->options['attributes'] = $attributes; $this->options['friendlyName'] = $friendlyName; } /** * The role_sid * * @param string $roleSid The role_sid * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.UpdateUserOptions ' . $options . ']'; } }PKt[#BB5Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['attributes'] = $attributes; $this->options['type'] = $type; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The type * * @param string $type The type * @return $this Fluent Builder */ public function setType(string $type): self { $this->options['type'] = $type; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.CreateChannelOptions ' . $options . ']'; } } class ReadChannelOptions extends Options { /** * @param string[] $type The type */ public function __construct(array $type = Values::ARRAY_NONE) { $this->options['type'] = $type; } /** * The type * * @param string[] $type The type * @return $this Fluent Builder */ public function setType(array $type): self { $this->options['type'] = $type; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.ReadChannelOptions ' . $options . ']'; } } class UpdateChannelOptions extends Options { /** * @param string $friendlyName The friendly_name * @param string $uniqueName The unique_name * @param string $attributes The attributes */ public function __construct(string $friendlyName = Values::NONE, string $uniqueName = Values::NONE, string $attributes = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['attributes'] = $attributes; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.UpdateChannelOptions ' . $options . ']'; } }PKt[>B2Twilio/Rest/IpMessaging/V1/Service/ChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ChannelInstance \Twilio\Rest\IpMessaging\V1\Service\ChannelInstance */ public function buildInstance(array $payload): ChannelInstance { return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.ChannelPage]'; } }PKt[N||2Twilio/Rest/IpMessaging/V1/Service/ChannelList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels'; } /** * Create the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Created ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ChannelInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Attributes' => $options['attributes'], 'Type' => $options['type'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams ChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ChannelInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ChannelInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ChannelPage Page of ChannelInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ChannelPage { $options = new Values($options); $params = Values::of([ 'Type' => Serialize::map($options['type'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ChannelPage Page of ChannelInstance */ public function getPage(string $targetUrl): ChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ChannelPage($this->version, $response, $this->solution); } /** * Constructs a ChannelContext * * @param string $sid The sid */ public function getContext(string $sid): ChannelContext { return new ChannelContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.ChannelList]'; } }PKt[M"00<Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.phpnu[options['roleSid'] = $roleSid; } /** * The role_sid * * @param string $roleSid The role_sid * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.CreateMemberOptions ' . $options . ']'; } } class ReadMemberOptions extends Options { /** * @param string[] $identity The identity */ public function __construct(array $identity = Values::ARRAY_NONE) { $this->options['identity'] = $identity; } /** * The identity * * @param string[] $identity The identity * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.ReadMemberOptions ' . $options . ']'; } } class UpdateMemberOptions extends Options { /** * @param string $roleSid The role_sid * @param int $lastConsumedMessageIndex The last_consumed_message_index */ public function __construct(string $roleSid = Values::NONE, int $lastConsumedMessageIndex = Values::NONE) { $this->options['roleSid'] = $roleSid; $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; } /** * The role_sid * * @param string $roleSid The role_sid * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The last_consumed_message_index * * @param int $lastConsumedMessageIndex The last_consumed_message_index * @return $this Fluent Builder */ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self { $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.UpdateMemberOptions ' . $options . ']'; } }PKt[ / <Twilio/Rest/IpMessaging/V1/Service/Channel/MemberContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members/' . \rawurlencode($sid) . ''; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { $payload = $this->version->fetch('GET', $this->uri); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the MemberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the MemberInstance * * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MemberInstance { $options = new Values($options); $data = Values::of([ 'RoleSid' => $options['roleSid'], 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.MemberContext ' . \implode(' ', $context) . ']'; } }PKt[f=Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.phpnu[options['from'] = $from; $this->options['attributes'] = $attributes; } /** * The from * * @param string $from The from * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.CreateMessageOptions ' . $options . ']'; } } class ReadMessageOptions extends Options { /** * @param string $order The order */ public function __construct(string $order = Values::NONE) { $this->options['order'] = $order; } /** * The order * * @param string $order The order * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.ReadMessageOptions ' . $options . ']'; } } class UpdateMessageOptions extends Options { /** * @param string $body The body * @param string $attributes The attributes */ public function __construct(string $body = Values::NONE, string $attributes = Values::NONE) { $this->options['body'] = $body; $this->options['attributes'] = $attributes; } /** * The body * * @param string $body The body * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.UpdateMessageOptions ' . $options . ']'; } }PKt[}}=Twilio/Rest/IpMessaging/V1/Service/Channel/InviteInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'roleSid' => Values::array_get($payload, 'role_sid'), 'createdBy' => Values::array_get($payload, 'created_by'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InviteContext Context for this InviteInstance */ protected function proxy(): InviteContext { if (!$this->context) { $this->context = new InviteContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the InviteInstance * * @return InviteInstance Fetched InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InviteInstance { return $this->proxy()->fetch(); } /** * Delete the InviteInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.InviteInstance ' . \implode(' ', $context) . ']'; } }PKt[T0  :Twilio/Rest/IpMessaging/V1/Service/Channel/MessagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MessageInstance \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageInstance */ public function buildInstance(array $payload): MessageInstance { return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.MessagePage]'; } }PKt[p49ff:Twilio/Rest/IpMessaging/V1/Service/Channel/MessageList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages'; } /** * Create the MessageInstance * * @param string $body The body * @param array|Options $options Optional Arguments * @return MessageInstance Created MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $body, array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'Body' => $body, 'From' => $options['from'], 'Attributes' => $options['attributes'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams MessageInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MessageInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MessageInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MessageInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MessagePage Page of MessageInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MessagePage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MessagePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MessageInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MessagePage Page of MessageInstance */ public function getPage(string $targetUrl): MessagePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MessagePage($this->version, $response, $this->solution); } /** * Constructs a MessageContext * * @param string $sid The sid */ public function getContext(string $sid): MessageContext { return new MessageContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.MessageList]'; } }PKt[@[[9Twilio/Rest/IpMessaging/V1/Service/Channel/MemberList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members'; } /** * Create the MemberInstance * * @param string $identity The identity * @param array|Options $options Optional Arguments * @return MemberInstance Created MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): MemberInstance { $options = new Values($options); $data = Values::of(['Identity' => $identity, 'RoleSid' => $options['roleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams MemberInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MemberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MemberInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MemberInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MemberPage Page of MemberInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MemberPage { $options = new Values($options); $params = Values::of([ 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MemberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MemberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MemberPage Page of MemberInstance */ public function getPage(string $targetUrl): MemberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MemberPage($this->version, $response, $this->solution); } /** * Constructs a MemberContext * * @param string $sid The sid */ public function getContext(string $sid): MemberContext { return new MemberContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.MemberList]'; } }PKt[Jxy=Twilio/Rest/IpMessaging/V1/Service/Channel/MemberInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'roleSid' => Values::array_get($payload, 'role_sid'), 'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'), 'lastConsumptionTimestamp' => Deserialize::dateTime(Values::array_get($payload, 'last_consumption_timestamp')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MemberContext Context for this MemberInstance */ protected function proxy(): MemberContext { if (!$this->context) { $this->context = new MemberContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { return $this->proxy()->fetch(); } /** * Delete the MemberInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the MemberInstance * * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MemberInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.MemberInstance ' . \implode(' ', $context) . ']'; } }PKt[W9Twilio/Rest/IpMessaging/V1/Service/Channel/MemberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MemberInstance \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberInstance */ public function buildInstance(array $payload): MemberInstance { return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.MemberPage]'; } }PKt[f f =Twilio/Rest/IpMessaging/V1/Service/Channel/MessageContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages/' . \rawurlencode($sid) . ''; } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { $payload = $this->version->fetch('GET', $this->uri); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the MessageInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of(['Body' => $options['body'], 'Attributes' => $options['attributes'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.MessageContext ' . \implode(' ', $context) . ']'; } }PKt[>>Twilio/Rest/IpMessaging/V1/Service/Channel/MessageInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'attributes' => Values::array_get($payload, 'attributes'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'to' => Values::array_get($payload, 'to'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'wasEdited' => Values::array_get($payload, 'was_edited'), 'from' => Values::array_get($payload, 'from'), 'body' => Values::array_get($payload, 'body'), 'index' => Values::array_get($payload, 'index'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MessageContext Context for this MessageInstance */ protected function proxy(): MessageContext { if (!$this->context) { $this->context = new MessageContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { return $this->proxy()->fetch(); } /** * Delete the MessageInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.MessageInstance ' . \implode(' ', $context) . ']'; } }PKt[\P@ @ <Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.phpnu[options['roleSid'] = $roleSid; } /** * The role_sid * * @param string $roleSid The role_sid * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.CreateInviteOptions ' . $options . ']'; } } class ReadInviteOptions extends Options { /** * @param string[] $identity The identity */ public function __construct(array $identity = Values::ARRAY_NONE) { $this->options['identity'] = $identity; } /** * The identity * * @param string[] $identity The identity * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.ReadInviteOptions ' . $options . ']'; } }PKt[w[[9Twilio/Rest/IpMessaging/V1/Service/Channel/InviteList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites'; } /** * Create the InviteInstance * * @param string $identity The identity * @param array|Options $options Optional Arguments * @return InviteInstance Created InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): InviteInstance { $options = new Values($options); $data = Values::of(['Identity' => $identity, 'RoleSid' => $options['roleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams InviteInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InviteInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InviteInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of InviteInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InvitePage Page of InviteInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InvitePage { $options = new Values($options); $params = Values::of([ 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new InvitePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InviteInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InvitePage Page of InviteInstance */ public function getPage(string $targetUrl): InvitePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InvitePage($this->version, $response, $this->solution); } /** * Constructs a InviteContext * * @param string $sid The sid */ public function getContext(string $sid): InviteContext { return new InviteContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.InviteList]'; } }PKt[-A9Twilio/Rest/IpMessaging/V1/Service/Channel/InvitePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InviteInstance \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteInstance */ public function buildInstance(array $payload): InviteInstance { return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.InvitePage]'; } }PKt[@4hh<Twilio/Rest/IpMessaging/V1/Service/Channel/InviteContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites/' . \rawurlencode($sid) . ''; } /** * Fetch the InviteInstance * * @return InviteInstance Fetched InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InviteInstance { $payload = $this->version->fetch('GET', $this->uri); return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the InviteInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.InviteContext ' . \implode(' ', $context) . ']'; } }PKt[-solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($sid) . ''; } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the UserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'RoleSid' => $options['roleSid'], 'Attributes' => $options['attributes'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new UserInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the userChannels */ protected function getUserChannels(): UserChannelList { if (!$this->_userChannels) { $this->_userChannels = new UserChannelList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_userChannels; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.UserContext ' . \implode(' ', $context) . ']'; } }PKt[k//;Twilio/Rest/IpMessaging/V1/Service/User/UserChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserChannelInstance \Twilio\Rest\IpMessaging\V1\Service\User\UserChannelInstance */ public function buildInstance(array $payload): UserChannelInstance { return new UserChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.UserChannelPage]'; } }PKt[y# # ?Twilio/Rest/IpMessaging/V1/Service/User/UserChannelInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'memberSid' => Values::array_get($payload, 'member_sid'), 'status' => Values::array_get($payload, 'status'), 'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'), 'unreadMessagesCount' => Values::array_get($payload, 'unread_messages_count'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.UserChannelInstance]'; } }PKt[$aTT;Twilio/Rest/IpMessaging/V1/Service/User/UserChannelList.phpnu[solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels'; } /** * Streams UserChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserChannelInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserChannelInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserChannelPage Page of UserChannelInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserChannelPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserChannelPage Page of UserChannelInstance */ public function getPage(string $targetUrl): UserChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserChannelPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.UserChannelList]'; } }PKt[~rr6Twilio/Rest/IpMessaging/V1/Service/ChannelInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'attributes' => Values::array_get($payload, 'attributes'), 'type' => Values::array_get($payload, 'type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), 'membersCount' => Values::array_get($payload, 'members_count'), 'messagesCount' => Values::array_get($payload, 'messages_count'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ChannelContext Context for this ChannelInstance */ protected function proxy(): ChannelContext { if (!$this->context) { $this->context = new ChannelContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ChannelInstance * * @return ChannelInstance Fetched ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChannelInstance { return $this->proxy()->fetch(); } /** * Delete the ChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Updated ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChannelInstance { return $this->proxy()->update($options); } /** * Access the members */ protected function getMembers(): MemberList { return $this->proxy()->members; } /** * Access the messages */ protected function getMessages(): MessageList { return $this->proxy()->messages; } /** * Access the invites */ protected function getInvites(): InviteList { return $this->proxy()->invites; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.ChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[ؘ  5Twilio/Rest/IpMessaging/V1/Service/ChannelContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($sid) . ''; } /** * Fetch the ChannelInstance * * @return ChannelInstance Fetched ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new ChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the ChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Updated ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChannelInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Attributes' => $options['attributes'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the members */ protected function getMembers(): MemberList { if (!$this->_members) { $this->_members = new MemberList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_members; } /** * Access the messages */ protected function getMessages(): MessageList { if (!$this->_messages) { $this->_messages = new MessageList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_messages; } /** * Access the invites */ protected function getInvites(): InviteList { if (!$this->_invites) { $this->_invites = new InviteList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_invites; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.ChannelContext ' . \implode(' ', $context) . ']'; } }PKt[>!/Twilio/Rest/IpMessaging/V1/Service/UserPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserInstance \Twilio\Rest\IpMessaging\V1\Service\UserInstance */ public function buildInstance(array $payload): UserInstance { return new UserInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.UserPage]'; } }PKt[5C/Twilio/Rest/IpMessaging/V1/Service/RolePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RoleInstance \Twilio\Rest\IpMessaging\V1\Service\RoleInstance */ public function buildInstance(array $payload): RoleInstance { return new RoleInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.RolePage]'; } }PKt[V7/Twilio/Rest/IpMessaging/V1/Service/RoleList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles'; } /** * Create the RoleInstance * * @param string $friendlyName The friendly_name * @param string $type The type * @param string[] $permission The permission * @return RoleInstance Created RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $type, array $permission): RoleInstance { $data = Values::of([ 'FriendlyName' => $friendlyName, 'Type' => $type, 'Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RoleInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams RoleInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RoleInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RoleInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of RoleInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RolePage Page of RoleInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RolePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RolePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RoleInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RolePage Page of RoleInstance */ public function getPage(string $targetUrl): RolePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RolePage($this->version, $response, $this->solution); } /** * Constructs a RoleContext * * @param string $sid The sid */ public function getContext(string $sid): RoleContext { return new RoleContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.RoleList]'; } }PKt[ϩ/Twilio/Rest/IpMessaging/V1/Service/UserList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users'; } /** * Create the UserInstance * * @param string $identity The identity * @param array|Options $options Optional Arguments * @return UserInstance Created UserInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $identity, 'RoleSid' => $options['roleSid'], 'Attributes' => $options['attributes'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new UserInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams UserInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserPage Page of UserInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserPage Page of UserInstance */ public function getPage(string $targetUrl): UserPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserPage($this->version, $response, $this->solution); } /** * Constructs a UserContext * * @param string $sid The sid */ public function getContext(string $sid): UserContext { return new UserContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.UserList]'; } }PKt[#7* * 2Twilio/Rest/IpMessaging/V1/Service/RoleContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles/' . \rawurlencode($sid) . ''; } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { $payload = $this->version->fetch('GET', $this->uri); return new RoleInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the RoleInstance * * @param string[] $permission The permission * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { $data = Values::of(['Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RoleInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.RoleContext ' . \implode(' ', $context) . ']'; } }PKt[$&E3Twilio/Rest/IpMessaging/V1/Service/RoleInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'permissions' => Values::array_get($payload, 'permissions'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RoleContext Context for this RoleInstance */ protected function proxy(): RoleContext { if (!$this->context) { $this->context = new RoleContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { return $this->proxy()->fetch(); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the RoleInstance * * @param string[] $permission The permission * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { return $this->proxy()->update($permission); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.RoleInstance ' . \implode(' ', $context) . ']'; } }PKt[)byy.Twilio/Rest/IpMessaging/V1/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'defaultServiceRoleSid' => Values::array_get($payload, 'default_service_role_sid'), 'defaultChannelRoleSid' => Values::array_get($payload, 'default_channel_role_sid'), 'defaultChannelCreatorRoleSid' => Values::array_get($payload, 'default_channel_creator_role_sid'), 'readStatusEnabled' => Values::array_get($payload, 'read_status_enabled'), 'reachabilityEnabled' => Values::array_get($payload, 'reachability_enabled'), 'typingIndicatorTimeout' => Values::array_get($payload, 'typing_indicator_timeout'), 'consumptionReportInterval' => Values::array_get($payload, 'consumption_report_interval'), 'limits' => Values::array_get($payload, 'limits'), 'webhooks' => Values::array_get($payload, 'webhooks'), 'preWebhookUrl' => Values::array_get($payload, 'pre_webhook_url'), 'postWebhookUrl' => Values::array_get($payload, 'post_webhook_url'), 'webhookMethod' => Values::array_get($payload, 'webhook_method'), 'webhookFilters' => Values::array_get($payload, 'webhook_filters'), 'notifications' => Values::array_get($payload, 'notifications'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Access the channels */ protected function getChannels(): ChannelList { return $this->proxy()->channels; } /** * Access the roles */ protected function getRoles(): RoleList { return $this->proxy()->roles; } /** * Access the users */ protected function getUsers(): UserList { return $this->proxy()->users; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[solution = []; $this->uri = '/Services'; } /** * Create the ServiceInstance * * @param string $friendlyName The friendly_name * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): ServiceInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Constructs a ServiceContext * * @param string $sid The sid */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.ServiceList]'; } }PKt[zt<%%-Twilio/Rest/IpMessaging/V1/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DefaultServiceRoleSid' => $options['defaultServiceRoleSid'], 'DefaultChannelRoleSid' => $options['defaultChannelRoleSid'], 'DefaultChannelCreatorRoleSid' => $options['defaultChannelCreatorRoleSid'], 'ReadStatusEnabled' => Serialize::booleanToString($options['readStatusEnabled']), 'ReachabilityEnabled' => Serialize::booleanToString($options['reachabilityEnabled']), 'TypingIndicatorTimeout' => $options['typingIndicatorTimeout'], 'ConsumptionReportInterval' => $options['consumptionReportInterval'], 'Notifications.NewMessage.Enabled' => Serialize::booleanToString($options['notificationsNewMessageEnabled']), 'Notifications.NewMessage.Template' => $options['notificationsNewMessageTemplate'], 'Notifications.AddedToChannel.Enabled' => Serialize::booleanToString($options['notificationsAddedToChannelEnabled']), 'Notifications.AddedToChannel.Template' => $options['notificationsAddedToChannelTemplate'], 'Notifications.RemovedFromChannel.Enabled' => Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']), 'Notifications.RemovedFromChannel.Template' => $options['notificationsRemovedFromChannelTemplate'], 'Notifications.InvitedToChannel.Enabled' => Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']), 'Notifications.InvitedToChannel.Template' => $options['notificationsInvitedToChannelTemplate'], 'PreWebhookUrl' => $options['preWebhookUrl'], 'PostWebhookUrl' => $options['postWebhookUrl'], 'WebhookMethod' => $options['webhookMethod'], 'WebhookFilters' => Serialize::map($options['webhookFilters'], function($e) { return $e; }), 'Webhooks.OnMessageSend.Url' => $options['webhooksOnMessageSendUrl'], 'Webhooks.OnMessageSend.Method' => $options['webhooksOnMessageSendMethod'], 'Webhooks.OnMessageUpdate.Url' => $options['webhooksOnMessageUpdateUrl'], 'Webhooks.OnMessageUpdate.Method' => $options['webhooksOnMessageUpdateMethod'], 'Webhooks.OnMessageRemove.Url' => $options['webhooksOnMessageRemoveUrl'], 'Webhooks.OnMessageRemove.Method' => $options['webhooksOnMessageRemoveMethod'], 'Webhooks.OnChannelAdd.Url' => $options['webhooksOnChannelAddUrl'], 'Webhooks.OnChannelAdd.Method' => $options['webhooksOnChannelAddMethod'], 'Webhooks.OnChannelDestroy.Url' => $options['webhooksOnChannelDestroyUrl'], 'Webhooks.OnChannelDestroy.Method' => $options['webhooksOnChannelDestroyMethod'], 'Webhooks.OnChannelUpdate.Url' => $options['webhooksOnChannelUpdateUrl'], 'Webhooks.OnChannelUpdate.Method' => $options['webhooksOnChannelUpdateMethod'], 'Webhooks.OnMemberAdd.Url' => $options['webhooksOnMemberAddUrl'], 'Webhooks.OnMemberAdd.Method' => $options['webhooksOnMemberAddMethod'], 'Webhooks.OnMemberRemove.Url' => $options['webhooksOnMemberRemoveUrl'], 'Webhooks.OnMemberRemove.Method' => $options['webhooksOnMemberRemoveMethod'], 'Webhooks.OnMessageSent.Url' => $options['webhooksOnMessageSentUrl'], 'Webhooks.OnMessageSent.Method' => $options['webhooksOnMessageSentMethod'], 'Webhooks.OnMessageUpdated.Url' => $options['webhooksOnMessageUpdatedUrl'], 'Webhooks.OnMessageUpdated.Method' => $options['webhooksOnMessageUpdatedMethod'], 'Webhooks.OnMessageRemoved.Url' => $options['webhooksOnMessageRemovedUrl'], 'Webhooks.OnMessageRemoved.Method' => $options['webhooksOnMessageRemovedMethod'], 'Webhooks.OnChannelAdded.Url' => $options['webhooksOnChannelAddedUrl'], 'Webhooks.OnChannelAdded.Method' => $options['webhooksOnChannelAddedMethod'], 'Webhooks.OnChannelDestroyed.Url' => $options['webhooksOnChannelDestroyedUrl'], 'Webhooks.OnChannelDestroyed.Method' => $options['webhooksOnChannelDestroyedMethod'], 'Webhooks.OnChannelUpdated.Url' => $options['webhooksOnChannelUpdatedUrl'], 'Webhooks.OnChannelUpdated.Method' => $options['webhooksOnChannelUpdatedMethod'], 'Webhooks.OnMemberAdded.Url' => $options['webhooksOnMemberAddedUrl'], 'Webhooks.OnMemberAdded.Method' => $options['webhooksOnMemberAddedMethod'], 'Webhooks.OnMemberRemoved.Url' => $options['webhooksOnMemberRemovedUrl'], 'Webhooks.OnMemberRemoved.Method' => $options['webhooksOnMemberRemovedMethod'], 'Limits.ChannelMembers' => $options['limitsChannelMembers'], 'Limits.UserChannels' => $options['limitsUserChannels'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the channels */ protected function getChannels(): ChannelList { if (!$this->_channels) { $this->_channels = new ChannelList($this->version, $this->solution['sid']); } return $this->_channels; } /** * Access the roles */ protected function getRoles(): RoleList { if (!$this->_roles) { $this->_roles = new RoleList($this->version, $this->solution['sid']); } return $this->_roles; } /** * Access the users */ protected function getUsers(): UserList { if (!$this->_users) { $this->_users = new UserList($this->version, $this->solution['sid']); } return $this->_users; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[VN 0Twilio/Rest/IpMessaging/V1/CredentialContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Credentials/' . \rawurlencode($sid) . ''; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.CredentialContext ' . \implode(' ', $context) . ']'; } }PKt[:2"-Twilio/Rest/IpMessaging/V1/CredentialList.phpnu[solution = []; $this->uri = '/Credentials'; } /** * Streams CredentialInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CredentialInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CredentialInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CredentialInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CredentialPage Page of CredentialInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialPage Page of CredentialInstance */ public function getPage(string $targetUrl): CredentialPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialPage($this->version, $response, $this->solution); } /** * Create the CredentialInstance * * @param string $type The type * @param array|Options $options Optional Arguments * @return CredentialInstance Created CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'Type' => $type, 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload); } /** * Constructs a CredentialContext * * @param string $sid The sid */ public function getContext(string $sid): CredentialContext { return new CredentialContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.CredentialList]'; } }PKt[Έ1Twilio/Rest/IpMessaging/V1/CredentialInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'sandbox' => Values::array_get($payload, 'sandbox'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialContext Context for this CredentialInstance */ protected function proxy(): CredentialContext { if (!$this->context) { $this->context = new CredentialContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { return $this->proxy()->fetch(); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { return $this->proxy()->update($options); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V1.CredentialInstance ' . \implode(' ', $context) . ']'; } }PKt[zZ-Twilio/Rest/IpMessaging/V1/ServiceOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid; $this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid; $this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid; $this->options['readStatusEnabled'] = $readStatusEnabled; $this->options['reachabilityEnabled'] = $reachabilityEnabled; $this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout; $this->options['consumptionReportInterval'] = $consumptionReportInterval; $this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled; $this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate; $this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled; $this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate; $this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled; $this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate; $this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled; $this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate; $this->options['preWebhookUrl'] = $preWebhookUrl; $this->options['postWebhookUrl'] = $postWebhookUrl; $this->options['webhookMethod'] = $webhookMethod; $this->options['webhookFilters'] = $webhookFilters; $this->options['webhooksOnMessageSendUrl'] = $webhooksOnMessageSendUrl; $this->options['webhooksOnMessageSendMethod'] = $webhooksOnMessageSendMethod; $this->options['webhooksOnMessageUpdateUrl'] = $webhooksOnMessageUpdateUrl; $this->options['webhooksOnMessageUpdateMethod'] = $webhooksOnMessageUpdateMethod; $this->options['webhooksOnMessageRemoveUrl'] = $webhooksOnMessageRemoveUrl; $this->options['webhooksOnMessageRemoveMethod'] = $webhooksOnMessageRemoveMethod; $this->options['webhooksOnChannelAddUrl'] = $webhooksOnChannelAddUrl; $this->options['webhooksOnChannelAddMethod'] = $webhooksOnChannelAddMethod; $this->options['webhooksOnChannelDestroyUrl'] = $webhooksOnChannelDestroyUrl; $this->options['webhooksOnChannelDestroyMethod'] = $webhooksOnChannelDestroyMethod; $this->options['webhooksOnChannelUpdateUrl'] = $webhooksOnChannelUpdateUrl; $this->options['webhooksOnChannelUpdateMethod'] = $webhooksOnChannelUpdateMethod; $this->options['webhooksOnMemberAddUrl'] = $webhooksOnMemberAddUrl; $this->options['webhooksOnMemberAddMethod'] = $webhooksOnMemberAddMethod; $this->options['webhooksOnMemberRemoveUrl'] = $webhooksOnMemberRemoveUrl; $this->options['webhooksOnMemberRemoveMethod'] = $webhooksOnMemberRemoveMethod; $this->options['webhooksOnMessageSentUrl'] = $webhooksOnMessageSentUrl; $this->options['webhooksOnMessageSentMethod'] = $webhooksOnMessageSentMethod; $this->options['webhooksOnMessageUpdatedUrl'] = $webhooksOnMessageUpdatedUrl; $this->options['webhooksOnMessageUpdatedMethod'] = $webhooksOnMessageUpdatedMethod; $this->options['webhooksOnMessageRemovedUrl'] = $webhooksOnMessageRemovedUrl; $this->options['webhooksOnMessageRemovedMethod'] = $webhooksOnMessageRemovedMethod; $this->options['webhooksOnChannelAddedUrl'] = $webhooksOnChannelAddedUrl; $this->options['webhooksOnChannelAddedMethod'] = $webhooksOnChannelAddedMethod; $this->options['webhooksOnChannelDestroyedUrl'] = $webhooksOnChannelDestroyedUrl; $this->options['webhooksOnChannelDestroyedMethod'] = $webhooksOnChannelDestroyedMethod; $this->options['webhooksOnChannelUpdatedUrl'] = $webhooksOnChannelUpdatedUrl; $this->options['webhooksOnChannelUpdatedMethod'] = $webhooksOnChannelUpdatedMethod; $this->options['webhooksOnMemberAddedUrl'] = $webhooksOnMemberAddedUrl; $this->options['webhooksOnMemberAddedMethod'] = $webhooksOnMemberAddedMethod; $this->options['webhooksOnMemberRemovedUrl'] = $webhooksOnMemberRemovedUrl; $this->options['webhooksOnMemberRemovedMethod'] = $webhooksOnMemberRemovedMethod; $this->options['limitsChannelMembers'] = $limitsChannelMembers; $this->options['limitsUserChannels'] = $limitsUserChannels; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The default_service_role_sid * * @param string $defaultServiceRoleSid The default_service_role_sid * @return $this Fluent Builder */ public function setDefaultServiceRoleSid(string $defaultServiceRoleSid): self { $this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid; return $this; } /** * The default_channel_role_sid * * @param string $defaultChannelRoleSid The default_channel_role_sid * @return $this Fluent Builder */ public function setDefaultChannelRoleSid(string $defaultChannelRoleSid): self { $this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid; return $this; } /** * The default_channel_creator_role_sid * * @param string $defaultChannelCreatorRoleSid The * default_channel_creator_role_sid * @return $this Fluent Builder */ public function setDefaultChannelCreatorRoleSid(string $defaultChannelCreatorRoleSid): self { $this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid; return $this; } /** * The read_status_enabled * * @param bool $readStatusEnabled The read_status_enabled * @return $this Fluent Builder */ public function setReadStatusEnabled(bool $readStatusEnabled): self { $this->options['readStatusEnabled'] = $readStatusEnabled; return $this; } /** * The reachability_enabled * * @param bool $reachabilityEnabled The reachability_enabled * @return $this Fluent Builder */ public function setReachabilityEnabled(bool $reachabilityEnabled): self { $this->options['reachabilityEnabled'] = $reachabilityEnabled; return $this; } /** * The typing_indicator_timeout * * @param int $typingIndicatorTimeout The typing_indicator_timeout * @return $this Fluent Builder */ public function setTypingIndicatorTimeout(int $typingIndicatorTimeout): self { $this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout; return $this; } /** * The consumption_report_interval * * @param int $consumptionReportInterval The consumption_report_interval * @return $this Fluent Builder */ public function setConsumptionReportInterval(int $consumptionReportInterval): self { $this->options['consumptionReportInterval'] = $consumptionReportInterval; return $this; } /** * The notifications.new_message.enabled * * @param bool $notificationsNewMessageEnabled The * notifications.new_message.enabled * @return $this Fluent Builder */ public function setNotificationsNewMessageEnabled(bool $notificationsNewMessageEnabled): self { $this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled; return $this; } /** * The notifications.new_message.template * * @param string $notificationsNewMessageTemplate The * notifications.new_message.template * @return $this Fluent Builder */ public function setNotificationsNewMessageTemplate(string $notificationsNewMessageTemplate): self { $this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate; return $this; } /** * The notifications.added_to_channel.enabled * * @param bool $notificationsAddedToChannelEnabled The * notifications.added_to_channel.enabled * @return $this Fluent Builder */ public function setNotificationsAddedToChannelEnabled(bool $notificationsAddedToChannelEnabled): self { $this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled; return $this; } /** * The notifications.added_to_channel.template * * @param string $notificationsAddedToChannelTemplate The * notifications.added_to_channel.template * @return $this Fluent Builder */ public function setNotificationsAddedToChannelTemplate(string $notificationsAddedToChannelTemplate): self { $this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate; return $this; } /** * The notifications.removed_from_channel.enabled * * @param bool $notificationsRemovedFromChannelEnabled The * notifications.removed_from_channel.enabled * @return $this Fluent Builder */ public function setNotificationsRemovedFromChannelEnabled(bool $notificationsRemovedFromChannelEnabled): self { $this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled; return $this; } /** * The notifications.removed_from_channel.template * * @param string $notificationsRemovedFromChannelTemplate The * notifications.removed_from_channel.template * @return $this Fluent Builder */ public function setNotificationsRemovedFromChannelTemplate(string $notificationsRemovedFromChannelTemplate): self { $this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate; return $this; } /** * The notifications.invited_to_channel.enabled * * @param bool $notificationsInvitedToChannelEnabled The * notifications.invited_to_channel.enabled * @return $this Fluent Builder */ public function setNotificationsInvitedToChannelEnabled(bool $notificationsInvitedToChannelEnabled): self { $this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled; return $this; } /** * The notifications.invited_to_channel.template * * @param string $notificationsInvitedToChannelTemplate The * notifications.invited_to_channel.template * @return $this Fluent Builder */ public function setNotificationsInvitedToChannelTemplate(string $notificationsInvitedToChannelTemplate): self { $this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate; return $this; } /** * The pre_webhook_url * * @param string $preWebhookUrl The pre_webhook_url * @return $this Fluent Builder */ public function setPreWebhookUrl(string $preWebhookUrl): self { $this->options['preWebhookUrl'] = $preWebhookUrl; return $this; } /** * The post_webhook_url * * @param string $postWebhookUrl The post_webhook_url * @return $this Fluent Builder */ public function setPostWebhookUrl(string $postWebhookUrl): self { $this->options['postWebhookUrl'] = $postWebhookUrl; return $this; } /** * The webhook_method * * @param string $webhookMethod The webhook_method * @return $this Fluent Builder */ public function setWebhookMethod(string $webhookMethod): self { $this->options['webhookMethod'] = $webhookMethod; return $this; } /** * The webhook_filters * * @param string[] $webhookFilters The webhook_filters * @return $this Fluent Builder */ public function setWebhookFilters(array $webhookFilters): self { $this->options['webhookFilters'] = $webhookFilters; return $this; } /** * The webhooks.on_message_send.url * * @param string $webhooksOnMessageSendUrl The webhooks.on_message_send.url * @return $this Fluent Builder */ public function setWebhooksOnMessageSendUrl(string $webhooksOnMessageSendUrl): self { $this->options['webhooksOnMessageSendUrl'] = $webhooksOnMessageSendUrl; return $this; } /** * The webhooks.on_message_send.method * * @param string $webhooksOnMessageSendMethod The * webhooks.on_message_send.method * @return $this Fluent Builder */ public function setWebhooksOnMessageSendMethod(string $webhooksOnMessageSendMethod): self { $this->options['webhooksOnMessageSendMethod'] = $webhooksOnMessageSendMethod; return $this; } /** * The webhooks.on_message_update.url * * @param string $webhooksOnMessageUpdateUrl The webhooks.on_message_update.url * @return $this Fluent Builder */ public function setWebhooksOnMessageUpdateUrl(string $webhooksOnMessageUpdateUrl): self { $this->options['webhooksOnMessageUpdateUrl'] = $webhooksOnMessageUpdateUrl; return $this; } /** * The webhooks.on_message_update.method * * @param string $webhooksOnMessageUpdateMethod The * webhooks.on_message_update.method * @return $this Fluent Builder */ public function setWebhooksOnMessageUpdateMethod(string $webhooksOnMessageUpdateMethod): self { $this->options['webhooksOnMessageUpdateMethod'] = $webhooksOnMessageUpdateMethod; return $this; } /** * The webhooks.on_message_remove.url * * @param string $webhooksOnMessageRemoveUrl The webhooks.on_message_remove.url * @return $this Fluent Builder */ public function setWebhooksOnMessageRemoveUrl(string $webhooksOnMessageRemoveUrl): self { $this->options['webhooksOnMessageRemoveUrl'] = $webhooksOnMessageRemoveUrl; return $this; } /** * The webhooks.on_message_remove.method * * @param string $webhooksOnMessageRemoveMethod The * webhooks.on_message_remove.method * @return $this Fluent Builder */ public function setWebhooksOnMessageRemoveMethod(string $webhooksOnMessageRemoveMethod): self { $this->options['webhooksOnMessageRemoveMethod'] = $webhooksOnMessageRemoveMethod; return $this; } /** * The webhooks.on_channel_add.url * * @param string $webhooksOnChannelAddUrl The webhooks.on_channel_add.url * @return $this Fluent Builder */ public function setWebhooksOnChannelAddUrl(string $webhooksOnChannelAddUrl): self { $this->options['webhooksOnChannelAddUrl'] = $webhooksOnChannelAddUrl; return $this; } /** * The webhooks.on_channel_add.method * * @param string $webhooksOnChannelAddMethod The webhooks.on_channel_add.method * @return $this Fluent Builder */ public function setWebhooksOnChannelAddMethod(string $webhooksOnChannelAddMethod): self { $this->options['webhooksOnChannelAddMethod'] = $webhooksOnChannelAddMethod; return $this; } /** * The webhooks.on_channel_destroy.url * * @param string $webhooksOnChannelDestroyUrl The * webhooks.on_channel_destroy.url * @return $this Fluent Builder */ public function setWebhooksOnChannelDestroyUrl(string $webhooksOnChannelDestroyUrl): self { $this->options['webhooksOnChannelDestroyUrl'] = $webhooksOnChannelDestroyUrl; return $this; } /** * The webhooks.on_channel_destroy.method * * @param string $webhooksOnChannelDestroyMethod The * webhooks.on_channel_destroy.method * @return $this Fluent Builder */ public function setWebhooksOnChannelDestroyMethod(string $webhooksOnChannelDestroyMethod): self { $this->options['webhooksOnChannelDestroyMethod'] = $webhooksOnChannelDestroyMethod; return $this; } /** * The webhooks.on_channel_update.url * * @param string $webhooksOnChannelUpdateUrl The webhooks.on_channel_update.url * @return $this Fluent Builder */ public function setWebhooksOnChannelUpdateUrl(string $webhooksOnChannelUpdateUrl): self { $this->options['webhooksOnChannelUpdateUrl'] = $webhooksOnChannelUpdateUrl; return $this; } /** * The webhooks.on_channel_update.method * * @param string $webhooksOnChannelUpdateMethod The * webhooks.on_channel_update.method * @return $this Fluent Builder */ public function setWebhooksOnChannelUpdateMethod(string $webhooksOnChannelUpdateMethod): self { $this->options['webhooksOnChannelUpdateMethod'] = $webhooksOnChannelUpdateMethod; return $this; } /** * The webhooks.on_member_add.url * * @param string $webhooksOnMemberAddUrl The webhooks.on_member_add.url * @return $this Fluent Builder */ public function setWebhooksOnMemberAddUrl(string $webhooksOnMemberAddUrl): self { $this->options['webhooksOnMemberAddUrl'] = $webhooksOnMemberAddUrl; return $this; } /** * The webhooks.on_member_add.method * * @param string $webhooksOnMemberAddMethod The webhooks.on_member_add.method * @return $this Fluent Builder */ public function setWebhooksOnMemberAddMethod(string $webhooksOnMemberAddMethod): self { $this->options['webhooksOnMemberAddMethod'] = $webhooksOnMemberAddMethod; return $this; } /** * The webhooks.on_member_remove.url * * @param string $webhooksOnMemberRemoveUrl The webhooks.on_member_remove.url * @return $this Fluent Builder */ public function setWebhooksOnMemberRemoveUrl(string $webhooksOnMemberRemoveUrl): self { $this->options['webhooksOnMemberRemoveUrl'] = $webhooksOnMemberRemoveUrl; return $this; } /** * The webhooks.on_member_remove.method * * @param string $webhooksOnMemberRemoveMethod The * webhooks.on_member_remove.method * @return $this Fluent Builder */ public function setWebhooksOnMemberRemoveMethod(string $webhooksOnMemberRemoveMethod): self { $this->options['webhooksOnMemberRemoveMethod'] = $webhooksOnMemberRemoveMethod; return $this; } /** * The webhooks.on_message_sent.url * * @param string $webhooksOnMessageSentUrl The webhooks.on_message_sent.url * @return $this Fluent Builder */ public function setWebhooksOnMessageSentUrl(string $webhooksOnMessageSentUrl): self { $this->options['webhooksOnMessageSentUrl'] = $webhooksOnMessageSentUrl; return $this; } /** * The webhooks.on_message_sent.method * * @param string $webhooksOnMessageSentMethod The * webhooks.on_message_sent.method * @return $this Fluent Builder */ public function setWebhooksOnMessageSentMethod(string $webhooksOnMessageSentMethod): self { $this->options['webhooksOnMessageSentMethod'] = $webhooksOnMessageSentMethod; return $this; } /** * The webhooks.on_message_updated.url * * @param string $webhooksOnMessageUpdatedUrl The * webhooks.on_message_updated.url * @return $this Fluent Builder */ public function setWebhooksOnMessageUpdatedUrl(string $webhooksOnMessageUpdatedUrl): self { $this->options['webhooksOnMessageUpdatedUrl'] = $webhooksOnMessageUpdatedUrl; return $this; } /** * The webhooks.on_message_updated.method * * @param string $webhooksOnMessageUpdatedMethod The * webhooks.on_message_updated.method * @return $this Fluent Builder */ public function setWebhooksOnMessageUpdatedMethod(string $webhooksOnMessageUpdatedMethod): self { $this->options['webhooksOnMessageUpdatedMethod'] = $webhooksOnMessageUpdatedMethod; return $this; } /** * The webhooks.on_message_removed.url * * @param string $webhooksOnMessageRemovedUrl The * webhooks.on_message_removed.url * @return $this Fluent Builder */ public function setWebhooksOnMessageRemovedUrl(string $webhooksOnMessageRemovedUrl): self { $this->options['webhooksOnMessageRemovedUrl'] = $webhooksOnMessageRemovedUrl; return $this; } /** * The webhooks.on_message_removed.method * * @param string $webhooksOnMessageRemovedMethod The * webhooks.on_message_removed.method * @return $this Fluent Builder */ public function setWebhooksOnMessageRemovedMethod(string $webhooksOnMessageRemovedMethod): self { $this->options['webhooksOnMessageRemovedMethod'] = $webhooksOnMessageRemovedMethod; return $this; } /** * The webhooks.on_channel_added.url * * @param string $webhooksOnChannelAddedUrl The webhooks.on_channel_added.url * @return $this Fluent Builder */ public function setWebhooksOnChannelAddedUrl(string $webhooksOnChannelAddedUrl): self { $this->options['webhooksOnChannelAddedUrl'] = $webhooksOnChannelAddedUrl; return $this; } /** * The webhooks.on_channel_added.method * * @param string $webhooksOnChannelAddedMethod The * webhooks.on_channel_added.method * @return $this Fluent Builder */ public function setWebhooksOnChannelAddedMethod(string $webhooksOnChannelAddedMethod): self { $this->options['webhooksOnChannelAddedMethod'] = $webhooksOnChannelAddedMethod; return $this; } /** * The webhooks.on_channel_destroyed.url * * @param string $webhooksOnChannelDestroyedUrl The * webhooks.on_channel_destroyed.url * @return $this Fluent Builder */ public function setWebhooksOnChannelDestroyedUrl(string $webhooksOnChannelDestroyedUrl): self { $this->options['webhooksOnChannelDestroyedUrl'] = $webhooksOnChannelDestroyedUrl; return $this; } /** * The webhooks.on_channel_destroyed.method * * @param string $webhooksOnChannelDestroyedMethod The * webhooks.on_channel_destroyed.method * @return $this Fluent Builder */ public function setWebhooksOnChannelDestroyedMethod(string $webhooksOnChannelDestroyedMethod): self { $this->options['webhooksOnChannelDestroyedMethod'] = $webhooksOnChannelDestroyedMethod; return $this; } /** * The webhooks.on_channel_updated.url * * @param string $webhooksOnChannelUpdatedUrl The * webhooks.on_channel_updated.url * @return $this Fluent Builder */ public function setWebhooksOnChannelUpdatedUrl(string $webhooksOnChannelUpdatedUrl): self { $this->options['webhooksOnChannelUpdatedUrl'] = $webhooksOnChannelUpdatedUrl; return $this; } /** * The webhooks.on_channel_updated.method * * @param string $webhooksOnChannelUpdatedMethod The * webhooks.on_channel_updated.method * @return $this Fluent Builder */ public function setWebhooksOnChannelUpdatedMethod(string $webhooksOnChannelUpdatedMethod): self { $this->options['webhooksOnChannelUpdatedMethod'] = $webhooksOnChannelUpdatedMethod; return $this; } /** * The webhooks.on_member_added.url * * @param string $webhooksOnMemberAddedUrl The webhooks.on_member_added.url * @return $this Fluent Builder */ public function setWebhooksOnMemberAddedUrl(string $webhooksOnMemberAddedUrl): self { $this->options['webhooksOnMemberAddedUrl'] = $webhooksOnMemberAddedUrl; return $this; } /** * The webhooks.on_member_added.method * * @param string $webhooksOnMemberAddedMethod The * webhooks.on_member_added.method * @return $this Fluent Builder */ public function setWebhooksOnMemberAddedMethod(string $webhooksOnMemberAddedMethod): self { $this->options['webhooksOnMemberAddedMethod'] = $webhooksOnMemberAddedMethod; return $this; } /** * The webhooks.on_member_removed.url * * @param string $webhooksOnMemberRemovedUrl The webhooks.on_member_removed.url * @return $this Fluent Builder */ public function setWebhooksOnMemberRemovedUrl(string $webhooksOnMemberRemovedUrl): self { $this->options['webhooksOnMemberRemovedUrl'] = $webhooksOnMemberRemovedUrl; return $this; } /** * The webhooks.on_member_removed.method * * @param string $webhooksOnMemberRemovedMethod The * webhooks.on_member_removed.method * @return $this Fluent Builder */ public function setWebhooksOnMemberRemovedMethod(string $webhooksOnMemberRemovedMethod): self { $this->options['webhooksOnMemberRemovedMethod'] = $webhooksOnMemberRemovedMethod; return $this; } /** * The limits.channel_members * * @param int $limitsChannelMembers The limits.channel_members * @return $this Fluent Builder */ public function setLimitsChannelMembers(int $limitsChannelMembers): self { $this->options['limitsChannelMembers'] = $limitsChannelMembers; return $this; } /** * The limits.user_channels * * @param int $limitsUserChannels The limits.user_channels * @return $this Fluent Builder */ public function setLimitsUserChannels(int $limitsUserChannels): self { $this->options['limitsUserChannels'] = $limitsUserChannels; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V1.UpdateServiceOptions ' . $options . ']'; } }PKt[W$*Twilio/Rest/IpMessaging/V1/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\IpMessaging\V1\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1.ServicePage]'; } }PKt[|P P Twilio/Rest/IpMessaging/V1.phpnu[version = 'v1'; } protected function getCredentials(): CredentialList { if (!$this->_credentials) { $this->_credentials = new CredentialList($this); } return $this->_credentials; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V1]'; } }PKt[[Ϛ-Twilio/Rest/IpMessaging/V2/CredentialPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CredentialInstance \Twilio\Rest\IpMessaging\V2\CredentialInstance */ public function buildInstance(array $payload): CredentialInstance { return new CredentialInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.CredentialPage]'; } }PKt[O7uKK0Twilio/Rest/IpMessaging/V2/CredentialOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The certificate * * @param string $certificate The certificate * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * The private_key * * @param string $privateKey The private_key * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * The sandbox * * @param bool $sandbox The sandbox * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * The api_key * * @param string $apiKey The api_key * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * The secret * * @param string $secret The secret * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.CreateCredentialOptions ' . $options . ']'; } } class UpdateCredentialOptions extends Options { /** * @param string $friendlyName The friendly_name * @param string $certificate The certificate * @param string $privateKey The private_key * @param bool $sandbox The sandbox * @param string $apiKey The api_key * @param string $secret The secret */ public function __construct(string $friendlyName = Values::NONE, string $certificate = Values::NONE, string $privateKey = Values::NONE, bool $sandbox = Values::NONE, string $apiKey = Values::NONE, string $secret = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['certificate'] = $certificate; $this->options['privateKey'] = $privateKey; $this->options['sandbox'] = $sandbox; $this->options['apiKey'] = $apiKey; $this->options['secret'] = $secret; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The certificate * * @param string $certificate The certificate * @return $this Fluent Builder */ public function setCertificate(string $certificate): self { $this->options['certificate'] = $certificate; return $this; } /** * The private_key * * @param string $privateKey The private_key * @return $this Fluent Builder */ public function setPrivateKey(string $privateKey): self { $this->options['privateKey'] = $privateKey; return $this; } /** * The sandbox * * @param bool $sandbox The sandbox * @return $this Fluent Builder */ public function setSandbox(bool $sandbox): self { $this->options['sandbox'] = $sandbox; return $this; } /** * The api_key * * @param string $apiKey The api_key * @return $this Fluent Builder */ public function setApiKey(string $apiKey): self { $this->options['apiKey'] = $apiKey; return $this; } /** * The secret * * @param string $secret The secret * @return $this Fluent Builder */ public function setSecret(string $secret): self { $this->options['secret'] = $secret; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.UpdateCredentialOptions ' . $options . ']'; } }PKt[5Twilio/Rest/IpMessaging/V2/Service/BindingContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings/' . \rawurlencode($sid) . ''; } /** * Fetch the BindingInstance * * @return BindingInstance Fetched BindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BindingInstance { $payload = $this->version->fetch('GET', $this->uri); return new BindingInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the BindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.BindingContext ' . \implode(' ', $context) . ']'; } }PKt[P[3Twilio/Rest/IpMessaging/V2/Service/UserInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'attributes' => Values::array_get($payload, 'attributes'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'roleSid' => Values::array_get($payload, 'role_sid'), 'identity' => Values::array_get($payload, 'identity'), 'isOnline' => Values::array_get($payload, 'is_online'), 'isNotifiable' => Values::array_get($payload, 'is_notifiable'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'joinedChannelsCount' => Values::array_get($payload, 'joined_channels_count'), 'links' => Values::array_get($payload, 'links'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserContext Context for this UserInstance */ protected function proxy(): UserContext { if (!$this->context) { $this->context = new UserContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { return $this->proxy()->fetch(); } /** * Delete the UserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { return $this->proxy()->update($options); } /** * Access the userChannels */ protected function getUserChannels(): UserChannelList { return $this->proxy()->userChannels; } /** * Access the userBindings */ protected function getUserBindings(): UserBindingList { return $this->proxy()->userBindings; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.UserInstance ' . \implode(' ', $context) . ']'; } }PKt[|995Twilio/Rest/IpMessaging/V2/Service/BindingOptions.phpnu[options['bindingType'] = $bindingType; $this->options['identity'] = $identity; } /** * The binding_type * * @param string[] $bindingType The binding_type * @return $this Fluent Builder */ public function setBindingType(array $bindingType): self { $this->options['bindingType'] = $bindingType; return $this; } /** * The identity * * @param string[] $identity The identity * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.ReadBindingOptions ' . $options . ']'; } }PKt[#6EE2Twilio/Rest/IpMessaging/V2/Service/UserOptions.phpnu[options['roleSid'] = $roleSid; $this->options['attributes'] = $attributes; $this->options['friendlyName'] = $friendlyName; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The role_sid * * @param string $roleSid The role_sid * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.CreateUserOptions ' . $options . ']'; } } class UpdateUserOptions extends Options { /** * @param string $roleSid The role_sid * @param string $attributes The attributes * @param string $friendlyName The friendly_name * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $roleSid = Values::NONE, string $attributes = Values::NONE, string $friendlyName = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['roleSid'] = $roleSid; $this->options['attributes'] = $attributes; $this->options['friendlyName'] = $friendlyName; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The role_sid * * @param string $roleSid The role_sid * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.UpdateUserOptions ' . $options . ']'; } }PKt[TEz0z05Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.phpnu[options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.DeleteChannelOptions ' . $options . ']'; } } class CreateChannelOptions extends Options { /** * @param string $friendlyName The friendly_name * @param string $uniqueName The unique_name * @param string $attributes The attributes * @param string $type The type * @param \DateTime $dateCreated The date_created * @param \DateTime $dateUpdated The date_updated * @param string $createdBy The created_by * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $friendlyName = Values::NONE, string $uniqueName = Values::NONE, string $attributes = Values::NONE, string $type = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $createdBy = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['attributes'] = $attributes; $this->options['type'] = $type; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['createdBy'] = $createdBy; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The type * * @param string $type The type * @return $this Fluent Builder */ public function setType(string $type): self { $this->options['type'] = $type; return $this; } /** * The date_created * * @param \DateTime $dateCreated The date_created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date_updated * * @param \DateTime $dateUpdated The date_updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The created_by * * @param string $createdBy The created_by * @return $this Fluent Builder */ public function setCreatedBy(string $createdBy): self { $this->options['createdBy'] = $createdBy; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.CreateChannelOptions ' . $options . ']'; } } class ReadChannelOptions extends Options { /** * @param string[] $type The type */ public function __construct(array $type = Values::ARRAY_NONE) { $this->options['type'] = $type; } /** * The type * * @param string[] $type The type * @return $this Fluent Builder */ public function setType(array $type): self { $this->options['type'] = $type; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.ReadChannelOptions ' . $options . ']'; } } class UpdateChannelOptions extends Options { /** * @param string $friendlyName The friendly_name * @param string $uniqueName The unique_name * @param string $attributes The attributes * @param \DateTime $dateCreated The date_created * @param \DateTime $dateUpdated The date_updated * @param string $createdBy The created_by * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $friendlyName = Values::NONE, string $uniqueName = Values::NONE, string $attributes = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $createdBy = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['uniqueName'] = $uniqueName; $this->options['attributes'] = $attributes; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['createdBy'] = $createdBy; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The date_created * * @param \DateTime $dateCreated The date_created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date_updated * * @param \DateTime $dateUpdated The date_updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The created_by * * @param string $createdBy The created_by * @return $this Fluent Builder */ public function setCreatedBy(string $createdBy): self { $this->options['createdBy'] = $createdBy; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.UpdateChannelOptions ' . $options . ']'; } }PKt[2Twilio/Rest/IpMessaging/V2/Service/ChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ChannelInstance \Twilio\Rest\IpMessaging\V2\Service\ChannelInstance */ public function buildInstance(array $payload): ChannelInstance { return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.ChannelPage]'; } }PKt[ײ^2Twilio/Rest/IpMessaging/V2/Service/ChannelList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels'; } /** * Create the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Created ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): ChannelInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Attributes' => $options['attributes'], 'Type' => $options['type'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'CreatedBy' => $options['createdBy'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams ChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ChannelInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ChannelInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ChannelPage Page of ChannelInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ChannelPage { $options = new Values($options); $params = Values::of([ 'Type' => Serialize::map($options['type'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ChannelPage Page of ChannelInstance */ public function getPage(string $targetUrl): ChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ChannelPage($this->version, $response, $this->solution); } /** * Constructs a ChannelContext * * @param string $sid The sid */ public function getContext(string $sid): ChannelContext { return new ChannelContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.ChannelList]'; } }PKt[L  :Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WebhookInstance \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookInstance */ public function buildInstance(array $payload): WebhookInstance { return new WebhookInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.WebhookPage]'; } }PKt[ؤb.2.2<Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.phpnu[options['roleSid'] = $roleSid; $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The role_sid * * @param string $roleSid The role_sid * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The last_consumed_message_index * * @param int $lastConsumedMessageIndex The last_consumed_message_index * @return $this Fluent Builder */ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self { $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; return $this; } /** * The last_consumption_timestamp * * @param \DateTime $lastConsumptionTimestamp The last_consumption_timestamp * @return $this Fluent Builder */ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self { $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; return $this; } /** * The date_created * * @param \DateTime $dateCreated The date_created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date_updated * * @param \DateTime $dateUpdated The date_updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.CreateMemberOptions ' . $options . ']'; } } class ReadMemberOptions extends Options { /** * @param string[] $identity The identity */ public function __construct(array $identity = Values::ARRAY_NONE) { $this->options['identity'] = $identity; } /** * The identity * * @param string[] $identity The identity * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.ReadMemberOptions ' . $options . ']'; } } class DeleteMemberOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.DeleteMemberOptions ' . $options . ']'; } } class UpdateMemberOptions extends Options { /** * @param string $roleSid The role_sid * @param int $lastConsumedMessageIndex The last_consumed_message_index * @param \DateTime $lastConsumptionTimestamp The last_consumption_timestamp * @param \DateTime $dateCreated The date_created * @param \DateTime $dateUpdated The date_updated * @param string $attributes The attributes * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $roleSid = Values::NONE, int $lastConsumedMessageIndex = Values::NONE, \DateTime $lastConsumptionTimestamp = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $attributes = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['roleSid'] = $roleSid; $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['attributes'] = $attributes; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The role_sid * * @param string $roleSid The role_sid * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * The last_consumed_message_index * * @param int $lastConsumedMessageIndex The last_consumed_message_index * @return $this Fluent Builder */ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self { $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; return $this; } /** * The last_consumption_timestamp * * @param \DateTime $lastConsumptionTimestamp The last_consumption_timestamp * @return $this Fluent Builder */ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self { $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; return $this; } /** * The date_created * * @param \DateTime $dateCreated The date_created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date_updated * * @param \DateTime $dateUpdated The date_updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.UpdateMemberOptions ' . $options . ']'; } }PKt[%|NN<Twilio/Rest/IpMessaging/V2/Service/Channel/MemberContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members/' . \rawurlencode($sid) . ''; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { $payload = $this->version->fetch('GET', $this->uri); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the MemberInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the MemberInstance * * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MemberInstance { $options = new Values($options); $data = Values::of([ 'RoleSid' => $options['roleSid'], 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'], 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']), 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.MemberContext ' . \implode(' ', $context) . ']'; } }PKt[<;:Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Webhooks'; } /** * Streams WebhookInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WebhookInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WebhookInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of WebhookInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WebhookPage Page of WebhookInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WebhookPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WebhookPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WebhookInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WebhookPage Page of WebhookInstance */ public function getPage(string $targetUrl): WebhookPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WebhookPage($this->version, $response, $this->solution); } /** * Create the WebhookInstance * * @param string $type The type * @param array|Options $options Optional Arguments * @return WebhookInstance Created WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'Type' => $type, 'Configuration.Url' => $options['configurationUrl'], 'Configuration.Method' => $options['configurationMethod'], 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }), 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }), 'Configuration.FlowSid' => $options['configurationFlowSid'], 'Configuration.RetryCount' => $options['configurationRetryCount'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WebhookInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Constructs a WebhookContext * * @param string $sid The sid */ public function getContext(string $sid): WebhookContext { return new WebhookContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.WebhookList]'; } }PKt[D@//=Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.phpnu[options['from'] = $from; $this->options['attributes'] = $attributes; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['lastUpdatedBy'] = $lastUpdatedBy; $this->options['body'] = $body; $this->options['mediaSid'] = $mediaSid; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The from * * @param string $from The from * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The date_created * * @param \DateTime $dateCreated The date_created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date_updated * * @param \DateTime $dateUpdated The date_updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The last_updated_by * * @param string $lastUpdatedBy The last_updated_by * @return $this Fluent Builder */ public function setLastUpdatedBy(string $lastUpdatedBy): self { $this->options['lastUpdatedBy'] = $lastUpdatedBy; return $this; } /** * The body * * @param string $body The body * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The media_sid * * @param string $mediaSid The media_sid * @return $this Fluent Builder */ public function setMediaSid(string $mediaSid): self { $this->options['mediaSid'] = $mediaSid; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.CreateMessageOptions ' . $options . ']'; } } class ReadMessageOptions extends Options { /** * @param string $order The order */ public function __construct(string $order = Values::NONE) { $this->options['order'] = $order; } /** * The order * * @param string $order The order * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.ReadMessageOptions ' . $options . ']'; } } class DeleteMessageOptions extends Options { /** * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $xTwilioWebhookEnabled = Values::NONE) { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.DeleteMessageOptions ' . $options . ']'; } } class UpdateMessageOptions extends Options { /** * @param string $body The body * @param string $attributes The attributes * @param \DateTime $dateCreated The date_created * @param \DateTime $dateUpdated The date_updated * @param string $lastUpdatedBy The last_updated_by * @param string $from The from * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header */ public function __construct(string $body = Values::NONE, string $attributes = Values::NONE, \DateTime $dateCreated = Values::NONE, \DateTime $dateUpdated = Values::NONE, string $lastUpdatedBy = Values::NONE, string $from = Values::NONE, string $xTwilioWebhookEnabled = Values::NONE) { $this->options['body'] = $body; $this->options['attributes'] = $attributes; $this->options['dateCreated'] = $dateCreated; $this->options['dateUpdated'] = $dateUpdated; $this->options['lastUpdatedBy'] = $lastUpdatedBy; $this->options['from'] = $from; $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; } /** * The body * * @param string $body The body * @return $this Fluent Builder */ public function setBody(string $body): self { $this->options['body'] = $body; return $this; } /** * The attributes * * @param string $attributes The attributes * @return $this Fluent Builder */ public function setAttributes(string $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * The date_created * * @param \DateTime $dateCreated The date_created * @return $this Fluent Builder */ public function setDateCreated(\DateTime $dateCreated): self { $this->options['dateCreated'] = $dateCreated; return $this; } /** * The date_updated * * @param \DateTime $dateUpdated The date_updated * @return $this Fluent Builder */ public function setDateUpdated(\DateTime $dateUpdated): self { $this->options['dateUpdated'] = $dateUpdated; return $this; } /** * The last_updated_by * * @param string $lastUpdatedBy The last_updated_by * @return $this Fluent Builder */ public function setLastUpdatedBy(string $lastUpdatedBy): self { $this->options['lastUpdatedBy'] = $lastUpdatedBy; return $this; } /** * The from * * @param string $from The from * @return $this Fluent Builder */ public function setFrom(string $from): self { $this->options['from'] = $from; return $this; } /** * The X-Twilio-Webhook-Enabled HTTP request header * * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP * request header * @return $this Fluent Builder */ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self { $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.UpdateMessageOptions ' . $options . ']'; } }PKt[H4}}=Twilio/Rest/IpMessaging/V2/Service/Channel/InviteInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'roleSid' => Values::array_get($payload, 'role_sid'), 'createdBy' => Values::array_get($payload, 'created_by'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return InviteContext Context for this InviteInstance */ protected function proxy(): InviteContext { if (!$this->context) { $this->context = new InviteContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the InviteInstance * * @return InviteInstance Fetched InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InviteInstance { return $this->proxy()->fetch(); } /** * Delete the InviteInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.InviteInstance ' . \implode(' ', $context) . ']'; } }PKt[伪  :Twilio/Rest/IpMessaging/V2/Service/Channel/MessagePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MessageInstance \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageInstance */ public function buildInstance(array $payload): MessageInstance { return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.MessagePage]'; } }PKt[Km:Twilio/Rest/IpMessaging/V2/Service/Channel/MessageList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages'; } /** * Create the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Created MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'From' => $options['from'], 'Attributes' => $options['attributes'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'LastUpdatedBy' => $options['lastUpdatedBy'], 'Body' => $options['body'], 'MediaSid' => $options['mediaSid'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams MessageInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MessageInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MessageInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MessageInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MessagePage Page of MessageInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MessagePage { $options = new Values($options); $params = Values::of([ 'Order' => $options['order'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MessagePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MessageInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MessagePage Page of MessageInstance */ public function getPage(string $targetUrl): MessagePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MessagePage($this->version, $response, $this->solution); } /** * Constructs a MessageContext * * @param string $sid The sid */ public function getContext(string $sid): MessageContext { return new MessageContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.MessageList]'; } }PKt[SC~~9Twilio/Rest/IpMessaging/V2/Service/Channel/MemberList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members'; } /** * Create the MemberInstance * * @param string $identity The identity * @param array|Options $options Optional Arguments * @return MemberInstance Created MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): MemberInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $identity, 'RoleSid' => $options['roleSid'], 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'], 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']), 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'Attributes' => $options['attributes'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams MemberInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MemberInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MemberInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of MemberInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MemberPage Page of MemberInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MemberPage { $options = new Values($options); $params = Values::of([ 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MemberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MemberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MemberPage Page of MemberInstance */ public function getPage(string $targetUrl): MemberPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MemberPage($this->version, $response, $this->solution); } /** * Constructs a MemberContext * * @param string $sid The sid */ public function getContext(string $sid): MemberContext { return new MemberContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.MemberList]'; } }PKt[9}}=Twilio/Rest/IpMessaging/V2/Service/Channel/MemberInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'roleSid' => Values::array_get($payload, 'role_sid'), 'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'), 'lastConsumptionTimestamp' => Deserialize::dateTime(Values::array_get($payload, 'last_consumption_timestamp')), 'url' => Values::array_get($payload, 'url'), 'attributes' => Values::array_get($payload, 'attributes'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MemberContext Context for this MemberInstance */ protected function proxy(): MemberContext { if (!$this->context) { $this->context = new MemberContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the MemberInstance * * @return MemberInstance Fetched MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MemberInstance { return $this->proxy()->fetch(); } /** * Delete the MemberInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the MemberInstance * * @param array|Options $options Optional Arguments * @return MemberInstance Updated MemberInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MemberInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.MemberInstance ' . \implode(' ', $context) . ']'; } }PKt[solution = $solution; } /** * @param array $payload Payload response from the API * @return MemberInstance \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberInstance */ public function buildInstance(array $payload): MemberInstance { return new MemberInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.MemberPage]'; } }PKt[J:O O =Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Webhooks/' . \rawurlencode($sid) . ''; } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { $payload = $this->version->fetch('GET', $this->uri); return new WebhookInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'Configuration.Url' => $options['configurationUrl'], 'Configuration.Method' => $options['configurationMethod'], 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function($e) { return $e; }), 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function($e) { return $e; }), 'Configuration.FlowSid' => $options['configurationFlowSid'], 'Configuration.RetryCount' => $options['configurationRetryCount'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WebhookInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.WebhookContext ' . \implode(' ', $context) . ']'; } }PKt[IWU =Twilio/Rest/IpMessaging/V2/Service/Channel/MessageContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages/' . \rawurlencode($sid) . ''; } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { $payload = $this->version->fetch('GET', $this->uri); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the MessageInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { $options = new Values($options); $data = Values::of([ 'Body' => $options['body'], 'Attributes' => $options['attributes'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'LastUpdatedBy' => $options['lastUpdatedBy'], 'From' => $options['from'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new MessageInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.MessageContext ' . \implode(' ', $context) . ']'; } }PKt[U^^>Twilio/Rest/IpMessaging/V2/Service/Channel/MessageInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'attributes' => Values::array_get($payload, 'attributes'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'to' => Values::array_get($payload, 'to'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'lastUpdatedBy' => Values::array_get($payload, 'last_updated_by'), 'wasEdited' => Values::array_get($payload, 'was_edited'), 'from' => Values::array_get($payload, 'from'), 'body' => Values::array_get($payload, 'body'), 'index' => Values::array_get($payload, 'index'), 'type' => Values::array_get($payload, 'type'), 'media' => Values::array_get($payload, 'media'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MessageContext Context for this MessageInstance */ protected function proxy(): MessageContext { if (!$this->context) { $this->context = new MessageContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the MessageInstance * * @return MessageInstance Fetched MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessageInstance { return $this->proxy()->fetch(); } /** * Delete the MessageInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the MessageInstance * * @param array|Options $options Optional Arguments * @return MessageInstance Updated MessageInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): MessageInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.MessageInstance ' . \implode(' ', $context) . ']'; } }PKt[س@ @ <Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.phpnu[options['roleSid'] = $roleSid; } /** * The role_sid * * @param string $roleSid The role_sid * @return $this Fluent Builder */ public function setRoleSid(string $roleSid): self { $this->options['roleSid'] = $roleSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.CreateInviteOptions ' . $options . ']'; } } class ReadInviteOptions extends Options { /** * @param string[] $identity The identity */ public function __construct(array $identity = Values::ARRAY_NONE) { $this->options['identity'] = $identity; } /** * The identity * * @param string[] $identity The identity * @return $this Fluent Builder */ public function setIdentity(array $identity): self { $this->options['identity'] = $identity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.ReadInviteOptions ' . $options . ']'; } }PKt[O{oq[[9Twilio/Rest/IpMessaging/V2/Service/Channel/InviteList.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites'; } /** * Create the InviteInstance * * @param string $identity The identity * @param array|Options $options Optional Arguments * @return InviteInstance Created InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): InviteInstance { $options = new Values($options); $data = Values::of(['Identity' => $identity, 'RoleSid' => $options['roleSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Streams InviteInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads InviteInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return InviteInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of InviteInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return InvitePage Page of InviteInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): InvitePage { $options = new Values($options); $params = Values::of([ 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new InvitePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of InviteInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return InvitePage Page of InviteInstance */ public function getPage(string $targetUrl): InvitePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new InvitePage($this->version, $response, $this->solution); } /** * Constructs a InviteContext * * @param string $sid The sid */ public function getContext(string $sid): InviteContext { return new InviteContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.InviteList]'; } }PKt[ :9Twilio/Rest/IpMessaging/V2/Service/Channel/InvitePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return InviteInstance \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteInstance */ public function buildInstance(array $payload): InviteInstance { return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.InvitePage]'; } }PKt[3^%hh<Twilio/Rest/IpMessaging/V2/Service/Channel/InviteContext.phpnu[solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites/' . \rawurlencode($sid) . ''; } /** * Fetch the InviteInstance * * @return InviteInstance Fetched InviteInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): InviteInstance { $payload = $this->version->fetch('GET', $this->uri); return new InviteInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } /** * Delete the InviteInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.InviteContext ' . \implode(' ', $context) . ']'; } }PKt[ P<>Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'type' => Values::array_get($payload, 'type'), 'url' => Values::array_get($payload, 'url'), 'configuration' => Values::array_get($payload, 'configuration'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WebhookContext Context for this WebhookInstance */ protected function proxy(): WebhookContext { if (!$this->context) { $this->context = new WebhookContext( $this->version, $this->solution['serviceSid'], $this->solution['channelSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { return $this->proxy()->fetch(); } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { return $this->proxy()->update($options); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.WebhookInstance ' . \implode(' ', $context) . ']'; } }PKt[$$=Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.phpnu[options['configurationUrl'] = $configurationUrl; $this->options['configurationMethod'] = $configurationMethod; $this->options['configurationFilters'] = $configurationFilters; $this->options['configurationTriggers'] = $configurationTriggers; $this->options['configurationFlowSid'] = $configurationFlowSid; $this->options['configurationRetryCount'] = $configurationRetryCount; } /** * The configuration.url * * @param string $configurationUrl The configuration.url * @return $this Fluent Builder */ public function setConfigurationUrl(string $configurationUrl): self { $this->options['configurationUrl'] = $configurationUrl; return $this; } /** * The configuration.method * * @param string $configurationMethod The configuration.method * @return $this Fluent Builder */ public function setConfigurationMethod(string $configurationMethod): self { $this->options['configurationMethod'] = $configurationMethod; return $this; } /** * The configuration.filters * * @param string[] $configurationFilters The configuration.filters * @return $this Fluent Builder */ public function setConfigurationFilters(array $configurationFilters): self { $this->options['configurationFilters'] = $configurationFilters; return $this; } /** * The configuration.triggers * * @param string[] $configurationTriggers The configuration.triggers * @return $this Fluent Builder */ public function setConfigurationTriggers(array $configurationTriggers): self { $this->options['configurationTriggers'] = $configurationTriggers; return $this; } /** * The configuration.flow_sid * * @param string $configurationFlowSid The configuration.flow_sid * @return $this Fluent Builder */ public function setConfigurationFlowSid(string $configurationFlowSid): self { $this->options['configurationFlowSid'] = $configurationFlowSid; return $this; } /** * The configuration.retry_count * * @param int $configurationRetryCount The configuration.retry_count * @return $this Fluent Builder */ public function setConfigurationRetryCount(int $configurationRetryCount): self { $this->options['configurationRetryCount'] = $configurationRetryCount; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.CreateWebhookOptions ' . $options . ']'; } } class UpdateWebhookOptions extends Options { /** * @param string $configurationUrl The configuration.url * @param string $configurationMethod The configuration.method * @param string[] $configurationFilters The configuration.filters * @param string[] $configurationTriggers The configuration.triggers * @param string $configurationFlowSid The configuration.flow_sid * @param int $configurationRetryCount The configuration.retry_count */ public function __construct(string $configurationUrl = Values::NONE, string $configurationMethod = Values::NONE, array $configurationFilters = Values::ARRAY_NONE, array $configurationTriggers = Values::ARRAY_NONE, string $configurationFlowSid = Values::NONE, int $configurationRetryCount = Values::NONE) { $this->options['configurationUrl'] = $configurationUrl; $this->options['configurationMethod'] = $configurationMethod; $this->options['configurationFilters'] = $configurationFilters; $this->options['configurationTriggers'] = $configurationTriggers; $this->options['configurationFlowSid'] = $configurationFlowSid; $this->options['configurationRetryCount'] = $configurationRetryCount; } /** * The configuration.url * * @param string $configurationUrl The configuration.url * @return $this Fluent Builder */ public function setConfigurationUrl(string $configurationUrl): self { $this->options['configurationUrl'] = $configurationUrl; return $this; } /** * The configuration.method * * @param string $configurationMethod The configuration.method * @return $this Fluent Builder */ public function setConfigurationMethod(string $configurationMethod): self { $this->options['configurationMethod'] = $configurationMethod; return $this; } /** * The configuration.filters * * @param string[] $configurationFilters The configuration.filters * @return $this Fluent Builder */ public function setConfigurationFilters(array $configurationFilters): self { $this->options['configurationFilters'] = $configurationFilters; return $this; } /** * The configuration.triggers * * @param string[] $configurationTriggers The configuration.triggers * @return $this Fluent Builder */ public function setConfigurationTriggers(array $configurationTriggers): self { $this->options['configurationTriggers'] = $configurationTriggers; return $this; } /** * The configuration.flow_sid * * @param string $configurationFlowSid The configuration.flow_sid * @return $this Fluent Builder */ public function setConfigurationFlowSid(string $configurationFlowSid): self { $this->options['configurationFlowSid'] = $configurationFlowSid; return $this; } /** * The configuration.retry_count * * @param int $configurationRetryCount The configuration.retry_count * @return $this Fluent Builder */ public function setConfigurationRetryCount(int $configurationRetryCount): self { $this->options['configurationRetryCount'] = $configurationRetryCount; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.UpdateWebhookOptions ' . $options . ']'; } }PKt[ O2Twilio/Rest/IpMessaging/V2/Service/UserContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($sid) . ''; } /** * Fetch the UserInstance * * @return UserInstance Fetched UserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the UserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the UserInstance * * @param array|Options $options Optional Arguments * @return UserInstance Updated UserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'RoleSid' => $options['roleSid'], 'Attributes' => $options['attributes'], 'FriendlyName' => $options['friendlyName'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new UserInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the userChannels */ protected function getUserChannels(): UserChannelList { if (!$this->_userChannels) { $this->_userChannels = new UserChannelList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_userChannels; } /** * Access the userBindings */ protected function getUserBindings(): UserBindingList { if (!$this->_userBindings) { $this->_userBindings = new UserBindingList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_userBindings; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.UserContext ' . \implode(' ', $context) . ']'; } }PKt[;Qe2Twilio/Rest/IpMessaging/V2/Service/BindingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BindingInstance \Twilio\Rest\IpMessaging\V2\Service\BindingInstance */ public function buildInstance(array $payload): BindingInstance { return new BindingInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.BindingPage]'; } }PKt[3//;Twilio/Rest/IpMessaging/V2/Service/User/UserChannelPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserChannelInstance \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelInstance */ public function buildInstance(array $payload): UserChannelInstance { return new UserChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.UserChannelPage]'; } }PKt[-$(//;Twilio/Rest/IpMessaging/V2/Service/User/UserBindingPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserBindingInstance \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingInstance */ public function buildInstance(array $payload): UserBindingInstance { return new UserBindingInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.UserBindingPage]'; } }PKt[Ѱ?Twilio/Rest/IpMessaging/V2/Service/User/UserBindingInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'endpoint' => Values::array_get($payload, 'endpoint'), 'identity' => Values::array_get($payload, 'identity'), 'userSid' => Values::array_get($payload, 'user_sid'), 'credentialSid' => Values::array_get($payload, 'credential_sid'), 'bindingType' => Values::array_get($payload, 'binding_type'), 'messageTypes' => Values::array_get($payload, 'message_types'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'userSid' => $userSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserBindingContext Context for this UserBindingInstance */ protected function proxy(): UserBindingContext { if (!$this->context) { $this->context = new UserBindingContext( $this->version, $this->solution['serviceSid'], $this->solution['userSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the UserBindingInstance * * @return UserBindingInstance Fetched UserBindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserBindingInstance { return $this->proxy()->fetch(); } /** * Delete the UserBindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.UserBindingInstance ' . \implode(' ', $context) . ']'; } }PKt[nC3 >Twilio/Rest/IpMessaging/V2/Service/User/UserChannelContext.phpnu[solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, 'channelSid' => $channelSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels/' . \rawurlencode($channelSid) . ''; } /** * Fetch the UserChannelInstance * * @return UserChannelInstance Fetched UserChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'], $this->solution['channelSid'] ); } /** * Delete the UserChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the UserChannelInstance * * @param array|Options $options Optional Arguments * @return UserChannelInstance Updated UserChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserChannelInstance { $options = new Values($options); $data = Values::of([ 'NotificationLevel' => $options['notificationLevel'], 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'], 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new UserChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'], $this->solution['channelSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.UserChannelContext ' . \implode(' ', $context) . ']'; } }PKt[z)?Twilio/Rest/IpMessaging/V2/Service/User/UserChannelInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'channelSid' => Values::array_get($payload, 'channel_sid'), 'userSid' => Values::array_get($payload, 'user_sid'), 'memberSid' => Values::array_get($payload, 'member_sid'), 'status' => Values::array_get($payload, 'status'), 'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'), 'unreadMessagesCount' => Values::array_get($payload, 'unread_messages_count'), 'links' => Values::array_get($payload, 'links'), 'url' => Values::array_get($payload, 'url'), 'notificationLevel' => Values::array_get($payload, 'notification_level'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'userSid' => $userSid, 'channelSid' => $channelSid ?: $this->properties['channelSid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return UserChannelContext Context for this UserChannelInstance */ protected function proxy(): UserChannelContext { if (!$this->context) { $this->context = new UserChannelContext( $this->version, $this->solution['serviceSid'], $this->solution['userSid'], $this->solution['channelSid'] ); } return $this->context; } /** * Fetch the UserChannelInstance * * @return UserChannelInstance Fetched UserChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserChannelInstance { return $this->proxy()->fetch(); } /** * Delete the UserChannelInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the UserChannelInstance * * @param array|Options $options Optional Arguments * @return UserChannelInstance Updated UserChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): UserChannelInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.UserChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[';Twilio/Rest/IpMessaging/V2/Service/User/UserChannelList.phpnu[solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels'; } /** * Streams UserChannelInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserChannelInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserChannelInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserChannelInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserChannelPage Page of UserChannelInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserChannelPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserChannelPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserChannelInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserChannelPage Page of UserChannelInstance */ public function getPage(string $targetUrl): UserChannelPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserChannelPage($this->version, $response, $this->solution); } /** * Constructs a UserChannelContext * * @param string $channelSid The channel_sid */ public function getContext(string $channelSid): UserChannelContext { return new UserChannelContext( $this->version, $this->solution['serviceSid'], $this->solution['userSid'], $channelSid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.UserChannelList]'; } }PKt[Mpp>Twilio/Rest/IpMessaging/V2/Service/User/UserBindingOptions.phpnu[options['bindingType'] = $bindingType; } /** * The binding_type * * @param string[] $bindingType The binding_type * @return $this Fluent Builder */ public function setBindingType(array $bindingType): self { $this->options['bindingType'] = $bindingType; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.ReadUserBindingOptions ' . $options . ']'; } }PKt[^9{{>Twilio/Rest/IpMessaging/V2/Service/User/UserBindingContext.phpnu[solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Bindings/' . \rawurlencode($sid) . ''; } /** * Fetch the UserBindingInstance * * @return UserBindingInstance Fetched UserBindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): UserBindingInstance { $payload = $this->version->fetch('GET', $this->uri); return new UserBindingInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid'], $this->solution['sid'] ); } /** * Delete the UserBindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.UserBindingContext ' . \implode(' ', $context) . ']'; } }PKt[W;Twilio/Rest/IpMessaging/V2/Service/User/UserBindingList.phpnu[solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Bindings'; } /** * Streams UserBindingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserBindingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserBindingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of UserBindingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserBindingPage Page of UserBindingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserBindingPage { $options = new Values($options); $params = Values::of([ 'BindingType' => Serialize::map($options['bindingType'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserBindingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserBindingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserBindingPage Page of UserBindingInstance */ public function getPage(string $targetUrl): UserBindingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserBindingPage($this->version, $response, $this->solution); } /** * Constructs a UserBindingContext * * @param string $sid The sid */ public function getContext(string $sid): UserBindingContext { return new UserBindingContext( $this->version, $this->solution['serviceSid'], $this->solution['userSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.UserBindingList]'; } }PKt[vё >Twilio/Rest/IpMessaging/V2/Service/User/UserChannelOptions.phpnu[options['notificationLevel'] = $notificationLevel; $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; } /** * The notification_level * * @param string $notificationLevel The notification_level * @return $this Fluent Builder */ public function setNotificationLevel(string $notificationLevel): self { $this->options['notificationLevel'] = $notificationLevel; return $this; } /** * The last_consumed_message_index * * @param int $lastConsumedMessageIndex The last_consumed_message_index * @return $this Fluent Builder */ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self { $this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex; return $this; } /** * The last_consumption_timestamp * * @param \DateTime $lastConsumptionTimestamp The last_consumption_timestamp * @return $this Fluent Builder */ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self { $this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.UpdateUserChannelOptions ' . $options . ']'; } }PKt[EBǪ6Twilio/Rest/IpMessaging/V2/Service/ChannelInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'attributes' => Values::array_get($payload, 'attributes'), 'type' => Values::array_get($payload, 'type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'createdBy' => Values::array_get($payload, 'created_by'), 'membersCount' => Values::array_get($payload, 'members_count'), 'messagesCount' => Values::array_get($payload, 'messages_count'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ChannelContext Context for this ChannelInstance */ protected function proxy(): ChannelContext { if (!$this->context) { $this->context = new ChannelContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ChannelInstance * * @return ChannelInstance Fetched ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChannelInstance { return $this->proxy()->fetch(); } /** * Delete the ChannelInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { return $this->proxy()->delete($options); } /** * Update the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Updated ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChannelInstance { return $this->proxy()->update($options); } /** * Access the members */ protected function getMembers(): MemberList { return $this->proxy()->members; } /** * Access the messages */ protected function getMessages(): MessageList { return $this->proxy()->messages; } /** * Access the invites */ protected function getInvites(): InviteList { return $this->proxy()->invites; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { return $this->proxy()->webhooks; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.ChannelInstance ' . \implode(' ', $context) . ']'; } }PKt[&5Twilio/Rest/IpMessaging/V2/Service/ChannelContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($sid) . ''; } /** * Fetch the ChannelInstance * * @return ChannelInstance Fetched ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChannelInstance { $payload = $this->version->fetch('GET', $this->uri); return new ChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the ChannelInstance * * @param array|Options $options Optional Arguments * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(array $options = []): bool { $options = new Values($options); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); return $this->version->delete('DELETE', $this->uri, [], [], $headers); } /** * Update the ChannelInstance * * @param array|Options $options Optional Arguments * @return ChannelInstance Updated ChannelInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChannelInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'UniqueName' => $options['uniqueName'], 'Attributes' => $options['attributes'], 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']), 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']), 'CreatedBy' => $options['createdBy'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->update('POST', $this->uri, [], $data, $headers); return new ChannelInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the members */ protected function getMembers(): MemberList { if (!$this->_members) { $this->_members = new MemberList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_members; } /** * Access the messages */ protected function getMessages(): MessageList { if (!$this->_messages) { $this->_messages = new MessageList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_messages; } /** * Access the invites */ protected function getInvites(): InviteList { if (!$this->_invites) { $this->_invites = new InviteList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_invites; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { if (!$this->_webhooks) { $this->_webhooks = new WebhookList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_webhooks; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.ChannelContext ' . \implode(' ', $context) . ']'; } }PKt[ /Twilio/Rest/IpMessaging/V2/Service/UserPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UserInstance \Twilio\Rest\IpMessaging\V2\Service\UserInstance */ public function buildInstance(array $payload): UserInstance { return new UserInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.UserPage]'; } }PKt[>/Twilio/Rest/IpMessaging/V2/Service/RolePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RoleInstance \Twilio\Rest\IpMessaging\V2\Service\RoleInstance */ public function buildInstance(array $payload): RoleInstance { return new RoleInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.RolePage]'; } }PKt[s*?/Twilio/Rest/IpMessaging/V2/Service/RoleList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles'; } /** * Create the RoleInstance * * @param string $friendlyName The friendly_name * @param string $type The type * @param string[] $permission The permission * @return RoleInstance Created RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $type, array $permission): RoleInstance { $data = Values::of([ 'FriendlyName' => $friendlyName, 'Type' => $type, 'Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RoleInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams RoleInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RoleInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RoleInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of RoleInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RolePage Page of RoleInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RolePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RolePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RoleInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RolePage Page of RoleInstance */ public function getPage(string $targetUrl): RolePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RolePage($this->version, $response, $this->solution); } /** * Constructs a RoleContext * * @param string $sid The sid */ public function getContext(string $sid): RoleContext { return new RoleContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.RoleList]'; } }PKt[6Twilio/Rest/IpMessaging/V2/Service/BindingInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'endpoint' => Values::array_get($payload, 'endpoint'), 'identity' => Values::array_get($payload, 'identity'), 'credentialSid' => Values::array_get($payload, 'credential_sid'), 'bindingType' => Values::array_get($payload, 'binding_type'), 'messageTypes' => Values::array_get($payload, 'message_types'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return BindingContext Context for this BindingInstance */ protected function proxy(): BindingContext { if (!$this->context) { $this->context = new BindingContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the BindingInstance * * @return BindingInstance Fetched BindingInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BindingInstance { return $this->proxy()->fetch(); } /** * Delete the BindingInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.BindingInstance ' . \implode(' ', $context) . ']'; } }PKt[3 2Twilio/Rest/IpMessaging/V2/Service/BindingList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings'; } /** * Streams BindingInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BindingInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BindingInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of BindingInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BindingPage Page of BindingInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BindingPage { $options = new Values($options); $params = Values::of([ 'BindingType' => Serialize::map($options['bindingType'], function($e) { return $e; }), 'Identity' => Serialize::map($options['identity'], function($e) { return $e; }), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BindingPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BindingInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BindingPage Page of BindingInstance */ public function getPage(string $targetUrl): BindingPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BindingPage($this->version, $response, $this->solution); } /** * Constructs a BindingContext * * @param string $sid The sid */ public function getContext(string $sid): BindingContext { return new BindingContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.BindingList]'; } }PKt[ˎ/Twilio/Rest/IpMessaging/V2/Service/UserList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users'; } /** * Create the UserInstance * * @param string $identity The identity * @param array|Options $options Optional Arguments * @return UserInstance Created UserInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, array $options = []): UserInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $identity, 'RoleSid' => $options['roleSid'], 'Attributes' => $options['attributes'], 'FriendlyName' => $options['friendlyName'], ]); $headers = Values::of(['X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled'], ]); $payload = $this->version->create('POST', $this->uri, [], $data, $headers); return new UserInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams UserInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UserInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UserInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of UserInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UserPage Page of UserInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UserPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UserPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UserInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UserPage Page of UserInstance */ public function getPage(string $targetUrl): UserPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UserPage($this->version, $response, $this->solution); } /** * Constructs a UserContext * * @param string $sid The sid */ public function getContext(string $sid): UserContext { return new UserContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.UserList]'; } }PKt[?* * 2Twilio/Rest/IpMessaging/V2/Service/RoleContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles/' . \rawurlencode($sid) . ''; } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { $payload = $this->version->fetch('GET', $this->uri); return new RoleInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the RoleInstance * * @param string[] $permission The permission * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { $data = Values::of(['Permission' => Serialize::map($permission, function($e) { return $e; }), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RoleInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.RoleContext ' . \implode(' ', $context) . ']'; } }PKt[&}3Twilio/Rest/IpMessaging/V2/Service/RoleInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'permissions' => Values::array_get($payload, 'permissions'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RoleContext Context for this RoleInstance */ protected function proxy(): RoleContext { if (!$this->context) { $this->context = new RoleContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the RoleInstance * * @return RoleInstance Fetched RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RoleInstance { return $this->proxy()->fetch(); } /** * Delete the RoleInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the RoleInstance * * @param string[] $permission The permission * @return RoleInstance Updated RoleInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $permission): RoleInstance { return $this->proxy()->update($permission); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.RoleInstance ' . \implode(' ', $context) . ']'; } }PKt[ uZZ.Twilio/Rest/IpMessaging/V2/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'defaultServiceRoleSid' => Values::array_get($payload, 'default_service_role_sid'), 'defaultChannelRoleSid' => Values::array_get($payload, 'default_channel_role_sid'), 'defaultChannelCreatorRoleSid' => Values::array_get($payload, 'default_channel_creator_role_sid'), 'readStatusEnabled' => Values::array_get($payload, 'read_status_enabled'), 'reachabilityEnabled' => Values::array_get($payload, 'reachability_enabled'), 'typingIndicatorTimeout' => Values::array_get($payload, 'typing_indicator_timeout'), 'consumptionReportInterval' => Values::array_get($payload, 'consumption_report_interval'), 'limits' => Values::array_get($payload, 'limits'), 'preWebhookUrl' => Values::array_get($payload, 'pre_webhook_url'), 'postWebhookUrl' => Values::array_get($payload, 'post_webhook_url'), 'webhookMethod' => Values::array_get($payload, 'webhook_method'), 'webhookFilters' => Values::array_get($payload, 'webhook_filters'), 'preWebhookRetryCount' => Values::array_get($payload, 'pre_webhook_retry_count'), 'postWebhookRetryCount' => Values::array_get($payload, 'post_webhook_retry_count'), 'notifications' => Values::array_get($payload, 'notifications'), 'media' => Values::array_get($payload, 'media'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Access the channels */ protected function getChannels(): ChannelList { return $this->proxy()->channels; } /** * Access the roles */ protected function getRoles(): RoleList { return $this->proxy()->roles; } /** * Access the users */ protected function getUsers(): UserList { return $this->proxy()->users; } /** * Access the bindings */ protected function getBindings(): BindingList { return $this->proxy()->bindings; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[7*Twilio/Rest/IpMessaging/V2/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Create the ServiceInstance * * @param string $friendlyName The friendly_name * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName): ServiceInstance { $data = Values::of(['FriendlyName' => $friendlyName, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Constructs a ServiceContext * * @param string $sid The sid */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.ServiceList]'; } }PKt[(-Twilio/Rest/IpMessaging/V2/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'DefaultServiceRoleSid' => $options['defaultServiceRoleSid'], 'DefaultChannelRoleSid' => $options['defaultChannelRoleSid'], 'DefaultChannelCreatorRoleSid' => $options['defaultChannelCreatorRoleSid'], 'ReadStatusEnabled' => Serialize::booleanToString($options['readStatusEnabled']), 'ReachabilityEnabled' => Serialize::booleanToString($options['reachabilityEnabled']), 'TypingIndicatorTimeout' => $options['typingIndicatorTimeout'], 'ConsumptionReportInterval' => $options['consumptionReportInterval'], 'Notifications.NewMessage.Enabled' => Serialize::booleanToString($options['notificationsNewMessageEnabled']), 'Notifications.NewMessage.Template' => $options['notificationsNewMessageTemplate'], 'Notifications.NewMessage.Sound' => $options['notificationsNewMessageSound'], 'Notifications.NewMessage.BadgeCountEnabled' => Serialize::booleanToString($options['notificationsNewMessageBadgeCountEnabled']), 'Notifications.AddedToChannel.Enabled' => Serialize::booleanToString($options['notificationsAddedToChannelEnabled']), 'Notifications.AddedToChannel.Template' => $options['notificationsAddedToChannelTemplate'], 'Notifications.AddedToChannel.Sound' => $options['notificationsAddedToChannelSound'], 'Notifications.RemovedFromChannel.Enabled' => Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']), 'Notifications.RemovedFromChannel.Template' => $options['notificationsRemovedFromChannelTemplate'], 'Notifications.RemovedFromChannel.Sound' => $options['notificationsRemovedFromChannelSound'], 'Notifications.InvitedToChannel.Enabled' => Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']), 'Notifications.InvitedToChannel.Template' => $options['notificationsInvitedToChannelTemplate'], 'Notifications.InvitedToChannel.Sound' => $options['notificationsInvitedToChannelSound'], 'PreWebhookUrl' => $options['preWebhookUrl'], 'PostWebhookUrl' => $options['postWebhookUrl'], 'WebhookMethod' => $options['webhookMethod'], 'WebhookFilters' => Serialize::map($options['webhookFilters'], function($e) { return $e; }), 'Limits.ChannelMembers' => $options['limitsChannelMembers'], 'Limits.UserChannels' => $options['limitsUserChannels'], 'Media.CompatibilityMessage' => $options['mediaCompatibilityMessage'], 'PreWebhookRetryCount' => $options['preWebhookRetryCount'], 'PostWebhookRetryCount' => $options['postWebhookRetryCount'], 'Notifications.LogEnabled' => Serialize::booleanToString($options['notificationsLogEnabled']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the channels */ protected function getChannels(): ChannelList { if (!$this->_channels) { $this->_channels = new ChannelList($this->version, $this->solution['sid']); } return $this->_channels; } /** * Access the roles */ protected function getRoles(): RoleList { if (!$this->_roles) { $this->_roles = new RoleList($this->version, $this->solution['sid']); } return $this->_roles; } /** * Access the users */ protected function getUsers(): UserList { if (!$this->_users) { $this->_users = new UserList($this->version, $this->solution['sid']); } return $this->_users; } /** * Access the bindings */ protected function getBindings(): BindingList { if (!$this->_bindings) { $this->_bindings = new BindingList($this->version, $this->solution['sid']); } return $this->_bindings; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[H~ 0Twilio/Rest/IpMessaging/V2/CredentialContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Credentials/' . \rawurlencode($sid) . ''; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { $payload = $this->version->fetch('GET', $this->uri); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.CredentialContext ' . \implode(' ', $context) . ']'; } }PKt[)-Twilio/Rest/IpMessaging/V2/CredentialList.phpnu[solution = []; $this->uri = '/Credentials'; } /** * Streams CredentialInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CredentialInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CredentialInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CredentialInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CredentialPage Page of CredentialInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CredentialPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CredentialPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CredentialInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CredentialPage Page of CredentialInstance */ public function getPage(string $targetUrl): CredentialPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CredentialPage($this->version, $response, $this->solution); } /** * Create the CredentialInstance * * @param string $type The type * @param array|Options $options Optional Arguments * @return CredentialInstance Created CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $type, array $options = []): CredentialInstance { $options = new Values($options); $data = Values::of([ 'Type' => $type, 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => Serialize::booleanToString($options['sandbox']), 'ApiKey' => $options['apiKey'], 'Secret' => $options['secret'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CredentialInstance($this->version, $payload); } /** * Constructs a CredentialContext * * @param string $sid The sid */ public function getContext(string $sid): CredentialContext { return new CredentialContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.CredentialList]'; } }PKt[ٯ1Twilio/Rest/IpMessaging/V2/CredentialInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'sandbox' => Values::array_get($payload, 'sandbox'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CredentialContext Context for this CredentialInstance */ protected function proxy(): CredentialContext { if (!$this->context) { $this->context = new CredentialContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CredentialInstance * * @return CredentialInstance Fetched CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CredentialInstance { return $this->proxy()->fetch(); } /** * Update the CredentialInstance * * @param array|Options $options Optional Arguments * @return CredentialInstance Updated CredentialInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CredentialInstance { return $this->proxy()->update($options); } /** * Delete the CredentialInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.IpMessaging.V2.CredentialInstance ' . \implode(' ', $context) . ']'; } }PKt[Vlkhkh-Twilio/Rest/IpMessaging/V2/ServiceOptions.phpnu[options['friendlyName'] = $friendlyName; $this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid; $this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid; $this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid; $this->options['readStatusEnabled'] = $readStatusEnabled; $this->options['reachabilityEnabled'] = $reachabilityEnabled; $this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout; $this->options['consumptionReportInterval'] = $consumptionReportInterval; $this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled; $this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate; $this->options['notificationsNewMessageSound'] = $notificationsNewMessageSound; $this->options['notificationsNewMessageBadgeCountEnabled'] = $notificationsNewMessageBadgeCountEnabled; $this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled; $this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate; $this->options['notificationsAddedToChannelSound'] = $notificationsAddedToChannelSound; $this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled; $this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate; $this->options['notificationsRemovedFromChannelSound'] = $notificationsRemovedFromChannelSound; $this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled; $this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate; $this->options['notificationsInvitedToChannelSound'] = $notificationsInvitedToChannelSound; $this->options['preWebhookUrl'] = $preWebhookUrl; $this->options['postWebhookUrl'] = $postWebhookUrl; $this->options['webhookMethod'] = $webhookMethod; $this->options['webhookFilters'] = $webhookFilters; $this->options['limitsChannelMembers'] = $limitsChannelMembers; $this->options['limitsUserChannels'] = $limitsUserChannels; $this->options['mediaCompatibilityMessage'] = $mediaCompatibilityMessage; $this->options['preWebhookRetryCount'] = $preWebhookRetryCount; $this->options['postWebhookRetryCount'] = $postWebhookRetryCount; $this->options['notificationsLogEnabled'] = $notificationsLogEnabled; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The default_service_role_sid * * @param string $defaultServiceRoleSid The default_service_role_sid * @return $this Fluent Builder */ public function setDefaultServiceRoleSid(string $defaultServiceRoleSid): self { $this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid; return $this; } /** * The default_channel_role_sid * * @param string $defaultChannelRoleSid The default_channel_role_sid * @return $this Fluent Builder */ public function setDefaultChannelRoleSid(string $defaultChannelRoleSid): self { $this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid; return $this; } /** * The default_channel_creator_role_sid * * @param string $defaultChannelCreatorRoleSid The * default_channel_creator_role_sid * @return $this Fluent Builder */ public function setDefaultChannelCreatorRoleSid(string $defaultChannelCreatorRoleSid): self { $this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid; return $this; } /** * The read_status_enabled * * @param bool $readStatusEnabled The read_status_enabled * @return $this Fluent Builder */ public function setReadStatusEnabled(bool $readStatusEnabled): self { $this->options['readStatusEnabled'] = $readStatusEnabled; return $this; } /** * The reachability_enabled * * @param bool $reachabilityEnabled The reachability_enabled * @return $this Fluent Builder */ public function setReachabilityEnabled(bool $reachabilityEnabled): self { $this->options['reachabilityEnabled'] = $reachabilityEnabled; return $this; } /** * The typing_indicator_timeout * * @param int $typingIndicatorTimeout The typing_indicator_timeout * @return $this Fluent Builder */ public function setTypingIndicatorTimeout(int $typingIndicatorTimeout): self { $this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout; return $this; } /** * The consumption_report_interval * * @param int $consumptionReportInterval The consumption_report_interval * @return $this Fluent Builder */ public function setConsumptionReportInterval(int $consumptionReportInterval): self { $this->options['consumptionReportInterval'] = $consumptionReportInterval; return $this; } /** * The notifications.new_message.enabled * * @param bool $notificationsNewMessageEnabled The * notifications.new_message.enabled * @return $this Fluent Builder */ public function setNotificationsNewMessageEnabled(bool $notificationsNewMessageEnabled): self { $this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled; return $this; } /** * The notifications.new_message.template * * @param string $notificationsNewMessageTemplate The * notifications.new_message.template * @return $this Fluent Builder */ public function setNotificationsNewMessageTemplate(string $notificationsNewMessageTemplate): self { $this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate; return $this; } /** * The notifications.new_message.sound * * @param string $notificationsNewMessageSound The * notifications.new_message.sound * @return $this Fluent Builder */ public function setNotificationsNewMessageSound(string $notificationsNewMessageSound): self { $this->options['notificationsNewMessageSound'] = $notificationsNewMessageSound; return $this; } /** * The notifications.new_message.badge_count_enabled * * @param bool $notificationsNewMessageBadgeCountEnabled The * notifications.new_message.badge_count_enabled * @return $this Fluent Builder */ public function setNotificationsNewMessageBadgeCountEnabled(bool $notificationsNewMessageBadgeCountEnabled): self { $this->options['notificationsNewMessageBadgeCountEnabled'] = $notificationsNewMessageBadgeCountEnabled; return $this; } /** * The notifications.added_to_channel.enabled * * @param bool $notificationsAddedToChannelEnabled The * notifications.added_to_channel.enabled * @return $this Fluent Builder */ public function setNotificationsAddedToChannelEnabled(bool $notificationsAddedToChannelEnabled): self { $this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled; return $this; } /** * The notifications.added_to_channel.template * * @param string $notificationsAddedToChannelTemplate The * notifications.added_to_channel.template * @return $this Fluent Builder */ public function setNotificationsAddedToChannelTemplate(string $notificationsAddedToChannelTemplate): self { $this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate; return $this; } /** * The notifications.added_to_channel.sound * * @param string $notificationsAddedToChannelSound The * notifications.added_to_channel.sound * @return $this Fluent Builder */ public function setNotificationsAddedToChannelSound(string $notificationsAddedToChannelSound): self { $this->options['notificationsAddedToChannelSound'] = $notificationsAddedToChannelSound; return $this; } /** * The notifications.removed_from_channel.enabled * * @param bool $notificationsRemovedFromChannelEnabled The * notifications.removed_from_channel.enabled * @return $this Fluent Builder */ public function setNotificationsRemovedFromChannelEnabled(bool $notificationsRemovedFromChannelEnabled): self { $this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled; return $this; } /** * The notifications.removed_from_channel.template * * @param string $notificationsRemovedFromChannelTemplate The * notifications.removed_from_channel.template * @return $this Fluent Builder */ public function setNotificationsRemovedFromChannelTemplate(string $notificationsRemovedFromChannelTemplate): self { $this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate; return $this; } /** * The notifications.removed_from_channel.sound * * @param string $notificationsRemovedFromChannelSound The * notifications.removed_from_channel.sound * @return $this Fluent Builder */ public function setNotificationsRemovedFromChannelSound(string $notificationsRemovedFromChannelSound): self { $this->options['notificationsRemovedFromChannelSound'] = $notificationsRemovedFromChannelSound; return $this; } /** * The notifications.invited_to_channel.enabled * * @param bool $notificationsInvitedToChannelEnabled The * notifications.invited_to_channel.enabled * @return $this Fluent Builder */ public function setNotificationsInvitedToChannelEnabled(bool $notificationsInvitedToChannelEnabled): self { $this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled; return $this; } /** * The notifications.invited_to_channel.template * * @param string $notificationsInvitedToChannelTemplate The * notifications.invited_to_channel.template * @return $this Fluent Builder */ public function setNotificationsInvitedToChannelTemplate(string $notificationsInvitedToChannelTemplate): self { $this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate; return $this; } /** * The notifications.invited_to_channel.sound * * @param string $notificationsInvitedToChannelSound The * notifications.invited_to_channel.sound * @return $this Fluent Builder */ public function setNotificationsInvitedToChannelSound(string $notificationsInvitedToChannelSound): self { $this->options['notificationsInvitedToChannelSound'] = $notificationsInvitedToChannelSound; return $this; } /** * The pre_webhook_url * * @param string $preWebhookUrl The pre_webhook_url * @return $this Fluent Builder */ public function setPreWebhookUrl(string $preWebhookUrl): self { $this->options['preWebhookUrl'] = $preWebhookUrl; return $this; } /** * The post_webhook_url * * @param string $postWebhookUrl The post_webhook_url * @return $this Fluent Builder */ public function setPostWebhookUrl(string $postWebhookUrl): self { $this->options['postWebhookUrl'] = $postWebhookUrl; return $this; } /** * The webhook_method * * @param string $webhookMethod The webhook_method * @return $this Fluent Builder */ public function setWebhookMethod(string $webhookMethod): self { $this->options['webhookMethod'] = $webhookMethod; return $this; } /** * The webhook_filters * * @param string[] $webhookFilters The webhook_filters * @return $this Fluent Builder */ public function setWebhookFilters(array $webhookFilters): self { $this->options['webhookFilters'] = $webhookFilters; return $this; } /** * The limits.channel_members * * @param int $limitsChannelMembers The limits.channel_members * @return $this Fluent Builder */ public function setLimitsChannelMembers(int $limitsChannelMembers): self { $this->options['limitsChannelMembers'] = $limitsChannelMembers; return $this; } /** * The limits.user_channels * * @param int $limitsUserChannels The limits.user_channels * @return $this Fluent Builder */ public function setLimitsUserChannels(int $limitsUserChannels): self { $this->options['limitsUserChannels'] = $limitsUserChannels; return $this; } /** * The media.compatibility_message * * @param string $mediaCompatibilityMessage The media.compatibility_message * @return $this Fluent Builder */ public function setMediaCompatibilityMessage(string $mediaCompatibilityMessage): self { $this->options['mediaCompatibilityMessage'] = $mediaCompatibilityMessage; return $this; } /** * The pre_webhook_retry_count * * @param int $preWebhookRetryCount The pre_webhook_retry_count * @return $this Fluent Builder */ public function setPreWebhookRetryCount(int $preWebhookRetryCount): self { $this->options['preWebhookRetryCount'] = $preWebhookRetryCount; return $this; } /** * The post_webhook_retry_count * * @param int $postWebhookRetryCount The post_webhook_retry_count * @return $this Fluent Builder */ public function setPostWebhookRetryCount(int $postWebhookRetryCount): self { $this->options['postWebhookRetryCount'] = $postWebhookRetryCount; return $this; } /** * The notifications.log_enabled * * @param bool $notificationsLogEnabled The notifications.log_enabled * @return $this Fluent Builder */ public function setNotificationsLogEnabled(bool $notificationsLogEnabled): self { $this->options['notificationsLogEnabled'] = $notificationsLogEnabled; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.IpMessaging.V2.UpdateServiceOptions ' . $options . ']'; } }PKt[X*Twilio/Rest/IpMessaging/V2/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\IpMessaging\V2\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2.ServicePage]'; } }PKt[nE!P P Twilio/Rest/IpMessaging/V2.phpnu[version = 'v2'; } protected function getCredentials(): CredentialList { if (!$this->_credentials) { $this->_credentials = new CredentialList($this); } return $this->_credentials; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.IpMessaging.V2]'; } }PKt[>&>&Twilio/Rest/FlexApi.phpnu[baseUrl = 'https://flex-api.twilio.com'; } /** * @return V1 Version v1 of flex_api */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * @return V2 Version v2 of flex_api */ protected function getV2(): V2 { if (!$this->_v2) { $this->_v2 = new V2($this); } return $this->_v2; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getChannel(): \Twilio\Rest\FlexApi\V1\ChannelList { return $this->v1->channel; } /** * @param string $sid The SID that identifies the Flex chat channel resource to * fetch */ protected function contextChannel(string $sid): \Twilio\Rest\FlexApi\V1\ChannelContext { return $this->v1->channel($sid); } protected function getConfiguration(): \Twilio\Rest\FlexApi\V1\ConfigurationList { return $this->v1->configuration; } protected function contextConfiguration(): \Twilio\Rest\FlexApi\V1\ConfigurationContext { return $this->v1->configuration(); } protected function getFlexFlow(): \Twilio\Rest\FlexApi\V1\FlexFlowList { return $this->v1->flexFlow; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextFlexFlow(string $sid): \Twilio\Rest\FlexApi\V1\FlexFlowContext { return $this->v1->flexFlow($sid); } protected function getAssessments(): \Twilio\Rest\FlexApi\V1\AssessmentsList { return $this->v1->assessments; } /** * @param string $assessmentId Assessment Id */ protected function contextAssessments(string $assessmentId): \Twilio\Rest\FlexApi\V1\AssessmentsContext { return $this->v1->assessments($assessmentId); } protected function getInsightsAssessmentsComment(): \Twilio\Rest\FlexApi\V1\InsightsAssessmentsCommentList { return $this->v1->insightsAssessmentsComment; } protected function getInsightsQuestionnaires(): \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesList { return $this->v1->insightsQuestionnaires; } /** * @param string $id Unique Questionnaire ID */ protected function contextInsightsQuestionnaires(string $id): \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesContext { return $this->v1->insightsQuestionnaires($id); } protected function getInsightsQuestionnairesCategory(): \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesCategoryList { return $this->v1->insightsQuestionnairesCategory; } /** * @param string $categoryId Category ID to update */ protected function contextInsightsQuestionnairesCategory(string $categoryId): \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesCategoryContext { return $this->v1->insightsQuestionnairesCategory($categoryId); } protected function getInsightsQuestionnairesQuestion(): \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesQuestionList { return $this->v1->insightsQuestionnairesQuestion; } /** * @param string $questionId Unique Question ID */ protected function contextInsightsQuestionnairesQuestion(string $questionId): \Twilio\Rest\FlexApi\V1\InsightsQuestionnairesQuestionContext { return $this->v1->insightsQuestionnairesQuestion($questionId); } protected function getInsightsSegments(): \Twilio\Rest\FlexApi\V1\InsightsSegmentsList { return $this->v1->insightsSegments; } /** * @param string $segmentId Unique segment Id */ protected function contextInsightsSegments(string $segmentId): \Twilio\Rest\FlexApi\V1\InsightsSegmentsContext { return $this->v1->insightsSegments($segmentId); } protected function getInsightsSession(): \Twilio\Rest\FlexApi\V1\InsightsSessionList { return $this->v1->insightsSession; } protected function contextInsightsSession(): \Twilio\Rest\FlexApi\V1\InsightsSessionContext { return $this->v1->insightsSession(); } protected function getInsightsSettingsAnswerSets(): \Twilio\Rest\FlexApi\V1\InsightsSettingsAnswerSetsList { return $this->v1->insightsSettingsAnswerSets; } protected function getInsightsSettingsComment(): \Twilio\Rest\FlexApi\V1\InsightsSettingsCommentList { return $this->v1->insightsSettingsComment; } protected function getInsightsUserRoles(): \Twilio\Rest\FlexApi\V1\InsightsUserRolesList { return $this->v1->insightsUserRoles; } protected function contextInsightsUserRoles(): \Twilio\Rest\FlexApi\V1\InsightsUserRolesContext { return $this->v1->insightsUserRoles(); } protected function getInteraction(): \Twilio\Rest\FlexApi\V1\InteractionList { return $this->v1->interaction; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextInteraction(string $sid): \Twilio\Rest\FlexApi\V1\InteractionContext { return $this->v1->interaction($sid); } protected function getWebChannel(): \Twilio\Rest\FlexApi\V1\WebChannelList { return $this->v1->webChannel; } /** * @param string $sid The SID of the WebChannel resource to fetch */ protected function contextWebChannel(string $sid): \Twilio\Rest\FlexApi\V1\WebChannelContext { return $this->v1->webChannel($sid); } protected function getWebChannels(): \Twilio\Rest\FlexApi\V2\WebChannelsList { return $this->v2->webChannels; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.FlexApi]'; } }PKt[r+Twilio/Rest/Trusthub/V1/EndUserInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'type' => Values::array_get($payload, 'type'), 'attributes' => Values::array_get($payload, 'attributes'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EndUserContext Context for this EndUserInstance */ protected function proxy(): EndUserContext { if (!$this->context) { $this->context = new EndUserContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the EndUserInstance * * @return EndUserInstance Fetched EndUserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EndUserInstance { return $this->proxy()->fetch(); } /** * Update the EndUserInstance * * @param array|Options $options Optional Arguments * @return EndUserInstance Updated EndUserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): EndUserInstance { return $this->proxy()->update($options); } /** * Delete the EndUserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.EndUserInstance ' . \implode(' ', $context) . ']'; } }PKt[ յ+Twilio/Rest/Trusthub/V1/PoliciesContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Policies/' . \rawurlencode($sid) . ''; } /** * Fetch the PoliciesInstance * * @return PoliciesInstance Fetched PoliciesInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PoliciesInstance { $payload = $this->version->fetch('GET', $this->uri); return new PoliciesInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.PoliciesContext ' . \implode(' ', $context) . ']'; } }PKt[Y1``0Twilio/Rest/Trusthub/V1/TrustProductsContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/TrustProducts/' . \rawurlencode($sid) . ''; } /** * Fetch the TrustProductsInstance * * @return TrustProductsInstance Fetched TrustProductsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrustProductsInstance { $payload = $this->version->fetch('GET', $this->uri); return new TrustProductsInstance($this->version, $payload, $this->solution['sid']); } /** * Update the TrustProductsInstance * * @param array|Options $options Optional Arguments * @return TrustProductsInstance Updated TrustProductsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TrustProductsInstance { $options = new Values($options); $data = Values::of([ 'Status' => $options['status'], 'StatusCallback' => $options['statusCallback'], 'FriendlyName' => $options['friendlyName'], 'Email' => $options['email'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new TrustProductsInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the TrustProductsInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the trustProductsEntityAssignments */ protected function getTrustProductsEntityAssignments(): TrustProductsEntityAssignmentsList { if (!$this->_trustProductsEntityAssignments) { $this->_trustProductsEntityAssignments = new TrustProductsEntityAssignmentsList( $this->version, $this->solution['sid'] ); } return $this->_trustProductsEntityAssignments; } /** * Access the trustProductsEvaluations */ protected function getTrustProductsEvaluations(): TrustProductsEvaluationsList { if (!$this->_trustProductsEvaluations) { $this->_trustProductsEvaluations = new TrustProductsEvaluationsList( $this->version, $this->solution['sid'] ); } return $this->_trustProductsEvaluations; } /** * Access the trustProductsChannelEndpointAssignment */ protected function getTrustProductsChannelEndpointAssignment(): TrustProductsChannelEndpointAssignmentList { if (!$this->_trustProductsChannelEndpointAssignment) { $this->_trustProductsChannelEndpointAssignment = new TrustProductsChannelEndpointAssignmentList( $this->version, $this->solution['sid'] ); } return $this->_trustProductsChannelEndpointAssignment; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.TrustProductsContext ' . \implode(' ', $context) . ']'; } }PKt[DK-<9Twilio/Rest/Trusthub/V1/SupportingDocumentTypeContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/SupportingDocumentTypes/' . \rawurlencode($sid) . ''; } /** * Fetch the SupportingDocumentTypeInstance * * @return SupportingDocumentTypeInstance Fetched SupportingDocumentTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SupportingDocumentTypeInstance { $payload = $this->version->fetch('GET', $this->uri); return new SupportingDocumentTypeInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.SupportingDocumentTypeContext ' . \implode(' ', $context) . ']'; } }PKt[x~6Twilio/Rest/Trusthub/V1/SupportingDocumentTypePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SupportingDocumentTypeInstance \Twilio\Rest\Trusthub\V1\SupportingDocumentTypeInstance */ public function buildInstance(array $payload): SupportingDocumentTypeInstance { return new SupportingDocumentTypeInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.SupportingDocumentTypePage]'; } }PKt[>0Twilio/Rest/Trusthub/V1/CustomerProfilesList.phpnu[solution = []; $this->uri = '/CustomerProfiles'; } /** * Create the CustomerProfilesInstance * * @param string $friendlyName The string that you assigned to describe the * resource * @param string $email The email address * @param string $policySid The unique string of a policy. * @param array|Options $options Optional Arguments * @return CustomerProfilesInstance Created CustomerProfilesInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $email, string $policySid, array $options = []): CustomerProfilesInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Email' => $email, 'PolicySid' => $policySid, 'StatusCallback' => $options['statusCallback'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CustomerProfilesInstance($this->version, $payload); } /** * Streams CustomerProfilesInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CustomerProfilesInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CustomerProfilesInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CustomerProfilesInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CustomerProfilesPage Page of CustomerProfilesInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CustomerProfilesPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'FriendlyName' => $options['friendlyName'], 'PolicySid' => $options['policySid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CustomerProfilesPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CustomerProfilesInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CustomerProfilesPage Page of CustomerProfilesInstance */ public function getPage(string $targetUrl): CustomerProfilesPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CustomerProfilesPage($this->version, $response, $this->solution); } /** * Constructs a CustomerProfilesContext * * @param string $sid The unique string that identifies the resource. */ public function getContext(string $sid): CustomerProfilesContext { return new CustomerProfilesContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.CustomerProfilesList]'; } }PKt[O0Twilio/Rest/Trusthub/V1/CustomerProfilesPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CustomerProfilesInstance \Twilio\Rest\Trusthub\V1\CustomerProfilesInstance */ public function buildInstance(array $payload): CustomerProfilesInstance { return new CustomerProfilesInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.CustomerProfilesPage]'; } }PKt[Rx-Twilio/Rest/Trusthub/V1/TrustProductsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TrustProductsInstance \Twilio\Rest\Trusthub\V1\TrustProductsInstance */ public function buildInstance(array $payload): TrustProductsInstance { return new TrustProductsInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.TrustProductsPage]'; } }PKt["P  *Twilio/Rest/Trusthub/V1/EndUserOptions.phpnu[options['attributes'] = $attributes; } /** * The set of parameters that are the attributes of the End User resource which are derived End User Types. * * @param array $attributes The set of parameters that compose the End User * resource * @return $this Fluent Builder */ public function setAttributes(array $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.CreateEndUserOptions ' . $options . ']'; } } class UpdateEndUserOptions extends Options { /** * @param string $friendlyName The string that you assigned to describe the * resource * @param array $attributes The set of parameters that compose the End User * resource */ public function __construct(string $friendlyName = Values::NONE, array $attributes = Values::ARRAY_NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['attributes'] = $attributes; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The set of parameters that are the attributes of the End User resource which are derived End User Types. * * @param array $attributes The set of parameters that compose the End User * resource * @return $this Fluent Builder */ public function setAttributes(array $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.UpdateEndUserOptions ' . $options . ']'; } }PKt[HMS{{4Twilio/Rest/Trusthub/V1/CustomerProfilesInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'policySid' => Values::array_get($payload, 'policy_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'status' => Values::array_get($payload, 'status'), 'validUntil' => Deserialize::dateTime(Values::array_get($payload, 'valid_until')), 'email' => Values::array_get($payload, 'email'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CustomerProfilesContext Context for this CustomerProfilesInstance */ protected function proxy(): CustomerProfilesContext { if (!$this->context) { $this->context = new CustomerProfilesContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CustomerProfilesInstance * * @return CustomerProfilesInstance Fetched CustomerProfilesInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CustomerProfilesInstance { return $this->proxy()->fetch(); } /** * Update the CustomerProfilesInstance * * @param array|Options $options Optional Arguments * @return CustomerProfilesInstance Updated CustomerProfilesInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CustomerProfilesInstance { return $this->proxy()->update($options); } /** * Delete the CustomerProfilesInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the customerProfilesEntityAssignments */ protected function getCustomerProfilesEntityAssignments(): CustomerProfilesEntityAssignmentsList { return $this->proxy()->customerProfilesEntityAssignments; } /** * Access the customerProfilesEvaluations */ protected function getCustomerProfilesEvaluations(): CustomerProfilesEvaluationsList { return $this->proxy()->customerProfilesEvaluations; } /** * Access the customerProfilesChannelEndpointAssignment */ protected function getCustomerProfilesChannelEndpointAssignment(): CustomerProfilesChannelEndpointAssignmentList { return $this->proxy()->customerProfilesChannelEndpointAssignment; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.CustomerProfilesInstance ' . \implode(' ', $context) . ']'; } }PKt[gB  1Twilio/Rest/Trusthub/V1/TrustProductsInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'policySid' => Values::array_get($payload, 'policy_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'status' => Values::array_get($payload, 'status'), 'validUntil' => Deserialize::dateTime(Values::array_get($payload, 'valid_until')), 'email' => Values::array_get($payload, 'email'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TrustProductsContext Context for this TrustProductsInstance */ protected function proxy(): TrustProductsContext { if (!$this->context) { $this->context = new TrustProductsContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the TrustProductsInstance * * @return TrustProductsInstance Fetched TrustProductsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrustProductsInstance { return $this->proxy()->fetch(); } /** * Update the TrustProductsInstance * * @param array|Options $options Optional Arguments * @return TrustProductsInstance Updated TrustProductsInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): TrustProductsInstance { return $this->proxy()->update($options); } /** * Delete the TrustProductsInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the trustProductsEntityAssignments */ protected function getTrustProductsEntityAssignments(): TrustProductsEntityAssignmentsList { return $this->proxy()->trustProductsEntityAssignments; } /** * Access the trustProductsEvaluations */ protected function getTrustProductsEvaluations(): TrustProductsEvaluationsList { return $this->proxy()->trustProductsEvaluations; } /** * Access the trustProductsChannelEndpointAssignment */ protected function getTrustProductsChannelEndpointAssignment(): TrustProductsChannelEndpointAssignmentList { return $this->proxy()->trustProductsChannelEndpointAssignment; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.TrustProductsInstance ' . \implode(' ', $context) . ']'; } }PKt[S,'Twilio/Rest/Trusthub/V1/EndUserList.phpnu[solution = []; $this->uri = '/EndUsers'; } /** * Create the EndUserInstance * * @param string $friendlyName The string that you assigned to describe the * resource * @param string $type The type of end user of the Bundle resource * @param array|Options $options Optional Arguments * @return EndUserInstance Created EndUserInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $type, array $options = []): EndUserInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Type' => $type, 'Attributes' => Serialize::jsonObject($options['attributes']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new EndUserInstance($this->version, $payload); } /** * Streams EndUserInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EndUserInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EndUserInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of EndUserInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EndUserPage Page of EndUserInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EndUserPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EndUserPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EndUserInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EndUserPage Page of EndUserInstance */ public function getPage(string $targetUrl): EndUserPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EndUserPage($this->version, $response, $this->solution); } /** * Constructs a EndUserContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): EndUserContext { return new EndUserContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.EndUserList]'; } }PKt[U2Twilio/Rest/Trusthub/V1/SupportingDocumentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SupportingDocumentInstance \Twilio\Rest\Trusthub\V1\SupportingDocumentInstance */ public function buildInstance(array $payload): SupportingDocumentInstance { return new SupportingDocumentInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.SupportingDocumentPage]'; } }PKt["Md d 5Twilio/Rest/Trusthub/V1/SupportingDocumentContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/SupportingDocuments/' . \rawurlencode($sid) . ''; } /** * Fetch the SupportingDocumentInstance * * @return SupportingDocumentInstance Fetched SupportingDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SupportingDocumentInstance { $payload = $this->version->fetch('GET', $this->uri); return new SupportingDocumentInstance($this->version, $payload, $this->solution['sid']); } /** * Update the SupportingDocumentInstance * * @param array|Options $options Optional Arguments * @return SupportingDocumentInstance Updated SupportingDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SupportingDocumentInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Attributes' => Serialize::jsonObject($options['attributes']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SupportingDocumentInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the SupportingDocumentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.SupportingDocumentContext ' . \implode(' ', $context) . ']'; } }PKt[&NA :Twilio/Rest/Trusthub/V1/SupportingDocumentTypeInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'machineName' => Values::array_get($payload, 'machine_name'), 'fields' => Values::array_get($payload, 'fields'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SupportingDocumentTypeContext Context for this * SupportingDocumentTypeInstance */ protected function proxy(): SupportingDocumentTypeContext { if (!$this->context) { $this->context = new SupportingDocumentTypeContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SupportingDocumentTypeInstance * * @return SupportingDocumentTypeInstance Fetched SupportingDocumentTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SupportingDocumentTypeInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.SupportingDocumentTypeInstance ' . \implode(' ', $context) . ']'; } }PKt[y" " /Twilio/Rest/Trusthub/V1/EndUserTypeInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'machineName' => Values::array_get($payload, 'machine_name'), 'fields' => Values::array_get($payload, 'fields'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EndUserTypeContext Context for this EndUserTypeInstance */ protected function proxy(): EndUserTypeContext { if (!$this->context) { $this->context = new EndUserTypeContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the EndUserTypeInstance * * @return EndUserTypeInstance Fetched EndUserTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EndUserTypeInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.EndUserTypeInstance ' . \implode(' ', $context) . ']'; } }PKt[sV V OTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsContext.phpnu[solution = ['trustProductSid' => $trustProductSid, 'sid' => $sid, ]; $this->uri = '/TrustProducts/' . \rawurlencode($trustProductSid) . '/EntityAssignments/' . \rawurlencode($sid) . ''; } /** * Fetch the TrustProductsEntityAssignmentsInstance * * @return TrustProductsEntityAssignmentsInstance Fetched * TrustProductsEntityAssignmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrustProductsEntityAssignmentsInstance { $payload = $this->version->fetch('GET', $this->uri); return new TrustProductsEntityAssignmentsInstance( $this->version, $payload, $this->solution['trustProductSid'], $this->solution['sid'] ); } /** * Delete the TrustProductsEntityAssignmentsInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.TrustProductsEntityAssignmentsContext ' . \implode(' ', $context) . ']'; } }PKt[cSSFTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TrustProductsEvaluationsInstance \Twilio\Rest\Trusthub\V1\TrustProducts\TrustProductsEvaluationsInstance */ public function buildInstance(array $payload): TrustProductsEvaluationsInstance { return new TrustProductsEvaluationsInstance( $this->version, $payload, $this->solution['trustProductSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.TrustProductsEvaluationsPage]'; } }PKt[{8UITwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsContext.phpnu[solution = ['trustProductSid' => $trustProductSid, 'sid' => $sid, ]; $this->uri = '/TrustProducts/' . \rawurlencode($trustProductSid) . '/Evaluations/' . \rawurlencode($sid) . ''; } /** * Fetch the TrustProductsEvaluationsInstance * * @return TrustProductsEvaluationsInstance Fetched * TrustProductsEvaluationsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrustProductsEvaluationsInstance { $payload = $this->version->fetch('GET', $this->uri); return new TrustProductsEvaluationsInstance( $this->version, $payload, $this->solution['trustProductSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.TrustProductsEvaluationsContext ' . \implode(' ', $context) . ']'; } }PKt[᪥JTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'policySid' => Values::array_get($payload, 'policy_sid'), 'trustProductSid' => Values::array_get($payload, 'trust_product_sid'), 'status' => Values::array_get($payload, 'status'), 'results' => Values::array_get($payload, 'results'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'trustProductSid' => $trustProductSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TrustProductsEvaluationsContext Context for this * TrustProductsEvaluationsInstance */ protected function proxy(): TrustProductsEvaluationsContext { if (!$this->context) { $this->context = new TrustProductsEvaluationsContext( $this->version, $this->solution['trustProductSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TrustProductsEvaluationsInstance * * @return TrustProductsEvaluationsInstance Fetched * TrustProductsEvaluationsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrustProductsEvaluationsInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.TrustProductsEvaluationsInstance ' . \implode(' ', $context) . ']'; } }PKt[il WTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentOptions.phpnu[options['channelEndpointSid'] = $channelEndpointSid; $this->options['channelEndpointSids'] = $channelEndpointSids; } /** * The SID of an channel endpoint * * @param string $channelEndpointSid The sid of an channel endpoint * @return $this Fluent Builder */ public function setChannelEndpointSid(string $channelEndpointSid): self { $this->options['channelEndpointSid'] = $channelEndpointSid; return $this; } /** * comma separated list of channel endpoint sids * * @param string $channelEndpointSids comma separated list of channel endpoint * sids * @return $this Fluent Builder */ public function setChannelEndpointSids(string $channelEndpointSids): self { $this->options['channelEndpointSids'] = $channelEndpointSids; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.ReadTrustProductsChannelEndpointAssignmentOptions ' . $options . ']'; } }PKt[) llXTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'trustProductSid' => Values::array_get($payload, 'trust_product_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'channelEndpointType' => Values::array_get($payload, 'channel_endpoint_type'), 'channelEndpointSid' => Values::array_get($payload, 'channel_endpoint_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'trustProductSid' => $trustProductSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TrustProductsChannelEndpointAssignmentContext Context for this * TrustProductsChannelEndpointAssignmentInstance */ protected function proxy(): TrustProductsChannelEndpointAssignmentContext { if (!$this->context) { $this->context = new TrustProductsChannelEndpointAssignmentContext( $this->version, $this->solution['trustProductSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TrustProductsChannelEndpointAssignmentInstance * * @return TrustProductsChannelEndpointAssignmentInstance Fetched * TrustProductsChannelEndpointAssignmentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrustProductsChannelEndpointAssignmentInstance { return $this->proxy()->fetch(); } /** * Delete the TrustProductsChannelEndpointAssignmentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.TrustProductsChannelEndpointAssignmentInstance ' . \implode(' ', $context) . ']'; } }PKt[ʧLTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsList.phpnu[solution = ['trustProductSid' => $trustProductSid, ]; $this->uri = '/TrustProducts/' . \rawurlencode($trustProductSid) . '/EntityAssignments'; } /** * Create the TrustProductsEntityAssignmentsInstance * * @param string $objectSid The sid of an object bag * @return TrustProductsEntityAssignmentsInstance Created * TrustProductsEntityAssignmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $objectSid): TrustProductsEntityAssignmentsInstance { $data = Values::of(['ObjectSid' => $objectSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TrustProductsEntityAssignmentsInstance( $this->version, $payload, $this->solution['trustProductSid'] ); } /** * Streams TrustProductsEntityAssignmentsInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TrustProductsEntityAssignmentsInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TrustProductsEntityAssignmentsInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of TrustProductsEntityAssignmentsInstance records * from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TrustProductsEntityAssignmentsPage Page of * TrustProductsEntityAssignmentsInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TrustProductsEntityAssignmentsPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TrustProductsEntityAssignmentsPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TrustProductsEntityAssignmentsInstance records * from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TrustProductsEntityAssignmentsPage Page of * TrustProductsEntityAssignmentsInstance */ public function getPage(string $targetUrl): TrustProductsEntityAssignmentsPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TrustProductsEntityAssignmentsPage($this->version, $response, $this->solution); } /** * Constructs a TrustProductsEntityAssignmentsContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): TrustProductsEntityAssignmentsContext { return new TrustProductsEntityAssignmentsContext( $this->version, $this->solution['trustProductSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.TrustProductsEntityAssignmentsList]'; } }PKt[vYYPTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'trustProductSid' => Values::array_get($payload, 'trust_product_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'objectSid' => Values::array_get($payload, 'object_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'trustProductSid' => $trustProductSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return TrustProductsEntityAssignmentsContext Context for this * TrustProductsEntityAssignmentsInstance */ protected function proxy(): TrustProductsEntityAssignmentsContext { if (!$this->context) { $this->context = new TrustProductsEntityAssignmentsContext( $this->version, $this->solution['trustProductSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the TrustProductsEntityAssignmentsInstance * * @return TrustProductsEntityAssignmentsInstance Fetched * TrustProductsEntityAssignmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrustProductsEntityAssignmentsInstance { return $this->proxy()->fetch(); } /** * Delete the TrustProductsEntityAssignmentsInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.TrustProductsEntityAssignmentsInstance ' . \implode(' ', $context) . ']'; } }PKt[MTTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TrustProductsChannelEndpointAssignmentInstance \Twilio\Rest\Trusthub\V1\TrustProducts\TrustProductsChannelEndpointAssignmentInstance */ public function buildInstance(array $payload): TrustProductsChannelEndpointAssignmentInstance { return new TrustProductsChannelEndpointAssignmentInstance( $this->version, $payload, $this->solution['trustProductSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.TrustProductsChannelEndpointAssignmentPage]'; } }PKt[N^ewwLTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TrustProductsEntityAssignmentsInstance \Twilio\Rest\Trusthub\V1\TrustProducts\TrustProductsEntityAssignmentsInstance */ public function buildInstance(array $payload): TrustProductsEntityAssignmentsInstance { return new TrustProductsEntityAssignmentsInstance( $this->version, $payload, $this->solution['trustProductSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.TrustProductsEntityAssignmentsPage]'; } }PKt[JaaTTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentList.phpnu[solution = ['trustProductSid' => $trustProductSid, ]; $this->uri = '/TrustProducts/' . \rawurlencode($trustProductSid) . '/ChannelEndpointAssignments'; } /** * Create the TrustProductsChannelEndpointAssignmentInstance * * @param string $channelEndpointType The type of channel endpoint * @param string $channelEndpointSid The sid of an channel endpoint * @return TrustProductsChannelEndpointAssignmentInstance Created * TrustProductsChannelEndpointAssignmentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $channelEndpointType, string $channelEndpointSid): TrustProductsChannelEndpointAssignmentInstance { $data = Values::of([ 'ChannelEndpointType' => $channelEndpointType, 'ChannelEndpointSid' => $channelEndpointSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TrustProductsChannelEndpointAssignmentInstance( $this->version, $payload, $this->solution['trustProductSid'] ); } /** * Streams TrustProductsChannelEndpointAssignmentInstance records from the API * as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TrustProductsChannelEndpointAssignmentInstance records from the API as * a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TrustProductsChannelEndpointAssignmentInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TrustProductsChannelEndpointAssignmentInstance * records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TrustProductsChannelEndpointAssignmentPage Page of * TrustProductsChannelEndpointAssignmentInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TrustProductsChannelEndpointAssignmentPage { $options = new Values($options); $params = Values::of([ 'ChannelEndpointSid' => $options['channelEndpointSid'], 'ChannelEndpointSids' => $options['channelEndpointSids'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TrustProductsChannelEndpointAssignmentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TrustProductsChannelEndpointAssignmentInstance * records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TrustProductsChannelEndpointAssignmentPage Page of * TrustProductsChannelEndpointAssignmentInstance */ public function getPage(string $targetUrl): TrustProductsChannelEndpointAssignmentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TrustProductsChannelEndpointAssignmentPage($this->version, $response, $this->solution); } /** * Constructs a TrustProductsChannelEndpointAssignmentContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): TrustProductsChannelEndpointAssignmentContext { return new TrustProductsChannelEndpointAssignmentContext( $this->version, $this->solution['trustProductSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.TrustProductsChannelEndpointAssignmentList]'; } }PKt[LsFTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsList.phpnu[solution = ['trustProductSid' => $trustProductSid, ]; $this->uri = '/TrustProducts/' . \rawurlencode($trustProductSid) . '/Evaluations'; } /** * Create the TrustProductsEvaluationsInstance * * @param string $policySid The unique string of a policy * @return TrustProductsEvaluationsInstance Created * TrustProductsEvaluationsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $policySid): TrustProductsEvaluationsInstance { $data = Values::of(['PolicySid' => $policySid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TrustProductsEvaluationsInstance( $this->version, $payload, $this->solution['trustProductSid'] ); } /** * Streams TrustProductsEvaluationsInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TrustProductsEvaluationsInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TrustProductsEvaluationsInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of TrustProductsEvaluationsInstance records from the * API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TrustProductsEvaluationsPage Page of TrustProductsEvaluationsInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TrustProductsEvaluationsPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TrustProductsEvaluationsPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TrustProductsEvaluationsInstance records from * the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TrustProductsEvaluationsPage Page of TrustProductsEvaluationsInstance */ public function getPage(string $targetUrl): TrustProductsEvaluationsPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TrustProductsEvaluationsPage($this->version, $response, $this->solution); } /** * Constructs a TrustProductsEvaluationsContext * * @param string $sid The unique string that identifies the Evaluation resource */ public function getContext(string $sid): TrustProductsEvaluationsContext { return new TrustProductsEvaluationsContext( $this->version, $this->solution['trustProductSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.TrustProductsEvaluationsList]'; } }PKt[7 WTwilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentContext.phpnu[solution = ['trustProductSid' => $trustProductSid, 'sid' => $sid, ]; $this->uri = '/TrustProducts/' . \rawurlencode($trustProductSid) . '/ChannelEndpointAssignments/' . \rawurlencode($sid) . ''; } /** * Fetch the TrustProductsChannelEndpointAssignmentInstance * * @return TrustProductsChannelEndpointAssignmentInstance Fetched * TrustProductsChannelEndpointAssignmentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): TrustProductsChannelEndpointAssignmentInstance { $payload = $this->version->fetch('GET', $this->uri); return new TrustProductsChannelEndpointAssignmentInstance( $this->version, $payload, $this->solution['trustProductSid'], $this->solution['sid'] ); } /** * Delete the TrustProductsChannelEndpointAssignmentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.TrustProductsChannelEndpointAssignmentContext ' . \implode(' ', $context) . ']'; } }PKt[](Twilio/Rest/Trusthub/V1/PoliciesList.phpnu[solution = []; $this->uri = '/Policies'; } /** * Streams PoliciesInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads PoliciesInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return PoliciesInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of PoliciesInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return PoliciesPage Page of PoliciesInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): PoliciesPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new PoliciesPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of PoliciesInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return PoliciesPage Page of PoliciesInstance */ public function getPage(string $targetUrl): PoliciesPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new PoliciesPage($this->version, $response, $this->solution); } /** * Constructs a PoliciesContext * * @param string $sid The unique string that identifies the Policy resource */ public function getContext(string $sid): PoliciesContext { return new PoliciesContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.PoliciesList]'; } }PKt[E멗+Twilio/Rest/Trusthub/V1/EndUserTypePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EndUserTypeInstance \Twilio\Rest\Trusthub\V1\EndUserTypeInstance */ public function buildInstance(array $payload): EndUserTypeInstance { return new EndUserTypeInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.EndUserTypePage]'; } }PKt[Dv5Twilio/Rest/Trusthub/V1/SupportingDocumentOptions.phpnu[options['attributes'] = $attributes; } /** * The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types. * * @param array $attributes The set of parameters that compose the Supporting * Documents resource * @return $this Fluent Builder */ public function setAttributes(array $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.CreateSupportingDocumentOptions ' . $options . ']'; } } class UpdateSupportingDocumentOptions extends Options { /** * @param string $friendlyName The string that you assigned to describe the * resource * @param array $attributes The set of parameters that compose the Supporting * Document resource */ public function __construct(string $friendlyName = Values::NONE, array $attributes = Values::ARRAY_NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['attributes'] = $attributes; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types. * * @param array $attributes The set of parameters that compose the Supporting * Document resource * @return $this Fluent Builder */ public function setAttributes(array $attributes): self { $this->options['attributes'] = $attributes; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.UpdateSupportingDocumentOptions ' . $options . ']'; } }PKt[.663Twilio/Rest/Trusthub/V1/CustomerProfilesOptions.phpnu[options['statusCallback'] = $statusCallback; } /** * The URL we call to inform your application of status changes. * * @param string $statusCallback The URL we call to inform your application of * status changes. * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.CreateCustomerProfilesOptions ' . $options . ']'; } } class ReadCustomerProfilesOptions extends Options { /** * @param string $status The verification status of the Customer-Profile * resource * @param string $friendlyName The string that you assigned to describe the * resource * @param string $policySid The unique string of a policy. */ public function __construct(string $status = Values::NONE, string $friendlyName = Values::NONE, string $policySid = Values::NONE) { $this->options['status'] = $status; $this->options['friendlyName'] = $friendlyName; $this->options['policySid'] = $policySid; } /** * The verification status of the Customer-Profile resource. * * @param string $status The verification status of the Customer-Profile * resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The unique string of a policy that is associated to the Customer-Profile resource. * * @param string $policySid The unique string of a policy. * @return $this Fluent Builder */ public function setPolicySid(string $policySid): self { $this->options['policySid'] = $policySid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.ReadCustomerProfilesOptions ' . $options . ']'; } } class UpdateCustomerProfilesOptions extends Options { /** * @param string $status The verification status of the Customer-Profile * resource * @param string $statusCallback The URL we call to inform your application of * status changes. * @param string $friendlyName The string that you assigned to describe the * resource * @param string $email The email address */ public function __construct(string $status = Values::NONE, string $statusCallback = Values::NONE, string $friendlyName = Values::NONE, string $email = Values::NONE) { $this->options['status'] = $status; $this->options['statusCallback'] = $statusCallback; $this->options['friendlyName'] = $friendlyName; $this->options['email'] = $email; } /** * The verification status of the Customer-Profile resource. * * @param string $status The verification status of the Customer-Profile * resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The URL we call to inform your application of status changes. * * @param string $statusCallback The URL we call to inform your application of * status changes. * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The email address that will receive updates when the Customer-Profile resource changes status. * * @param string $email The email address * @return $this Fluent Builder */ public function setEmail(string $email): self { $this->options['email'] = $email; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.UpdateCustomerProfilesOptions ' . $options . ']'; } }PKt[$k83Twilio/Rest/Trusthub/V1/CustomerProfilesContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/CustomerProfiles/' . \rawurlencode($sid) . ''; } /** * Fetch the CustomerProfilesInstance * * @return CustomerProfilesInstance Fetched CustomerProfilesInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CustomerProfilesInstance { $payload = $this->version->fetch('GET', $this->uri); return new CustomerProfilesInstance($this->version, $payload, $this->solution['sid']); } /** * Update the CustomerProfilesInstance * * @param array|Options $options Optional Arguments * @return CustomerProfilesInstance Updated CustomerProfilesInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): CustomerProfilesInstance { $options = new Values($options); $data = Values::of([ 'Status' => $options['status'], 'StatusCallback' => $options['statusCallback'], 'FriendlyName' => $options['friendlyName'], 'Email' => $options['email'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new CustomerProfilesInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the CustomerProfilesInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the customerProfilesEntityAssignments */ protected function getCustomerProfilesEntityAssignments(): CustomerProfilesEntityAssignmentsList { if (!$this->_customerProfilesEntityAssignments) { $this->_customerProfilesEntityAssignments = new CustomerProfilesEntityAssignmentsList( $this->version, $this->solution['sid'] ); } return $this->_customerProfilesEntityAssignments; } /** * Access the customerProfilesEvaluations */ protected function getCustomerProfilesEvaluations(): CustomerProfilesEvaluationsList { if (!$this->_customerProfilesEvaluations) { $this->_customerProfilesEvaluations = new CustomerProfilesEvaluationsList( $this->version, $this->solution['sid'] ); } return $this->_customerProfilesEvaluations; } /** * Access the customerProfilesChannelEndpointAssignment */ protected function getCustomerProfilesChannelEndpointAssignment(): CustomerProfilesChannelEndpointAssignmentList { if (!$this->_customerProfilesChannelEndpointAssignment) { $this->_customerProfilesChannelEndpointAssignment = new CustomerProfilesChannelEndpointAssignmentList( $this->version, $this->solution['sid'] ); } return $this->_customerProfilesChannelEndpointAssignment; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.CustomerProfilesContext ' . \implode(' ', $context) . ']'; } }PKt[\ ZTwilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CustomerProfilesChannelEndpointAssignmentInstance \Twilio\Rest\Trusthub\V1\CustomerProfiles\CustomerProfilesChannelEndpointAssignmentInstance */ public function buildInstance(array $payload): CustomerProfilesChannelEndpointAssignmentInstance { return new CustomerProfilesChannelEndpointAssignmentInstance( $this->version, $payload, $this->solution['customerProfileSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.CustomerProfilesChannelEndpointAssignmentPage]'; } }PKt[^%m ]Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentContext.phpnu[solution = ['customerProfileSid' => $customerProfileSid, 'sid' => $sid, ]; $this->uri = '/CustomerProfiles/' . \rawurlencode($customerProfileSid) . '/ChannelEndpointAssignments/' . \rawurlencode($sid) . ''; } /** * Fetch the CustomerProfilesChannelEndpointAssignmentInstance * * @return CustomerProfilesChannelEndpointAssignmentInstance Fetched * CustomerProfilesChannelEndpointAssignmentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CustomerProfilesChannelEndpointAssignmentInstance { $payload = $this->version->fetch('GET', $this->uri); return new CustomerProfilesChannelEndpointAssignmentInstance( $this->version, $payload, $this->solution['customerProfileSid'], $this->solution['sid'] ); } /** * Delete the CustomerProfilesChannelEndpointAssignmentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.CustomerProfilesChannelEndpointAssignmentContext ' . \implode(' ', $context) . ']'; } }PKt[G**OTwilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsContext.phpnu[solution = ['customerProfileSid' => $customerProfileSid, 'sid' => $sid, ]; $this->uri = '/CustomerProfiles/' . \rawurlencode($customerProfileSid) . '/Evaluations/' . \rawurlencode($sid) . ''; } /** * Fetch the CustomerProfilesEvaluationsInstance * * @return CustomerProfilesEvaluationsInstance Fetched * CustomerProfilesEvaluationsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CustomerProfilesEvaluationsInstance { $payload = $this->version->fetch('GET', $this->uri); return new CustomerProfilesEvaluationsInstance( $this->version, $payload, $this->solution['customerProfileSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.CustomerProfilesEvaluationsContext ' . \implode(' ', $context) . ']'; } }PKt[ RTwilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CustomerProfilesEntityAssignmentsInstance \Twilio\Rest\Trusthub\V1\CustomerProfiles\CustomerProfilesEntityAssignmentsInstance */ public function buildInstance(array $payload): CustomerProfilesEntityAssignmentsInstance { return new CustomerProfilesEntityAssignmentsInstance( $this->version, $payload, $this->solution['customerProfileSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.CustomerProfilesEntityAssignmentsPage]'; } }PKt[J@>PTwilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'policySid' => Values::array_get($payload, 'policy_sid'), 'customerProfileSid' => Values::array_get($payload, 'customer_profile_sid'), 'status' => Values::array_get($payload, 'status'), 'results' => Values::array_get($payload, 'results'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'customerProfileSid' => $customerProfileSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CustomerProfilesEvaluationsContext Context for this * CustomerProfilesEvaluationsInstance */ protected function proxy(): CustomerProfilesEvaluationsContext { if (!$this->context) { $this->context = new CustomerProfilesEvaluationsContext( $this->version, $this->solution['customerProfileSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CustomerProfilesEvaluationsInstance * * @return CustomerProfilesEvaluationsInstance Fetched * CustomerProfilesEvaluationsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CustomerProfilesEvaluationsInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.CustomerProfilesEvaluationsInstance ' . \implode(' ', $context) . ']'; } }PKt[^Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'customerProfileSid' => Values::array_get($payload, 'customer_profile_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'channelEndpointType' => Values::array_get($payload, 'channel_endpoint_type'), 'channelEndpointSid' => Values::array_get($payload, 'channel_endpoint_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'customerProfileSid' => $customerProfileSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CustomerProfilesChannelEndpointAssignmentContext Context for this * CustomerProfilesChannelEndpointAssignmentInstance */ protected function proxy(): CustomerProfilesChannelEndpointAssignmentContext { if (!$this->context) { $this->context = new CustomerProfilesChannelEndpointAssignmentContext( $this->version, $this->solution['customerProfileSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CustomerProfilesChannelEndpointAssignmentInstance * * @return CustomerProfilesChannelEndpointAssignmentInstance Fetched * CustomerProfilesChannelEndpointAssignmentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CustomerProfilesChannelEndpointAssignmentInstance { return $this->proxy()->fetch(); } /** * Delete the CustomerProfilesChannelEndpointAssignmentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.CustomerProfilesChannelEndpointAssignmentInstance ' . \implode(' ', $context) . ']'; } }PKt[ūnnLTwilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CustomerProfilesEvaluationsInstance \Twilio\Rest\Trusthub\V1\CustomerProfiles\CustomerProfilesEvaluationsInstance */ public function buildInstance(array $payload): CustomerProfilesEvaluationsInstance { return new CustomerProfilesEvaluationsInstance( $this->version, $payload, $this->solution['customerProfileSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.CustomerProfilesEvaluationsPage]'; } }PKt[ɕZTwilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentList.phpnu[solution = ['customerProfileSid' => $customerProfileSid, ]; $this->uri = '/CustomerProfiles/' . \rawurlencode($customerProfileSid) . '/ChannelEndpointAssignments'; } /** * Create the CustomerProfilesChannelEndpointAssignmentInstance * * @param string $channelEndpointType The type of channel endpoint * @param string $channelEndpointSid The sid of an channel endpoint * @return CustomerProfilesChannelEndpointAssignmentInstance Created * CustomerProfilesChannelEndpointAssignmentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $channelEndpointType, string $channelEndpointSid): CustomerProfilesChannelEndpointAssignmentInstance { $data = Values::of([ 'ChannelEndpointType' => $channelEndpointType, 'ChannelEndpointSid' => $channelEndpointSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CustomerProfilesChannelEndpointAssignmentInstance( $this->version, $payload, $this->solution['customerProfileSid'] ); } /** * Streams CustomerProfilesChannelEndpointAssignmentInstance records from the * API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CustomerProfilesChannelEndpointAssignmentInstance records from the API * as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CustomerProfilesChannelEndpointAssignmentInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CustomerProfilesChannelEndpointAssignmentInstance * records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CustomerProfilesChannelEndpointAssignmentPage Page of * CustomerProfilesChannelEndpointAssignmentInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CustomerProfilesChannelEndpointAssignmentPage { $options = new Values($options); $params = Values::of([ 'ChannelEndpointSid' => $options['channelEndpointSid'], 'ChannelEndpointSids' => $options['channelEndpointSids'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CustomerProfilesChannelEndpointAssignmentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of * CustomerProfilesChannelEndpointAssignmentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CustomerProfilesChannelEndpointAssignmentPage Page of * CustomerProfilesChannelEndpointAssignmentInstance */ public function getPage(string $targetUrl): CustomerProfilesChannelEndpointAssignmentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CustomerProfilesChannelEndpointAssignmentPage($this->version, $response, $this->solution); } /** * Constructs a CustomerProfilesChannelEndpointAssignmentContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): CustomerProfilesChannelEndpointAssignmentContext { return new CustomerProfilesChannelEndpointAssignmentContext( $this->version, $this->solution['customerProfileSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.CustomerProfilesChannelEndpointAssignmentList]'; } }PKt[AݤVTwilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'customerProfileSid' => Values::array_get($payload, 'customer_profile_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'objectSid' => Values::array_get($payload, 'object_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'customerProfileSid' => $customerProfileSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CustomerProfilesEntityAssignmentsContext Context for this * CustomerProfilesEntityAssignmentsInstance */ protected function proxy(): CustomerProfilesEntityAssignmentsContext { if (!$this->context) { $this->context = new CustomerProfilesEntityAssignmentsContext( $this->version, $this->solution['customerProfileSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the CustomerProfilesEntityAssignmentsInstance * * @return CustomerProfilesEntityAssignmentsInstance Fetched * CustomerProfilesEntityAssignmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CustomerProfilesEntityAssignmentsInstance { return $this->proxy()->fetch(); } /** * Delete the CustomerProfilesEntityAssignmentsInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.CustomerProfilesEntityAssignmentsInstance ' . \implode(' ', $context) . ']'; } }PKt[.5L!!RTwilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsList.phpnu[solution = ['customerProfileSid' => $customerProfileSid, ]; $this->uri = '/CustomerProfiles/' . \rawurlencode($customerProfileSid) . '/EntityAssignments'; } /** * Create the CustomerProfilesEntityAssignmentsInstance * * @param string $objectSid The sid of an object bag * @return CustomerProfilesEntityAssignmentsInstance Created * CustomerProfilesEntityAssignmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $objectSid): CustomerProfilesEntityAssignmentsInstance { $data = Values::of(['ObjectSid' => $objectSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CustomerProfilesEntityAssignmentsInstance( $this->version, $payload, $this->solution['customerProfileSid'] ); } /** * Streams CustomerProfilesEntityAssignmentsInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CustomerProfilesEntityAssignmentsInstance records from the API as a * list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CustomerProfilesEntityAssignmentsInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CustomerProfilesEntityAssignmentsInstance records * from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CustomerProfilesEntityAssignmentsPage Page of * CustomerProfilesEntityAssignmentsInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CustomerProfilesEntityAssignmentsPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CustomerProfilesEntityAssignmentsPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CustomerProfilesEntityAssignmentsInstance * records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CustomerProfilesEntityAssignmentsPage Page of * CustomerProfilesEntityAssignmentsInstance */ public function getPage(string $targetUrl): CustomerProfilesEntityAssignmentsPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CustomerProfilesEntityAssignmentsPage($this->version, $response, $this->solution); } /** * Constructs a CustomerProfilesEntityAssignmentsContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): CustomerProfilesEntityAssignmentsContext { return new CustomerProfilesEntityAssignmentsContext( $this->version, $this->solution['customerProfileSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.CustomerProfilesEntityAssignmentsList]'; } }PKt[d ]Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentOptions.phpnu[options['channelEndpointSid'] = $channelEndpointSid; $this->options['channelEndpointSids'] = $channelEndpointSids; } /** * The SID of an channel endpoint * * @param string $channelEndpointSid The sid of an channel endpoint * @return $this Fluent Builder */ public function setChannelEndpointSid(string $channelEndpointSid): self { $this->options['channelEndpointSid'] = $channelEndpointSid; return $this; } /** * comma separated list of channel endpoint sids * * @param string $channelEndpointSids comma separated list of channel endpoint * sids * @return $this Fluent Builder */ public function setChannelEndpointSids(string $channelEndpointSids): self { $this->options['channelEndpointSids'] = $channelEndpointSids; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.ReadCustomerProfilesChannelEndpointAssignmentOptions ' . $options . ']'; } }PKt[TV UTwilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsContext.phpnu[solution = ['customerProfileSid' => $customerProfileSid, 'sid' => $sid, ]; $this->uri = '/CustomerProfiles/' . \rawurlencode($customerProfileSid) . '/EntityAssignments/' . \rawurlencode($sid) . ''; } /** * Fetch the CustomerProfilesEntityAssignmentsInstance * * @return CustomerProfilesEntityAssignmentsInstance Fetched * CustomerProfilesEntityAssignmentsInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CustomerProfilesEntityAssignmentsInstance { $payload = $this->version->fetch('GET', $this->uri); return new CustomerProfilesEntityAssignmentsInstance( $this->version, $payload, $this->solution['customerProfileSid'], $this->solution['sid'] ); } /** * Delete the CustomerProfilesEntityAssignmentsInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.CustomerProfilesEntityAssignmentsContext ' . \implode(' ', $context) . ']'; } }PKt[=j*qqLTwilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsList.phpnu[solution = ['customerProfileSid' => $customerProfileSid, ]; $this->uri = '/CustomerProfiles/' . \rawurlencode($customerProfileSid) . '/Evaluations'; } /** * Create the CustomerProfilesEvaluationsInstance * * @param string $policySid The unique string of a policy * @return CustomerProfilesEvaluationsInstance Created * CustomerProfilesEvaluationsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $policySid): CustomerProfilesEvaluationsInstance { $data = Values::of(['PolicySid' => $policySid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CustomerProfilesEvaluationsInstance( $this->version, $payload, $this->solution['customerProfileSid'] ); } /** * Streams CustomerProfilesEvaluationsInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CustomerProfilesEvaluationsInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CustomerProfilesEvaluationsInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of CustomerProfilesEvaluationsInstance records from * the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CustomerProfilesEvaluationsPage Page of * CustomerProfilesEvaluationsInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CustomerProfilesEvaluationsPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CustomerProfilesEvaluationsPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CustomerProfilesEvaluationsInstance records from * the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CustomerProfilesEvaluationsPage Page of * CustomerProfilesEvaluationsInstance */ public function getPage(string $targetUrl): CustomerProfilesEvaluationsPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CustomerProfilesEvaluationsPage($this->version, $response, $this->solution); } /** * Constructs a CustomerProfilesEvaluationsContext * * @param string $sid The unique string that identifies the Evaluation resource */ public function getContext(string $sid): CustomerProfilesEvaluationsContext { return new CustomerProfilesEvaluationsContext( $this->version, $this->solution['customerProfileSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.CustomerProfilesEvaluationsList]'; } }PKt[Q&'Twilio/Rest/Trusthub/V1/EndUserPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EndUserInstance \Twilio\Rest\Trusthub\V1\EndUserInstance */ public function buildInstance(array $payload): EndUserInstance { return new EndUserInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.EndUserPage]'; } }PKt[n *Twilio/Rest/Trusthub/V1/EndUserContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/EndUsers/' . \rawurlencode($sid) . ''; } /** * Fetch the EndUserInstance * * @return EndUserInstance Fetched EndUserInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EndUserInstance { $payload = $this->version->fetch('GET', $this->uri); return new EndUserInstance($this->version, $payload, $this->solution['sid']); } /** * Update the EndUserInstance * * @param array|Options $options Optional Arguments * @return EndUserInstance Updated EndUserInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): EndUserInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'Attributes' => Serialize::jsonObject($options['attributes']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new EndUserInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the EndUserInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.EndUserContext ' . \implode(' ', $context) . ']'; } }PKt[2E-Twilio/Rest/Trusthub/V1/TrustProductsList.phpnu[solution = []; $this->uri = '/TrustProducts'; } /** * Create the TrustProductsInstance * * @param string $friendlyName The string that you assigned to describe the * resource * @param string $email The email address * @param string $policySid The unique string of a policy. * @param array|Options $options Optional Arguments * @return TrustProductsInstance Created TrustProductsInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $email, string $policySid, array $options = []): TrustProductsInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Email' => $email, 'PolicySid' => $policySid, 'StatusCallback' => $options['statusCallback'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new TrustProductsInstance($this->version, $payload); } /** * Streams TrustProductsInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TrustProductsInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TrustProductsInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TrustProductsInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TrustProductsPage Page of TrustProductsInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TrustProductsPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'FriendlyName' => $options['friendlyName'], 'PolicySid' => $options['policySid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TrustProductsPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TrustProductsInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TrustProductsPage Page of TrustProductsInstance */ public function getPage(string $targetUrl): TrustProductsPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TrustProductsPage($this->version, $response, $this->solution); } /** * Constructs a TrustProductsContext * * @param string $sid The unique string that identifies the resource. */ public function getContext(string $sid): TrustProductsContext { return new TrustProductsContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.TrustProductsList]'; } }PKt[`8JT//6Twilio/Rest/Trusthub/V1/SupportingDocumentInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'mimeType' => Values::array_get($payload, 'mime_type'), 'status' => Values::array_get($payload, 'status'), 'type' => Values::array_get($payload, 'type'), 'attributes' => Values::array_get($payload, 'attributes'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SupportingDocumentContext Context for this SupportingDocumentInstance */ protected function proxy(): SupportingDocumentContext { if (!$this->context) { $this->context = new SupportingDocumentContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SupportingDocumentInstance * * @return SupportingDocumentInstance Fetched SupportingDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SupportingDocumentInstance { return $this->proxy()->fetch(); } /** * Update the SupportingDocumentInstance * * @param array|Options $options Optional Arguments * @return SupportingDocumentInstance Updated SupportingDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SupportingDocumentInstance { return $this->proxy()->update($options); } /** * Delete the SupportingDocumentInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.SupportingDocumentInstance ' . \implode(' ', $context) . ']'; } }PKt[<`Q ,Twilio/Rest/Trusthub/V1/PoliciesInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'requirements' => Values::array_get($payload, 'requirements'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PoliciesContext Context for this PoliciesInstance */ protected function proxy(): PoliciesContext { if (!$this->context) { $this->context = new PoliciesContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the PoliciesInstance * * @return PoliciesInstance Fetched PoliciesInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PoliciesInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.PoliciesInstance ' . \implode(' ', $context) . ']'; } }PKt[Uxx+Twilio/Rest/Trusthub/V1/EndUserTypeList.phpnu[solution = []; $this->uri = '/EndUserTypes'; } /** * Streams EndUserTypeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EndUserTypeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EndUserTypeInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of EndUserTypeInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EndUserTypePage Page of EndUserTypeInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EndUserTypePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EndUserTypePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EndUserTypeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EndUserTypePage Page of EndUserTypeInstance */ public function getPage(string $targetUrl): EndUserTypePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EndUserTypePage($this->version, $response, $this->solution); } /** * Constructs a EndUserTypeContext * * @param string $sid The unique string that identifies the End-User Type * resource */ public function getContext(string $sid): EndUserTypeContext { return new EndUserTypeContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.EndUserTypeList]'; } }PKt[T.tt6Twilio/Rest/Trusthub/V1/SupportingDocumentTypeList.phpnu[solution = []; $this->uri = '/SupportingDocumentTypes'; } /** * Streams SupportingDocumentTypeInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SupportingDocumentTypeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SupportingDocumentTypeInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SupportingDocumentTypeInstance records from the * API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SupportingDocumentTypePage Page of SupportingDocumentTypeInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SupportingDocumentTypePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SupportingDocumentTypePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SupportingDocumentTypeInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SupportingDocumentTypePage Page of SupportingDocumentTypeInstance */ public function getPage(string $targetUrl): SupportingDocumentTypePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SupportingDocumentTypePage($this->version, $response, $this->solution); } /** * Constructs a SupportingDocumentTypeContext * * @param string $sid The unique string that identifies the Supporting Document * Type resource */ public function getContext(string $sid): SupportingDocumentTypeContext { return new SupportingDocumentTypeContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.SupportingDocumentTypeList]'; } }PKt[- 2Twilio/Rest/Trusthub/V1/SupportingDocumentList.phpnu[solution = []; $this->uri = '/SupportingDocuments'; } /** * Create the SupportingDocumentInstance * * @param string $friendlyName The string that you assigned to describe the * resource * @param string $type The type of the Supporting Document * @param array|Options $options Optional Arguments * @return SupportingDocumentInstance Created SupportingDocumentInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $type, array $options = []): SupportingDocumentInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'Type' => $type, 'Attributes' => Serialize::jsonObject($options['attributes']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SupportingDocumentInstance($this->version, $payload); } /** * Streams SupportingDocumentInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SupportingDocumentInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SupportingDocumentInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SupportingDocumentInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SupportingDocumentPage Page of SupportingDocumentInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SupportingDocumentPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SupportingDocumentPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SupportingDocumentInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SupportingDocumentPage Page of SupportingDocumentInstance */ public function getPage(string $targetUrl): SupportingDocumentPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SupportingDocumentPage($this->version, $response, $this->solution); } /** * Constructs a SupportingDocumentContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): SupportingDocumentContext { return new SupportingDocumentContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.SupportingDocumentList]'; } }PKt[$$.Twilio/Rest/Trusthub/V1/EndUserTypeContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/EndUserTypes/' . \rawurlencode($sid) . ''; } /** * Fetch the EndUserTypeInstance * * @return EndUserTypeInstance Fetched EndUserTypeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EndUserTypeInstance { $payload = $this->version->fetch('GET', $this->uri); return new EndUserTypeInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Trusthub.V1.EndUserTypeContext ' . \implode(' ', $context) . ']'; } }PKt[`V=0Twilio/Rest/Trusthub/V1/TrustProductsOptions.phpnu[options['statusCallback'] = $statusCallback; } /** * The URL we call to inform your application of status changes. * * @param string $statusCallback The URL we call to inform your application of * status changes. * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.CreateTrustProductsOptions ' . $options . ']'; } } class ReadTrustProductsOptions extends Options { /** * @param string $status The verification status of the Customer-Profile * resource * @param string $friendlyName The string that you assigned to describe the * resource * @param string $policySid The unique string of a policy. */ public function __construct(string $status = Values::NONE, string $friendlyName = Values::NONE, string $policySid = Values::NONE) { $this->options['status'] = $status; $this->options['friendlyName'] = $friendlyName; $this->options['policySid'] = $policySid; } /** * The verification status of the Customer-Profile resource. * * @param string $status The verification status of the Customer-Profile * resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The unique string of a policy that is associated to the Customer-Profile resource. * * @param string $policySid The unique string of a policy. * @return $this Fluent Builder */ public function setPolicySid(string $policySid): self { $this->options['policySid'] = $policySid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.ReadTrustProductsOptions ' . $options . ']'; } } class UpdateTrustProductsOptions extends Options { /** * @param string $status The verification status of the Customer-Profile * resource * @param string $statusCallback The URL we call to inform your application of * status changes. * @param string $friendlyName The string that you assigned to describe the * resource * @param string $email The email address */ public function __construct(string $status = Values::NONE, string $statusCallback = Values::NONE, string $friendlyName = Values::NONE, string $email = Values::NONE) { $this->options['status'] = $status; $this->options['statusCallback'] = $statusCallback; $this->options['friendlyName'] = $friendlyName; $this->options['email'] = $email; } /** * The verification status of the Customer-Profile resource. * * @param string $status The verification status of the Customer-Profile * resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The URL we call to inform your application of status changes. * * @param string $statusCallback The URL we call to inform your application of * status changes. * @return $this Fluent Builder */ public function setStatusCallback(string $statusCallback): self { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The string that you assigned to describe the resource. * * @param string $friendlyName The string that you assigned to describe the * resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The email address that will receive updates when the Customer-Profile resource changes status. * * @param string $email The email address * @return $this Fluent Builder */ public function setEmail(string $email): self { $this->options['email'] = $email; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Trusthub.V1.UpdateTrustProductsOptions ' . $options . ']'; } }PKt[-(Twilio/Rest/Trusthub/V1/PoliciesPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PoliciesInstance \Twilio\Rest\Trusthub\V1\PoliciesInstance */ public function buildInstance(array $payload): PoliciesInstance { return new PoliciesInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1.PoliciesPage]'; } }PKt[ˤKKTwilio/Rest/Trusthub/V1.phpnu[version = 'v1'; } protected function getCustomerProfiles(): CustomerProfilesList { if (!$this->_customerProfiles) { $this->_customerProfiles = new CustomerProfilesList($this); } return $this->_customerProfiles; } protected function getEndUsers(): EndUserList { if (!$this->_endUsers) { $this->_endUsers = new EndUserList($this); } return $this->_endUsers; } protected function getEndUserTypes(): EndUserTypeList { if (!$this->_endUserTypes) { $this->_endUserTypes = new EndUserTypeList($this); } return $this->_endUserTypes; } protected function getPolicies(): PoliciesList { if (!$this->_policies) { $this->_policies = new PoliciesList($this); } return $this->_policies; } protected function getSupportingDocuments(): SupportingDocumentList { if (!$this->_supportingDocuments) { $this->_supportingDocuments = new SupportingDocumentList($this); } return $this->_supportingDocuments; } protected function getSupportingDocumentTypes(): SupportingDocumentTypeList { if (!$this->_supportingDocumentTypes) { $this->_supportingDocumentTypes = new SupportingDocumentTypeList($this); } return $this->_supportingDocumentTypes; } protected function getTrustProducts(): TrustProductsList { if (!$this->_trustProducts) { $this->_trustProducts = new TrustProductsList($this); } return $this->_trustProducts; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Trusthub.V1]'; } }PKt[W*Twilio/Rest/Lookups/V1/PhoneNumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PhoneNumberInstance \Twilio\Rest\Lookups\V1\PhoneNumberInstance */ public function buildInstance(array $payload): PhoneNumberInstance { return new PhoneNumberInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Lookups.V1.PhoneNumberPage]'; } }PKt[TKK-Twilio/Rest/Lookups/V1/PhoneNumberContext.phpnu[solution = ['phoneNumber' => $phoneNumber, ]; $this->uri = '/PhoneNumbers/' . \rawurlencode($phoneNumber) . ''; } /** * Fetch the PhoneNumberInstance * * @param array|Options $options Optional Arguments * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): PhoneNumberInstance { $options = new Values($options); $params = Values::of([ 'CountryCode' => $options['countryCode'], 'Type' => Serialize::map($options['type'], function($e) { return $e; }), 'AddOns' => Serialize::map($options['addOns'], function($e) { return $e; }), ]); $params = \array_merge($params, Serialize::prefixedCollapsibleMap($options['addOnsData'], 'AddOns')); $payload = $this->version->fetch('GET', $this->uri, $params); return new PhoneNumberInstance($this->version, $payload, $this->solution['phoneNumber']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Lookups.V1.PhoneNumberContext ' . \implode(' ', $context) . ']'; } }PKt[ނ}8  *Twilio/Rest/Lookups/V1/PhoneNumberList.phpnu[solution = []; } /** * Constructs a PhoneNumberContext * * @param string $phoneNumber The phone number to fetch in E.164 format */ public function getContext(string $phoneNumber): PhoneNumberContext { return new PhoneNumberContext($this->version, $phoneNumber); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Lookups.V1.PhoneNumberList]'; } }PKt[iO5l l .Twilio/Rest/Lookups/V1/PhoneNumberInstance.phpnu[properties = [ 'callerName' => Values::array_get($payload, 'caller_name'), 'countryCode' => Values::array_get($payload, 'country_code'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'nationalFormat' => Values::array_get($payload, 'national_format'), 'carrier' => Values::array_get($payload, 'carrier'), 'addOns' => Values::array_get($payload, 'add_ons'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['phoneNumber' => $phoneNumber ?: $this->properties['phoneNumber'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PhoneNumberContext Context for this PhoneNumberInstance */ protected function proxy(): PhoneNumberContext { if (!$this->context) { $this->context = new PhoneNumberContext($this->version, $this->solution['phoneNumber']); } return $this->context; } /** * Fetch the PhoneNumberInstance * * @param array|Options $options Optional Arguments * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): PhoneNumberInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Lookups.V1.PhoneNumberInstance ' . \implode(' ', $context) . ']'; } }PKt[n\k;ff-Twilio/Rest/Lookups/V1/PhoneNumberOptions.phpnu[options['countryCode'] = $countryCode; $this->options['type'] = $type; $this->options['addOns'] = $addOns; $this->options['addOnsData'] = $addOnsData; } /** * The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format. * * @param string $countryCode The ISO country code of the phone number * @return $this Fluent Builder */ public function setCountryCode(string $countryCode): self { $this->options['countryCode'] = $countryCode; return $this; } /** * The type of information to return. Can be: `carrier` or `caller-name`. The default is null. Carrier information costs $0.005 per phone number looked up. Caller Name information is currently available only in the US and costs $0.01 per phone number looked up. To retrieve both types on information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value. * * @param string[] $type The type of information to return * @return $this Fluent Builder */ public function setType(array $type): self { $this->options['type'] = $type; return $this; } /** * The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons). * * @param string[] $addOns The unique_name of an Add-on you would like to invoke * @return $this Fluent Builder */ public function setAddOns(array $addOns): self { $this->options['addOns'] = $addOns; return $this; } /** * Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on. * * @param string $addOnsData Data specific to the add-on you would like to * invoke * @return $this Fluent Builder */ public function setAddOnsData(string $addOnsData): self { $this->options['addOnsData'] = $addOnsData; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Lookups.V1.FetchPhoneNumberOptions ' . $options . ']'; } }PKt[Twilio/Rest/Lookups/V1.phpnu[version = 'v1'; } protected function getPhoneNumbers(): PhoneNumberList { if (!$this->_phoneNumbers) { $this->_phoneNumbers = new PhoneNumberList($this); } return $this->_phoneNumbers; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Lookups.V1]'; } }PKt[47*Twilio/Rest/Lookups/V2/PhoneNumberPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return PhoneNumberInstance \Twilio\Rest\Lookups\V2\PhoneNumberInstance */ public function buildInstance(array $payload): PhoneNumberInstance { return new PhoneNumberInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Lookups.V2.PhoneNumberPage]'; } }PKt[y -Twilio/Rest/Lookups/V2/PhoneNumberContext.phpnu[solution = ['phoneNumber' => $phoneNumber, ]; $this->uri = '/PhoneNumbers/' . \rawurlencode($phoneNumber) . ''; } /** * Fetch the PhoneNumberInstance * * @param array|Options $options Optional Arguments * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): PhoneNumberInstance { $options = new Values($options); $params = Values::of([ 'Fields' => $options['fields'], 'CountryCode' => $options['countryCode'], 'FirstName' => $options['firstName'], 'LastName' => $options['lastName'], 'AddressLine1' => $options['addressLine1'], 'AddressLine2' => $options['addressLine2'], 'City' => $options['city'], 'State' => $options['state'], 'PostalCode' => $options['postalCode'], 'AddressCountryCode' => $options['addressCountryCode'], 'NationalId' => $options['nationalId'], 'DateOfBirth' => $options['dateOfBirth'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new PhoneNumberInstance($this->version, $payload, $this->solution['phoneNumber']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Lookups.V2.PhoneNumberContext ' . \implode(' ', $context) . ']'; } }PKt[bѿ4gg*Twilio/Rest/Lookups/V2/PhoneNumberList.phpnu[solution = []; } /** * Constructs a PhoneNumberContext * * @param string $phoneNumber Phone number to lookup */ public function getContext(string $phoneNumber): PhoneNumberContext { return new PhoneNumberContext($this->version, $phoneNumber); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Lookups.V2.PhoneNumberList]'; } }PKt[|)̞.Twilio/Rest/Lookups/V2/PhoneNumberInstance.phpnu[properties = [ 'callingCountryCode' => Values::array_get($payload, 'calling_country_code'), 'countryCode' => Values::array_get($payload, 'country_code'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'nationalFormat' => Values::array_get($payload, 'national_format'), 'valid' => Values::array_get($payload, 'valid'), 'validationErrors' => Values::array_get($payload, 'validation_errors'), 'callerName' => Values::array_get($payload, 'caller_name'), 'simSwap' => Values::array_get($payload, 'sim_swap'), 'callForwarding' => Values::array_get($payload, 'call_forwarding'), 'liveActivity' => Values::array_get($payload, 'live_activity'), 'lineTypeIntelligence' => Values::array_get($payload, 'line_type_intelligence'), 'identityMatch' => Values::array_get($payload, 'identity_match'), 'smsPumpingRisk' => Values::array_get($payload, 'sms_pumping_risk'), 'disposablePhoneNumberRisk' => Values::array_get($payload, 'disposable_phone_number_risk'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['phoneNumber' => $phoneNumber ?: $this->properties['phoneNumber'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PhoneNumberContext Context for this PhoneNumberInstance */ protected function proxy(): PhoneNumberContext { if (!$this->context) { $this->context = new PhoneNumberContext($this->version, $this->solution['phoneNumber']); } return $this->context; } /** * Fetch the PhoneNumberInstance * * @param array|Options $options Optional Arguments * @return PhoneNumberInstance Fetched PhoneNumberInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): PhoneNumberInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Lookups.V2.PhoneNumberInstance ' . \implode(' ', $context) . ']'; } }PKt[!#!#-Twilio/Rest/Lookups/V2/PhoneNumberOptions.phpnu[options['fields'] = $fields; $this->options['countryCode'] = $countryCode; $this->options['firstName'] = $firstName; $this->options['lastName'] = $lastName; $this->options['addressLine1'] = $addressLine1; $this->options['addressLine2'] = $addressLine2; $this->options['city'] = $city; $this->options['state'] = $state; $this->options['postalCode'] = $postalCode; $this->options['addressCountryCode'] = $addressCountryCode; $this->options['nationalId'] = $nationalId; $this->options['dateOfBirth'] = $dateOfBirth; } /** * A comma-separated list of fields to return. Possible values are caller_name, sim_swap, call_forwarding, live_activity, line_type_intelligence, identity_match. * * @param string $fields Fields to return * @return $this Fluent Builder */ public function setFields(string $fields): self { $this->options['fields'] = $fields; return $this; } /** * The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format. * * @param string $countryCode Country code for national phone number lookups * @return $this Fluent Builder */ public function setCountryCode(string $countryCode): self { $this->options['countryCode'] = $countryCode; return $this; } /** * User’s first name. This query parameter is only used (optionally) for identity_match package requests. * * @param string $firstName User’s first name. * @return $this Fluent Builder */ public function setFirstName(string $firstName): self { $this->options['firstName'] = $firstName; return $this; } /** * User’s last name. This query parameter is only used (optionally) for identity_match package requests. * * @param string $lastName User’s last name. * @return $this Fluent Builder */ public function setLastName(string $lastName): self { $this->options['lastName'] = $lastName; return $this; } /** * User’s first address line. This query parameter is only used (optionally) for identity_match package requests. * * @param string $addressLine1 User’s first address line. * @return $this Fluent Builder */ public function setAddressLine1(string $addressLine1): self { $this->options['addressLine1'] = $addressLine1; return $this; } /** * User’s second address line. This query parameter is only used (optionally) for identity_match package requests. * * @param string $addressLine2 User’s second address line. * @return $this Fluent Builder */ public function setAddressLine2(string $addressLine2): self { $this->options['addressLine2'] = $addressLine2; return $this; } /** * User’s city. This query parameter is only used (optionally) for identity_match package requests. * * @param string $city User’s city. * @return $this Fluent Builder */ public function setCity(string $city): self { $this->options['city'] = $city; return $this; } /** * User’s country subdivision, such as state, province, or locality. This query parameter is only used (optionally) for identity_match package requests. * * @param string $state User’s country subdivision, such as state, province, or * locality. * @return $this Fluent Builder */ public function setState(string $state): self { $this->options['state'] = $state; return $this; } /** * User’s postal zip code. This query parameter is only used (optionally) for identity_match package requests. * * @param string $postalCode User’s postal zip code. * @return $this Fluent Builder */ public function setPostalCode(string $postalCode): self { $this->options['postalCode'] = $postalCode; return $this; } /** * User’s country, up to two characters. This query parameter is only used (optionally) for identity_match package requests. * * @param string $addressCountryCode User’s country, up to two characters. * @return $this Fluent Builder */ public function setAddressCountryCode(string $addressCountryCode): self { $this->options['addressCountryCode'] = $addressCountryCode; return $this; } /** * User’s national ID, such as SSN or Passport ID. This query parameter is only used (optionally) for identity_match package requests. * * @param string $nationalId User’s national ID, such as SSN or Passport ID. * @return $this Fluent Builder */ public function setNationalId(string $nationalId): self { $this->options['nationalId'] = $nationalId; return $this; } /** * User’s date of birth, in YYYYMMDD format. This query parameter is only used (optionally) for identity_match package requests. * * @param string $dateOfBirth User’s date of birth, in YYYYMMDD format. * @return $this Fluent Builder */ public function setDateOfBirth(string $dateOfBirth): self { $this->options['dateOfBirth'] = $dateOfBirth; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Lookups.V2.FetchPhoneNumberOptions ' . $options . ']'; } }PKt[HO-Twilio/Rest/Lookups/V2.phpnu[version = 'v2'; } protected function getPhoneNumbers(): PhoneNumberList { if (!$this->_phoneNumbers) { $this->_phoneNumbers = new PhoneNumberList($this); } return $this->_phoneNumbers; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Lookups.V2]'; } }PKt[gITwilio/Rest/Conversations.phpnu[baseUrl = 'https://conversations.twilio.com'; } /** * @return V1 Version v1 of conversations */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getConfiguration(): \Twilio\Rest\Conversations\V1\ConfigurationList { return $this->v1->configuration; } protected function contextConfiguration(): \Twilio\Rest\Conversations\V1\ConfigurationContext { return $this->v1->configuration(); } protected function getAddressConfigurations(): \Twilio\Rest\Conversations\V1\AddressConfigurationList { return $this->v1->addressConfigurations; } /** * @param string $sid The SID or Address of the Configuration. */ protected function contextAddressConfigurations(string $sid): \Twilio\Rest\Conversations\V1\AddressConfigurationContext { return $this->v1->addressConfigurations($sid); } protected function getConversations(): \Twilio\Rest\Conversations\V1\ConversationList { return $this->v1->conversations; } /** * @param string $sid A 34 character string that uniquely identifies this * resource. */ protected function contextConversations(string $sid): \Twilio\Rest\Conversations\V1\ConversationContext { return $this->v1->conversations($sid); } protected function getCredentials(): \Twilio\Rest\Conversations\V1\CredentialList { return $this->v1->credentials; } /** * @param string $sid A 34 character string that uniquely identifies this * resource. */ protected function contextCredentials(string $sid): \Twilio\Rest\Conversations\V1\CredentialContext { return $this->v1->credentials($sid); } protected function getParticipantConversations(): \Twilio\Rest\Conversations\V1\ParticipantConversationList { return $this->v1->participantConversations; } protected function getRoles(): \Twilio\Rest\Conversations\V1\RoleList { return $this->v1->roles; } /** * @param string $sid The SID of the Role resource to fetch */ protected function contextRoles(string $sid): \Twilio\Rest\Conversations\V1\RoleContext { return $this->v1->roles($sid); } protected function getServices(): \Twilio\Rest\Conversations\V1\ServiceList { return $this->v1->services; } /** * @param string $sid A 34 character string that uniquely identifies this * resource. */ protected function contextServices(string $sid): \Twilio\Rest\Conversations\V1\ServiceContext { return $this->v1->services($sid); } protected function getUsers(): \Twilio\Rest\Conversations\V1\UserList { return $this->v1->users; } /** * @param string $sid The SID of the User resource to fetch */ protected function contextUsers(string $sid): \Twilio\Rest\Conversations\V1\UserContext { return $this->v1->users($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Conversations]'; } }PKt[+9Twilio/Rest/Verify/V2/VerificationAttemptsSummaryList.phpnu[solution = []; } /** * Constructs a VerificationAttemptsSummaryContext */ public function getContext(): VerificationAttemptsSummaryContext { return new VerificationAttemptsSummaryContext($this->version); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.VerificationAttemptsSummaryList]'; } }PKt[|v)Twilio/Rest/Verify/V2/SafelistContext.phpnu[solution = ['phoneNumber' => $phoneNumber, ]; $this->uri = '/SafeList/Numbers/' . \rawurlencode($phoneNumber) . ''; } /** * Fetch the SafelistInstance * * @return SafelistInstance Fetched SafelistInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SafelistInstance { $payload = $this->version->fetch('GET', $this->uri); return new SafelistInstance($this->version, $payload, $this->solution['phoneNumber']); } /** * Delete the SafelistInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.SafelistContext ' . \implode(' ', $context) . ']'; } }PKt[1{11"Twilio/Rest/Verify/V2/FormList.phpnu[solution = []; } /** * Constructs a FormContext * * @param string $formType The Type of this Form */ public function getContext(string $formType): FormContext { return new FormContext($this->version, $formType); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.FormList]'; } }PKt[F &Twilio/Rest/Verify/V2/FormInstance.phpnu[properties = [ 'formType' => Values::array_get($payload, 'form_type'), 'forms' => Values::array_get($payload, 'forms'), 'formMeta' => Values::array_get($payload, 'form_meta'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['formType' => $formType ?: $this->properties['formType'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FormContext Context for this FormInstance */ protected function proxy(): FormContext { if (!$this->context) { $this->context = new FormContext($this->version, $this->solution['formType']); } return $this->context; } /** * Fetch the FormInstance * * @return FormInstance Fetched FormInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FormInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.FormInstance ' . \implode(' ', $context) . ']'; } }PKt[8$<Twilio/Rest/Verify/V2/Service/MessagingConfigurationList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/MessagingConfigurations'; } /** * Create the MessagingConfigurationInstance * * @param string $country The ISO-3166-1 country code of the country or `all`. * @param string $messagingServiceSid The SID of the Messaging Service used for * this configuration. * @return MessagingConfigurationInstance Created MessagingConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $country, string $messagingServiceSid): MessagingConfigurationInstance { $data = Values::of(['Country' => $country, 'MessagingServiceSid' => $messagingServiceSid, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new MessagingConfigurationInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams MessagingConfigurationInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads MessagingConfigurationInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return MessagingConfigurationInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of MessagingConfigurationInstance records from the * API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return MessagingConfigurationPage Page of MessagingConfigurationInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): MessagingConfigurationPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new MessagingConfigurationPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of MessagingConfigurationInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return MessagingConfigurationPage Page of MessagingConfigurationInstance */ public function getPage(string $targetUrl): MessagingConfigurationPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new MessagingConfigurationPage($this->version, $response, $this->solution); } /** * Constructs a MessagingConfigurationContext * * @param string $country The ISO-3166-1 country code of the country or `all`. */ public function getContext(string $country): MessagingConfigurationContext { return new MessagingConfigurationContext($this->version, $this->solution['serviceSid'], $country); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.MessagingConfigurationList]'; } }PKt[퓫#-Twilio/Rest/Verify/V2/Service/WebhookPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return WebhookInstance \Twilio\Rest\Verify\V2\Service\WebhookInstance */ public function buildInstance(array $payload): WebhookInstance { return new WebhookInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.WebhookPage]'; } }PKt[P 2Twilio/Rest/Verify/V2/Service/VerificationList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Verifications'; } /** * Create the VerificationInstance * * @param string $to The phone number or email to verify * @param string $channel The verification method to use * @param array|Options $options Optional Arguments * @return VerificationInstance Created VerificationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $to, string $channel, array $options = []): VerificationInstance { $options = new Values($options); $data = Values::of([ 'To' => $to, 'Channel' => $channel, 'CustomFriendlyName' => $options['customFriendlyName'], 'CustomMessage' => $options['customMessage'], 'SendDigits' => $options['sendDigits'], 'Locale' => $options['locale'], 'CustomCode' => $options['customCode'], 'Amount' => $options['amount'], 'Payee' => $options['payee'], 'RateLimits' => Serialize::jsonObject($options['rateLimits']), 'ChannelConfiguration' => Serialize::jsonObject($options['channelConfiguration']), 'AppHash' => $options['appHash'], 'TemplateSid' => $options['templateSid'], 'TemplateCustomSubstitutions' => $options['templateCustomSubstitutions'], 'DeviceIp' => $options['deviceIp'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new VerificationInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Constructs a VerificationContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): VerificationContext { return new VerificationContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.VerificationList]'; } }PKt[o[17Twilio/Rest/Verify/V2/Service/VerificationCheckPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return VerificationCheckInstance \Twilio\Rest\Verify\V2\Service\VerificationCheckInstance */ public function buildInstance(array $payload): VerificationCheckInstance { return new VerificationCheckInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.VerificationCheckPage]'; } }PKt[4"7Twilio/Rest/Verify/V2/Service/VerificationCheckList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/VerificationCheck'; } /** * Create the VerificationCheckInstance * * @param array|Options $options Optional Arguments * @return VerificationCheckInstance Created VerificationCheckInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): VerificationCheckInstance { $options = new Values($options); $data = Values::of([ 'Code' => $options['code'], 'To' => $options['to'], 'VerificationSid' => $options['verificationSid'], 'Amount' => $options['amount'], 'Payee' => $options['payee'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new VerificationCheckInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.VerificationCheckList]'; } }PKt[[5Twilio/Rest/Verify/V2/Service/AccessTokenInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'entityIdentity' => Values::array_get($payload, 'entity_identity'), 'factorType' => Values::array_get($payload, 'factor_type'), 'factorFriendlyName' => Values::array_get($payload, 'factor_friendly_name'), 'token' => Values::array_get($payload, 'token'), 'url' => Values::array_get($payload, 'url'), 'ttl' => Values::array_get($payload, 'ttl'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return AccessTokenContext Context for this AccessTokenInstance */ protected function proxy(): AccessTokenContext { if (!$this->context) { $this->context = new AccessTokenContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the AccessTokenInstance * * @return AccessTokenInstance Fetched AccessTokenInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AccessTokenInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.AccessTokenInstance ' . \implode(' ', $context) . ']'; } }PKt["ߢ,Twilio/Rest/Verify/V2/Service/EntityPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EntityInstance \Twilio\Rest\Verify\V2\Service\EntityInstance */ public function buildInstance(array $payload): EntityInstance { return new EntityInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.EntityPage]'; } }PKt[\г-Twilio/Rest/Verify/V2/Service/WebhookList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Webhooks'; } /** * Create the WebhookInstance * * @param string $friendlyName The string that you assigned to describe the * webhook * @param string[] $eventTypes The array of events that this Webhook is * subscribed to. * @param string $webhookUrl The URL associated with this Webhook. * @param array|Options $options Optional Arguments * @return WebhookInstance Created WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $eventTypes, string $webhookUrl, array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'EventTypes' => Serialize::map($eventTypes, function($e) { return $e; }), 'WebhookUrl' => $webhookUrl, 'Status' => $options['status'], 'Version' => $options['version'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new WebhookInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams WebhookInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads WebhookInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return WebhookInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of WebhookInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return WebhookPage Page of WebhookInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): WebhookPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new WebhookPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of WebhookInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return WebhookPage Page of WebhookInstance */ public function getPage(string $targetUrl): WebhookPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new WebhookPage($this->version, $response, $this->solution); } /** * Constructs a WebhookContext * * @param string $sid The unique string that identifies the resource to fetch */ public function getContext(string $sid): WebhookContext { return new WebhookContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.WebhookList]'; } }PKt[e2Twilio/Rest/Verify/V2/Service/VerificationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return VerificationInstance \Twilio\Rest\Verify\V2\Service\VerificationInstance */ public function buildInstance(array $payload): VerificationInstance { return new VerificationInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.VerificationPage]'; } }PKt[w R2Twilio/Rest/Verify/V2/Service/RateLimitContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/RateLimits/' . \rawurlencode($sid) . ''; } /** * Update the RateLimitInstance * * @param array|Options $options Optional Arguments * @return RateLimitInstance Updated RateLimitInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): RateLimitInstance { $options = new Values($options); $data = Values::of(['Description' => $options['description'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RateLimitInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Fetch the RateLimitInstance * * @return RateLimitInstance Fetched RateLimitInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RateLimitInstance { $payload = $this->version->fetch('GET', $this->uri); return new RateLimitInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the RateLimitInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the buckets */ protected function getBuckets(): BucketList { if (!$this->_buckets) { $this->_buckets = new BucketList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_buckets; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.RateLimitContext ' . \implode(' ', $context) . ']'; } }PKt[]fj/Twilio/Rest/Verify/V2/Service/RateLimitPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RateLimitInstance \Twilio\Rest\Verify\V2\Service\RateLimitInstance */ public function buildInstance(array $payload): RateLimitInstance { return new RateLimitInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.RateLimitPage]'; } }PKt[/Twilio/Rest/Verify/V2/Service/EntityContext.phpnu[solution = ['serviceSid' => $serviceSid, 'identity' => $identity, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . ''; } /** * Delete the EntityInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the EntityInstance * * @return EntityInstance Fetched EntityInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EntityInstance { $payload = $this->version->fetch('GET', $this->uri); return new EntityInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'] ); } /** * Access the factors */ protected function getFactors(): FactorList { if (!$this->_factors) { $this->_factors = new FactorList( $this->version, $this->solution['serviceSid'], $this->solution['identity'] ); } return $this->_factors; } /** * Access the newFactors */ protected function getNewFactors(): NewFactorList { if (!$this->_newFactors) { $this->_newFactors = new NewFactorList( $this->version, $this->solution['serviceSid'], $this->solution['identity'] ); } return $this->_newFactors; } /** * Access the challenges */ protected function getChallenges(): ChallengeList { if (!$this->_challenges) { $this->_challenges = new ChallengeList( $this->version, $this->solution['serviceSid'], $this->solution['identity'] ); } return $this->_challenges; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.EntityContext ' . \implode(' ', $context) . ']'; } }PKt[Al<Twilio/Rest/Verify/V2/Service/MessagingConfigurationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return MessagingConfigurationInstance \Twilio\Rest\Verify\V2\Service\MessagingConfigurationInstance */ public function buildInstance(array $payload): MessagingConfigurationInstance { return new MessagingConfigurationInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.MessagingConfigurationPage]'; } }PKt[ 88:Twilio/Rest/Verify/V2/Service/VerificationCheckOptions.phpnu[options['code'] = $code; $this->options['to'] = $to; $this->options['verificationSid'] = $verificationSid; $this->options['amount'] = $amount; $this->options['payee'] = $payee; } /** * The 4-10 character string being verified. * * @param string $code The verification string * @return $this Fluent Builder */ public function setCode(string $code): self { $this->options['code'] = $code; return $this; } /** * The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). * * @param string $to The phone number or email to verify * @return $this Fluent Builder */ public function setTo(string $to): self { $this->options['to'] = $to; return $this; } /** * A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. * * @param string $verificationSid A SID that uniquely identifies the * Verification Check * @return $this Fluent Builder */ public function setVerificationSid(string $verificationSid): self { $this->options['verificationSid'] = $verificationSid; return $this; } /** * The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. * * @param string $amount The amount of the associated PSD2 compliant * transaction. * @return $this Fluent Builder */ public function setAmount(string $amount): self { $this->options['amount'] = $amount; return $this; } /** * The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. * * @param string $payee The payee of the associated PSD2 compliant transaction * @return $this Fluent Builder */ public function setPayee(string $payee): self { $this->options['payee'] = $payee; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.CreateVerificationCheckOptions ' . $options . ']'; } }PKt[fWW@Twilio/Rest/Verify/V2/Service/MessagingConfigurationInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'country' => Values::array_get($payload, 'country'), 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'country' => $country ?: $this->properties['country'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return MessagingConfigurationContext Context for this * MessagingConfigurationInstance */ protected function proxy(): MessagingConfigurationContext { if (!$this->context) { $this->context = new MessagingConfigurationContext( $this->version, $this->solution['serviceSid'], $this->solution['country'] ); } return $this->context; } /** * Update the MessagingConfigurationInstance * * @param string $messagingServiceSid The SID of the Messaging Service used for * this configuration. * @return MessagingConfigurationInstance Updated MessagingConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $messagingServiceSid): MessagingConfigurationInstance { return $this->proxy()->update($messagingServiceSid); } /** * Fetch the MessagingConfigurationInstance * * @return MessagingConfigurationInstance Fetched MessagingConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessagingConfigurationInstance { return $this->proxy()->fetch(); } /** * Delete the MessagingConfigurationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.MessagingConfigurationInstance ' . \implode(' ', $context) . ']'; } }PKt[qt4Twilio/Rest/Verify/V2/Service/AccessTokenContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/AccessTokens/' . \rawurlencode($sid) . ''; } /** * Fetch the AccessTokenInstance * * @return AccessTokenInstance Fetched AccessTokenInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): AccessTokenInstance { $payload = $this->version->fetch('GET', $this->uri); return new AccessTokenInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.AccessTokenContext ' . \implode(' ', $context) . ']'; } }PKt[QZZ4Twilio/Rest/Verify/V2/Service/AccessTokenOptions.phpnu[options['factorFriendlyName'] = $factorFriendlyName; $this->options['ttl'] = $ttl; } /** * The friendly name of the factor that is going to be created with this access token * * @param string $factorFriendlyName The factor friendly name * @return $this Fluent Builder */ public function setFactorFriendlyName(string $factorFriendlyName): self { $this->options['factorFriendlyName'] = $factorFriendlyName; return $this; } /** * How long, in seconds, the access token is valid. Can be an integer between 60 and 300. Default is 60. * * @param int $ttl How long, in seconds, the access token is valid. * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.CreateAccessTokenOptions ' . $options . ']'; } }PKt[gƻ]]/Twilio/Rest/Verify/V2/Service/RateLimitList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/RateLimits'; } /** * Create the RateLimitInstance * * @param string $uniqueName A unique, developer assigned name of this Rate * Limit. * @param array|Options $options Optional Arguments * @return RateLimitInstance Created RateLimitInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $uniqueName, array $options = []): RateLimitInstance { $options = new Values($options); $data = Values::of(['UniqueName' => $uniqueName, 'Description' => $options['description'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RateLimitInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams RateLimitInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RateLimitInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RateLimitInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of RateLimitInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RateLimitPage Page of RateLimitInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RateLimitPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RateLimitPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RateLimitInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RateLimitPage Page of RateLimitInstance */ public function getPage(string $targetUrl): RateLimitPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RateLimitPage($this->version, $response, $this->solution); } /** * Constructs a RateLimitContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): RateLimitContext { return new RateLimitContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.RateLimitList]'; } }PKt[°} ?Twilio/Rest/Verify/V2/Service/MessagingConfigurationContext.phpnu[solution = ['serviceSid' => $serviceSid, 'country' => $country, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/MessagingConfigurations/' . \rawurlencode($country) . ''; } /** * Update the MessagingConfigurationInstance * * @param string $messagingServiceSid The SID of the Messaging Service used for * this configuration. * @return MessagingConfigurationInstance Updated MessagingConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $messagingServiceSid): MessagingConfigurationInstance { $data = Values::of(['MessagingServiceSid' => $messagingServiceSid, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new MessagingConfigurationInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['country'] ); } /** * Fetch the MessagingConfigurationInstance * * @return MessagingConfigurationInstance Fetched MessagingConfigurationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): MessagingConfigurationInstance { $payload = $this->version->fetch('GET', $this->uri); return new MessagingConfigurationInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['country'] ); } /** * Delete the MessagingConfigurationInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.MessagingConfigurationContext ' . \implode(' ', $context) . ']'; } }PKt[N=d 0Twilio/Rest/Verify/V2/Service/WebhookContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Webhooks/' . \rawurlencode($sid) . ''; } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'EventTypes' => Serialize::map($options['eventTypes'], function($e) { return $e; }), 'WebhookUrl' => $options['webhookUrl'], 'Status' => $options['status'], 'Version' => $options['version'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new WebhookInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { $payload = $this->version->fetch('GET', $this->uri); return new WebhookInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.WebhookContext ' . \implode(' ', $context) . ']'; } }PKt[퇭 5Twilio/Rest/Verify/V2/Service/VerificationContext.phpnu[solution = ['serviceSid' => $serviceSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Verifications/' . \rawurlencode($sid) . ''; } /** * Update the VerificationInstance * * @param string $status The new status of the resource * @return VerificationInstance Updated VerificationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): VerificationInstance { $data = Values::of(['Status' => $status, ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new VerificationInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Fetch the VerificationInstance * * @return VerificationInstance Fetched VerificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): VerificationInstance { $payload = $this->version->fetch('GET', $this->uri); return new VerificationInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.VerificationContext ' . \implode(' ', $context) . ']'; } }PKt[z0Twilio/Rest/Verify/V2/Service/EntityInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'identity' => Values::array_get($payload, 'identity'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'identity' => $identity ?: $this->properties['identity'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EntityContext Context for this EntityInstance */ protected function proxy(): EntityContext { if (!$this->context) { $this->context = new EntityContext( $this->version, $this->solution['serviceSid'], $this->solution['identity'] ); } return $this->context; } /** * Delete the EntityInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the EntityInstance * * @return EntityInstance Fetched EntityInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EntityInstance { return $this->proxy()->fetch(); } /** * Access the factors */ protected function getFactors(): FactorList { return $this->proxy()->factors; } /** * Access the newFactors */ protected function getNewFactors(): NewFactorList { return $this->proxy()->newFactors; } /** * Access the challenges */ protected function getChallenges(): ChallengeList { return $this->proxy()->challenges; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.EntityInstance ' . \implode(' ', $context) . ']'; } }PKt[l,Twilio/Rest/Verify/V2/Service/EntityList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities'; } /** * Create the EntityInstance * * @param string $identity Unique external identifier of the Entity * @return EntityInstance Created EntityInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity): EntityInstance { $data = Values::of(['Identity' => $identity, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new EntityInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams EntityInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EntityInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EntityInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of EntityInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EntityPage Page of EntityInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EntityPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EntityPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EntityInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EntityPage Page of EntityInstance */ public function getPage(string $targetUrl): EntityPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EntityPage($this->version, $response, $this->solution); } /** * Constructs a EntityContext * * @param string $identity Unique external identifier of the Entity */ public function getContext(string $identity): EntityContext { return new EntityContext($this->version, $this->solution['serviceSid'], $identity); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.EntityList]'; } }PKt[FV+ + 2Twilio/Rest/Verify/V2/Service/RateLimitOptions.phpnu[options['description'] = $description; } /** * Description of this Rate Limit * * @param string $description Description of this Rate Limit * @return $this Fluent Builder */ public function setDescription(string $description): self { $this->options['description'] = $description; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.CreateRateLimitOptions ' . $options . ']'; } } class UpdateRateLimitOptions extends Options { /** * @param string $description Description of this Rate Limit */ public function __construct(string $description = Values::NONE) { $this->options['description'] = $description; } /** * Description of this Rate Limit * * @param string $description Description of this Rate Limit * @return $this Fluent Builder */ public function setDescription(string $description): self { $this->options['description'] = $description; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.UpdateRateLimitOptions ' . $options . ']'; } }PKt[a"o1Twilio/Rest/Verify/V2/Service/AccessTokenList.phpnu[solution = ['serviceSid' => $serviceSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/AccessTokens'; } /** * Create the AccessTokenInstance * * @param string $identity Unique external identifier of the Entity * @param string $factorType The Type of this Factor * @param array|Options $options Optional Arguments * @return AccessTokenInstance Created AccessTokenInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $identity, string $factorType, array $options = []): AccessTokenInstance { $options = new Values($options); $data = Values::of([ 'Identity' => $identity, 'FactorType' => $factorType, 'FactorFriendlyName' => $options['factorFriendlyName'], 'Ttl' => $options['ttl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new AccessTokenInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Constructs a AccessTokenContext * * @param string $sid A string that uniquely identifies this Access Token. */ public function getContext(string $sid): AccessTokenContext { return new AccessTokenContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.AccessTokenList]'; } }PKt[w..5Twilio/Rest/Verify/V2/Service/VerificationOptions.phpnu[options['customFriendlyName'] = $customFriendlyName; $this->options['customMessage'] = $customMessage; $this->options['sendDigits'] = $sendDigits; $this->options['locale'] = $locale; $this->options['customCode'] = $customCode; $this->options['amount'] = $amount; $this->options['payee'] = $payee; $this->options['rateLimits'] = $rateLimits; $this->options['channelConfiguration'] = $channelConfiguration; $this->options['appHash'] = $appHash; $this->options['templateSid'] = $templateSid; $this->options['templateCustomSubstitutions'] = $templateCustomSubstitutions; $this->options['deviceIp'] = $deviceIp; } /** * A custom user defined friendly name that overwrites the existing one in the verification message * * @param string $customFriendlyName A custom user defined friendly name * @return $this Fluent Builder */ public function setCustomFriendlyName(string $customFriendlyName): self { $this->options['customFriendlyName'] = $customFriendlyName; return $this; } /** * The text of a custom message to use for the verification. * * @param string $customMessage The text of a custom message to use for the * verification * @return $this Fluent Builder */ public function setCustomMessage(string $customMessage): self { $this->options['customMessage'] = $customMessage; return $this; } /** * The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). * * @param string $sendDigits The digits to send after a phone call is answered * @return $this Fluent Builder */ public function setSendDigits(string $sendDigits): self { $this->options['sendDigits'] = $sendDigits; return $this; } /** * Locale will automatically resolve based on phone number country code for SMS, WhatsApp, and call channel verifications. It will fallback to English or the template’s default translation if the selected translation is not available. This parameter will override the automatic locale resolution. [See supported languages and more information here](https://www.twilio.com/docs/verify/supported-languages). * * @param string $locale The override locale to use for the verification SMS, * WhatsApp or call * @return $this Fluent Builder */ public function setLocale(string $locale): self { $this->options['locale'] = $locale; return $this; } /** * A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive. * * @param string $customCode A pre-generated code * @return $this Fluent Builder */ public function setCustomCode(string $customCode): self { $this->options['customCode'] = $customCode; return $this; } /** * The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. * * @param string $amount The amount of the associated PSD2 compliant * transaction. * @return $this Fluent Builder */ public function setAmount(string $amount): self { $this->options['amount'] = $amount; return $this; } /** * The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. * * @param string $payee The payee of the associated PSD2 compliant transaction * @return $this Fluent Builder */ public function setPayee(string $payee): self { $this->options['payee'] = $payee; return $this; } /** * The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request. * * @param array $rateLimits The custom key-value pairs of Programmable Rate * Limits. * @return $this Fluent Builder */ public function setRateLimits(array $rateLimits): self { $this->options['rateLimits'] = $rateLimits; return $this; } /** * [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. The fields 'from' and 'from_name' are optional but if included the 'from' field must have a valid email address. * * @param array $channelConfiguration Channel specific configuration in json * format. * @return $this Fluent Builder */ public function setChannelConfiguration(array $channelConfiguration): self { $this->options['channelConfiguration'] = $channelConfiguration; return $this; } /** * Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`. * * @param string $appHash Your App Hash to be appended at the end of an SMS. * @return $this Fluent Builder */ public function setAppHash(string $appHash): self { $this->options['appHash'] = $appHash; return $this; } /** * The message [template](https://www.twilio.com/docs/verify/api/templates). If provided, will override the default template for the Service. SMS and Voice channels only. * * @param string $templateSid The verification template SMS or Voice message. * @return $this Fluent Builder */ public function setTemplateSid(string $templateSid): self { $this->options['templateSid'] = $templateSid; return $this; } /** * A stringified JSON object in which the keys are the template's special variables and the values are the variables substitutions. * * @param string $templateCustomSubstitutions The values of the special * variables declared on the message * template. * @return $this Fluent Builder */ public function setTemplateCustomSubstitutions(string $templateCustomSubstitutions): self { $this->options['templateCustomSubstitutions'] = $templateCustomSubstitutions; return $this; } /** * The IP address of the client's device. If provided, it has to be a valid IPv4 or IPv6 address. * * @param string $deviceIp The IP address of the client's device. * @return $this Fluent Builder */ public function setDeviceIp(string $deviceIp): self { $this->options['deviceIp'] = $deviceIp; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.CreateVerificationOptions ' . $options . ']'; } }PKt[Le;773Twilio/Rest/Verify/V2/Service/RateLimitInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'description' => Values::array_get($payload, 'description'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RateLimitContext Context for this RateLimitInstance */ protected function proxy(): RateLimitContext { if (!$this->context) { $this->context = new RateLimitContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the RateLimitInstance * * @param array|Options $options Optional Arguments * @return RateLimitInstance Updated RateLimitInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): RateLimitInstance { return $this->proxy()->update($options); } /** * Fetch the RateLimitInstance * * @return RateLimitInstance Fetched RateLimitInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RateLimitInstance { return $this->proxy()->fetch(); } /** * Delete the RateLimitInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the buckets */ protected function getBuckets(): BucketList { return $this->proxy()->buckets; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.RateLimitInstance ' . \implode(' ', $context) . ']'; } }PKt[33Twilio/Rest/Verify/V2/Service/Entity/FactorPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FactorInstance \Twilio\Rest\Verify\V2\Service\Entity\FactorInstance */ public function buildInstance(array $payload): FactorInstance { return new FactorInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.FactorPage]'; } }PKt[X 6Twilio/Rest/Verify/V2/Service/Entity/FactorOptions.phpnu[options['authPayload'] = $authPayload; $this->options['friendlyName'] = $friendlyName; $this->options['configNotificationToken'] = $configNotificationToken; $this->options['configSdkVersion'] = $configSdkVersion; $this->options['configTimeStep'] = $configTimeStep; $this->options['configSkew'] = $configSkew; $this->options['configCodeLength'] = $configCodeLength; $this->options['configAlg'] = $configAlg; $this->options['configNotificationPlatform'] = $configNotificationPlatform; } /** * The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code. * * @param string $authPayload Optional payload to verify the Factor for the * first time * @return $this Fluent Builder */ public function setAuthPayload(string $authPayload): self { $this->options['authPayload'] = $authPayload; return $this; } /** * The new friendly name of this Factor. It can be up to 64 characters. * * @param string $friendlyName The friendly name of this Factor * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * For APN, the device token. For FCM, the registration token. It is used to send the push notifications. Required when `factor_type` is `push`. If specified, this value must be between 32 and 255 characters long. * * @param string $configNotificationToken For APN, the device token. For FCM, * the registration token * @return $this Fluent Builder */ public function setConfigNotificationToken(string $configNotificationToken): self { $this->options['configNotificationToken'] = $configNotificationToken; return $this; } /** * The Verify Push SDK version used to configure the factor * * @param string $configSdkVersion The Verify Push SDK version used to * configure the factor * @return $this Fluent Builder */ public function setConfigSdkVersion(string $configSdkVersion): self { $this->options['configSdkVersion'] = $configSdkVersion; return $this; } /** * Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive * * @param int $configTimeStep How often, in seconds, are TOTP codes generated * @return $this Fluent Builder */ public function setConfigTimeStep(int $configTimeStep): self { $this->options['configTimeStep'] = $configTimeStep; return $this; } /** * The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive * * @param int $configSkew The number of past and future time-steps valid at a * given time * @return $this Fluent Builder */ public function setConfigSkew(int $configSkew): self { $this->options['configSkew'] = $configSkew; return $this; } /** * Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive * * @param int $configCodeLength Number of digits for generated TOTP codes * @return $this Fluent Builder */ public function setConfigCodeLength(int $configCodeLength): self { $this->options['configCodeLength'] = $configCodeLength; return $this; } /** * The algorithm used to derive the TOTP codes. Can be `sha1`, `sha256` or `sha512` * * @param string $configAlg The algorithm used to derive the TOTP codes * @return $this Fluent Builder */ public function setConfigAlg(string $configAlg): self { $this->options['configAlg'] = $configAlg; return $this; } /** * The transport technology used to generate the Notification Token. Can be `apn`, `fcm` or `none`. Required when `factor_type` is `push`. * * @param string $configNotificationPlatform The transport technology used to * generate the Notification Token * @return $this Fluent Builder */ public function setConfigNotificationPlatform(string $configNotificationPlatform): self { $this->options['configNotificationPlatform'] = $configNotificationPlatform; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.UpdateFactorOptions ' . $options . ']'; } }PKt[nC6Twilio/Rest/Verify/V2/Service/Entity/ChallengeList.phpnu[solution = ['serviceSid' => $serviceSid, 'identity' => $identity, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '/Challenges'; } /** * Create the ChallengeInstance * * @param string $factorSid Factor Sid. * @param array|Options $options Optional Arguments * @return ChallengeInstance Created ChallengeInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $factorSid, array $options = []): ChallengeInstance { $options = new Values($options); $data = Values::of([ 'FactorSid' => $factorSid, 'ExpirationDate' => Serialize::iso8601DateTime($options['expirationDate']), 'Details.Message' => $options['detailsMessage'], 'Details.Fields' => Serialize::map($options['detailsFields'], function($e) { return Serialize::jsonObject($e); }), 'HiddenDetails' => Serialize::jsonObject($options['hiddenDetails']), 'AuthPayload' => $options['authPayload'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ChallengeInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'] ); } /** * Streams ChallengeInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ChallengeInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ChallengeInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of ChallengeInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ChallengePage Page of ChallengeInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ChallengePage { $options = new Values($options); $params = Values::of([ 'FactorSid' => $options['factorSid'], 'Status' => $options['status'], 'Order' => $options['order'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ChallengePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ChallengeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ChallengePage Page of ChallengeInstance */ public function getPage(string $targetUrl): ChallengePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ChallengePage($this->version, $response, $this->solution); } /** * Constructs a ChallengeContext * * @param string $sid A string that uniquely identifies this Challenge. */ public function getContext(string $sid): ChallengeContext { return new ChallengeContext( $this->version, $this->solution['serviceSid'], $this->solution['identity'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.ChallengeList]'; } }PKt[ew667Twilio/Rest/Verify/V2/Service/Entity/FactorInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'entitySid' => Values::array_get($payload, 'entity_sid'), 'identity' => Values::array_get($payload, 'identity'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'status' => Values::array_get($payload, 'status'), 'factorType' => Values::array_get($payload, 'factor_type'), 'config' => Values::array_get($payload, 'config'), 'metadata' => Values::array_get($payload, 'metadata'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'identity' => $identity, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FactorContext Context for this FactorInstance */ protected function proxy(): FactorContext { if (!$this->context) { $this->context = new FactorContext( $this->version, $this->solution['serviceSid'], $this->solution['identity'], $this->solution['sid'] ); } return $this->context; } /** * Delete the FactorInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the FactorInstance * * @return FactorInstance Fetched FactorInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FactorInstance { return $this->proxy()->fetch(); } /** * Update the FactorInstance * * @param array|Options $options Optional Arguments * @return FactorInstance Updated FactorInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FactorInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.FactorInstance ' . \implode(' ', $context) . ']'; } }PKt[Ay y 6Twilio/Rest/Verify/V2/Service/Entity/FactorContext.phpnu[solution = ['serviceSid' => $serviceSid, 'identity' => $identity, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '/Factors/' . \rawurlencode($sid) . ''; } /** * Delete the FactorInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the FactorInstance * * @return FactorInstance Fetched FactorInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FactorInstance { $payload = $this->version->fetch('GET', $this->uri); return new FactorInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'], $this->solution['sid'] ); } /** * Update the FactorInstance * * @param array|Options $options Optional Arguments * @return FactorInstance Updated FactorInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FactorInstance { $options = new Values($options); $data = Values::of([ 'AuthPayload' => $options['authPayload'], 'FriendlyName' => $options['friendlyName'], 'Config.NotificationToken' => $options['configNotificationToken'], 'Config.SdkVersion' => $options['configSdkVersion'], 'Config.TimeStep' => $options['configTimeStep'], 'Config.Skew' => $options['configSkew'], 'Config.CodeLength' => $options['configCodeLength'], 'Config.Alg' => $options['configAlg'], 'Config.NotificationPlatform' => $options['configNotificationPlatform'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FactorInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.FactorContext ' . \implode(' ', $context) . ']'; } }PKt[P٦  6Twilio/Rest/Verify/V2/Service/Entity/NewFactorList.phpnu[solution = ['serviceSid' => $serviceSid, 'identity' => $identity, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '/Factors'; } /** * Create the NewFactorInstance * * @param string $friendlyName The friendly name of this Factor * @param string $factorType The Type of this Factor * @param array|Options $options Optional Arguments * @return NewFactorInstance Created NewFactorInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, string $factorType, array $options = []): NewFactorInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'FactorType' => $factorType, 'Binding.Alg' => $options['bindingAlg'], 'Binding.PublicKey' => $options['bindingPublicKey'], 'Config.AppId' => $options['configAppId'], 'Config.NotificationPlatform' => $options['configNotificationPlatform'], 'Config.NotificationToken' => $options['configNotificationToken'], 'Config.SdkVersion' => $options['configSdkVersion'], 'Binding.Secret' => $options['bindingSecret'], 'Config.TimeStep' => $options['configTimeStep'], 'Config.Skew' => $options['configSkew'], 'Config.CodeLength' => $options['configCodeLength'], 'Config.Alg' => $options['configAlg'], 'Metadata' => Serialize::jsonObject($options['metadata']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new NewFactorInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.NewFactorList]'; } }PKt[/7&&9Twilio/Rest/Verify/V2/Service/Entity/ChallengeOptions.phpnu[options['expirationDate'] = $expirationDate; $this->options['detailsMessage'] = $detailsMessage; $this->options['detailsFields'] = $detailsFields; $this->options['hiddenDetails'] = $hiddenDetails; $this->options['authPayload'] = $authPayload; } /** * The date-time when this Challenge expires, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. The default value is five (5) minutes after Challenge creation. The max value is sixty (60) minutes after creation. * * @param \DateTime $expirationDate The date-time when this Challenge expires * @return $this Fluent Builder */ public function setExpirationDate(\DateTime $expirationDate): self { $this->options['expirationDate'] = $expirationDate; return $this; } /** * Shown to the user when the push notification arrives. Required when `factor_type` is `push`. Can be up to 256 characters in length * * @param string $detailsMessage Shown to the user when the push notification * arrives * @return $this Fluent Builder */ public function setDetailsMessage(string $detailsMessage): self { $this->options['detailsMessage'] = $detailsMessage; return $this; } /** * A list of objects that describe the Fields included in the Challenge. Each object contains the label and value of the field, the label can be up to 36 characters in length and the value can be up to 128 characters in length. Used when `factor_type` is `push`. There can be up to 20 details fields. * * @param array[] $detailsFields A list of objects that describe the Fields * included in the Challenge * @return $this Fluent Builder */ public function setDetailsFields(array $detailsFields): self { $this->options['detailsFields'] = $detailsFields; return $this; } /** * Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{"ip": "172.168.1.234"}`. Can be up to 1024 characters in length * * @param array $hiddenDetails Hidden details provided to contextualize the * Challenge * @return $this Fluent Builder */ public function setHiddenDetails(array $hiddenDetails): self { $this->options['hiddenDetails'] = $hiddenDetails; return $this; } /** * Optional payload used to verify the Challenge upon creation. Only used with a Factor of type `totp` to carry the TOTP code that needs to be verified. For `TOTP` this value must be between 3 and 8 characters long. * * @param string $authPayload Optional payload to verify the Challenge * @return $this Fluent Builder */ public function setAuthPayload(string $authPayload): self { $this->options['authPayload'] = $authPayload; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.CreateChallengeOptions ' . $options . ']'; } } class ReadChallengeOptions extends Options { /** * @param string $factorSid Factor Sid. * @param string $status The Status of theChallenges to fetch * @param string $order The sort order of the Challenges list */ public function __construct(string $factorSid = Values::NONE, string $status = Values::NONE, string $order = Values::NONE) { $this->options['factorSid'] = $factorSid; $this->options['status'] = $status; $this->options['order'] = $order; } /** * The unique SID identifier of the Factor. * * @param string $factorSid Factor Sid. * @return $this Fluent Builder */ public function setFactorSid(string $factorSid): self { $this->options['factorSid'] = $factorSid; return $this; } /** * The Status of the Challenges to fetch. One of `pending`, `expired`, `approved` or `denied`. * * @param string $status The Status of theChallenges to fetch * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The desired sort order of the Challenges list. One of `asc` or `desc` for ascending and descending respectively. Defaults to `asc`. * * @param string $order The sort order of the Challenges list * @return $this Fluent Builder */ public function setOrder(string $order): self { $this->options['order'] = $order; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.ReadChallengeOptions ' . $options . ']'; } } class UpdateChallengeOptions extends Options { /** * @param string $authPayload Optional payload to verify the Challenge * @param array $metadata Metadata of the challenge. */ public function __construct(string $authPayload = Values::NONE, array $metadata = Values::ARRAY_NONE) { $this->options['authPayload'] = $authPayload; $this->options['metadata'] = $metadata; } /** * The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. For `TOTP` this value must be between 3 and 8 characters long. For `Push` this value can be up to 5456 characters in length * * @param string $authPayload Optional payload to verify the Challenge * @return $this Fluent Builder */ public function setAuthPayload(string $authPayload): self { $this->options['authPayload'] = $authPayload; return $this; } /** * Custom metadata associated with the challenge. This is added by the Device/SDK directly to allow for the inclusion of device information. It must be a stringified JSON with only strings values eg. `{"os": "Android"}`. Can be up to 1024 characters in length. * * @param array $metadata Metadata of the challenge. * @return $this Fluent Builder */ public function setMetadata(array $metadata): self { $this->options['metadata'] = $metadata; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.UpdateChallengeOptions ' . $options . ']'; } }PKt[ϸ3Twilio/Rest/Verify/V2/Service/Entity/FactorList.phpnu[solution = ['serviceSid' => $serviceSid, 'identity' => $identity, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '/Factors'; } /** * Streams FactorInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FactorInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FactorInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of FactorInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FactorPage Page of FactorInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FactorPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FactorPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FactorInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FactorPage Page of FactorInstance */ public function getPage(string $targetUrl): FactorPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FactorPage($this->version, $response, $this->solution); } /** * Constructs a FactorContext * * @param string $sid A string that uniquely identifies this Factor. */ public function getContext(string $sid): FactorContext { return new FactorContext( $this->version, $this->solution['serviceSid'], $this->solution['identity'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.FactorList]'; } }PKt[ z z :Twilio/Rest/Verify/V2/Service/Entity/NewFactorInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'entitySid' => Values::array_get($payload, 'entity_sid'), 'identity' => Values::array_get($payload, 'identity'), 'binding' => Values::array_get($payload, 'binding'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'status' => Values::array_get($payload, 'status'), 'factorType' => Values::array_get($payload, 'factor_type'), 'config' => Values::array_get($payload, 'config'), 'metadata' => Values::array_get($payload, 'metadata'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'identity' => $identity, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.NewFactorInstance]'; } }PKt[&S6Twilio/Rest/Verify/V2/Service/Entity/ChallengePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ChallengeInstance \Twilio\Rest\Verify\V2\Service\Entity\ChallengeInstance */ public function buildInstance(array $payload): ChallengeInstance { return new ChallengeInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.ChallengePage]'; } }PKt[$U>9Twilio/Rest/Verify/V2/Service/Entity/ChallengeContext.phpnu[solution = ['serviceSid' => $serviceSid, 'identity' => $identity, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '/Challenges/' . \rawurlencode($sid) . ''; } /** * Fetch the ChallengeInstance * * @return ChallengeInstance Fetched ChallengeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChallengeInstance { $payload = $this->version->fetch('GET', $this->uri); return new ChallengeInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'], $this->solution['sid'] ); } /** * Update the ChallengeInstance * * @param array|Options $options Optional Arguments * @return ChallengeInstance Updated ChallengeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChallengeInstance { $options = new Values($options); $data = Values::of([ 'AuthPayload' => $options['authPayload'], 'Metadata' => Serialize::jsonObject($options['metadata']), ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ChallengeInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'], $this->solution['sid'] ); } /** * Access the notifications */ protected function getNotifications(): NotificationList { if (!$this->_notifications) { $this->_notifications = new NotificationList( $this->version, $this->solution['serviceSid'], $this->solution['identity'], $this->solution['sid'] ); } return $this->_notifications; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.ChallengeContext ' . \implode(' ', $context) . ']'; } }PKt[:Twilio/Rest/Verify/V2/Service/Entity/ChallengeInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'entitySid' => Values::array_get($payload, 'entity_sid'), 'identity' => Values::array_get($payload, 'identity'), 'factorSid' => Values::array_get($payload, 'factor_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'dateResponded' => Deserialize::dateTime(Values::array_get($payload, 'date_responded')), 'expirationDate' => Deserialize::dateTime(Values::array_get($payload, 'expiration_date')), 'status' => Values::array_get($payload, 'status'), 'respondedReason' => Values::array_get($payload, 'responded_reason'), 'details' => Values::array_get($payload, 'details'), 'hiddenDetails' => Values::array_get($payload, 'hidden_details'), 'metadata' => Values::array_get($payload, 'metadata'), 'factorType' => Values::array_get($payload, 'factor_type'), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'identity' => $identity, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ChallengeContext Context for this ChallengeInstance */ protected function proxy(): ChallengeContext { if (!$this->context) { $this->context = new ChallengeContext( $this->version, $this->solution['serviceSid'], $this->solution['identity'], $this->solution['sid'] ); } return $this->context; } /** * Fetch the ChallengeInstance * * @return ChallengeInstance Fetched ChallengeInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ChallengeInstance { return $this->proxy()->fetch(); } /** * Update the ChallengeInstance * * @param array|Options $options Optional Arguments * @return ChallengeInstance Updated ChallengeInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ChallengeInstance { return $this->proxy()->update($options); } /** * Access the notifications */ protected function getNotifications(): NotificationList { return $this->proxy()->notifications; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.ChallengeInstance ' . \implode(' ', $context) . ']'; } }PKt[==CTwilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationList.phpnu[solution = [ 'serviceSid' => $serviceSid, 'identity' => $identity, 'challengeSid' => $challengeSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '/Challenges/' . \rawurlencode($challengeSid) . '/Notifications'; } /** * Create the NotificationInstance * * @param array|Options $options Optional Arguments * @return NotificationInstance Created NotificationInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): NotificationInstance { $options = new Values($options); $data = Values::of(['Ttl' => $options['ttl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new NotificationInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'], $this->solution['challengeSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.NotificationList]'; } }PKt[WrgllCTwilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NotificationInstance \Twilio\Rest\Verify\V2\Service\Entity\Challenge\NotificationInstance */ public function buildInstance(array $payload): NotificationInstance { return new NotificationInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'], $this->solution['challengeSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.NotificationPage]'; } }PKt[C" " GTwilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'entitySid' => Values::array_get($payload, 'entity_sid'), 'identity' => Values::array_get($payload, 'identity'), 'challengeSid' => Values::array_get($payload, 'challenge_sid'), 'priority' => Values::array_get($payload, 'priority'), 'ttl' => Values::array_get($payload, 'ttl'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'identity' => $identity, 'challengeSid' => $challengeSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.NotificationInstance]'; } }PKt[wwFTwilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationOptions.phpnu[options['ttl'] = $ttl; } /** * How long, in seconds, the notification is valid. Can be an integer between 0 and 300. Default is 300. Delivery is attempted until the TTL elapses, even if the device is offline. 0 means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. * * @param int $ttl How long, in seconds, the notification is valid. * @return $this Fluent Builder */ public function setTtl(int $ttl): self { $this->options['ttl'] = $ttl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.CreateNotificationOptions ' . $options . ']'; } }PKt[:?6Twilio/Rest/Verify/V2/Service/Entity/NewFactorPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NewFactorInstance \Twilio\Rest\Verify\V2\Service\Entity\NewFactorInstance */ public function buildInstance(array $payload): NewFactorInstance { return new NewFactorInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['identity'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.NewFactorPage]'; } }PKt[4,,9Twilio/Rest/Verify/V2/Service/Entity/NewFactorOptions.phpnu[options['bindingAlg'] = $bindingAlg; $this->options['bindingPublicKey'] = $bindingPublicKey; $this->options['configAppId'] = $configAppId; $this->options['configNotificationPlatform'] = $configNotificationPlatform; $this->options['configNotificationToken'] = $configNotificationToken; $this->options['configSdkVersion'] = $configSdkVersion; $this->options['bindingSecret'] = $bindingSecret; $this->options['configTimeStep'] = $configTimeStep; $this->options['configSkew'] = $configSkew; $this->options['configCodeLength'] = $configCodeLength; $this->options['configAlg'] = $configAlg; $this->options['metadata'] = $metadata; } /** * The algorithm used when `factor_type` is `push`. Algorithm supported: `ES256` * * @param string $bindingAlg The algorithm used when `factor_type` is `push` * @return $this Fluent Builder */ public function setBindingAlg(string $bindingAlg): self { $this->options['bindingAlg'] = $bindingAlg; return $this; } /** * The Ecdsa public key in PKIX, ASN.1 DER format encoded in Base64. Required when `factor_type` is `push` * * @param string $bindingPublicKey The public key encoded in Base64 * @return $this Fluent Builder */ public function setBindingPublicKey(string $bindingPublicKey): self { $this->options['bindingPublicKey'] = $bindingPublicKey; return $this; } /** * The ID that uniquely identifies your app in the Google or Apple store, such as `com.example.myapp`. It can be up to 100 characters long. Required when `factor_type` is `push`. * * @param string $configAppId The ID that uniquely identifies your app in the * Google or Apple store * @return $this Fluent Builder */ public function setConfigAppId(string $configAppId): self { $this->options['configAppId'] = $configAppId; return $this; } /** * The transport technology used to generate the Notification Token. Can be `apn`, `fcm` or `none`. Required when `factor_type` is `push`. * * @param string $configNotificationPlatform The transport technology used to * generate the Notification Token * @return $this Fluent Builder */ public function setConfigNotificationPlatform(string $configNotificationPlatform): self { $this->options['configNotificationPlatform'] = $configNotificationPlatform; return $this; } /** * For APN, the device token. For FCM, the registration token. It is used to send the push notifications. Must be between 32 and 255 characters long. Required when `factor_type` is `push`. * * @param string $configNotificationToken For APN, the device token. For FCM, * the registration token * @return $this Fluent Builder */ public function setConfigNotificationToken(string $configNotificationToken): self { $this->options['configNotificationToken'] = $configNotificationToken; return $this; } /** * The Verify Push SDK version used to configure the factor Required when `factor_type` is `push` * * @param string $configSdkVersion The Verify Push SDK version used to * configure the factor * @return $this Fluent Builder */ public function setConfigSdkVersion(string $configSdkVersion): self { $this->options['configSdkVersion'] = $configSdkVersion; return $this; } /** * The shared secret for TOTP factors encoded in Base32. This can be provided when creating the Factor, otherwise it will be generated. Used when `factor_type` is `totp` * * @param string $bindingSecret The shared secret in Base32 * @return $this Fluent Builder */ public function setBindingSecret(string $bindingSecret): self { $this->options['bindingSecret'] = $bindingSecret; return $this; } /** * Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. The default value is defined at the service level in the property `totp.time_step`. Defaults to 30 seconds if not configured. Used when `factor_type` is `totp` * * @param int $configTimeStep How often, in seconds, are TOTP codes generated * @return $this Fluent Builder */ public function setConfigTimeStep(int $configTimeStep): self { $this->options['configTimeStep'] = $configTimeStep; return $this; } /** * The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. The default value is defined at the service level in the property `totp.skew`. If not configured defaults to 1. Used when `factor_type` is `totp` * * @param int $configSkew The number of past and future time-steps valid at a * given time * @return $this Fluent Builder */ public function setConfigSkew(int $configSkew): self { $this->options['configSkew'] = $configSkew; return $this; } /** * Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. The default value is defined at the service level in the property `totp.code_length`. If not configured defaults to 6. Used when `factor_type` is `totp` * * @param int $configCodeLength Number of digits for generated TOTP codes * @return $this Fluent Builder */ public function setConfigCodeLength(int $configCodeLength): self { $this->options['configCodeLength'] = $configCodeLength; return $this; } /** * The algorithm used to derive the TOTP codes. Can be `sha1`, `sha256` or `sha512`. Defaults to `sha1`. Used when `factor_type` is `totp` * * @param string $configAlg The algorithm used to derive the TOTP codes * @return $this Fluent Builder */ public function setConfigAlg(string $configAlg): self { $this->options['configAlg'] = $configAlg; return $this; } /** * Custom metadata associated with the factor. This is added by the Device/SDK directly to allow for the inclusion of device information. It must be a stringified JSON with only strings values eg. `{"os": "Android"}`. Can be up to 1024 characters in length. * * @param array $metadata Metadata of the factor. * @return $this Fluent Builder */ public function setMetadata(array $metadata): self { $this->options['metadata'] = $metadata; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.CreateNewFactorOptions ' . $options . ']'; } }PKt[+>,1Twilio/Rest/Verify/V2/Service/AccessTokenPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return AccessTokenInstance \Twilio\Rest\Verify\V2\Service\AccessTokenInstance */ public function buildInstance(array $payload): AccessTokenInstance { return new AccessTokenInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.AccessTokenPage]'; } }PKt[ʬ.6Twilio/Rest/Verify/V2/Service/RateLimit/BucketPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BucketInstance \Twilio\Rest\Verify\V2\Service\RateLimit\BucketInstance */ public function buildInstance(array $payload): BucketInstance { return new BucketInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['rateLimitSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.BucketPage]'; } }PKt[Ut9:Twilio/Rest/Verify/V2/Service/RateLimit/BucketInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'rateLimitSid' => Values::array_get($payload, 'rate_limit_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'max' => Values::array_get($payload, 'max'), 'interval' => Values::array_get($payload, 'interval'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'serviceSid' => $serviceSid, 'rateLimitSid' => $rateLimitSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return BucketContext Context for this BucketInstance */ protected function proxy(): BucketContext { if (!$this->context) { $this->context = new BucketContext( $this->version, $this->solution['serviceSid'], $this->solution['rateLimitSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the BucketInstance * * @param array|Options $options Optional Arguments * @return BucketInstance Updated BucketInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): BucketInstance { return $this->proxy()->update($options); } /** * Fetch the BucketInstance * * @return BucketInstance Fetched BucketInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BucketInstance { return $this->proxy()->fetch(); } /** * Delete the BucketInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.BucketInstance ' . \implode(' ', $context) . ']'; } }PKt[9b6Twilio/Rest/Verify/V2/Service/RateLimit/BucketList.phpnu[solution = ['serviceSid' => $serviceSid, 'rateLimitSid' => $rateLimitSid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/RateLimits/' . \rawurlencode($rateLimitSid) . '/Buckets'; } /** * Create the BucketInstance * * @param int $max Max number of requests. * @param int $interval Number of seconds that the rate limit will be enforced * over. * @return BucketInstance Created BucketInstance * @throws TwilioException When an HTTP error occurs. */ public function create(int $max, int $interval): BucketInstance { $data = Values::of(['Max' => $max, 'Interval' => $interval, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new BucketInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['rateLimitSid'] ); } /** * Streams BucketInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BucketInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BucketInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of BucketInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BucketPage Page of BucketInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BucketPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BucketPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BucketInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BucketPage Page of BucketInstance */ public function getPage(string $targetUrl): BucketPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BucketPage($this->version, $response, $this->solution); } /** * Constructs a BucketContext * * @param string $sid A string that uniquely identifies this Bucket. */ public function getContext(string $sid): BucketContext { return new BucketContext( $this->version, $this->solution['serviceSid'], $this->solution['rateLimitSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.BucketList]'; } }PKt[Z 9Twilio/Rest/Verify/V2/Service/RateLimit/BucketContext.phpnu[solution = ['serviceSid' => $serviceSid, 'rateLimitSid' => $rateLimitSid, 'sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/RateLimits/' . \rawurlencode($rateLimitSid) . '/Buckets/' . \rawurlencode($sid) . ''; } /** * Update the BucketInstance * * @param array|Options $options Optional Arguments * @return BucketInstance Updated BucketInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): BucketInstance { $options = new Values($options); $data = Values::of(['Max' => $options['max'], 'Interval' => $options['interval'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new BucketInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['rateLimitSid'], $this->solution['sid'] ); } /** * Fetch the BucketInstance * * @return BucketInstance Fetched BucketInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): BucketInstance { $payload = $this->version->fetch('GET', $this->uri); return new BucketInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['rateLimitSid'], $this->solution['sid'] ); } /** * Delete the BucketInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.BucketContext ' . \implode(' ', $context) . ']'; } }PKt[f89Twilio/Rest/Verify/V2/Service/RateLimit/BucketOptions.phpnu[options['max'] = $max; $this->options['interval'] = $interval; } /** * Maximum number of requests permitted in during the interval. * * @param int $max Max number of requests. * @return $this Fluent Builder */ public function setMax(int $max): self { $this->options['max'] = $max; return $this; } /** * Number of seconds that the rate limit will be enforced over. * * @param int $interval Number of seconds that the rate limit will be enforced * over. * @return $this Fluent Builder */ public function setInterval(int $interval): self { $this->options['interval'] = $interval; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.UpdateBucketOptions ' . $options . ']'; } }PKt[s[ ;Twilio/Rest/Verify/V2/Service/VerificationCheckInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'to' => Values::array_get($payload, 'to'), 'channel' => Values::array_get($payload, 'channel'), 'status' => Values::array_get($payload, 'status'), 'valid' => Values::array_get($payload, 'valid'), 'amount' => Values::array_get($payload, 'amount'), 'payee' => Values::array_get($payload, 'payee'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'snaAttemptsErrorCodes' => Values::array_get($payload, 'sna_attempts_error_codes'), ]; $this->solution = ['serviceSid' => $serviceSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.VerificationCheckInstance]'; } }PKt[^ yy6Twilio/Rest/Verify/V2/Service/VerificationInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'to' => Values::array_get($payload, 'to'), 'channel' => Values::array_get($payload, 'channel'), 'status' => Values::array_get($payload, 'status'), 'valid' => Values::array_get($payload, 'valid'), 'lookup' => Values::array_get($payload, 'lookup'), 'amount' => Values::array_get($payload, 'amount'), 'payee' => Values::array_get($payload, 'payee'), 'sendCodeAttempts' => Values::array_get($payload, 'send_code_attempts'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'sna' => Values::array_get($payload, 'sna'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return VerificationContext Context for this VerificationInstance */ protected function proxy(): VerificationContext { if (!$this->context) { $this->context = new VerificationContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the VerificationInstance * * @param string $status The new status of the resource * @return VerificationInstance Updated VerificationInstance * @throws TwilioException When an HTTP error occurs. */ public function update(string $status): VerificationInstance { return $this->proxy()->update($status); } /** * Fetch the VerificationInstance * * @return VerificationInstance Fetched VerificationInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): VerificationInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.VerificationInstance ' . \implode(' ', $context) . ']'; } }PKt[t^441Twilio/Rest/Verify/V2/Service/WebhookInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'eventTypes' => Values::array_get($payload, 'event_types'), 'status' => Values::array_get($payload, 'status'), 'version' => Values::array_get($payload, 'version'), 'webhookUrl' => Values::array_get($payload, 'webhook_url'), 'webhookMethod' => Values::array_get($payload, 'webhook_method'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return WebhookContext Context for this WebhookInstance */ protected function proxy(): WebhookContext { if (!$this->context) { $this->context = new WebhookContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Update the WebhookInstance * * @param array|Options $options Optional Arguments * @return WebhookInstance Updated WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): WebhookInstance { return $this->proxy()->update($options); } /** * Delete the WebhookInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the WebhookInstance * * @return WebhookInstance Fetched WebhookInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): WebhookInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.WebhookInstance ' . \implode(' ', $context) . ']'; } }PKt[boJ0Twilio/Rest/Verify/V2/Service/WebhookOptions.phpnu[options['status'] = $status; $this->options['version'] = $version; } /** * The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` * * @param string $status The webhook status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The webhook version. Default value is `v2` which includes all the latest fields. Version `v1` is legacy and may be removed in the future. * * @param string $version The webhook version * @return $this Fluent Builder */ public function setVersion(string $version): self { $this->options['version'] = $version; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.CreateWebhookOptions ' . $options . ']'; } } class UpdateWebhookOptions extends Options { /** * @param string $friendlyName The string that you assigned to describe the * webhook * @param string[] $eventTypes The array of events that this Webhook is * subscribed to. * @param string $webhookUrl The URL associated with this Webhook. * @param string $status The webhook status * @param string $version The webhook version */ public function __construct(string $friendlyName = Values::NONE, array $eventTypes = Values::ARRAY_NONE, string $webhookUrl = Values::NONE, string $status = Values::NONE, string $version = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['eventTypes'] = $eventTypes; $this->options['webhookUrl'] = $webhookUrl; $this->options['status'] = $status; $this->options['version'] = $version; } /** * The string that you assigned to describe the webhook. **This value should not contain PII.** * * @param string $friendlyName The string that you assigned to describe the * webhook * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` * * @param string[] $eventTypes The array of events that this Webhook is * subscribed to. * @return $this Fluent Builder */ public function setEventTypes(array $eventTypes): self { $this->options['eventTypes'] = $eventTypes; return $this; } /** * The URL associated with this Webhook. * * @param string $webhookUrl The URL associated with this Webhook. * @return $this Fluent Builder */ public function setWebhookUrl(string $webhookUrl): self { $this->options['webhookUrl'] = $webhookUrl; return $this; } /** * The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` * * @param string $status The webhook status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The webhook version. Default value is `v2` which includes all the latest fields. Version `v1` is legacy and may be removed in the future. * * @param string $version The webhook version * @return $this Fluent Builder */ public function setVersion(string $version): self { $this->options['version'] = $version; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.UpdateWebhookOptions ' . $options . ']'; } }PKt[{ݮ&Twilio/Rest/Verify/V2/SafelistList.phpnu[solution = []; $this->uri = '/SafeList/Numbers'; } /** * Create the SafelistInstance * * @param string $phoneNumber The phone number to be added in SafeList. * @return SafelistInstance Created SafelistInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $phoneNumber): SafelistInstance { $data = Values::of(['PhoneNumber' => $phoneNumber, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SafelistInstance($this->version, $payload); } /** * Constructs a SafelistContext * * @param string $phoneNumber The phone number to be fetched from SafeList. */ public function getContext(string $phoneNumber): SafelistContext { return new SafelistContext($this->version, $phoneNumber); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.SafelistList]'; } }PKt[<9Twilio/Rest/Verify/V2/VerificationAttemptsSummaryPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return VerificationAttemptsSummaryInstance \Twilio\Rest\Verify\V2\VerificationAttemptsSummaryInstance */ public function buildInstance(array $payload): VerificationAttemptsSummaryInstance { return new VerificationAttemptsSummaryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.VerificationAttemptsSummaryPage]'; } }PKt[ !!<Twilio/Rest/Verify/V2/VerificationAttemptsSummaryOptions.phpnu[options['verifyServiceSid'] = $verifyServiceSid; $this->options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['country'] = $country; $this->options['channel'] = $channel; $this->options['destinationPrefix'] = $destinationPrefix; } /** * Filter used to consider only Verification Attempts of the given verify service on the summary aggregation. * * @param string $verifyServiceSid Filter the verification attempts considered * on the summary by verify service. * @return $this Fluent Builder */ public function setVerifyServiceSid(string $verifyServiceSid): self { $this->options['verifyServiceSid'] = $verifyServiceSid; return $this; } /** * Datetime filter used to consider only Verification Attempts created after this datetime on the summary aggregation. Given as GMT in RFC 2822 format. * * @param \DateTime $dateCreatedAfter Consider verification attempts create * after this date on the summary. * @return $this Fluent Builder */ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Datetime filter used to consider only Verification Attempts created before this datetime on the summary aggregation. Given as GMT in RFC 2822 format. * * @param \DateTime $dateCreatedBefore Consider verification attempts created * before this date on the summary. * @return $this Fluent Builder */ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Filter used to consider only Verification Attempts sent to the specified destination country on the summary aggregation. * * @param string $country Filter verification attempts considered on the * summary by destination country. * @return $this Fluent Builder */ public function setCountry(string $country): self { $this->options['country'] = $country; return $this; } /** * Filter Verification Attempts considered on the summary aggregation by communication channel. Valid values are `SMS` and `CALL` * * @param string $channel Filter verification attempts considered on the * summary by communication channel. * @return $this Fluent Builder */ public function setChannel(string $channel): self { $this->options['channel'] = $channel; return $this; } /** * Filter the Verification Attempts considered on the summary aggregation by Destination prefix. It is the prefix of a phone number in E.164 format. * * @param string $destinationPrefix Filters the attempts considered on the * summary by destination prefix. * @return $this Fluent Builder */ public function setDestinationPrefix(string $destinationPrefix): self { $this->options['destinationPrefix'] = $destinationPrefix; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.FetchVerificationAttemptsSummaryOptions ' . $options . ']'; } }PKt[/)Twilio/Rest/Verify/V2/ServiceInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'codeLength' => Values::array_get($payload, 'code_length'), 'lookupEnabled' => Values::array_get($payload, 'lookup_enabled'), 'psd2Enabled' => Values::array_get($payload, 'psd2_enabled'), 'skipSmsToLandlines' => Values::array_get($payload, 'skip_sms_to_landlines'), 'dtmfInputRequired' => Values::array_get($payload, 'dtmf_input_required'), 'ttsName' => Values::array_get($payload, 'tts_name'), 'doNotShareWarningEnabled' => Values::array_get($payload, 'do_not_share_warning_enabled'), 'customCodeEnabled' => Values::array_get($payload, 'custom_code_enabled'), 'push' => Values::array_get($payload, 'push'), 'totp' => Values::array_get($payload, 'totp'), 'defaultTemplateSid' => Values::array_get($payload, 'default_template_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return ServiceContext Context for this ServiceInstance */ protected function proxy(): ServiceContext { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { return $this->proxy()->fetch(); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { return $this->proxy()->update($options); } /** * Access the verifications */ protected function getVerifications(): VerificationList { return $this->proxy()->verifications; } /** * Access the verificationChecks */ protected function getVerificationChecks(): VerificationCheckList { return $this->proxy()->verificationChecks; } /** * Access the rateLimits */ protected function getRateLimits(): RateLimitList { return $this->proxy()->rateLimits; } /** * Access the messagingConfigurations */ protected function getMessagingConfigurations(): MessagingConfigurationList { return $this->proxy()->messagingConfigurations; } /** * Access the entities */ protected function getEntities(): EntityList { return $this->proxy()->entities; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { return $this->proxy()->webhooks; } /** * Access the accessTokens */ protected function getAccessTokens(): AccessTokenList { return $this->proxy()->accessTokens; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.ServiceInstance ' . \implode(' ', $context) . ']'; } }PKt[sR %Twilio/Rest/Verify/V2/ServiceList.phpnu[solution = []; $this->uri = '/Services'; } /** * Create the ServiceInstance * * @param string $friendlyName A string to describe the verification service * @param array|Options $options Optional Arguments * @return ServiceInstance Created ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $friendlyName, array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $friendlyName, 'CodeLength' => $options['codeLength'], 'LookupEnabled' => Serialize::booleanToString($options['lookupEnabled']), 'SkipSmsToLandlines' => Serialize::booleanToString($options['skipSmsToLandlines']), 'DtmfInputRequired' => Serialize::booleanToString($options['dtmfInputRequired']), 'TtsName' => $options['ttsName'], 'Psd2Enabled' => Serialize::booleanToString($options['psd2Enabled']), 'DoNotShareWarningEnabled' => Serialize::booleanToString($options['doNotShareWarningEnabled']), 'CustomCodeEnabled' => Serialize::booleanToString($options['customCodeEnabled']), 'Push.IncludeDate' => Serialize::booleanToString($options['pushIncludeDate']), 'Push.ApnCredentialSid' => $options['pushApnCredentialSid'], 'Push.FcmCredentialSid' => $options['pushFcmCredentialSid'], 'Totp.Issuer' => $options['totpIssuer'], 'Totp.TimeStep' => $options['totpTimeStep'], 'Totp.CodeLength' => $options['totpCodeLength'], 'Totp.Skew' => $options['totpSkew'], 'DefaultTemplateSid' => $options['defaultTemplateSid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload); } /** * Streams ServiceInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads ServiceInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return ServiceInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of ServiceInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return ServicePage Page of ServiceInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): ServicePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new ServicePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ServiceInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return ServicePage Page of ServiceInstance */ public function getPage(string $targetUrl): ServicePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ServicePage($this->version, $response, $this->solution); } /** * Constructs a ServiceContext * * @param string $sid The unique string that identifies the resource */ public function getContext(string $sid): ServiceContext { return new ServiceContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.ServiceList]'; } }PKt[K (Twilio/Rest/Verify/V2/ServiceContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Services/' . \rawurlencode($sid) . ''; } /** * Fetch the ServiceInstance * * @return ServiceInstance Fetched ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): ServiceInstance { $payload = $this->version->fetch('GET', $this->uri); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the ServiceInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): ServiceInstance { $options = new Values($options); $data = Values::of([ 'FriendlyName' => $options['friendlyName'], 'CodeLength' => $options['codeLength'], 'LookupEnabled' => Serialize::booleanToString($options['lookupEnabled']), 'SkipSmsToLandlines' => Serialize::booleanToString($options['skipSmsToLandlines']), 'DtmfInputRequired' => Serialize::booleanToString($options['dtmfInputRequired']), 'TtsName' => $options['ttsName'], 'Psd2Enabled' => Serialize::booleanToString($options['psd2Enabled']), 'DoNotShareWarningEnabled' => Serialize::booleanToString($options['doNotShareWarningEnabled']), 'CustomCodeEnabled' => Serialize::booleanToString($options['customCodeEnabled']), 'Push.IncludeDate' => Serialize::booleanToString($options['pushIncludeDate']), 'Push.ApnCredentialSid' => $options['pushApnCredentialSid'], 'Push.FcmCredentialSid' => $options['pushFcmCredentialSid'], 'Totp.Issuer' => $options['totpIssuer'], 'Totp.TimeStep' => $options['totpTimeStep'], 'Totp.CodeLength' => $options['totpCodeLength'], 'Totp.Skew' => $options['totpSkew'], 'DefaultTemplateSid' => $options['defaultTemplateSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the verifications */ protected function getVerifications(): VerificationList { if (!$this->_verifications) { $this->_verifications = new VerificationList($this->version, $this->solution['sid']); } return $this->_verifications; } /** * Access the verificationChecks */ protected function getVerificationChecks(): VerificationCheckList { if (!$this->_verificationChecks) { $this->_verificationChecks = new VerificationCheckList($this->version, $this->solution['sid']); } return $this->_verificationChecks; } /** * Access the rateLimits */ protected function getRateLimits(): RateLimitList { if (!$this->_rateLimits) { $this->_rateLimits = new RateLimitList($this->version, $this->solution['sid']); } return $this->_rateLimits; } /** * Access the messagingConfigurations */ protected function getMessagingConfigurations(): MessagingConfigurationList { if (!$this->_messagingConfigurations) { $this->_messagingConfigurations = new MessagingConfigurationList( $this->version, $this->solution['sid'] ); } return $this->_messagingConfigurations; } /** * Access the entities */ protected function getEntities(): EntityList { if (!$this->_entities) { $this->_entities = new EntityList($this->version, $this->solution['sid']); } return $this->_entities; } /** * Access the webhooks */ protected function getWebhooks(): WebhookList { if (!$this->_webhooks) { $this->_webhooks = new WebhookList($this->version, $this->solution['sid']); } return $this->_webhooks; } /** * Access the accessTokens */ protected function getAccessTokens(): AccessTokenList { if (!$this->_accessTokens) { $this->_accessTokens = new AccessTokenList($this->version, $this->solution['sid']); } return $this->_accessTokens; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.ServiceContext ' . \implode(' ', $context) . ']'; } }PKt[)rB&Twilio/Rest/Verify/V2/SafelistPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SafelistInstance \Twilio\Rest\Verify\V2\SafelistInstance */ public function buildInstance(array $payload): SafelistInstance { return new SafelistInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.SafelistPage]'; } }PKt[R4 4 =Twilio/Rest/Verify/V2/VerificationAttemptsSummaryInstance.phpnu[properties = [ 'totalAttempts' => Values::array_get($payload, 'total_attempts'), 'totalConverted' => Values::array_get($payload, 'total_converted'), 'totalUnconverted' => Values::array_get($payload, 'total_unconverted'), 'conversionRatePercentage' => Values::array_get($payload, 'conversion_rate_percentage'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = []; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return VerificationAttemptsSummaryContext Context for this * VerificationAttemptsSummaryInstance */ protected function proxy(): VerificationAttemptsSummaryContext { if (!$this->context) { $this->context = new VerificationAttemptsSummaryContext($this->version); } return $this->context; } /** * Fetch the VerificationAttemptsSummaryInstance * * @param array|Options $options Optional Arguments * @return VerificationAttemptsSummaryInstance Fetched * VerificationAttemptsSummaryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): VerificationAttemptsSummaryInstance { return $this->proxy()->fetch($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.VerificationAttemptsSummaryInstance ' . \implode(' ', $context) . ']'; } }PKt[l&Twilio/Rest/Verify/V2/TemplateList.phpnu[solution = []; $this->uri = '/Templates'; } /** * Streams TemplateInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads TemplateInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return TemplateInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of TemplateInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return TemplatePage Page of TemplateInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): TemplatePage { $options = new Values($options); $params = Values::of([ 'FriendlyName' => $options['friendlyName'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new TemplatePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of TemplateInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return TemplatePage Page of TemplateInstance */ public function getPage(string $targetUrl): TemplatePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new TemplatePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.TemplateList]'; } }PKt[O//%Twilio/Rest/Verify/V2/FormContext.phpnu[solution = ['formType' => $formType, ]; $this->uri = '/Forms/' . \rawurlencode($formType) . ''; } /** * Fetch the FormInstance * * @return FormInstance Fetched FormInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FormInstance { $payload = $this->version->fetch('GET', $this->uri); return new FormInstance($this->version, $payload, $this->solution['formType']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.FormContext ' . \implode(' ', $context) . ']'; } }PKt[*&Twilio/Rest/Verify/V2/TemplatePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return TemplateInstance \Twilio\Rest\Verify\V2\TemplateInstance */ public function buildInstance(array $payload): TemplateInstance { return new TemplateInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.TemplatePage]'; } }PKt[;1Twilio/Rest/Verify/V2/VerificationAttemptPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return VerificationAttemptInstance \Twilio\Rest\Verify\V2\VerificationAttemptInstance */ public function buildInstance(array $payload): VerificationAttemptInstance { return new VerificationAttemptInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.VerificationAttemptPage]'; } }PKt[ L:4Twilio/Rest/Verify/V2/VerificationAttemptContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Attempts/' . \rawurlencode($sid) . ''; } /** * Fetch the VerificationAttemptInstance * * @return VerificationAttemptInstance Fetched VerificationAttemptInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): VerificationAttemptInstance { $payload = $this->version->fetch('GET', $this->uri); return new VerificationAttemptInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.VerificationAttemptContext ' . \implode(' ', $context) . ']'; } }PKt[^*Twilio/Rest/Verify/V2/TemplateInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'channels' => Values::array_get($payload, 'channels'), 'translations' => Values::array_get($payload, 'translations'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.TemplateInstance]'; } }PKt['II1Twilio/Rest/Verify/V2/VerificationAttemptList.phpnu[solution = []; $this->uri = '/Attempts'; } /** * Streams VerificationAttemptInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads VerificationAttemptInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return VerificationAttemptInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of VerificationAttemptInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return VerificationAttemptPage Page of VerificationAttemptInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): VerificationAttemptPage { $options = new Values($options); $params = Values::of([ 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'ChannelData.To' => $options['channelDataTo'], 'Country' => $options['country'], 'Channel' => $options['channel'], 'VerifyServiceSid' => $options['verifyServiceSid'], 'VerificationSid' => $options['verificationSid'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new VerificationAttemptPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of VerificationAttemptInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return VerificationAttemptPage Page of VerificationAttemptInstance */ public function getPage(string $targetUrl): VerificationAttemptPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new VerificationAttemptPage($this->version, $response, $this->solution); } /** * Constructs a VerificationAttemptContext * * @param string $sid Verification Attempt Sid. */ public function getContext(string $sid): VerificationAttemptContext { return new VerificationAttemptContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.VerificationAttemptList]'; } }PKt[ 005Twilio/Rest/Verify/V2/VerificationAttemptInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'serviceSid' => Values::array_get($payload, 'service_sid'), 'verificationSid' => Values::array_get($payload, 'verification_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'conversionStatus' => Values::array_get($payload, 'conversion_status'), 'channel' => Values::array_get($payload, 'channel'), 'price' => Values::array_get($payload, 'price'), 'channelData' => Values::array_get($payload, 'channel_data'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return VerificationAttemptContext Context for this * VerificationAttemptInstance */ protected function proxy(): VerificationAttemptContext { if (!$this->context) { $this->context = new VerificationAttemptContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the VerificationAttemptInstance * * @return VerificationAttemptInstance Fetched VerificationAttemptInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): VerificationAttemptInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.VerificationAttemptInstance ' . \implode(' ', $context) . ']'; } }PKt[!::4Twilio/Rest/Verify/V2/VerificationAttemptOptions.phpnu[options['dateCreatedAfter'] = $dateCreatedAfter; $this->options['dateCreatedBefore'] = $dateCreatedBefore; $this->options['channelDataTo'] = $channelDataTo; $this->options['country'] = $country; $this->options['channel'] = $channel; $this->options['verifyServiceSid'] = $verifyServiceSid; $this->options['verificationSid'] = $verificationSid; $this->options['status'] = $status; } /** * Datetime filter used to query Verification Attempts created after this datetime. Given as GMT in RFC 2822 format. * * @param \DateTime $dateCreatedAfter Filter verification attempts after this * date. * @return $this Fluent Builder */ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self { $this->options['dateCreatedAfter'] = $dateCreatedAfter; return $this; } /** * Datetime filter used to query Verification Attempts created before this datetime. Given as GMT in RFC 2822 format. * * @param \DateTime $dateCreatedBefore Filter verification attempts before this * date. * @return $this Fluent Builder */ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self { $this->options['dateCreatedBefore'] = $dateCreatedBefore; return $this; } /** * Destination of a verification. It is phone number in E.164 format. * * @param string $channelDataTo Filters by destination of the verification * attempt. * @return $this Fluent Builder */ public function setChannelDataTo(string $channelDataTo): self { $this->options['channelDataTo'] = $channelDataTo; return $this; } /** * Filter used to query Verification Attempts sent to the specified destination country. * * @param string $country Filter verification attempts by destination country. * @return $this Fluent Builder */ public function setCountry(string $country): self { $this->options['country'] = $country; return $this; } /** * Filter used to query Verification Attempts by communication channel. Valid values are `SMS` and `CALL` * * @param string $channel Filter verification attempts by communication channel. * @return $this Fluent Builder */ public function setChannel(string $channel): self { $this->options['channel'] = $channel; return $this; } /** * Filter used to query Verification Attempts by verify service. Only attempts of the provided SID will be returned. * * @param string $verifyServiceSid Filter verification attempts by verify * service. * @return $this Fluent Builder */ public function setVerifyServiceSid(string $verifyServiceSid): self { $this->options['verifyServiceSid'] = $verifyServiceSid; return $this; } /** * Filter used to return all the Verification Attempts of a single verification. Only attempts of the provided verification SID will be returned. * * @param string $verificationSid Filter attempts by verification. * @return $this Fluent Builder */ public function setVerificationSid(string $verificationSid): self { $this->options['verificationSid'] = $verificationSid; return $this; } /** * Filter used to query Verification Attempts by conversion status. Valid values are `UNCONVERTED`, for attempts that were not converted, and `CONVERTED`, for attempts that were confirmed. * * @param string $status Filter verification attempts by conversion status. * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.ReadVerificationAttemptOptions ' . $options . ']'; } }PKt[TM||(Twilio/Rest/Verify/V2/ServiceOptions.phpnu[options['codeLength'] = $codeLength; $this->options['lookupEnabled'] = $lookupEnabled; $this->options['skipSmsToLandlines'] = $skipSmsToLandlines; $this->options['dtmfInputRequired'] = $dtmfInputRequired; $this->options['ttsName'] = $ttsName; $this->options['psd2Enabled'] = $psd2Enabled; $this->options['doNotShareWarningEnabled'] = $doNotShareWarningEnabled; $this->options['customCodeEnabled'] = $customCodeEnabled; $this->options['pushIncludeDate'] = $pushIncludeDate; $this->options['pushApnCredentialSid'] = $pushApnCredentialSid; $this->options['pushFcmCredentialSid'] = $pushFcmCredentialSid; $this->options['totpIssuer'] = $totpIssuer; $this->options['totpTimeStep'] = $totpTimeStep; $this->options['totpCodeLength'] = $totpCodeLength; $this->options['totpSkew'] = $totpSkew; $this->options['defaultTemplateSid'] = $defaultTemplateSid; } /** * The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. * * @param int $codeLength The length of the verification code to generate * @return $this Fluent Builder */ public function setCodeLength(int $codeLength): self { $this->options['codeLength'] = $codeLength; return $this; } /** * Whether to perform a lookup with each verification started and return info about the phone number. * * @param bool $lookupEnabled Whether to perform a lookup with each verification * @return $this Fluent Builder */ public function setLookupEnabled(bool $lookupEnabled): self { $this->options['lookupEnabled'] = $lookupEnabled; return $this; } /** * Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. * * @param bool $skipSmsToLandlines Whether to skip sending SMS verifications to * landlines * @return $this Fluent Builder */ public function setSkipSmsToLandlines(bool $skipSmsToLandlines): self { $this->options['skipSmsToLandlines'] = $skipSmsToLandlines; return $this; } /** * Whether to ask the user to press a number before delivering the verify code in a phone call. * * @param bool $dtmfInputRequired Whether to ask the user to press a number * before delivering the verify code in a phone * call * @return $this Fluent Builder */ public function setDtmfInputRequired(bool $dtmfInputRequired): self { $this->options['dtmfInputRequired'] = $dtmfInputRequired; return $this; } /** * The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. * * @param string $ttsName The name of an alternative text-to-speech service to * use in phone calls * @return $this Fluent Builder */ public function setTtsName(string $ttsName): self { $this->options['ttsName'] = $ttsName; return $this; } /** * Whether to pass PSD2 transaction parameters when starting a verification. * * @param bool $psd2Enabled Whether to pass PSD2 transaction parameters when * starting a verification * @return $this Fluent Builder */ public function setPsd2Enabled(bool $psd2Enabled): self { $this->options['psd2Enabled'] = $psd2Enabled; return $this; } /** * Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code` * * @param bool $doNotShareWarningEnabled Whether to add a security warning at * the end of an SMS. * @return $this Fluent Builder */ public function setDoNotShareWarningEnabled(bool $doNotShareWarningEnabled): self { $this->options['doNotShareWarningEnabled'] = $doNotShareWarningEnabled; return $this; } /** * Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. * * @param bool $customCodeEnabled Whether to allow sending verifications with a * custom code. * @return $this Fluent Builder */ public function setCustomCodeEnabled(bool $customCodeEnabled): self { $this->options['customCodeEnabled'] = $customCodeEnabled; return $this; } /** * Optional configuration for the Push factors. If true, include the date in the Challenge's response. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: false. **Deprecated** do not use this parameter. This timestamp value is the same one as the one found in `date_created`, please use that one instead. * * @param bool $pushIncludeDate Optional. Include the date in the Challenge's * response. Default: false. **Deprecated** do not * use this parameter. * @return $this Fluent Builder */ public function setPushIncludeDate(bool $pushIncludeDate): self { $this->options['pushIncludeDate'] = $pushIncludeDate; return $this; } /** * Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) * * @param string $pushApnCredentialSid Optional. Set APN Credential for this * service. * @return $this Fluent Builder */ public function setPushApnCredentialSid(string $pushApnCredentialSid): self { $this->options['pushApnCredentialSid'] = $pushApnCredentialSid; return $this; } /** * Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) * * @param string $pushFcmCredentialSid Optional. Set FCM Credential for this * service. * @return $this Fluent Builder */ public function setPushFcmCredentialSid(string $pushFcmCredentialSid): self { $this->options['pushFcmCredentialSid'] = $pushFcmCredentialSid; return $this; } /** * Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI. Defaults to the service friendly name if not provided. * * @param string $totpIssuer Optional. Set TOTP Issuer for this service. * @return $this Fluent Builder */ public function setTotpIssuer(string $totpIssuer): self { $this->options['totpIssuer'] = $totpIssuer; return $this; } /** * Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds * * @param int $totpTimeStep Optional. How often, in seconds, are TOTP codes * generated * @return $this Fluent Builder */ public function setTotpTimeStep(int $totpTimeStep): self { $this->options['totpTimeStep'] = $totpTimeStep; return $this; } /** * Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 * * @param int $totpCodeLength Optional. Number of digits for generated TOTP * codes * @return $this Fluent Builder */ public function setTotpCodeLength(int $totpCodeLength): self { $this->options['totpCodeLength'] = $totpCodeLength; return $this; } /** * Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 * * @param int $totpSkew Optional. The number of past and future time-steps * valid at a given time * @return $this Fluent Builder */ public function setTotpSkew(int $totpSkew): self { $this->options['totpSkew'] = $totpSkew; return $this; } /** * The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. * * @param string $defaultTemplateSid The verification template SMS messages. * @return $this Fluent Builder */ public function setDefaultTemplateSid(string $defaultTemplateSid): self { $this->options['defaultTemplateSid'] = $defaultTemplateSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.CreateServiceOptions ' . $options . ']'; } } class UpdateServiceOptions extends Options { /** * @param string $friendlyName A string to describe the verification service * @param int $codeLength The length of the verification code to generate * @param bool $lookupEnabled Whether to perform a lookup with each verification * @param bool $skipSmsToLandlines Whether to skip sending SMS verifications to * landlines * @param bool $dtmfInputRequired Whether to ask the user to press a number * before delivering the verify code in a phone * call * @param string $ttsName The name of an alternative text-to-speech service to * use in phone calls * @param bool $psd2Enabled Whether to pass PSD2 transaction parameters when * starting a verification * @param bool $doNotShareWarningEnabled Whether to add a privacy warning at * the end of an SMS. * @param bool $customCodeEnabled Whether to allow sending verifications with a * custom code. * @param bool $pushIncludeDate Optional. Include the date in the Challenge's * response. Default: false. **Deprecated** do not * use this parameter. * @param string $pushApnCredentialSid Optional. Set APN Credential for this * service. * @param string $pushFcmCredentialSid Optional. Set FCM Credential for this * service. * @param string $totpIssuer Optional. Set TOTP Issuer for this service. * @param int $totpTimeStep Optional. How often, in seconds, are TOTP codes * generated * @param int $totpCodeLength Optional. Number of digits for generated TOTP * codes * @param int $totpSkew Optional. The number of past and future time-steps * valid at a given time * @param string $defaultTemplateSid The verification template SMS messages. */ public function __construct(string $friendlyName = Values::NONE, int $codeLength = Values::NONE, bool $lookupEnabled = Values::NONE, bool $skipSmsToLandlines = Values::NONE, bool $dtmfInputRequired = Values::NONE, string $ttsName = Values::NONE, bool $psd2Enabled = Values::NONE, bool $doNotShareWarningEnabled = Values::NONE, bool $customCodeEnabled = Values::NONE, bool $pushIncludeDate = Values::NONE, string $pushApnCredentialSid = Values::NONE, string $pushFcmCredentialSid = Values::NONE, string $totpIssuer = Values::NONE, int $totpTimeStep = Values::NONE, int $totpCodeLength = Values::NONE, int $totpSkew = Values::NONE, string $defaultTemplateSid = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['codeLength'] = $codeLength; $this->options['lookupEnabled'] = $lookupEnabled; $this->options['skipSmsToLandlines'] = $skipSmsToLandlines; $this->options['dtmfInputRequired'] = $dtmfInputRequired; $this->options['ttsName'] = $ttsName; $this->options['psd2Enabled'] = $psd2Enabled; $this->options['doNotShareWarningEnabled'] = $doNotShareWarningEnabled; $this->options['customCodeEnabled'] = $customCodeEnabled; $this->options['pushIncludeDate'] = $pushIncludeDate; $this->options['pushApnCredentialSid'] = $pushApnCredentialSid; $this->options['pushFcmCredentialSid'] = $pushFcmCredentialSid; $this->options['totpIssuer'] = $totpIssuer; $this->options['totpTimeStep'] = $totpTimeStep; $this->options['totpCodeLength'] = $totpCodeLength; $this->options['totpSkew'] = $totpSkew; $this->options['defaultTemplateSid'] = $defaultTemplateSid; } /** * A descriptive string that you create to describe the verification service. It can be up to 30 characters long. **This value should not contain PII.** * * @param string $friendlyName A string to describe the verification service * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. * * @param int $codeLength The length of the verification code to generate * @return $this Fluent Builder */ public function setCodeLength(int $codeLength): self { $this->options['codeLength'] = $codeLength; return $this; } /** * Whether to perform a lookup with each verification started and return info about the phone number. * * @param bool $lookupEnabled Whether to perform a lookup with each verification * @return $this Fluent Builder */ public function setLookupEnabled(bool $lookupEnabled): self { $this->options['lookupEnabled'] = $lookupEnabled; return $this; } /** * Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. * * @param bool $skipSmsToLandlines Whether to skip sending SMS verifications to * landlines * @return $this Fluent Builder */ public function setSkipSmsToLandlines(bool $skipSmsToLandlines): self { $this->options['skipSmsToLandlines'] = $skipSmsToLandlines; return $this; } /** * Whether to ask the user to press a number before delivering the verify code in a phone call. * * @param bool $dtmfInputRequired Whether to ask the user to press a number * before delivering the verify code in a phone * call * @return $this Fluent Builder */ public function setDtmfInputRequired(bool $dtmfInputRequired): self { $this->options['dtmfInputRequired'] = $dtmfInputRequired; return $this; } /** * The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. * * @param string $ttsName The name of an alternative text-to-speech service to * use in phone calls * @return $this Fluent Builder */ public function setTtsName(string $ttsName): self { $this->options['ttsName'] = $ttsName; return $this; } /** * Whether to pass PSD2 transaction parameters when starting a verification. * * @param bool $psd2Enabled Whether to pass PSD2 transaction parameters when * starting a verification * @return $this Fluent Builder */ public function setPsd2Enabled(bool $psd2Enabled): self { $this->options['psd2Enabled'] = $psd2Enabled; return $this; } /** * Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.** * * @param bool $doNotShareWarningEnabled Whether to add a privacy warning at * the end of an SMS. * @return $this Fluent Builder */ public function setDoNotShareWarningEnabled(bool $doNotShareWarningEnabled): self { $this->options['doNotShareWarningEnabled'] = $doNotShareWarningEnabled; return $this; } /** * Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. * * @param bool $customCodeEnabled Whether to allow sending verifications with a * custom code. * @return $this Fluent Builder */ public function setCustomCodeEnabled(bool $customCodeEnabled): self { $this->options['customCodeEnabled'] = $customCodeEnabled; return $this; } /** * Optional configuration for the Push factors. If true, include the date in the Challenge's response. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: false. **Deprecated** do not use this parameter. * * @param bool $pushIncludeDate Optional. Include the date in the Challenge's * response. Default: false. **Deprecated** do not * use this parameter. * @return $this Fluent Builder */ public function setPushIncludeDate(bool $pushIncludeDate): self { $this->options['pushIncludeDate'] = $pushIncludeDate; return $this; } /** * Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) * * @param string $pushApnCredentialSid Optional. Set APN Credential for this * service. * @return $this Fluent Builder */ public function setPushApnCredentialSid(string $pushApnCredentialSid): self { $this->options['pushApnCredentialSid'] = $pushApnCredentialSid; return $this; } /** * Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) * * @param string $pushFcmCredentialSid Optional. Set FCM Credential for this * service. * @return $this Fluent Builder */ public function setPushFcmCredentialSid(string $pushFcmCredentialSid): self { $this->options['pushFcmCredentialSid'] = $pushFcmCredentialSid; return $this; } /** * Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI. * * @param string $totpIssuer Optional. Set TOTP Issuer for this service. * @return $this Fluent Builder */ public function setTotpIssuer(string $totpIssuer): self { $this->options['totpIssuer'] = $totpIssuer; return $this; } /** * Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds * * @param int $totpTimeStep Optional. How often, in seconds, are TOTP codes * generated * @return $this Fluent Builder */ public function setTotpTimeStep(int $totpTimeStep): self { $this->options['totpTimeStep'] = $totpTimeStep; return $this; } /** * Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6 * * @param int $totpCodeLength Optional. Number of digits for generated TOTP * codes * @return $this Fluent Builder */ public function setTotpCodeLength(int $totpCodeLength): self { $this->options['totpCodeLength'] = $totpCodeLength; return $this; } /** * Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1 * * @param int $totpSkew Optional. The number of past and future time-steps * valid at a given time * @return $this Fluent Builder */ public function setTotpSkew(int $totpSkew): self { $this->options['totpSkew'] = $totpSkew; return $this; } /** * The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only. * * @param string $defaultTemplateSid The verification template SMS messages. * @return $this Fluent Builder */ public function setDefaultTemplateSid(string $defaultTemplateSid): self { $this->options['defaultTemplateSid'] = $defaultTemplateSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.UpdateServiceOptions ' . $options . ']'; } }PKt[9kyy%Twilio/Rest/Verify/V2/ServicePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return ServiceInstance \Twilio\Rest\Verify\V2\ServiceInstance */ public function buildInstance(array $payload): ServiceInstance { return new ServiceInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.ServicePage]'; } }PKt[Gj!"Twilio/Rest/Verify/V2/FormPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FormInstance \Twilio\Rest\Verify\V2\FormInstance */ public function buildInstance(array $payload): FormInstance { return new FormInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2.FormPage]'; } }PKt[q)Twilio/Rest/Verify/V2/TemplateOptions.phpnu[options['friendlyName'] = $friendlyName; } /** * String filter used to query templates with a given friendly name * * @param string $friendlyName Filter templates using friendly name * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Verify.V2.ReadTemplateOptions ' . $options . ']'; } }PKt[ۦ|9 *Twilio/Rest/Verify/V2/SafelistInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'phoneNumber' => Values::array_get($payload, 'phone_number'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['phoneNumber' => $phoneNumber ?: $this->properties['phoneNumber'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SafelistContext Context for this SafelistInstance */ protected function proxy(): SafelistContext { if (!$this->context) { $this->context = new SafelistContext($this->version, $this->solution['phoneNumber']); } return $this->context; } /** * Fetch the SafelistInstance * * @return SafelistInstance Fetched SafelistInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SafelistInstance { return $this->proxy()->fetch(); } /** * Delete the SafelistInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.SafelistInstance ' . \implode(' ', $context) . ']'; } }PKt[66<Twilio/Rest/Verify/V2/VerificationAttemptsSummaryContext.phpnu[solution = []; $this->uri = '/Attempts/Summary'; } /** * Fetch the VerificationAttemptsSummaryInstance * * @param array|Options $options Optional Arguments * @return VerificationAttemptsSummaryInstance Fetched * VerificationAttemptsSummaryInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(array $options = []): VerificationAttemptsSummaryInstance { $options = new Values($options); $params = Values::of([ 'VerifyServiceSid' => $options['verifyServiceSid'], 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']), 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']), 'Country' => $options['country'], 'Channel' => $options['channel'], 'DestinationPrefix' => $options['destinationPrefix'], ]); $payload = $this->version->fetch('GET', $this->uri, $params); return new VerificationAttemptsSummaryInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Verify.V2.VerificationAttemptsSummaryContext ' . \implode(' ', $context) . ']'; } }PKt[e)A iiTwilio/Rest/Verify/V2.phpnu[version = 'v2'; } protected function getForms(): FormList { if (!$this->_forms) { $this->_forms = new FormList($this); } return $this->_forms; } protected function getSafelist(): SafelistList { if (!$this->_safelist) { $this->_safelist = new SafelistList($this); } return $this->_safelist; } protected function getServices(): ServiceList { if (!$this->_services) { $this->_services = new ServiceList($this); } return $this->_services; } protected function getVerificationAttempts(): VerificationAttemptList { if (!$this->_verificationAttempts) { $this->_verificationAttempts = new VerificationAttemptList($this); } return $this->_verificationAttempts; } protected function getVerificationAttemptsSummary(): VerificationAttemptsSummaryList { if (!$this->_verificationAttemptsSummary) { $this->_verificationAttemptsSummary = new VerificationAttemptsSummaryList($this); } return $this->_verificationAttemptsSummary; } protected function getTemplates(): TemplateList { if (!$this->_templates) { $this->_templates = new TemplateList($this); } return $this->_templates; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Verify.V2]'; } }PKt[m  Twilio/Rest/Taskrouter.phpnu[baseUrl = 'https://taskrouter.twilio.com'; } /** * @return V1 Version v1 of taskrouter */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getWorkspaces(): \Twilio\Rest\Taskrouter\V1\WorkspaceList { return $this->v1->workspaces; } /** * @param string $sid The SID of the resource to fetch */ protected function contextWorkspaces(string $sid): \Twilio\Rest\Taskrouter\V1\WorkspaceContext { return $this->v1->workspaces($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Taskrouter]'; } }PKt[ JEjNjN(Twilio/Rest/Supersim/V1/FleetOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['dataEnabled'] = $dataEnabled; $this->options['dataLimit'] = $dataLimit; $this->options['ipCommandsUrl'] = $ipCommandsUrl; $this->options['ipCommandsMethod'] = $ipCommandsMethod; $this->options['smsCommandsEnabled'] = $smsCommandsEnabled; $this->options['smsCommandsUrl'] = $smsCommandsUrl; $this->options['smsCommandsMethod'] = $smsCommandsMethod; } /** * An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Defines whether SIMs in the Fleet are capable of using 2G/3G/4G/LTE/CAT-M data connectivity. Defaults to `true`. * * @param bool $dataEnabled Defines whether SIMs in the Fleet are capable of * using data connectivity * @return $this Fluent Builder */ public function setDataEnabled(bool $dataEnabled): self { $this->options['dataEnabled'] = $dataEnabled; return $this; } /** * The total data usage (download and upload combined) in Megabytes that each Super SIM assigned to the Fleet can consume during a billing period (normally one month). Value must be between 1MB (1) and 2TB (2,000,000). Defaults to 1GB (1,000). * * @param int $dataLimit The total data usage (download and upload combined) in * Megabytes that each Super SIM resource assigned to the * Fleet can consume * @return $this Fluent Builder */ public function setDataLimit(int $dataLimit): self { $this->options['dataLimit'] = $dataLimit; return $this; } /** * The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device to a special IP address. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. * * @param string $ipCommandsUrl The URL that will receive a webhook when a * Super SIM in the Fleet is used to send an IP * Command from your device * @return $this Fluent Builder */ public function setIpCommandsUrl(string $ipCommandsUrl): self { $this->options['ipCommandsUrl'] = $ipCommandsUrl; return $this; } /** * A string representing the HTTP method to use when making a request to `ip_commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. * * @param string $ipCommandsMethod A string representing the HTTP method to use * when making a request to `ip_commands_url` * @return $this Fluent Builder */ public function setIpCommandsMethod(string $ipCommandsMethod): self { $this->options['ipCommandsMethod'] = $ipCommandsMethod; return $this; } /** * Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands. Defaults to `true`. * * @param bool $smsCommandsEnabled Defines whether SIMs in the Fleet are * capable of sending and receiving * machine-to-machine SMS via Commands * @return $this Fluent Builder */ public function setSmsCommandsEnabled(bool $smsCommandsEnabled): self { $this->options['smsCommandsEnabled'] = $smsCommandsEnabled; return $this; } /** * The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the SMS Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. * * @param string $smsCommandsUrl The URL that will receive a webhook when a * Super SIM in the Fleet is used to send an SMS * from your device to the SMS Commands number * @return $this Fluent Builder */ public function setSmsCommandsUrl(string $smsCommandsUrl): self { $this->options['smsCommandsUrl'] = $smsCommandsUrl; return $this; } /** * A string representing the HTTP method to use when making a request to `sms_commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. * * @param string $smsCommandsMethod A string representing the HTTP method to * use when making a request to * `sms_commands_url` * @return $this Fluent Builder */ public function setSmsCommandsMethod(string $smsCommandsMethod): self { $this->options['smsCommandsMethod'] = $smsCommandsMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.CreateFleetOptions ' . $options . ']'; } } class ReadFleetOptions extends Options { /** * @param string $networkAccessProfile The SID or unique name of the Network * Access Profile of the Fleet */ public function __construct(string $networkAccessProfile = Values::NONE) { $this->options['networkAccessProfile'] = $networkAccessProfile; } /** * The SID or unique name of the Network Access Profile that controls which cellular networks the Fleet's SIMs can connect to. * * @param string $networkAccessProfile The SID or unique name of the Network * Access Profile of the Fleet * @return $this Fluent Builder */ public function setNetworkAccessProfile(string $networkAccessProfile): self { $this->options['networkAccessProfile'] = $networkAccessProfile; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.ReadFleetOptions ' . $options . ']'; } } class UpdateFleetOptions extends Options { /** * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param string $networkAccessProfile The SID or unique name of the Network * Access Profile of the Fleet * @param string $ipCommandsUrl The URL that will receive a webhook when a * Super SIM in the Fleet is used to send an IP * Command from your device * @param string $ipCommandsMethod A string representing the HTTP method to use * when making a request to `ip_commands_url` * @param string $smsCommandsUrl The URL that will receive a webhook when a * Super SIM in the Fleet is used to send an SMS * from your device to the SMS Commands number * @param string $smsCommandsMethod A string representing the HTTP method to * use when making a request to * `sms_commands_url` * @param int $dataLimit The total data usage (download and upload combined) in * Megabytes that each Super SIM assigned to the Fleet * can consume */ public function __construct(string $uniqueName = Values::NONE, string $networkAccessProfile = Values::NONE, string $ipCommandsUrl = Values::NONE, string $ipCommandsMethod = Values::NONE, string $smsCommandsUrl = Values::NONE, string $smsCommandsMethod = Values::NONE, int $dataLimit = Values::NONE) { $this->options['uniqueName'] = $uniqueName; $this->options['networkAccessProfile'] = $networkAccessProfile; $this->options['ipCommandsUrl'] = $ipCommandsUrl; $this->options['ipCommandsMethod'] = $ipCommandsMethod; $this->options['smsCommandsUrl'] = $smsCommandsUrl; $this->options['smsCommandsMethod'] = $smsCommandsMethod; $this->options['dataLimit'] = $dataLimit; } /** * An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. * * @param string $networkAccessProfile The SID or unique name of the Network * Access Profile of the Fleet * @return $this Fluent Builder */ public function setNetworkAccessProfile(string $networkAccessProfile): self { $this->options['networkAccessProfile'] = $networkAccessProfile; return $this; } /** * The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device to a special IP address. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. * * @param string $ipCommandsUrl The URL that will receive a webhook when a * Super SIM in the Fleet is used to send an IP * Command from your device * @return $this Fluent Builder */ public function setIpCommandsUrl(string $ipCommandsUrl): self { $this->options['ipCommandsUrl'] = $ipCommandsUrl; return $this; } /** * A string representing the HTTP method to use when making a request to `ip_commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. * * @param string $ipCommandsMethod A string representing the HTTP method to use * when making a request to `ip_commands_url` * @return $this Fluent Builder */ public function setIpCommandsMethod(string $ipCommandsMethod): self { $this->options['ipCommandsMethod'] = $ipCommandsMethod; return $this; } /** * The URL that will receive a webhook when a Super SIM in the Fleet is used to send an SMS from your device to the SMS Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. * * @param string $smsCommandsUrl The URL that will receive a webhook when a * Super SIM in the Fleet is used to send an SMS * from your device to the SMS Commands number * @return $this Fluent Builder */ public function setSmsCommandsUrl(string $smsCommandsUrl): self { $this->options['smsCommandsUrl'] = $smsCommandsUrl; return $this; } /** * A string representing the HTTP method to use when making a request to `sms_commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. * * @param string $smsCommandsMethod A string representing the HTTP method to * use when making a request to * `sms_commands_url` * @return $this Fluent Builder */ public function setSmsCommandsMethod(string $smsCommandsMethod): self { $this->options['smsCommandsMethod'] = $smsCommandsMethod; return $this; } /** * The total data usage (download and upload combined) in Megabytes that each Super SIM assigned to the Fleet can consume during a billing period (normally one month). Value must be between 1MB (1) and 2TB (2,000,000). Defaults to 1GB (1,000). * * @param int $dataLimit The total data usage (download and upload combined) in * Megabytes that each Super SIM assigned to the Fleet * can consume * @return $this Fluent Builder */ public function setDataLimit(int $dataLimit): self { $this->options['dataLimit'] = $dataLimit; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.UpdateFleetOptions ' . $options . ']'; } }PKt[\44-Twilio/Rest/Supersim/V1/SmsCommandOptions.phpnu[options['callbackMethod'] = $callbackMethod; $this->options['callbackUrl'] = $callbackUrl; } /** * The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. * * @param string $callbackMethod The HTTP method we should use to call * callback_url * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * The URL we should call using the `callback_method` after we have sent the command. * * @param string $callbackUrl The URL we should call after we have sent the * command * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.CreateSmsCommandOptions ' . $options . ']'; } } class ReadSmsCommandOptions extends Options { /** * @param string $sim The SID or unique name of the Sim resource that SMS * Command was sent to or from. * @param string $status The status of the SMS Command * @param string $direction The direction of the SMS Command */ public function __construct(string $sim = Values::NONE, string $status = Values::NONE, string $direction = Values::NONE) { $this->options['sim'] = $sim; $this->options['status'] = $status; $this->options['direction'] = $direction; } /** * The SID or unique name of the Sim resource that SMS Command was sent to or from. * * @param string $sim The SID or unique name of the Sim resource that SMS * Command was sent to or from. * @return $this Fluent Builder */ public function setSim(string $sim): self { $this->options['sim'] = $sim; return $this; } /** * The status of the SMS Command. Can be: `queued`, `sent`, `delivered`, `received` or `failed`. See the [SMS Command Status Values](https://www.twilio.com/docs/iot/supersim/api/smscommand-resource#status-values) for a description of each. * * @param string $status The status of the SMS Command * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The direction of the SMS Command. Can be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term `mobile terminated`, and `from_sim` is synonymous with the term `mobile originated`. * * @param string $direction The direction of the SMS Command * @return $this Fluent Builder */ public function setDirection(string $direction): self { $this->options['direction'] = $direction; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.ReadSmsCommandOptions ' . $options . ']'; } }PKt[r}+Twilio/Rest/Supersim/V1/UsageRecordList.phpnu[solution = []; $this->uri = '/UsageRecords'; } /** * Streams UsageRecordInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UsageRecordInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UsageRecordInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of UsageRecordInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UsageRecordPage Page of UsageRecordInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UsageRecordPage { $options = new Values($options); $params = Values::of([ 'Sim' => $options['sim'], 'Fleet' => $options['fleet'], 'Network' => $options['network'], 'IsoCountry' => $options['isoCountry'], 'Group' => $options['group'], 'Granularity' => $options['granularity'], 'StartTime' => Serialize::iso8601DateTime($options['startTime']), 'EndTime' => Serialize::iso8601DateTime($options['endTime']), 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UsageRecordPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UsageRecordInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UsageRecordPage Page of UsageRecordInstance */ public function getPage(string $targetUrl): UsageRecordPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UsageRecordPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.UsageRecordList]'; } }PKt[c.Twilio/Rest/Supersim/V1/EsimProfileOptions.phpnu[options['callbackUrl'] = $callbackUrl; $this->options['callbackMethod'] = $callbackMethod; $this->options['eid'] = $eid; } /** * The URL we should call using the `callback_method` when the status of the eSIM Profile changes. At this stage of the eSIM Profile pilot, the a request to the URL will only be called when the ESimProfile resource changes from `reserving` to `available`. * * @param string $callbackUrl The URL we should call after we have sent when * the status of the eSIM Profile changes * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. * * @param string $callbackMethod The HTTP method we should use to call * callback_url * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * Identifier of the eUICC that will claim the eSIM Profile. * * @param string $eid Identifier of the eUICC that will claim the eSIM Profile * @return $this Fluent Builder */ public function setEid(string $eid): self { $this->options['eid'] = $eid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.CreateEsimProfileOptions ' . $options . ']'; } } class ReadEsimProfileOptions extends Options { /** * @param string $eid List the eSIM Profiles that have been associated with an * EId * @param string $simSid Find the eSIM Profile resource related to a Sim * resource by providing the SIM SID * @param string $status List the eSIM Profiles that are in a given status */ public function __construct(string $eid = Values::NONE, string $simSid = Values::NONE, string $status = Values::NONE) { $this->options['eid'] = $eid; $this->options['simSid'] = $simSid; $this->options['status'] = $status; } /** * List the eSIM Profiles that have been associated with an EId. * * @param string $eid List the eSIM Profiles that have been associated with an * EId * @return $this Fluent Builder */ public function setEid(string $eid): self { $this->options['eid'] = $eid; return $this; } /** * Find the eSIM Profile resource related to a [Sim](https://www.twilio.com/docs/wireless/api/sim-resource) resource by providing the SIM SID. Will always return an array with either 1 or 0 records. * * @param string $simSid Find the eSIM Profile resource related to a Sim * resource by providing the SIM SID * @return $this Fluent Builder */ public function setSimSid(string $simSid): self { $this->options['simSid'] = $simSid; return $this; } /** * List the eSIM Profiles that are in a given status. * * @param string $status List the eSIM Profiles that are in a given status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.ReadEsimProfileOptions ' . $options . ']'; } }PKt[ll.Twilio/Rest/Supersim/V1/SettingsUpdatePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SettingsUpdateInstance \Twilio\Rest\Supersim\V1\SettingsUpdateInstance */ public function buildInstance(array $payload): SettingsUpdateInstance { return new SettingsUpdateInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.SettingsUpdatePage]'; } }PKt[]?!!.Twilio/Rest/Supersim/V1/UsageRecordOptions.phpnu[options['sim'] = $sim; $this->options['fleet'] = $fleet; $this->options['network'] = $network; $this->options['isoCountry'] = $isoCountry; $this->options['group'] = $group; $this->options['granularity'] = $granularity; $this->options['startTime'] = $startTime; $this->options['endTime'] = $endTime; } /** * SID or unique name of a Sim resource. Only show UsageRecords representing usage incurred by this Super SIM. * * @param string $sim SID or unique name of a Sim resource. Only show * UsageRecords representing usage incurred by this Super * SIM. * @return $this Fluent Builder */ public function setSim(string $sim): self { $this->options['sim'] = $sim; return $this; } /** * SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred. * * @param string $fleet SID or unique name of a Fleet resource. Only show * UsageRecords representing usage for Super SIMs * belonging to this Fleet resource at the time the usage * occurred. * @return $this Fluent Builder */ public function setFleet(string $fleet): self { $this->options['fleet'] = $fleet; return $this; } /** * SID of a Network resource. Only show UsageRecords representing usage on this network. * * @param string $network SID of a Network resource. Only show UsageRecords * representing usage on this network. * @return $this Fluent Builder */ public function setNetwork(string $network): self { $this->options['network'] = $network; return $this; } /** * Alpha-2 ISO Country Code. Only show UsageRecords representing usage in this country. * * @param string $isoCountry Alpha-2 ISO Country Code. Only show UsageRecords * representing usage in this country. * @return $this Fluent Builder */ public function setIsoCountry(string $isoCountry): self { $this->options['isoCountry'] = $isoCountry; return $this; } /** * Dimension over which to aggregate usage records. Can be: `sim`, `fleet`, `network`, `isoCountry`. Default is to not aggregate across any of these dimensions, UsageRecords will be aggregated into the time buckets described by the `Granularity` parameter. * * @param string $group Dimension over which to aggregate usage records. * @return $this Fluent Builder */ public function setGroup(string $group): self { $this->options['group'] = $group; return $this; } /** * Time-based grouping that UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default is `all`. `all` returns one UsageRecord that describes the usage for the entire period. * * @param string $granularity Time-based grouping that UsageRecords should be * aggregated by. Can be: `hour`, `day`, or `all`. * Default is `all`. * @return $this Fluent Builder */ public function setGranularity(string $granularity): self { $this->options['granularity'] = $granularity; return $this; } /** * Only include usage that occurred at or after this time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Default is one month before the `end_time`. * * @param \DateTime $startTime Only include usage that occurred at or after * this time. * @return $this Fluent Builder */ public function setStartTime(\DateTime $startTime): self { $this->options['startTime'] = $startTime; return $this; } /** * Only include usage that occurred before this time (exclusive), specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Default is the current time. * * @param \DateTime $endTime Only include usage that occurred before this time * (exclusive). * @return $this Fluent Builder */ public function setEndTime(\DateTime $endTime): self { $this->options['endTime'] = $endTime; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.ReadUsageRecordOptions ' . $options . ']'; } }PKt[ںVQQ'Twilio/Rest/Supersim/V1/NetworkList.phpnu[solution = []; $this->uri = '/Networks'; } /** * Streams NetworkInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads NetworkInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return NetworkInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of NetworkInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return NetworkPage Page of NetworkInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): NetworkPage { $options = new Values($options); $params = Values::of([ 'IsoCountry' => $options['isoCountry'], 'Mcc' => $options['mcc'], 'Mnc' => $options['mnc'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new NetworkPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of NetworkInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return NetworkPage Page of NetworkInstance */ public function getPage(string $targetUrl): NetworkPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new NetworkPage($this->version, $response, $this->solution); } /** * Constructs a NetworkContext * * @param string $sid The SID of the Network resource to fetch */ public function getContext(string $sid): NetworkContext { return new NetworkContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.NetworkList]'; } }PKt[XF=#Twilio/Rest/Supersim/V1/SimPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SimInstance \Twilio\Rest\Supersim\V1\SimInstance */ public function buildInstance(array $payload): SimInstance { return new SimInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.SimPage]'; } }PKt[;kXX)Twilio/Rest/Supersim/V1/IpCommandList.phpnu[solution = []; $this->uri = '/IpCommands'; } /** * Create the IpCommandInstance * * @param string $sim The sid or unique_name of the Super SIM to send the IP * Command to * @param string $payload The data to be delivered to the device. If * payload_type has been specified as binary, payload * should be encoded using base64 encoding. Twilio will * decode the the binary payload before sending to the * device. * @param int $devicePort The device port to which the IP Command will be sent * @param array|Options $options Optional Arguments * @return IpCommandInstance Created IpCommandInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $sim, string $payload, int $devicePort, array $options = []): IpCommandInstance { $options = new Values($options); $data = Values::of([ 'Sim' => $sim, 'Payload' => $payload, 'DevicePort' => $devicePort, 'PayloadType' => $options['payloadType'], 'CallbackUrl' => $options['callbackUrl'], 'CallbackMethod' => $options['callbackMethod'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new IpCommandInstance($this->version, $payload); } /** * Streams IpCommandInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads IpCommandInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return IpCommandInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of IpCommandInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return IpCommandPage Page of IpCommandInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): IpCommandPage { $options = new Values($options); $params = Values::of([ 'Sim' => $options['sim'], 'SimIccid' => $options['simIccid'], 'Status' => $options['status'], 'Direction' => $options['direction'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new IpCommandPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of IpCommandInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return IpCommandPage Page of IpCommandInstance */ public function getPage(string $targetUrl): IpCommandPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new IpCommandPage($this->version, $response, $this->solution); } /** * Constructs a IpCommandContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): IpCommandContext { return new IpCommandContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.IpCommandList]'; } }PKt['Twilio/Rest/Supersim/V1/NetworkPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NetworkInstance \Twilio\Rest\Supersim\V1\NetworkInstance */ public function buildInstance(array $payload): NetworkInstance { return new NetworkInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.NetworkPage]'; } }PKt[}>55%Twilio/Rest/Supersim/V1/FleetList.phpnu[solution = []; $this->uri = '/Fleets'; } /** * Create the FleetInstance * * @param string $networkAccessProfile The SID or unique name of the Network * Access Profile of the Fleet * @param array|Options $options Optional Arguments * @return FleetInstance Created FleetInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $networkAccessProfile, array $options = []): FleetInstance { $options = new Values($options); $data = Values::of([ 'NetworkAccessProfile' => $networkAccessProfile, 'UniqueName' => $options['uniqueName'], 'DataEnabled' => Serialize::booleanToString($options['dataEnabled']), 'DataLimit' => $options['dataLimit'], 'IpCommandsUrl' => $options['ipCommandsUrl'], 'IpCommandsMethod' => $options['ipCommandsMethod'], 'SmsCommandsEnabled' => Serialize::booleanToString($options['smsCommandsEnabled']), 'SmsCommandsUrl' => $options['smsCommandsUrl'], 'SmsCommandsMethod' => $options['smsCommandsMethod'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new FleetInstance($this->version, $payload); } /** * Streams FleetInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads FleetInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return FleetInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of FleetInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return FleetPage Page of FleetInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): FleetPage { $options = new Values($options); $params = Values::of([ 'NetworkAccessProfile' => $options['networkAccessProfile'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new FleetPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of FleetInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return FleetPage Page of FleetInstance */ public function getPage(string $targetUrl): FleetPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new FleetPage($this->version, $response, $this->solution); } /** * Constructs a FleetContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): FleetContext { return new FleetContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.FleetList]'; } }PKt['T /Twilio/Rest/Supersim/V1/UsageRecordInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'simSid' => Values::array_get($payload, 'sim_sid'), 'networkSid' => Values::array_get($payload, 'network_sid'), 'fleetSid' => Values::array_get($payload, 'fleet_sid'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'period' => Values::array_get($payload, 'period'), 'dataUpload' => Values::array_get($payload, 'data_upload'), 'dataDownload' => Values::array_get($payload, 'data_download'), 'dataTotal' => Values::array_get($payload, 'data_total'), 'dataTotalBilled' => Values::array_get($payload, 'data_total_billed'), 'billedUnit' => Values::array_get($payload, 'billed_unit'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.UsageRecordInstance]'; } }PKt[6rR)II#Twilio/Rest/Supersim/V1/SimList.phpnu[solution = []; $this->uri = '/Sims'; } /** * Create the SimInstance * * @param string $iccid The * [ICCID](https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) of the Super SIM to be added to your Account * @param string $registrationCode The 10-digit code required to claim the * Super SIM for your Account * @return SimInstance Created SimInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $iccid, string $registrationCode): SimInstance { $data = Values::of(['Iccid' => $iccid, 'RegistrationCode' => $registrationCode, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SimInstance($this->version, $payload); } /** * Streams SimInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SimInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SimInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SimInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SimPage Page of SimInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SimPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'Fleet' => $options['fleet'], 'Iccid' => $options['iccid'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SimPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SimInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SimPage Page of SimInstance */ public function getPage(string $targetUrl): SimPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SimPage($this->version, $response, $this->solution); } /** * Constructs a SimContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): SimContext { return new SimContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.SimList]'; } }PKt[eY>>4Twilio/Rest/Supersim/V1/NetworkAccessProfilePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NetworkAccessProfileInstance \Twilio\Rest\Supersim\V1\NetworkAccessProfileInstance */ public function buildInstance(array $payload): NetworkAccessProfileInstance { return new NetworkAccessProfileInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.NetworkAccessProfilePage]'; } }PKt[F@ @ +Twilio/Rest/Supersim/V1/NetworkInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'url' => Values::array_get($payload, 'url'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'identifiers' => Values::array_get($payload, 'identifiers'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NetworkContext Context for this NetworkInstance */ protected function proxy(): NetworkContext { if (!$this->context) { $this->context = new NetworkContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the NetworkInstance * * @return NetworkInstance Fetched NetworkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NetworkInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.NetworkInstance ' . \implode(' ', $context) . ']'; } }PKt[ͱ-Twilio/Rest/Supersim/V1/IpCommandInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'simSid' => Values::array_get($payload, 'sim_sid'), 'simIccid' => Values::array_get($payload, 'sim_iccid'), 'status' => Values::array_get($payload, 'status'), 'direction' => Values::array_get($payload, 'direction'), 'deviceIp' => Values::array_get($payload, 'device_ip'), 'devicePort' => Values::array_get($payload, 'device_port'), 'payloadType' => Values::array_get($payload, 'payload_type'), 'payload' => Values::array_get($payload, 'payload'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return IpCommandContext Context for this IpCommandInstance */ protected function proxy(): IpCommandContext { if (!$this->context) { $this->context = new IpCommandContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the IpCommandInstance * * @return IpCommandInstance Fetched IpCommandInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpCommandInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.IpCommandInstance ' . \implode(' ', $context) . ']'; } }PKt[LEff/Twilio/Rest/Supersim/V1/EsimProfileInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'iccid' => Values::array_get($payload, 'iccid'), 'simSid' => Values::array_get($payload, 'sim_sid'), 'status' => Values::array_get($payload, 'status'), 'eid' => Values::array_get($payload, 'eid'), 'smdpPlusAddress' => Values::array_get($payload, 'smdp_plus_address'), 'errorCode' => Values::array_get($payload, 'error_code'), 'errorMessage' => Values::array_get($payload, 'error_message'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return EsimProfileContext Context for this EsimProfileInstance */ protected function proxy(): EsimProfileContext { if (!$this->context) { $this->context = new EsimProfileContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the EsimProfileInstance * * @return EsimProfileInstance Fetched EsimProfileInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EsimProfileInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.EsimProfileInstance ' . \implode(' ', $context) . ']'; } }PKt[tp'Twilio/Rest/Supersim/V1/SimInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'iccid' => Values::array_get($payload, 'iccid'), 'status' => Values::array_get($payload, 'status'), 'fleetSid' => Values::array_get($payload, 'fleet_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SimContext Context for this SimInstance */ protected function proxy(): SimContext { if (!$this->context) { $this->context = new SimContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SimInstance * * @return SimInstance Fetched SimInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SimInstance { return $this->proxy()->fetch(); } /** * Update the SimInstance * * @param array|Options $options Optional Arguments * @return SimInstance Updated SimInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SimInstance { return $this->proxy()->update($options); } /** * Access the billingPeriods */ protected function getBillingPeriods(): BillingPeriodList { return $this->proxy()->billingPeriods; } /** * Access the simIpAddresses */ protected function getSimIpAddresses(): SimIpAddressList { return $this->proxy()->simIpAddresses; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.SimInstance ' . \implode(' ', $context) . ']'; } }PKt[((.Twilio/Rest/Supersim/V1/SmsCommandInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'simSid' => Values::array_get($payload, 'sim_sid'), 'payload' => Values::array_get($payload, 'payload'), 'status' => Values::array_get($payload, 'status'), 'direction' => Values::array_get($payload, 'direction'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SmsCommandContext Context for this SmsCommandInstance */ protected function proxy(): SmsCommandContext { if (!$this->context) { $this->context = new SmsCommandContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SmsCommandInstance * * @return SmsCommandInstance Fetched SmsCommandInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SmsCommandInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.SmsCommandInstance ' . \implode(' ', $context) . ']'; } }PKt[`(ll.Twilio/Rest/Supersim/V1/EsimProfileContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/ESimProfiles/' . \rawurlencode($sid) . ''; } /** * Fetch the EsimProfileInstance * * @return EsimProfileInstance Fetched EsimProfileInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): EsimProfileInstance { $payload = $this->version->fetch('GET', $this->uri); return new EsimProfileInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.EsimProfileContext ' . \implode(' ', $context) . ']'; } }PKt[&F+Twilio/Rest/Supersim/V1/UsageRecordPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UsageRecordInstance \Twilio\Rest\Supersim\V1\UsageRecordInstance */ public function buildInstance(array $payload): UsageRecordInstance { return new UsageRecordInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.UsageRecordPage]'; } }PKt[%Twilio/Rest/Supersim/V1/FleetPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return FleetInstance \Twilio\Rest\Supersim\V1\FleetInstance */ public function buildInstance(array $payload): FleetInstance { return new FleetInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.FleetPage]'; } }PKt[5 CC*Twilio/Rest/Supersim/V1/NetworkContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Networks/' . \rawurlencode($sid) . ''; } /** * Fetch the NetworkInstance * * @return NetworkInstance Fetched NetworkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NetworkInstance { $payload = $this->version->fetch('GET', $this->uri); return new NetworkInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.NetworkContext ' . \implode(' ', $context) . ']'; } }PKt[I 2Twilio/Rest/Supersim/V1/SettingsUpdateInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'iccid' => Values::array_get($payload, 'iccid'), 'simSid' => Values::array_get($payload, 'sim_sid'), 'status' => Values::array_get($payload, 'status'), 'packages' => Values::array_get($payload, 'packages'), 'dateCompleted' => Deserialize::dateTime(Values::array_get($payload, 'date_completed')), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.SettingsUpdateInstance]'; } }PKt[5߲.Twilio/Rest/Supersim/V1/SettingsUpdateList.phpnu[solution = []; $this->uri = '/SettingsUpdates'; } /** * Streams SettingsUpdateInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SettingsUpdateInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SettingsUpdateInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SettingsUpdateInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SettingsUpdatePage Page of SettingsUpdateInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SettingsUpdatePage { $options = new Values($options); $params = Values::of([ 'Sim' => $options['sim'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SettingsUpdatePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SettingsUpdateInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SettingsUpdatePage Page of SettingsUpdateInstance */ public function getPage(string $targetUrl): SettingsUpdatePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SettingsUpdatePage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.SettingsUpdateList]'; } }PKt[Jaa&Twilio/Rest/Supersim/V1/SimContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Sims/' . \rawurlencode($sid) . ''; } /** * Fetch the SimInstance * * @return SimInstance Fetched SimInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SimInstance { $payload = $this->version->fetch('GET', $this->uri); return new SimInstance($this->version, $payload, $this->solution['sid']); } /** * Update the SimInstance * * @param array|Options $options Optional Arguments * @return SimInstance Updated SimInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SimInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'Status' => $options['status'], 'Fleet' => $options['fleet'], 'CallbackUrl' => $options['callbackUrl'], 'CallbackMethod' => $options['callbackMethod'], 'AccountSid' => $options['accountSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SimInstance($this->version, $payload, $this->solution['sid']); } /** * Access the billingPeriods */ protected function getBillingPeriods(): BillingPeriodList { if (!$this->_billingPeriods) { $this->_billingPeriods = new BillingPeriodList($this->version, $this->solution['sid']); } return $this->_billingPeriods; } /** * Access the simIpAddresses */ protected function getSimIpAddresses(): SimIpAddressList { if (!$this->_simIpAddresses) { $this->_simIpAddresses = new SimIpAddressList($this->version, $this->solution['sid']); } return $this->_simIpAddresses; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.SimContext ' . \implode(' ', $context) . ']'; } }PKt[wYԁ""&Twilio/Rest/Supersim/V1/SimOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['status'] = $status; $this->options['fleet'] = $fleet; $this->options['callbackUrl'] = $callbackUrl; $this->options['callbackMethod'] = $callbackMethod; $this->options['accountSid'] = $accountSid; } /** * An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The new status of the resource. Can be: `ready`, `active`, or `inactive`. See the [Super SIM Status Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values) for more info. * * @param string $status The new status of the Super SIM * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The SID or unique name of the Fleet to which the SIM resource should be assigned. * * @param string $fleet The SID or unique name of the Fleet to which the SIM * resource should be assigned * @return $this Fluent Builder */ public function setFleet(string $fleet): self { $this->options['fleet'] = $fleet; return $this; } /** * The URL we should call using the `callback_method` after an asynchronous update has finished. * * @param string $callbackUrl The URL we should call after the update has * finished * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. * * @param string $callbackMethod The HTTP method we should use to call * callback_url * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * The SID of the Account to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a Subaccount of the requesting Account. Only valid when the Sim resource's status is new. * * @param string $accountSid The SID of the Account to which the Sim resource * should belong * @return $this Fluent Builder */ public function setAccountSid(string $accountSid): self { $this->options['accountSid'] = $accountSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.UpdateSimOptions ' . $options . ']'; } } class ReadSimOptions extends Options { /** * @param string $status The status of the Sim resources to read * @param string $fleet The SID or unique name of the Fleet to which a list of * Sims are assigned * @param string $iccid The ICCID associated with a Super SIM to filter the * list by */ public function __construct(string $status = Values::NONE, string $fleet = Values::NONE, string $iccid = Values::NONE) { $this->options['status'] = $status; $this->options['fleet'] = $fleet; $this->options['iccid'] = $iccid; } /** * The status of the Sim resources to read. Can be `new`, `ready`, `active`, `inactive`, or `scheduled`. * * @param string $status The status of the Sim resources to read * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The SID or unique name of the Fleet to which a list of Sims are assigned. * * @param string $fleet The SID or unique name of the Fleet to which a list of * Sims are assigned * @return $this Fluent Builder */ public function setFleet(string $fleet): self { $this->options['fleet'] = $fleet; return $this; } /** * The [ICCID](https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with a Super SIM to filter the list by. Passing this parameter will always return a list containing zero or one SIMs. * * @param string $iccid The ICCID associated with a Super SIM to filter the * list by * @return $this Fluent Builder */ public function setIccid(string $iccid): self { $this->options['iccid'] = $iccid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.ReadSimOptions ' . $options . ']'; } }PKt[N ZZ,Twilio/Rest/Supersim/V1/IpCommandContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/IpCommands/' . \rawurlencode($sid) . ''; } /** * Fetch the IpCommandInstance * * @return IpCommandInstance Fetched IpCommandInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): IpCommandInstance { $payload = $this->version->fetch('GET', $this->uri); return new IpCommandInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.IpCommandContext ' . \implode(' ', $context) . ']'; } }PKt[Nrr)Twilio/Rest/Supersim/V1/FleetInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'dataEnabled' => Values::array_get($payload, 'data_enabled'), 'dataLimit' => Values::array_get($payload, 'data_limit'), 'dataMetering' => Values::array_get($payload, 'data_metering'), 'smsCommandsEnabled' => Values::array_get($payload, 'sms_commands_enabled'), 'smsCommandsUrl' => Values::array_get($payload, 'sms_commands_url'), 'smsCommandsMethod' => Values::array_get($payload, 'sms_commands_method'), 'networkAccessProfileSid' => Values::array_get($payload, 'network_access_profile_sid'), 'ipCommandsUrl' => Values::array_get($payload, 'ip_commands_url'), 'ipCommandsMethod' => Values::array_get($payload, 'ip_commands_method'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return FleetContext Context for this FleetInstance */ protected function proxy(): FleetContext { if (!$this->context) { $this->context = new FleetContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the FleetInstance * * @return FleetInstance Fetched FleetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FleetInstance { return $this->proxy()->fetch(); } /** * Update the FleetInstance * * @param array|Options $options Optional Arguments * @return FleetInstance Updated FleetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FleetInstance { return $this->proxy()->update($options); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.FleetInstance ' . \implode(' ', $context) . ']'; } }PKt[։+Twilio/Rest/Supersim/V1/EsimProfilePage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return EsimProfileInstance \Twilio\Rest\Supersim\V1\EsimProfileInstance */ public function buildInstance(array $payload): EsimProfileInstance { return new EsimProfileInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.EsimProfilePage]'; } }PKt[#|,Twilio/Rest/Supersim/V1/IpCommandOptions.phpnu[options['payloadType'] = $payloadType; $this->options['callbackUrl'] = $callbackUrl; $this->options['callbackMethod'] = $callbackMethod; } /** * Indicates how the payload is encoded. Either `text` or `binary`. Defaults to `text`. * * @param string $payloadType Indicates how the payload is encoded * @return $this Fluent Builder */ public function setPayloadType(string $payloadType): self { $this->options['payloadType'] = $payloadType; return $this; } /** * The URL we should call using the `callback_method` after we have sent the IP Command. * * @param string $callbackUrl The URL we should call after we have sent the IP * Command * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * The HTTP method we should use to call `callback_url`. Can be `GET` or `POST`, and the default is `POST`. * * @param string $callbackMethod The HTTP method we should use to call * callback_url * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.CreateIpCommandOptions ' . $options . ']'; } } class ReadIpCommandOptions extends Options { /** * @param string $sim The SID or unique name of the Sim resource that IP * Command was sent to or from. * @param string $simIccid The ICCID of the Sim resource that IP Command was * sent to or from. * @param string $status The status of the IP Command * @param string $direction The direction of the IP Command */ public function __construct(string $sim = Values::NONE, string $simIccid = Values::NONE, string $status = Values::NONE, string $direction = Values::NONE) { $this->options['sim'] = $sim; $this->options['simIccid'] = $simIccid; $this->options['status'] = $status; $this->options['direction'] = $direction; } /** * The SID or unique name of the Sim resource that IP Command was sent to or from. * * @param string $sim The SID or unique name of the Sim resource that IP * Command was sent to or from. * @return $this Fluent Builder */ public function setSim(string $sim): self { $this->options['sim'] = $sim; return $this; } /** * The ICCID of the Sim resource that IP Command was sent to or from. * * @param string $simIccid The ICCID of the Sim resource that IP Command was * sent to or from. * @return $this Fluent Builder */ public function setSimIccid(string $simIccid): self { $this->options['simIccid'] = $simIccid; return $this; } /** * The status of the IP Command. Can be: `queued`, `sent`, `received` or `failed`. See the [IP Command Status Values](https://www.twilio.com/docs/wireless/api/ipcommand-resource#status-values) for a description of each. * * @param string $status The status of the IP Command * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The direction of the IP Command. Can be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term `mobile terminated`, and `from_sim` is synonymous with the term `mobile originated`. * * @param string $direction The direction of the IP Command * @return $this Fluent Builder */ public function setDirection(string $direction): self { $this->options['direction'] = $direction; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.ReadIpCommandOptions ' . $options . ']'; } }PKt[=r8Twilio/Rest/Supersim/V1/NetworkAccessProfileInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NetworkAccessProfileContext Context for this * NetworkAccessProfileInstance */ protected function proxy(): NetworkAccessProfileContext { if (!$this->context) { $this->context = new NetworkAccessProfileContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the NetworkAccessProfileInstance * * @return NetworkAccessProfileInstance Fetched NetworkAccessProfileInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NetworkAccessProfileInstance { return $this->proxy()->fetch(); } /** * Update the NetworkAccessProfileInstance * * @param array|Options $options Optional Arguments * @return NetworkAccessProfileInstance Updated NetworkAccessProfileInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): NetworkAccessProfileInstance { return $this->proxy()->update($options); } /** * Access the networks */ protected function getNetworks(): NetworkAccessProfileNetworkList { return $this->proxy()->networks; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.NetworkAccessProfileInstance ' . \implode(' ', $context) . ']'; } }PKt[7Twilio/Rest/Supersim/V1/NetworkAccessProfileOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['networks'] = $networks; } /** * An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * List of Network SIDs that this Network Access Profile will allow connections to. * * @param string[] $networks List of Network SIDs that this Network Access * Profile will allow connections to * @return $this Fluent Builder */ public function setNetworks(array $networks): self { $this->options['networks'] = $networks; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.CreateNetworkAccessProfileOptions ' . $options . ']'; } } class UpdateNetworkAccessProfileOptions extends Options { /** * @param string $uniqueName The new unique name of the resource */ public function __construct(string $uniqueName = Values::NONE) { $this->options['uniqueName'] = $uniqueName; } /** * The new unique name of the Network Access Profile. * * @param string $uniqueName The new unique name of the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.UpdateNetworkAccessProfileOptions ' . $options . ']'; } }PKt[3"04Twilio/Rest/Supersim/V1/Sim/SimIpAddressInstance.phpnu[properties = [ 'ipAddress' => Values::array_get($payload, 'ip_address'), 'ipAddressVersion' => Values::array_get($payload, 'ip_address_version'), ]; $this->solution = ['simSid' => $simSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.SimIpAddressInstance]'; } }PKt[ܪ  5Twilio/Rest/Supersim/V1/Sim/BillingPeriodInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'simSid' => Values::array_get($payload, 'sim_sid'), 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')), 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')), 'periodType' => Values::array_get($payload, 'period_type'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), ]; $this->solution = ['simSid' => $simSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.BillingPeriodInstance]'; } }PKt[?1Twilio/Rest/Supersim/V1/Sim/BillingPeriodPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return BillingPeriodInstance \Twilio\Rest\Supersim\V1\Sim\BillingPeriodInstance */ public function buildInstance(array $payload): BillingPeriodInstance { return new BillingPeriodInstance($this->version, $payload, $this->solution['simSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.BillingPeriodPage]'; } }PKt[R1Twilio/Rest/Supersim/V1/Sim/BillingPeriodList.phpnu[solution = ['simSid' => $simSid, ]; $this->uri = '/Sims/' . \rawurlencode($simSid) . '/BillingPeriods'; } /** * Streams BillingPeriodInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads BillingPeriodInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return BillingPeriodInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of BillingPeriodInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return BillingPeriodPage Page of BillingPeriodInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): BillingPeriodPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new BillingPeriodPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of BillingPeriodInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return BillingPeriodPage Page of BillingPeriodInstance */ public function getPage(string $targetUrl): BillingPeriodPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new BillingPeriodPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.BillingPeriodList]'; } }PKt[,C110Twilio/Rest/Supersim/V1/Sim/SimIpAddressPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SimIpAddressInstance \Twilio\Rest\Supersim\V1\Sim\SimIpAddressInstance */ public function buildInstance(array $payload): SimIpAddressInstance { return new SimIpAddressInstance($this->version, $payload, $this->solution['simSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.SimIpAddressPage]'; } }PKt[\\0Twilio/Rest/Supersim/V1/Sim/SimIpAddressList.phpnu[solution = ['simSid' => $simSid, ]; $this->uri = '/Sims/' . \rawurlencode($simSid) . '/IpAddresses'; } /** * Streams SimIpAddressInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SimIpAddressInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SimIpAddressInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of SimIpAddressInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SimIpAddressPage Page of SimIpAddressInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SimIpAddressPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SimIpAddressPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SimIpAddressInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SimIpAddressPage Page of SimIpAddressInstance */ public function getPage(string $targetUrl): SimIpAddressPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SimIpAddressPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.SimIpAddressList]'; } }PKt[.Ѐ+Twilio/Rest/Supersim/V1/EsimProfileList.phpnu[solution = []; $this->uri = '/ESimProfiles'; } /** * Create the EsimProfileInstance * * @param array|Options $options Optional Arguments * @return EsimProfileInstance Created EsimProfileInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): EsimProfileInstance { $options = new Values($options); $data = Values::of([ 'CallbackUrl' => $options['callbackUrl'], 'CallbackMethod' => $options['callbackMethod'], 'Eid' => $options['eid'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new EsimProfileInstance($this->version, $payload); } /** * Streams EsimProfileInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads EsimProfileInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return EsimProfileInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of EsimProfileInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return EsimProfilePage Page of EsimProfileInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): EsimProfilePage { $options = new Values($options); $params = Values::of([ 'Eid' => $options['eid'], 'SimSid' => $options['simSid'], 'Status' => $options['status'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new EsimProfilePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of EsimProfileInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return EsimProfilePage Page of EsimProfileInstance */ public function getPage(string $targetUrl): EsimProfilePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new EsimProfilePage($this->version, $response, $this->solution); } /** * Constructs a EsimProfileContext * * @param string $sid The SID of the eSIM Profile resource to fetch */ public function getContext(string $sid): EsimProfileContext { return new EsimProfileContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.EsimProfileList]'; } }PKt[JF)Twilio/Rest/Supersim/V1/IpCommandPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return IpCommandInstance \Twilio\Rest\Supersim\V1\IpCommandInstance */ public function buildInstance(array $payload): IpCommandInstance { return new IpCommandInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.IpCommandPage]'; } }PKt[LVV*Twilio/Rest/Supersim/V1/SmsCommandList.phpnu[solution = []; $this->uri = '/SmsCommands'; } /** * Create the SmsCommandInstance * * @param string $sim The sid or unique_name of the SIM to send the SMS Command * to * @param string $payload The message body of the SMS Command * @param array|Options $options Optional Arguments * @return SmsCommandInstance Created SmsCommandInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $sim, string $payload, array $options = []): SmsCommandInstance { $options = new Values($options); $data = Values::of([ 'Sim' => $sim, 'Payload' => $payload, 'CallbackMethod' => $options['callbackMethod'], 'CallbackUrl' => $options['callbackUrl'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new SmsCommandInstance($this->version, $payload); } /** * Streams SmsCommandInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SmsCommandInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SmsCommandInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SmsCommandInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SmsCommandPage Page of SmsCommandInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SmsCommandPage { $options = new Values($options); $params = Values::of([ 'Sim' => $options['sim'], 'Status' => $options['status'], 'Direction' => $options['direction'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SmsCommandPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SmsCommandInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SmsCommandPage Page of SmsCommandInstance */ public function getPage(string $targetUrl): SmsCommandPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SmsCommandPage($this->version, $response, $this->solution); } /** * Constructs a SmsCommandContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): SmsCommandContext { return new SmsCommandContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.SmsCommandList]'; } }PKt[+yTTwilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'networkAccessProfileSid' => Values::array_get($payload, 'network_access_profile_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'isoCountry' => Values::array_get($payload, 'iso_country'), 'identifiers' => Values::array_get($payload, 'identifiers'), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = [ 'networkAccessProfileSid' => $networkAccessProfileSid, 'sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return NetworkAccessProfileNetworkContext Context for this * NetworkAccessProfileNetworkInstance */ protected function proxy(): NetworkAccessProfileNetworkContext { if (!$this->context) { $this->context = new NetworkAccessProfileNetworkContext( $this->version, $this->solution['networkAccessProfileSid'], $this->solution['sid'] ); } return $this->context; } /** * Delete the NetworkAccessProfileNetworkInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Fetch the NetworkAccessProfileNetworkInstance * * @return NetworkAccessProfileNetworkInstance Fetched * NetworkAccessProfileNetworkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NetworkAccessProfileNetworkInstance { return $this->proxy()->fetch(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.NetworkAccessProfileNetworkInstance ' . \implode(' ', $context) . ']'; } }PKt[o STwilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkContext.phpnu[solution = ['networkAccessProfileSid' => $networkAccessProfileSid, 'sid' => $sid, ]; $this->uri = '/NetworkAccessProfiles/' . \rawurlencode($networkAccessProfileSid) . '/Networks/' . \rawurlencode($sid) . ''; } /** * Delete the NetworkAccessProfileNetworkInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Fetch the NetworkAccessProfileNetworkInstance * * @return NetworkAccessProfileNetworkInstance Fetched * NetworkAccessProfileNetworkInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NetworkAccessProfileNetworkInstance { $payload = $this->version->fetch('GET', $this->uri); return new NetworkAccessProfileNetworkInstance( $this->version, $payload, $this->solution['networkAccessProfileSid'], $this->solution['sid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.NetworkAccessProfileNetworkContext ' . \implode(' ', $context) . ']'; } }PKt[hPTwilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkList.phpnu[solution = ['networkAccessProfileSid' => $networkAccessProfileSid, ]; $this->uri = '/NetworkAccessProfiles/' . \rawurlencode($networkAccessProfileSid) . '/Networks'; } /** * Streams NetworkAccessProfileNetworkInstance records from the API as a * generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads NetworkAccessProfileNetworkInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return NetworkAccessProfileNetworkInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of NetworkAccessProfileNetworkInstance records from * the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return NetworkAccessProfileNetworkPage Page of * NetworkAccessProfileNetworkInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): NetworkAccessProfileNetworkPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new NetworkAccessProfileNetworkPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of NetworkAccessProfileNetworkInstance records from * the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return NetworkAccessProfileNetworkPage Page of * NetworkAccessProfileNetworkInstance */ public function getPage(string $targetUrl): NetworkAccessProfileNetworkPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new NetworkAccessProfileNetworkPage($this->version, $response, $this->solution); } /** * Create the NetworkAccessProfileNetworkInstance * * @param string $network The SID that identifies the Network resource * @return NetworkAccessProfileNetworkInstance Created * NetworkAccessProfileNetworkInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $network): NetworkAccessProfileNetworkInstance { $data = Values::of(['Network' => $network, ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new NetworkAccessProfileNetworkInstance( $this->version, $payload, $this->solution['networkAccessProfileSid'] ); } /** * Constructs a NetworkAccessProfileNetworkContext * * @param string $sid The SID of the resource to fetch */ public function getContext(string $sid): NetworkAccessProfileNetworkContext { return new NetworkAccessProfileNetworkContext( $this->version, $this->solution['networkAccessProfileSid'], $sid ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.NetworkAccessProfileNetworkList]'; } }PKt[$PTwilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return NetworkAccessProfileNetworkInstance \Twilio\Rest\Supersim\V1\NetworkAccessProfile\NetworkAccessProfileNetworkInstance */ public function buildInstance(array $payload): NetworkAccessProfileNetworkInstance { return new NetworkAccessProfileNetworkInstance( $this->version, $payload, $this->solution['networkAccessProfileSid'] ); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.NetworkAccessProfileNetworkPage]'; } }PKt[mI *Twilio/Rest/Supersim/V1/NetworkOptions.phpnu[options['isoCountry'] = $isoCountry; $this->options['mcc'] = $mcc; $this->options['mnc'] = $mnc; } /** * The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources to read. * * @param string $isoCountry The ISO country code of the Network resources to * read * @return $this Fluent Builder */ public function setIsoCountry(string $isoCountry): self { $this->options['isoCountry'] = $isoCountry; return $this; } /** * The 'mobile country code' of a country. Network resources with this `mcc` in their `identifiers` will be read. * * @param string $mcc The MCC of Network resource identifiers to be read * @return $this Fluent Builder */ public function setMcc(string $mcc): self { $this->options['mcc'] = $mcc; return $this; } /** * The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read. * * @param string $mnc The MNC of Network resource identifiers to be read * @return $this Fluent Builder */ public function setMnc(string $mnc): self { $this->options['mnc'] = $mnc; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.ReadNetworkOptions ' . $options . ']'; } }PKt[;7Twilio/Rest/Supersim/V1/NetworkAccessProfileContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/NetworkAccessProfiles/' . \rawurlencode($sid) . ''; } /** * Fetch the NetworkAccessProfileInstance * * @return NetworkAccessProfileInstance Fetched NetworkAccessProfileInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): NetworkAccessProfileInstance { $payload = $this->version->fetch('GET', $this->uri); return new NetworkAccessProfileInstance($this->version, $payload, $this->solution['sid']); } /** * Update the NetworkAccessProfileInstance * * @param array|Options $options Optional Arguments * @return NetworkAccessProfileInstance Updated NetworkAccessProfileInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): NetworkAccessProfileInstance { $options = new Values($options); $data = Values::of(['UniqueName' => $options['uniqueName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new NetworkAccessProfileInstance($this->version, $payload, $this->solution['sid']); } /** * Access the networks */ protected function getNetworks(): NetworkAccessProfileNetworkList { if (!$this->_networks) { $this->_networks = new NetworkAccessProfileNetworkList($this->version, $this->solution['sid']); } return $this->_networks; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.NetworkAccessProfileContext ' . \implode(' ', $context) . ']'; } }PKt[C  (Twilio/Rest/Supersim/V1/FleetContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Fleets/' . \rawurlencode($sid) . ''; } /** * Fetch the FleetInstance * * @return FleetInstance Fetched FleetInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): FleetInstance { $payload = $this->version->fetch('GET', $this->uri); return new FleetInstance($this->version, $payload, $this->solution['sid']); } /** * Update the FleetInstance * * @param array|Options $options Optional Arguments * @return FleetInstance Updated FleetInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): FleetInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'NetworkAccessProfile' => $options['networkAccessProfile'], 'IpCommandsUrl' => $options['ipCommandsUrl'], 'IpCommandsMethod' => $options['ipCommandsMethod'], 'SmsCommandsUrl' => $options['smsCommandsUrl'], 'SmsCommandsMethod' => $options['smsCommandsMethod'], 'DataLimit' => $options['dataLimit'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new FleetInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.FleetContext ' . \implode(' ', $context) . ']'; } }PKt[a*Twilio/Rest/Supersim/V1/SmsCommandPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SmsCommandInstance \Twilio\Rest\Supersim\V1\SmsCommandInstance */ public function buildInstance(array $payload): SmsCommandInstance { return new SmsCommandInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.SmsCommandPage]'; } }PKt[>n"JJ1Twilio/Rest/Supersim/V1/SettingsUpdateOptions.phpnu[options['sim'] = $sim; $this->options['status'] = $status; } /** * Filter the Settings Updates by a Super SIM's SID or UniqueName. * * @param string $sim Filter the Settings Updates by Super SIM * @return $this Fluent Builder */ public function setSim(string $sim): self { $this->options['sim'] = $sim; return $this; } /** * Filter the Settings Updates by status. Can be `scheduled`, `in-progress`, `successful`, or `failed`. * * @param string $status Filter the Settings Updates by status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Supersim.V1.ReadSettingsUpdateOptions ' . $options . ']'; } }PKt[l4Twilio/Rest/Supersim/V1/NetworkAccessProfileList.phpnu[solution = []; $this->uri = '/NetworkAccessProfiles'; } /** * Create the NetworkAccessProfileInstance * * @param array|Options $options Optional Arguments * @return NetworkAccessProfileInstance Created NetworkAccessProfileInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): NetworkAccessProfileInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'Networks' => Serialize::map($options['networks'], function($e) { return $e; }), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new NetworkAccessProfileInstance($this->version, $payload); } /** * Streams NetworkAccessProfileInstance records from the API as a generator * stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads NetworkAccessProfileInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return NetworkAccessProfileInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of NetworkAccessProfileInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return NetworkAccessProfilePage Page of NetworkAccessProfileInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): NetworkAccessProfilePage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new NetworkAccessProfilePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of NetworkAccessProfileInstance records from the * API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return NetworkAccessProfilePage Page of NetworkAccessProfileInstance */ public function getPage(string $targetUrl): NetworkAccessProfilePage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new NetworkAccessProfilePage($this->version, $response, $this->solution); } /** * Constructs a NetworkAccessProfileContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): NetworkAccessProfileContext { return new NetworkAccessProfileContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1.NetworkAccessProfileList]'; } }PKt[סOcc-Twilio/Rest/Supersim/V1/SmsCommandContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/SmsCommands/' . \rawurlencode($sid) . ''; } /** * Fetch the SmsCommandInstance * * @return SmsCommandInstance Fetched SmsCommandInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SmsCommandInstance { $payload = $this->version->fetch('GET', $this->uri); return new SmsCommandInstance($this->version, $payload, $this->solution['sid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Supersim.V1.SmsCommandContext ' . \implode(' ', $context) . ']'; } }PKt[f`Twilio/Rest/Supersim/V1.phpnu[version = 'v1'; } protected function getEsimProfiles(): EsimProfileList { if (!$this->_esimProfiles) { $this->_esimProfiles = new EsimProfileList($this); } return $this->_esimProfiles; } protected function getFleets(): FleetList { if (!$this->_fleets) { $this->_fleets = new FleetList($this); } return $this->_fleets; } protected function getIpCommands(): IpCommandList { if (!$this->_ipCommands) { $this->_ipCommands = new IpCommandList($this); } return $this->_ipCommands; } protected function getNetworks(): NetworkList { if (!$this->_networks) { $this->_networks = new NetworkList($this); } return $this->_networks; } protected function getNetworkAccessProfiles(): NetworkAccessProfileList { if (!$this->_networkAccessProfiles) { $this->_networkAccessProfiles = new NetworkAccessProfileList($this); } return $this->_networkAccessProfiles; } protected function getSettingsUpdates(): SettingsUpdateList { if (!$this->_settingsUpdates) { $this->_settingsUpdates = new SettingsUpdateList($this); } return $this->_settingsUpdates; } protected function getSims(): SimList { if (!$this->_sims) { $this->_sims = new SimList($this); } return $this->_sims; } protected function getSmsCommands(): SmsCommandList { if (!$this->_smsCommands) { $this->_smsCommands = new SmsCommandList($this); } return $this->_smsCommands; } protected function getUsageRecords(): UsageRecordList { if (!$this->_usageRecords) { $this->_usageRecords = new UsageRecordList($this); } return $this->_usageRecords; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Supersim.V1]'; } }PKt[0yV Twilio/Rest/Monitor.phpnu[baseUrl = 'https://monitor.twilio.com'; } /** * @return V1 Version v1 of monitor */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getAlerts(): \Twilio\Rest\Monitor\V1\AlertList { return $this->v1->alerts; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextAlerts(string $sid): \Twilio\Rest\Monitor\V1\AlertContext { return $this->v1->alerts($sid); } protected function getEvents(): \Twilio\Rest\Monitor\V1\EventList { return $this->v1->events; } /** * @param string $sid The SID that identifies the resource to fetch */ protected function contextEvents(string $sid): \Twilio\Rest\Monitor\V1\EventContext { return $this->v1->events($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Monitor]'; } }PKt[S< Twilio/Rest/Notify.phpnu[baseUrl = 'https://notify.twilio.com'; } /** * @return V1 Version v1 of notify */ protected function getV1(): V1 { if (!$this->_v1) { $this->_v1 = new V1($this); } return $this->_v1; } /** * Magic getter to lazy load version * * @param string $name Version to return * @return \Twilio\Version The requested version * @throws TwilioException For unknown versions */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown version ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return \Twilio\InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments) { $method = 'context' . \ucfirst($name); if (\method_exists($this, $method)) { return \call_user_func_array([$this, $method], $arguments); } throw new TwilioException('Unknown context ' . $name); } protected function getCredentials(): \Twilio\Rest\Notify\V1\CredentialList { return $this->v1->credentials; } /** * @param string $sid The unique string that identifies the resource */ protected function contextCredentials(string $sid): \Twilio\Rest\Notify\V1\CredentialContext { return $this->v1->credentials($sid); } protected function getServices(): \Twilio\Rest\Notify\V1\ServiceList { return $this->v1->services; } /** * @param string $sid The unique string that identifies the resource */ protected function contextServices(string $sid): \Twilio\Rest\Notify\V1\ServiceContext { return $this->v1->services($sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Notify]'; } }PKt[<Ƨ}}+Twilio/Rest/Wireless/V1/UsageRecordList.phpnu[solution = []; $this->uri = '/UsageRecords'; } /** * Streams UsageRecordInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UsageRecordInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UsageRecordInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of UsageRecordInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UsageRecordPage Page of UsageRecordInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UsageRecordPage { $options = new Values($options); $params = Values::of([ 'End' => Serialize::iso8601DateTime($options['end']), 'Start' => Serialize::iso8601DateTime($options['start']), 'Granularity' => $options['granularity'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UsageRecordPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UsageRecordInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UsageRecordPage Page of UsageRecordInstance */ public function getPage(string $targetUrl): UsageRecordPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UsageRecordPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.UsageRecordList]'; } }PKt[m$ .Twilio/Rest/Wireless/V1/UsageRecordOptions.phpnu[options['end'] = $end; $this->options['start'] = $start; $this->options['granularity'] = $granularity; } /** * Only include usage that has occurred on or before this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). * * @param \DateTime $end Only include usage that has occurred on or before this * date * @return $this Fluent Builder */ public function setEnd(\DateTime $end): self { $this->options['end'] = $end; return $this; } /** * Only include usage that has occurred on or after this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). * * @param \DateTime $start Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStart(\DateTime $start): self { $this->options['start'] = $start; return $this; } /** * How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. * * @param string $granularity The time-based grouping that results are * aggregated by * @return $this Fluent Builder */ public function setGranularity(string $granularity): self { $this->options['granularity'] = $granularity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Wireless.V1.ReadUsageRecordOptions ' . $options . ']'; } }PKt[vڧgg#Twilio/Rest/Wireless/V1/SimPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return SimInstance \Twilio\Rest\Wireless\V1\SimInstance */ public function buildInstance(array $payload): SimInstance { return new SimInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.SimPage]'; } }PKt[R'Twilio/Rest/Wireless/V1/CommandList.phpnu[solution = []; $this->uri = '/Commands'; } /** * Streams CommandInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads CommandInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return CommandInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of CommandInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return CommandPage Page of CommandInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): CommandPage { $options = new Values($options); $params = Values::of([ 'Sim' => $options['sim'], 'Status' => $options['status'], 'Direction' => $options['direction'], 'Transport' => $options['transport'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new CommandPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of CommandInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return CommandPage Page of CommandInstance */ public function getPage(string $targetUrl): CommandPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new CommandPage($this->version, $response, $this->solution); } /** * Create the CommandInstance * * @param string $command The message body of the Command or a Base64 encoded * byte string in binary mode * @param array|Options $options Optional Arguments * @return CommandInstance Created CommandInstance * @throws TwilioException When an HTTP error occurs. */ public function create(string $command, array $options = []): CommandInstance { $options = new Values($options); $data = Values::of([ 'Command' => $command, 'Sim' => $options['sim'], 'CallbackMethod' => $options['callbackMethod'], 'CallbackUrl' => $options['callbackUrl'], 'CommandMode' => $options['commandMode'], 'IncludeSid' => $options['includeSid'], 'DeliveryReceiptRequested' => Serialize::booleanToString($options['deliveryReceiptRequested']), ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new CommandInstance($this->version, $payload); } /** * Constructs a CommandContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): CommandContext { return new CommandContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.CommandList]'; } }PKt[5<*Twilio/Rest/Wireless/V1/CommandContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Commands/' . \rawurlencode($sid) . ''; } /** * Fetch the CommandInstance * * @return CommandInstance Fetched CommandInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CommandInstance { $payload = $this->version->fetch('GET', $this->uri); return new CommandInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the CommandInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Wireless.V1.CommandContext ' . \implode(' ', $context) . ']'; } }PKt[:,Twilio/Rest/Wireless/V1/RatePlanInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dataEnabled' => Values::array_get($payload, 'data_enabled'), 'dataMetering' => Values::array_get($payload, 'data_metering'), 'dataLimit' => Values::array_get($payload, 'data_limit'), 'messagingEnabled' => Values::array_get($payload, 'messaging_enabled'), 'voiceEnabled' => Values::array_get($payload, 'voice_enabled'), 'nationalRoamingEnabled' => Values::array_get($payload, 'national_roaming_enabled'), 'nationalRoamingDataLimit' => Values::array_get($payload, 'national_roaming_data_limit'), 'internationalRoaming' => Values::array_get($payload, 'international_roaming'), 'internationalRoamingDataLimit' => Values::array_get($payload, 'international_roaming_data_limit'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return RatePlanContext Context for this RatePlanInstance */ protected function proxy(): RatePlanContext { if (!$this->context) { $this->context = new RatePlanContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the RatePlanInstance * * @return RatePlanInstance Fetched RatePlanInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RatePlanInstance { return $this->proxy()->fetch(); } /** * Update the RatePlanInstance * * @param array|Options $options Optional Arguments * @return RatePlanInstance Updated RatePlanInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): RatePlanInstance { return $this->proxy()->update($options); } /** * Delete the RatePlanInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Wireless.V1.RatePlanInstance ' . \implode(' ', $context) . ']'; } }PKt[sf_uu/Twilio/Rest/Wireless/V1/UsageRecordInstance.phpnu[properties = [ 'accountSid' => Values::array_get($payload, 'account_sid'), 'period' => Values::array_get($payload, 'period'), 'commands' => Values::array_get($payload, 'commands'), 'data' => Values::array_get($payload, 'data'), ]; $this->solution = []; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.UsageRecordInstance]'; } }PKt[,#Twilio/Rest/Wireless/V1/SimList.phpnu[solution = []; $this->uri = '/Sims'; } /** * Streams SimInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads SimInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return SimInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of SimInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return SimPage Page of SimInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): SimPage { $options = new Values($options); $params = Values::of([ 'Status' => $options['status'], 'Iccid' => $options['iccid'], 'RatePlan' => $options['ratePlan'], 'EId' => $options['eId'], 'SimRegistrationCode' => $options['simRegistrationCode'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new SimPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of SimInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return SimPage Page of SimInstance */ public function getPage(string $targetUrl): SimPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new SimPage($this->version, $response, $this->solution); } /** * Constructs a SimContext * * @param string $sid The SID of the Sim resource to fetch */ public function getContext(string $sid): SimContext { return new SimContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.SimList]'; } }PKt['Twilio/Rest/Wireless/V1/CommandPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return CommandInstance \Twilio\Rest\Wireless\V1\CommandInstance */ public function buildInstance(array $payload): CommandInstance { return new CommandInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.CommandPage]'; } }PKt[õ+Twilio/Rest/Wireless/V1/CommandInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'simSid' => Values::array_get($payload, 'sim_sid'), 'command' => Values::array_get($payload, 'command'), 'commandMode' => Values::array_get($payload, 'command_mode'), 'transport' => Values::array_get($payload, 'transport'), 'deliveryReceiptRequested' => Values::array_get($payload, 'delivery_receipt_requested'), 'status' => Values::array_get($payload, 'status'), 'direction' => Values::array_get($payload, 'direction'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return CommandContext Context for this CommandInstance */ protected function proxy(): CommandContext { if (!$this->context) { $this->context = new CommandContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the CommandInstance * * @return CommandInstance Fetched CommandInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): CommandInstance { return $this->proxy()->fetch(); } /** * Delete the CommandInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Wireless.V1.CommandInstance ' . \implode(' ', $context) . ']'; } }PKt[=,,'Twilio/Rest/Wireless/V1/SimInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'ratePlanSid' => Values::array_get($payload, 'rate_plan_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'iccid' => Values::array_get($payload, 'iccid'), 'eId' => Values::array_get($payload, 'e_id'), 'status' => Values::array_get($payload, 'status'), 'resetStatus' => Values::array_get($payload, 'reset_status'), 'commandsCallbackUrl' => Values::array_get($payload, 'commands_callback_url'), 'commandsCallbackMethod' => Values::array_get($payload, 'commands_callback_method'), 'smsFallbackMethod' => Values::array_get($payload, 'sms_fallback_method'), 'smsFallbackUrl' => Values::array_get($payload, 'sms_fallback_url'), 'smsMethod' => Values::array_get($payload, 'sms_method'), 'smsUrl' => Values::array_get($payload, 'sms_url'), 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'), 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'), 'voiceMethod' => Values::array_get($payload, 'voice_method'), 'voiceUrl' => Values::array_get($payload, 'voice_url'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), 'links' => Values::array_get($payload, 'links'), 'ipAddress' => Values::array_get($payload, 'ip_address'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return SimContext Context for this SimInstance */ protected function proxy(): SimContext { if (!$this->context) { $this->context = new SimContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the SimInstance * * @return SimInstance Fetched SimInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SimInstance { return $this->proxy()->fetch(); } /** * Update the SimInstance * * @param array|Options $options Optional Arguments * @return SimInstance Updated SimInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SimInstance { return $this->proxy()->update($options); } /** * Delete the SimInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->proxy()->delete(); } /** * Access the usageRecords */ protected function getUsageRecords(): UsageRecordList { return $this->proxy()->usageRecords; } /** * Access the dataSessions */ protected function getDataSessions(): DataSessionList { return $this->proxy()->dataSessions; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Wireless.V1.SimInstance ' . \implode(' ', $context) . ']'; } }PKt[+Twilio/Rest/Wireless/V1/UsageRecordPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UsageRecordInstance \Twilio\Rest\Wireless\V1\UsageRecordInstance */ public function buildInstance(array $payload): UsageRecordInstance { return new UsageRecordInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.UsageRecordPage]'; } }PKt[ۿ +Twilio/Rest/Wireless/V1/RatePlanContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/RatePlans/' . \rawurlencode($sid) . ''; } /** * Fetch the RatePlanInstance * * @return RatePlanInstance Fetched RatePlanInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): RatePlanInstance { $payload = $this->version->fetch('GET', $this->uri); return new RatePlanInstance($this->version, $payload, $this->solution['sid']); } /** * Update the RatePlanInstance * * @param array|Options $options Optional Arguments * @return RatePlanInstance Updated RatePlanInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): RatePlanInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'FriendlyName' => $options['friendlyName'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new RatePlanInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the RatePlanInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Wireless.V1.RatePlanContext ' . \implode(' ', $context) . ']'; } }PKt[D7鋧&Twilio/Rest/Wireless/V1/SimContext.phpnu[solution = ['sid' => $sid, ]; $this->uri = '/Sims/' . \rawurlencode($sid) . ''; } /** * Fetch the SimInstance * * @return SimInstance Fetched SimInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): SimInstance { $payload = $this->version->fetch('GET', $this->uri); return new SimInstance($this->version, $payload, $this->solution['sid']); } /** * Update the SimInstance * * @param array|Options $options Optional Arguments * @return SimInstance Updated SimInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): SimInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'CallbackMethod' => $options['callbackMethod'], 'CallbackUrl' => $options['callbackUrl'], 'FriendlyName' => $options['friendlyName'], 'RatePlan' => $options['ratePlan'], 'Status' => $options['status'], 'CommandsCallbackMethod' => $options['commandsCallbackMethod'], 'CommandsCallbackUrl' => $options['commandsCallbackUrl'], 'SmsFallbackMethod' => $options['smsFallbackMethod'], 'SmsFallbackUrl' => $options['smsFallbackUrl'], 'SmsMethod' => $options['smsMethod'], 'SmsUrl' => $options['smsUrl'], 'VoiceFallbackMethod' => $options['voiceFallbackMethod'], 'VoiceFallbackUrl' => $options['voiceFallbackUrl'], 'VoiceMethod' => $options['voiceMethod'], 'VoiceUrl' => $options['voiceUrl'], 'ResetStatus' => $options['resetStatus'], 'AccountSid' => $options['accountSid'], ]); $payload = $this->version->update('POST', $this->uri, [], $data); return new SimInstance($this->version, $payload, $this->solution['sid']); } /** * Delete the SimInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this->version->delete('DELETE', $this->uri); } /** * Access the usageRecords */ protected function getUsageRecords(): UsageRecordList { if (!$this->_usageRecords) { $this->_usageRecords = new UsageRecordList($this->version, $this->solution['sid']); } return $this->_usageRecords; } /** * Access the dataSessions */ protected function getDataSessions(): DataSessionList { if (!$this->_dataSessions) { $this->_dataSessions = new DataSessionList($this->version, $this->solution['sid']); } return $this->_dataSessions; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return ListResource The requested subresource * @throws TwilioException For unknown subresources */ public function __get(string $name): ListResource { if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown subresource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $context = []; foreach ($this->solution as $key => $value) { $context[] = "$key=$value"; } return '[Twilio.Wireless.V1.SimContext ' . \implode(' ', $context) . ']'; } }PKt[?dLL&Twilio/Rest/Wireless/V1/SimOptions.phpnu[options['status'] = $status; $this->options['iccid'] = $iccid; $this->options['ratePlan'] = $ratePlan; $this->options['eId'] = $eId; $this->options['simRegistrationCode'] = $simRegistrationCode; } /** * Only return Sim resources with this status. * * @param string $status Only return Sim resources with this status * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Only return Sim resources with this ICCID. This will return a list with a maximum size of 1. * * @param string $iccid Only return Sim resources with this ICCID * @return $this Fluent Builder */ public function setIccid(string $iccid): self { $this->options['iccid'] = $iccid; return $this; } /** * The SID or unique name of a [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource). Only return Sim resources assigned to this RatePlan resource. * * @param string $ratePlan Only return Sim resources assigned to this RatePlan * resource * @return $this Fluent Builder */ public function setRatePlan(string $ratePlan): self { $this->options['ratePlan'] = $ratePlan; return $this; } /** * Deprecated. * * @param string $eId Deprecated * @return $this Fluent Builder */ public function setEId(string $eId): self { $this->options['eId'] = $eId; return $this; } /** * Only return Sim resources with this registration code. This will return a list with a maximum size of 1. * * @param string $simRegistrationCode Only return Sim resources with this * registration code * @return $this Fluent Builder */ public function setSimRegistrationCode(string $simRegistrationCode): self { $this->options['simRegistrationCode'] = $simRegistrationCode; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Wireless.V1.ReadSimOptions ' . $options . ']'; } } class UpdateSimOptions extends Options { /** * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param string $callbackMethod The HTTP method we should use to call * callback_url * @param string $callbackUrl The URL we should call when the Sim resource has * finished updating * @param string $friendlyName A string to describe the Sim resource * @param string $ratePlan The SID or unique name of the RatePlan resource to * which the Sim resource should be assigned * @param string $status The new status of the Sim resource * @param string $commandsCallbackMethod The HTTP method we should use to call * commands_callback_url * @param string $commandsCallbackUrl The URL we should call when the SIM sends * a Command * @param string $smsFallbackMethod The HTTP method we should use to call * sms_fallback_url * @param string $smsFallbackUrl The URL we should call when an error occurs * while retrieving or executing the TwiML * requested from sms_url * @param string $smsMethod The HTTP method we should use to call sms_url * @param string $smsUrl The URL we should call when the SIM-connected device * sends an SMS message that is not a Command * @param string $voiceFallbackMethod Deprecated * @param string $voiceFallbackUrl Deprecated * @param string $voiceMethod Deprecated * @param string $voiceUrl Deprecated * @param string $resetStatus Initiate a connectivity reset on a SIM * @param string $accountSid The SID of the Account to which the Sim resource * should belong */ public function __construct(string $uniqueName = Values::NONE, string $callbackMethod = Values::NONE, string $callbackUrl = Values::NONE, string $friendlyName = Values::NONE, string $ratePlan = Values::NONE, string $status = Values::NONE, string $commandsCallbackMethod = Values::NONE, string $commandsCallbackUrl = Values::NONE, string $smsFallbackMethod = Values::NONE, string $smsFallbackUrl = Values::NONE, string $smsMethod = Values::NONE, string $smsUrl = Values::NONE, string $voiceFallbackMethod = Values::NONE, string $voiceFallbackUrl = Values::NONE, string $voiceMethod = Values::NONE, string $voiceUrl = Values::NONE, string $resetStatus = Values::NONE, string $accountSid = Values::NONE) { $this->options['uniqueName'] = $uniqueName; $this->options['callbackMethod'] = $callbackMethod; $this->options['callbackUrl'] = $callbackUrl; $this->options['friendlyName'] = $friendlyName; $this->options['ratePlan'] = $ratePlan; $this->options['status'] = $status; $this->options['commandsCallbackMethod'] = $commandsCallbackMethod; $this->options['commandsCallbackUrl'] = $commandsCallbackUrl; $this->options['smsFallbackMethod'] = $smsFallbackMethod; $this->options['smsFallbackUrl'] = $smsFallbackUrl; $this->options['smsMethod'] = $smsMethod; $this->options['smsUrl'] = $smsUrl; $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; $this->options['voiceMethod'] = $voiceMethod; $this->options['voiceUrl'] = $voiceUrl; $this->options['resetStatus'] = $resetStatus; $this->options['accountSid'] = $accountSid; } /** * An application-defined string that uniquely identifies the resource. It can be used in place of the `sid` in the URL path to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The HTTP method we should use to call `callback_url`. Can be: `POST` or `GET`. The default is `POST`. * * @param string $callbackMethod The HTTP method we should use to call * callback_url * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * The URL we should call using the `callback_url` when the SIM has finished updating. When the SIM transitions from `new` to `ready` or from any status to `deactivated`, we call this URL when the status changes to an intermediate status (`ready` or `deactivated`) and again when the status changes to its final status (`active` or `canceled`). * * @param string $callbackUrl The URL we should call when the Sim resource has * finished updating * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * A descriptive string that you create to describe the Sim resource. It does not need to be unique. * * @param string $friendlyName A string to describe the Sim resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The SID or unique name of the [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource) to which the Sim resource should be assigned. * * @param string $ratePlan The SID or unique name of the RatePlan resource to * which the Sim resource should be assigned * @return $this Fluent Builder */ public function setRatePlan(string $ratePlan): self { $this->options['ratePlan'] = $ratePlan; return $this; } /** * The new status of the Sim resource. Can be: `ready`, `active`, `suspended`, or `deactivated`. * * @param string $status The new status of the Sim resource * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * The HTTP method we should use to call `commands_callback_url`. Can be: `POST` or `GET`. The default is `POST`. * * @param string $commandsCallbackMethod The HTTP method we should use to call * commands_callback_url * @return $this Fluent Builder */ public function setCommandsCallbackMethod(string $commandsCallbackMethod): self { $this->options['commandsCallbackMethod'] = $commandsCallbackMethod; return $this; } /** * The URL we should call using the `commands_callback_method` when the SIM sends a [Command](https://www.twilio.com/docs/wireless/api/command-resource). Your server should respond with an HTTP status code in the 200 range; any response body is ignored. * * @param string $commandsCallbackUrl The URL we should call when the SIM sends * a Command * @return $this Fluent Builder */ public function setCommandsCallbackUrl(string $commandsCallbackUrl): self { $this->options['commandsCallbackUrl'] = $commandsCallbackUrl; return $this; } /** * The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. Default is `POST`. * * @param string $smsFallbackMethod The HTTP method we should use to call * sms_fallback_url * @return $this Fluent Builder */ public function setSmsFallbackMethod(string $smsFallbackMethod): self { $this->options['smsFallbackMethod'] = $smsFallbackMethod; return $this; } /** * The URL we should call using the `sms_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `sms_url`. * * @param string $smsFallbackUrl The URL we should call when an error occurs * while retrieving or executing the TwiML * requested from sms_url * @return $this Fluent Builder */ public function setSmsFallbackUrl(string $smsFallbackUrl): self { $this->options['smsFallbackUrl'] = $smsFallbackUrl; return $this; } /** * The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. Default is `POST`. * * @param string $smsMethod The HTTP method we should use to call sms_url * @return $this Fluent Builder */ public function setSmsMethod(string $smsMethod): self { $this->options['smsMethod'] = $smsMethod; return $this; } /** * The URL we should call using the `sms_method` when the SIM-connected device sends an SMS message that is not a [Command](https://www.twilio.com/docs/wireless/api/command-resource). * * @param string $smsUrl The URL we should call when the SIM-connected device * sends an SMS message that is not a Command * @return $this Fluent Builder */ public function setSmsUrl(string $smsUrl): self { $this->options['smsUrl'] = $smsUrl; return $this; } /** * Deprecated. * * @param string $voiceFallbackMethod Deprecated * @return $this Fluent Builder */ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self { $this->options['voiceFallbackMethod'] = $voiceFallbackMethod; return $this; } /** * Deprecated. * * @param string $voiceFallbackUrl Deprecated * @return $this Fluent Builder */ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self { $this->options['voiceFallbackUrl'] = $voiceFallbackUrl; return $this; } /** * Deprecated. * * @param string $voiceMethod Deprecated * @return $this Fluent Builder */ public function setVoiceMethod(string $voiceMethod): self { $this->options['voiceMethod'] = $voiceMethod; return $this; } /** * Deprecated. * * @param string $voiceUrl Deprecated * @return $this Fluent Builder */ public function setVoiceUrl(string $voiceUrl): self { $this->options['voiceUrl'] = $voiceUrl; return $this; } /** * Initiate a connectivity reset on the SIM. Set to `resetting` to initiate a connectivity reset on the SIM. No other value is valid. * * @param string $resetStatus Initiate a connectivity reset on a SIM * @return $this Fluent Builder */ public function setResetStatus(string $resetStatus): self { $this->options['resetStatus'] = $resetStatus; return $this; } /** * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a [Subaccount](https://www.twilio.com/docs/iam/api/subaccounts) of the requesting Account. Only valid when the Sim resource's status is `new`. For more information, see the [Move SIMs between Subaccounts documentation](https://www.twilio.com/docs/wireless/api/sim-resource#move-sims-between-subaccounts). * * @param string $accountSid The SID of the Account to which the Sim resource * should belong * @return $this Fluent Builder */ public function setAccountSid(string $accountSid): self { $this->options['accountSid'] = $accountSid; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Wireless.V1.UpdateSimOptions ' . $options . ']'; } }PKt[` (Twilio/Rest/Wireless/V1/RatePlanList.phpnu[solution = []; $this->uri = '/RatePlans'; } /** * Streams RatePlanInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads RatePlanInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return RatePlanInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of RatePlanInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return RatePlanPage Page of RatePlanInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): RatePlanPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new RatePlanPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of RatePlanInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return RatePlanPage Page of RatePlanInstance */ public function getPage(string $targetUrl): RatePlanPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new RatePlanPage($this->version, $response, $this->solution); } /** * Create the RatePlanInstance * * @param array|Options $options Optional Arguments * @return RatePlanInstance Created RatePlanInstance * @throws TwilioException When an HTTP error occurs. */ public function create(array $options = []): RatePlanInstance { $options = new Values($options); $data = Values::of([ 'UniqueName' => $options['uniqueName'], 'FriendlyName' => $options['friendlyName'], 'DataEnabled' => Serialize::booleanToString($options['dataEnabled']), 'DataLimit' => $options['dataLimit'], 'DataMetering' => $options['dataMetering'], 'MessagingEnabled' => Serialize::booleanToString($options['messagingEnabled']), 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']), 'NationalRoamingEnabled' => Serialize::booleanToString($options['nationalRoamingEnabled']), 'InternationalRoaming' => Serialize::map($options['internationalRoaming'], function($e) { return $e; }), 'NationalRoamingDataLimit' => $options['nationalRoamingDataLimit'], 'InternationalRoamingDataLimit' => $options['internationalRoamingDataLimit'], ]); $payload = $this->version->create('POST', $this->uri, [], $data); return new RatePlanInstance($this->version, $payload); } /** * Constructs a RatePlanContext * * @param string $sid The SID that identifies the resource to fetch */ public function getContext(string $sid): RatePlanContext { return new RatePlanContext($this->version, $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.RatePlanList]'; } }PKt[Džn((Twilio/Rest/Wireless/V1/RatePlanPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return RatePlanInstance \Twilio\Rest\Wireless\V1\RatePlanInstance */ public function buildInstance(array $payload): RatePlanInstance { return new RatePlanInstance($this->version, $payload); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.RatePlanPage]'; } }PKt[=7=9=9+Twilio/Rest/Wireless/V1/RatePlanOptions.phpnu[options['uniqueName'] = $uniqueName; $this->options['friendlyName'] = $friendlyName; $this->options['dataEnabled'] = $dataEnabled; $this->options['dataLimit'] = $dataLimit; $this->options['dataMetering'] = $dataMetering; $this->options['messagingEnabled'] = $messagingEnabled; $this->options['voiceEnabled'] = $voiceEnabled; $this->options['nationalRoamingEnabled'] = $nationalRoamingEnabled; $this->options['internationalRoaming'] = $internationalRoaming; $this->options['nationalRoamingDataLimit'] = $nationalRoamingDataLimit; $this->options['internationalRoamingDataLimit'] = $internationalRoamingDataLimit; } /** * An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * A descriptive string that you create to describe the resource. It does not have to be unique. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Whether SIMs can use GPRS/3G/4G/LTE data connectivity. * * @param bool $dataEnabled Whether SIMs can use GPRS/3G/4G/LTE data * connectivity * @return $this Fluent Builder */ public function setDataEnabled(bool $dataEnabled): self { $this->options['dataEnabled'] = $dataEnabled; return $this; } /** * The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB and the default value is `1000`. * * @param int $dataLimit The total data usage in Megabytes that the Network * allows during one month on the home network * @return $this Fluent Builder */ public function setDataLimit(int $dataLimit): self { $this->options['dataLimit'] = $dataLimit; return $this; } /** * The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/wireless/api/rateplan-resource#payg-vs-quota-data-plans). * * @param string $dataMetering The model used to meter data usage * @return $this Fluent Builder */ public function setDataMetering(string $dataMetering): self { $this->options['dataMetering'] = $dataMetering; return $this; } /** * Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/wireless/api/command-resource). * * @param bool $messagingEnabled Whether SIMs can make, send, and receive SMS * using Commands * @return $this Fluent Builder */ public function setMessagingEnabled(bool $messagingEnabled): self { $this->options['messagingEnabled'] = $messagingEnabled; return $this; } /** * Deprecated. * * @param bool $voiceEnabled Deprecated * @return $this Fluent Builder */ public function setVoiceEnabled(bool $voiceEnabled): self { $this->options['voiceEnabled'] = $voiceEnabled; return $this; } /** * Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming). * * @param bool $nationalRoamingEnabled Whether SIMs can roam on networks other * than the home network in the United * States * @return $this Fluent Builder */ public function setNationalRoamingEnabled(bool $nationalRoamingEnabled): self { $this->options['nationalRoamingEnabled'] = $nationalRoamingEnabled; return $this; } /** * The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can contain: `data` and `messaging`. * * @param string[] $internationalRoaming The services that SIMs capable of * using GPRS/3G/4G/LTE data connectivity * can use outside of the United States * @return $this Fluent Builder */ public function setInternationalRoaming(array $internationalRoaming): self { $this->options['internationalRoaming'] = $internationalRoaming; return $this; } /** * The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming) for more info. * * @param int $nationalRoamingDataLimit The total data usage in Megabytes that * the Network allows during one month on * non-home networks in the United States * @return $this Fluent Builder */ public function setNationalRoamingDataLimit(int $nationalRoamingDataLimit): self { $this->options['nationalRoamingDataLimit'] = $nationalRoamingDataLimit; return $this; } /** * The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB. * * @param int $internationalRoamingDataLimit The total data usage (download and * upload combined) in Megabytes that * the Network allows during one * month when roaming outside the * United States * @return $this Fluent Builder */ public function setInternationalRoamingDataLimit(int $internationalRoamingDataLimit): self { $this->options['internationalRoamingDataLimit'] = $internationalRoamingDataLimit; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Wireless.V1.CreateRatePlanOptions ' . $options . ']'; } } class UpdateRatePlanOptions extends Options { /** * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @param string $friendlyName A string to describe the resource */ public function __construct(string $uniqueName = Values::NONE, string $friendlyName = Values::NONE) { $this->options['uniqueName'] = $uniqueName; $this->options['friendlyName'] = $friendlyName; } /** * An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. * * @param string $uniqueName An application-defined string that uniquely * identifies the resource * @return $this Fluent Builder */ public function setUniqueName(string $uniqueName): self { $this->options['uniqueName'] = $uniqueName; return $this; } /** * A descriptive string that you create to describe the resource. It does not have to be unique. * * @param string $friendlyName A string to describe the resource * @return $this Fluent Builder */ public function setFriendlyName(string $friendlyName): self { $this->options['friendlyName'] = $friendlyName; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Wireless.V1.UpdateRatePlanOptions ' . $options . ']'; } }PKt[fT>>/Twilio/Rest/Wireless/V1/Sim/UsageRecordList.phpnu[solution = ['simSid' => $simSid, ]; $this->uri = '/Sims/' . \rawurlencode($simSid) . '/UsageRecords'; } /** * Streams UsageRecordInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($options, $limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads UsageRecordInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param array|Options $options Optional Arguments * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return UsageRecordInstance[] Array of results */ public function read(array $options = [], int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($options, $limit, $pageSize), false); } /** * Retrieve a single page of UsageRecordInstance records from the API. * Request is executed immediately * * @param array|Options $options Optional Arguments * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return UsageRecordPage Page of UsageRecordInstance */ public function page(array $options = [], $pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): UsageRecordPage { $options = new Values($options); $params = Values::of([ 'End' => Serialize::iso8601DateTime($options['end']), 'Start' => Serialize::iso8601DateTime($options['start']), 'Granularity' => $options['granularity'], 'PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new UsageRecordPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of UsageRecordInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return UsageRecordPage Page of UsageRecordInstance */ public function getPage(string $targetUrl): UsageRecordPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new UsageRecordPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.UsageRecordList]'; } }PKt[=,  2Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.phpnu[options['end'] = $end; $this->options['start'] = $start; $this->options['granularity'] = $granularity; } /** * Only include usage that occurred on or before this date, specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). The default is the current time. * * @param \DateTime $end Only include usage that occurred on or before this date * @return $this Fluent Builder */ public function setEnd(\DateTime $end): self { $this->options['end'] = $end; return $this; } /** * Only include usage that has occurred on or after this date, specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). The default is one month before the `end` parameter value. * * @param \DateTime $start Only include usage that has occurred on or after * this date * @return $this Fluent Builder */ public function setStart(\DateTime $start): self { $this->options['start'] = $start; return $this; } /** * How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. The default is `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. * * @param string $granularity The time-based grouping that results are * aggregated by * @return $this Fluent Builder */ public function setGranularity(string $granularity): self { $this->options['granularity'] = $granularity; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Wireless.V1.ReadUsageRecordOptions ' . $options . ']'; } }PKt[Inn3Twilio/Rest/Wireless/V1/Sim/UsageRecordInstance.phpnu[properties = [ 'simSid' => Values::array_get($payload, 'sim_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'period' => Values::array_get($payload, 'period'), 'commands' => Values::array_get($payload, 'commands'), 'data' => Values::array_get($payload, 'data'), ]; $this->solution = ['simSid' => $simSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.UsageRecordInstance]'; } }PKt[͵/Twilio/Rest/Wireless/V1/Sim/UsageRecordPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return UsageRecordInstance \Twilio\Rest\Wireless\V1\Sim\UsageRecordInstance */ public function buildInstance(array $payload): UsageRecordInstance { return new UsageRecordInstance($this->version, $payload, $this->solution['simSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.UsageRecordPage]'; } }PKt[tdq q 3Twilio/Rest/Wireless/V1/Sim/DataSessionInstance.phpnu[properties = [ 'sid' => Values::array_get($payload, 'sid'), 'simSid' => Values::array_get($payload, 'sim_sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'radioLink' => Values::array_get($payload, 'radio_link'), 'operatorMcc' => Values::array_get($payload, 'operator_mcc'), 'operatorMnc' => Values::array_get($payload, 'operator_mnc'), 'operatorCountry' => Values::array_get($payload, 'operator_country'), 'operatorName' => Values::array_get($payload, 'operator_name'), 'cellId' => Values::array_get($payload, 'cell_id'), 'cellLocationEstimate' => Values::array_get($payload, 'cell_location_estimate'), 'packetsUploaded' => Values::array_get($payload, 'packets_uploaded'), 'packetsDownloaded' => Values::array_get($payload, 'packets_downloaded'), 'lastUpdated' => Deserialize::dateTime(Values::array_get($payload, 'last_updated')), 'start' => Deserialize::dateTime(Values::array_get($payload, 'start')), 'end' => Deserialize::dateTime(Values::array_get($payload, 'end')), 'imei' => Values::array_get($payload, 'imei'), ]; $this->solution = ['simSid' => $simSid, ]; } /** * Magic getter to access properties * * @param string $name Property to access * @return mixed The requested property * @throws TwilioException For unknown properties */ public function __get(string $name) { if (\array_key_exists($name, $this->properties)) { return $this->properties[$name]; } if (\property_exists($this, '_' . $name)) { $method = 'get' . \ucfirst($name); return $this->$method(); } throw new TwilioException('Unknown property: ' . $name); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.DataSessionInstance]'; } }PKt[0/Twilio/Rest/Wireless/V1/Sim/DataSessionPage.phpnu[solution = $solution; } /** * @param array $payload Payload response from the API * @return DataSessionInstance \Twilio\Rest\Wireless\V1\Sim\DataSessionInstance */ public function buildInstance(array $payload): DataSessionInstance { return new DataSessionInstance($this->version, $payload, $this->solution['simSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.DataSessionPage]'; } }PKt[/Twilio/Rest/Wireless/V1/Sim/DataSessionList.phpnu[solution = ['simSid' => $simSid, ]; $this->uri = '/Sims/' . \rawurlencode($simSid) . '/DataSessions'; } /** * Streams DataSessionInstance records from the API as a generator stream. * This operation lazily loads records as efficiently as possible until the * limit * is reached. * The results are returned as a generator, so this operation is memory * efficient. * * @param int $limit Upper limit for the number of records to return. stream() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, stream() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return Stream stream of results */ public function stream(int $limit = null, $pageSize = null): Stream { $limits = $this->version->readLimits($limit, $pageSize); $page = $this->page($limits['pageSize']); return $this->version->stream($page, $limits['limit'], $limits['pageLimit']); } /** * Reads DataSessionInstance records from the API as a list. * Unlike stream(), this operation is eager and will load `limit` records into * memory before returning. * * @param int $limit Upper limit for the number of records to return. read() * guarantees to never return more than limit. Default is no * limit * @param mixed $pageSize Number of records to fetch per request, when not set * will use the default value of 50 records. If no * page_size is defined but a limit is defined, read() * will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) * @return DataSessionInstance[] Array of results */ public function read(int $limit = null, $pageSize = null): array { return \iterator_to_array($this->stream($limit, $pageSize), false); } /** * Retrieve a single page of DataSessionInstance records from the API. * Request is executed immediately * * @param mixed $pageSize Number of records to return, defaults to 50 * @param string $pageToken PageToken provided by the API * @param mixed $pageNumber Page Number, this value is simply for client state * @return DataSessionPage Page of DataSessionInstance */ public function page($pageSize = Values::NONE, string $pageToken = Values::NONE, $pageNumber = Values::NONE): DataSessionPage { $params = Values::of(['PageToken' => $pageToken, 'Page' => $pageNumber, 'PageSize' => $pageSize, ]); $response = $this->version->page('GET', $this->uri, $params); return new DataSessionPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of DataSessionInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return DataSessionPage Page of DataSessionInstance */ public function getPage(string $targetUrl): DataSessionPage { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new DataSessionPage($this->version, $response, $this->solution); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1.DataSessionList]'; } }PKt[H$$*Twilio/Rest/Wireless/V1/CommandOptions.phpnu[options['sim'] = $sim; $this->options['status'] = $status; $this->options['direction'] = $direction; $this->options['transport'] = $transport; } /** * The `sid` or `unique_name` of the [Sim resources](https://www.twilio.com/docs/wireless/api/sim-resource) to read. * * @param string $sim The sid or unique_name of the Sim resources to read * @return $this Fluent Builder */ public function setSim(string $sim): self { $this->options['sim'] = $sim; return $this; } /** * The status of the resources to read. Can be: `queued`, `sent`, `delivered`, `received`, or `failed`. * * @param string $status The status of the resources to read * @return $this Fluent Builder */ public function setStatus(string $status): self { $this->options['status'] = $status; return $this; } /** * Only return Commands with this direction value. * * @param string $direction Only return Commands with this direction value * @return $this Fluent Builder */ public function setDirection(string $direction): self { $this->options['direction'] = $direction; return $this; } /** * Only return Commands with this transport value. Can be: `sms` or `ip`. * * @param string $transport Only return Commands with this transport value * @return $this Fluent Builder */ public function setTransport(string $transport): self { $this->options['transport'] = $transport; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Wireless.V1.ReadCommandOptions ' . $options . ']'; } } class CreateCommandOptions extends Options { /** * @param string $sim The sid or unique_name of the SIM to send the Command to * @param string $callbackMethod The HTTP method we use to call callback_url * @param string $callbackUrl he URL we call when the Command has finished * sending * @param string $commandMode The mode to use when sending the SMS message * @param string $includeSid Whether to include the SID of the command in the * message body * @param bool $deliveryReceiptRequested Whether to request delivery receipt * from the recipient */ public function __construct(string $sim = Values::NONE, string $callbackMethod = Values::NONE, string $callbackUrl = Values::NONE, string $commandMode = Values::NONE, string $includeSid = Values::NONE, bool $deliveryReceiptRequested = Values::NONE) { $this->options['sim'] = $sim; $this->options['callbackMethod'] = $callbackMethod; $this->options['callbackUrl'] = $callbackUrl; $this->options['commandMode'] = $commandMode; $this->options['includeSid'] = $includeSid; $this->options['deliveryReceiptRequested'] = $deliveryReceiptRequested; } /** * The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. * * @param string $sim The sid or unique_name of the SIM to send the Command to * @return $this Fluent Builder */ public function setSim(string $sim): self { $this->options['sim'] = $sim; return $this; } /** * The HTTP method we use to call `callback_url`. Can be: `POST` or `GET`, and the default is `POST`. * * @param string $callbackMethod The HTTP method we use to call callback_url * @return $this Fluent Builder */ public function setCallbackMethod(string $callbackMethod): self { $this->options['callbackMethod'] = $callbackMethod; return $this; } /** * The URL we call using the `callback_url` when the Command has finished sending, whether the command was delivered or it failed. * * @param string $callbackUrl he URL we call when the Command has finished * sending * @return $this Fluent Builder */ public function setCallbackUrl(string $callbackUrl): self { $this->options['callbackUrl'] = $callbackUrl; return $this; } /** * The mode to use when sending the SMS message. Can be: `text` or `binary`. The default SMS mode is `text`. * * @param string $commandMode The mode to use when sending the SMS message * @return $this Fluent Builder */ public function setCommandMode(string $commandMode): self { $this->options['commandMode'] = $commandMode; return $this; } /** * Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included. * * @param string $includeSid Whether to include the SID of the command in the * message body * @return $this Fluent Builder */ public function setIncludeSid(string $includeSid): self { $this->options['includeSid'] = $includeSid; return $this; } /** * Whether to request delivery receipt from the recipient. For Commands that request delivery receipt, the Command state transitions to 'delivered' once the server has received a delivery receipt from the device. The default value is `true`. * * @param bool $deliveryReceiptRequested Whether to request delivery receipt * from the recipient * @return $this Fluent Builder */ public function setDeliveryReceiptRequested(bool $deliveryReceiptRequested): self { $this->options['deliveryReceiptRequested'] = $deliveryReceiptRequested; return $this; } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { $options = \http_build_query(Values::of($this->options), '', ' '); return '[Twilio.Wireless.V1.CreateCommandOptions ' . $options . ']'; } }PKt[ Twilio/Rest/Wireless/V1.phpnu[version = 'v1'; } protected function getUsageRecords(): UsageRecordList { if (!$this->_usageRecords) { $this->_usageRecords = new UsageRecordList($this); } return $this->_usageRecords; } protected function getCommands(): CommandList { if (!$this->_commands) { $this->_commands = new CommandList($this); } return $this->_commands; } protected function getRatePlans(): RatePlanList { if (!$this->_ratePlans) { $this->_ratePlans = new RatePlanList($this); } return $this->_ratePlans; } protected function getSims(): SimList { if (!$this->_sims) { $this->_sims = new SimList($this); } return $this->_sims; } /** * Magic getter to lazy load root resources * * @param string $name Resource to return * @return \Twilio\ListResource The requested resource * @throws TwilioException For unknown resource */ public function __get(string $name) { $method = 'get' . \ucfirst($name); if (\method_exists($this, $method)) { return $this->$method(); } throw new TwilioException('Unknown resource ' . $name); } /** * Magic caller to get resource contexts * * @param string $name Resource to return * @param array $arguments Context parameters * @return InstanceContext The requested resource context * @throws TwilioException For unknown resource */ public function __call(string $name, array $arguments): InstanceContext { $property = $this->$name; if (\method_exists($property, 'getContext')) { return \call_user_func_array(array($property, 'getContext'), $arguments); } throw new TwilioException('Resource does not have a context'); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString(): string { return '[Twilio.Wireless.V1]'; } }PKt[+Yv$Twilio/Security/RequestValidator.phpnu[validate($_SERVER['HTTP_X_TWILIO_SIGNATURE'], 'https://your-example-url.com/api/route/', $_REQUEST); * $isFromTwilio // <- if this is true, the request did come from Twilio, if not, it didn't */ class RequestValidator { /** * @access private * @var string The auth token to the Twilio Account */ private $authToken; /** * constructor * @access public * @param string $authToken the auth token of the Twilio user's account * Sets the account auth token to be used by the rest of the class */ public function __construct(string $authToken) { $this->authToken = $authToken; } /** * Creates the actual base64 encoded signature of the sha1 hash of the concatenated URL and your auth token * * @param string $url the full URL of the request URL you specify for your phone number or app, from the protocol (https...) through the end of the query string (everything after the ?) * @param array $data the Twilio parameters the request was made with * @return string */ public function computeSignature(string $url, array $data = []): string { // sort the array by keys \ksort($data); foreach ($data as $key => $value) { // convert a single value to an array or remove any duplicates $valueArray = \is_array($value) ? \array_unique($value) : array($value); // also sort all the values \sort($valueArray); // append them to the data string with no delimiters foreach ($valueArray as $item) { $url .= $key . $item; } } // sha1 then base64 the url to the auth token and return the base64-ed string return \base64_encode(\hash_hmac('sha1', $url, $this->authToken, true)); } /** * Converts the raw binary output to a hexadecimal return * * @param string $data * @return string */ public static function computeBodyHash(string $data = ''): string { return \bin2hex(\hash('sha256', $data, true)); } /** * The only method the client should be running...takes the Twilio signature, their URL, and the Twilio params and validates the signature * * @param string $expectedSignature * @param string $url * @param array|string $data * @return bool */ public function validate(string $expectedSignature, string $url, $data = []): bool { $parsedUrl = \parse_url($url); $urlWithPort = self::addPort($parsedUrl); $urlWithoutPort = self::removePort($parsedUrl); $validBodyHash = true; // May not receive body hash, so default succeed if (!\is_array($data)) { // handling if the data was passed through as a string instead of an array of params $queryString = \explode('?', $url); $queryString = $queryString[1]; \parse_str($queryString, $params); $validBodyHash = self::compare(self::computeBodyHash($data), Values::array_get($params, 'bodySHA256')); $data = []; } /* * Check signature of the URL with and without port information * since sig generation on the back end is inconsistent. */ $validSignatureWithPort = self::compare( $expectedSignature, $this->computeSignature($urlWithPort, $data) ); $validSignatureWithoutPort = self::compare( $expectedSignature, $this->computeSignature($urlWithoutPort, $data) ); return $validBodyHash && ($validSignatureWithPort || $validSignatureWithoutPort); } /** * Time insensitive compare, function's runtime is governed by the length * of the first argument, not the difference between the arguments. * * @param string $a First part of the comparison pair * @param string $b Second part of the comparison pair * @return bool True if $a === $b, false otherwise. */ public static function compare(?string $a, ?string $b): bool { if ($a && $b) { return hash_equals($a, $b); } return false; } /** * Removes the port from the URL * * @param array $parsedUrl * @return string Full URL without the port number */ private static function removePort(array $parsedUrl): string { unset($parsedUrl['port']); return self::unparse_url($parsedUrl); } /** * Adds the port to the URL * * @param array $parsedUrl * @return string Full URL with the port number */ private static function addPort(array $parsedUrl): string { if (!isset($parsedUrl['port'])) { $port = ($parsedUrl['scheme'] === 'https') ? 443 : 80; $parsedUrl['port'] = $port; } return self::unparse_url($parsedUrl); } /** * Builds the URL from its parsed component pieces * * @param array $parsedUrl * @return string Full URL */ static function unparse_url(array $parsedUrl): string { $parts = []; $parts['scheme'] = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] . '://' : ''; $parts['user'] = $parsedUrl['user'] ?? ''; $parts['pass'] = isset($parsedUrl['pass']) ? ':' . $parsedUrl['pass'] : ''; $parts['pass'] = ($parts['user'] || $parts['pass']) ? $parts['pass'] . '@' : ''; $parts['host'] = $parsedUrl['host'] ?? ''; $parts['port'] = isset($parsedUrl['port']) ? ':' . $parsedUrl['port'] : ''; $parts['path'] = $parsedUrl['path'] ?? ''; $parts['query'] = isset($parsedUrl['query']) ? '?' . $parsedUrl['query'] : ''; $parts['fragment'] = isset($parsedUrl['fragment']) ? '#' . $parsedUrl['fragment'] : ''; return \implode('', $parts); } } PKt[{{  (Twilio/TaskRouter/WorkflowRuleTarget.phpnu[ * @license http://creativecommons.org/licenses/MIT/ MIT */ class WorkflowRuleTarget implements \JsonSerializable { public $queue; public $expression; public $priority; public $timeout; public function __construct(string $queue, int $priority = null, int $timeout = null, string $expression = null) { $this->queue = $queue; $this->priority = $priority; $this->timeout = $timeout; $this->expression = $expression; } public function jsonSerialize(): array { $json = []; $json['queue'] = $this->queue; if ($this->priority !== null) { $json['priority'] = $this->priority; } if ($this->timeout !== null) { $json['timeout'] = $this->timeout; } if ($this->expression !== null) { $json['expression'] = $this->expression; } return $json; } } PKt[t""+Twilio/TaskRouter/WorkflowConfiguration.phpnu[ * @license http://creativecommons.org/licenses/MIT/ MIT */ class WorkflowConfiguration implements \JsonSerializable { public $filters; public $default_filter; public function __construct(array $filters, $default_filter = null) { $this->filters = $filters; $this->default_filter = $default_filter; } public function toJSON() { return \json_encode($this); } public static function parse(string $json) { return \json_decode($json); } public static function fromJson(string $json): WorkflowConfiguration { $configJSON = self::parse($json); $default_filter = $configJSON->task_routing->default_filter; $filters = []; foreach ($configJSON->task_routing->filters as $filter) { // friendly_name and filter_friendly_name should map to same variable $friendly_name = $filter->filter_friendly_name ?? $filter->friendly_name; $filter = new WorkflowRule($filter->expression, $filter->targets, $friendly_name); $filters[] = $filter; } return new WorkflowConfiguration($filters, $default_filter); } public function jsonSerialize(): array { $json = []; $task_routing = []; $task_routing['filters'] = $this->filters; $task_routing['default_filter'] = $this->default_filter; $json['task_routing'] = $task_routing; return $json; } } PKt[>Ɏ|EE"Twilio/TaskRouter/WorkflowRule.phpnu[ * @license http://creativecommons.org/licenses/MIT/ MIT */ class WorkflowRule implements \JsonSerializable { public $expression; public $friendly_name; public $targets; public function __construct(string $expression, array $targets, string $friendly_name = null) { $this->expression = $expression; $this->targets = $targets; $this->friendly_name = $friendly_name; } public function jsonSerialize(): array { $json = []; $json['expression'] = $this->expression; $json['targets'] = $this->targets; if ($this->friendly_name !== null) { $json['friendly_name'] = $this->friendly_name; } return $json; } } PKt[0O LLTwilio/Http/Client.phpnu[curlOptions = $options; } public function request(string $method, string $url, array $params = [], array $data = [], array $headers = [], string $user = null, string $password = null, int $timeout = null): Response { $options = $this->options($method, $url, $params, $data, $headers, $user, $password, $timeout); $this->lastRequest = $options; $this->lastResponse = null; try { if (!$curl = \curl_init()) { throw new EnvironmentException('Unable to initialize cURL'); } if (!\curl_setopt_array($curl, $options)) { throw new EnvironmentException(\curl_error($curl)); } if (!$response = \curl_exec($curl)) { throw new EnvironmentException(\curl_error($curl)); } $parts = \explode("\r\n\r\n", $response, 3); list($head, $body) = ( \preg_match('/\AHTTP\/1.\d 100 Continue\Z/', $parts[0]) || \preg_match('/\AHTTP\/1.\d 200 Connection established\Z/', $parts[0]) || \preg_match('/\AHTTP\/1.\d 200 Tunnel established\Z/', $parts[0]) ) ? array($parts[1], $parts[2]) : array($parts[0], $parts[1]); $statusCode = \curl_getinfo($curl, CURLINFO_HTTP_CODE); $responseHeaders = []; $headerLines = \explode("\r\n", $head); \array_shift($headerLines); foreach ($headerLines as $line) { list($key, $value) = \explode(':', $line, 2); $responseHeaders[$key] = $value; } \curl_close($curl); if (isset($options[CURLOPT_INFILE]) && \is_resource($options[CURLOPT_INFILE])) { \fclose($options[CURLOPT_INFILE]); } $this->lastResponse = new Response($statusCode, $body, $responseHeaders); return $this->lastResponse; } catch (\ErrorException $e) { if (isset($curl) && \is_resource($curl)) { \curl_close($curl); } if (isset($options[CURLOPT_INFILE]) && \is_resource($options[CURLOPT_INFILE])) { \fclose($options[CURLOPT_INFILE]); } throw $e; } } public function options(string $method, string $url, array $params = [], array $data = [], array $headers = [], string $user = null, string $password = null, int $timeout = null): array { $timeout = $timeout ?? self::DEFAULT_TIMEOUT; $options = $this->curlOptions + [ CURLOPT_URL => $url, CURLOPT_HEADER => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_INFILESIZE => Null, CURLOPT_HTTPHEADER => [], CURLOPT_TIMEOUT => $timeout, ]; foreach ($headers as $key => $value) { $options[CURLOPT_HTTPHEADER][] = "$key: $value"; } if ($user && $password) { $options[CURLOPT_HTTPHEADER][] = 'Authorization: Basic ' . \base64_encode("$user:$password"); } $query = $this->buildQuery($params); if ($query) { $options[CURLOPT_URL] .= '?' . $query; } switch (\strtolower(\trim($method))) { case 'get': $options[CURLOPT_HTTPGET] = true; break; case 'post': $options[CURLOPT_POST] = true; if ($this->hasFile($data)) { [$headers, $body] = $this->buildMultipartOptions($data); $options[CURLOPT_POSTFIELDS] = $body; $options[CURLOPT_HTTPHEADER] = \array_merge($options[CURLOPT_HTTPHEADER], $headers); } else { $options[CURLOPT_POSTFIELDS] = $this->buildQuery($data); $options[CURLOPT_HTTPHEADER][] = 'Content-Type: application/x-www-form-urlencoded'; } break; case 'put': // TODO: PUT doesn't used anywhere and it has strange implementation. Must investigate later $options[CURLOPT_PUT] = true; if ($data) { if ($buffer = \fopen('php://memory', 'w+')) { $dataString = $this->buildQuery($data); \fwrite($buffer, $dataString); \fseek($buffer, 0); $options[CURLOPT_INFILE] = $buffer; $options[CURLOPT_INFILESIZE] = \strlen($dataString); } else { throw new EnvironmentException('Unable to open a temporary file'); } } break; case 'head': $options[CURLOPT_NOBODY] = true; break; default: $options[CURLOPT_CUSTOMREQUEST] = \strtoupper($method); } return $options; } public function buildQuery(?array $params): string { $parts = []; $params = $params ?: []; foreach ($params as $key => $value) { if (\is_array($value)) { foreach ($value as $item) { $parts[] = \urlencode((string)$key) . '=' . \urlencode((string)$item); } } else { $parts[] = \urlencode((string)$key) . '=' . \urlencode((string)$value); } } return \implode('&', $parts); } private function hasFile(array $data): bool { foreach ($data as $value) { if ($value instanceof File) { return true; } } return false; } private function buildMultipartOptions(array $data): array { $boundary = \uniqid('', true); $delimiter = "-------------{$boundary}"; $body = ''; foreach ($data as $key => $value) { if ($value instanceof File) { $contents = $value->getContents(); if ($contents === null) { $chunk = \file_get_contents($value->getFileName()); $filename = \basename($value->getFileName()); } elseif (\is_resource($contents)) { $chunk = ''; while (!\feof($contents)) { $chunk .= \fread($contents, 8096); } $filename = $value->getFileName(); } elseif (\is_string($contents)) { $chunk = $contents; $filename = $value->getFileName(); } else { throw new \InvalidArgumentException('Unsupported content type'); } $headers = ''; $contentType = $value->getContentType(); if ($contentType !== null) { $headers .= "Content-Type: {$contentType}\r\n"; } $body .= \vsprintf("--%s\r\nContent-Disposition: form-data; name=\"%s\"; filename=\"%s\"\r\n%s\r\n%s\r\n", [ $delimiter, $key, $filename, $headers, $chunk, ]); } else { $body .= \vsprintf("--%s\r\nContent-Disposition: form-data; name=\"%s\"\r\n\r\n%s\r\n", [ $delimiter, $key, $value, ]); } } $body .= "--{$delimiter}--\r\n"; return [ [ "Content-Type: multipart/form-data; boundary={$delimiter}", 'Content-Length: ' . \strlen($body), ], $body, ]; } } PKt[kETwilio/Http/File.phpnu[fileName = $fileName; $this->contents = $contents; $this->contentType = $contentType; } /** * @return resource|string|mixed|null */ public function getContents() { return $this->contents; } public function getFileName(): string { return $this->fileName; } public function getContentType(): ?string { return $this->contentType; } } PKt[OPPTwilio/Http/Response.phpnu[statusCode = $statusCode; $this->content = $content; $this->headers = $headers; } /** * @return mixed */ public function getContent() { return \json_decode($this->content, true); } public function getStatusCode(): int { return $this->statusCode; } public function getHeaders(): array { return $this->headers; } public function ok(): bool { return $this->getStatusCode() < 400; } public function __toString(): string { return '[Response] HTTP ' . $this->getStatusCode() . ' ' . $this->content; } } PKt[P2 2 Twilio/Http/GuzzleClient.phpnu[client = $client; } public function request(string $method, string $url, array $params = [], array $data = [], array $headers = [], string $user = null, string $password = null, int $timeout = null): Response { try { $options = [ 'timeout' => $timeout, 'auth' => [$user, $password], 'allow_redirects' => false, ]; if ($params) { $options['query'] = $params; } if ($method === 'POST') { if ($this->hasFile($data)) { $options['multipart'] = $this->buildMultipartParam($data); } else { $options['body'] = Query::build($data, PHP_QUERY_RFC1738); $headers['Content-Type'] = 'application/x-www-form-urlencoded'; } } $response = $this->client->send(new Request($method, $url, $headers), $options); } catch (BadResponseException $exception) { $response = $exception->getResponse(); } catch (\Exception $exception) { throw new HttpException('Unable to complete the HTTP request', 0, $exception); } // Casting the body (stream) to a string performs a rewind, ensuring we return the entire response. // See https://stackoverflow.com/a/30549372/86696 return new Response($response->getStatusCode(), (string)$response->getBody(), $response->getHeaders()); } private function hasFile(array $data): bool { foreach ($data as $value) { if ($value instanceof File) { return true; } } return false; } private function buildMultipartParam(array $data): array { $multipart = []; foreach ($data as $key => $value) { if ($value instanceof File) { $contents = $value->getContents(); if ($contents === null) { $contents = fopen($value->getFileName(), 'rb'); } $chunk = [ 'name' => $key, 'contents' => $contents, 'filename' => $value->getFileName(), ]; if ($value->getContentType() !== null) { $chunk['headers']['Content-Type'] = $value->getContentType(); } } else { $chunk = [ 'name' => $key, 'contents' => $value, ]; } $multipart[] = $chunk; } return $multipart; } } PKt[9Twilio/Version.phpnu[domain = $domain; $this->version = null; } /** * Generate an absolute URL from a version relative uri * @param string $uri Version relative uri * @return string Absolute URL */ public function absoluteUrl(string $uri): string { return $this->getDomain()->absoluteUrl($this->relativeUri($uri)); } /** * Generate a domain relative uri from a version relative uri * @param string $uri Version relative uri * @return string Domain relative uri */ public function relativeUri(string $uri): string { return \trim($this->version ?? '', '/') . '/' . \trim($uri, '/'); } public function request(string $method, string $uri, array $params = [], array $data = [], array $headers = [], string $username = null, string $password = null, int $timeout = null): Response { $uri = $this->relativeUri($uri); return $this->getDomain()->request( $method, $uri, $params, $data, $headers, $username, $password, $timeout ); } /** * Create the best possible exception for the response. * * Attempts to parse the response for Twilio Standard error messages and use * those to populate the exception, falls back to generic error message and * HTTP status code. * * @param Response $response Error response * @param string $header Header for exception message * @return TwilioException */ protected function exception(Response $response, string $header): TwilioException { $message = '[HTTP ' . $response->getStatusCode() . '] ' . $header; $content = $response->getContent(); if (\is_array($content)) { $message .= isset($content['message']) ? ': ' . $content['message'] : ''; $code = isset($content['code']) ? $content['code'] : $response->getStatusCode(); $moreInfo = $content['more_info'] ?? ''; $details = $content['details'] ?? []; return new RestException($message, $code, $response->getStatusCode(), $moreInfo, $details); } return new RestException($message, $response->getStatusCode(), $response->getStatusCode()); } /** * @throws TwilioException */ public function fetch(string $method, string $uri, array $params = [], array $data = [], array $headers = [], string $username = null, string $password = null, int $timeout = null) { $response = $this->request( $method, $uri, $params, $data, $headers, $username, $password, $timeout ); // 3XX response codes are allowed here to allow for 307 redirect from Deactivations API. if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 400) { throw $this->exception($response, 'Unable to fetch record'); } return $response->getContent(); } /** * @throws TwilioException */ public function update(string $method, string $uri, array $params = [], array $data = [], array $headers = [], string $username = null, string $password = null, int $timeout = null) { $response = $this->request( $method, $uri, $params, $data, $headers, $username, $password, $timeout ); if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 300) { throw $this->exception($response, 'Unable to update record'); } return $response->getContent(); } /** * @throws TwilioException */ public function delete(string $method, string $uri, array $params = [], array $data = [], array $headers = [], string $username = null, string $password = null, int $timeout = null): bool { $response = $this->request( $method, $uri, $params, $data, $headers, $username, $password, $timeout ); if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 300) { throw $this->exception($response, 'Unable to delete record'); } return $response->getStatusCode() === 204; } public function readLimits(int $limit = null, int $pageSize = null): array { if ($limit && $pageSize === null) { $pageSize = $limit; } $pageSize = \min($pageSize, self::MAX_PAGE_SIZE); return [ 'limit' => $limit ?: Values::NONE, 'pageSize' => $pageSize ?: Values::NONE, 'pageLimit' => Values::NONE, ]; } public function page(string $method, string $uri, array $params = [], array $data = [], array $headers = [], string $username = null, string $password = null, int $timeout = null): Response { return $this->request( $method, $uri, $params, $data, $headers, $username, $password, $timeout ); } public function stream(Page $page, $limit = null, $pageLimit = null): Stream { return new Stream($page, $limit, $pageLimit); } /** * @throws TwilioException */ public function create(string $method, string $uri, array $params = [], array $data = [], array $headers = [], string $username = null, string $password = null, int $timeout = null) { $response = $this->request( $method, $uri, $params, $data, $headers, $username, $password, $timeout ); if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 300) { throw $this->exception($response, 'Unable to create record'); } return $response->getContent(); } public function getDomain(): Domain { return $this->domain; } public function __toString(): string { return '[Version]'; } } PK%t[:~~(DeepCopy/Reflection/ReflectionHelper.phpnu[getProperties() does not return private properties from ancestor classes. * * @author muratyaman@gmail.com * @see http://php.net/manual/en/reflectionclass.getproperties.php * * @param ReflectionClass $ref * * @return ReflectionProperty[] */ public static function getProperties(ReflectionClass $ref) { $props = $ref->getProperties(); $propsArr = array(); foreach ($props as $prop) { $propertyName = $prop->getName(); $propsArr[$propertyName] = $prop; } if ($parentClass = $ref->getParentClass()) { $parentPropsArr = self::getProperties($parentClass); foreach ($propsArr as $key => $property) { $parentPropsArr[$key] = $property; } return $parentPropsArr; } return $propsArr; } /** * Retrieves property by name from object and all its ancestors. * * @param object|string $object * @param string $name * * @throws PropertyException * @throws ReflectionException * * @return ReflectionProperty */ public static function getProperty($object, $name) { $reflection = is_object($object) ? new ReflectionObject($object) : new ReflectionClass($object); if ($reflection->hasProperty($name)) { return $reflection->getProperty($name); } if ($parentClass = $reflection->getParentClass()) { return self::getProperty($parentClass->getName(), $name); } throw new PropertyException( sprintf( 'The class "%s" doesn\'t have a property with the given name: "%s".', is_object($object) ? get_class($object) : $object, $name ) ); } } PK%t[]]!DeepCopy/Filter/SetNullFilter.phpnu[setAccessible(true); $reflectionProperty->setValue($object, null); } } PK%t[DeepCopy/Filter/KeepFilter.phpnu[#DeepCopy/Filter/ChainableFilter.phpnu[filter = $filter; } public function apply($object, $property, $objectCopier) { $this->filter->apply($object, $property, $objectCopier); } } PK%t[a˲!DeepCopy/Filter/ReplaceFilter.phpnu[callback = $callable; } /** * Replaces the object property by the result of the callback called with the object property. * * {@inheritdoc} */ public function apply($object, $property, $objectCopier) { $reflectionProperty = ReflectionHelper::getProperty($object, $property); $reflectionProperty->setAccessible(true); $value = call_user_func($this->callback, $reflectionProperty->getValue($object)); $reflectionProperty->setValue($object, $value); } } PK%t[0DeepCopy/Filter/Doctrine/DoctrineProxyFilter.phpnu[__load(); } } PK%t[:D5DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.phpnu[setAccessible(true); $oldCollection = $reflectionProperty->getValue($object); $newCollection = $oldCollection->map( function ($item) use ($objectCopier) { return $objectCopier($item); } ); $reflectionProperty->setValue($object, $newCollection); } } PK%t[7:DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.phpnu[setAccessible(true); $reflectionProperty->setValue($object, new ArrayCollection()); } } PK%t["eDeepCopy/deep_copy.phpnu[copy($value); } } PK%t[GF/DeepCopy/TypeFilter/Date/DateIntervalFilter.phpnu[ $propertyValue) { $copy->{$propertyName} = $propertyValue; } return $copy; } } PK%t[-h"DeepCopy/TypeFilter/TypeFilter.phpnu[copier = $copier; } /** * {@inheritdoc} */ public function apply($arrayObject) { $clone = clone $arrayObject; foreach ($arrayObject->getArrayCopy() as $k => $v) { $clone->offsetSet($k, $this->copier->copy($v)); } return $clone; } } PK%t[J5DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.phpnu[copier = $copier; } /** * {@inheritdoc} */ public function apply($element) { $newElement = clone $element; $copy = $this->createCopyClosure(); return $copy($newElement); } private function createCopyClosure() { $copier = $this->copier; $copy = function (SplDoublyLinkedList $list) use ($copier) { // Replace each element in the list with a deep copy of itself for ($i = 1; $i <= $list->count(); $i++) { $copy = $copier->recursiveCopy($list->shift()); $list->push($copy); } return $list; }; return Closure::bind($copy, null, DeepCopy::class); } } PK%t[̰/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.phpnu[callback = $callable; } /** * {@inheritdoc} */ public function apply($element) { return call_user_func($this->callback, $element); } } PK%t[Z)DeepCopy/TypeFilter/ShallowCopyFilter.phpnu[ Filter, 'matcher' => Matcher] pairs. */ private $filters = []; /** * Type Filters to apply. * * @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs. */ private $typeFilters = []; /** * @var bool */ private $skipUncloneable = false; /** * @var bool */ private $useCloneMethod; /** * @param bool $useCloneMethod If set to true, when an object implements the __clone() function, it will be used * instead of the regular deep cloning. */ public function __construct($useCloneMethod = false) { $this->useCloneMethod = $useCloneMethod; $this->addTypeFilter(new ArrayObjectFilter($this), new TypeMatcher(ArrayObject::class)); $this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class)); $this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class)); } /** * If enabled, will not throw an exception when coming across an uncloneable property. * * @param $skipUncloneable * * @return $this */ public function skipUncloneable($skipUncloneable = true) { $this->skipUncloneable = $skipUncloneable; return $this; } /** * Deep copies the given object. * * @param mixed $object * * @return mixed */ public function copy($object) { $this->hashMap = []; return $this->recursiveCopy($object); } public function addFilter(Filter $filter, Matcher $matcher) { $this->filters[] = [ 'matcher' => $matcher, 'filter' => $filter, ]; } public function prependFilter(Filter $filter, Matcher $matcher) { array_unshift($this->filters, [ 'matcher' => $matcher, 'filter' => $filter, ]); } public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher) { $this->typeFilters[] = [ 'matcher' => $matcher, 'filter' => $filter, ]; } private function recursiveCopy($var) { // Matches Type Filter if ($filter = $this->getFirstMatchedTypeFilter($this->typeFilters, $var)) { return $filter->apply($var); } // Resource if (is_resource($var)) { return $var; } // Array if (is_array($var)) { return $this->copyArray($var); } // Scalar if (! is_object($var)) { return $var; } // Enum if (PHP_VERSION_ID >= 80100 && enum_exists(get_class($var))) { return $var; } // Object return $this->copyObject($var); } /** * Copy an array * @param array $array * @return array */ private function copyArray(array $array) { foreach ($array as $key => $value) { $array[$key] = $this->recursiveCopy($value); } return $array; } /** * Copies an object. * * @param object $object * * @throws CloneException * * @return object */ private function copyObject($object) { $objectHash = spl_object_hash($object); if (isset($this->hashMap[$objectHash])) { return $this->hashMap[$objectHash]; } $reflectedObject = new ReflectionObject($object); $isCloneable = $reflectedObject->isCloneable(); if (false === $isCloneable) { if ($this->skipUncloneable) { $this->hashMap[$objectHash] = $object; return $object; } throw new CloneException( sprintf( 'The class "%s" is not cloneable.', $reflectedObject->getName() ) ); } $newObject = clone $object; $this->hashMap[$objectHash] = $newObject; if ($this->useCloneMethod && $reflectedObject->hasMethod('__clone')) { return $newObject; } if ($newObject instanceof DateTimeInterface || $newObject instanceof DateTimeZone) { return $newObject; } foreach (ReflectionHelper::getProperties($reflectedObject) as $property) { $this->copyObjectProperty($newObject, $property); } return $newObject; } private function copyObjectProperty($object, ReflectionProperty $property) { // Ignore static properties if ($property->isStatic()) { return; } // Apply the filters foreach ($this->filters as $item) { /** @var Matcher $matcher */ $matcher = $item['matcher']; /** @var Filter $filter */ $filter = $item['filter']; if ($matcher->matches($object, $property->getName())) { $filter->apply( $object, $property->getName(), function ($object) { return $this->recursiveCopy($object); } ); if ($filter instanceof ChainableFilter) { continue; } // If a filter matches, we stop processing this property return; } } $property->setAccessible(true); // Ignore uninitialized properties (for PHP >7.4) if (method_exists($property, 'isInitialized') && !$property->isInitialized($object)) { return; } $propertyValue = $property->getValue($object); // Copy the property $property->setValue($object, $this->recursiveCopy($propertyValue)); } /** * Returns first filter that matches variable, `null` if no such filter found. * * @param array $filterRecords Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and * 'matcher' with value of type {@see TypeMatcher} * @param mixed $var * * @return TypeFilter|null */ private function getFirstMatchedTypeFilter(array $filterRecords, $var) { $matched = $this->first( $filterRecords, function (array $record) use ($var) { /* @var TypeMatcher $matcher */ $matcher = $record['matcher']; return $matcher->matches($var); } ); return isset($matched) ? $matched['filter'] : null; } /** * Returns first element that matches predicate, `null` if no such element found. * * @param array $elements Array of ['filter' => Filter, 'matcher' => Matcher] pairs. * @param callable $predicate Predicate arguments are: element. * * @return array|null Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and 'matcher' * with value of type {@see TypeMatcher} or `null`. */ private function first(array $elements, callable $predicate) { foreach ($elements as $element) { if (call_user_func($predicate, $element)) { return $element; } } return null; } } PK%t[sw$DeepCopy/TypeMatcher/TypeMatcher.phpnu[type = $type; } /** * @param mixed $element * * @return boolean */ public function matches($element) { return is_object($element) ? is_a($element, $this->type) : gettype($element) === $this->type; } } PK%t[qeDeepCopy/Matcher/Matcher.phpnu[propertyType = $propertyType; } /** * {@inheritdoc} */ public function matches($object, $property) { try { $reflectionProperty = ReflectionHelper::getProperty($object, $property); } catch (ReflectionException $exception) { return false; } $reflectionProperty->setAccessible(true); // Uninitialized properties (for PHP >7.4) if (method_exists($reflectionProperty, 'isInitialized') && !$reflectionProperty->isInitialized($object)) { // null instanceof $this->propertyType return false; } return $reflectionProperty->getValue($object) instanceof $this->propertyType; } } PK%t[Yx(DeepCopy/Matcher/PropertyNameMatcher.phpnu[property = $property; } /** * Matches a property by its name. * * {@inheritdoc} */ public function matches($object, $property) { return $property == $this->property; } } PK%t[?Sb$DeepCopy/Matcher/PropertyMatcher.phpnu[class = $class; $this->property = $property; } /** * Matches a specific property of a specific class. * * {@inheritdoc} */ public function matches($object, $property) { return ($object instanceof $this->class) && $property == $this->property; } } PK%t[Lbhh2DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.phpnu[signKey = $signKey; } /** * Add an HTTP signature to manipulation parameters. * * @param string $path The resource path. * @param array $params The manipulation parameters. * * @return array The updated manipulation parameters. */ public function addSignature($path, array $params) { return array_merge($params, ['s' => $this->generateSignature($path, $params)]); } /** * Validate a request signature. * * @param string $path The resource path. * @param array $params The manipulation params. * * @throws SignatureException * * @return void */ public function validateRequest($path, array $params) { if (!isset($params['s'])) { throw new SignatureException('Signature is missing.'); } if ($params['s'] !== $this->generateSignature($path, $params)) { throw new SignatureException('Signature is not valid.'); } } /** * Generate an HTTP signature. * * @param string $path The resource path. * @param array $params The manipulation parameters. * * @return string The generated HTTP signature. */ public function generateSignature($path, array $params) { unset($params['s']); ksort($params); return md5($this->signKey.':'.ltrim($path, '/').'?'.http_build_query($params)); } } PKo4t[?jj!Signatures/SignatureException.phpnu[getBrightness(); if (null !== $brightness) { $image->brightness($brightness); } return $image; } /** * Resolve brightness amount. * * @return int|null The resolved brightness amount. */ public function getBrightness() { if (null === $this->bri || !preg_match('/^-*[0-9]+$/', $this->bri)) { return; } if ($this->bri < -100 or $this->bri > 100) { return; } return (int) $this->bri; } } PKo4t[oSSManipulators/Orientation.phpnu[getOrientation(); if ('auto' === $orientation) { return $image->orientate(); } return $image->rotate((float) $orientation); } /** * Resolve orientation. * * @return string The resolved orientation. */ public function getOrientation() { if (in_array($this->or, ['auto', '0', '90', '180', '270'], true)) { return $this->or; } return 'auto'; } } PKo4t[ǫL..Manipulators/Flip.phpnu[getFlip()) { if ('both' === $flip) { return $image->flip('h')->flip('v'); } return $image->flip($flip); } return $image; } /** * Resolve flip. * * @return string|null The resolved flip. */ public function getFlip() { if (in_array($this->flip, ['h', 'v', 'both'], true)) { return $this->flip; } } } PKo4t[\zkkManipulators/Gamma.phpnu[getGamma(); if ($gamma) { $image->gamma($gamma); } return $image; } /** * Resolve gamma amount. * * @return float|null The resolved gamma amount. */ public function getGamma() { if (null === $this->gam || !preg_match('/^[0-9]\.*[0-9]*$/', $this->gam)) { return; } if ($this->gam < 0.1 or $this->gam > 9.99) { return; } return (float) $this->gam; } } PKo4t[5Manipulators/Background.phpnu[bg)) { return $image; } $color = (new Color($this->bg))->formatted(); if ($color) { $new = $image->getDriver()->newImage($image->width(), $image->height(), $color); $new->mime = $image->mime; $image = $new->insert($image, 'top-left', 0, 0); } return $image; } } PKo4t[RManipulators/Filter.phpnu[filt) { return $this->runGreyscaleFilter($image); } if ('sepia' === $this->filt) { return $this->runSepiaFilter($image); } return $image; } /** * Perform greyscale manipulation. * * @param Image $image The source image. * * @return Image The manipulated image. */ public function runGreyscaleFilter(Image $image) { return $image->greyscale(); } /** * Perform sepia manipulation. * * @param Image $image The source image. * * @return Image The manipulated image. */ public function runSepiaFilter(Image $image) { $image->greyscale(); $image->brightness(-10); $image->contrast(10); $image->colorize(38, 27, 12); $image->brightness(-10); $image->contrast(10); return $image; } } PKo4t[ԭ"Manipulators/Watermark.phpnu[setWatermarks($watermarks); $this->setWatermarksPathPrefix($watermarksPathPrefix); } /** * Set the watermarks file system. * * @param FilesystemOperator $watermarks The watermarks file system. * * @return void */ public function setWatermarks(FilesystemOperator $watermarks = null) { $this->watermarks = $watermarks; } /** * Get the watermarks file system. * * @return FilesystemOperator|null The watermarks file system. */ public function getWatermarks() { return $this->watermarks; } /** * Set the watermarks path prefix. * * @param string $watermarksPathPrefix The watermarks path prefix. * * @return void */ public function setWatermarksPathPrefix($watermarksPathPrefix = '') { $this->watermarksPathPrefix = trim($watermarksPathPrefix, '/'); } /** * Get the watermarks path prefix. * * @return string The watermarks path prefix. */ public function getWatermarksPathPrefix() { return $this->watermarksPathPrefix; } /** * Perform watermark image manipulation. * * @param Image $image The source image. * * @return Image The manipulated image. */ public function run(Image $image) { if ($watermark = $this->getImage($image)) { $markw = $this->getDimension($image, 'markw'); $markh = $this->getDimension($image, 'markh'); $markx = $this->getDimension($image, 'markx'); $marky = $this->getDimension($image, 'marky'); $markpad = $this->getDimension($image, 'markpad'); $markfit = $this->getFit(); $markpos = $this->getPosition(); $markalpha = $this->getAlpha(); if ($markpad) { $markx = $marky = $markpad; } $size = new Size(); $size->setParams([ 'w' => $markw, 'h' => $markh, 'fit' => $markfit, ]); $watermark = $size->run($watermark); if ($markalpha < 100) { $watermark->opacity($markalpha); } $image->insert($watermark, $markpos, intval($markx), intval($marky)); } return $image; } /** * Get the watermark image. * * @param Image $image The source image. * * @return Image|null The watermark image. */ public function getImage(Image $image) { if (is_null($this->watermarks)) { return; } if (!is_string($this->mark)) { return; } if ('' === $this->mark) { return; } $path = $this->mark; if ($this->watermarksPathPrefix) { $path = $this->watermarksPathPrefix.'/'.$path; } try { if ($this->watermarks->fileExists($path)) { $source = $this->watermarks->read($path); return $image->getDriver()->init($source); } } catch (FilesystemV2Exception $exception) { throw new FilesystemException('Could not read the image `'.$path.'`.'); } } /** * Get a dimension. * * @param Image $image The source image. * @param string $field The requested field. * * @return float|null The dimension. */ public function getDimension(Image $image, $field) { if ($this->{$field}) { return (new Dimension($image, $this->getDpr()))->get($this->{$field}); } } /** * Resolve the device pixel ratio. * * @return float The device pixel ratio. */ public function getDpr() { if (!is_numeric($this->dpr)) { return 1.0; } if ($this->dpr < 0 or $this->dpr > 8) { return 1.0; } return (float) $this->dpr; } /** * Get the fit. * * @return string|null The fit. */ public function getFit() { $fitMethods = [ 'contain', 'max', 'stretch', 'crop', 'crop-top-left', 'crop-top', 'crop-top-right', 'crop-left', 'crop-center', 'crop-right', 'crop-bottom-left', 'crop-bottom', 'crop-bottom-right', ]; if (in_array($this->markfit, $fitMethods, true)) { return $this->markfit; } } /** * Get the position. * * @return string The position. */ public function getPosition() { $positions = [ 'top-left', 'top', 'top-right', 'left', 'center', 'right', 'bottom-left', 'bottom', 'bottom-right', ]; if (in_array($this->markpos, $positions, true)) { return $this->markpos; } return 'bottom-right'; } /** * Get the alpha channel. * * @return int The alpha. */ public function getAlpha() { if (!is_numeric($this->markalpha)) { return 100; } if ($this->markalpha < 0 or $this->markalpha > 100) { return 100; } return (int) $this->markalpha; } } PKo4t[c"Manipulators/Helpers/Dimension.phpnu[image = $image; $this->dpr = $dpr; } /** * Resolve the dimension. * * @param string $value The dimension value. * * @return float|null The resolved dimension. */ public function get($value) { if (is_numeric($value) and $value > 0) { return (float) $value * $this->dpr; } if (preg_match('/^(\d{1,2}(?!\d)|100)(w|h)$/', $value, $matches)) { if ('h' === $matches[2]) { return (float) $this->image->height() * ((float) $matches[1] / 100); } return (float) $this->image->width() * ((float) $matches[1] / 100); } } } PKo4t[ ?) ) Manipulators/Helpers/Color.phpnu[getHexFromColorName($value)) { $rgba = $this->parseHex($hex); $alpha = 1; break; } if (preg_match(self::SHORT_RGB, $value)) { $rgba = $this->parseHex($value.$value); $alpha = 1; break; } if (preg_match(self::SHORT_ARGB, $value)) { $rgba = $this->parseHex(substr($value, 1).substr($value, 1)); $alpha = (float) substr($value, 0, 1) / 10; break; } if (preg_match(self::LONG_RGB, $value)) { $rgba = $this->parseHex($value); $alpha = 1; break; } if (preg_match(self::LONG_ARGB, $value)) { $rgba = $this->parseHex(substr($value, 2)); $alpha = (float) substr($value, 0, 2) / 100; break; } $rgba = [255, 255, 255]; $alpha = 0; } while (false); $this->red = $rgba[0]; $this->green = $rgba[1]; $this->blue = $rgba[2]; $this->alpha = $alpha; } /** * Parse hex color to RGB values. * * @param string $hex The hex value. * * @return array The RGB values. */ public function parseHex($hex) { return array_map('hexdec', str_split($hex, 2)); } /** * Format color for consumption. * * @return string The formatted color. */ public function formatted() { return 'rgba('.$this->red.', '.$this->green.', '.$this->blue.', '.$this->alpha.')'; } /** * Get hex code by color name. * * @param string $name The color name. * * @return string|null The hex code. */ public function getHexFromColorName($name) { $colors = [ 'aliceblue' => 'F0F8FF', 'antiquewhite' => 'FAEBD7', 'aqua' => '00FFFF', 'aquamarine' => '7FFFD4', 'azure' => 'F0FFFF', 'beige' => 'F5F5DC', 'bisque' => 'FFE4C4', 'black' => '000000', 'blanchedalmond' => 'FFEBCD', 'blue' => '0000FF', 'blueviolet' => '8A2BE2', 'brown' => 'A52A2A', 'burlywood' => 'DEB887', 'cadetblue' => '5F9EA0', 'chartreuse' => '7FFF00', 'chocolate' => 'D2691E', 'coral' => 'FF7F50', 'cornflowerblue' => '6495ED', 'cornsilk' => 'FFF8DC', 'crimson' => 'DC143C', 'cyan' => '00FFFF', 'darkblue' => '00008B', 'darkcyan' => '008B8B', 'darkgoldenrod' => 'B8860B', 'darkgray' => 'A9A9A9', 'darkgreen' => '006400', 'darkkhaki' => 'BDB76B', 'darkmagenta' => '8B008B', 'darkolivegreen' => '556B2F', 'darkorange' => 'FF8C00', 'darkorchid' => '9932CC', 'darkred' => '8B0000', 'darksalmon' => 'E9967A', 'darkseagreen' => '8FBC8F', 'darkslateblue' => '483D8B', 'darkslategray' => '2F4F4F', 'darkturquoise' => '00CED1', 'darkviolet' => '9400D3', 'deeppink' => 'FF1493', 'deepskyblue' => '00BFFF', 'dimgray' => '696969', 'dodgerblue' => '1E90FF', 'firebrick' => 'B22222', 'floralwhite' => 'FFFAF0', 'forestgreen' => '228B22', 'fuchsia' => 'FF00FF', 'gainsboro' => 'DCDCDC', 'ghostwhite' => 'F8F8FF', 'gold' => 'FFD700', 'goldenrod' => 'DAA520', 'gray' => '808080', 'green' => '008000', 'greenyellow' => 'ADFF2F', 'honeydew' => 'F0FFF0', 'hotpink' => 'FF69B4', 'indianred' => 'CD5C5C', 'indigo' => '4B0082', 'ivory' => 'FFFFF0', 'khaki' => 'F0E68C', 'lavender' => 'E6E6FA', 'lavenderblush' => 'FFF0F5', 'lawngreen' => '7CFC00', 'lemonchiffon' => 'FFFACD', 'lightblue' => 'ADD8E6', 'lightcoral' => 'F08080', 'lightcyan' => 'E0FFFF', 'lightgoldenrodyellow' => 'FAFAD2', 'lightgray' => 'D3D3D3', 'lightgreen' => '90EE90', 'lightpink' => 'FFB6C1', 'lightsalmon' => 'FFA07A', 'lightseagreen' => '20B2AA', 'lightskyblue' => '87CEFA', 'lightslategray' => '778899', 'lightsteelblue' => 'B0C4DE', 'lightyellow' => 'FFFFE0', 'lime' => '00FF00', 'limegreen' => '32CD32', 'linen' => 'FAF0E6', 'magenta' => 'FF00FF', 'maroon' => '800000', 'mediumaquamarine' => '66CDAA', 'mediumblue' => '0000CD', 'mediumorchid' => 'BA55D3', 'mediumpurple' => '9370DB', 'mediumseagreen' => '3CB371', 'mediumslateblue' => '7B68EE', 'mediumspringgreen' => '00FA9A', 'mediumturquoise' => '48D1CC', 'mediumvioletred' => 'C71585', 'midnightblue' => '191970', 'mintcream' => 'F5FFFA', 'mistyrose' => 'FFE4E1', 'moccasin' => 'FFE4B5', 'navajowhite' => 'FFDEAD', 'navy' => '000080', 'oldlace' => 'FDF5E6', 'olive' => '808000', 'olivedrab' => '6B8E23', 'orange' => 'FFA500', 'orangered' => 'FF4500', 'orchid' => 'DA70D6', 'palegoldenrod' => 'EEE8AA', 'palegreen' => '98FB98', 'paleturquoise' => 'AFEEEE', 'palevioletred' => 'DB7093', 'papayawhip' => 'FFEFD5', 'peachpuff' => 'FFDAB9', 'peru' => 'CD853F', 'pink' => 'FFC0CB', 'plum' => 'DDA0DD', 'powderblue' => 'B0E0E6', 'purple' => '800080', 'rebeccapurple' => '663399', 'red' => 'FF0000', 'rosybrown' => 'BC8F8F', 'royalblue' => '4169E1', 'saddlebrown' => '8B4513', 'salmon' => 'FA8072', 'sandybrown' => 'F4A460', 'seagreen' => '2E8B57', 'seashell' => 'FFF5EE', 'sienna' => 'A0522D', 'silver' => 'C0C0C0', 'skyblue' => '87CEEB', 'slateblue' => '6A5ACD', 'slategray' => '708090', 'snow' => 'FFFAFA', 'springgreen' => '00FF7F', 'steelblue' => '4682B4', 'tan' => 'D2B48C', 'teal' => '008080', 'thistle' => 'D8BFD8', 'tomato' => 'FF6347', 'turquoise' => '40E0D0', 'violet' => 'EE82EE', 'wheat' => 'F5DEB3', 'white' => 'FFFFFF', 'whitesmoke' => 'F5F5F5', 'yellow' => 'FFFF00', 'yellowgreen' => '9ACD32', ]; $name = strtolower($name); if (array_key_exists($name, $colors)) { return $colors[$name]; } } } PKo4t[l) Manipulators/Crop.phpnu[getCoordinates($image); if ($coordinates) { $coordinates = $this->limitToImageBoundaries($image, $coordinates); $image->crop( $coordinates[0], $coordinates[1], $coordinates[2], $coordinates[3] ); } return $image; } /** * Resolve coordinates. * * @param Image $image The source image. * * @return int[]|null The resolved coordinates. * * @psalm-return array{0: int, 1: int, 2: int, 3: int}|null */ public function getCoordinates(Image $image) { if (null === $this->crop) { return; } $coordinates = explode(',', $this->crop); if (4 !== count($coordinates) or (!is_numeric($coordinates[0])) or (!is_numeric($coordinates[1])) or (!is_numeric($coordinates[2])) or (!is_numeric($coordinates[3])) or ($coordinates[0] <= 0) or ($coordinates[1] <= 0) or ($coordinates[2] < 0) or ($coordinates[3] < 0) or ($coordinates[2] >= $image->width()) or ($coordinates[3] >= $image->height())) { return; } return [ (int) $coordinates[0], (int) $coordinates[1], (int) $coordinates[2], (int) $coordinates[3], ]; } /** * Limit coordinates to image boundaries. * * @param Image $image The source image. * @param int[] $coordinates The coordinates. * * @return int[] The limited coordinates. */ public function limitToImageBoundaries(Image $image, array $coordinates) { if ($coordinates[0] > ($image->width() - $coordinates[2])) { $coordinates[0] = $image->width() - $coordinates[2]; } if ($coordinates[1] > ($image->height() - $coordinates[3])) { $coordinates[1] = $image->height() - $coordinates[3]; } return $coordinates; } } PKo4t[vXd''Manipulators/Border.phpnu[getBorder($image)) { list($width, $color, $method) = $border; if ('overlay' === $method) { return $this->runOverlay($image, $width, $color); } if ('shrink' === $method) { return $this->runShrink($image, $width, $color); } if ('expand' === $method) { return $this->runExpand($image, $width, $color); } } return $image; } /** * Resolve border amount. * * @param Image $image The source image. * * @return (float|string)[]|null The resolved border amount. * * @psalm-return array{0: float, 1: string, 2: string}|null */ public function getBorder(Image $image) { if (!$this->border) { return; } $values = explode(',', $this->border); $width = $this->getWidth($image, $this->getDpr(), isset($values[0]) ? $values[0] : null); $color = $this->getColor(isset($values[1]) ? $values[1] : null); $method = $this->getMethod(isset($values[2]) ? $values[2] : null); if ($width) { return [$width, $color, $method]; } } /** * Get border width. * * @param Image $image The source image. * @param float $dpr The device pixel ratio. * @param string $width The border width. * * @return float|null The resolved border width. */ public function getWidth(Image $image, $dpr, $width) { return (new Dimension($image, $dpr))->get($width); } /** * Get formatted color. * * @param string $color The color. * * @return string The formatted color. */ public function getColor($color) { return (new Color($color))->formatted(); } /** * Resolve the border method. * * @param string $method The raw border method. * * @return string The resolved border method. */ public function getMethod($method) { if (!in_array($method, ['expand', 'shrink', 'overlay'], true)) { return 'overlay'; } return $method; } /** * Resolve the device pixel ratio. * * @return float The device pixel ratio. */ public function getDpr() { if (!is_numeric($this->dpr)) { return 1.0; } if ($this->dpr < 0 or $this->dpr > 8) { return 1.0; } return (float) $this->dpr; } /** * Run the overlay border method. * * @param Image $image The source image. * @param float $width The border width. * @param string $color The border color. * * @return Image The manipulated image. */ public function runOverlay(Image $image, $width, $color) { return $image->rectangle( (int) round($width / 2), (int) round($width / 2), (int) round($image->width() - ($width / 2)), (int) round($image->height() - ($width / 2)), function ($draw) use ($width, $color) { $draw->border($width, $color); } ); } /** * Run the shrink border method. * * @param Image $image The source image. * @param float $width The border width. * @param string $color The border color. * * @return Image The manipulated image. */ public function runShrink(Image $image, $width, $color) { return $image ->resize( (int) round($image->width() - ($width * 2)), (int) round($image->height() - ($width * 2)) ) ->resizeCanvas( (int) round($width * 2), (int) round($width * 2), 'center', true, $color ); } /** * Run the expand border method. * * @param Image $image The source image. * @param float $width The border width. * @param string $color The border color. * * @return Image The manipulated image. */ public function runExpand(Image $image, $width, $color) { return $image->resizeCanvas( (int) round($width * 2), (int) round($width * 2), 'center', true, $color ); } } PKo4t[;pb66Manipulators/Blur.phpnu[getBlur(); if (null !== $blur) { $image->blur($blur); } return $image; } /** * Resolve blur amount. * * @return int|null The resolved blur amount. */ public function getBlur() { if (!is_numeric($this->blur)) { return; } if ($this->blur < 0 or $this->blur > 100) { return; } return (int) $this->blur; } } PKo4t[ic!!Manipulators/Encode.phpnu[getFormat($image); $quality = $this->getQuality(); if (in_array($format, ['jpg', 'pjpg'], true)) { $image = $image->getDriver() ->newImage($image->width(), $image->height(), '#fff') ->insert($image, 'top-left', 0, 0); } if ('pjpg' === $format) { $image->interlace(); $format = 'jpg'; } return $image->encode($format, $quality); } /** * Resolve format. * * @param Image $image The source image. * * @return string The resolved format. */ public function getFormat(Image $image) { if (array_key_exists($this->fm, static::supportedFormats())) { return $this->fm; } return array_search($image->mime(), static::supportedFormats(), true) ?: 'jpg'; } /** * Get a list of supported image formats and MIME types. * * @return array */ public static function supportedFormats() { return [ 'avif' => 'image/avif', 'gif' => 'image/gif', 'jpg' => 'image/jpeg', 'pjpg' => 'image/jpeg', 'png' => 'image/png', 'webp' => 'image/webp', 'tiff' => 'image/tiff', ]; } /** * Resolve quality. * * @return int The resolved quality. */ public function getQuality() { $default = 90; if (!is_numeric($this->q)) { return $default; } if ($this->q < 0 or $this->q > 100) { return $default; } return (int) $this->q; } } PKo4t[V Manipulators/BaseManipulator.phpnu[params = $params; return $this; } /** * Get a specific manipulation param. * * @param string $name The manipulation name. * * @return string The manipulation value. */ public function __get($name) { if (array_key_exists($name, $this->params)) { return $this->params[$name]; } } /** * Perform the image manipulation. * * @return Image The manipulated image. */ abstract public function run(Image $image); } PKo4t[f}00Manipulators/Size.phpnu[maxImageSize = $maxImageSize; } /** * Set the maximum image size. * * @param int|null Maximum image size in pixels. * * @return void */ public function setMaxImageSize($maxImageSize) { $this->maxImageSize = $maxImageSize; } /** * Get the maximum image size. * * @return int|null Maximum image size in pixels. */ public function getMaxImageSize() { return $this->maxImageSize; } /** * Perform size image manipulation. * * @param Image $image The source image. * * @return Image The manipulated image. */ public function run(Image $image) { $width = $this->getWidth(); $height = $this->getHeight(); $fit = $this->getFit(); $dpr = $this->getDpr(); list($width, $height) = $this->resolveMissingDimensions($image, $width, $height); list($width, $height) = $this->applyDpr($width, $height, $dpr); list($width, $height) = $this->limitImageSize($width, $height); if ((int) $width !== (int) $image->width() || (int) $height !== (int) $image->height() || 1.0 !== $this->getCrop()[2]) { $image = $this->runResize($image, $fit, (int) $width, (int) $height); } return $image; } /** * Resolve width. * * @return int|null The resolved width. */ public function getWidth() { if (!is_numeric($this->w)) { return; } if ($this->w <= 0) { return; } return (int) $this->w; } /** * Resolve height. * * @return int|null The resolved height. */ public function getHeight() { if (!is_numeric($this->h)) { return; } if ($this->h <= 0) { return; } return (int) $this->h; } /** * Resolve fit. * * @return string The resolved fit. */ public function getFit() { if (null === $this->fit) { return 'contain'; } if (in_array($this->fit, ['contain', 'fill', 'max', 'stretch', 'fill-max'], true)) { return $this->fit; } if (preg_match('/^(crop)(-top-left|-top|-top-right|-left|-center|-right|-bottom-left|-bottom|-bottom-right|-[\d]{1,3}-[\d]{1,3}(?:-[\d]{1,3}(?:\.\d+)?)?)*$/', $this->fit)) { return 'crop'; } return 'contain'; } /** * Resolve the device pixel ratio. * * @return float The device pixel ratio. */ public function getDpr() { if (!is_numeric($this->dpr)) { return 1.0; } if ($this->dpr < 0 or $this->dpr > 8) { return 1.0; } return (float) $this->dpr; } /** * Resolve missing image dimensions. * * @param Image $image The source image. * @param int|null $width The image width. * @param int|null $height The image height. * * @return int[] The resolved width and height. */ public function resolveMissingDimensions(Image $image, $width, $height) { if (is_null($width) and is_null($height)) { $width = $image->width(); $height = $image->height(); } if (is_null($width) || is_null($height)) { $size = (new \Intervention\Image\Size($image->width(), $image->height())) ->resize($width, $height, function ($constraint) { $constraint->aspectRatio(); }); $width = $size->getWidth(); $height = $size->getHeight(); } return [ (int) $width, (int) $height, ]; } /** * Apply the device pixel ratio. * * @param int $width The target image width. * @param int $height The target image height. * @param float $dpr The device pixel ratio. * * @return int[] The modified width and height. */ public function applyDpr($width, $height, $dpr) { $width = $width * $dpr; $height = $height * $dpr; return [ (int) round($width), (int) round($height), ]; } /** * Limit image size to maximum allowed image size. * * @param int $width The image width. * @param int $height The image height. * * @return int[] The limited width and height. */ public function limitImageSize($width, $height) { if (null !== $this->maxImageSize) { $imageSize = $width * $height; if ($imageSize > $this->maxImageSize) { $width = $width / sqrt($imageSize / $this->maxImageSize); $height = $height / sqrt($imageSize / $this->maxImageSize); } } return [ (int) $width, (int) $height, ]; } /** * Perform resize image manipulation. * * @param Image $image The source image. * @param string $fit The fit. * @param int $width The width. * @param int $height The height. * * @return Image The manipulated image. */ public function runResize(Image $image, $fit, $width, $height) { if ('contain' === $fit) { return $this->runContainResize($image, $width, $height); } if ('fill' === $fit) { return $this->runFillResize($image, $width, $height); } if ('fill-max' === $fit) { return $this->runFillMaxResize($image, $width, $height); } if ('max' === $fit) { return $this->runMaxResize($image, $width, $height); } if ('stretch' === $fit) { return $this->runStretchResize($image, $width, $height); } if ('crop' === $fit) { return $this->runCropResize($image, $width, $height); } return $image; } /** * Perform contain resize image manipulation. * * @param Image $image The source image. * @param int $width The width. * @param int $height The height. * * @return Image The manipulated image. */ public function runContainResize(Image $image, $width, $height) { return $image->resize($width, $height, function ($constraint) { $constraint->aspectRatio(); }); } /** * Perform max resize image manipulation. * * @param Image $image The source image. * @param int $width The width. * @param int $height The height. * * @return Image The manipulated image. */ public function runMaxResize(Image $image, $width, $height) { return $image->resize($width, $height, function ($constraint) { $constraint->aspectRatio(); $constraint->upsize(); }); } /** * Perform fill resize image manipulation. * * @param Image $image The source image. * @param int $width The width. * @param int $height The height. * * @return Image The manipulated image. */ public function runFillResize($image, $width, $height) { $image = $this->runMaxResize($image, $width, $height); return $image->resizeCanvas($width, $height, 'center'); } /** * Perform fill-max resize image manipulation. * * @param Image $image The source image. * @param int $width The width. * @param int $height The height. * * @return Image The manipulated image. */ public function runFillMaxResize(Image $image, $width, $height) { $image = $image->resize($width, $height, function ($constraint) { $constraint->aspectRatio(); }); return $image->resizeCanvas($width, $height, 'center'); } /** * Perform stretch resize image manipulation. * * @param Image $image The source image. * @param int $width The width. * @param int $height The height. * * @return Image The manipulated image. */ public function runStretchResize(Image $image, $width, $height) { return $image->resize($width, $height); } /** * Perform crop resize image manipulation. * * @param Image $image The source image. * @param int $width The width. * @param int $height The height. * * @return Image The manipulated image. */ public function runCropResize(Image $image, $width, $height) { list($resize_width, $resize_height) = $this->resolveCropResizeDimensions($image, $width, $height); $zoom = $this->getCrop()[2]; $image->resize($resize_width * $zoom, $resize_height * $zoom, function ($constraint) { $constraint->aspectRatio(); }); list($offset_x, $offset_y) = $this->resolveCropOffset($image, $width, $height); return $image->crop($width, $height, $offset_x, $offset_y); } /** * Resolve the crop resize dimensions. * * @param Image $image The source image. * @param int $width The width. * @param int $height The height. * * @return array The resize dimensions. */ public function resolveCropResizeDimensions(Image $image, $width, $height) { if ($height > $width * ($image->height() / $image->width())) { return [$height * ($image->width() / $image->height()), $height]; } return [$width, $width * ($image->height() / $image->width())]; } /** * Resolve the crop offset. * * @param Image $image The source image. * @param int $width The width. * @param int $height The height. * * @return array The crop offset. */ public function resolveCropOffset(Image $image, $width, $height) { list($offset_percentage_x, $offset_percentage_y) = $this->getCrop(); $offset_x = (int) (($image->width() * $offset_percentage_x / 100) - ($width / 2)); $offset_y = (int) (($image->height() * $offset_percentage_y / 100) - ($height / 2)); $max_offset_x = $image->width() - $width; $max_offset_y = $image->height() - $height; if ($offset_x < 0) { $offset_x = 0; } if ($offset_y < 0) { $offset_y = 0; } if ($offset_x > $max_offset_x) { $offset_x = $max_offset_x; } if ($offset_y > $max_offset_y) { $offset_y = $max_offset_y; } return [$offset_x, $offset_y]; } /** * Resolve crop with zoom. * * @return (float|int)[] The resolved crop. * * @psalm-return array{0: int, 1: int, 2: float} */ public function getCrop() { $cropMethods = [ 'crop-top-left' => [0, 0, 1.0], 'crop-top' => [50, 0, 1.0], 'crop-top-right' => [100, 0, 1.0], 'crop-left' => [0, 50, 1.0], 'crop-center' => [50, 50, 1.0], 'crop-right' => [100, 50, 1.0], 'crop-bottom-left' => [0, 100, 1.0], 'crop-bottom' => [50, 100, 1.0], 'crop-bottom-right' => [100, 100, 1.0], ]; if (null === $this->fit) { return [50, 50, 1.0]; } if (array_key_exists($this->fit, $cropMethods)) { return $cropMethods[$this->fit]; } if (preg_match('/^crop-([\d]{1,3})-([\d]{1,3})(?:-([\d]{1,3}(?:\.\d+)?))*$/', $this->fit, $matches)) { $matches[3] = isset($matches[3]) ? $matches[3] : 1; if ($matches[1] > 100 or $matches[2] > 100 or $matches[3] > 100) { return [50, 50, 1.0]; } return [ (int) $matches[1], (int) $matches[2], (float) $matches[3], ]; } return [50, 50, 1.0]; } } PKo4t[nPe<Manipulators/Contrast.phpnu[getContrast(); if (null !== $contrast) { $image->contrast($contrast); } return $image; } /** * Resolve contrast amount. * * @return int|null The resolved contrast amount. */ public function getContrast() { if (null === $this->con || !preg_match('/^-*[0-9]+$/', $this->con)) { return; } if ($this->con < -100 or $this->con > 100) { return; } return (int) $this->con; } } PKo4t[ZYYManipulators/Sharpen.phpnu[getSharpen(); if (null !== $sharpen) { $image->sharpen($sharpen); } return $image; } /** * Resolve sharpen amount. * * @return int|null The resolved sharpen amount. */ public function getSharpen() { if (!is_numeric($this->sharp)) { return; } if ($this->sharp < 0 or $this->sharp > 100) { return; } return (int) $this->sharp; } } PKo4t[Z%Manipulators/ManipulatorInterface.phpnu[getPixelate(); if (null !== $pixelate) { $image->pixelate($pixelate); } return $image; } /** * Resolve pixelate amount. * * @return int|null The resolved pixelate amount. */ public function getPixelate() { if (!is_numeric($this->pixel)) { return; } if ($this->pixel < 0 or $this->pixel > 1000) { return; } return (int) $this->pixel; } } PKo4t[2TTApi/ApiInterface.phpnu[setImageManager($imageManager); $this->setManipulators($manipulators); } /** * Set the image manager. * * @param ImageManager $imageManager Intervention image manager. * * @return void */ public function setImageManager(ImageManager $imageManager) { $this->imageManager = $imageManager; } /** * Get the image manager. * * @return ImageManager Intervention image manager. */ public function getImageManager() { return $this->imageManager; } /** * Set the manipulators. * * @param array $manipulators Collection of manipulators. * * @return void */ public function setManipulators(array $manipulators) { foreach ($manipulators as $manipulator) { if (!($manipulator instanceof ManipulatorInterface)) { throw new InvalidArgumentException('Not a valid manipulator.'); } } $this->manipulators = $manipulators; } /** * Get the manipulators. * * @return array Collection of manipulators. */ public function getManipulators() { return $this->manipulators; } /** * Perform image manipulations. * * @param string $source Source image binary data. * @param array $params The manipulation params. * * @return string Manipulated image binary data. */ public function run($source, array $params) { $image = $this->imageManager->make($source); foreach ($this->manipulators as $manipulator) { $manipulator->setParams($params); $image = $manipulator->run($image); } return $image->getEncoded(); } } PKo4t[E!!ServerFactory.phpnu[config = $config; } /** * Get configured server. * * @return Server Configured Glide server. */ public function getServer() { $server = new Server( $this->getSource(), $this->getCache(), $this->getApi() ); $server->setSourcePathPrefix($this->getSourcePathPrefix() ?: ''); $server->setCachePathPrefix($this->getCachePathPrefix() ?: ''); $server->setGroupCacheInFolders($this->getGroupCacheInFolders()); $server->setCacheWithFileExtensions($this->getCacheWithFileExtensions()); $server->setDefaults($this->getDefaults()); $server->setPresets($this->getPresets()); $server->setBaseUrl($this->getBaseUrl() ?: ''); $server->setResponseFactory($this->getResponseFactory()); $server->setCachePathCallable($this->getCachePathCallable()); if ($this->getTempDir()) { $server->setTempDir($this->getTempDir()); } return $server; } /** * Get source file system. * * @return FilesystemOperator Source file system. */ public function getSource() { if (!isset($this->config['source'])) { throw new InvalidArgumentException('A "source" file system must be set.'); } if (is_string($this->config['source'])) { return new Filesystem( new LocalFilesystemAdapter($this->config['source']) ); } return $this->config['source']; } /** * Get source path prefix. * * @return string|null Source path prefix. */ public function getSourcePathPrefix() { if (isset($this->config['source_path_prefix'])) { return $this->config['source_path_prefix']; } } /** * Get cache file system. * * @return FilesystemOperator Cache file system. */ public function getCache() { if (!isset($this->config['cache'])) { throw new InvalidArgumentException('A "cache" file system must be set.'); } if (is_string($this->config['cache'])) { return new Filesystem( new LocalFilesystemAdapter($this->config['cache']) ); } return $this->config['cache']; } /** * Get cache path prefix. * * @return string|null Cache path prefix. */ public function getCachePathPrefix() { if (isset($this->config['cache_path_prefix'])) { return $this->config['cache_path_prefix']; } } /** * Get temporary EXIF data directory. * * @return string */ public function getTempDir() { if (isset($this->config['temp_dir'])) { return $this->config['temp_dir']; } } /** * Get cache path callable. * * @return \Closure|null Cache path callable. */ public function getCachePathCallable() { return $this->config['cache_path_callable'] ?? null; } /** * Get the group cache in folders setting. * * @return bool Whether to group cache in folders. */ public function getGroupCacheInFolders() { if (isset($this->config['group_cache_in_folders'])) { return $this->config['group_cache_in_folders']; } return true; } /** * Get the cache with file extensions setting. * * @return bool Whether to cache with file extensions. */ public function getCacheWithFileExtensions() { if (isset($this->config['cache_with_file_extensions'])) { return $this->config['cache_with_file_extensions']; } return false; } /** * Get watermarks file system. * * @return FilesystemOperator|null Watermarks file system. */ public function getWatermarks() { if (!isset($this->config['watermarks'])) { return; } if (is_string($this->config['watermarks'])) { return new Filesystem( new LocalFilesystemAdapter($this->config['watermarks']) ); } return $this->config['watermarks']; } /** * Get watermarks path prefix. * * @return string|null Watermarks path prefix. */ public function getWatermarksPathPrefix() { if (isset($this->config['watermarks_path_prefix'])) { return $this->config['watermarks_path_prefix']; } } /** * Get image manipulation API. * * @return Api Image manipulation API. */ public function getApi() { return new Api( $this->getImageManager(), $this->getManipulators() ); } /** * Get Intervention image manager. * * @return ImageManager Intervention image manager. */ public function getImageManager() { $driver = 'gd'; if (isset($this->config['driver'])) { $driver = $this->config['driver']; } return new ImageManager([ 'driver' => $driver, ]); } /** * Get image manipulators. * * @return array Image manipulators. */ public function getManipulators() { return [ new Orientation(), new Crop(), new Size($this->getMaxImageSize()), new Brightness(), new Contrast(), new Gamma(), new Sharpen(), new Filter(), new Flip(), new Blur(), new Pixelate(), new Watermark($this->getWatermarks(), $this->getWatermarksPathPrefix() ?: ''), new Background(), new Border(), new Encode(), ]; } /** * Get maximum image size. * * @return int|null Maximum image size. */ public function getMaxImageSize() { if (isset($this->config['max_image_size'])) { return $this->config['max_image_size']; } } /** * Get default image manipulations. * * @return array Default image manipulations. */ public function getDefaults() { if (isset($this->config['defaults'])) { return $this->config['defaults']; } return []; } /** * Get preset image manipulations. * * @return array Preset image manipulations. */ public function getPresets() { if (isset($this->config['presets'])) { return $this->config['presets']; } return []; } /** * Get base URL. * * @return string|null Base URL. */ public function getBaseUrl() { if (isset($this->config['base_url'])) { return $this->config['base_url']; } } /** * Get response factory. * * @return ResponseFactoryInterface|null Response factory. */ public function getResponseFactory() { if (isset($this->config['response'])) { return $this->config['response']; } } /** * Create configured server. * * @param array $config Configuration parameters. * * @return Server Configured server. */ public static function create(array $config = []) { return (new self($config))->getServer(); } } PKo4t[gĥL*B*B Server.phpnu[setSource($source); $this->setCache($cache); $this->setApi($api); $this->tempDir = sys_get_temp_dir(); } /** * Set source file system. * * @param FilesystemOperator $source Source file system. * * @return void */ public function setSource(FilesystemOperator $source) { $this->source = $source; } /** * Get source file system. * * @return FilesystemOperator Source file system. */ public function getSource() { return $this->source; } /** * Set source path prefix. * * @param string $sourcePathPrefix Source path prefix. * * @return void */ public function setSourcePathPrefix($sourcePathPrefix) { $this->sourcePathPrefix = trim($sourcePathPrefix, '/'); } /** * Get source path prefix. * * @return string Source path prefix. */ public function getSourcePathPrefix() { return $this->sourcePathPrefix; } /** * Get source path. * * @param string $path Image path. * * @return string The source path. * * @throws FileNotFoundException */ public function getSourcePath($path) { $path = trim($path, '/'); $baseUrl = $this->baseUrl.'/'; if (substr($path, 0, strlen($baseUrl)) === $baseUrl) { $path = trim(substr($path, strlen($baseUrl)), '/'); } if ('' === $path) { throw new FileNotFoundException('Image path missing.'); } if ($this->sourcePathPrefix) { $path = $this->sourcePathPrefix.'/'.$path; } return rawurldecode($path); } /** * Check if a source file exists. * * @param string $path Image path. * * @return bool Whether the source file exists. */ public function sourceFileExists($path) { try { return $this->source->fileExists($this->getSourcePath($path)); } catch (FilesystemV2Exception $exception) { return false; } } /** * Set base URL. * * @param string $baseUrl Base URL. * * @return void */ public function setBaseUrl($baseUrl) { $this->baseUrl = trim($baseUrl, '/'); } /** * Get base URL. * * @return string Base URL. */ public function getBaseUrl() { return $this->baseUrl; } /** * Set cache file system. * * @param FilesystemOperator $cache Cache file system. * * @return void */ public function setCache(FilesystemOperator $cache) { $this->cache = $cache; } /** * Get cache file system. * * @return FilesystemOperator Cache file system. */ public function getCache() { return $this->cache; } /** * Set cache path prefix. * * @param string $cachePathPrefix Cache path prefix. * * @return void */ public function setCachePathPrefix($cachePathPrefix) { $this->cachePathPrefix = trim($cachePathPrefix, '/'); } /** * Get cache path prefix. * * @return string Cache path prefix. */ public function getCachePathPrefix() { return $this->cachePathPrefix; } /** * Get temporary EXIF data directory. * * @return string */ public function getTempDir() { return $this->tempDir; } /** * Set temporary EXIF data directory. This directory must be a local path and exists on the filesystem. * * @param string $tempDir * * @return void * * @throws InvalidArgumentException */ public function setTempDir($tempDir) { if (!$tempDir || !is_dir($tempDir)) { throw new InvalidArgumentException(sprintf('Invalid temp dir provided: "%s" does not exist.', $tempDir)); } $this->tempDir = rtrim($tempDir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; } /** * Set the group cache in folders setting. * * @param bool $groupCacheInFolders Whether to group cache in folders. * * @return void */ public function setGroupCacheInFolders($groupCacheInFolders) { $this->groupCacheInFolders = $groupCacheInFolders; } /** * Get the group cache in folders setting. * * @return bool Whether to group cache in folders. */ public function getGroupCacheInFolders() { return $this->groupCacheInFolders; } /** * Set the cache with file extensions setting. * * @param bool $cacheWithFileExtensions Whether to cache with file extensions. * * @return void */ public function setCacheWithFileExtensions($cacheWithFileExtensions) { $this->cacheWithFileExtensions = $cacheWithFileExtensions; } /** * Get the cache with file extensions setting. * * @return bool Whether to cache with file extensions. */ public function getCacheWithFileExtensions() { return $this->cacheWithFileExtensions; } /** * Set a custom cachePathCallable. * * @param \Closure|null $cachePathCallable The custom cache path callable. It receives the same arguments as @see getCachePath */ public function setCachePathCallable(?Closure $cachePathCallable) { $this->cachePathCallable = $cachePathCallable; } /** * Gets the custom cachePathCallable. * * @return \Closure|null The custom cache path callable. It receives the same arguments as @see getCachePath */ public function getCachePathCallable() { return $this->cachePathCallable; } /** * Get cache path. * * @param string $path Image path. * @param array $params Image manipulation params. * * @return string Cache path. */ public function getCachePath($path, array $params = []) { $customCallable = $this->getCachePathCallable(); if (null !== $customCallable) { $boundCallable = Closure::bind($customCallable, $this, static::class); return $boundCallable($path, $params); } $sourcePath = $this->getSourcePath($path); if ($this->sourcePathPrefix) { $sourcePath = substr($sourcePath, strlen($this->sourcePathPrefix) + 1); } $params = $this->getAllParams($params); unset($params['s'], $params['p']); ksort($params); $cachedPath = md5($sourcePath.'?'.http_build_query($params)); if ($this->groupCacheInFolders) { $cachedPath = $sourcePath.'/'.$cachedPath; } if ($this->cachePathPrefix) { $cachedPath = $this->cachePathPrefix.'/'.$cachedPath; } if ($this->cacheWithFileExtensions) { $ext = (isset($params['fm']) ? $params['fm'] : pathinfo($path)['extension']); $ext = ('pjpg' === $ext) ? 'jpg' : $ext; $cachedPath .= '.'.$ext; } return $cachedPath; } /** * Check if a cache file exists. * * @param string $path Image path. * @param array $params Image manipulation params. * * @return bool Whether the cache file exists. */ public function cacheFileExists($path, array $params) { try { return $this->cache->fileExists( $this->getCachePath($path, $params) ); } catch (FilesystemV2Exception $exception) { return false; } } /** * Delete cached manipulations for an image. * * @param string $path Image path. * * @return bool Whether the delete succeeded. */ public function deleteCache($path) { if (!$this->groupCacheInFolders) { throw new InvalidArgumentException('Deleting cached image manipulations is not possible when grouping cache into folders is disabled.'); } try { $this->cache->deleteDirectory( dirname($this->getCachePath($path)) ); return true; } catch (FilesystemV2Exception $exception) { return false; } } /** * Set image manipulation API. * * @param ApiInterface $api Image manipulation API. * * @return void */ public function setApi(ApiInterface $api) { $this->api = $api; } /** * Get image manipulation API. * * @return ApiInterface Image manipulation API. */ public function getApi() { return $this->api; } /** * Set default image manipulations. * * @param array $defaults Default image manipulations. * * @return void */ public function setDefaults(array $defaults) { $this->defaults = $defaults; } /** * Get default image manipulations. * * @return array Default image manipulations. */ public function getDefaults() { return $this->defaults; } /** * Set preset image manipulations. * * @param array $presets Preset image manipulations. * * @return void */ public function setPresets(array $presets) { $this->presets = $presets; } /** * Get preset image manipulations. * * @return array Preset image manipulations. */ public function getPresets() { return $this->presets; } /** * Get all image manipulations params, including defaults and presets. * * @param array $params Image manipulation params. * * @return array All image manipulation params. */ public function getAllParams(array $params) { $all = $this->defaults; if (isset($params['p'])) { foreach (explode(',', $params['p']) as $preset) { if (isset($this->presets[$preset])) { $all = array_merge($all, $this->presets[$preset]); } } } return array_merge($all, $params); } /** * Set response factory. * * @param ResponseFactoryInterface|null $responseFactory Response factory. * * @return void */ public function setResponseFactory(ResponseFactoryInterface $responseFactory = null) { $this->responseFactory = $responseFactory; } /** * Get response factory. * * @return ResponseFactoryInterface|null Response factory. */ public function getResponseFactory() { return $this->responseFactory; } /** * Generate and return image response. * * @param string $path Image path. * @param array $params Image manipulation params. * * @return mixed Image response. * * @throws InvalidArgumentException */ public function getImageResponse($path, array $params) { if (is_null($this->responseFactory)) { throw new InvalidArgumentException('Unable to get image response, no response factory defined.'); } $path = $this->makeImage($path, $params); return $this->responseFactory->create($this->cache, $path); } /** * Generate and return Base64 encoded image. * * @param string $path Image path. * @param array $params Image manipulation params. * * @return string Base64 encoded image. * * @throws FilesystemException */ public function getImageAsBase64($path, array $params) { $path = $this->makeImage($path, $params); try { $source = $this->cache->read($path); return 'data:'.$this->cache->mimeType($path).';base64,'.base64_encode($source); } catch (FilesystemV2Exception $exception) { throw new FilesystemException('Could not read the image `'.$path.'`.'); } } /** * Generate and output image. * * @param string $path Image path. * @param array $params Image manipulation params. * * @throws InvalidArgumentException * * @return void */ public function outputImage($path, array $params) { $path = $this->makeImage($path, $params); try { header('Content-Type:'.$this->cache->mimeType($path)); header('Content-Length:'.$this->cache->fileSize($path)); header('Cache-Control:'.'max-age=31536000, public'); header('Expires:'.date_create('+1 years')->format('D, d M Y H:i:s').' GMT'); $stream = $this->cache->readStream($path); if (0 !== ftell($stream)) { rewind($stream); } fpassthru($stream); fclose($stream); } catch (FilesystemV2Exception $exception) { throw new FilesystemException('Could not read the image `'.$path.'`.'); } } /** * Generate manipulated image. * * @param string $path Image path. * @param array $params Image manipulation params. * * @return string Cache path. * * @throws FileNotFoundException * @throws FilesystemException */ public function makeImage($path, array $params) { $sourcePath = $this->getSourcePath($path); $cachedPath = $this->getCachePath($path, $params); if (true === $this->cacheFileExists($path, $params)) { return $cachedPath; } if (false === $this->sourceFileExists($path)) { throw new FileNotFoundException('Could not find the image `'.$sourcePath.'`.'); } try { $source = $this->source->read( $sourcePath ); } catch (FilesystemV2Exception $exception) { throw new FilesystemException('Could not read the image `'.$sourcePath.'`.'); } // We need to write the image to the local disk before // doing any manipulations. This is because EXIF data // can only be read from an actual file. $tmp = tempnam($this->tempDir, 'Glide'); if (false === file_put_contents($tmp, $source)) { throw new FilesystemException('Unable to write temp file for `'.$sourcePath.'`.'); } try { $this->cache->write( $cachedPath, $this->api->run($tmp, $this->getAllParams($params)) ); } catch (FilesystemV2Exception $exception) { throw new FilesystemException('Could not write the image `'.$cachedPath.'`.'); } finally { unlink($tmp); } return $cachedPath; } } PKo4t[&Responses/ResponseFactoryInterface.phpnu[response = $response; $this->streamCallback = $streamCallback; } /** * Create response. * * @param FilesystemOperator $cache Cache file system. * @param string $path Cached file path. * * @return ResponseInterface Response object. */ public function create(FilesystemOperator $cache, $path) { $stream = $this->streamCallback->__invoke( $cache->readStream($path) ); $contentType = $cache->mimeType($path); $contentLength = (string) $cache->fileSize($path); $cacheControl = 'max-age=31536000, public'; $expires = date_create('+1 years')->format('D, d M Y H:i:s').' GMT'; return $this->response->withBody($stream) ->withHeader('Content-Type', $contentType) ->withHeader('Content-Length', $contentLength) ->withHeader('Cache-Control', $cacheControl) ->withHeader('Expires', $expires); } } PKo4t[G&kk"Filesystem/FilesystemException.phpnu[setBaseUrl($baseUrl); $this->setSignature($signature); } /** * Set the base URL. * * @param string $baseUrl The base URL. * * @return void */ public function setBaseUrl($baseUrl) { if ('//' === substr($baseUrl, 0, 2)) { $baseUrl = 'http:'.$baseUrl; $this->isRelativeDomain = true; } $this->baseUrl = rtrim($baseUrl, '/'); } /** * Set the HTTP signature. * * @param SignatureInterface|null $signature The HTTP signature used to sign URLs. * * @return void */ public function setSignature(SignatureInterface $signature = null) { $this->signature = $signature; } /** * Get the URL. * * @param string $path The resource path. * @param array $params The manipulation parameters. * * @return string The URL. */ public function getUrl($path, array $params = []) { $parts = parse_url($this->baseUrl.'/'.trim($path, '/')); if (false === $parts) { throw new InvalidArgumentException('Not a valid path.'); } $parts['path'] = '/'.trim($parts['path'], '/'); if ($this->signature) { $params = $this->signature->addSignature($parts['path'], $params); } return $this->buildUrl($parts, $params); } /** * Build the URL. * * @param array $parts The URL parts. * @param array $params The manipulation parameters. * * @return string The built URL. */ protected function buildUrl($parts, $params) { $url = ''; if (isset($parts['host'])) { if ($this->isRelativeDomain) { $url .= '//'.$parts['host']; } else { $url .= $parts['scheme'].'://'.$parts['host']; } if (isset($parts['port'])) { $url .= ':'.$parts['port']; } } $url .= $parts['path']; if (count($params)) { $url .= '?'.http_build_query($params); } return $url; } } PKCt[`Kyy'UrlGeneration/TemporaryUrlGenerator.phpnu[generators as $generator) { try { return $generator->publicUrl($path, $config); } catch (UnableToGeneratePublicUrl) { } } throw new UnableToGeneratePublicUrl('No supported public url generator found.', $path); } } PKCt[ΕӼ1UrlGeneration/ShardedPrefixPublicUrlGenerator.phpnu[count = count($prefixes); if ($this->count === 0) { throw new InvalidArgumentException('At least one prefix is required.'); } $this->prefixes = array_map(static fn (string $prefix) => new PathPrefixer($prefix, '/'), $prefixes); } public function publicUrl(string $path, Config $config): string { $index = abs(crc32($path)) % $this->count; return $this->prefixes[$index]->prefixPath($path); } } PKCt[X3X*UrlGeneration/PrefixPublicUrlGenerator.phpnu[prefixer = new PathPrefixer($urlPrefix, '/'); } public function publicUrl(string $path, Config $config): string { return $this->prefixer->prefixPath($path); } } PKCt[Z99$UrlGeneration/PublicUrlGenerator.phpnu[location = $location; $e->reason = $reason; return $e; } public function operation(): string { return FilesystemOperationFailed::OPERATION_WRITE; } public function reason(): string { return $this->reason; } public function location(): string { return $this->location; } } PKCt[NNUnableToCreateDirectory.phpnu[location = $dirname; $e->reason = $errorMessage; return $e; } public static function dueToFailure(string $dirname, Throwable $previous): UnableToCreateDirectory { $reason = $previous instanceof UnableToCreateDirectory ? $previous->reason() : ''; $message = "Unable to create a directory at $dirname. $reason"; $e = new static(rtrim($message), 0, $previous); $e->location = $dirname; $e->reason = $reason ?: $message; return $e; } public function operation(): string { return FilesystemOperationFailed::OPERATION_CREATE_DIRECTORY; } public function reason(): string { return $this->reason; } public function location(): string { return $this->location; } } PKCt[gFilesystemOperator.phpnu[ * * @throws FilesystemException */ public function listContents(string $path, bool $deep): iterable; /** * @throws UnableToMoveFile * @throws FilesystemException */ public function move(string $source, string $destination, Config $config): void; /** * @throws UnableToCopyFile * @throws FilesystemException */ public function copy(string $source, string $destination, Config $config): void; } PKCt[&!UnableToCheckExistence.phpnu[path; } public static function forPath(string $path): PathTraversalDetected { $e = new PathTraversalDetected("Path traversal detected: {$path}"); $e->path = $path; return $e; } } PKCt[7ۣVisibility.phpnu[options[$property] ?? $default; } public function extend(array $options): Config { return new Config(array_merge($this->options, $options)); } public function withDefaults(array $defaults): Config { return new Config($this->options + $defaults); } } PKCt[g3  FileAttributes.phpnu[path = ltrim($this->path, '/'); } public function type(): string { return $this->type; } public function path(): string { return $this->path; } public function fileSize(): ?int { return $this->fileSize; } public function visibility(): ?string { return $this->visibility; } public function lastModified(): ?int { return $this->lastModified; } public function mimeType(): ?string { return $this->mimeType; } public function extraMetadata(): array { return $this->extraMetadata; } public function isFile(): bool { return true; } public function isDir(): bool { return false; } public function withPath(string $path): self { $clone = clone $this; $clone->path = $path; return $clone; } public static function fromArray(array $attributes): self { return new FileAttributes( $attributes[StorageAttributes::ATTRIBUTE_PATH], $attributes[StorageAttributes::ATTRIBUTE_FILE_SIZE] ?? null, $attributes[StorageAttributes::ATTRIBUTE_VISIBILITY] ?? null, $attributes[StorageAttributes::ATTRIBUTE_LAST_MODIFIED] ?? null, $attributes[StorageAttributes::ATTRIBUTE_MIME_TYPE] ?? null, $attributes[StorageAttributes::ATTRIBUTE_EXTRA_METADATA] ?? [] ); } public function jsonSerialize(): array { return [ StorageAttributes::ATTRIBUTE_TYPE => self::TYPE_FILE, StorageAttributes::ATTRIBUTE_PATH => $this->path, StorageAttributes::ATTRIBUTE_FILE_SIZE => $this->fileSize, StorageAttributes::ATTRIBUTE_VISIBILITY => $this->visibility, StorageAttributes::ATTRIBUTE_LAST_MODIFIED => $this->lastModified, StorageAttributes::ATTRIBUTE_MIME_TYPE => $this->mimeType, StorageAttributes::ATTRIBUTE_EXTRA_METADATA => $this->extraMetadata, ]; } } PKCt[](DirectoryAttributes.phpnu[path = trim($this->path, '/'); } public function path(): string { return $this->path; } public function type(): string { return $this->type; } public function visibility(): ?string { return $this->visibility; } public function lastModified(): ?int { return $this->lastModified; } public function extraMetadata(): array { return $this->extraMetadata; } public function isFile(): bool { return false; } public function isDir(): bool { return true; } public function withPath(string $path): self { $clone = clone $this; $clone->path = $path; return $clone; } public static function fromArray(array $attributes): self { return new DirectoryAttributes( $attributes[StorageAttributes::ATTRIBUTE_PATH], $attributes[StorageAttributes::ATTRIBUTE_VISIBILITY] ?? null, $attributes[StorageAttributes::ATTRIBUTE_LAST_MODIFIED] ?? null, $attributes[StorageAttributes::ATTRIBUTE_EXTRA_METADATA] ?? [] ); } /** * @inheritDoc */ public function jsonSerialize(): array { return [ StorageAttributes::ATTRIBUTE_TYPE => $this->type, StorageAttributes::ATTRIBUTE_PATH => $this->path, StorageAttributes::ATTRIBUTE_VISIBILITY => $this->visibility, StorageAttributes::ATTRIBUTE_LAST_MODIFIED => $this->lastModified, StorageAttributes::ATTRIBUTE_EXTRA_METADATA => $this->extraMetadata, ]; } } PKCt[ƛM#  DirectoryListing.phpnu[ $listing */ public function __construct(private iterable $listing) { } /** * @param callable(T): bool $filter * @return DirectoryListing */ public function filter(callable $filter): DirectoryListing { $generator = (static function (iterable $listing) use ($filter): Generator { foreach ($listing as $item) { if ($filter($item)) { yield $item; } } })($this->listing); return new DirectoryListing($generator); } /** * @template R * @param callable(T): R $mapper * @return DirectoryListing */ public function map(callable $mapper): DirectoryListing { $generator = (static function (iterable $listing) use ($mapper): Generator { foreach ($listing as $item) { yield $mapper($item); } })($this->listing); return new DirectoryListing($generator); } /** * @return DirectoryListing */ public function sortByPath(): DirectoryListing { $listing = $this->toArray(); usort($listing, function (StorageAttributes $a, StorageAttributes $b) { return $a->path() <=> $b->path(); }); return new DirectoryListing($listing); } /** * @return Traversable */ public function getIterator(): Traversable { return $this->listing instanceof Traversable ? $this->listing : new ArrayIterator($this->listing); } /** * @return T[] */ public function toArray(): array { return $this->listing instanceof Traversable ? iterator_to_array($this->listing, false) : (array) $this->listing; } } PKCt[)w6w6MountManager.phpnu[ */ private $filesystems = []; /** * MountManager constructor. * * @param array $filesystems */ public function __construct(array $filesystems = []) { $this->mountFilesystems($filesystems); } public function fileExists(string $location): bool { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { return $filesystem->fileExists($path); } catch (Throwable $exception) { throw UnableToCheckFileExistence::forLocation($location, $exception); } } public function has(string $location): bool { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { return $filesystem->fileExists($path) || $filesystem->directoryExists($path); } catch (Throwable $exception) { throw UnableToCheckExistence::forLocation($location, $exception); } } public function directoryExists(string $location): bool { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { return $filesystem->directoryExists($path); } catch (Throwable $exception) { throw UnableToCheckDirectoryExistence::forLocation($location, $exception); } } public function read(string $location): string { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { return $filesystem->read($path); } catch (UnableToReadFile $exception) { throw UnableToReadFile::fromLocation($location, $exception->reason(), $exception); } } public function readStream(string $location) { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { return $filesystem->readStream($path); } catch (UnableToReadFile $exception) { throw UnableToReadFile::fromLocation($location, $exception->reason(), $exception); } } public function listContents(string $location, bool $deep = self::LIST_SHALLOW): DirectoryListing { /** @var FilesystemOperator $filesystem */ [$filesystem, $path, $mountIdentifier] = $this->determineFilesystemAndPath($location); return $filesystem ->listContents($path, $deep) ->map( function (StorageAttributes $attributes) use ($mountIdentifier) { return $attributes->withPath(sprintf('%s://%s', $mountIdentifier, $attributes->path())); } ); } public function lastModified(string $location): int { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { return $filesystem->lastModified($path); } catch (UnableToRetrieveMetadata $exception) { throw UnableToRetrieveMetadata::lastModified($location, $exception->reason(), $exception); } } public function fileSize(string $location): int { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { return $filesystem->fileSize($path); } catch (UnableToRetrieveMetadata $exception) { throw UnableToRetrieveMetadata::fileSize($location, $exception->reason(), $exception); } } public function mimeType(string $location): string { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { return $filesystem->mimeType($path); } catch (UnableToRetrieveMetadata $exception) { throw UnableToRetrieveMetadata::mimeType($location, $exception->reason(), $exception); } } public function visibility(string $location): string { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { return $filesystem->visibility($path); } catch (UnableToRetrieveMetadata $exception) { throw UnableToRetrieveMetadata::visibility($location, $exception->reason(), $exception); } } public function write(string $location, string $contents, array $config = []): void { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { $filesystem->write($path, $contents, $config); } catch (UnableToWriteFile $exception) { throw UnableToWriteFile::atLocation($location, $exception->reason(), $exception); } } public function writeStream(string $location, $contents, array $config = []): void { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); $filesystem->writeStream($path, $contents, $config); } public function setVisibility(string $path, string $visibility): void { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($path); $filesystem->setVisibility($path, $visibility); } public function delete(string $location): void { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { $filesystem->delete($path); } catch (UnableToDeleteFile $exception) { throw UnableToDeleteFile::atLocation($location, $exception->reason(), $exception); } } public function deleteDirectory(string $location): void { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { $filesystem->deleteDirectory($path); } catch (UnableToDeleteDirectory $exception) { throw UnableToDeleteDirectory::atLocation($location, $exception->reason(), $exception); } } public function createDirectory(string $location, array $config = []): void { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($location); try { $filesystem->createDirectory($path, $config); } catch (UnableToCreateDirectory $exception) { throw UnableToCreateDirectory::dueToFailure($location, $exception); } } public function move(string $source, string $destination, array $config = []): void { /** @var FilesystemOperator $sourceFilesystem */ /* @var FilesystemOperator $destinationFilesystem */ [$sourceFilesystem, $sourcePath] = $this->determineFilesystemAndPath($source); [$destinationFilesystem, $destinationPath] = $this->determineFilesystemAndPath($destination); $sourceFilesystem === $destinationFilesystem ? $this->moveInTheSameFilesystem( $sourceFilesystem, $sourcePath, $destinationPath, $source, $destination ) : $this->moveAcrossFilesystems($source, $destination, $config); } public function copy(string $source, string $destination, array $config = []): void { /** @var FilesystemOperator $sourceFilesystem */ /* @var FilesystemOperator $destinationFilesystem */ [$sourceFilesystem, $sourcePath] = $this->determineFilesystemAndPath($source); [$destinationFilesystem, $destinationPath] = $this->determineFilesystemAndPath($destination); $sourceFilesystem === $destinationFilesystem ? $this->copyInSameFilesystem( $sourceFilesystem, $sourcePath, $destinationPath, $source, $destination ) : $this->copyAcrossFilesystem( $config['visibility'] ?? null, $sourceFilesystem, $sourcePath, $destinationFilesystem, $destinationPath, $source, $destination ); } public function publicUrl(string $path, array $config = []): string { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($path); if ( ! method_exists($filesystem, 'publicUrl')) { throw new UnableToGeneratePublicUrl(sprintf('%s does not support generating public urls.', $filesystem::class), $path); } return $filesystem->publicUrl($path, $config); } public function temporaryUrl(string $path, DateTimeInterface $expiresAt, array $config = []): string { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($path); if ( ! method_exists($filesystem, 'temporaryUrl')) { throw new UnableToGenerateTemporaryUrl(sprintf('%s does not support generating public urls.', $filesystem::class), $path); } return $filesystem->temporaryUrl($path, $expiresAt, $config); } public function checksum(string $path, array $config = []): string { /** @var FilesystemOperator $filesystem */ [$filesystem, $path] = $this->determineFilesystemAndPath($path); if ( ! method_exists($filesystem, 'checksum')) { throw new UnableToProvideChecksum(sprintf('%s does not support providing checksums.', $filesystem::class), $path); } return $filesystem->checksum($path, $config); } private function mountFilesystems(array $filesystems): void { foreach ($filesystems as $key => $filesystem) { $this->guardAgainstInvalidMount($key, $filesystem); /* @var string $key */ /* @var FilesystemOperator $filesystem */ $this->mountFilesystem($key, $filesystem); } } /** * @param mixed $key * @param mixed $filesystem */ private function guardAgainstInvalidMount($key, $filesystem): void { if ( ! is_string($key)) { throw UnableToMountFilesystem::becauseTheKeyIsNotValid($key); } if ( ! $filesystem instanceof FilesystemOperator) { throw UnableToMountFilesystem::becauseTheFilesystemWasNotValid($filesystem); } } private function mountFilesystem(string $key, FilesystemOperator $filesystem): void { $this->filesystems[$key] = $filesystem; } /** * @param string $path * * @return array{0:FilesystemOperator, 1:string} */ private function determineFilesystemAndPath(string $path): array { if (strpos($path, '://') < 1) { throw UnableToResolveFilesystemMount::becauseTheSeparatorIsMissing($path); } /** @var string $mountIdentifier */ /** @var string $mountPath */ [$mountIdentifier, $mountPath] = explode('://', $path, 2); if ( ! array_key_exists($mountIdentifier, $this->filesystems)) { throw UnableToResolveFilesystemMount::becauseTheMountWasNotRegistered($mountIdentifier); } return [$this->filesystems[$mountIdentifier], $mountPath, $mountIdentifier]; } private function copyInSameFilesystem( FilesystemOperator $sourceFilesystem, string $sourcePath, string $destinationPath, string $source, string $destination ): void { try { $sourceFilesystem->copy($sourcePath, $destinationPath); } catch (UnableToCopyFile $exception) { throw UnableToCopyFile::fromLocationTo($source, $destination, $exception); } } private function copyAcrossFilesystem( ?string $visibility, FilesystemOperator $sourceFilesystem, string $sourcePath, FilesystemOperator $destinationFilesystem, string $destinationPath, string $source, string $destination ): void { try { $visibility = $visibility ?? $sourceFilesystem->visibility($sourcePath); $stream = $sourceFilesystem->readStream($sourcePath); $destinationFilesystem->writeStream($destinationPath, $stream, compact('visibility')); } catch (UnableToRetrieveMetadata | UnableToReadFile | UnableToWriteFile $exception) { throw UnableToCopyFile::fromLocationTo($source, $destination, $exception); } } private function moveInTheSameFilesystem( FilesystemOperator $sourceFilesystem, string $sourcePath, string $destinationPath, string $source, string $destination ): void { try { $sourceFilesystem->move($sourcePath, $destinationPath); } catch (UnableToMoveFile $exception) { throw UnableToMoveFile::fromLocationTo($source, $destination, $exception); } } private function moveAcrossFilesystems(string $source, string $destination, array $config = []): void { try { $this->copy($source, $destination, $config); $this->delete($source); } catch (UnableToCopyFile | UnableToDeleteFile $exception) { throw UnableToMoveFile::fromLocationTo($source, $destination, $exception); } } } PKCt[e?SymbolicLinkEncountered.phpnu[location; } public static function atLocation(string $pathName): SymbolicLinkEncountered { $e = new static("Unsupported symbolic link encountered at location $pathName"); $e->location = $pathName; return $e; } } PKCt[ƔOBUnableToCopyFile.phpnu[source; } public function destination(): string { return $this->destination; } public static function fromLocationTo( string $sourcePath, string $destinationPath, Throwable $previous = null ): UnableToCopyFile { $e = new static("Unable to copy file from $sourcePath to $destinationPath", 0 , $previous); $e->source = $sourcePath; $e->destination = $destinationPath; return $e; } public static function sourceAndDestinationAreTheSame(string $source, string $destination): UnableToCopyFile { return UnableToCopyFile::because('Source and destination are the same', $source, $destination); } public static function because(string $reason, string $sourcePath, string $destinationPath): UnableToCopyFile { $e = new static("Unable to copy file from $sourcePath to $destinationPath, because $reason"); $e->source = $sourcePath; $e->destination = $destinationPath; return $e; } public function operation(): string { return FilesystemOperationFailed::OPERATION_COPY; } } PKCt[㌱UnableToDeleteDirectory.phpnu[location = $location; $e->reason = $reason; return $e; } public function operation(): string { return FilesystemOperationFailed::OPERATION_DELETE_DIRECTORY; } public function reason(): string { return $this->reason; } public function location(): string { return $this->location; } } PKCt[Ac#yyFilesystemReader.phpnu[ * * @throws FilesystemException * @throws UnableToListContents */ public function listContents(string $location, bool $deep = self::LIST_SHALLOW): DirectoryListing; /** * @throws UnableToRetrieveMetadata * @throws FilesystemException */ public function lastModified(string $path): int; /** * @throws UnableToRetrieveMetadata * @throws FilesystemException */ public function fileSize(string $path): int; /** * @throws UnableToRetrieveMetadata * @throws FilesystemException */ public function mimeType(string $path): string; /** * @throws UnableToRetrieveMetadata * @throws FilesystemException */ public function visibility(string $path): string; } PKCt[(FilesystemOperationFailed.phpnu[config = new Config($config); $this->pathNormalizer = $pathNormalizer ?: new WhitespacePathNormalizer(); } public function fileExists(string $location): bool { return $this->adapter->fileExists($this->pathNormalizer->normalizePath($location)); } public function directoryExists(string $location): bool { return $this->adapter->directoryExists($this->pathNormalizer->normalizePath($location)); } public function has(string $location): bool { $path = $this->pathNormalizer->normalizePath($location); return $this->adapter->fileExists($path) || $this->adapter->directoryExists($path); } public function write(string $location, string $contents, array $config = []): void { $this->adapter->write( $this->pathNormalizer->normalizePath($location), $contents, $this->config->extend($config) ); } public function writeStream(string $location, $contents, array $config = []): void { /* @var resource $contents */ $this->assertIsResource($contents); $this->rewindStream($contents); $this->adapter->writeStream( $this->pathNormalizer->normalizePath($location), $contents, $this->config->extend($config) ); } public function read(string $location): string { return $this->adapter->read($this->pathNormalizer->normalizePath($location)); } public function readStream(string $location) { return $this->adapter->readStream($this->pathNormalizer->normalizePath($location)); } public function delete(string $location): void { $this->adapter->delete($this->pathNormalizer->normalizePath($location)); } public function deleteDirectory(string $location): void { $this->adapter->deleteDirectory($this->pathNormalizer->normalizePath($location)); } public function createDirectory(string $location, array $config = []): void { $this->adapter->createDirectory( $this->pathNormalizer->normalizePath($location), $this->config->extend($config) ); } public function listContents(string $location, bool $deep = self::LIST_SHALLOW): DirectoryListing { $path = $this->pathNormalizer->normalizePath($location); $listing = $this->adapter->listContents($path, $deep); return new DirectoryListing($this->pipeListing($location, $deep, $listing)); } private function pipeListing(string $location, bool $deep, iterable $listing): Generator { try { foreach ($listing as $item) { yield $item; } } catch (Throwable $exception) { throw UnableToListContents::atLocation($location, $deep, $exception); } } public function move(string $source, string $destination, array $config = []): void { $config = $this->config->extend($config); $from = $this->pathNormalizer->normalizePath($source); $to = $this->pathNormalizer->normalizePath($destination); if ($from === $to) { $resolutionStrategy = $config->get(Config::OPTION_MOVE_IDENTICAL_PATH, ResolveIdenticalPathConflict::TRY); if ($resolutionStrategy === ResolveIdenticalPathConflict::FAIL) { throw UnableToMoveFile::sourceAndDestinationAreTheSame($source, $destination); } elseif ($resolutionStrategy === ResolveIdenticalPathConflict::IGNORE) { return; } } $this->adapter->move($from, $to, $config); } public function copy(string $source, string $destination, array $config = []): void { $config = $this->config->extend($config); $from = $this->pathNormalizer->normalizePath($source); $to = $this->pathNormalizer->normalizePath($destination); if ($from === $to) { $resolutionStrategy = $config->get(Config::OPTION_COPY_IDENTICAL_PATH, ResolveIdenticalPathConflict::TRY); if ($resolutionStrategy === ResolveIdenticalPathConflict::FAIL) { throw UnableToCopyFile::sourceAndDestinationAreTheSame($source, $destination); } elseif ($resolutionStrategy === ResolveIdenticalPathConflict::IGNORE) { return; } } $this->adapter->copy($from, $to, $config); } public function lastModified(string $path): int { return $this->adapter->lastModified($this->pathNormalizer->normalizePath($path))->lastModified(); } public function fileSize(string $path): int { return $this->adapter->fileSize($this->pathNormalizer->normalizePath($path))->fileSize(); } public function mimeType(string $path): string { return $this->adapter->mimeType($this->pathNormalizer->normalizePath($path))->mimeType(); } public function setVisibility(string $path, string $visibility): void { $this->adapter->setVisibility($this->pathNormalizer->normalizePath($path), $visibility); } public function visibility(string $path): string { return $this->adapter->visibility($this->pathNormalizer->normalizePath($path))->visibility(); } public function publicUrl(string $path, array $config = []): string { $this->publicUrlGenerator ??= $this->resolvePublicUrlGenerator() ?: throw UnableToGeneratePublicUrl::noGeneratorConfigured($path); $config = $this->config->extend($config); return $this->publicUrlGenerator->publicUrl($path, $config); } public function temporaryUrl(string $path, DateTimeInterface $expiresAt, array $config = []): string { $generator = $this->temporaryUrlGenerator ?: $this->adapter; if ($generator instanceof TemporaryUrlGenerator) { return $generator->temporaryUrl($path, $expiresAt, $this->config->extend($config)); } throw UnableToGenerateTemporaryUrl::noGeneratorConfigured($path); } public function checksum(string $path, array $config = []): string { $config = $this->config->extend($config); if ( ! $this->adapter instanceof ChecksumProvider) { return $this->calculateChecksumFromStream($path, $config); } try { return $this->adapter->checksum($path, $config); } catch (ChecksumAlgoIsNotSupported) { return $this->calculateChecksumFromStream($path, $config); } } private function resolvePublicUrlGenerator(): ?PublicUrlGenerator { if ($publicUrl = $this->config->get('public_url')) { return match (true) { is_array($publicUrl) => new ShardedPrefixPublicUrlGenerator($publicUrl), default => new PrefixPublicUrlGenerator($publicUrl), }; } if ($this->adapter instanceof PublicUrlGenerator) { return $this->adapter; } return null; } /** * @param mixed $contents */ private function assertIsResource($contents): void { if (is_resource($contents) === false) { throw new InvalidStreamProvided( "Invalid stream provided, expected stream resource, received " . gettype($contents) ); } elseif ($type = get_resource_type($contents) !== 'stream') { throw new InvalidStreamProvided( "Invalid stream provided, expected stream resource, received resource of type " . $type ); } } /** * @param resource $resource */ private function rewindStream($resource): void { if (ftell($resource) !== 0 && stream_get_meta_data($resource)['seekable']) { rewind($resource); } } } PKCt[ n UnableToGenerateTemporaryUrl.phpnu[getMessage(), $path, $exception); } public static function noGeneratorConfigured(string $path, string $extraReason = ''): static { return new static('No generator was configured ' . $extraReason, $path); } } PKCt[K!"UnableToMountFilesystem.phpnu[filePublic : $this->filePrivate; } public function forDirectory(string $visibility): int { PortableVisibilityGuard::guardAgainstInvalidInput($visibility); return $visibility === Visibility::PUBLIC ? $this->directoryPublic : $this->directoryPrivate; } public function inverseForFile(int $visibility): string { if ($visibility === $this->filePublic) { return Visibility::PUBLIC; } elseif ($visibility === $this->filePrivate) { return Visibility::PRIVATE; } return Visibility::PUBLIC; // default } public function inverseForDirectory(int $visibility): string { if ($visibility === $this->directoryPublic) { return Visibility::PUBLIC; } elseif ($visibility === $this->directoryPrivate) { return Visibility::PRIVATE; } return Visibility::PUBLIC; // default } public function defaultForDirectories(): int { return $this->defaultForDirectories === Visibility::PUBLIC ? $this->directoryPublic : $this->directoryPrivate; } /** * @param array $permissionMap */ public static function fromArray(array $permissionMap, string $defaultForDirectories = Visibility::PRIVATE): PortableVisibilityConverter { return new PortableVisibilityConverter( $permissionMap['file']['public'] ?? 0644, $permissionMap['file']['private'] ?? 0600, $permissionMap['dir']['public'] ?? 0755, $permissionMap['dir']['private'] ?? 0700, $defaultForDirectories ); } } PKCt[Ea#UnableToCheckDirectoryExistence.phpnu[reason = $reason; $e->location = $location; $e->metadataType = $type; return $e; } public function reason(): string { return $this->reason; } public function location(): string { return $this->location; } public function metadataType(): string { return $this->metadataType; } public function operation(): string { return FilesystemOperationFailed::OPERATION_RETRIEVE_METADATA; } } PKCt[v,,UnreadableFileEncountered.phpnu[location; } public static function atLocation(string $location): UnreadableFileEncountered { $e = new static("Unreadable file encountered at location {$location}."); $e->location = $location; return $e; } } PKCt[\UnableToListContents.phpnu[getMessage(); return new UnableToListContents($message, 0, $previous); } public function operation(): string { return self::OPERATION_LIST_CONTENTS; } } PKCt[kPathNormalizer.phpnu[source; } public function destination(): string { return $this->destination; } public static function fromLocationTo( string $sourcePath, string $destinationPath, Throwable $previous = null ): UnableToMoveFile { $message = $previous?->getMessage() ?? "Unable to move file from $sourcePath to $destinationPath"; $e = new static($message, 0, $previous); $e->source = $sourcePath; $e->destination = $destinationPath; return $e; } public static function because( string $reason, string $sourcePath, string $destinationPath, ): UnableToMoveFile { $message = "Unable to move file from $sourcePath to $destinationPath, because $reason"; $e = new static($message); $e->source = $sourcePath; $e->destination = $destinationPath; return $e; } public function operation(): string { return FilesystemOperationFailed::OPERATION_MOVE; } } PKCt[XvUnableToCheckFileExistence.phpnu[QChecksumAlgoIsNotSupported.phpnu[reason; } public static function atLocation(string $filename, string $extraMessage = '', Throwable $previous = null): self { $message = "Unable to set visibility for file {$filename}. $extraMessage"; $e = new static(rtrim($message), 0, $previous); $e->reason = $extraMessage; $e->location = $filename; return $e; } public function operation(): string { return FilesystemOperationFailed::OPERATION_SET_VISIBILITY; } public function location(): string { return $this->location; } } PKCt[ OUnableToReadFile.phpnu[location = $location; $e->reason = $reason; return $e; } public function operation(): string { return FilesystemOperationFailed::OPERATION_READ; } public function reason(): string { return $this->reason; } public function location(): string { return $this->location; } } PKCt[[UnableToGeneratePublicUrl.phpnu[getMessage(), $path, $exception); } public static function noGeneratorConfigured(string $path, string $extraReason = ''): static { return new static('No generator was configured ' . $extraReason, $path); } } PKCt[1VPortableVisibilityGuard.phpnu[readStream($path); $algo = (string) $config->get('checksum_algo', 'md5'); $context = hash_init($algo); hash_update_stream($context, $stream); return hash_final($context); } catch (FilesystemException $exception) { throw new UnableToProvideChecksum($exception->getMessage(), $path, $exception); } } /** * @return resource */ abstract public function readStream(string $path); } PKCt[lk`UnableToDeleteFile.phpnu[location = $location; $e->reason = $reason; return $e; } public function operation(): string { return FilesystemOperationFailed::OPERATION_DELETE; } public function reason(): string { return $this->reason; } public function location(): string { return $this->location; } } PKCt[WhitespacePathNormalizer.phpnu[rejectFunkyWhiteSpace($path); return $this->normalizeRelativePath($path); } private function rejectFunkyWhiteSpace(string $path): void { if (preg_match('#\p{C}+#u', $path)) { throw CorruptedPathDetected::forPath($path); } } private function normalizeRelativePath(string $path): string { $parts = []; foreach (explode('/', $path) as $part) { switch ($part) { case '': case '.': break; case '..': if (empty($parts)) { throw PathTraversalDetected::forPath($path); } array_pop($parts); break; default: $parts[] = $part; break; } } return implode('/', $parts); } } PKCt[$F"UnableToResolveFilesystemMount.phpnu[prefix = rtrim($prefix, '\\/'); if ($this->prefix !== '' || $prefix === $separator) { $this->prefix .= $separator; } } public function prefixPath(string $path): string { return $this->prefix . ltrim($path, '\\/'); } public function stripPrefix(string $path): string { /* @var string */ return substr($path, strlen($this->prefix)); } public function stripDirectoryPrefix(string $path): string { return rtrim($this->stripPrefix($path), '\\/'); } public function prefixDirectoryPath(string $path): string { $prefixedPath = $this->prefixPath(rtrim($path, '\\/')); if ($prefixedPath === '' || substr($prefixedPath, -1) === $this->separator) { return $prefixedPath; } return $prefixedPath . $this->separator; } } PKCt[!-T ProxyArrayAccessToProperties.phpnu[formatPropertyName((string) $offset); return isset($this->{$property}); } /** * @param mixed $offset * * @return mixed */ #[\ReturnTypeWillChange] public function offsetGet($offset) { $property = $this->formatPropertyName((string) $offset); return $this->{$property}; } /** * @param mixed $offset * @param mixed $value */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value): void { throw new RuntimeException('Properties can not be manipulated'); } /** * @param mixed $offset */ #[\ReturnTypeWillChange] public function offsetUnset($offset): void { throw new RuntimeException('Properties can not be manipulated'); } } PKgt[M Carbon/List/regions.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * ISO 3166-2 */ return [ 'AD' => 'Andorra', 'AE' => 'United Arab Emirates', 'AF' => 'Afghanistan', 'AG' => 'Antigua and Barbuda', 'AI' => 'Anguilla', 'AL' => 'Albania', 'AM' => 'Armenia', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AR' => 'Argentina', 'AS' => 'American Samoa', 'AT' => 'Austria', 'AU' => 'Australia', 'AW' => 'Aruba', 'AX' => 'Åland Islands', 'AZ' => 'Azerbaijan', 'BA' => 'Bosnia and Herzegovina', 'BB' => 'Barbados', 'BD' => 'Bangladesh', 'BE' => 'Belgium', 'BF' => 'Burkina Faso', 'BG' => 'Bulgaria', 'BH' => 'Bahrain', 'BI' => 'Burundi', 'BJ' => 'Benin', 'BL' => 'Saint Barthélemy', 'BM' => 'Bermuda', 'BN' => 'Brunei Darussalam', 'BO' => 'Bolivia (Plurinational State of)', 'BQ' => 'Bonaire, Sint Eustatius and Saba', 'BR' => 'Brazil', 'BS' => 'Bahamas', 'BT' => 'Bhutan', 'BV' => 'Bouvet Island', 'BW' => 'Botswana', 'BY' => 'Belarus', 'BZ' => 'Belize', 'CA' => 'Canada', 'CC' => 'Cocos (Keeling) Islands', 'CD' => 'Congo, Democratic Republic of the', 'CF' => 'Central African Republic', 'CG' => 'Congo', 'CH' => 'Switzerland', 'CI' => 'Côte d\'Ivoire', 'CK' => 'Cook Islands', 'CL' => 'Chile', 'CM' => 'Cameroon', 'CN' => 'China', 'CO' => 'Colombia', 'CR' => 'Costa Rica', 'CU' => 'Cuba', 'CV' => 'Cabo Verde', 'CW' => 'Curaçao', 'CX' => 'Christmas Island', 'CY' => 'Cyprus', 'CZ' => 'Czechia', 'DE' => 'Germany', 'DJ' => 'Djibouti', 'DK' => 'Denmark', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'DZ' => 'Algeria', 'EC' => 'Ecuador', 'EE' => 'Estonia', 'EG' => 'Egypt', 'EH' => 'Western Sahara', 'ER' => 'Eritrea', 'ES' => 'Spain', 'ET' => 'Ethiopia', 'FI' => 'Finland', 'FJ' => 'Fiji', 'FK' => 'Falkland Islands (Malvinas)', 'FM' => 'Micronesia (Federated States of)', 'FO' => 'Faroe Islands', 'FR' => 'France', 'GA' => 'Gabon', 'GB' => 'United Kingdom of Great Britain and Northern Ireland', 'GD' => 'Grenada', 'GE' => 'Georgia', 'GF' => 'French Guiana', 'GG' => 'Guernsey', 'GH' => 'Ghana', 'GI' => 'Gibraltar', 'GL' => 'Greenland', 'GM' => 'Gambia', 'GN' => 'Guinea', 'GP' => 'Guadeloupe', 'GQ' => 'Equatorial Guinea', 'GR' => 'Greece', 'GS' => 'South Georgia and the South Sandwich Islands', 'GT' => 'Guatemala', 'GU' => 'Guam', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HK' => 'Hong Kong', 'HM' => 'Heard Island and McDonald Islands', 'HN' => 'Honduras', 'HR' => 'Croatia', 'HT' => 'Haiti', 'HU' => 'Hungary', 'ID' => 'Indonesia', 'IE' => 'Ireland', 'IL' => 'Israel', 'IM' => 'Isle of Man', 'IN' => 'India', 'IO' => 'British Indian Ocean Territory', 'IQ' => 'Iraq', 'IR' => 'Iran (Islamic Republic of)', 'IS' => 'Iceland', 'IT' => 'Italy', 'JE' => 'Jersey', 'JM' => 'Jamaica', 'JO' => 'Jordan', 'JP' => 'Japan', 'KE' => 'Kenya', 'KG' => 'Kyrgyzstan', 'KH' => 'Cambodia', 'KI' => 'Kiribati', 'KM' => 'Comoros', 'KN' => 'Saint Kitts and Nevis', 'KP' => 'Korea (Democratic People\'s Republic of)', 'KR' => 'Korea, Republic of', 'KW' => 'Kuwait', 'KY' => 'Cayman Islands', 'KZ' => 'Kazakhstan', 'LA' => 'Lao People\'s Democratic Republic', 'LB' => 'Lebanon', 'LC' => 'Saint Lucia', 'LI' => 'Liechtenstein', 'LK' => 'Sri Lanka', 'LR' => 'Liberia', 'LS' => 'Lesotho', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'LV' => 'Latvia', 'LY' => 'Libya', 'MA' => 'Morocco', 'MC' => 'Monaco', 'MD' => 'Moldova, Republic of', 'ME' => 'Montenegro', 'MF' => 'Saint Martin (French part)', 'MG' => 'Madagascar', 'MH' => 'Marshall Islands', 'MK' => 'Macedonia, the former Yugoslav Republic of', 'ML' => 'Mali', 'MM' => 'Myanmar', 'MN' => 'Mongolia', 'MO' => 'Macao', 'MP' => 'Northern Mariana Islands', 'MQ' => 'Martinique', 'MR' => 'Mauritania', 'MS' => 'Montserrat', 'MT' => 'Malta', 'MU' => 'Mauritius', 'MV' => 'Maldives', 'MW' => 'Malawi', 'MX' => 'Mexico', 'MY' => 'Malaysia', 'MZ' => 'Mozambique', 'NA' => 'Namibia', 'NC' => 'New Caledonia', 'NE' => 'Niger', 'NF' => 'Norfolk Island', 'NG' => 'Nigeria', 'NI' => 'Nicaragua', 'NL' => 'Netherlands', 'NO' => 'Norway', 'NP' => 'Nepal', 'NR' => 'Nauru', 'NU' => 'Niue', 'NZ' => 'New Zealand', 'OM' => 'Oman', 'PA' => 'Panama', 'PE' => 'Peru', 'PF' => 'French Polynesia', 'PG' => 'Papua New Guinea', 'PH' => 'Philippines', 'PK' => 'Pakistan', 'PL' => 'Poland', 'PM' => 'Saint Pierre and Miquelon', 'PN' => 'Pitcairn', 'PR' => 'Puerto Rico', 'PS' => 'Palestine, State of', 'PT' => 'Portugal', 'PW' => 'Palau', 'PY' => 'Paraguay', 'QA' => 'Qatar', 'RE' => 'Réunion', 'RO' => 'Romania', 'RS' => 'Serbia', 'RU' => 'Russian Federation', 'RW' => 'Rwanda', 'SA' => 'Saudi Arabia', 'SB' => 'Solomon Islands', 'SC' => 'Seychelles', 'SD' => 'Sudan', 'SE' => 'Sweden', 'SG' => 'Singapore', 'SH' => 'Saint Helena, Ascension and Tristan da Cunha', 'SI' => 'Slovenia', 'SJ' => 'Svalbard and Jan Mayen', 'SK' => 'Slovakia', 'SL' => 'Sierra Leone', 'SM' => 'San Marino', 'SN' => 'Senegal', 'SO' => 'Somalia', 'SR' => 'Suriname', 'SS' => 'South Sudan', 'ST' => 'Sao Tome and Principe', 'SV' => 'El Salvador', 'SX' => 'Sint Maarten (Dutch part)', 'SY' => 'Syrian Arab Republic', 'SZ' => 'Eswatini', 'TC' => 'Turks and Caicos Islands', 'TD' => 'Chad', 'TF' => 'French Southern Territories', 'TG' => 'Togo', 'TH' => 'Thailand', 'TJ' => 'Tajikistan', 'TK' => 'Tokelau', 'TL' => 'Timor-Leste', 'TM' => 'Turkmenistan', 'TN' => 'Tunisia', 'TO' => 'Tonga', 'TR' => 'Turkey', 'TT' => 'Trinidad and Tobago', 'TV' => 'Tuvalu', 'TW' => 'Taiwan, Province of China', 'TZ' => 'Tanzania, United Republic of', 'UA' => 'Ukraine', 'UG' => 'Uganda', 'UM' => 'United States Minor Outlying Islands', 'US' => 'United States of America', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VA' => 'Holy See', 'VC' => 'Saint Vincent and the Grenadines', 'VE' => 'Venezuela (Bolivarian Republic of)', 'VG' => 'Virgin Islands (British)', 'VI' => 'Virgin Islands (U.S.)', 'VN' => 'Viet Nam', 'VU' => 'Vanuatu', 'WF' => 'Wallis and Futuna', 'WS' => 'Samoa', 'YE' => 'Yemen', 'YT' => 'Mayotte', 'ZA' => 'South Africa', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe', ]; PKgt[ 'ssCarbon/List/languages.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return [ /* * ISO 639-2 */ 'ab' => [ 'isoName' => 'Abkhazian', 'nativeName' => 'аҧсуа бызшәа, аҧсшәа', ], 'aa' => [ 'isoName' => 'Afar', 'nativeName' => 'Afaraf', ], 'af' => [ 'isoName' => 'Afrikaans', 'nativeName' => 'Afrikaans', ], 'ak' => [ 'isoName' => 'Akan', 'nativeName' => 'Akan', ], 'sq' => [ 'isoName' => 'Albanian', 'nativeName' => 'Shqip', ], 'am' => [ 'isoName' => 'Amharic', 'nativeName' => 'አማርኛ', ], 'ar' => [ 'isoName' => 'Arabic', 'nativeName' => 'العربية', ], 'an' => [ 'isoName' => 'Aragonese', 'nativeName' => 'aragonés', ], 'hy' => [ 'isoName' => 'Armenian', 'nativeName' => 'Հայերեն', ], 'as' => [ 'isoName' => 'Assamese', 'nativeName' => 'অসমীয়া', ], 'av' => [ 'isoName' => 'Avaric', 'nativeName' => 'авар мацӀ, магӀарул мацӀ', ], 'ae' => [ 'isoName' => 'Avestan', 'nativeName' => 'avesta', ], 'ay' => [ 'isoName' => 'Aymara', 'nativeName' => 'aymar aru', ], 'az' => [ 'isoName' => 'Azerbaijani', 'nativeName' => 'azərbaycan dili', ], 'bm' => [ 'isoName' => 'Bambara', 'nativeName' => 'bamanankan', ], 'ba' => [ 'isoName' => 'Bashkir', 'nativeName' => 'башҡорт теле', ], 'eu' => [ 'isoName' => 'Basque', 'nativeName' => 'euskara, euskera', ], 'be' => [ 'isoName' => 'Belarusian', 'nativeName' => 'беларуская мова', ], 'bn' => [ 'isoName' => 'Bengali', 'nativeName' => 'বাংলা', ], 'bh' => [ 'isoName' => 'Bihari languages', 'nativeName' => 'भोजपुरी', ], 'bi' => [ 'isoName' => 'Bislama', 'nativeName' => 'Bislama', ], 'bs' => [ 'isoName' => 'Bosnian', 'nativeName' => 'bosanski jezik', ], 'br' => [ 'isoName' => 'Breton', 'nativeName' => 'brezhoneg', ], 'bg' => [ 'isoName' => 'Bulgarian', 'nativeName' => 'български език', ], 'my' => [ 'isoName' => 'Burmese', 'nativeName' => 'ဗမာစာ', ], 'ca' => [ 'isoName' => 'Catalan, Valencian', 'nativeName' => 'català, valencià', ], 'ch' => [ 'isoName' => 'Chamorro', 'nativeName' => 'Chamoru', ], 'ce' => [ 'isoName' => 'Chechen', 'nativeName' => 'нохчийн мотт', ], 'ny' => [ 'isoName' => 'Chichewa, Chewa, Nyanja', 'nativeName' => 'chiCheŵa, chinyanja', ], 'zh' => [ 'isoName' => 'Chinese', 'nativeName' => '中文 (Zhōngwén), 汉语, 漢語', ], 'cv' => [ 'isoName' => 'Chuvash', 'nativeName' => 'чӑваш чӗлхи', ], 'kw' => [ 'isoName' => 'Cornish', 'nativeName' => 'Kernewek', ], 'co' => [ 'isoName' => 'Corsican', 'nativeName' => 'corsu, lingua corsa', ], 'cr' => [ 'isoName' => 'Cree', 'nativeName' => 'ᓀᐦᐃᔭᐍᐏᐣ', ], 'hr' => [ 'isoName' => 'Croatian', 'nativeName' => 'hrvatski jezik', ], 'cs' => [ 'isoName' => 'Czech', 'nativeName' => 'čeština, český jazyk', ], 'da' => [ 'isoName' => 'Danish', 'nativeName' => 'dansk', ], 'dv' => [ 'isoName' => 'Divehi, Dhivehi, Maldivian', 'nativeName' => 'ދިވެހި', ], 'nl' => [ 'isoName' => 'Dutch, Flemish', 'nativeName' => 'Nederlands, Vlaams', ], 'dz' => [ 'isoName' => 'Dzongkha', 'nativeName' => 'རྫོང་ཁ', ], 'en' => [ 'isoName' => 'English', 'nativeName' => 'English', ], 'eo' => [ 'isoName' => 'Esperanto', 'nativeName' => 'Esperanto', ], 'et' => [ 'isoName' => 'Estonian', 'nativeName' => 'eesti, eesti keel', ], 'ee' => [ 'isoName' => 'Ewe', 'nativeName' => 'Eʋegbe', ], 'fo' => [ 'isoName' => 'Faroese', 'nativeName' => 'føroyskt', ], 'fj' => [ 'isoName' => 'Fijian', 'nativeName' => 'vosa Vakaviti', ], 'fi' => [ 'isoName' => 'Finnish', 'nativeName' => 'suomi, suomen kieli', ], 'fr' => [ 'isoName' => 'French', 'nativeName' => 'français', ], 'ff' => [ 'isoName' => 'Fulah', 'nativeName' => 'Fulfulde, Pulaar, Pular', ], 'gl' => [ 'isoName' => 'Galician', 'nativeName' => 'Galego', ], 'ka' => [ 'isoName' => 'Georgian', 'nativeName' => 'ქართული', ], 'de' => [ 'isoName' => 'German', 'nativeName' => 'Deutsch', ], 'el' => [ 'isoName' => 'Greek (modern)', 'nativeName' => 'ελληνικά', ], 'gn' => [ 'isoName' => 'Guaraní', 'nativeName' => 'Avañe\'ẽ', ], 'gu' => [ 'isoName' => 'Gujarati', 'nativeName' => 'ગુજરાતી', ], 'ht' => [ 'isoName' => 'Haitian, Haitian Creole', 'nativeName' => 'Kreyòl ayisyen', ], 'ha' => [ 'isoName' => 'Hausa', 'nativeName' => '(Hausa) هَوُسَ', ], 'he' => [ 'isoName' => 'Hebrew (modern)', 'nativeName' => 'עברית', ], 'hz' => [ 'isoName' => 'Herero', 'nativeName' => 'Otjiherero', ], 'hi' => [ 'isoName' => 'Hindi', 'nativeName' => 'हिन्दी, हिंदी', ], 'ho' => [ 'isoName' => 'Hiri Motu', 'nativeName' => 'Hiri Motu', ], 'hu' => [ 'isoName' => 'Hungarian', 'nativeName' => 'magyar', ], 'ia' => [ 'isoName' => 'Interlingua', 'nativeName' => 'Interlingua', ], 'id' => [ 'isoName' => 'Indonesian', 'nativeName' => 'Bahasa Indonesia', ], 'ie' => [ 'isoName' => 'Interlingue', 'nativeName' => 'Originally called Occidental; then Interlingue after WWII', ], 'ga' => [ 'isoName' => 'Irish', 'nativeName' => 'Gaeilge', ], 'ig' => [ 'isoName' => 'Igbo', 'nativeName' => 'Asụsụ Igbo', ], 'ik' => [ 'isoName' => 'Inupiaq', 'nativeName' => 'Iñupiaq, Iñupiatun', ], 'io' => [ 'isoName' => 'Ido', 'nativeName' => 'Ido', ], 'is' => [ 'isoName' => 'Icelandic', 'nativeName' => 'Íslenska', ], 'it' => [ 'isoName' => 'Italian', 'nativeName' => 'Italiano', ], 'iu' => [ 'isoName' => 'Inuktitut', 'nativeName' => 'ᐃᓄᒃᑎᑐᑦ', ], 'ja' => [ 'isoName' => 'Japanese', 'nativeName' => '日本語 (にほんご)', ], 'jv' => [ 'isoName' => 'Javanese', 'nativeName' => 'ꦧꦱꦗꦮ, Basa Jawa', ], 'kl' => [ 'isoName' => 'Kalaallisut, Greenlandic', 'nativeName' => 'kalaallisut, kalaallit oqaasii', ], 'kn' => [ 'isoName' => 'Kannada', 'nativeName' => 'ಕನ್ನಡ', ], 'kr' => [ 'isoName' => 'Kanuri', 'nativeName' => 'Kanuri', ], 'ks' => [ 'isoName' => 'Kashmiri', 'nativeName' => 'कश्मीरी, كشميري‎', ], 'kk' => [ 'isoName' => 'Kazakh', 'nativeName' => 'қазақ тілі', ], 'km' => [ 'isoName' => 'Central Khmer', 'nativeName' => 'ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ', ], 'ki' => [ 'isoName' => 'Kikuyu, Gikuyu', 'nativeName' => 'Gĩkũyũ', ], 'rw' => [ 'isoName' => 'Kinyarwanda', 'nativeName' => 'Ikinyarwanda', ], 'ky' => [ 'isoName' => 'Kirghiz, Kyrgyz', 'nativeName' => 'Кыргызча, Кыргыз тили', ], 'kv' => [ 'isoName' => 'Komi', 'nativeName' => 'коми кыв', ], 'kg' => [ 'isoName' => 'Kongo', 'nativeName' => 'Kikongo', ], 'ko' => [ 'isoName' => 'Korean', 'nativeName' => '한국어', ], 'ku' => [ 'isoName' => 'Kurdish', 'nativeName' => 'Kurdî, کوردی‎', ], 'kj' => [ 'isoName' => 'Kuanyama, Kwanyama', 'nativeName' => 'Kuanyama', ], 'la' => [ 'isoName' => 'Latin', 'nativeName' => 'latine, lingua latina', ], 'lb' => [ 'isoName' => 'Luxembourgish, Letzeburgesch', 'nativeName' => 'Lëtzebuergesch', ], 'lg' => [ 'isoName' => 'Ganda', 'nativeName' => 'Luganda', ], 'li' => [ 'isoName' => 'Limburgan, Limburger, Limburgish', 'nativeName' => 'Limburgs', ], 'ln' => [ 'isoName' => 'Lingala', 'nativeName' => 'Lingála', ], 'lo' => [ 'isoName' => 'Lao', 'nativeName' => 'ພາສາລາວ', ], 'lt' => [ 'isoName' => 'Lithuanian', 'nativeName' => 'lietuvių kalba', ], 'lu' => [ 'isoName' => 'Luba-Katanga', 'nativeName' => 'Kiluba', ], 'lv' => [ 'isoName' => 'Latvian', 'nativeName' => 'latviešu valoda', ], 'gv' => [ 'isoName' => 'Manx', 'nativeName' => 'Gaelg, Gailck', ], 'mk' => [ 'isoName' => 'Macedonian', 'nativeName' => 'македонски јазик', ], 'mg' => [ 'isoName' => 'Malagasy', 'nativeName' => 'fiteny malagasy', ], 'ms' => [ 'isoName' => 'Malay', 'nativeName' => 'Bahasa Melayu, بهاس ملايو‎', ], 'ml' => [ 'isoName' => 'Malayalam', 'nativeName' => 'മലയാളം', ], 'mt' => [ 'isoName' => 'Maltese', 'nativeName' => 'Malti', ], 'mi' => [ 'isoName' => 'Maori', 'nativeName' => 'te reo Māori', ], 'mr' => [ 'isoName' => 'Marathi', 'nativeName' => 'मराठी', ], 'mh' => [ 'isoName' => 'Marshallese', 'nativeName' => 'Kajin M̧ajeļ', ], 'mn' => [ 'isoName' => 'Mongolian', 'nativeName' => 'Монгол хэл', ], 'na' => [ 'isoName' => 'Nauru', 'nativeName' => 'Dorerin Naoero', ], 'nv' => [ 'isoName' => 'Navajo, Navaho', 'nativeName' => 'Diné bizaad', ], 'nd' => [ 'isoName' => 'North Ndebele', 'nativeName' => 'isiNdebele', ], 'ne' => [ 'isoName' => 'Nepali', 'nativeName' => 'नेपाली', ], 'ng' => [ 'isoName' => 'Ndonga', 'nativeName' => 'Owambo', ], 'nb' => [ 'isoName' => 'Norwegian Bokmål', 'nativeName' => 'Norsk Bokmål', ], 'nn' => [ 'isoName' => 'Norwegian Nynorsk', 'nativeName' => 'Norsk Nynorsk', ], 'no' => [ 'isoName' => 'Norwegian', 'nativeName' => 'Norsk', ], 'ii' => [ 'isoName' => 'Sichuan Yi, Nuosu', 'nativeName' => 'ꆈꌠ꒿ Nuosuhxop', ], 'nr' => [ 'isoName' => 'South Ndebele', 'nativeName' => 'isiNdebele', ], 'oc' => [ 'isoName' => 'Occitan', 'nativeName' => 'occitan, lenga d\'òc', ], 'oj' => [ 'isoName' => 'Ojibwa', 'nativeName' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ', ], 'cu' => [ 'isoName' => 'Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian', 'nativeName' => 'ѩзыкъ словѣньскъ', ], 'om' => [ 'isoName' => 'Oromo', 'nativeName' => 'Afaan Oromoo', ], 'or' => [ 'isoName' => 'Oriya', 'nativeName' => 'ଓଡ଼ିଆ', ], 'os' => [ 'isoName' => 'Ossetian, Ossetic', 'nativeName' => 'ирон æвзаг', ], 'pa' => [ 'isoName' => 'Panjabi, Punjabi', 'nativeName' => 'ਪੰਜਾਬੀ', ], 'pi' => [ 'isoName' => 'Pali', 'nativeName' => 'पाऴि', ], 'fa' => [ 'isoName' => 'Persian', 'nativeName' => 'فارسی', ], 'pl' => [ 'isoName' => 'Polish', 'nativeName' => 'język polski, polszczyzna', ], 'ps' => [ 'isoName' => 'Pashto, Pushto', 'nativeName' => 'پښتو', ], 'pt' => [ 'isoName' => 'Portuguese', 'nativeName' => 'Português', ], 'qu' => [ 'isoName' => 'Quechua', 'nativeName' => 'Runa Simi, Kichwa', ], 'rm' => [ 'isoName' => 'Romansh', 'nativeName' => 'Rumantsch Grischun', ], 'rn' => [ 'isoName' => 'Rundi', 'nativeName' => 'Ikirundi', ], 'ro' => [ 'isoName' => 'Romanian, Moldavian, Moldovan', 'nativeName' => 'Română', ], 'ru' => [ 'isoName' => 'Russian', 'nativeName' => 'русский', ], 'sa' => [ 'isoName' => 'Sanskrit', 'nativeName' => 'संस्कृतम्', ], 'sc' => [ 'isoName' => 'Sardinian', 'nativeName' => 'sardu', ], 'sd' => [ 'isoName' => 'Sindhi', 'nativeName' => 'सिन्धी, سنڌي، سندھی‎', ], 'se' => [ 'isoName' => 'Northern Sami', 'nativeName' => 'Davvisámegiella', ], 'sm' => [ 'isoName' => 'Samoan', 'nativeName' => 'gagana fa\'a Samoa', ], 'sg' => [ 'isoName' => 'Sango', 'nativeName' => 'yângâ tî sängö', ], 'sr' => [ 'isoName' => 'Serbian', 'nativeName' => 'српски језик', ], 'gd' => [ 'isoName' => 'Gaelic, Scottish Gaelic', 'nativeName' => 'Gàidhlig', ], 'sn' => [ 'isoName' => 'Shona', 'nativeName' => 'chiShona', ], 'si' => [ 'isoName' => 'Sinhala, Sinhalese', 'nativeName' => 'සිංහල', ], 'sk' => [ 'isoName' => 'Slovak', 'nativeName' => 'Slovenčina, Slovenský Jazyk', ], 'sl' => [ 'isoName' => 'Slovene', 'nativeName' => 'Slovenski Jezik, Slovenščina', ], 'so' => [ 'isoName' => 'Somali', 'nativeName' => 'Soomaaliga, af Soomaali', ], 'st' => [ 'isoName' => 'Southern Sotho', 'nativeName' => 'Sesotho', ], 'es' => [ 'isoName' => 'Spanish, Castilian', 'nativeName' => 'Español', ], 'su' => [ 'isoName' => 'Sundanese', 'nativeName' => 'Basa Sunda', ], 'sw' => [ 'isoName' => 'Swahili', 'nativeName' => 'Kiswahili', ], 'ss' => [ 'isoName' => 'Swati', 'nativeName' => 'SiSwati', ], 'sv' => [ 'isoName' => 'Swedish', 'nativeName' => 'Svenska', ], 'ta' => [ 'isoName' => 'Tamil', 'nativeName' => 'தமிழ்', ], 'te' => [ 'isoName' => 'Telugu', 'nativeName' => 'తెలుగు', ], 'tg' => [ 'isoName' => 'Tajik', 'nativeName' => 'тоҷикӣ, toçikī, تاجیکی‎', ], 'th' => [ 'isoName' => 'Thai', 'nativeName' => 'ไทย', ], 'ti' => [ 'isoName' => 'Tigrinya', 'nativeName' => 'ትግርኛ', ], 'bo' => [ 'isoName' => 'Tibetan', 'nativeName' => 'བོད་ཡིག', ], 'tk' => [ 'isoName' => 'Turkmen', 'nativeName' => 'Türkmen, Түркмен', ], 'tl' => [ 'isoName' => 'Tagalog', 'nativeName' => 'Wikang Tagalog', ], 'tn' => [ 'isoName' => 'Tswana', 'nativeName' => 'Setswana', ], 'to' => [ 'isoName' => 'Tongan (Tonga Islands)', 'nativeName' => 'Faka Tonga', ], 'tr' => [ 'isoName' => 'Turkish', 'nativeName' => 'Türkçe', ], 'ts' => [ 'isoName' => 'Tsonga', 'nativeName' => 'Xitsonga', ], 'tt' => [ 'isoName' => 'Tatar', 'nativeName' => 'татар теле, tatar tele', ], 'tw' => [ 'isoName' => 'Twi', 'nativeName' => 'Twi', ], 'ty' => [ 'isoName' => 'Tahitian', 'nativeName' => 'Reo Tahiti', ], 'ug' => [ 'isoName' => 'Uighur, Uyghur', 'nativeName' => 'Uyƣurqə, ‫ئۇيغۇرچ', ], 'uk' => [ 'isoName' => 'Ukrainian', 'nativeName' => 'Українська', ], 'ur' => [ 'isoName' => 'Urdu', 'nativeName' => 'اردو', ], 'uz' => [ 'isoName' => 'Uzbek', 'nativeName' => 'Oʻzbek, Ўзбек, أۇزبېك‎', ], 've' => [ 'isoName' => 'Venda', 'nativeName' => 'Tshivenḓa', ], 'vi' => [ 'isoName' => 'Vietnamese', 'nativeName' => 'Tiếng Việt', ], 'vo' => [ 'isoName' => 'Volapük', 'nativeName' => 'Volapük', ], 'wa' => [ 'isoName' => 'Walloon', 'nativeName' => 'Walon', ], 'cy' => [ 'isoName' => 'Welsh', 'nativeName' => 'Cymraeg', ], 'wo' => [ 'isoName' => 'Wolof', 'nativeName' => 'Wollof', ], 'fy' => [ 'isoName' => 'Western Frisian', 'nativeName' => 'Frysk', ], 'xh' => [ 'isoName' => 'Xhosa', 'nativeName' => 'isiXhosa', ], 'yi' => [ 'isoName' => 'Yiddish', 'nativeName' => 'ייִדיש', ], 'yo' => [ 'isoName' => 'Yoruba', 'nativeName' => 'Yorùbá', ], 'za' => [ 'isoName' => 'Zhuang, Chuang', 'nativeName' => 'Saɯ cueŋƅ, Saw cuengh', ], 'zu' => [ 'isoName' => 'Zulu', 'nativeName' => 'isiZulu', ], /* * Add ISO 639-3 languages available in Carbon */ 'agq' => [ 'isoName' => 'Aghem', 'nativeName' => 'Aghem', ], 'agr' => [ 'isoName' => 'Aguaruna', 'nativeName' => 'Aguaruna', ], 'anp' => [ 'isoName' => 'Angika', 'nativeName' => 'Angika', ], 'asa' => [ 'isoName' => 'Asu', 'nativeName' => 'Asu', ], 'ast' => [ 'isoName' => 'Asturian', 'nativeName' => 'Asturian', ], 'ayc' => [ 'isoName' => 'Southern Aymara', 'nativeName' => 'Southern Aymara', ], 'bas' => [ 'isoName' => 'Basaa', 'nativeName' => 'Basaa', ], 'bem' => [ 'isoName' => 'Bemba', 'nativeName' => 'Bemba', ], 'bez' => [ 'isoName' => 'Bena', 'nativeName' => 'Bena', ], 'bhb' => [ 'isoName' => 'Bhili', 'nativeName' => 'Bhili', ], 'bho' => [ 'isoName' => 'Bhojpuri', 'nativeName' => 'Bhojpuri', ], 'brx' => [ 'isoName' => 'Bodo', 'nativeName' => 'Bodo', ], 'byn' => [ 'isoName' => 'Bilin', 'nativeName' => 'Bilin', ], 'ccp' => [ 'isoName' => 'Chakma', 'nativeName' => 'Chakma', ], 'cgg' => [ 'isoName' => 'Chiga', 'nativeName' => 'Chiga', ], 'chr' => [ 'isoName' => 'Cherokee', 'nativeName' => 'Cherokee', ], 'cmn' => [ 'isoName' => 'Chinese', 'nativeName' => 'Chinese', ], 'crh' => [ 'isoName' => 'Crimean Turkish', 'nativeName' => 'Crimean Turkish', ], 'csb' => [ 'isoName' => 'Kashubian', 'nativeName' => 'Kashubian', ], 'dav' => [ 'isoName' => 'Taita', 'nativeName' => 'Taita', ], 'dje' => [ 'isoName' => 'Zarma', 'nativeName' => 'Zarma', ], 'doi' => [ 'isoName' => 'Dogri (macrolanguage)', 'nativeName' => 'Dogri (macrolanguage)', ], 'dsb' => [ 'isoName' => 'Lower Sorbian', 'nativeName' => 'Lower Sorbian', ], 'dua' => [ 'isoName' => 'Duala', 'nativeName' => 'Duala', ], 'dyo' => [ 'isoName' => 'Jola-Fonyi', 'nativeName' => 'Jola-Fonyi', ], 'ebu' => [ 'isoName' => 'Embu', 'nativeName' => 'Embu', ], 'ewo' => [ 'isoName' => 'Ewondo', 'nativeName' => 'Ewondo', ], 'fil' => [ 'isoName' => 'Filipino', 'nativeName' => 'Filipino', ], 'fur' => [ 'isoName' => 'Friulian', 'nativeName' => 'Friulian', ], 'gez' => [ 'isoName' => 'Geez', 'nativeName' => 'Geez', ], 'gom' => [ 'isoName' => 'Konkani, Goan', 'nativeName' => 'ಕೊಂಕಣಿ', ], 'gsw' => [ 'isoName' => 'Swiss German', 'nativeName' => 'Swiss German', ], 'guz' => [ 'isoName' => 'Gusii', 'nativeName' => 'Gusii', ], 'hak' => [ 'isoName' => 'Hakka Chinese', 'nativeName' => 'Hakka Chinese', ], 'haw' => [ 'isoName' => 'Hawaiian', 'nativeName' => 'Hawaiian', ], 'hif' => [ 'isoName' => 'Fiji Hindi', 'nativeName' => 'Fiji Hindi', ], 'hne' => [ 'isoName' => 'Chhattisgarhi', 'nativeName' => 'Chhattisgarhi', ], 'hsb' => [ 'isoName' => 'Upper Sorbian', 'nativeName' => 'Upper Sorbian', ], 'jgo' => [ 'isoName' => 'Ngomba', 'nativeName' => 'Ngomba', ], 'jmc' => [ 'isoName' => 'Machame', 'nativeName' => 'Machame', ], 'kab' => [ 'isoName' => 'Kabyle', 'nativeName' => 'Kabyle', ], 'kam' => [ 'isoName' => 'Kamba', 'nativeName' => 'Kamba', ], 'kde' => [ 'isoName' => 'Makonde', 'nativeName' => 'Makonde', ], 'kea' => [ 'isoName' => 'Kabuverdianu', 'nativeName' => 'Kabuverdianu', ], 'khq' => [ 'isoName' => 'Koyra Chiini', 'nativeName' => 'Koyra Chiini', ], 'kkj' => [ 'isoName' => 'Kako', 'nativeName' => 'Kako', ], 'kln' => [ 'isoName' => 'Kalenjin', 'nativeName' => 'Kalenjin', ], 'kok' => [ 'isoName' => 'Konkani', 'nativeName' => 'Konkani', ], 'ksb' => [ 'isoName' => 'Shambala', 'nativeName' => 'Shambala', ], 'ksf' => [ 'isoName' => 'Bafia', 'nativeName' => 'Bafia', ], 'ksh' => [ 'isoName' => 'Colognian', 'nativeName' => 'Colognian', ], 'lag' => [ 'isoName' => 'Langi', 'nativeName' => 'Langi', ], 'lij' => [ 'isoName' => 'Ligurian', 'nativeName' => 'Ligurian', ], 'lkt' => [ 'isoName' => 'Lakota', 'nativeName' => 'Lakota', ], 'lrc' => [ 'isoName' => 'Northern Luri', 'nativeName' => 'Northern Luri', ], 'luo' => [ 'isoName' => 'Luo', 'nativeName' => 'Luo', ], 'luy' => [ 'isoName' => 'Luyia', 'nativeName' => 'Luyia', ], 'lzh' => [ 'isoName' => 'Literary Chinese', 'nativeName' => 'Literary Chinese', ], 'mag' => [ 'isoName' => 'Magahi', 'nativeName' => 'Magahi', ], 'mai' => [ 'isoName' => 'Maithili', 'nativeName' => 'Maithili', ], 'mas' => [ 'isoName' => 'Masai', 'nativeName' => 'Masai', ], 'mer' => [ 'isoName' => 'Meru', 'nativeName' => 'Meru', ], 'mfe' => [ 'isoName' => 'Morisyen', 'nativeName' => 'Morisyen', ], 'mgh' => [ 'isoName' => 'Makhuwa-Meetto', 'nativeName' => 'Makhuwa-Meetto', ], 'mgo' => [ 'isoName' => 'Metaʼ', 'nativeName' => 'Metaʼ', ], 'mhr' => [ 'isoName' => 'Eastern Mari', 'nativeName' => 'Eastern Mari', ], 'miq' => [ 'isoName' => 'Mískito', 'nativeName' => 'Mískito', ], 'mjw' => [ 'isoName' => 'Karbi', 'nativeName' => 'Karbi', ], 'mni' => [ 'isoName' => 'Manipuri', 'nativeName' => 'Manipuri', ], 'mua' => [ 'isoName' => 'Mundang', 'nativeName' => 'Mundang', ], 'mzn' => [ 'isoName' => 'Mazanderani', 'nativeName' => 'Mazanderani', ], 'nan' => [ 'isoName' => 'Min Nan Chinese', 'nativeName' => 'Min Nan Chinese', ], 'naq' => [ 'isoName' => 'Nama', 'nativeName' => 'Nama', ], 'nds' => [ 'isoName' => 'Low German', 'nativeName' => 'Low German', ], 'nhn' => [ 'isoName' => 'Central Nahuatl', 'nativeName' => 'Central Nahuatl', ], 'niu' => [ 'isoName' => 'Niuean', 'nativeName' => 'Niuean', ], 'nmg' => [ 'isoName' => 'Kwasio', 'nativeName' => 'Kwasio', ], 'nnh' => [ 'isoName' => 'Ngiemboon', 'nativeName' => 'Ngiemboon', ], 'nso' => [ 'isoName' => 'Northern Sotho', 'nativeName' => 'Northern Sotho', ], 'nus' => [ 'isoName' => 'Nuer', 'nativeName' => 'Nuer', ], 'nyn' => [ 'isoName' => 'Nyankole', 'nativeName' => 'Nyankole', ], 'pap' => [ 'isoName' => 'Papiamento', 'nativeName' => 'Papiamento', ], 'prg' => [ 'isoName' => 'Prussian', 'nativeName' => 'Prussian', ], 'quz' => [ 'isoName' => 'Cusco Quechua', 'nativeName' => 'Cusco Quechua', ], 'raj' => [ 'isoName' => 'Rajasthani', 'nativeName' => 'Rajasthani', ], 'rof' => [ 'isoName' => 'Rombo', 'nativeName' => 'Rombo', ], 'rwk' => [ 'isoName' => 'Rwa', 'nativeName' => 'Rwa', ], 'sah' => [ 'isoName' => 'Sakha', 'nativeName' => 'Sakha', ], 'saq' => [ 'isoName' => 'Samburu', 'nativeName' => 'Samburu', ], 'sat' => [ 'isoName' => 'Santali', 'nativeName' => 'Santali', ], 'sbp' => [ 'isoName' => 'Sangu', 'nativeName' => 'Sangu', ], 'scr' => [ 'isoName' => 'Serbo Croatian', 'nativeName' => 'Serbo Croatian', ], 'seh' => [ 'isoName' => 'Sena', 'nativeName' => 'Sena', ], 'ses' => [ 'isoName' => 'Koyraboro Senni', 'nativeName' => 'Koyraboro Senni', ], 'sgs' => [ 'isoName' => 'Samogitian', 'nativeName' => 'Samogitian', ], 'shi' => [ 'isoName' => 'Tachelhit', 'nativeName' => 'Tachelhit', ], 'shn' => [ 'isoName' => 'Shan', 'nativeName' => 'Shan', ], 'shs' => [ 'isoName' => 'Shuswap', 'nativeName' => 'Shuswap', ], 'sid' => [ 'isoName' => 'Sidamo', 'nativeName' => 'Sidamo', ], 'smn' => [ 'isoName' => 'Inari Sami', 'nativeName' => 'Inari Sami', ], 'szl' => [ 'isoName' => 'Silesian', 'nativeName' => 'Silesian', ], 'tcy' => [ 'isoName' => 'Tulu', 'nativeName' => 'Tulu', ], 'teo' => [ 'isoName' => 'Teso', 'nativeName' => 'Teso', ], 'tet' => [ 'isoName' => 'Tetum', 'nativeName' => 'Tetum', ], 'the' => [ 'isoName' => 'Chitwania Tharu', 'nativeName' => 'Chitwania Tharu', ], 'tig' => [ 'isoName' => 'Tigre', 'nativeName' => 'Tigre', ], 'tlh' => [ 'isoName' => 'Klingon', 'nativeName' => 'tlhIngan Hol', ], 'tpi' => [ 'isoName' => 'Tok Pisin', 'nativeName' => 'Tok Pisin', ], 'twq' => [ 'isoName' => 'Tasawaq', 'nativeName' => 'Tasawaq', ], 'tzl' => [ 'isoName' => 'Talossan', 'nativeName' => 'Talossan', ], 'tzm' => [ 'isoName' => 'Tamazight, Central Atlas', 'nativeName' => 'ⵜⵎⴰⵣⵉⵖⵜ', ], 'unm' => [ 'isoName' => 'Unami', 'nativeName' => 'Unami', ], 'vai' => [ 'isoName' => 'Vai', 'nativeName' => 'Vai', ], 'vun' => [ 'isoName' => 'Vunjo', 'nativeName' => 'Vunjo', ], 'wae' => [ 'isoName' => 'Walser', 'nativeName' => 'Walser', ], 'wal' => [ 'isoName' => 'Wolaytta', 'nativeName' => 'Wolaytta', ], 'xog' => [ 'isoName' => 'Soga', 'nativeName' => 'Soga', ], 'yav' => [ 'isoName' => 'Yangben', 'nativeName' => 'Yangben', ], 'yue' => [ 'isoName' => 'Cantonese', 'nativeName' => 'Cantonese', ], 'yuw' => [ 'isoName' => 'Yau (Morobe Province)', 'nativeName' => 'Yau (Morobe Province)', ], 'zgh' => [ 'isoName' => 'Standard Moroccan Tamazight', 'nativeName' => 'Standard Moroccan Tamazight', ], ]; PKgt[=K Carbon/CarbonPeriodImmutable.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; class CarbonPeriodImmutable extends CarbonPeriod { /** * Date class of iteration items. * * @var string */ protected $dateClass = CarbonImmutable::class; /** * Prepare the instance to be set (self if mutable to be mutated, * copy if immutable to generate a new instance). * * @return static */ protected function copyIfImmutable() { return $this->constructed ? clone $this : $this; } } PKgt[=TضCarbon/Carbon.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Carbon\Traits\Date; use Carbon\Traits\DeprecatedProperties; use DateTime; use DateTimeInterface; use DateTimeZone; /** * A simple API extension for DateTime. * * @mixin DeprecatedProperties * * * * @property int $year * @property int $yearIso * @property int $month * @property int $day * @property int $hour * @property int $minute * @property int $second * @property int $micro * @property int $microsecond * @property int|float|string $timestamp seconds since the Unix Epoch * @property string $englishDayOfWeek the day of week in English * @property string $shortEnglishDayOfWeek the abbreviated day of week in English * @property string $englishMonth the month in English * @property string $shortEnglishMonth the abbreviated month in English * @property int $milliseconds * @property int $millisecond * @property int $milli * @property int $week 1 through 53 * @property int $isoWeek 1 through 53 * @property int $weekYear year according to week format * @property int $isoWeekYear year according to ISO week format * @property int $dayOfYear 1 through 366 * @property int $age does a diffInYears() with default parameters * @property int $offset the timezone offset in seconds from UTC * @property int $offsetMinutes the timezone offset in minutes from UTC * @property int $offsetHours the timezone offset in hours from UTC * @property CarbonTimeZone $timezone the current timezone * @property CarbonTimeZone $tz alias of $timezone * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday * @property-read int $daysInMonth number of days in the given month * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language * @property-read int $noZeroHour current hour from 1 to 24 * @property-read int $weeksInYear 51 through 53 * @property-read int $isoWeeksInYear 51 through 53 * @property-read int $weekOfMonth 1 through 5 * @property-read int $weekNumberInMonth 1 through 5 * @property-read int $firstWeekDay 0 through 6 * @property-read int $lastWeekDay 0 through 6 * @property-read int $daysInYear 365 or 366 * @property-read int $quarter the quarter of this instance, 1 - 4 * @property-read int $decade the decade of this instance * @property-read int $century the century of this instance * @property-read int $millennium the millennium of this instance * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise * @property-read bool $local checks if the timezone is local, true if local, false otherwise * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise * @property-read string $timezoneName the current timezone name * @property-read string $tzName alias of $timezoneName * @property-read string $locale locale of the current instance * * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) * @method bool isLocal() Check if the current instance has non-UTC timezone. * @method bool isValid() Check if the current instance is a valid date. * @method bool isDST() Check if the current instance is in a daylight saving time. * @method bool isSunday() Checks if the instance day is sunday. * @method bool isMonday() Checks if the instance day is monday. * @method bool isTuesday() Checks if the instance day is tuesday. * @method bool isWednesday() Checks if the instance day is wednesday. * @method bool isThursday() Checks if the instance day is thursday. * @method bool isFriday() Checks if the instance day is friday. * @method bool isSaturday() Checks if the instance day is saturday. * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. * @method $this years(int $value) Set current instance year to the given value. * @method $this year(int $value) Set current instance year to the given value. * @method $this setYears(int $value) Set current instance year to the given value. * @method $this setYear(int $value) Set current instance year to the given value. * @method $this months(int $value) Set current instance month to the given value. * @method $this month(int $value) Set current instance month to the given value. * @method $this setMonths(int $value) Set current instance month to the given value. * @method $this setMonth(int $value) Set current instance month to the given value. * @method $this days(int $value) Set current instance day to the given value. * @method $this day(int $value) Set current instance day to the given value. * @method $this setDays(int $value) Set current instance day to the given value. * @method $this setDay(int $value) Set current instance day to the given value. * @method $this hours(int $value) Set current instance hour to the given value. * @method $this hour(int $value) Set current instance hour to the given value. * @method $this setHours(int $value) Set current instance hour to the given value. * @method $this setHour(int $value) Set current instance hour to the given value. * @method $this minutes(int $value) Set current instance minute to the given value. * @method $this minute(int $value) Set current instance minute to the given value. * @method $this setMinutes(int $value) Set current instance minute to the given value. * @method $this setMinute(int $value) Set current instance minute to the given value. * @method $this seconds(int $value) Set current instance second to the given value. * @method $this second(int $value) Set current instance second to the given value. * @method $this setSeconds(int $value) Set current instance second to the given value. * @method $this setSecond(int $value) Set current instance second to the given value. * @method $this millis(int $value) Set current instance millisecond to the given value. * @method $this milli(int $value) Set current instance millisecond to the given value. * @method $this setMillis(int $value) Set current instance millisecond to the given value. * @method $this setMilli(int $value) Set current instance millisecond to the given value. * @method $this milliseconds(int $value) Set current instance millisecond to the given value. * @method $this millisecond(int $value) Set current instance millisecond to the given value. * @method $this setMilliseconds(int $value) Set current instance millisecond to the given value. * @method $this setMillisecond(int $value) Set current instance millisecond to the given value. * @method $this micros(int $value) Set current instance microsecond to the given value. * @method $this micro(int $value) Set current instance microsecond to the given value. * @method $this setMicros(int $value) Set current instance microsecond to the given value. * @method $this setMicro(int $value) Set current instance microsecond to the given value. * @method $this microseconds(int $value) Set current instance microsecond to the given value. * @method $this microsecond(int $value) Set current instance microsecond to the given value. * @method $this setMicroseconds(int $value) Set current instance microsecond to the given value. * @method $this setMicrosecond(int $value) Set current instance microsecond to the given value. * @method $this addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). * @method $this addYear() Add one year to the instance (using date interval). * @method $this subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). * @method $this subYear() Sub one year to the instance (using date interval). * @method $this addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. * @method $this subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. * @method $this addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method $this subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method $this addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method $this subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method $this addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method $this subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). * @method $this addMonth() Add one month to the instance (using date interval). * @method $this subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). * @method $this subMonth() Sub one month to the instance (using date interval). * @method $this addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. * @method $this subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. * @method $this addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method $this addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). * @method $this addDay() Add one day to the instance (using date interval). * @method $this subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). * @method $this subDay() Sub one day to the instance (using date interval). * @method $this addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). * @method $this addHour() Add one hour to the instance (using date interval). * @method $this subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). * @method $this subHour() Sub one hour to the instance (using date interval). * @method $this addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). * @method $this addMinute() Add one minute to the instance (using date interval). * @method $this subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). * @method $this subMinute() Sub one minute to the instance (using date interval). * @method $this addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). * @method $this addSecond() Add one second to the instance (using date interval). * @method $this subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). * @method $this subSecond() Sub one second to the instance (using date interval). * @method $this addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). * @method $this addMilli() Add one millisecond to the instance (using date interval). * @method $this subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). * @method $this subMilli() Sub one millisecond to the instance (using date interval). * @method $this addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). * @method $this addMillisecond() Add one millisecond to the instance (using date interval). * @method $this subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). * @method $this subMillisecond() Sub one millisecond to the instance (using date interval). * @method $this addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). * @method $this addMicro() Add one microsecond to the instance (using date interval). * @method $this subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). * @method $this subMicro() Sub one microsecond to the instance (using date interval). * @method $this addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). * @method $this addMicrosecond() Add one microsecond to the instance (using date interval). * @method $this subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). * @method $this subMicrosecond() Sub one microsecond to the instance (using date interval). * @method $this addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). * @method $this addMillennium() Add one millennium to the instance (using date interval). * @method $this subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). * @method $this subMillennium() Sub one millennium to the instance (using date interval). * @method $this addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. * @method $this subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. * @method $this addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method $this addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). * @method $this addCentury() Add one century to the instance (using date interval). * @method $this subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). * @method $this subCentury() Sub one century to the instance (using date interval). * @method $this addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. * @method $this subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. * @method $this addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method $this subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method $this addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method $this subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method $this addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method $this subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method $this addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). * @method $this addDecade() Add one decade to the instance (using date interval). * @method $this subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). * @method $this subDecade() Sub one decade to the instance (using date interval). * @method $this addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. * @method $this subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. * @method $this addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method $this subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method $this addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method $this subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method $this addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method $this subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method $this addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). * @method $this addQuarter() Add one quarter to the instance (using date interval). * @method $this subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). * @method $this subQuarter() Sub one quarter to the instance (using date interval). * @method $this addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. * @method $this subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method $this subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. * @method $this addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method $this subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method $this addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method $this subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method $this addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method $this subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method $this subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method $this addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). * @method $this addWeek() Add one week to the instance (using date interval). * @method $this subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). * @method $this subWeek() Sub one week to the instance (using date interval). * @method $this addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). * @method $this addWeekday() Add one weekday to the instance (using date interval). * @method $this subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). * @method $this subWeekday() Sub one weekday to the instance (using date interval). * @method $this addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). * @method $this addRealMicro() Add one microsecond to the instance (using timestamp). * @method $this subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). * @method $this subRealMicro() Sub one microsecond to the instance (using timestamp). * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. * @method $this addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). * @method $this addRealMicrosecond() Add one microsecond to the instance (using timestamp). * @method $this subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). * @method $this subRealMicrosecond() Sub one microsecond to the instance (using timestamp). * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. * @method $this addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). * @method $this addRealMilli() Add one millisecond to the instance (using timestamp). * @method $this subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). * @method $this subRealMilli() Sub one millisecond to the instance (using timestamp). * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. * @method $this addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). * @method $this addRealMillisecond() Add one millisecond to the instance (using timestamp). * @method $this subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). * @method $this subRealMillisecond() Sub one millisecond to the instance (using timestamp). * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. * @method $this addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). * @method $this addRealSecond() Add one second to the instance (using timestamp). * @method $this subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). * @method $this subRealSecond() Sub one second to the instance (using timestamp). * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. * @method $this addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). * @method $this addRealMinute() Add one minute to the instance (using timestamp). * @method $this subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). * @method $this subRealMinute() Sub one minute to the instance (using timestamp). * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. * @method $this addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). * @method $this addRealHour() Add one hour to the instance (using timestamp). * @method $this subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). * @method $this subRealHour() Sub one hour to the instance (using timestamp). * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. * @method $this addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). * @method $this addRealDay() Add one day to the instance (using timestamp). * @method $this subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). * @method $this subRealDay() Sub one day to the instance (using timestamp). * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. * @method $this addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). * @method $this addRealWeek() Add one week to the instance (using timestamp). * @method $this subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). * @method $this subRealWeek() Sub one week to the instance (using timestamp). * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. * @method $this addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). * @method $this addRealMonth() Add one month to the instance (using timestamp). * @method $this subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). * @method $this subRealMonth() Sub one month to the instance (using timestamp). * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. * @method $this addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). * @method $this addRealQuarter() Add one quarter to the instance (using timestamp). * @method $this subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). * @method $this subRealQuarter() Sub one quarter to the instance (using timestamp). * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. * @method $this addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). * @method $this addRealYear() Add one year to the instance (using timestamp). * @method $this subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). * @method $this subRealYear() Sub one year to the instance (using timestamp). * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. * @method $this addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). * @method $this addRealDecade() Add one decade to the instance (using timestamp). * @method $this subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). * @method $this subRealDecade() Sub one decade to the instance (using timestamp). * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. * @method $this addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). * @method $this addRealCentury() Add one century to the instance (using timestamp). * @method $this subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). * @method $this subRealCentury() Sub one century to the instance (using timestamp). * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. * @method $this addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). * @method $this addRealMillennium() Add one millennium to the instance (using timestamp). * @method $this subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). * @method $this subRealMillennium() Sub one millennium to the instance (using timestamp). * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. * @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision. * @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision. * @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision. * @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision. * @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision. * @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision. * @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision. * @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision. * @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision. * @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision. * @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision. * @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision. * @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision. * @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision. * @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision. * @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision. * @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. * @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. * @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. * @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision. * @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision. * @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision. * @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. * @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. * @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. * @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. * @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. * @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision. * @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision. * @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision. * @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. * @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision. * @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision. * @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. * @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. * @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. * @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. * @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. * @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. * @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. * @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. * @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. * @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. * @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method static static|false createFromFormat(string $format, string $time, DateTimeZone|string|false|null $timezone = null) Parse a string into a new Carbon object according to the specified format. * @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php * * */ class Carbon extends DateTime implements CarbonInterface { use Date; /** * Returns true if the current class/instance is mutable. * * @return bool */ public static function isMutable() { return true; } } PKgt[FEE,Carbon/Exceptions/BadMethodCallException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; interface BadMethodCallException extends Exception { // } PKgt[(*Carbon/Exceptions/InvalidCastException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidCastException extends BaseInvalidArgumentException implements InvalidArgumentException { // } PKgt[Q{,Carbon/Exceptions/EndLessPeriodException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use RuntimeException as BaseRuntimeException; final class EndLessPeriodException extends BaseRuntimeException implements RuntimeException { // } PKgt[?*Carbon/Exceptions/UnknownUnitException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use Throwable; class UnknownUnitException extends UnitException { /** * The unit. * * @var string */ protected $unit; /** * Constructor. * * @param string $unit * @param int $code * @param Throwable|null $previous */ public function __construct($unit, $code = 0, Throwable $previous = null) { $this->unit = $unit; parent::__construct("Unknown unit '$unit'.", $code, $previous); } /** * Get the unit. * * @return string */ public function getUnit(): string { return $this->unit; } } PKgt[.Carbon/Exceptions/InvalidIntervalException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidIntervalException extends BaseInvalidArgumentException implements InvalidArgumentException { // } PKgt[Yy''3Carbon/Exceptions/BadFluentConstructorException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; use Throwable; class BadFluentConstructorException extends BaseBadMethodCallException implements BadMethodCallException { /** * The method. * * @var string */ protected $method; /** * Constructor. * * @param string $method * @param int $code * @param Throwable|null $previous */ public function __construct($method, $code = 0, Throwable $previous = null) { $this->method = $method; parent::__construct(sprintf("Unknown fluent constructor '%s'.", $method), $code, $previous); } /** * Get the method. * * @return string */ public function getMethod(): string { return $this->method; } } PKgt[_V*Carbon/Exceptions/InvalidTypeException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidTypeException extends BaseInvalidArgumentException implements InvalidArgumentException { // } PKgt[(0Carbon/Exceptions/UnitNotConfiguredException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use Throwable; class UnitNotConfiguredException extends UnitException { /** * The unit. * * @var string */ protected $unit; /** * Constructor. * * @param string $unit * @param int $code * @param Throwable|null $previous */ public function __construct($unit, $code = 0, Throwable $previous = null) { $this->unit = $unit; parent::__construct("Unit $unit have no configuration to get total from other units.", $code, $previous); } /** * Get the unit. * * @return string */ public function getUnit(): string { return $this->unit; } } PKgt[Lb#Carbon/Exceptions/UnitException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; class UnitException extends BaseInvalidArgumentException implements InvalidArgumentException { // } PKgt[J)Carbon/Exceptions/OutOfRangeException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; use Throwable; // This will extends OutOfRangeException instead of InvalidArgumentException since 3.0.0 // use OutOfRangeException as BaseOutOfRangeException; class OutOfRangeException extends BaseInvalidArgumentException implements InvalidArgumentException { /** * The unit or name of the value. * * @var string */ private $unit; /** * The range minimum. * * @var mixed */ private $min; /** * The range maximum. * * @var mixed */ private $max; /** * The invalid value. * * @var mixed */ private $value; /** * Constructor. * * @param string $unit * @param mixed $min * @param mixed $max * @param mixed $value * @param int $code * @param Throwable|null $previous */ public function __construct($unit, $min, $max, $value, $code = 0, Throwable $previous = null) { $this->unit = $unit; $this->min = $min; $this->max = $max; $this->value = $value; parent::__construct("$unit must be between $min and $max, $value given", $code, $previous); } /** * @return mixed */ public function getMax() { return $this->max; } /** * @return mixed */ public function getMin() { return $this->min; } /** * @return mixed */ public function getUnit() { return $this->unit; } /** * @return mixed */ public function getValue() { return $this->value; } } PKgt[)&&Carbon/Exceptions/Exception.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; interface Exception { // } PKgt[C(Carbon/Exceptions/ImmutableException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use RuntimeException as BaseRuntimeException; use Throwable; class ImmutableException extends BaseRuntimeException implements RuntimeException { /** * The value. * * @var string */ protected $value; /** * Constructor. * * @param string $value the immutable type/value * @param int $code * @param Throwable|null $previous */ public function __construct($value, $code = 0, Throwable $previous = null) { $this->value = $value; parent::__construct("$value is immutable.", $code, $previous); } /** * Get the value. * * @return string */ public function getValue(): string { return $this->value; } } PKgt[c-Carbon/Exceptions/NotLocaleAwareException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; use Throwable; class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException { /** * Constructor. * * @param mixed $object * @param int $code * @param Throwable|null $previous */ public function __construct($object, $code = 0, Throwable $previous = null) { $dump = \is_object($object) ? \get_class($object) : \gettype($object); parent::__construct("$dump does neither implements Symfony\Contracts\Translation\LocaleAwareInterface nor getLocale() method.", $code, $previous); } } PKgt[&L0Carbon/Exceptions/BadComparisonUnitException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use Throwable; class BadComparisonUnitException extends UnitException { /** * The unit. * * @var string */ protected $unit; /** * Constructor. * * @param string $unit * @param int $code * @param Throwable|null $previous */ public function __construct($unit, $code = 0, Throwable $previous = null) { $this->unit = $unit; parent::__construct("Bad comparison unit: '$unit'", $code, $previous); } /** * Get the unit. * * @return string */ public function getUnit(): string { return $this->unit; } } PKgt[ɓ.Carbon/Exceptions/BadFluentSetterException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; use Throwable; class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException { /** * The setter. * * @var string */ protected $setter; /** * Constructor. * * @param string $setter * @param int $code * @param Throwable|null $previous */ public function __construct($setter, $code = 0, Throwable $previous = null) { $this->setter = $setter; parent::__construct(sprintf("Unknown fluent setter '%s'", $setter), $code, $previous); } /** * Get the setter. * * @return string */ public function getSetter(): string { return $this->setter; } } PKgt[&)Carbon/Exceptions/ParseErrorException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; use Throwable; class ParseErrorException extends BaseInvalidArgumentException implements InvalidArgumentException { /** * The expected. * * @var string */ protected $expected; /** * The actual. * * @var string */ protected $actual; /** * The help message. * * @var string */ protected $help; /** * Constructor. * * @param string $expected * @param string $actual * @param int $code * @param Throwable|null $previous */ public function __construct($expected, $actual, $help = '', $code = 0, Throwable $previous = null) { $this->expected = $expected; $this->actual = $actual; $this->help = $help; $actual = $actual === '' ? 'data is missing' : "get '$actual'"; parent::__construct(trim("Format expected $expected but $actual\n$help"), $code, $previous); } /** * Get the expected. * * @return string */ public function getExpected(): string { return $this->expected; } /** * Get the actual. * * @return string */ public function getActual(): string { return $this->actual; } /** * Get the help message. * * @return string */ public function getHelp(): string { return $this->help; } } PKgt[d8O??&Carbon/Exceptions/RuntimeException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; interface RuntimeException extends Exception { // } PKgt['?5Carbon/Exceptions/InvalidPeriodParameterException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidPeriodParameterException extends BaseInvalidArgumentException implements InvalidArgumentException { // } PKgt[h(=  ,Carbon/Exceptions/UnknownMethodException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; use Throwable; class UnknownMethodException extends BaseBadMethodCallException implements BadMethodCallException { /** * The method. * * @var string */ protected $method; /** * Constructor. * * @param string $method * @param int $code * @param Throwable|null $previous */ public function __construct($method, $code = 0, Throwable $previous = null) { $this->method = $method; parent::__construct("Method $method does not exist.", $code, $previous); } /** * Get the method. * * @return string */ public function getMethod(): string { return $this->method; } } PKgt[,Carbon/Exceptions/InvalidFormatException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidFormatException extends BaseInvalidArgumentException implements InvalidArgumentException { // } PKgt[6PP*Carbon/Exceptions/InvalidDateException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; use Throwable; class InvalidDateException extends BaseInvalidArgumentException implements InvalidArgumentException { /** * The invalid field. * * @var string */ private $field; /** * The invalid value. * * @var mixed */ private $value; /** * Constructor. * * @param string $field * @param mixed $value * @param int $code * @param Throwable|null $previous */ public function __construct($field, $value, $code = 0, Throwable $previous = null) { $this->field = $field; $this->value = $value; parent::__construct($field.' : '.$value.' is not a valid value.', $code, $previous); } /** * Get the invalid field. * * @return string */ public function getField() { return $this->field; } /** * Get the invalid value. * * @return mixed */ public function getValue() { return $this->value; } } PKgt[O%.Carbon/Exceptions/NotACarbonClassException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use Carbon\CarbonInterface; use InvalidArgumentException as BaseInvalidArgumentException; use Throwable; class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException { /** * The className. * * @var string */ protected $className; /** * Constructor. * * @param string $className * @param int $code * @param Throwable|null $previous */ public function __construct($className, $code = 0, Throwable $previous = null) { $this->className = $className; parent::__construct(sprintf('Given class does not implement %s: %s', CarbonInterface::class, $className), $code, $previous); } /** * Get the className. * * @return string */ public function getClassName(): string { return $this->className; } } PKgt[DQ.Carbon/Exceptions/InvalidTimeZoneException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidTimeZoneException extends BaseInvalidArgumentException implements InvalidArgumentException { // } PKgt[10Carbon/Exceptions/InvalidPeriodDateException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidPeriodDateException extends BaseInvalidArgumentException implements InvalidArgumentException { // } PKgt[E,Carbon/Exceptions/UnknownGetterException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; use Throwable; class UnknownGetterException extends BaseInvalidArgumentException implements InvalidArgumentException { /** * The getter. * * @var string */ protected $getter; /** * Constructor. * * @param string $getter getter name * @param int $code * @param Throwable|null $previous */ public function __construct($getter, $code = 0, Throwable $previous = null) { $this->getter = $getter; parent::__construct("Unknown getter '$getter'", $code, $previous); } /** * Get the getter. * * @return string */ public function getGetter(): string { return $this->getter; } } PKgt[ ',Carbon/Exceptions/UnknownSetterException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; use Throwable; class UnknownSetterException extends BaseInvalidArgumentException implements BadMethodCallException { /** * The setter. * * @var string */ protected $setter; /** * Constructor. * * @param string $setter setter name * @param int $code * @param Throwable|null $previous */ public function __construct($setter, $code = 0, Throwable $previous = null) { $this->setter = $setter; parent::__construct("Unknown setter '$setter'", $code, $previous); } /** * Get the setter. * * @return string */ public function getSetter(): string { return $this->setter; } } PKgt[UI 1GG.Carbon/Exceptions/InvalidArgumentException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; interface InvalidArgumentException extends Exception { // } PKgt[A*)Carbon/Exceptions/NotAPeriodException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use InvalidArgumentException as BaseInvalidArgumentException; class NotAPeriodException extends BaseInvalidArgumentException implements InvalidArgumentException { // } PKgt[F *Carbon/Exceptions/UnreachableException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Exceptions; use RuntimeException as BaseRuntimeException; class UnreachableException extends BaseRuntimeException implements RuntimeException { // } PKgt[M~a""Carbon/CarbonTimeZone.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Carbon\Exceptions\InvalidCastException; use Carbon\Exceptions\InvalidTimeZoneException; use DateTimeInterface; use DateTimeZone; use Throwable; class CarbonTimeZone extends DateTimeZone { public function __construct($timezone = null) { parent::__construct(static::getDateTimeZoneNameFromMixed($timezone)); } protected static function parseNumericTimezone($timezone) { if ($timezone <= -100 || $timezone >= 100) { throw new InvalidTimeZoneException('Absolute timezone offset cannot be greater than 100.'); } return ($timezone >= 0 ? '+' : '').ltrim($timezone, '+').':00'; } protected static function getDateTimeZoneNameFromMixed($timezone) { if ($timezone === null) { return date_default_timezone_get(); } if (\is_string($timezone)) { $timezone = preg_replace('/^\s*([+-]\d+)(\d{2})\s*$/', '$1:$2', $timezone); } if (is_numeric($timezone)) { return static::parseNumericTimezone($timezone); } return $timezone; } protected static function getDateTimeZoneFromName(&$name) { return @timezone_open($name = (string) static::getDateTimeZoneNameFromMixed($name)); } /** * Cast the current instance into the given class. * * @param string $className The $className::instance() method will be called to cast the current object. * * @return DateTimeZone */ public function cast(string $className) { if (!method_exists($className, 'instance')) { if (is_a($className, DateTimeZone::class, true)) { return new $className($this->getName()); } throw new InvalidCastException("$className has not the instance() method needed to cast the date."); } return $className::instance($this); } /** * Create a CarbonTimeZone from mixed input. * * @param DateTimeZone|string|int|null $object original value to get CarbonTimeZone from it. * @param DateTimeZone|string|int|null $objectDump dump of the object for error messages. * * @throws InvalidTimeZoneException * * @return false|static */ public static function instance($object = null, $objectDump = null) { $tz = $object; if ($tz instanceof static) { return $tz; } if ($tz === null) { return new static(); } if (!$tz instanceof DateTimeZone) { $tz = static::getDateTimeZoneFromName($object); } if ($tz !== false) { return new static($tz->getName()); } if (Carbon::isStrictModeEnabled()) { throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')'); } return false; } /** * Returns abbreviated name of the current timezone according to DST setting. * * @param bool $dst * * @return string */ public function getAbbreviatedName($dst = false) { $name = $this->getName(); foreach ($this->listAbbreviations() as $abbreviation => $zones) { foreach ($zones as $zone) { if ($zone['timezone_id'] === $name && $zone['dst'] == $dst) { return $abbreviation; } } } return 'unknown'; } /** * @alias getAbbreviatedName * * Returns abbreviated name of the current timezone according to DST setting. * * @param bool $dst * * @return string */ public function getAbbr($dst = false) { return $this->getAbbreviatedName($dst); } /** * Get the offset as string "sHH:MM" (such as "+00:00" or "-12:30"). * * @param DateTimeInterface|null $date * * @return string */ public function toOffsetName(DateTimeInterface $date = null) { return static::getOffsetNameFromMinuteOffset( $this->getOffset($date ?: Carbon::now($this)) / 60 ); } /** * Returns a new CarbonTimeZone object using the offset string instead of region string. * * @param DateTimeInterface|null $date * * @return CarbonTimeZone */ public function toOffsetTimeZone(DateTimeInterface $date = null) { return new static($this->toOffsetName($date)); } /** * Returns the first region string (such as "America/Toronto") that matches the current timezone or * false if no match is found. * * @see timezone_name_from_abbr native PHP function. * * @param DateTimeInterface|null $date * @param int $isDst * * @return string|false */ public function toRegionName(DateTimeInterface $date = null, $isDst = 1) { $name = $this->getName(); $firstChar = substr($name, 0, 1); if ($firstChar !== '+' && $firstChar !== '-') { return $name; } $date = $date ?: Carbon::now($this); // Integer construction no longer supported since PHP 8 // @codeCoverageIgnoreStart try { $offset = @$this->getOffset($date) ?: 0; } catch (Throwable $e) { $offset = 0; } // @codeCoverageIgnoreEnd $name = @timezone_name_from_abbr('', $offset, $isDst); if ($name) { return $name; } foreach (timezone_identifiers_list() as $timezone) { if (Carbon::instance($date)->tz($timezone)->getOffset() === $offset) { return $timezone; } } return false; } /** * Returns a new CarbonTimeZone object using the region string instead of offset string. * * @param DateTimeInterface|null $date * * @return CarbonTimeZone|false */ public function toRegionTimeZone(DateTimeInterface $date = null) { $tz = $this->toRegionName($date); if ($tz !== false) { return new static($tz); } if (Carbon::isStrictModeEnabled()) { throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.'); } return false; } /** * Cast to string (get timezone name). * * @return string */ public function __toString() { return $this->getName(); } /** * Return the type number: * * Type 1; A UTC offset, such as -0300 * Type 2; A timezone abbreviation, such as GMT * Type 3: A timezone identifier, such as Europe/London */ public function getType(): int { return preg_match('/"timezone_type";i:(\d)/', serialize($this), $match) ? (int) $match[1] : 3; } /** * Create a CarbonTimeZone from mixed input. * * @param DateTimeZone|string|int|null $object * * @return false|static */ public static function create($object = null) { return static::instance($object); } /** * Create a CarbonTimeZone from int/float hour offset. * * @param float $hourOffset number of hour of the timezone shift (can be decimal). * * @return false|static */ public static function createFromHourOffset(float $hourOffset) { return static::createFromMinuteOffset($hourOffset * Carbon::MINUTES_PER_HOUR); } /** * Create a CarbonTimeZone from int/float minute offset. * * @param float $minuteOffset number of total minutes of the timezone shift. * * @return false|static */ public static function createFromMinuteOffset(float $minuteOffset) { return static::instance(static::getOffsetNameFromMinuteOffset($minuteOffset)); } /** * Convert a total minutes offset into a standardized timezone offset string. * * @param float $minutes number of total minutes of the timezone shift. * * @return string */ public static function getOffsetNameFromMinuteOffset(float $minutes): string { $minutes = round($minutes); $unsignedMinutes = abs($minutes); return ($minutes < 0 ? '-' : '+'). str_pad((string) floor($unsignedMinutes / 60), 2, '0', STR_PAD_LEFT). ':'. str_pad((string) ($unsignedMinutes % 60), 2, '0', STR_PAD_LEFT); } } PKgt[KJ#Carbon/CarbonConverterInterface.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use DateTimeInterface; interface CarbonConverterInterface { public function convertDate(DateTimeInterface $dateTime, bool $negated = false): CarbonInterface; } PKgt[gCarbon/Language.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use JsonSerializable; use ReturnTypeWillChange; class Language implements JsonSerializable { /** * @var array */ protected static $languagesNames; /** * @var array */ protected static $regionsNames; /** * @var string */ protected $id; /** * @var string */ protected $code; /** * @var string|null */ protected $variant; /** * @var string|null */ protected $region; /** * @var array */ protected $names; /** * @var string */ protected $isoName; /** * @var string */ protected $nativeName; public function __construct(string $id) { $this->id = str_replace('-', '_', $id); $parts = explode('_', $this->id); $this->code = $parts[0]; if (isset($parts[1])) { if (!preg_match('/^[A-Z]+$/', $parts[1])) { $this->variant = $parts[1]; $parts[1] = $parts[2] ?? null; } if ($parts[1]) { $this->region = $parts[1]; } } } /** * Get the list of the known languages. * * @return array */ public static function all() { if (!static::$languagesNames) { static::$languagesNames = require __DIR__.'/List/languages.php'; } return static::$languagesNames; } /** * Get the list of the known regions. * * @return array */ public static function regions() { if (!static::$regionsNames) { static::$regionsNames = require __DIR__.'/List/regions.php'; } return static::$regionsNames; } /** * Get both isoName and nativeName as an array. * * @return array */ public function getNames(): array { if (!$this->names) { $this->names = static::all()[$this->code] ?? [ 'isoName' => $this->code, 'nativeName' => $this->code, ]; } return $this->names; } /** * Returns the original locale ID. * * @return string */ public function getId(): string { return $this->id; } /** * Returns the code of the locale "en"/"fr". * * @return string */ public function getCode(): string { return $this->code; } /** * Returns the variant code such as cyrl/latn. * * @return string|null */ public function getVariant(): ?string { return $this->variant; } /** * Returns the variant such as Cyrillic/Latin. * * @return string|null */ public function getVariantName(): ?string { if ($this->variant === 'Latn') { return 'Latin'; } if ($this->variant === 'Cyrl') { return 'Cyrillic'; } return $this->variant; } /** * Returns the region part of the locale. * * @return string|null */ public function getRegion(): ?string { return $this->region; } /** * Returns the region name for the current language. * * @return string|null */ public function getRegionName(): ?string { return $this->region ? (static::regions()[$this->region] ?? $this->region) : null; } /** * Returns the long ISO language name. * * @return string */ public function getFullIsoName(): string { if (!$this->isoName) { $this->isoName = $this->getNames()['isoName']; } return $this->isoName; } /** * Set the ISO language name. * * @param string $isoName */ public function setIsoName(string $isoName): self { $this->isoName = $isoName; return $this; } /** * Return the full name of the language in this language. * * @return string */ public function getFullNativeName(): string { if (!$this->nativeName) { $this->nativeName = $this->getNames()['nativeName']; } return $this->nativeName; } /** * Set the name of the language in this language. * * @param string $nativeName */ public function setNativeName(string $nativeName): self { $this->nativeName = $nativeName; return $this; } /** * Returns the short ISO language name. * * @return string */ public function getIsoName(): string { $name = $this->getFullIsoName(); return trim(strstr($name, ',', true) ?: $name); } /** * Get the short name of the language in this language. * * @return string */ public function getNativeName(): string { $name = $this->getFullNativeName(); return trim(strstr($name, ',', true) ?: $name); } /** * Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable. * * @return string */ public function getIsoDescription() { $region = $this->getRegionName(); $variant = $this->getVariantName(); return $this->getIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); } /** * Get a string with short native name, region in parentheses if applicable, variant in parentheses if applicable. * * @return string */ public function getNativeDescription() { $region = $this->getRegionName(); $variant = $this->getVariantName(); return $this->getNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); } /** * Get a string with long ISO name, region in parentheses if applicable, variant in parentheses if applicable. * * @return string */ public function getFullIsoDescription() { $region = $this->getRegionName(); $variant = $this->getVariantName(); return $this->getFullIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); } /** * Get a string with long native name, region in parentheses if applicable, variant in parentheses if applicable. * * @return string */ public function getFullNativeDescription() { $region = $this->getRegionName(); $variant = $this->getVariantName(); return $this->getFullNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); } /** * Returns the original locale ID. * * @return string */ public function __toString() { return $this->getId(); } /** * Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable. * * @return string */ #[ReturnTypeWillChange] public function jsonSerialize() { return $this->getIsoDescription(); } } PKgt[ZCCCarbon/CarbonInterval.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Carbon\Exceptions\BadFluentConstructorException; use Carbon\Exceptions\BadFluentSetterException; use Carbon\Exceptions\InvalidCastException; use Carbon\Exceptions\InvalidIntervalException; use Carbon\Exceptions\OutOfRangeException; use Carbon\Exceptions\ParseErrorException; use Carbon\Exceptions\UnitNotConfiguredException; use Carbon\Exceptions\UnknownGetterException; use Carbon\Exceptions\UnknownSetterException; use Carbon\Exceptions\UnknownUnitException; use Carbon\Traits\IntervalRounding; use Carbon\Traits\IntervalStep; use Carbon\Traits\MagicParameter; use Carbon\Traits\Mixin; use Carbon\Traits\Options; use Carbon\Traits\ToStringFormat; use Closure; use DateInterval; use DateMalformedIntervalStringException; use DateTimeInterface; use DateTimeZone; use Exception; use InvalidArgumentException; use ReflectionException; use ReturnTypeWillChange; use RuntimeException; use Throwable; /** * A simple API extension for DateInterval. * The implementation provides helpers to handle weeks but only days are saved. * Weeks are calculated based on the total days of the current instance. * * @property int $years Total years of the current interval. * @property int $months Total months of the current interval. * @property int $weeks Total weeks of the current interval calculated from the days. * @property int $dayz Total days of the current interval (weeks * 7 + days). * @property int $hours Total hours of the current interval. * @property int $minutes Total minutes of the current interval. * @property int $seconds Total seconds of the current interval. * @property int $microseconds Total microseconds of the current interval. * @property int $milliseconds Total milliseconds of the current interval. * @property int $microExcludeMilli Remaining microseconds without the milliseconds. * @property int $dayzExcludeWeeks Total days remaining in the final week of the current instance (days % 7). * @property int $daysExcludeWeeks alias of dayzExcludeWeeks * @property-read float $totalYears Number of years equivalent to the interval. * @property-read float $totalMonths Number of months equivalent to the interval. * @property-read float $totalWeeks Number of weeks equivalent to the interval. * @property-read float $totalDays Number of days equivalent to the interval. * @property-read float $totalDayz Alias for totalDays. * @property-read float $totalHours Number of hours equivalent to the interval. * @property-read float $totalMinutes Number of minutes equivalent to the interval. * @property-read float $totalSeconds Number of seconds equivalent to the interval. * @property-read float $totalMilliseconds Number of milliseconds equivalent to the interval. * @property-read float $totalMicroseconds Number of microseconds equivalent to the interval. * @property-read string $locale locale of the current instance * * @method static CarbonInterval years($years = 1) Create instance specifying a number of years or modify the number of years if called on an instance. * @method static CarbonInterval year($years = 1) Alias for years() * @method static CarbonInterval months($months = 1) Create instance specifying a number of months or modify the number of months if called on an instance. * @method static CarbonInterval month($months = 1) Alias for months() * @method static CarbonInterval weeks($weeks = 1) Create instance specifying a number of weeks or modify the number of weeks if called on an instance. * @method static CarbonInterval week($weeks = 1) Alias for weeks() * @method static CarbonInterval days($days = 1) Create instance specifying a number of days or modify the number of days if called on an instance. * @method static CarbonInterval dayz($days = 1) Alias for days() * @method static CarbonInterval daysExcludeWeeks($days = 1) Create instance specifying a number of days or modify the number of days (keeping the current number of weeks) if called on an instance. * @method static CarbonInterval dayzExcludeWeeks($days = 1) Alias for daysExcludeWeeks() * @method static CarbonInterval day($days = 1) Alias for days() * @method static CarbonInterval hours($hours = 1) Create instance specifying a number of hours or modify the number of hours if called on an instance. * @method static CarbonInterval hour($hours = 1) Alias for hours() * @method static CarbonInterval minutes($minutes = 1) Create instance specifying a number of minutes or modify the number of minutes if called on an instance. * @method static CarbonInterval minute($minutes = 1) Alias for minutes() * @method static CarbonInterval seconds($seconds = 1) Create instance specifying a number of seconds or modify the number of seconds if called on an instance. * @method static CarbonInterval second($seconds = 1) Alias for seconds() * @method static CarbonInterval milliseconds($milliseconds = 1) Create instance specifying a number of milliseconds or modify the number of milliseconds if called on an instance. * @method static CarbonInterval millisecond($milliseconds = 1) Alias for milliseconds() * @method static CarbonInterval microseconds($microseconds = 1) Create instance specifying a number of microseconds or modify the number of microseconds if called on an instance. * @method static CarbonInterval microsecond($microseconds = 1) Alias for microseconds() * @method $this addYears(int $years) Add given number of years to the current interval * @method $this subYears(int $years) Subtract given number of years to the current interval * @method $this addMonths(int $months) Add given number of months to the current interval * @method $this subMonths(int $months) Subtract given number of months to the current interval * @method $this addWeeks(int|float $weeks) Add given number of weeks to the current interval * @method $this subWeeks(int|float $weeks) Subtract given number of weeks to the current interval * @method $this addDays(int|float $days) Add given number of days to the current interval * @method $this subDays(int|float $days) Subtract given number of days to the current interval * @method $this addHours(int|float $hours) Add given number of hours to the current interval * @method $this subHours(int|float $hours) Subtract given number of hours to the current interval * @method $this addMinutes(int|float $minutes) Add given number of minutes to the current interval * @method $this subMinutes(int|float $minutes) Subtract given number of minutes to the current interval * @method $this addSeconds(int|float $seconds) Add given number of seconds to the current interval * @method $this subSeconds(int|float $seconds) Subtract given number of seconds to the current interval * @method $this addMilliseconds(int|float $milliseconds) Add given number of milliseconds to the current interval * @method $this subMilliseconds(int|float $milliseconds) Subtract given number of milliseconds to the current interval * @method $this addMicroseconds(int|float $microseconds) Add given number of microseconds to the current interval * @method $this subMicroseconds(int|float $microseconds) Subtract given number of microseconds to the current interval * @method $this roundYear(int|float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method $this roundYears(int|float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method $this floorYear(int|float $precision = 1) Truncate the current instance year with given precision. * @method $this floorYears(int|float $precision = 1) Truncate the current instance year with given precision. * @method $this ceilYear(int|float $precision = 1) Ceil the current instance year with given precision. * @method $this ceilYears(int|float $precision = 1) Ceil the current instance year with given precision. * @method $this roundMonth(int|float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method $this roundMonths(int|float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method $this floorMonth(int|float $precision = 1) Truncate the current instance month with given precision. * @method $this floorMonths(int|float $precision = 1) Truncate the current instance month with given precision. * @method $this ceilMonth(int|float $precision = 1) Ceil the current instance month with given precision. * @method $this ceilMonths(int|float $precision = 1) Ceil the current instance month with given precision. * @method $this roundWeek(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method $this roundWeeks(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method $this floorWeek(int|float $precision = 1) Truncate the current instance day with given precision. * @method $this floorWeeks(int|float $precision = 1) Truncate the current instance day with given precision. * @method $this ceilWeek(int|float $precision = 1) Ceil the current instance day with given precision. * @method $this ceilWeeks(int|float $precision = 1) Ceil the current instance day with given precision. * @method $this roundDay(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method $this roundDays(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method $this floorDay(int|float $precision = 1) Truncate the current instance day with given precision. * @method $this floorDays(int|float $precision = 1) Truncate the current instance day with given precision. * @method $this ceilDay(int|float $precision = 1) Ceil the current instance day with given precision. * @method $this ceilDays(int|float $precision = 1) Ceil the current instance day with given precision. * @method $this roundHour(int|float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method $this roundHours(int|float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method $this floorHour(int|float $precision = 1) Truncate the current instance hour with given precision. * @method $this floorHours(int|float $precision = 1) Truncate the current instance hour with given precision. * @method $this ceilHour(int|float $precision = 1) Ceil the current instance hour with given precision. * @method $this ceilHours(int|float $precision = 1) Ceil the current instance hour with given precision. * @method $this roundMinute(int|float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method $this roundMinutes(int|float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method $this floorMinute(int|float $precision = 1) Truncate the current instance minute with given precision. * @method $this floorMinutes(int|float $precision = 1) Truncate the current instance minute with given precision. * @method $this ceilMinute(int|float $precision = 1) Ceil the current instance minute with given precision. * @method $this ceilMinutes(int|float $precision = 1) Ceil the current instance minute with given precision. * @method $this roundSecond(int|float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method $this roundSeconds(int|float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method $this floorSecond(int|float $precision = 1) Truncate the current instance second with given precision. * @method $this floorSeconds(int|float $precision = 1) Truncate the current instance second with given precision. * @method $this ceilSecond(int|float $precision = 1) Ceil the current instance second with given precision. * @method $this ceilSeconds(int|float $precision = 1) Ceil the current instance second with given precision. * @method $this roundMillennium(int|float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method $this roundMillennia(int|float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method $this floorMillennium(int|float $precision = 1) Truncate the current instance millennium with given precision. * @method $this floorMillennia(int|float $precision = 1) Truncate the current instance millennium with given precision. * @method $this ceilMillennium(int|float $precision = 1) Ceil the current instance millennium with given precision. * @method $this ceilMillennia(int|float $precision = 1) Ceil the current instance millennium with given precision. * @method $this roundCentury(int|float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method $this roundCenturies(int|float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method $this floorCentury(int|float $precision = 1) Truncate the current instance century with given precision. * @method $this floorCenturies(int|float $precision = 1) Truncate the current instance century with given precision. * @method $this ceilCentury(int|float $precision = 1) Ceil the current instance century with given precision. * @method $this ceilCenturies(int|float $precision = 1) Ceil the current instance century with given precision. * @method $this roundDecade(int|float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method $this roundDecades(int|float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method $this floorDecade(int|float $precision = 1) Truncate the current instance decade with given precision. * @method $this floorDecades(int|float $precision = 1) Truncate the current instance decade with given precision. * @method $this ceilDecade(int|float $precision = 1) Ceil the current instance decade with given precision. * @method $this ceilDecades(int|float $precision = 1) Ceil the current instance decade with given precision. * @method $this roundQuarter(int|float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method $this roundQuarters(int|float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method $this floorQuarter(int|float $precision = 1) Truncate the current instance quarter with given precision. * @method $this floorQuarters(int|float $precision = 1) Truncate the current instance quarter with given precision. * @method $this ceilQuarter(int|float $precision = 1) Ceil the current instance quarter with given precision. * @method $this ceilQuarters(int|float $precision = 1) Ceil the current instance quarter with given precision. * @method $this roundMillisecond(int|float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method $this roundMilliseconds(int|float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method $this floorMillisecond(int|float $precision = 1) Truncate the current instance millisecond with given precision. * @method $this floorMilliseconds(int|float $precision = 1) Truncate the current instance millisecond with given precision. * @method $this ceilMillisecond(int|float $precision = 1) Ceil the current instance millisecond with given precision. * @method $this ceilMilliseconds(int|float $precision = 1) Ceil the current instance millisecond with given precision. * @method $this roundMicrosecond(int|float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method $this roundMicroseconds(int|float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method $this floorMicrosecond(int|float $precision = 1) Truncate the current instance microsecond with given precision. * @method $this floorMicroseconds(int|float $precision = 1) Truncate the current instance microsecond with given precision. * @method $this ceilMicrosecond(int|float $precision = 1) Ceil the current instance microsecond with given precision. * @method $this ceilMicroseconds(int|float $precision = 1) Ceil the current instance microsecond with given precision. */ class CarbonInterval extends DateInterval implements CarbonConverterInterface { use IntervalRounding; use IntervalStep; use MagicParameter; use Mixin { Mixin::mixin as baseMixin; } use Options; use ToStringFormat; /** * Interval spec period designators */ public const PERIOD_PREFIX = 'P'; public const PERIOD_YEARS = 'Y'; public const PERIOD_MONTHS = 'M'; public const PERIOD_DAYS = 'D'; public const PERIOD_TIME_PREFIX = 'T'; public const PERIOD_HOURS = 'H'; public const PERIOD_MINUTES = 'M'; public const PERIOD_SECONDS = 'S'; /** * A translator to ... er ... translate stuff * * @var \Symfony\Component\Translation\TranslatorInterface */ protected static $translator; /** * @var array|null */ protected static $cascadeFactors; /** * @var array */ protected static $formats = [ 'y' => 'y', 'Y' => 'y', 'o' => 'y', 'm' => 'm', 'n' => 'm', 'W' => 'weeks', 'd' => 'd', 'j' => 'd', 'z' => 'd', 'h' => 'h', 'g' => 'h', 'H' => 'h', 'G' => 'h', 'i' => 'i', 's' => 's', 'u' => 'micro', 'v' => 'milli', ]; /** * @var array|null */ private static $flipCascadeFactors; /** * @var bool */ private static $floatSettersEnabled = false; /** * The registered macros. * * @var array */ protected static $macros = []; /** * Timezone handler for settings() method. * * @var mixed */ protected $tzName; /** * Set the instance's timezone from a string or object. * * @param \DateTimeZone|string $tzName * * @return static */ public function setTimezone($tzName) { $this->tzName = $tzName; return $this; } /** * @internal * * Set the instance's timezone from a string or object and add/subtract the offset difference. * * @param \DateTimeZone|string $tzName * * @return static */ public function shiftTimezone($tzName) { $this->tzName = $tzName; return $this; } /** * Mapping of units and factors for cascading. * * Should only be modified by changing the factors or referenced constants. * * @return array */ public static function getCascadeFactors() { return static::$cascadeFactors ?: static::getDefaultCascadeFactors(); } protected static function getDefaultCascadeFactors(): array { return [ 'milliseconds' => [Carbon::MICROSECONDS_PER_MILLISECOND, 'microseconds'], 'seconds' => [Carbon::MILLISECONDS_PER_SECOND, 'milliseconds'], 'minutes' => [Carbon::SECONDS_PER_MINUTE, 'seconds'], 'hours' => [Carbon::MINUTES_PER_HOUR, 'minutes'], 'dayz' => [Carbon::HOURS_PER_DAY, 'hours'], 'weeks' => [Carbon::DAYS_PER_WEEK, 'dayz'], 'months' => [Carbon::WEEKS_PER_MONTH, 'weeks'], 'years' => [Carbon::MONTHS_PER_YEAR, 'months'], ]; } private static function standardizeUnit($unit) { $unit = rtrim($unit, 'sz').'s'; return $unit === 'days' ? 'dayz' : $unit; } private static function getFlipCascadeFactors() { if (!self::$flipCascadeFactors) { self::$flipCascadeFactors = []; foreach (static::getCascadeFactors() as $to => [$factor, $from]) { self::$flipCascadeFactors[self::standardizeUnit($from)] = [self::standardizeUnit($to), $factor]; } } return self::$flipCascadeFactors; } /** * Set default cascading factors for ->cascade() method. * * @param array $cascadeFactors */ public static function setCascadeFactors(array $cascadeFactors) { self::$flipCascadeFactors = null; static::$cascadeFactors = $cascadeFactors; } /** * This option allow you to opt-in for the Carbon 3 behavior where float * values will no longer be cast to integer (so truncated). * * ⚠️ This settings will be applied globally, which mean your whole application * code including the third-party dependencies that also may use Carbon will * adopt the new behavior. */ public static function enableFloatSetters(bool $floatSettersEnabled = true): void { self::$floatSettersEnabled = $floatSettersEnabled; } /////////////////////////////////////////////////////////////////// //////////////////////////// CONSTRUCTORS ///////////////////////// /////////////////////////////////////////////////////////////////// /** * Create a new CarbonInterval instance. * * @param Closure|DateInterval|string|int|null $years * @param int|float|null $months * @param int|float|null $weeks * @param int|float|null $days * @param int|float|null $hours * @param int|float|null $minutes * @param int|float|null $seconds * @param int|float|null $microseconds * * @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval. */ public function __construct($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null, $microseconds = null) { if ($years instanceof Closure) { $this->step = $years; $years = null; } if ($years instanceof DateInterval) { parent::__construct(static::getDateIntervalSpec($years)); $this->f = $years->f; self::copyNegativeUnits($years, $this); return; } $spec = $years; $isStringSpec = (\is_string($spec) && !preg_match('/^[\d.]/', $spec)); if (!$isStringSpec || (float) $years) { $spec = static::PERIOD_PREFIX; $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; $spec .= $months > 0 ? $months.static::PERIOD_MONTHS : ''; $specDays = 0; $specDays += $weeks > 0 ? $weeks * static::getDaysPerWeek() : 0; $specDays += $days > 0 ? $days : 0; $spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : ''; if ($hours > 0 || $minutes > 0 || $seconds > 0) { $spec .= static::PERIOD_TIME_PREFIX; $spec .= $hours > 0 ? $hours.static::PERIOD_HOURS : ''; $spec .= $minutes > 0 ? $minutes.static::PERIOD_MINUTES : ''; $spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : ''; } if ($spec === static::PERIOD_PREFIX) { // Allow the zero interval. $spec .= '0'.static::PERIOD_YEARS; } } try { parent::__construct($spec); } catch (Throwable $exception) { try { parent::__construct('PT0S'); if ($isStringSpec) { if (!preg_match('/^P (?:(?[+-]?\d*(?:\.\d+)?)Y)? (?:(?[+-]?\d*(?:\.\d+)?)M)? (?:(?[+-]?\d*(?:\.\d+)?)W)? (?:(?[+-]?\d*(?:\.\d+)?)D)? (?:T (?:(?[+-]?\d*(?:\.\d+)?)H)? (?:(?[+-]?\d*(?:\.\d+)?)M)? (?:(?[+-]?\d*(?:\.\d+)?)S)? )? $/x', $spec, $match)) { throw new InvalidArgumentException("Invalid duration: $spec"); } $years = (float) ($match['year'] ?? 0); $this->assertSafeForInteger('year', $years); $months = (float) ($match['month'] ?? 0); $this->assertSafeForInteger('month', $months); $weeks = (float) ($match['week'] ?? 0); $this->assertSafeForInteger('week', $weeks); $days = (float) ($match['day'] ?? 0); $this->assertSafeForInteger('day', $days); $hours = (float) ($match['hour'] ?? 0); $this->assertSafeForInteger('hour', $hours); $minutes = (float) ($match['minute'] ?? 0); $this->assertSafeForInteger('minute', $minutes); $seconds = (float) ($match['second'] ?? 0); $this->assertSafeForInteger('second', $seconds); } $totalDays = (($weeks * static::getDaysPerWeek()) + $days); $this->assertSafeForInteger('days total (including weeks)', $totalDays); $this->y = (int) $years; $this->m = (int) $months; $this->d = (int) $totalDays; $this->h = (int) $hours; $this->i = (int) $minutes; $this->s = (int) $seconds; if ( ((float) $this->y) !== $years || ((float) $this->m) !== $months || ((float) $this->d) !== $totalDays || ((float) $this->h) !== $hours || ((float) $this->i) !== $minutes || ((float) $this->s) !== $seconds ) { $this->add(static::fromString( ($years - $this->y).' years '. ($months - $this->m).' months '. ($totalDays - $this->d).' days '. ($hours - $this->h).' hours '. ($minutes - $this->i).' minutes '. ($seconds - $this->s).' seconds ' )); } } catch (Throwable $secondException) { throw $secondException instanceof OutOfRangeException ? $secondException : $exception; } } if ($microseconds !== null) { $this->f = $microseconds / Carbon::MICROSECONDS_PER_SECOND; } } /** * Returns the factor for a given source-to-target couple. * * @param string $source * @param string $target * * @return int|float|null */ public static function getFactor($source, $target) { $source = self::standardizeUnit($source); $target = self::standardizeUnit($target); $factors = self::getFlipCascadeFactors(); if (isset($factors[$source])) { [$to, $factor] = $factors[$source]; if ($to === $target) { return $factor; } return $factor * static::getFactor($to, $target); } return null; } /** * Returns the factor for a given source-to-target couple if set, * else try to find the appropriate constant as the factor, such as Carbon::DAYS_PER_WEEK. * * @param string $source * @param string $target * * @return int|float|null */ public static function getFactorWithDefault($source, $target) { $factor = self::getFactor($source, $target); if ($factor) { return $factor; } static $defaults = [ 'month' => ['year' => Carbon::MONTHS_PER_YEAR], 'week' => ['month' => Carbon::WEEKS_PER_MONTH], 'day' => ['week' => Carbon::DAYS_PER_WEEK], 'hour' => ['day' => Carbon::HOURS_PER_DAY], 'minute' => ['hour' => Carbon::MINUTES_PER_HOUR], 'second' => ['minute' => Carbon::SECONDS_PER_MINUTE], 'millisecond' => ['second' => Carbon::MILLISECONDS_PER_SECOND], 'microsecond' => ['millisecond' => Carbon::MICROSECONDS_PER_MILLISECOND], ]; return $defaults[$source][$target] ?? null; } /** * Returns current config for days per week. * * @return int|float */ public static function getDaysPerWeek() { return static::getFactor('dayz', 'weeks') ?: Carbon::DAYS_PER_WEEK; } /** * Returns current config for hours per day. * * @return int|float */ public static function getHoursPerDay() { return static::getFactor('hours', 'dayz') ?: Carbon::HOURS_PER_DAY; } /** * Returns current config for minutes per hour. * * @return int|float */ public static function getMinutesPerHour() { return static::getFactor('minutes', 'hours') ?: Carbon::MINUTES_PER_HOUR; } /** * Returns current config for seconds per minute. * * @return int|float */ public static function getSecondsPerMinute() { return static::getFactor('seconds', 'minutes') ?: Carbon::SECONDS_PER_MINUTE; } /** * Returns current config for microseconds per second. * * @return int|float */ public static function getMillisecondsPerSecond() { return static::getFactor('milliseconds', 'seconds') ?: Carbon::MILLISECONDS_PER_SECOND; } /** * Returns current config for microseconds per second. * * @return int|float */ public static function getMicrosecondsPerMillisecond() { return static::getFactor('microseconds', 'milliseconds') ?: Carbon::MICROSECONDS_PER_MILLISECOND; } /** * Create a new CarbonInterval instance from specific values. * This is an alias for the constructor that allows better fluent * syntax as it allows you to do CarbonInterval::create(1)->fn() rather than * (new CarbonInterval(1))->fn(). * * @param int $years * @param int $months * @param int $weeks * @param int $days * @param int $hours * @param int $minutes * @param int $seconds * @param int $microseconds * * @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval. * * @return static */ public static function create($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null, $microseconds = null) { return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds, $microseconds); } /** * Parse a string into a new CarbonInterval object according to the specified format. * * @example * ``` * echo Carboninterval::createFromFormat('H:i', '1:30'); * ``` * * @param string $format Format of the $interval input string * @param string|null $interval Input string to convert into an interval * * @throws \Carbon\Exceptions\ParseErrorException when the $interval cannot be parsed as an interval. * * @return static */ public static function createFromFormat(string $format, ?string $interval) { $instance = new static(0); $length = mb_strlen($format); if (preg_match('/s([,.])([uv])$/', $format, $match)) { $interval = explode($match[1], $interval); $index = \count($interval) - 1; $interval[$index] = str_pad($interval[$index], $match[2] === 'v' ? 3 : 6, '0'); $interval = implode($match[1], $interval); } $interval = $interval ?? ''; for ($index = 0; $index < $length; $index++) { $expected = mb_substr($format, $index, 1); $nextCharacter = mb_substr($interval, 0, 1); $unit = static::$formats[$expected] ?? null; if ($unit) { if (!preg_match('/^-?\d+/', $interval, $match)) { throw new ParseErrorException('number', $nextCharacter); } $interval = mb_substr($interval, mb_strlen($match[0])); $instance->$unit += (int) ($match[0]); continue; } if ($nextCharacter !== $expected) { throw new ParseErrorException( "'$expected'", $nextCharacter, 'Allowed substitutes for interval formats are '.implode(', ', array_keys(static::$formats))."\n". 'See https://php.net/manual/en/function.date.php for their meaning' ); } $interval = mb_substr($interval, 1); } if ($interval !== '') { throw new ParseErrorException( 'end of string', $interval ); } return $instance; } /** * Get a copy of the instance. * * @return static */ public function copy() { $date = new static(0); $date->copyProperties($this); $date->step = $this->step; return $date; } /** * Get a copy of the instance. * * @return static */ public function clone() { return $this->copy(); } /** * Provide static helpers to create instances. Allows CarbonInterval::years(3). * * Note: This is done using the magic method to allow static and instance methods to * have the same names. * * @param string $method magic method name called * @param array $parameters parameters list * * @return static|null */ public static function __callStatic($method, $parameters) { try { $interval = new static(0); $localStrictModeEnabled = $interval->localStrictModeEnabled; $interval->localStrictModeEnabled = true; $result = static::hasMacro($method) ? static::bindMacroContext(null, function () use (&$method, &$parameters, &$interval) { return $interval->callMacro($method, $parameters); }) : $interval->$method(...$parameters); $interval->localStrictModeEnabled = $localStrictModeEnabled; return $result; } catch (BadFluentSetterException $exception) { if (Carbon::isStrictModeEnabled()) { throw new BadFluentConstructorException($method, 0, $exception); } return null; } } /** * Evaluate the PHP generated by var_export() and recreate the exported CarbonInterval instance. * * @param array $dump data as exported by var_export() * * @return static */ #[ReturnTypeWillChange] public static function __set_state($dump) { /** @noinspection PhpVoidFunctionResultUsedInspection */ /** @var DateInterval $dateInterval */ $dateInterval = parent::__set_state($dump); return static::instance($dateInterval); } /** * Return the current context from inside a macro callee or a new one if static. * * @return static */ protected static function this() { return end(static::$macroContextStack) ?: new static(0); } /** * Creates a CarbonInterval from string. * * Format: * * Suffix | Unit | Example | DateInterval expression * -------|---------|---------|------------------------ * y | years | 1y | P1Y * mo | months | 3mo | P3M * w | weeks | 2w | P2W * d | days | 28d | P28D * h | hours | 4h | PT4H * m | minutes | 12m | PT12M * s | seconds | 59s | PT59S * * e. g. `1w 3d 4h 32m 23s` is converted to 10 days 4 hours 32 minutes and 23 seconds. * * Special cases: * - An empty string will return a zero interval * - Fractions are allowed for weeks, days, hours and minutes and will be converted * and rounded to the next smaller value (caution: 0.5w = 4d) * * @param string $intervalDefinition * * @return static */ public static function fromString($intervalDefinition) { if (empty($intervalDefinition)) { return new static(0); } $years = 0; $months = 0; $weeks = 0; $days = 0; $hours = 0; $minutes = 0; $seconds = 0; $milliseconds = 0; $microseconds = 0; $pattern = '/(\d+(?:\.\d+)?)\h*([^\d\h]*)/i'; preg_match_all($pattern, $intervalDefinition, $parts, PREG_SET_ORDER); while ([$part, $value, $unit] = array_shift($parts)) { $intValue = (int) $value; $fraction = (float) $value - $intValue; // Fix calculation precision switch (round($fraction, 6)) { case 1: $fraction = 0; $intValue++; break; case 0: $fraction = 0; break; } switch ($unit === 'µs' ? 'µs' : strtolower($unit)) { case 'millennia': case 'millennium': $years += $intValue * CarbonInterface::YEARS_PER_MILLENNIUM; break; case 'century': case 'centuries': $years += $intValue * CarbonInterface::YEARS_PER_CENTURY; break; case 'decade': case 'decades': $years += $intValue * CarbonInterface::YEARS_PER_DECADE; break; case 'year': case 'years': case 'y': case 'yr': case 'yrs': $years += $intValue; break; case 'quarter': case 'quarters': $months += $intValue * CarbonInterface::MONTHS_PER_QUARTER; break; case 'month': case 'months': case 'mo': case 'mos': $months += $intValue; break; case 'week': case 'weeks': case 'w': $weeks += $intValue; if ($fraction) { $parts[] = [null, $fraction * static::getDaysPerWeek(), 'd']; } break; case 'day': case 'days': case 'd': $days += $intValue; if ($fraction) { $parts[] = [null, $fraction * static::getHoursPerDay(), 'h']; } break; case 'hour': case 'hours': case 'h': $hours += $intValue; if ($fraction) { $parts[] = [null, $fraction * static::getMinutesPerHour(), 'm']; } break; case 'minute': case 'minutes': case 'm': $minutes += $intValue; if ($fraction) { $parts[] = [null, $fraction * static::getSecondsPerMinute(), 's']; } break; case 'second': case 'seconds': case 's': $seconds += $intValue; if ($fraction) { $parts[] = [null, $fraction * static::getMillisecondsPerSecond(), 'ms']; } break; case 'millisecond': case 'milliseconds': case 'milli': case 'ms': $milliseconds += $intValue; if ($fraction) { $microseconds += round($fraction * static::getMicrosecondsPerMillisecond()); } break; case 'microsecond': case 'microseconds': case 'micro': case 'µs': $microseconds += $intValue; break; default: throw new InvalidIntervalException( sprintf('Invalid part %s in definition %s', $part, $intervalDefinition) ); } } return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds, $milliseconds * Carbon::MICROSECONDS_PER_MILLISECOND + $microseconds); } /** * Creates a CarbonInterval from string using a different locale. * * @param string $interval interval string in the given language (may also contain English). * @param string|null $locale if locale is null or not specified, current global locale will be used instead. * * @return static */ public static function parseFromLocale($interval, $locale = null) { return static::fromString(Carbon::translateTimeString($interval, $locale ?: static::getLocale(), 'en')); } private static function castIntervalToClass(DateInterval $interval, string $className, array $skip = []) { $mainClass = DateInterval::class; if (!is_a($className, $mainClass, true)) { throw new InvalidCastException("$className is not a sub-class of $mainClass."); } $microseconds = $interval->f; $instance = new $className(static::getDateIntervalSpec($interval, false, $skip)); if ($microseconds) { $instance->f = $microseconds; } if ($interval instanceof self && is_a($className, self::class, true)) { self::copyStep($interval, $instance); } self::copyNegativeUnits($interval, $instance); return $instance; } private static function copyNegativeUnits(DateInterval $from, DateInterval $to): void { $to->invert = $from->invert; foreach (['y', 'm', 'd', 'h', 'i', 's'] as $unit) { if ($from->$unit < 0) { $to->$unit *= -1; } } } private static function copyStep(self $from, self $to): void { $to->setStep($from->getStep()); } /** * Cast the current instance into the given class. * * @param string $className The $className::instance() method will be called to cast the current object. * * @return DateInterval */ public function cast(string $className) { return self::castIntervalToClass($this, $className); } /** * Create a CarbonInterval instance from a DateInterval one. Can not instance * DateInterval objects created from DateTime::diff() as you can't externally * set the $days field. * * @param DateInterval $interval * @param bool $skipCopy set to true to return the passed object * (without copying it) if it's already of the * current class * * @return static */ public static function instance(DateInterval $interval, array $skip = [], bool $skipCopy = false) { if ($skipCopy && $interval instanceof static) { return $interval; } return self::castIntervalToClass($interval, static::class, $skip); } /** * Make a CarbonInterval instance from given variable if possible. * * Always return a new instance. Parse only strings and only these likely to be intervals (skip dates * and recurrences). Throw an exception for invalid format, but otherwise return null. * * @param mixed|int|DateInterval|string|Closure|null $interval interval or number of the given $unit * @param string|null $unit if specified, $interval must be an integer * @param bool $skipCopy set to true to return the passed object * (without copying it) if it's already of the * current class * * @return static|null */ public static function make($interval, $unit = null, bool $skipCopy = false) { if ($unit) { $interval = "$interval ".Carbon::pluralUnit($unit); } if ($interval instanceof DateInterval) { return static::instance($interval, [], $skipCopy); } if ($interval instanceof Closure) { return new static($interval); } if (!\is_string($interval)) { return null; } return static::makeFromString($interval); } protected static function makeFromString(string $interval) { $interval = preg_replace('/\s+/', ' ', trim($interval)); if (preg_match('/^P[T\d]/', $interval)) { return new static($interval); } if (preg_match('/^(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+$/i', $interval)) { return static::fromString($interval); } // @codeCoverageIgnoreStart try { /** @var static $interval */ $interval = static::createFromDateString($interval); } catch (DateMalformedIntervalStringException $e) { return null; } // @codeCoverageIgnoreEnd return !$interval || $interval->isEmpty() ? null : $interval; } protected function resolveInterval($interval) { if (!($interval instanceof self)) { return self::make($interval); } return $interval; } /** * Sets up a DateInterval from the relative parts of the string. * * @param string $time * * @return static * * @link https://php.net/manual/en/dateinterval.createfromdatestring.php */ #[ReturnTypeWillChange] public static function createFromDateString($time) { $interval = @parent::createFromDateString(strtr($time, [ ',' => ' ', ' and ' => ' ', ])); if ($interval instanceof DateInterval) { $interval = static::instance($interval); } return $interval; } /////////////////////////////////////////////////////////////////// ///////////////////////// GETTERS AND SETTERS ///////////////////// /////////////////////////////////////////////////////////////////// /** * Get a part of the CarbonInterval object. * * @param string $name * * @throws UnknownGetterException * * @return int|float|string */ public function get($name) { if (str_starts_with($name, 'total')) { return $this->total(substr($name, 5)); } switch ($name) { case 'years': return $this->y; case 'months': return $this->m; case 'dayz': return $this->d; case 'hours': return $this->h; case 'minutes': return $this->i; case 'seconds': return $this->s; case 'milli': case 'milliseconds': return (int) (round($this->f * Carbon::MICROSECONDS_PER_SECOND) / Carbon::MICROSECONDS_PER_MILLISECOND); case 'micro': case 'microseconds': return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND); case 'microExcludeMilli': return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND) % Carbon::MICROSECONDS_PER_MILLISECOND; case 'weeks': return (int) ($this->d / (int) static::getDaysPerWeek()); case 'daysExcludeWeeks': case 'dayzExcludeWeeks': return $this->d % (int) static::getDaysPerWeek(); case 'locale': return $this->getTranslatorLocale(); default: throw new UnknownGetterException($name); } } /** * Get a part of the CarbonInterval object. * * @param string $name * * @throws UnknownGetterException * * @return int|float|string */ public function __get($name) { return $this->get($name); } /** * Set a part of the CarbonInterval object. * * @param string|array $name * @param int $value * * @throws UnknownSetterException * * @return $this */ public function set($name, $value = null) { $properties = \is_array($name) ? $name : [$name => $value]; foreach ($properties as $key => $value) { switch (Carbon::singularUnit(rtrim($key, 'z'))) { case 'year': $this->checkIntegerValue($key, $value); $this->y = $value; $this->handleDecimalPart('year', $value, $this->y); break; case 'month': $this->checkIntegerValue($key, $value); $this->m = $value; $this->handleDecimalPart('month', $value, $this->m); break; case 'week': $this->checkIntegerValue($key, $value); $days = $value * (int) static::getDaysPerWeek(); $this->assertSafeForInteger('days total (including weeks)', $days); $this->d = $days; $this->handleDecimalPart('day', $days, $this->d); break; case 'day': $this->checkIntegerValue($key, $value); $this->d = $value; $this->handleDecimalPart('day', $value, $this->d); break; case 'daysexcludeweek': case 'dayzexcludeweek': $this->checkIntegerValue($key, $value); $days = $this->weeks * (int) static::getDaysPerWeek() + $value; $this->assertSafeForInteger('days total (including weeks)', $days); $this->d = $days; $this->handleDecimalPart('day', $days, $this->d); break; case 'hour': $this->checkIntegerValue($key, $value); $this->h = $value; $this->handleDecimalPart('hour', $value, $this->h); break; case 'minute': $this->checkIntegerValue($key, $value); $this->i = $value; $this->handleDecimalPart('minute', $value, $this->i); break; case 'second': $this->checkIntegerValue($key, $value); $this->s = $value; $this->handleDecimalPart('second', $value, $this->s); break; case 'milli': case 'millisecond': $this->microseconds = $value * Carbon::MICROSECONDS_PER_MILLISECOND + $this->microseconds % Carbon::MICROSECONDS_PER_MILLISECOND; break; case 'micro': case 'microsecond': $this->f = $value / Carbon::MICROSECONDS_PER_SECOND; break; default: if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { throw new UnknownSetterException($key); } $this->$key = $value; } } return $this; } /** * Set a part of the CarbonInterval object. * * @param string $name * @param int $value * * @throws UnknownSetterException */ public function __set($name, $value) { $this->set($name, $value); } /** * Allow setting of weeks and days to be cumulative. * * @param int $weeks Number of weeks to set * @param int $days Number of days to set * * @return static */ public function weeksAndDays($weeks, $days) { $this->dayz = ($weeks * static::getDaysPerWeek()) + $days; return $this; } /** * Returns true if the interval is empty for each unit. * * @return bool */ public function isEmpty() { return $this->years === 0 && $this->months === 0 && $this->dayz === 0 && !$this->days && $this->hours === 0 && $this->minutes === 0 && $this->seconds === 0 && $this->microseconds === 0; } /** * Register a custom macro. * * @example * ``` * CarbonInterval::macro('twice', function () { * return $this->times(2); * }); * echo CarbonInterval::hours(2)->twice(); * ``` * * @param string $name * @param object|callable $macro * * @return void */ public static function macro($name, $macro) { static::$macros[$name] = $macro; } /** * Register macros from a mixin object. * * @example * ``` * CarbonInterval::mixin(new class { * public function daysToHours() { * return function () { * $this->hours += $this->days; * $this->days = 0; * * return $this; * }; * } * public function hoursToDays() { * return function () { * $this->days += $this->hours; * $this->hours = 0; * * return $this; * }; * } * }); * echo CarbonInterval::hours(5)->hoursToDays() . "\n"; * echo CarbonInterval::days(5)->daysToHours() . "\n"; * ``` * * @param object|string $mixin * * @throws ReflectionException * * @return void */ public static function mixin($mixin) { static::baseMixin($mixin); } /** * Check if macro is registered. * * @param string $name * * @return bool */ public static function hasMacro($name) { return isset(static::$macros[$name]); } /** * Call given macro. * * @param string $name * @param array $parameters * * @return mixed */ protected function callMacro($name, $parameters) { $macro = static::$macros[$name]; if ($macro instanceof Closure) { $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); return ($boundMacro ?: $macro)(...$parameters); } return $macro(...$parameters); } /** * Allow fluent calls on the setters... CarbonInterval::years(3)->months(5)->day(). * * Note: This is done using the magic method to allow static and instance methods to * have the same names. * * @param string $method magic method name called * @param array $parameters parameters list * * @throws BadFluentSetterException|Throwable * * @return static */ public function __call($method, $parameters) { if (static::hasMacro($method)) { return static::bindMacroContext($this, function () use (&$method, &$parameters) { return $this->callMacro($method, $parameters); }); } $roundedValue = $this->callRoundMethod($method, $parameters); if ($roundedValue !== null) { return $roundedValue; } if (preg_match('/^(?add|sub)(?[A-Z].*)$/', $method, $match)) { $value = $this->getMagicParameter($parameters, 0, Carbon::pluralUnit($match['unit']), 0); return $this->{$match['method']}($value, $match['unit']); } $value = $this->getMagicParameter($parameters, 0, Carbon::pluralUnit($method), 1); try { $this->set($method, $value); } catch (UnknownSetterException $exception) { if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { throw new BadFluentSetterException($method, 0, $exception); } } return $this; } protected function getForHumansInitialVariables($syntax, $short) { if (\is_array($syntax)) { return $syntax; } if (\is_int($short)) { return [ 'parts' => $short, 'short' => false, ]; } if (\is_bool($syntax)) { return [ 'short' => $syntax, 'syntax' => CarbonInterface::DIFF_ABSOLUTE, ]; } return []; } /** * @param mixed $syntax * @param mixed $short * @param mixed $parts * @param mixed $options * * @return array */ protected function getForHumansParameters($syntax = null, $short = false, $parts = -1, $options = null) { $optionalSpace = ' '; $default = $this->getTranslationMessage('list.0') ?? $this->getTranslationMessage('list') ?? ' '; $join = $default === '' ? '' : ' '; $altNumbers = false; $aUnit = false; $minimumUnit = 's'; $skip = []; extract($this->getForHumansInitialVariables($syntax, $short)); $skip = array_map('strtolower', array_filter((array) $skip, static function ($value) { return \is_string($value) && $value !== ''; })); if ($syntax === null) { $syntax = CarbonInterface::DIFF_ABSOLUTE; } if ($parts === -1) { $parts = INF; } if ($options === null) { $options = static::getHumanDiffOptions(); } if ($join === false) { $join = ' '; } elseif ($join === true) { $join = [ $default, $this->getTranslationMessage('list.1') ?? $default, ]; } if ($altNumbers && $altNumbers !== true) { $language = new Language($this->locale); $altNumbers = \in_array($language->getCode(), (array) $altNumbers, true); } if (\is_array($join)) { [$default, $last] = $join; if ($default !== ' ') { $optionalSpace = ''; } $join = function ($list) use ($default, $last) { if (\count($list) < 2) { return implode('', $list); } $end = array_pop($list); return implode($default, $list).$last.$end; }; } if (\is_string($join)) { if ($join !== ' ') { $optionalSpace = ''; } $glue = $join; $join = function ($list) use ($glue) { return implode($glue, $list); }; } $interpolations = [ ':optional-space' => $optionalSpace, ]; return [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit, $skip]; } protected static function getRoundingMethodFromOptions(int $options): ?string { if ($options & CarbonInterface::ROUND) { return 'round'; } if ($options & CarbonInterface::CEIL) { return 'ceil'; } if ($options & CarbonInterface::FLOOR) { return 'floor'; } return null; } /** * Returns interval values as an array where key are the unit names and values the counts. * * @return int[] */ public function toArray() { return [ 'years' => $this->years, 'months' => $this->months, 'weeks' => $this->weeks, 'days' => $this->daysExcludeWeeks, 'hours' => $this->hours, 'minutes' => $this->minutes, 'seconds' => $this->seconds, 'microseconds' => $this->microseconds, ]; } /** * Returns interval non-zero values as an array where key are the unit names and values the counts. * * @return int[] */ public function getNonZeroValues() { return array_filter($this->toArray(), 'intval'); } /** * Returns interval values as an array where key are the unit names and values the counts * from the biggest non-zero one the the smallest non-zero one. * * @return int[] */ public function getValuesSequence() { $nonZeroValues = $this->getNonZeroValues(); if ($nonZeroValues === []) { return []; } $keys = array_keys($nonZeroValues); $firstKey = $keys[0]; $lastKey = $keys[\count($keys) - 1]; $values = []; $record = false; foreach ($this->toArray() as $unit => $count) { if ($unit === $firstKey) { $record = true; } if ($record) { $values[$unit] = $count; } if ($unit === $lastKey) { $record = false; } } return $values; } /** * Get the current interval in a human readable format in the current locale. * * @example * ``` * echo CarbonInterval::fromString('4d 3h 40m')->forHumans() . "\n"; * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['parts' => 2]) . "\n"; * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['parts' => 3, 'join' => true]) . "\n"; * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['short' => true]) . "\n"; * echo CarbonInterval::fromString('1d 24h')->forHumans(['join' => ' or ']) . "\n"; * echo CarbonInterval::fromString('1d 24h')->forHumans(['minimumUnit' => 'hour']) . "\n"; * ``` * * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'skip' entry, list of units to skip (array of strings or a single string, * ` it can be the unit name (singular or plural) or its shortcut * ` (y, m, w, d, h, min, s, ms, µs). * - 'aUnit' entry, prefer "an hour" over "1 hour" if true * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'minimumUnit' entry determines the smallest unit of time to display can be long or * ` short form of the units, e.g. 'hour' or 'h' (default value: s) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: -1: no limits) * @param int $options human diff options * * @throws Exception * * @return string */ public function forHumans($syntax = null, $short = false, $parts = -1, $options = null) { [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit, $skip] = $this ->getForHumansParameters($syntax, $short, $parts, $options); $interval = []; $syntax = (int) ($syntax ?? CarbonInterface::DIFF_ABSOLUTE); $absolute = $syntax === CarbonInterface::DIFF_ABSOLUTE; $relativeToNow = $syntax === CarbonInterface::DIFF_RELATIVE_TO_NOW; $count = 1; $unit = $short ? 's' : 'second'; $isFuture = $this->invert === 1; $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); $declensionMode = null; /** @var \Symfony\Component\Translation\Translator $translator */ $translator = $this->getLocalTranslator(); $handleDeclensions = function ($unit, $count, $index = 0, $parts = 1) use ($interpolations, $transId, $translator, $altNumbers, $absolute, &$declensionMode) { if (!$absolute) { $declensionMode = $declensionMode ?? $this->translate($transId.'_mode'); if ($this->needsDeclension($declensionMode, $index, $parts)) { // Some languages have special pluralization for past and future tense. $key = $unit.'_'.$transId; $result = $this->translate($key, $interpolations, $count, $translator, $altNumbers); if ($result !== $key) { return $result; } } } $result = $this->translate($unit, $interpolations, $count, $translator, $altNumbers); if ($result !== $unit) { return $result; } return null; }; $intervalValues = $this; $method = static::getRoundingMethodFromOptions($options); if ($method) { $previousCount = INF; while ( \count($intervalValues->getNonZeroValues()) > $parts && ($count = \count($keys = array_keys($intervalValues->getValuesSequence()))) > 1 ) { $index = min($count, $previousCount - 1) - 2; if ($index < 0) { break; } $intervalValues = $this->copy()->roundUnit( $keys[$index], 1, $method ); $previousCount = $count; } } $diffIntervalArray = [ ['value' => $intervalValues->years, 'unit' => 'year', 'unitShort' => 'y'], ['value' => $intervalValues->months, 'unit' => 'month', 'unitShort' => 'm'], ['value' => $intervalValues->weeks, 'unit' => 'week', 'unitShort' => 'w'], ['value' => $intervalValues->daysExcludeWeeks, 'unit' => 'day', 'unitShort' => 'd'], ['value' => $intervalValues->hours, 'unit' => 'hour', 'unitShort' => 'h'], ['value' => $intervalValues->minutes, 'unit' => 'minute', 'unitShort' => 'min'], ['value' => $intervalValues->seconds, 'unit' => 'second', 'unitShort' => 's'], ['value' => $intervalValues->milliseconds, 'unit' => 'millisecond', 'unitShort' => 'ms'], ['value' => $intervalValues->microExcludeMilli, 'unit' => 'microsecond', 'unitShort' => 'µs'], ]; if (!empty($skip)) { foreach ($diffIntervalArray as $index => &$unitData) { $nextIndex = $index + 1; if ($unitData['value'] && isset($diffIntervalArray[$nextIndex]) && \count(array_intersect([$unitData['unit'], $unitData['unit'].'s', $unitData['unitShort']], $skip)) ) { $diffIntervalArray[$nextIndex]['value'] += $unitData['value'] * self::getFactorWithDefault($diffIntervalArray[$nextIndex]['unit'], $unitData['unit']); $unitData['value'] = 0; } } } $transChoice = function ($short, $unitData, $index, $parts) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) { $count = $unitData['value']; if ($short) { $result = $handleDeclensions($unitData['unitShort'], $count, $index, $parts); if ($result !== null) { return $result; } } elseif ($aUnit) { $result = $handleDeclensions('a_'.$unitData['unit'], $count, $index, $parts); if ($result !== null) { return $result; } } if (!$absolute) { return $handleDeclensions($unitData['unit'], $count, $index, $parts); } return $this->translate($unitData['unit'], $interpolations, $count, $translator, $altNumbers); }; $fallbackUnit = ['second', 's']; foreach ($diffIntervalArray as $diffIntervalData) { if ($diffIntervalData['value'] > 0) { $unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit']; $count = $diffIntervalData['value']; $interval[] = [$short, $diffIntervalData]; } elseif ($options & CarbonInterface::SEQUENTIAL_PARTS_ONLY && \count($interval) > 0) { break; } // break the loop after we get the required number of parts in array if (\count($interval) >= $parts) { break; } // break the loop after we have reached the minimum unit if (\in_array($minimumUnit, [$diffIntervalData['unit'], $diffIntervalData['unitShort']], true)) { $fallbackUnit = [$diffIntervalData['unit'], $diffIntervalData['unitShort']]; break; } } $actualParts = \count($interval); foreach ($interval as $index => &$item) { $item = $transChoice($item[0], $item[1], $index, $actualParts); } if (\count($interval) === 0) { if ($relativeToNow && $options & CarbonInterface::JUST_NOW) { $key = 'diff_now'; $translation = $this->translate($key, $interpolations, null, $translator); if ($translation !== $key) { return $translation; } } $count = $options & CarbonInterface::NO_ZERO_DIFF ? 1 : 0; $unit = $fallbackUnit[$short ? 1 : 0]; $interval[] = $this->translate($unit, $interpolations, $count, $translator, $altNumbers); } // join the interval parts by a space $time = $join($interval); unset($diffIntervalArray, $interval); if ($absolute) { return $time; } $isFuture = $this->invert === 1; $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); if ($parts === 1) { if ($relativeToNow && $unit === 'day') { if ($count === 1 && $options & CarbonInterface::ONE_DAY_WORDS) { $key = $isFuture ? 'diff_tomorrow' : 'diff_yesterday'; $translation = $this->translate($key, $interpolations, null, $translator); if ($translation !== $key) { return $translation; } } if ($count === 2 && $options & CarbonInterface::TWO_DAY_WORDS) { $key = $isFuture ? 'diff_after_tomorrow' : 'diff_before_yesterday'; $translation = $this->translate($key, $interpolations, null, $translator); if ($translation !== $key) { return $translation; } } } $aTime = $aUnit ? $handleDeclensions('a_'.$unit, $count) : null; $time = $aTime ?: $handleDeclensions($unit, $count) ?: $time; } $time = [':time' => $time]; return $this->translate($transId, array_merge($time, $interpolations, $time), null, $translator); } /** * Format the instance as a string using the forHumans() function. * * @throws Exception * * @return string */ public function __toString() { $format = $this->localToStringFormat ?? static::$toStringFormat; if (!$format) { return $this->forHumans(); } if ($format instanceof Closure) { return $format($this); } return $this->format($format); } /** * Return native DateInterval PHP object matching the current instance. * * @example * ``` * var_dump(CarbonInterval::hours(2)->toDateInterval()); * ``` * * @return DateInterval */ public function toDateInterval() { return self::castIntervalToClass($this, DateInterval::class); } /** * Convert the interval to a CarbonPeriod. * * @param DateTimeInterface|string|int ...$params Start date, [end date or recurrences] and optional settings. * * @return CarbonPeriod */ public function toPeriod(...$params) { if ($this->tzName) { $tz = \is_string($this->tzName) ? new DateTimeZone($this->tzName) : $this->tzName; if ($tz instanceof DateTimeZone) { array_unshift($params, $tz); } } return CarbonPeriod::create($this, ...$params); } /** * Invert the interval. * * @param bool|int $inverted if a parameter is passed, the passed value cast as 1 or 0 is used * as the new value of the ->invert property. * * @return $this */ public function invert($inverted = null) { $this->invert = (\func_num_args() === 0 ? !$this->invert : $inverted) ? 1 : 0; return $this; } protected function solveNegativeInterval() { if (!$this->isEmpty() && $this->years <= 0 && $this->months <= 0 && $this->dayz <= 0 && $this->hours <= 0 && $this->minutes <= 0 && $this->seconds <= 0 && $this->microseconds <= 0) { $this->years *= -1; $this->months *= -1; $this->dayz *= -1; $this->hours *= -1; $this->minutes *= -1; $this->seconds *= -1; $this->microseconds *= -1; $this->invert(); } return $this; } /** * Add the passed interval to the current instance. * * @param string|DateInterval $unit * @param int|float $value * * @return $this */ public function add($unit, $value = 1) { if (is_numeric($unit)) { [$value, $unit] = [$unit, $value]; } if (\is_string($unit) && !preg_match('/^\s*\d/', $unit)) { $unit = "$value $unit"; $value = 1; } $interval = static::make($unit); if (!$interval) { throw new InvalidIntervalException('This type of data cannot be added/subtracted.'); } if ($value !== 1) { $interval->times($value); } $sign = ($this->invert === 1) !== ($interval->invert === 1) ? -1 : 1; $this->years += $interval->y * $sign; $this->months += $interval->m * $sign; $this->dayz += ($interval->days === false ? $interval->d : $interval->days) * $sign; $this->hours += $interval->h * $sign; $this->minutes += $interval->i * $sign; $this->seconds += $interval->s * $sign; $this->microseconds += $interval->microseconds * $sign; $this->solveNegativeInterval(); return $this; } /** * Subtract the passed interval to the current instance. * * @param string|DateInterval $unit * @param int|float $value * * @return $this */ public function sub($unit, $value = 1) { if (is_numeric($unit)) { [$value, $unit] = [$unit, $value]; } return $this->add($unit, -(float) $value); } /** * Subtract the passed interval to the current instance. * * @param string|DateInterval $unit * @param int|float $value * * @return $this */ public function subtract($unit, $value = 1) { return $this->sub($unit, $value); } /** * Add given parameters to the current interval. * * @param int $years * @param int $months * @param int|float $weeks * @param int|float $days * @param int|float $hours * @param int|float $minutes * @param int|float $seconds * @param int|float $microseconds * * @return $this */ public function plus( $years = 0, $months = 0, $weeks = 0, $days = 0, $hours = 0, $minutes = 0, $seconds = 0, $microseconds = 0 ): self { return $this->add(" $years years $months months $weeks weeks $days days $hours hours $minutes minutes $seconds seconds $microseconds microseconds "); } /** * Add given parameters to the current interval. * * @param int $years * @param int $months * @param int|float $weeks * @param int|float $days * @param int|float $hours * @param int|float $minutes * @param int|float $seconds * @param int|float $microseconds * * @return $this */ public function minus( $years = 0, $months = 0, $weeks = 0, $days = 0, $hours = 0, $minutes = 0, $seconds = 0, $microseconds = 0 ): self { return $this->sub(" $years years $months months $weeks weeks $days days $hours hours $minutes minutes $seconds seconds $microseconds microseconds "); } /** * Multiply current instance given number of times. times() is naive, it multiplies each unit * (so day can be greater than 31, hour can be greater than 23, etc.) and the result is rounded * separately for each unit. * * Use times() when you want a fast and approximated calculation that does not cascade units. * * For a precise and cascaded calculation, * * @see multiply() * * @param float|int $factor * * @return $this */ public function times($factor) { if ($factor < 0) { $this->invert = $this->invert ? 0 : 1; $factor = -$factor; } $this->years = (int) round($this->years * $factor); $this->months = (int) round($this->months * $factor); $this->dayz = (int) round($this->dayz * $factor); $this->hours = (int) round($this->hours * $factor); $this->minutes = (int) round($this->minutes * $factor); $this->seconds = (int) round($this->seconds * $factor); $this->microseconds = (int) round($this->microseconds * $factor); return $this; } /** * Divide current instance by a given divider. shares() is naive, it divides each unit separately * and the result is rounded for each unit. So 5 hours and 20 minutes shared by 3 becomes 2 hours * and 7 minutes. * * Use shares() when you want a fast and approximated calculation that does not cascade units. * * For a precise and cascaded calculation, * * @see divide() * * @param float|int $divider * * @return $this */ public function shares($divider) { return $this->times(1 / $divider); } protected function copyProperties(self $interval, $ignoreSign = false) { $this->years = $interval->years; $this->months = $interval->months; $this->dayz = $interval->dayz; $this->hours = $interval->hours; $this->minutes = $interval->minutes; $this->seconds = $interval->seconds; $this->microseconds = $interval->microseconds; if (!$ignoreSign) { $this->invert = $interval->invert; } return $this; } /** * Multiply and cascade current instance by a given factor. * * @param float|int $factor * * @return $this */ public function multiply($factor) { if ($factor < 0) { $this->invert = $this->invert ? 0 : 1; $factor = -$factor; } $yearPart = (int) floor($this->years * $factor); // Split calculation to prevent imprecision if ($yearPart) { $this->years -= $yearPart / $factor; } return $this->copyProperties( static::create($yearPart) ->microseconds(abs($this->totalMicroseconds) * $factor) ->cascade(), true ); } /** * Divide and cascade current instance by a given divider. * * @param float|int $divider * * @return $this */ public function divide($divider) { return $this->multiply(1 / $divider); } /** * Get the interval_spec string of a date interval. * * @param DateInterval $interval * * @return string */ public static function getDateIntervalSpec(DateInterval $interval, bool $microseconds = false, array $skip = []) { $date = array_filter([ static::PERIOD_YEARS => abs($interval->y), static::PERIOD_MONTHS => abs($interval->m), static::PERIOD_DAYS => abs($interval->d), ]); if ( $interval->days >= CarbonInterface::DAYS_PER_WEEK * CarbonInterface::WEEKS_PER_MONTH && (!isset($date[static::PERIOD_YEARS]) || \count(array_intersect(['y', 'year', 'years'], $skip))) && (!isset($date[static::PERIOD_MONTHS]) || \count(array_intersect(['m', 'month', 'months'], $skip))) ) { $date = [ static::PERIOD_DAYS => abs($interval->days), ]; } $seconds = abs($interval->s); if ($microseconds && $interval->f > 0) { $seconds = sprintf('%d.%06d', $seconds, abs($interval->f) * 1000000); } $time = array_filter([ static::PERIOD_HOURS => abs($interval->h), static::PERIOD_MINUTES => abs($interval->i), static::PERIOD_SECONDS => $seconds, ]); $specString = static::PERIOD_PREFIX; foreach ($date as $key => $value) { $specString .= $value.$key; } if (\count($time) > 0) { $specString .= static::PERIOD_TIME_PREFIX; foreach ($time as $key => $value) { $specString .= $value.$key; } } return $specString === static::PERIOD_PREFIX ? 'PT0S' : $specString; } /** * Get the interval_spec string. * * @return string */ public function spec(bool $microseconds = false) { return static::getDateIntervalSpec($this, $microseconds); } /** * Comparing 2 date intervals. * * @param DateInterval $first * @param DateInterval $second * * @return int */ public static function compareDateIntervals(DateInterval $first, DateInterval $second) { $current = Carbon::now(); $passed = $current->avoidMutation()->add($second); $current->add($first); if ($current < $passed) { return -1; } if ($current > $passed) { return 1; } return 0; } /** * Comparing with passed interval. * * @param DateInterval $interval * * @return int */ public function compare(DateInterval $interval) { return static::compareDateIntervals($this, $interval); } private function invertCascade(array $values) { return $this->set(array_map(function ($value) { return -$value; }, $values))->doCascade(true)->invert(); } private function doCascade(bool $deep) { $originalData = $this->toArray(); $originalData['milliseconds'] = (int) ($originalData['microseconds'] / static::getMicrosecondsPerMillisecond()); $originalData['microseconds'] = $originalData['microseconds'] % static::getMicrosecondsPerMillisecond(); $originalData['weeks'] = (int) ($this->d / static::getDaysPerWeek()); $originalData['daysExcludeWeeks'] = fmod($this->d, static::getDaysPerWeek()); unset($originalData['days']); $newData = $originalData; $previous = []; foreach (self::getFlipCascadeFactors() as $source => [$target, $factor]) { foreach (['source', 'target'] as $key) { if ($$key === 'dayz') { $$key = 'daysExcludeWeeks'; } } $value = $newData[$source]; $modulo = fmod($factor + fmod($value, $factor), $factor); $newData[$source] = $modulo; $newData[$target] += ($value - $modulo) / $factor; $decimalPart = fmod($newData[$source], 1); if ($decimalPart !== 0.0) { $unit = $source; foreach ($previous as [$subUnit, $subFactor]) { $newData[$unit] -= $decimalPart; $newData[$subUnit] += $decimalPart * $subFactor; $decimalPart = fmod($newData[$subUnit], 1); if ($decimalPart === 0.0) { break; } $unit = $subUnit; } } array_unshift($previous, [$source, $factor]); } $positive = null; if (!$deep) { foreach ($newData as $value) { if ($value) { if ($positive === null) { $positive = ($value > 0); continue; } if (($value > 0) !== $positive) { return $this->invertCascade($originalData) ->solveNegativeInterval(); } } } } return $this->set($newData) ->solveNegativeInterval(); } /** * Convert overflowed values into bigger units. * * @return $this */ public function cascade() { return $this->doCascade(false); } public function hasNegativeValues(): bool { foreach ($this->toArray() as $value) { if ($value < 0) { return true; } } return false; } public function hasPositiveValues(): bool { foreach ($this->toArray() as $value) { if ($value > 0) { return true; } } return false; } /** * Get amount of given unit equivalent to the interval. * * @param string $unit * * @throws UnknownUnitException|UnitNotConfiguredException * * @return float */ public function total($unit) { $realUnit = $unit = strtolower($unit); if (\in_array($unit, ['days', 'weeks'])) { $realUnit = 'dayz'; } elseif (!\in_array($unit, ['microseconds', 'milliseconds', 'seconds', 'minutes', 'hours', 'dayz', 'months', 'years'])) { throw new UnknownUnitException($unit); } $result = 0; $cumulativeFactor = 0; $unitFound = false; $factors = self::getFlipCascadeFactors(); $daysPerWeek = (int) static::getDaysPerWeek(); $values = [ 'years' => $this->years, 'months' => $this->months, 'weeks' => (int) ($this->d / $daysPerWeek), 'dayz' => fmod($this->d, $daysPerWeek), 'hours' => $this->hours, 'minutes' => $this->minutes, 'seconds' => $this->seconds, 'milliseconds' => (int) ($this->microseconds / Carbon::MICROSECONDS_PER_MILLISECOND), 'microseconds' => $this->microseconds % Carbon::MICROSECONDS_PER_MILLISECOND, ]; if (isset($factors['dayz']) && $factors['dayz'][0] !== 'weeks') { $values['dayz'] += $values['weeks'] * $daysPerWeek; $values['weeks'] = 0; } foreach ($factors as $source => [$target, $factor]) { if ($source === $realUnit) { $unitFound = true; $value = $values[$source]; $result += $value; $cumulativeFactor = 1; } if ($factor === false) { if ($unitFound) { break; } $result = 0; $cumulativeFactor = 0; continue; } if ($target === $realUnit) { $unitFound = true; } if ($cumulativeFactor) { $cumulativeFactor *= $factor; $result += $values[$target] * $cumulativeFactor; continue; } $value = $values[$source]; $result = ($result + $value) / $factor; } if (isset($target) && !$cumulativeFactor) { $result += $values[$target]; } if (!$unitFound) { throw new UnitNotConfiguredException($unit); } if ($this->invert) { $result *= -1; } if ($unit === 'weeks') { $result /= $daysPerWeek; } // Cast as int numbers with no decimal part return fmod($result, 1) === 0.0 ? (int) $result : $result; } /** * Determines if the instance is equal to another * * @param CarbonInterval|DateInterval|mixed $interval * * @see equalTo() * * @return bool */ public function eq($interval): bool { return $this->equalTo($interval); } /** * Determines if the instance is equal to another * * @param CarbonInterval|DateInterval|mixed $interval * * @return bool */ public function equalTo($interval): bool { $interval = $this->resolveInterval($interval); return $interval !== null && $this->totalMicroseconds === $interval->totalMicroseconds; } /** * Determines if the instance is not equal to another * * @param CarbonInterval|DateInterval|mixed $interval * * @see notEqualTo() * * @return bool */ public function ne($interval): bool { return $this->notEqualTo($interval); } /** * Determines if the instance is not equal to another * * @param CarbonInterval|DateInterval|mixed $interval * * @return bool */ public function notEqualTo($interval): bool { return !$this->eq($interval); } /** * Determines if the instance is greater (longer) than another * * @param CarbonInterval|DateInterval|mixed $interval * * @see greaterThan() * * @return bool */ public function gt($interval): bool { return $this->greaterThan($interval); } /** * Determines if the instance is greater (longer) than another * * @param CarbonInterval|DateInterval|mixed $interval * * @return bool */ public function greaterThan($interval): bool { $interval = $this->resolveInterval($interval); return $interval === null || $this->totalMicroseconds > $interval->totalMicroseconds; } /** * Determines if the instance is greater (longer) than or equal to another * * @param CarbonInterval|DateInterval|mixed $interval * * @see greaterThanOrEqualTo() * * @return bool */ public function gte($interval): bool { return $this->greaterThanOrEqualTo($interval); } /** * Determines if the instance is greater (longer) than or equal to another * * @param CarbonInterval|DateInterval|mixed $interval * * @return bool */ public function greaterThanOrEqualTo($interval): bool { return $this->greaterThan($interval) || $this->equalTo($interval); } /** * Determines if the instance is less (shorter) than another * * @param CarbonInterval|DateInterval|mixed $interval * * @see lessThan() * * @return bool */ public function lt($interval): bool { return $this->lessThan($interval); } /** * Determines if the instance is less (shorter) than another * * @param CarbonInterval|DateInterval|mixed $interval * * @return bool */ public function lessThan($interval): bool { $interval = $this->resolveInterval($interval); return $interval !== null && $this->totalMicroseconds < $interval->totalMicroseconds; } /** * Determines if the instance is less (shorter) than or equal to another * * @param CarbonInterval|DateInterval|mixed $interval * * @see lessThanOrEqualTo() * * @return bool */ public function lte($interval): bool { return $this->lessThanOrEqualTo($interval); } /** * Determines if the instance is less (shorter) than or equal to another * * @param CarbonInterval|DateInterval|mixed $interval * * @return bool */ public function lessThanOrEqualTo($interval): bool { return $this->lessThan($interval) || $this->equalTo($interval); } /** * Determines if the instance is between two others. * * The third argument allow you to specify if bounds are included or not (true by default) * but for when you including/excluding bounds may produce different results in your application, * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. * * @example * ``` * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(3)); // true * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::hours(36)); // false * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(2)); // true * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(2), false); // false * ``` * * @param CarbonInterval|DateInterval|mixed $interval1 * @param CarbonInterval|DateInterval|mixed $interval2 * @param bool $equal Indicates if an equal to comparison should be done * * @return bool */ public function between($interval1, $interval2, $equal = true): bool { return $equal ? $this->greaterThanOrEqualTo($interval1) && $this->lessThanOrEqualTo($interval2) : $this->greaterThan($interval1) && $this->lessThan($interval2); } /** * Determines if the instance is between two others, bounds excluded. * * @example * ``` * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(3)); // true * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::hours(36)); // false * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(2)); // true * ``` * * @param CarbonInterval|DateInterval|mixed $interval1 * @param CarbonInterval|DateInterval|mixed $interval2 * * @return bool */ public function betweenIncluded($interval1, $interval2): bool { return $this->between($interval1, $interval2, true); } /** * Determines if the instance is between two others, bounds excluded. * * @example * ``` * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(3)); // true * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::hours(36)); // false * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(2)); // false * ``` * * @param CarbonInterval|DateInterval|mixed $interval1 * @param CarbonInterval|DateInterval|mixed $interval2 * * @return bool */ public function betweenExcluded($interval1, $interval2): bool { return $this->between($interval1, $interval2, false); } /** * Determines if the instance is between two others * * @example * ``` * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(3)); // true * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::hours(36)); // false * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(2)); // true * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(2), false); // false * ``` * * @param CarbonInterval|DateInterval|mixed $interval1 * @param CarbonInterval|DateInterval|mixed $interval2 * @param bool $equal Indicates if an equal to comparison should be done * * @return bool */ public function isBetween($interval1, $interval2, $equal = true): bool { return $this->between($interval1, $interval2, $equal); } /** * Round the current instance at the given unit with given precision if specified and the given function. * * @param string $unit * @param float|int|string|DateInterval|null $precision * @param string $function * * @throws Exception * * @return $this */ public function roundUnit($unit, $precision = 1, $function = 'round') { if (static::getCascadeFactors() !== static::getDefaultCascadeFactors()) { $value = $function($this->total($unit) / $precision) * $precision; $inverted = $value < 0; return $this->copyProperties(self::fromString( number_format(abs($value), 12, '.', '').' '.$unit )->invert($inverted)->cascade()); } $base = CarbonImmutable::parse('2000-01-01 00:00:00', 'UTC') ->roundUnit($unit, $precision, $function); $next = $base->add($this); $inverted = $next < $base; if ($inverted) { $next = $base->sub($this); } $this->copyProperties( $next ->roundUnit($unit, $precision, $function) ->diffAsCarbonInterval($base) ); return $this->invert($inverted); } /** * Truncate the current instance at the given unit with given precision if specified. * * @param string $unit * @param float|int|string|DateInterval|null $precision * * @throws Exception * * @return $this */ public function floorUnit($unit, $precision = 1) { return $this->roundUnit($unit, $precision, 'floor'); } /** * Ceil the current instance at the given unit with given precision if specified. * * @param string $unit * @param float|int|string|DateInterval|null $precision * * @throws Exception * * @return $this */ public function ceilUnit($unit, $precision = 1) { return $this->roundUnit($unit, $precision, 'ceil'); } /** * Round the current instance second with given precision if specified. * * @param float|int|string|DateInterval|null $precision * @param string $function * * @throws Exception * * @return $this */ public function round($precision = 1, $function = 'round') { return $this->roundWith($precision, $function); } /** * Round the current instance second with given precision if specified. * * @param float|int|string|DateInterval|null $precision * * @throws Exception * * @return $this */ public function floor($precision = 1) { return $this->round($precision, 'floor'); } /** * Ceil the current instance second with given precision if specified. * * @param float|int|string|DateInterval|null $precision * * @throws Exception * * @return $this */ public function ceil($precision = 1) { return $this->round($precision, 'ceil'); } private function needsDeclension(string $mode, int $index, int $parts): bool { switch ($mode) { case 'last': return $index === $parts - 1; default: return true; } } private function checkIntegerValue(string $name, $value) { if (\is_int($value)) { return; } $this->assertSafeForInteger($name, $value); if (\is_float($value) && (((float) (int) $value) === $value)) { return; } if (!self::$floatSettersEnabled) { $type = \gettype($value); @trigger_error( "Since 2.70.0, it's deprecated to pass $type value for $name.\n". "It's truncated when stored as an integer interval unit.\n". "From 3.0.0, decimal part will no longer be truncated and will be cascaded to smaller units.\n". "- To maintain the current behavior, use explicit cast: $name((int) \$value)\n". "- To adopt the new behavior globally, call CarbonInterval::enableFloatSetters()\n", \E_USER_DEPRECATED ); } } /** * Throw an exception if precision loss when storing the given value as an integer would be >= 1.0. */ private function assertSafeForInteger(string $name, $value) { if ($value && !\is_int($value) && ($value >= 0x7fffffffffffffff || $value <= -0x7fffffffffffffff)) { throw new OutOfRangeException($name, -0x7fffffffffffffff, 0x7fffffffffffffff, $value); } } private function handleDecimalPart(string $unit, $value, $integerValue) { if (self::$floatSettersEnabled) { $floatValue = (float) $value; $base = (float) $integerValue; if ($floatValue === $base) { return; } $units = [ 'y' => 'year', 'm' => 'month', 'd' => 'day', 'h' => 'hour', 'i' => 'minute', 's' => 'second', ]; $upper = true; foreach ($units as $property => $name) { if ($name === $unit) { $upper = false; continue; } if (!$upper && $this->$property !== 0) { throw new RuntimeException( "You cannot set $unit to a float value as $name would be overridden, ". 'set it first to 0 explicitly if you really want to erase its value' ); } } $this->add($unit, $floatValue - $base); } } } PKgt[h ''Carbon/FactoryImmutable.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Closure; use DateTimeImmutable; use DateTimeZone; use Psr\Clock\ClockInterface; /** * A factory to generate CarbonImmutable instances with common settings. * * * * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a * new instance. * @method CarbonImmutable|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time. * If any of $year, $month or $day are set to null their now() values will * be used. * If $hour is null it will be set to its now() value and the default * values for $minute and $second will be their now() values. * If $hour is not null then the default values for $minute and $second * will be 0. * @method CarbonImmutable createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now. * @method CarbonImmutable|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. * @method CarbonImmutable|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). * @method CarbonImmutable|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language. * @method CarbonImmutable|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language. * @method CarbonImmutable createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today. * @method CarbonImmutable createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today. * @method CarbonImmutable createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). * Timestamp input can be given as int, float or a string containing one or more numbers. * @method CarbonImmutable createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds. * Timestamp input can be given as int, float or a string containing one or more numbers. * @method CarbonImmutable createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds. * Timestamp input can be given as int, float or a string containing one or more numbers. * @method CarbonImmutable createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC. * Timestamp input can be given as int, float or a string containing one or more numbers. * @method CarbonImmutable createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight. * @method CarbonImmutable|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time. * If any of $year, $month or $day are set to null their now() values will * be used. * If $hour is null it will be set to its now() value and the default * values for $minute and $second will be their now() values. * If $hour is not null then the default values for $minute and $second * will be 0. * If one of the set values is not valid, an InvalidDateException * will be thrown. * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation. * @method CarbonImmutable disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @method CarbonImmutable enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, * then return the result of the closure (or null if the closure was void). * @method CarbonImmutable fromSerialized($value) Create an instance from a serialized string. * @method void genericMacro($macro, $priority = 0) Register a custom macro. * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. * (It will ignore custom translator dynamic loading.) * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native * name, region and variant of the locale. * @method array getDays() Get the days of the week * @method string|null getFallbackLocale() Get the fallback locale. * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). * @method array getIsoUnits() Returns list of locale units for ISO formatting. * @method array getLastErrors() {@inheritdoc} * @method string getLocale() Get the current translator locale. * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. * @method int getMidDayAt() get midday/noon hour * @method Closure|CarbonImmutable getTestNow() Get the Carbon instance (real or mock) to be returned when a "now" * instance is created. * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. * @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. * @method int getWeekEndsAt() Get the last day of week * @method int getWeekStartsAt() Get the first day of week * @method array getWeekendDays() Get weekend days * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. * @method bool hasMacro($name) Checks if macro is registered globally. * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance * is anything that is not null. * @method CarbonImmutable instance($date) Create a Carbon instance from a DateTime one. * @method bool isImmutable() Returns true if the current class/instance is immutable. * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. * @method bool isMutable() Returns true if the current class/instance is mutable. * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. * (It can be overridden in specific instances.) * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). * Support is considered enabled if the 3 words are translated in the given locale. * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). * Support is considered enabled if the 4 sentences are translated in the given locale. * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). * Support is considered enabled if the 2 words are translated in the given locale. * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). * Support is considered enabled if the 4 sentences are translated in the given locale. * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. * Support is considered enabled if either year, day or hour has a short variant translated. * @method void macro($name, $macro) Register a custom macro. * @method CarbonImmutable|null make($var) Make a Carbon instance from given variable if possible. * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals * and recurrences). Throw an exception for invalid format, but otherwise return null. * @method CarbonImmutable maxValue() Create a Carbon instance for the greatest supported date. * @method CarbonImmutable minValue() Create a Carbon instance for the lowest supported date. * @method void mixin($mixin) Mix another object into the class. * @method CarbonImmutable parse($time = null, $tz = null) Create a carbon instance from a string. * This is an alias for the constructor that allows better fluent syntax * as it allows you to do Carbon::parse('Monday next week')->fn() rather * than (new Carbon('Monday next week'))->fn(). * @method CarbonImmutable parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). * @method CarbonImmutable|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. * @method CarbonImmutable rawParse($time = null, $tz = null) Create a carbon instance from a string. * This is an alias for the constructor that allows better fluent syntax * as it allows you to do Carbon::parse('Monday next week')->fn() rather * than (new Carbon('Monday next week'))->fn(). * @method CarbonImmutable resetMacros() Remove all macros and generic macros. * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather transform Carbon object before the serialization. * JSON serialize all Carbon instances using the given callback. * @method CarbonImmutable setFallbackLocale($locale) Set the fallback locale. * @method CarbonImmutable setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. * Pass 'auto' as locale to use closest language from the current LC_TIME locale. * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather consider mid-day is always 12pm, then if you need to test if it's an other * hour, test it explicitly: * $date->format('G') == 13 * or to set explicitly to a given hour: * $date->setTime(13, 0, 0, 0) * Set midday/noon hour * @method CarbonImmutable setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now" * instance is created. The provided instance will be returned * specifically under the following conditions: * - A call to the static now() method, ex. Carbon::now() * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') * - When a string containing the desired time is passed to Carbon::parse(). * Note the timezone parameter was left out of the examples above and * has no affect as the mock value will be returned regardless of its value. * Only the moment is mocked with setTestNow(), the timezone will still be the one passed * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). * To clear the test instance call this method using the default * parameter of null. * /!\ Use this method for unit tests only. * @method CarbonImmutable setTestNowAndTimezone($testNow = null, $tz = null) Set a Carbon instance (real or mock) to be returned when a "now" * instance is created. The provided instance will be returned * specifically under the following conditions: * - A call to the static now() method, ex. Carbon::now() * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') * - When a string containing the desired time is passed to Carbon::parse(). * It will also align default timezone (e.g. call date_default_timezone_set()) with * the second argument or if null, with the timezone of the given date object. * To clear the test instance call this method using the default * parameter of null. * /!\ Use this method for unit tests only. * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and * use other method or custom format passed to format() method if you need to dump another string * format. * Set the default format used when type juggling a Carbon instance to a string. * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. * @method CarbonImmutable setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use UTF-8 language packages on every machine. * Set if UTF8 will be used for localized date/time. * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the * start of week according to current locale selected and implicitly the end of week. * Set the last day of week * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the * 'first_day_of_week' locale setting to change the start of week according to current locale * selected and implicitly the end of week. * Set the first day of week * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather consider week-end is always saturday and sunday, and if you have some custom * week-end days to handle, give to those days an other name and create a macro for them: * ``` * Carbon::macro('isDayOff', function ($date) { * return $date->isSunday() || $date->isMonday(); * }); * Carbon::macro('isNotDayOff', function ($date) { * return !$date->isDayOff(); * }); * if ($someDate->isDayOff()) ... * if ($someDate->isNotDayOff()) ... * // Add 5 not-off days * $count = 5; * while ($someDate->isDayOff() || ($count-- > 0)) { * $someDate->addDay(); * } * ``` * Set weekend days * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). * @method CarbonImmutable today($tz = null) Create a Carbon instance for today. * @method CarbonImmutable tomorrow($tz = null) Create a Carbon instance for tomorrow. * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. * @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @method CarbonImmutable useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback. * Using setTestNow to set the date, executing the callback, then * clearing the test instance. * /!\ Use this method for unit tests only. * @method CarbonImmutable yesterday($tz = null) Create a Carbon instance for yesterday. * * */ class FactoryImmutable extends Factory implements ClockInterface { protected $className = CarbonImmutable::class; /** * Get a Carbon instance for the current date and time. * * @param DateTimeZone|string|int|null $tz * * @return CarbonImmutable */ public function now($tz = null): DateTimeImmutable { $className = $this->className; return new $className(null, $tz); } } PKgt[Fe.ĉĉCarbon/CarbonImmutable.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Carbon\Traits\Date; use Carbon\Traits\DeprecatedProperties; use DateTimeImmutable; use DateTimeInterface; use DateTimeZone; /** * A simple API extension for DateTimeImmutable. * * @mixin DeprecatedProperties * * * * @property int $year * @property int $yearIso * @property int $month * @property int $day * @property int $hour * @property int $minute * @property int $second * @property int $micro * @property int $microsecond * @property int|float|string $timestamp seconds since the Unix Epoch * @property string $englishDayOfWeek the day of week in English * @property string $shortEnglishDayOfWeek the abbreviated day of week in English * @property string $englishMonth the month in English * @property string $shortEnglishMonth the abbreviated month in English * @property int $milliseconds * @property int $millisecond * @property int $milli * @property int $week 1 through 53 * @property int $isoWeek 1 through 53 * @property int $weekYear year according to week format * @property int $isoWeekYear year according to ISO week format * @property int $dayOfYear 1 through 366 * @property int $age does a diffInYears() with default parameters * @property int $offset the timezone offset in seconds from UTC * @property int $offsetMinutes the timezone offset in minutes from UTC * @property int $offsetHours the timezone offset in hours from UTC * @property CarbonTimeZone $timezone the current timezone * @property CarbonTimeZone $tz alias of $timezone * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday * @property-read int $daysInMonth number of days in the given month * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language * @property-read int $noZeroHour current hour from 1 to 24 * @property-read int $weeksInYear 51 through 53 * @property-read int $isoWeeksInYear 51 through 53 * @property-read int $weekOfMonth 1 through 5 * @property-read int $weekNumberInMonth 1 through 5 * @property-read int $firstWeekDay 0 through 6 * @property-read int $lastWeekDay 0 through 6 * @property-read int $daysInYear 365 or 366 * @property-read int $quarter the quarter of this instance, 1 - 4 * @property-read int $decade the decade of this instance * @property-read int $century the century of this instance * @property-read int $millennium the millennium of this instance * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise * @property-read bool $local checks if the timezone is local, true if local, false otherwise * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise * @property-read string $timezoneName the current timezone name * @property-read string $tzName alias of $timezoneName * @property-read string $locale locale of the current instance * * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) * @method bool isLocal() Check if the current instance has non-UTC timezone. * @method bool isValid() Check if the current instance is a valid date. * @method bool isDST() Check if the current instance is in a daylight saving time. * @method bool isSunday() Checks if the instance day is sunday. * @method bool isMonday() Checks if the instance day is monday. * @method bool isTuesday() Checks if the instance day is tuesday. * @method bool isWednesday() Checks if the instance day is wednesday. * @method bool isThursday() Checks if the instance day is thursday. * @method bool isFriday() Checks if the instance day is friday. * @method bool isSaturday() Checks if the instance day is saturday. * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. * @method CarbonImmutable years(int $value) Set current instance year to the given value. * @method CarbonImmutable year(int $value) Set current instance year to the given value. * @method CarbonImmutable setYears(int $value) Set current instance year to the given value. * @method CarbonImmutable setYear(int $value) Set current instance year to the given value. * @method CarbonImmutable months(int $value) Set current instance month to the given value. * @method CarbonImmutable month(int $value) Set current instance month to the given value. * @method CarbonImmutable setMonths(int $value) Set current instance month to the given value. * @method CarbonImmutable setMonth(int $value) Set current instance month to the given value. * @method CarbonImmutable days(int $value) Set current instance day to the given value. * @method CarbonImmutable day(int $value) Set current instance day to the given value. * @method CarbonImmutable setDays(int $value) Set current instance day to the given value. * @method CarbonImmutable setDay(int $value) Set current instance day to the given value. * @method CarbonImmutable hours(int $value) Set current instance hour to the given value. * @method CarbonImmutable hour(int $value) Set current instance hour to the given value. * @method CarbonImmutable setHours(int $value) Set current instance hour to the given value. * @method CarbonImmutable setHour(int $value) Set current instance hour to the given value. * @method CarbonImmutable minutes(int $value) Set current instance minute to the given value. * @method CarbonImmutable minute(int $value) Set current instance minute to the given value. * @method CarbonImmutable setMinutes(int $value) Set current instance minute to the given value. * @method CarbonImmutable setMinute(int $value) Set current instance minute to the given value. * @method CarbonImmutable seconds(int $value) Set current instance second to the given value. * @method CarbonImmutable second(int $value) Set current instance second to the given value. * @method CarbonImmutable setSeconds(int $value) Set current instance second to the given value. * @method CarbonImmutable setSecond(int $value) Set current instance second to the given value. * @method CarbonImmutable millis(int $value) Set current instance millisecond to the given value. * @method CarbonImmutable milli(int $value) Set current instance millisecond to the given value. * @method CarbonImmutable setMillis(int $value) Set current instance millisecond to the given value. * @method CarbonImmutable setMilli(int $value) Set current instance millisecond to the given value. * @method CarbonImmutable milliseconds(int $value) Set current instance millisecond to the given value. * @method CarbonImmutable millisecond(int $value) Set current instance millisecond to the given value. * @method CarbonImmutable setMilliseconds(int $value) Set current instance millisecond to the given value. * @method CarbonImmutable setMillisecond(int $value) Set current instance millisecond to the given value. * @method CarbonImmutable micros(int $value) Set current instance microsecond to the given value. * @method CarbonImmutable micro(int $value) Set current instance microsecond to the given value. * @method CarbonImmutable setMicros(int $value) Set current instance microsecond to the given value. * @method CarbonImmutable setMicro(int $value) Set current instance microsecond to the given value. * @method CarbonImmutable microseconds(int $value) Set current instance microsecond to the given value. * @method CarbonImmutable microsecond(int $value) Set current instance microsecond to the given value. * @method CarbonImmutable setMicroseconds(int $value) Set current instance microsecond to the given value. * @method CarbonImmutable setMicrosecond(int $value) Set current instance microsecond to the given value. * @method CarbonImmutable addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addYear() Add one year to the instance (using date interval). * @method CarbonImmutable subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subYear() Sub one year to the instance (using date interval). * @method CarbonImmutable addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addMonth() Add one month to the instance (using date interval). * @method CarbonImmutable subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subMonth() Sub one month to the instance (using date interval). * @method CarbonImmutable addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addDay() Add one day to the instance (using date interval). * @method CarbonImmutable subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subDay() Sub one day to the instance (using date interval). * @method CarbonImmutable addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addHour() Add one hour to the instance (using date interval). * @method CarbonImmutable subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subHour() Sub one hour to the instance (using date interval). * @method CarbonImmutable addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addMinute() Add one minute to the instance (using date interval). * @method CarbonImmutable subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subMinute() Sub one minute to the instance (using date interval). * @method CarbonImmutable addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addSecond() Add one second to the instance (using date interval). * @method CarbonImmutable subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subSecond() Sub one second to the instance (using date interval). * @method CarbonImmutable addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addMilli() Add one millisecond to the instance (using date interval). * @method CarbonImmutable subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subMilli() Sub one millisecond to the instance (using date interval). * @method CarbonImmutable addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addMillisecond() Add one millisecond to the instance (using date interval). * @method CarbonImmutable subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subMillisecond() Sub one millisecond to the instance (using date interval). * @method CarbonImmutable addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addMicro() Add one microsecond to the instance (using date interval). * @method CarbonImmutable subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subMicro() Sub one microsecond to the instance (using date interval). * @method CarbonImmutable addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addMicrosecond() Add one microsecond to the instance (using date interval). * @method CarbonImmutable subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subMicrosecond() Sub one microsecond to the instance (using date interval). * @method CarbonImmutable addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addMillennium() Add one millennium to the instance (using date interval). * @method CarbonImmutable subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subMillennium() Sub one millennium to the instance (using date interval). * @method CarbonImmutable addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addCentury() Add one century to the instance (using date interval). * @method CarbonImmutable subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subCentury() Sub one century to the instance (using date interval). * @method CarbonImmutable addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addDecade() Add one decade to the instance (using date interval). * @method CarbonImmutable subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subDecade() Sub one decade to the instance (using date interval). * @method CarbonImmutable addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addQuarter() Add one quarter to the instance (using date interval). * @method CarbonImmutable subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subQuarter() Sub one quarter to the instance (using date interval). * @method CarbonImmutable addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. * @method CarbonImmutable addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonImmutable addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addWeek() Add one week to the instance (using date interval). * @method CarbonImmutable subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subWeek() Sub one week to the instance (using date interval). * @method CarbonImmutable addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable addWeekday() Add one weekday to the instance (using date interval). * @method CarbonImmutable subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). * @method CarbonImmutable subWeekday() Sub one weekday to the instance (using date interval). * @method CarbonImmutable addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealMicro() Add one microsecond to the instance (using timestamp). * @method CarbonImmutable subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealMicro() Sub one microsecond to the instance (using timestamp). * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. * @method CarbonImmutable addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealMicrosecond() Add one microsecond to the instance (using timestamp). * @method CarbonImmutable subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealMicrosecond() Sub one microsecond to the instance (using timestamp). * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. * @method CarbonImmutable addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealMilli() Add one millisecond to the instance (using timestamp). * @method CarbonImmutable subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealMilli() Sub one millisecond to the instance (using timestamp). * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. * @method CarbonImmutable addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealMillisecond() Add one millisecond to the instance (using timestamp). * @method CarbonImmutable subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealMillisecond() Sub one millisecond to the instance (using timestamp). * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. * @method CarbonImmutable addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealSecond() Add one second to the instance (using timestamp). * @method CarbonImmutable subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealSecond() Sub one second to the instance (using timestamp). * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. * @method CarbonImmutable addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealMinute() Add one minute to the instance (using timestamp). * @method CarbonImmutable subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealMinute() Sub one minute to the instance (using timestamp). * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. * @method CarbonImmutable addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealHour() Add one hour to the instance (using timestamp). * @method CarbonImmutable subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealHour() Sub one hour to the instance (using timestamp). * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. * @method CarbonImmutable addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealDay() Add one day to the instance (using timestamp). * @method CarbonImmutable subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealDay() Sub one day to the instance (using timestamp). * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. * @method CarbonImmutable addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealWeek() Add one week to the instance (using timestamp). * @method CarbonImmutable subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealWeek() Sub one week to the instance (using timestamp). * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. * @method CarbonImmutable addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealMonth() Add one month to the instance (using timestamp). * @method CarbonImmutable subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealMonth() Sub one month to the instance (using timestamp). * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. * @method CarbonImmutable addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealQuarter() Add one quarter to the instance (using timestamp). * @method CarbonImmutable subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealQuarter() Sub one quarter to the instance (using timestamp). * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. * @method CarbonImmutable addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealYear() Add one year to the instance (using timestamp). * @method CarbonImmutable subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealYear() Sub one year to the instance (using timestamp). * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. * @method CarbonImmutable addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealDecade() Add one decade to the instance (using timestamp). * @method CarbonImmutable subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealDecade() Sub one decade to the instance (using timestamp). * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. * @method CarbonImmutable addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealCentury() Add one century to the instance (using timestamp). * @method CarbonImmutable subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealCentury() Sub one century to the instance (using timestamp). * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. * @method CarbonImmutable addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable addRealMillennium() Add one millennium to the instance (using timestamp). * @method CarbonImmutable subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). * @method CarbonImmutable subRealMillennium() Sub one millennium to the instance (using timestamp). * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. * @method CarbonImmutable roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method CarbonImmutable roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method CarbonImmutable floorYear(float $precision = 1) Truncate the current instance year with given precision. * @method CarbonImmutable floorYears(float $precision = 1) Truncate the current instance year with given precision. * @method CarbonImmutable ceilYear(float $precision = 1) Ceil the current instance year with given precision. * @method CarbonImmutable ceilYears(float $precision = 1) Ceil the current instance year with given precision. * @method CarbonImmutable roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method CarbonImmutable roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method CarbonImmutable floorMonth(float $precision = 1) Truncate the current instance month with given precision. * @method CarbonImmutable floorMonths(float $precision = 1) Truncate the current instance month with given precision. * @method CarbonImmutable ceilMonth(float $precision = 1) Ceil the current instance month with given precision. * @method CarbonImmutable ceilMonths(float $precision = 1) Ceil the current instance month with given precision. * @method CarbonImmutable roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method CarbonImmutable roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method CarbonImmutable floorDay(float $precision = 1) Truncate the current instance day with given precision. * @method CarbonImmutable floorDays(float $precision = 1) Truncate the current instance day with given precision. * @method CarbonImmutable ceilDay(float $precision = 1) Ceil the current instance day with given precision. * @method CarbonImmutable ceilDays(float $precision = 1) Ceil the current instance day with given precision. * @method CarbonImmutable roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method CarbonImmutable roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method CarbonImmutable floorHour(float $precision = 1) Truncate the current instance hour with given precision. * @method CarbonImmutable floorHours(float $precision = 1) Truncate the current instance hour with given precision. * @method CarbonImmutable ceilHour(float $precision = 1) Ceil the current instance hour with given precision. * @method CarbonImmutable ceilHours(float $precision = 1) Ceil the current instance hour with given precision. * @method CarbonImmutable roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method CarbonImmutable roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method CarbonImmutable floorMinute(float $precision = 1) Truncate the current instance minute with given precision. * @method CarbonImmutable floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. * @method CarbonImmutable ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. * @method CarbonImmutable ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. * @method CarbonImmutable roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method CarbonImmutable roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method CarbonImmutable floorSecond(float $precision = 1) Truncate the current instance second with given precision. * @method CarbonImmutable floorSeconds(float $precision = 1) Truncate the current instance second with given precision. * @method CarbonImmutable ceilSecond(float $precision = 1) Ceil the current instance second with given precision. * @method CarbonImmutable ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. * @method CarbonImmutable roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method CarbonImmutable roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method CarbonImmutable floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. * @method CarbonImmutable floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. * @method CarbonImmutable ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. * @method CarbonImmutable ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. * @method CarbonImmutable roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method CarbonImmutable roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method CarbonImmutable floorCentury(float $precision = 1) Truncate the current instance century with given precision. * @method CarbonImmutable floorCenturies(float $precision = 1) Truncate the current instance century with given precision. * @method CarbonImmutable ceilCentury(float $precision = 1) Ceil the current instance century with given precision. * @method CarbonImmutable ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. * @method CarbonImmutable roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method CarbonImmutable roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method CarbonImmutable floorDecade(float $precision = 1) Truncate the current instance decade with given precision. * @method CarbonImmutable floorDecades(float $precision = 1) Truncate the current instance decade with given precision. * @method CarbonImmutable ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. * @method CarbonImmutable ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. * @method CarbonImmutable roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method CarbonImmutable roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method CarbonImmutable floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. * @method CarbonImmutable floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. * @method CarbonImmutable ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. * @method CarbonImmutable ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. * @method CarbonImmutable roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method CarbonImmutable roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method CarbonImmutable floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. * @method CarbonImmutable floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. * @method CarbonImmutable ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. * @method CarbonImmutable ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. * @method CarbonImmutable roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method CarbonImmutable roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method CarbonImmutable floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. * @method CarbonImmutable floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. * @method CarbonImmutable ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. * @method CarbonImmutable ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method static static|false createFromFormat(string $format, string $time, DateTimeZone|string|false|null $timezone = null) Parse a string into a new CarbonImmutable object according to the specified format. * @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php * * */ class CarbonImmutable extends DateTimeImmutable implements CarbonInterface { use Date { __clone as dateTraitClone; } public function __clone() { $this->dateTraitClone(); $this->endOfTime = false; $this->startOfTime = false; } /** * Create a very old date representing start of time. * * @return static */ public static function startOfTime(): self { $date = static::parse('0001-01-01')->years(self::getStartOfTimeYear()); $date->startOfTime = true; return $date; } /** * Create a very far date representing end of time. * * @return static */ public static function endOfTime(): self { $date = static::parse('9999-12-31 23:59:59.999999')->years(self::getEndOfTimeYear()); $date->endOfTime = true; return $date; } /** * @codeCoverageIgnore */ private static function getEndOfTimeYear(): int { if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { return 145261681241552; } // Remove if https://bugs.php.net/bug.php?id=81107 is fixed if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) { return 1118290769066902787; } return PHP_INT_MAX; } /** * @codeCoverageIgnore */ private static function getStartOfTimeYear(): int { if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { return -135908816449551; } // Remove if https://bugs.php.net/bug.php?id=81107 is fixed if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) { return -1118290769066898816; } return max(PHP_INT_MIN, -9223372036854773760); } } PKgt[Ld33"Carbon/Traits/IntervalRounding.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\CarbonInterval; use Carbon\Exceptions\InvalidIntervalException; use DateInterval; /** * Trait to call rounding methods to interval or the interval of a period. */ trait IntervalRounding { protected function callRoundMethod(string $method, array $parameters) { $action = substr($method, 0, 4); if ($action !== 'ceil') { $action = substr($method, 0, 5); } if (\in_array($action, ['round', 'floor', 'ceil'])) { return $this->{$action.'Unit'}(substr($method, \strlen($action)), ...$parameters); } return null; } protected function roundWith($precision, $function) { $unit = 'second'; if ($precision instanceof DateInterval) { $precision = (string) CarbonInterval::instance($precision, [], true); } if (\is_string($precision) && preg_match('/^\s*(?\d+)?\s*(?\w+)(?\W.*)?$/', $precision, $match)) { if (trim($match['other'] ?? '') !== '') { throw new InvalidIntervalException('Rounding is only possible with single unit intervals.'); } $precision = (int) ($match['precision'] ?: 1); $unit = $match['unit']; } return $this->roundUnit($unit, $precision, $function); } } PKgt[ ԊCarbon/Traits/Comparison.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use BadMethodCallException; use Carbon\CarbonInterface; use Carbon\Exceptions\BadComparisonUnitException; use InvalidArgumentException; /** * Trait Comparison. * * Comparison utils and testers. All the following methods return booleans. * nowWithSameTz * * Depends on the following methods: * * @method static resolveCarbon($date) * @method static copy() * @method static nowWithSameTz() * @method static static yesterday($timezone = null) * @method static static tomorrow($timezone = null) */ trait Comparison { /** @var bool */ protected $endOfTime = false; /** @var bool */ protected $startOfTime = false; /** * Determines if the instance is equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->eq(Carbon::parse('2018-07-25 12:45:16')); // true * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see equalTo() * * @return bool */ public function eq($date): bool { return $this->equalTo($date); } /** * Determines if the instance is equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->equalTo(Carbon::parse('2018-07-25 12:45:16')); // true * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function equalTo($date): bool { $this->discourageNull($date); $this->discourageBoolean($date); return $this == $this->resolveCarbon($date); } /** * Determines if the instance is not equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->ne(Carbon::parse('2018-07-25 12:45:16')); // false * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see notEqualTo() * * @return bool */ public function ne($date): bool { return $this->notEqualTo($date); } /** * Determines if the instance is not equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->notEqualTo(Carbon::parse('2018-07-25 12:45:16')); // false * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function notEqualTo($date): bool { return !$this->equalTo($date); } /** * Determines if the instance is greater (after) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:15'); // true * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see greaterThan() * * @return bool */ public function gt($date): bool { return $this->greaterThan($date); } /** * Determines if the instance is greater (after) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:15'); // true * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function greaterThan($date): bool { $this->discourageNull($date); $this->discourageBoolean($date); return $this > $this->resolveCarbon($date); } /** * Determines if the instance is greater (after) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:15'); // true * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see greaterThan() * * @return bool */ public function isAfter($date): bool { return $this->greaterThan($date); } /** * Determines if the instance is greater (after) than or equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:15'); // true * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see greaterThanOrEqualTo() * * @return bool */ public function gte($date): bool { return $this->greaterThanOrEqualTo($date); } /** * Determines if the instance is greater (after) than or equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:15'); // true * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function greaterThanOrEqualTo($date): bool { $this->discourageNull($date); $this->discourageBoolean($date); return $this >= $this->resolveCarbon($date); } /** * Determines if the instance is less (before) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:15'); // false * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see lessThan() * * @return bool */ public function lt($date): bool { return $this->lessThan($date); } /** * Determines if the instance is less (before) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:15'); // false * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function lessThan($date): bool { $this->discourageNull($date); $this->discourageBoolean($date); return $this < $this->resolveCarbon($date); } /** * Determines if the instance is less (before) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:15'); // false * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see lessThan() * * @return bool */ public function isBefore($date): bool { return $this->lessThan($date); } /** * Determines if the instance is less (before) or equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:15'); // false * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see lessThanOrEqualTo() * * @return bool */ public function lte($date): bool { return $this->lessThanOrEqualTo($date); } /** * Determines if the instance is less (before) or equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:15'); // false * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function lessThanOrEqualTo($date): bool { $this->discourageNull($date); $this->discourageBoolean($date); return $this <= $this->resolveCarbon($date); } /** * Determines if the instance is between two others. * * The third argument allow you to specify if bounds are included or not (true by default) * but for when you including/excluding bounds may produce different results in your application, * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. * * @example * ``` * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * @param bool $equal Indicates if an equal to comparison should be done * * @return bool */ public function between($date1, $date2, $equal = true): bool { $date1 = $this->resolveCarbon($date1); $date2 = $this->resolveCarbon($date2); if ($date1->greaterThan($date2)) { [$date1, $date2] = [$date2, $date1]; } if ($equal) { return $this >= $date1 && $this <= $date2; } return $this > $date1 && $this < $date2; } /** * Determines if the instance is between two others, bounds included. * * @example * ``` * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return bool */ public function betweenIncluded($date1, $date2): bool { return $this->between($date1, $date2, true); } /** * Determines if the instance is between two others, bounds excluded. * * @example * ``` * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return bool */ public function betweenExcluded($date1, $date2): bool { return $this->between($date1, $date2, false); } /** * Determines if the instance is between two others * * @example * ``` * Carbon::parse('2018-07-25')->isBetween('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->isBetween('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01'); // true * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01', false); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * @param bool $equal Indicates if an equal to comparison should be done * * @return bool */ public function isBetween($date1, $date2, $equal = true): bool { return $this->between($date1, $date2, $equal); } /** * Determines if the instance is a weekday. * * @example * ``` * Carbon::parse('2019-07-14')->isWeekday(); // false * Carbon::parse('2019-07-15')->isWeekday(); // true * ``` * * @return bool */ public function isWeekday() { return !$this->isWeekend(); } /** * Determines if the instance is a weekend day. * * @example * ``` * Carbon::parse('2019-07-14')->isWeekend(); // true * Carbon::parse('2019-07-15')->isWeekend(); // false * ``` * * @return bool */ public function isWeekend() { return \in_array($this->dayOfWeek, static::$weekendDays, true); } /** * Determines if the instance is yesterday. * * @example * ``` * Carbon::yesterday()->isYesterday(); // true * Carbon::tomorrow()->isYesterday(); // false * ``` * * @return bool */ public function isYesterday() { return $this->toDateString() === static::yesterday($this->getTimezone())->toDateString(); } /** * Determines if the instance is today. * * @example * ``` * Carbon::today()->isToday(); // true * Carbon::tomorrow()->isToday(); // false * ``` * * @return bool */ public function isToday() { return $this->toDateString() === $this->nowWithSameTz()->toDateString(); } /** * Determines if the instance is tomorrow. * * @example * ``` * Carbon::tomorrow()->isTomorrow(); // true * Carbon::yesterday()->isTomorrow(); // false * ``` * * @return bool */ public function isTomorrow() { return $this->toDateString() === static::tomorrow($this->getTimezone())->toDateString(); } /** * Determines if the instance is in the future, ie. greater (after) than now. * * @example * ``` * Carbon::now()->addHours(5)->isFuture(); // true * Carbon::now()->subHours(5)->isFuture(); // false * ``` * * @return bool */ public function isFuture() { return $this->greaterThan($this->nowWithSameTz()); } /** * Determines if the instance is in the past, ie. less (before) than now. * * @example * ``` * Carbon::now()->subHours(5)->isPast(); // true * Carbon::now()->addHours(5)->isPast(); // false * ``` * * @return bool */ public function isPast() { return $this->lessThan($this->nowWithSameTz()); } /** * Determines if the instance is a leap year. * * @example * ``` * Carbon::parse('2020-01-01')->isLeapYear(); // true * Carbon::parse('2019-01-01')->isLeapYear(); // false * ``` * * @return bool */ public function isLeapYear() { return $this->rawFormat('L') === '1'; } /** * Determines if the instance is a long year (using calendar year). * * ⚠️ This method completely ignores month and day to use the numeric year number, * it's not correct if the exact date matters. For instance as `2019-12-30` is already * in the first week of the 2020 year, if you want to know from this date if ISO week * year 2020 is a long year, use `isLongIsoYear` instead. * * @example * ``` * Carbon::create(2015)->isLongYear(); // true * Carbon::create(2016)->isLongYear(); // false * ``` * * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates * * @return bool */ public function isLongYear() { return static::create($this->year, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; } /** * Determines if the instance is a long year (using ISO 8601 year). * * @example * ``` * Carbon::parse('2015-01-01')->isLongIsoYear(); // true * Carbon::parse('2016-01-01')->isLongIsoYear(); // true * Carbon::parse('2016-01-03')->isLongIsoYear(); // false * Carbon::parse('2019-12-29')->isLongIsoYear(); // false * Carbon::parse('2019-12-30')->isLongIsoYear(); // true * ``` * * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates * * @return bool */ public function isLongIsoYear() { return static::create($this->isoWeekYear, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; } /** * Compares the formatted values of the two dates. * * @example * ``` * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false * ``` * * @param string $format date formats to compare. * @param \Carbon\Carbon|\DateTimeInterface|string|null $date instance to compare with or null to use current day. * * @return bool */ public function isSameAs($format, $date = null) { return $this->rawFormat($format) === $this->resolveCarbon($date)->rawFormat($format); } /** * Determines if the instance is in the current unit given. * * @example * ``` * Carbon::parse('2019-01-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // true * Carbon::parse('2018-12-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // false * ``` * * @param string $unit singular unit string * @param \Carbon\Carbon|\DateTimeInterface|null $date instance to compare with or null to use current day. * * @throws BadComparisonUnitException * * @return bool */ public function isSameUnit($unit, $date = null) { $units = [ // @call isSameUnit 'year' => 'Y', // @call isSameUnit 'week' => 'o-W', // @call isSameUnit 'day' => 'Y-m-d', // @call isSameUnit 'hour' => 'Y-m-d H', // @call isSameUnit 'minute' => 'Y-m-d H:i', // @call isSameUnit 'second' => 'Y-m-d H:i:s', // @call isSameUnit 'micro' => 'Y-m-d H:i:s.u', // @call isSameUnit 'microsecond' => 'Y-m-d H:i:s.u', ]; if (isset($units[$unit])) { return $this->isSameAs($units[$unit], $date); } if (isset($this->$unit)) { return $this->resolveCarbon($date)->$unit === $this->$unit; } if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { throw new BadComparisonUnitException($unit); } return false; } /** * Determines if the instance is in the current unit given. * * @example * ``` * Carbon::now()->isCurrentUnit('hour'); // true * Carbon::now()->subHours(2)->isCurrentUnit('hour'); // false * ``` * * @param string $unit The unit to test. * * @throws BadMethodCallException * * @return bool */ public function isCurrentUnit($unit) { return $this->{'isSame'.ucfirst($unit)}(); } /** * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). * * @example * ``` * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-03-01')); // true * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-04-01')); // false * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01')); // false * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01'), false); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|string|null $date The instance to compare with or null to use current day. * @param bool $ofSameYear Check if it is the same month in the same year. * * @return bool */ public function isSameQuarter($date = null, $ofSameYear = true) { $date = $this->resolveCarbon($date); return $this->quarter === $date->quarter && (!$ofSameYear || $this->isSameYear($date)); } /** * Checks if the passed in date is in the same month as the instance´s month. * * @example * ``` * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-01-01')); // true * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-02-01')); // false * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. * @param bool $ofSameYear Check if it is the same month in the same year. * * @return bool */ public function isSameMonth($date = null, $ofSameYear = true) { return $this->isSameAs($ofSameYear ? 'Y-m' : 'm', $date); } /** * Checks if this day is a specific day of the week. * * @example * ``` * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::WEDNESDAY); // true * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::FRIDAY); // false * Carbon::parse('2019-07-17')->isDayOfWeek('Wednesday'); // true * Carbon::parse('2019-07-17')->isDayOfWeek('Friday'); // false * ``` * * @param int $dayOfWeek * * @return bool */ public function isDayOfWeek($dayOfWeek) { if (\is_string($dayOfWeek) && \defined($constant = static::class.'::'.strtoupper($dayOfWeek))) { $dayOfWeek = \constant($constant); } return $this->dayOfWeek === $dayOfWeek; } /** * Check if its the birthday. Compares the date/month values of the two dates. * * @example * ``` * Carbon::now()->subYears(5)->isBirthday(); // true * Carbon::now()->subYears(5)->subDay()->isBirthday(); // false * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. * * @return bool */ public function isBirthday($date = null) { return $this->isSameAs('md', $date); } /** * Check if today is the last day of the Month * * @example * ``` * Carbon::parse('2019-02-28')->isLastOfMonth(); // true * Carbon::parse('2019-03-28')->isLastOfMonth(); // false * Carbon::parse('2019-03-30')->isLastOfMonth(); // false * Carbon::parse('2019-03-31')->isLastOfMonth(); // true * Carbon::parse('2019-04-30')->isLastOfMonth(); // true * ``` * * @return bool */ public function isLastOfMonth() { return $this->day === $this->daysInMonth; } /** * Check if the instance is start of day / midnight. * * @example * ``` * Carbon::parse('2019-02-28 00:00:00')->isStartOfDay(); // true * Carbon::parse('2019-02-28 00:00:00.999999')->isStartOfDay(); // true * Carbon::parse('2019-02-28 00:00:01')->isStartOfDay(); // false * Carbon::parse('2019-02-28 00:00:00.000000')->isStartOfDay(true); // true * Carbon::parse('2019-02-28 00:00:00.000012')->isStartOfDay(true); // false * ``` * * @param bool $checkMicroseconds check time at microseconds precision * * @return bool */ public function isStartOfDay($checkMicroseconds = false) { /* @var CarbonInterface $this */ return $checkMicroseconds ? $this->rawFormat('H:i:s.u') === '00:00:00.000000' : $this->rawFormat('H:i:s') === '00:00:00'; } /** * Check if the instance is end of day. * * @example * ``` * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(); // true * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(); // true * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(); // true * Carbon::parse('2019-02-28 23:59:58.999999')->isEndOfDay(); // false * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(true); // true * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(true); // false * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(true); // false * ``` * * @param bool $checkMicroseconds check time at microseconds precision * * @return bool */ public function isEndOfDay($checkMicroseconds = false) { /* @var CarbonInterface $this */ return $checkMicroseconds ? $this->rawFormat('H:i:s.u') === '23:59:59.999999' : $this->rawFormat('H:i:s') === '23:59:59'; } /** * Check if the instance is start of day / midnight. * * @example * ``` * Carbon::parse('2019-02-28 00:00:00')->isMidnight(); // true * Carbon::parse('2019-02-28 00:00:00.999999')->isMidnight(); // true * Carbon::parse('2019-02-28 00:00:01')->isMidnight(); // false * ``` * * @return bool */ public function isMidnight() { return $this->isStartOfDay(); } /** * Check if the instance is midday. * * @example * ``` * Carbon::parse('2019-02-28 11:59:59.999999')->isMidday(); // false * Carbon::parse('2019-02-28 12:00:00')->isMidday(); // true * Carbon::parse('2019-02-28 12:00:00.999999')->isMidday(); // true * Carbon::parse('2019-02-28 12:00:01')->isMidday(); // false * ``` * * @return bool */ public function isMidday() { /* @var CarbonInterface $this */ return $this->rawFormat('G:i:s') === static::$midDayAt.':00:00'; } /** * Checks if the (date)time string is in a given format. * * @example * ``` * Carbon::hasFormat('11:12:45', 'h:i:s'); // true * Carbon::hasFormat('13:12:45', 'h:i:s'); // false * ``` * * @param string $date * @param string $format * * @return bool */ public static function hasFormat($date, $format) { // createFromFormat() is known to handle edge cases silently. // E.g. "1975-5-1" (Y-n-j) will still be parsed correctly when "Y-m-d" is supplied as the format. // To ensure we're really testing against our desired format, perform an additional regex validation. return self::matchFormatPattern((string) $date, preg_quote((string) $format, '/'), static::$regexFormats); } /** * Checks if the (date)time string is in a given format. * * @example * ``` * Carbon::hasFormatWithModifiers('31/08/2015', 'd#m#Y'); // true * Carbon::hasFormatWithModifiers('31/08/2015', 'm#d#Y'); // false * ``` * * @param string $date * @param string $format * * @return bool */ public static function hasFormatWithModifiers($date, $format): bool { return self::matchFormatPattern((string) $date, (string) $format, array_merge(static::$regexFormats, static::$regexFormatModifiers)); } /** * Checks if the (date)time string is in a given format and valid to create a * new instance. * * @example * ``` * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false * ``` * * @param string $date * @param string $format * * @return bool */ public static function canBeCreatedFromFormat($date, $format) { try { // Try to create a DateTime object. Throws an InvalidArgumentException if the provided time string // doesn't match the format in any way. if (!static::rawCreateFromFormat($format, $date)) { return false; } } catch (InvalidArgumentException $e) { return false; } return static::hasFormatWithModifiers($date, $format); } /** * Returns true if the current date matches the given string. * * @example * ``` * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2018')); // false * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('06-02')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06-02')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('Sunday')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('June')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:45')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:00')); // false * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12h')); // true * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3pm')); // true * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3am')); // false * ``` * * @param string $tester day name, month name, hour, date, etc. as string * * @return bool */ public function is(string $tester) { $tester = trim($tester); if (preg_match('/^\d+$/', $tester)) { return $this->year === (int) $tester; } if (preg_match('/^\d{3,}-\d{1,2}$/', $tester)) { return $this->isSameMonth(static::parse($tester)); } if (preg_match('/^\d{1,2}-\d{1,2}$/', $tester)) { return $this->isSameDay(static::parse($this->year.'-'.$tester)); } $modifier = preg_replace('/(\d)h$/i', '$1:00', $tester); /* @var CarbonInterface $max */ $median = static::parse('5555-06-15 12:30:30.555555')->modify($modifier); $current = $this->avoidMutation(); /* @var CarbonInterface $other */ $other = $this->avoidMutation()->modify($modifier); if ($current->eq($other)) { return true; } if (preg_match('/\d:\d{1,2}:\d{1,2}$/', $tester)) { return $current->startOfSecond()->eq($other); } if (preg_match('/\d:\d{1,2}$/', $tester)) { return $current->startOfMinute()->eq($other); } if (preg_match('/\d(?:h|am|pm)$/', $tester)) { return $current->startOfHour()->eq($other); } if (preg_match( '/^(?:january|february|march|april|may|june|july|august|september|october|november|december)(?:\s+\d+)?$/i', $tester )) { return $current->startOfMonth()->eq($other->startOfMonth()); } $units = [ 'month' => [1, 'year'], 'day' => [1, 'month'], 'hour' => [0, 'day'], 'minute' => [0, 'hour'], 'second' => [0, 'minute'], 'microsecond' => [0, 'second'], ]; foreach ($units as $unit => [$minimum, $startUnit]) { if ($minimum === $median->$unit) { $current = $current->startOf($startUnit); break; } } return $current->eq($other); } /** * Checks if the (date)time string is in a given format with * given list of pattern replacements. * * @example * ``` * Carbon::hasFormat('11:12:45', 'h:i:s'); // true * Carbon::hasFormat('13:12:45', 'h:i:s'); // false * ``` * * @param string $date * @param string $format * @param array $replacements * * @return bool */ private static function matchFormatPattern(string $date, string $format, array $replacements): bool { // Preg quote, but remove escaped backslashes since we'll deal with escaped characters in the format string. $regex = str_replace('\\\\', '\\', $format); // Replace not-escaped letters $regex = preg_replace_callback( '/(?startOfTime ?? false; } /** * Returns true if the date was created using CarbonImmutable::endOfTime() * * @return bool */ public function isEndOfTime(): bool { return $this->endOfTime ?? false; } private function discourageNull($value): void { if ($value === null) { @trigger_error("Since 2.61.0, it's deprecated to compare a date to null, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate null values.", \E_USER_DEPRECATED); } } private function discourageBoolean($value): void { if (\is_bool($value)) { @trigger_error("Since 2.61.0, it's deprecated to compare a date to true or false, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate boolean values.", \E_USER_DEPRECATED); } } } PKgt[55Carbon/Traits/Modifiers.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\CarbonInterface; use ReturnTypeWillChange; /** * Trait Modifiers. * * Returns dates relative to current date using modifier short-hand. */ trait Modifiers { /** * Midday/noon hour. * * @var int */ protected static $midDayAt = 12; /** * get midday/noon hour * * @return int */ public static function getMidDayAt() { return static::$midDayAt; } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather consider mid-day is always 12pm, then if you need to test if it's an other * hour, test it explicitly: * $date->format('G') == 13 * or to set explicitly to a given hour: * $date->setTime(13, 0, 0, 0) * * Set midday/noon hour * * @param int $hour midday hour * * @return void */ public static function setMidDayAt($hour) { static::$midDayAt = $hour; } /** * Modify to midday, default to self::$midDayAt * * @return static */ public function midDay() { return $this->setTime(static::$midDayAt, 0, 0, 0); } /** * Modify to the next occurrence of a given modifier such as a day of * the week. If no modifier is provided, modify to the next occurrence * of the current day of the week. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param string|int|null $modifier * * @return static|false */ public function next($modifier = null) { if ($modifier === null) { $modifier = $this->dayOfWeek; } return $this->change( 'next '.(\is_string($modifier) ? $modifier : static::$days[$modifier]) ); } /** * Go forward or backward to the next week- or weekend-day. * * @param bool $weekday * @param bool $forward * * @return static */ private function nextOrPreviousDay($weekday = true, $forward = true) { /** @var CarbonInterface $date */ $date = $this; $step = $forward ? 1 : -1; do { $date = $date->addDays($step); } while ($weekday ? $date->isWeekend() : $date->isWeekday()); return $date; } /** * Go forward to the next weekday. * * @return static */ public function nextWeekday() { return $this->nextOrPreviousDay(); } /** * Go backward to the previous weekday. * * @return static */ public function previousWeekday() { return $this->nextOrPreviousDay(true, false); } /** * Go forward to the next weekend day. * * @return static */ public function nextWeekendDay() { return $this->nextOrPreviousDay(false); } /** * Go backward to the previous weekend day. * * @return static */ public function previousWeekendDay() { return $this->nextOrPreviousDay(false, false); } /** * Modify to the previous occurrence of a given modifier such as a day of * the week. If no dayOfWeek is provided, modify to the previous occurrence * of the current day of the week. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param string|int|null $modifier * * @return static|false */ public function previous($modifier = null) { if ($modifier === null) { $modifier = $this->dayOfWeek; } return $this->change( 'last '.(\is_string($modifier) ? $modifier : static::$days[$modifier]) ); } /** * Modify to the first occurrence of a given day of the week * in the current month. If no dayOfWeek is provided, modify to the * first day of the current month. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek * * @return static */ public function firstOfMonth($dayOfWeek = null) { $date = $this->startOfDay(); if ($dayOfWeek === null) { return $date->day(1); } return $date->modify('first '.static::$days[$dayOfWeek].' of '.$date->rawFormat('F').' '.$date->year); } /** * Modify to the last occurrence of a given day of the week * in the current month. If no dayOfWeek is provided, modify to the * last day of the current month. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek * * @return static */ public function lastOfMonth($dayOfWeek = null) { $date = $this->startOfDay(); if ($dayOfWeek === null) { return $date->day($date->daysInMonth); } return $date->modify('last '.static::$days[$dayOfWeek].' of '.$date->rawFormat('F').' '.$date->year); } /** * Modify to the given occurrence of a given day of the week * in the current month. If the calculated occurrence is outside the scope * of the current month, then return false and no modifications are made. * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int $nth * @param int $dayOfWeek * * @return mixed */ public function nthOfMonth($nth, $dayOfWeek) { $date = $this->avoidMutation()->firstOfMonth(); $check = $date->rawFormat('Y-m'); $date = $date->modify('+'.$nth.' '.static::$days[$dayOfWeek]); return $date->rawFormat('Y-m') === $check ? $this->modify((string) $date) : false; } /** * Modify to the first occurrence of a given day of the week * in the current quarter. If no dayOfWeek is provided, modify to the * first day of the current quarter. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek day of the week default null * * @return static */ public function firstOfQuarter($dayOfWeek = null) { return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER - 2, 1)->firstOfMonth($dayOfWeek); } /** * Modify to the last occurrence of a given day of the week * in the current quarter. If no dayOfWeek is provided, modify to the * last day of the current quarter. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek day of the week default null * * @return static */ public function lastOfQuarter($dayOfWeek = null) { return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER, 1)->lastOfMonth($dayOfWeek); } /** * Modify to the given occurrence of a given day of the week * in the current quarter. If the calculated occurrence is outside the scope * of the current quarter, then return false and no modifications are made. * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int $nth * @param int $dayOfWeek * * @return mixed */ public function nthOfQuarter($nth, $dayOfWeek) { $date = $this->avoidMutation()->day(1)->month($this->quarter * static::MONTHS_PER_QUARTER); $lastMonth = $date->month; $year = $date->year; $date = $date->firstOfQuarter()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); return ($lastMonth < $date->month || $year !== $date->year) ? false : $this->modify((string) $date); } /** * Modify to the first occurrence of a given day of the week * in the current year. If no dayOfWeek is provided, modify to the * first day of the current year. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek day of the week default null * * @return static */ public function firstOfYear($dayOfWeek = null) { return $this->month(1)->firstOfMonth($dayOfWeek); } /** * Modify to the last occurrence of a given day of the week * in the current year. If no dayOfWeek is provided, modify to the * last day of the current year. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek day of the week default null * * @return static */ public function lastOfYear($dayOfWeek = null) { return $this->month(static::MONTHS_PER_YEAR)->lastOfMonth($dayOfWeek); } /** * Modify to the given occurrence of a given day of the week * in the current year. If the calculated occurrence is outside the scope * of the current year, then return false and no modifications are made. * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int $nth * @param int $dayOfWeek * * @return mixed */ public function nthOfYear($nth, $dayOfWeek) { $date = $this->avoidMutation()->firstOfYear()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); return $this->year === $date->year ? $this->modify((string) $date) : false; } /** * Modify the current instance to the average of a given instance (default now) and the current instance * (second-precision). * * @param \Carbon\Carbon|\DateTimeInterface|null $date * * @return static */ public function average($date = null) { return $this->addRealMicroseconds((int) ($this->diffInRealMicroseconds($this->resolveCarbon($date), false) / 2)); } /** * Get the closest date from the instance (second-precision). * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return static */ public function closest($date1, $date2) { return $this->diffInRealMicroseconds($date1) < $this->diffInRealMicroseconds($date2) ? $date1 : $date2; } /** * Get the farthest date from the instance (second-precision). * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return static */ public function farthest($date1, $date2) { return $this->diffInRealMicroseconds($date1) > $this->diffInRealMicroseconds($date2) ? $date1 : $date2; } /** * Get the minimum instance between a given instance (default now) and the current instance. * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return static */ public function min($date = null) { $date = $this->resolveCarbon($date); return $this->lt($date) ? $this : $date; } /** * Get the minimum instance between a given instance (default now) and the current instance. * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see min() * * @return static */ public function minimum($date = null) { return $this->min($date); } /** * Get the maximum instance between a given instance (default now) and the current instance. * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return static */ public function max($date = null) { $date = $this->resolveCarbon($date); return $this->gt($date) ? $this : $date; } /** * Get the maximum instance between a given instance (default now) and the current instance. * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see max() * * @return static */ public function maximum($date = null) { return $this->max($date); } /** * Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else. * * @see https://php.net/manual/en/datetime.modify.php * * @return static|false */ #[ReturnTypeWillChange] public function modify($modify) { return parent::modify((string) $modify); } /** * Similar to native modify() method of DateTime but can handle more grammars. * * @example * ``` * echo Carbon::now()->change('next 2pm'); * ``` * * @link https://php.net/manual/en/datetime.modify.php * * @param string $modifier * * @return static|false */ public function change($modifier) { return $this->modify(preg_replace_callback('/^(next|previous|last)\s+(\d{1,2}(h|am|pm|:\d{1,2}(:\d{1,2})?))$/i', function ($match) { $match[2] = str_replace('h', ':00', $match[2]); $test = $this->avoidMutation()->modify($match[2]); $method = $match[1] === 'next' ? 'lt' : 'gt'; $match[1] = $test->$method($this) ? $match[1].' day' : 'today'; return $match[1].' '.$match[2]; }, strtr(trim($modifier), [ ' at ' => ' ', 'just now' => 'now', 'after tomorrow' => 'tomorrow +1 day', 'before yesterday' => 'yesterday -1 day', ]))); } } PKgt[j[Carbon/Traits/Week.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; /** * Trait Week. * * week and ISO week number, year and count in year. * * Depends on the following properties: * * @property int $daysInYear * @property int $dayOfWeek * @property int $dayOfYear * @property int $year * * Depends on the following methods: * * @method static addWeeks(int $weeks = 1) * @method static copy() * @method static dayOfYear(int $dayOfYear) * @method string getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null) * @method static next(int|string $day = null) * @method static startOfWeek(int $day = 1) * @method static subWeeks(int $weeks = 1) * @method static year(int $year = null) */ trait Week { /** * Set/get the week number of year using given first day of week and first * day of year included in the first week. Or use ISO format if no settings * given. * * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) * @param int|null $dayOfYear first day of year included in the week #1 * * @return int|static */ public function isoWeekYear($year = null, $dayOfWeek = null, $dayOfYear = null) { return $this->weekYear( $year, $dayOfWeek ?? 1, $dayOfYear ?? 4 ); } /** * Set/get the week number of year using given first day of week and first * day of year included in the first week. Or use US format if no settings * given (Sunday / Jan 6). * * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) * @param int|null $dayOfYear first day of year included in the week #1 * * @return int|static */ public function weekYear($year = null, $dayOfWeek = null, $dayOfYear = null) { $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; if ($year !== null) { $year = (int) round($year); if ($this->weekYear(null, $dayOfWeek, $dayOfYear) === $year) { return $this->avoidMutation(); } $week = $this->week(null, $dayOfWeek, $dayOfYear); $day = $this->dayOfWeek; $date = $this->year($year); switch ($date->weekYear(null, $dayOfWeek, $dayOfYear) - $year) { case 1: $date = $date->subWeeks(26); break; case -1: $date = $date->addWeeks(26); break; } $date = $date->addWeeks($week - $date->week(null, $dayOfWeek, $dayOfYear))->startOfWeek($dayOfWeek); if ($date->dayOfWeek === $day) { return $date; } return $date->next($day); } $year = $this->year; $day = $this->dayOfYear; $date = $this->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); if ($date->year === $year && $day < $date->dayOfYear) { return $year - 1; } $date = $this->avoidMutation()->addYear()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); if ($date->year === $year && $day >= $date->dayOfYear) { return $year + 1; } return $year; } /** * Get the number of weeks of the current week-year using given first day of week and first * day of year included in the first week. Or use ISO format if no settings * given. * * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) * @param int|null $dayOfYear first day of year included in the week #1 * * @return int */ public function isoWeeksInYear($dayOfWeek = null, $dayOfYear = null) { return $this->weeksInYear( $dayOfWeek ?? 1, $dayOfYear ?? 4 ); } /** * Get the number of weeks of the current week-year using given first day of week and first * day of year included in the first week. Or use US format if no settings * given (Sunday / Jan 6). * * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) * @param int|null $dayOfYear first day of year included in the week #1 * * @return int */ public function weeksInYear($dayOfWeek = null, $dayOfYear = null) { $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; $year = $this->year; $start = $this->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); $startDay = $start->dayOfYear; if ($start->year !== $year) { $startDay -= $start->daysInYear; } $end = $this->avoidMutation()->addYear()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); $endDay = $end->dayOfYear; if ($end->year !== $year) { $endDay += $this->daysInYear; } return (int) round(($endDay - $startDay) / 7); } /** * Get/set the week number using given first day of week and first * day of year included in the first week. Or use US format if no settings * given (Sunday / Jan 6). * * @param int|null $week * @param int|null $dayOfWeek * @param int|null $dayOfYear * * @return int|static */ public function week($week = null, $dayOfWeek = null, $dayOfYear = null) { $date = $this; $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; if ($week !== null) { return $date->addWeeks(round($week) - $this->week(null, $dayOfWeek, $dayOfYear)); } $start = $date->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); $end = $date->avoidMutation()->startOfWeek($dayOfWeek); if ($start > $end) { $start = $start->subWeeks(26)->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); } $week = (int) ($start->diffInDays($end) / 7 + 1); return $week > $end->weeksInYear($dayOfWeek, $dayOfYear) ? 1 : $week; } /** * Get/set the week number using given first day of week and first * day of year included in the first week. Or use ISO format if no settings * given. * * @param int|null $week * @param int|null $dayOfWeek * @param int|null $dayOfYear * * @return int|static */ public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = null) { return $this->week( $week, $dayOfWeek ?? 1, $dayOfYear ?? 4 ); } } PKgt[ѭQ%,%,Carbon/Traits/Boundaries.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\Exceptions\UnknownUnitException; /** * Trait Boundaries. * * startOf, endOf and derived method for each unit. * * Depends on the following properties: * * @property int $year * @property int $month * @property int $daysInMonth * @property int $quarter * * Depends on the following methods: * * @method $this setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) * @method $this setDate(int $year, int $month, int $day) * @method $this addMonths(int $value = 1) */ trait Boundaries { /** * Resets the time to 00:00:00 start of day * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfDay(); * ``` * * @return static */ public function startOfDay() { return $this->setTime(0, 0, 0, 0); } /** * Resets the time to 23:59:59.999999 end of day * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfDay(); * ``` * * @return static */ public function endOfDay() { return $this->setTime(static::HOURS_PER_DAY - 1, static::MINUTES_PER_HOUR - 1, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); } /** * Resets the date to the first day of the month and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfMonth(); * ``` * * @return static */ public function startOfMonth() { return $this->setDate($this->year, $this->month, 1)->startOfDay(); } /** * Resets the date to end of the month and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfMonth(); * ``` * * @return static */ public function endOfMonth() { return $this->setDate($this->year, $this->month, $this->daysInMonth)->endOfDay(); } /** * Resets the date to the first day of the quarter and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfQuarter(); * ``` * * @return static */ public function startOfQuarter() { $month = ($this->quarter - 1) * static::MONTHS_PER_QUARTER + 1; return $this->setDate($this->year, $month, 1)->startOfDay(); } /** * Resets the date to end of the quarter and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfQuarter(); * ``` * * @return static */ public function endOfQuarter() { return $this->startOfQuarter()->addMonths(static::MONTHS_PER_QUARTER - 1)->endOfMonth(); } /** * Resets the date to the first day of the year and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfYear(); * ``` * * @return static */ public function startOfYear() { return $this->setDate($this->year, 1, 1)->startOfDay(); } /** * Resets the date to end of the year and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfYear(); * ``` * * @return static */ public function endOfYear() { return $this->setDate($this->year, 12, 31)->endOfDay(); } /** * Resets the date to the first day of the decade and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfDecade(); * ``` * * @return static */ public function startOfDecade() { $year = $this->year - $this->year % static::YEARS_PER_DECADE; return $this->setDate($year, 1, 1)->startOfDay(); } /** * Resets the date to end of the decade and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfDecade(); * ``` * * @return static */ public function endOfDecade() { $year = $this->year - $this->year % static::YEARS_PER_DECADE + static::YEARS_PER_DECADE - 1; return $this->setDate($year, 12, 31)->endOfDay(); } /** * Resets the date to the first day of the century and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfCentury(); * ``` * * @return static */ public function startOfCentury() { $year = $this->year - ($this->year - 1) % static::YEARS_PER_CENTURY; return $this->setDate($year, 1, 1)->startOfDay(); } /** * Resets the date to end of the century and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfCentury(); * ``` * * @return static */ public function endOfCentury() { $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_CENTURY + static::YEARS_PER_CENTURY; return $this->setDate($year, 12, 31)->endOfDay(); } /** * Resets the date to the first day of the millennium and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfMillennium(); * ``` * * @return static */ public function startOfMillennium() { $year = $this->year - ($this->year - 1) % static::YEARS_PER_MILLENNIUM; return $this->setDate($year, 1, 1)->startOfDay(); } /** * Resets the date to end of the millennium and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfMillennium(); * ``` * * @return static */ public function endOfMillennium() { $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_MILLENNIUM + static::YEARS_PER_MILLENNIUM; return $this->setDate($year, 12, 31)->endOfDay(); } /** * Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek() . "\n"; * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->startOfWeek() . "\n"; * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek(Carbon::SUNDAY) . "\n"; * ``` * * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week * * @return static */ public function startOfWeek($weekStartsAt = null) { return $this->subDays((7 + $this->dayOfWeek - ($weekStartsAt ?? $this->firstWeekDay)) % 7)->startOfDay(); } /** * Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek() . "\n"; * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->endOfWeek() . "\n"; * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek(Carbon::SATURDAY) . "\n"; * ``` * * @param int $weekEndsAt optional start allow you to specify the day of week to use to end the week * * @return static */ public function endOfWeek($weekEndsAt = null) { return $this->addDays((7 - $this->dayOfWeek + ($weekEndsAt ?? $this->lastWeekDay)) % 7)->endOfDay(); } /** * Modify to start of current hour, minutes and seconds become 0 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfHour(); * ``` * * @return static */ public function startOfHour() { return $this->setTime($this->hour, 0, 0, 0); } /** * Modify to end of current hour, minutes and seconds become 59 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfHour(); * ``` * * @return static */ public function endOfHour() { return $this->setTime($this->hour, static::MINUTES_PER_HOUR - 1, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); } /** * Modify to start of current minute, seconds become 0 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfMinute(); * ``` * * @return static */ public function startOfMinute() { return $this->setTime($this->hour, $this->minute, 0, 0); } /** * Modify to end of current minute, seconds become 59 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfMinute(); * ``` * * @return static */ public function endOfMinute() { return $this->setTime($this->hour, $this->minute, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); } /** * Modify to start of current second, microseconds become 0 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16.334455') * ->startOfSecond() * ->format('H:i:s.u'); * ``` * * @return static */ public function startOfSecond() { return $this->setTime($this->hour, $this->minute, $this->second, 0); } /** * Modify to end of current second, microseconds become 999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16.334455') * ->endOfSecond() * ->format('H:i:s.u'); * ``` * * @return static */ public function endOfSecond() { return $this->setTime($this->hour, $this->minute, $this->second, static::MICROSECONDS_PER_SECOND - 1); } /** * Modify to start of current given unit. * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16.334455') * ->startOf('month') * ->endOf('week', Carbon::FRIDAY); * ``` * * @param string $unit * @param array $params * * @return static */ public function startOf($unit, ...$params) { $ucfUnit = ucfirst(static::singularUnit($unit)); $method = "startOf$ucfUnit"; if (!method_exists($this, $method)) { throw new UnknownUnitException($unit); } return $this->$method(...$params); } /** * Modify to end of current given unit. * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16.334455') * ->startOf('month') * ->endOf('week', Carbon::FRIDAY); * ``` * * @param string $unit * @param array $params * * @return static */ public function endOf($unit, ...$params) { $ucfUnit = ucfirst(static::singularUnit($unit)); $method = "endOf$ucfUnit"; if (!method_exists($this, $method)) { throw new UnknownUnitException($unit); } return $this->$method(...$params); } } PKgt[y@@Carbon/Traits/Difference.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\Carbon; use Carbon\CarbonImmutable; use Carbon\CarbonInterface; use Carbon\CarbonInterval; use Carbon\CarbonPeriod; use Carbon\Translator; use Closure; use DateInterval; use DateTimeInterface; use ReturnTypeWillChange; /** * Trait Difference. * * Depends on the following methods: * * @method bool lessThan($date) * @method static copy() * @method static resolveCarbon($date = null) * @method static Translator translator() */ trait Difference { /** * @codeCoverageIgnore * * @param CarbonInterval $diff */ protected static function fixNegativeMicroseconds(CarbonInterval $diff) { if ($diff->s !== 0 || $diff->i !== 0 || $diff->h !== 0 || $diff->d !== 0 || $diff->m !== 0 || $diff->y !== 0) { $diff->f = (round($diff->f * 1000000) + 1000000) / 1000000; $diff->s--; if ($diff->s < 0) { $diff->s += 60; $diff->i--; if ($diff->i < 0) { $diff->i += 60; $diff->h--; if ($diff->h < 0) { $diff->h += 24; $diff->d--; if ($diff->d < 0) { $diff->d += 30; $diff->m--; if ($diff->m < 0) { $diff->m += 12; $diff->y--; } } } } } return; } $diff->f *= -1; $diff->invert(); } /** * @param DateInterval $diff * @param bool $absolute * * @return CarbonInterval */ protected static function fixDiffInterval(DateInterval $diff, $absolute, array $skip = []) { $diff = CarbonInterval::instance($diff, $skip); // Work-around for https://bugs.php.net/bug.php?id=77145 // @codeCoverageIgnoreStart if ($diff->f > 0 && $diff->y === -1 && $diff->m === 11 && $diff->d >= 27 && $diff->h === 23 && $diff->i === 59 && $diff->s === 59) { $diff->y = 0; $diff->m = 0; $diff->d = 0; $diff->h = 0; $diff->i = 0; $diff->s = 0; $diff->f = (1000000 - round($diff->f * 1000000)) / 1000000; $diff->invert(); } elseif ($diff->f < 0) { static::fixNegativeMicroseconds($diff); } // @codeCoverageIgnoreEnd if ($absolute && $diff->invert) { $diff->invert(); } return $diff; } /** * Get the difference as a DateInterval instance. * Return relative interval (negative if $absolute flag is not set to true and the given date is before * current one). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return DateInterval */ #[ReturnTypeWillChange] public function diff($date = null, $absolute = false) { $other = $this->resolveCarbon($date); // Work-around for https://bugs.php.net/bug.php?id=81458 // It was initially introduced for https://bugs.php.net/bug.php?id=80998 // The very specific case of 80998 was fixed in PHP 8.1beta3, but it introduced 81458 // So we still need to keep this for now // @codeCoverageIgnoreStart if (version_compare(PHP_VERSION, '8.1.0-dev', '>=') && $other->tz !== $this->tz) { $other = $other->avoidMutation()->tz($this->tz); } // @codeCoverageIgnoreEnd return parent::diff($other, (bool) $absolute); } /** * Get the difference as a CarbonInterval instance. * Return relative interval (negative if $absolute flag is not set to true and the given date is before * current one). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return CarbonInterval */ public function diffAsCarbonInterval($date = null, $absolute = true, array $skip = []) { return static::fixDiffInterval($this->diff($this->resolveCarbon($date), $absolute), $absolute, $skip); } /** * Get the difference in years * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInYears($date = null, $absolute = true) { return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%y'); } /** * Get the difference in quarters rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInQuarters($date = null, $absolute = true) { return (int) ($this->diffInMonths($date, $absolute) / static::MONTHS_PER_QUARTER); } /** * Get the difference in months rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInMonths($date = null, $absolute = true) { $date = $this->resolveCarbon($date)->avoidMutation()->tz($this->tz); [$yearStart, $monthStart, $dayStart] = explode('-', $this->format('Y-m-dHisu')); [$yearEnd, $monthEnd, $dayEnd] = explode('-', $date->format('Y-m-dHisu')); $diff = (((int) $yearEnd) - ((int) $yearStart)) * static::MONTHS_PER_YEAR + ((int) $monthEnd) - ((int) $monthStart); if ($diff > 0) { $diff -= ($dayStart > $dayEnd ? 1 : 0); } elseif ($diff < 0) { $diff += ($dayStart < $dayEnd ? 1 : 0); } return $absolute ? abs($diff) : $diff; } /** * Get the difference in weeks rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInWeeks($date = null, $absolute = true) { return (int) ($this->diffInDays($date, $absolute) / static::DAYS_PER_WEEK); } /** * Get the difference in days rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInDays($date = null, $absolute = true) { return $this->getIntervalDayDiff($this->diff($this->resolveCarbon($date), $absolute)); } /** * Get the difference in days using a filter closure rounded down. * * @param Closure $callback * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInDaysFiltered(Closure $callback, $date = null, $absolute = true) { return $this->diffFiltered(CarbonInterval::day(), $callback, $date, $absolute); } /** * Get the difference in hours using a filter closure rounded down. * * @param Closure $callback * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInHoursFiltered(Closure $callback, $date = null, $absolute = true) { return $this->diffFiltered(CarbonInterval::hour(), $callback, $date, $absolute); } /** * Get the difference by the given interval using a filter closure. * * @param CarbonInterval $ci An interval to traverse by * @param Closure $callback * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, $absolute = true) { $start = $this; $end = $this->resolveCarbon($date); $inverse = false; if ($end < $start) { $start = $end; $end = $this; $inverse = true; } $options = CarbonPeriod::EXCLUDE_END_DATE | ($this->isMutable() ? 0 : CarbonPeriod::IMMUTABLE); $diff = $ci->toPeriod($start, $end, $options)->filter($callback)->count(); return $inverse && !$absolute ? -$diff : $diff; } /** * Get the difference in weekdays rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInWeekdays($date = null, $absolute = true) { return $this->diffInDaysFiltered(static function (CarbonInterface $date) { return $date->isWeekday(); }, $this->resolveCarbon($date)->avoidMutation()->modify($this->format('H:i:s.u')), $absolute); } /** * Get the difference in weekend days using a filter rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInWeekendDays($date = null, $absolute = true) { return $this->diffInDaysFiltered(static function (CarbonInterface $date) { return $date->isWeekend(); }, $this->resolveCarbon($date)->avoidMutation()->modify($this->format('H:i:s.u')), $absolute); } /** * Get the difference in hours rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInHours($date = null, $absolute = true) { return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); } /** * Get the difference in hours rounded down using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInRealHours($date = null, $absolute = true) { return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); } /** * Get the difference in minutes rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInMinutes($date = null, $absolute = true) { return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); } /** * Get the difference in minutes rounded down using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInRealMinutes($date = null, $absolute = true) { return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); } /** * Get the difference in seconds rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInSeconds($date = null, $absolute = true) { $diff = $this->diff($date); if ($diff->days === 0) { $diff = static::fixDiffInterval($diff, $absolute); } $value = (((($diff->m || $diff->y ? $diff->days : $diff->d) * static::HOURS_PER_DAY) + $diff->h) * static::MINUTES_PER_HOUR + $diff->i) * static::SECONDS_PER_MINUTE + $diff->s; return $absolute || !$diff->invert ? $value : -$value; } /** * Get the difference in microseconds. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInMicroseconds($date = null, $absolute = true) { $diff = $this->diff($date); $value = (int) round(((((($diff->m || $diff->y ? $diff->days : $diff->d) * static::HOURS_PER_DAY) + $diff->h) * static::MINUTES_PER_HOUR + $diff->i) * static::SECONDS_PER_MINUTE + ($diff->f + $diff->s)) * static::MICROSECONDS_PER_SECOND); return $absolute || !$diff->invert ? $value : -$value; } /** * Get the difference in milliseconds rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInMilliseconds($date = null, $absolute = true) { return (int) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_MILLISECOND); } /** * Get the difference in seconds using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInRealSeconds($date = null, $absolute = true) { /** @var CarbonInterface $date */ $date = $this->resolveCarbon($date); $value = $date->getTimestamp() - $this->getTimestamp(); return $absolute ? abs($value) : $value; } /** * Get the difference in microseconds using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInRealMicroseconds($date = null, $absolute = true) { /** @var CarbonInterface $date */ $date = $this->resolveCarbon($date); $value = ($date->timestamp - $this->timestamp) * static::MICROSECONDS_PER_SECOND + $date->micro - $this->micro; return $absolute ? abs($value) : $value; } /** * Get the difference in milliseconds rounded down using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInRealMilliseconds($date = null, $absolute = true) { return (int) ($this->diffInRealMicroseconds($date, $absolute) / static::MICROSECONDS_PER_MILLISECOND); } /** * Get the difference in seconds as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInSeconds($date = null, $absolute = true) { return (float) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND); } /** * Get the difference in minutes as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInMinutes($date = null, $absolute = true) { return $this->floatDiffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE; } /** * Get the difference in hours as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInHours($date = null, $absolute = true) { return $this->floatDiffInMinutes($date, $absolute) / static::MINUTES_PER_HOUR; } /** * Get the difference in days as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInDays($date = null, $absolute = true) { $hoursDiff = $this->floatDiffInHours($date, $absolute); $interval = $this->diff($date, $absolute); if ($interval->y === 0 && $interval->m === 0 && $interval->d === 0) { return $hoursDiff / static::HOURS_PER_DAY; } $daysDiff = $this->getIntervalDayDiff($interval); return $daysDiff + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; } /** * Get the difference in weeks as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInWeeks($date = null, $absolute = true) { return $this->floatDiffInDays($date, $absolute) / static::DAYS_PER_WEEK; } /** * Get the difference in months as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInMonths($date = null, $absolute = true) { $start = $this; $end = $this->resolveCarbon($date); $ascending = ($start <= $end); $sign = $absolute || $ascending ? 1 : -1; if (!$ascending) { [$start, $end] = [$end, $start]; } $monthsDiff = $start->diffInMonths($end); /** @var Carbon|CarbonImmutable $floorEnd */ $floorEnd = $start->avoidMutation()->addMonths($monthsDiff); if ($floorEnd >= $end) { return $sign * $monthsDiff; } /** @var Carbon|CarbonImmutable $startOfMonthAfterFloorEnd */ $startOfMonthAfterFloorEnd = $floorEnd->avoidMutation()->addMonth()->startOfMonth(); if ($startOfMonthAfterFloorEnd > $end) { return $sign * ($monthsDiff + $floorEnd->floatDiffInDays($end) / $floorEnd->daysInMonth); } return $sign * ($monthsDiff + $floorEnd->floatDiffInDays($startOfMonthAfterFloorEnd) / $floorEnd->daysInMonth + $startOfMonthAfterFloorEnd->floatDiffInDays($end) / $end->daysInMonth); } /** * Get the difference in year as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInYears($date = null, $absolute = true) { $start = $this; $end = $this->resolveCarbon($date); $ascending = ($start <= $end); $sign = $absolute || $ascending ? 1 : -1; if (!$ascending) { [$start, $end] = [$end, $start]; } $yearsDiff = $start->diffInYears($end); /** @var Carbon|CarbonImmutable $floorEnd */ $floorEnd = $start->avoidMutation()->addYears($yearsDiff); if ($floorEnd >= $end) { return $sign * $yearsDiff; } /** @var Carbon|CarbonImmutable $startOfYearAfterFloorEnd */ $startOfYearAfterFloorEnd = $floorEnd->avoidMutation()->addYear()->startOfYear(); if ($startOfYearAfterFloorEnd > $end) { return $sign * ($yearsDiff + $floorEnd->floatDiffInDays($end) / $floorEnd->daysInYear); } return $sign * ($yearsDiff + $floorEnd->floatDiffInDays($startOfYearAfterFloorEnd) / $floorEnd->daysInYear + $startOfYearAfterFloorEnd->floatDiffInDays($end) / $end->daysInYear); } /** * Get the difference in seconds as float (microsecond-precision) using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealSeconds($date = null, $absolute = true) { return $this->diffInRealMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND; } /** * Get the difference in minutes as float (microsecond-precision) using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealMinutes($date = null, $absolute = true) { return $this->floatDiffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE; } /** * Get the difference in hours as float (microsecond-precision) using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealHours($date = null, $absolute = true) { return $this->floatDiffInRealMinutes($date, $absolute) / static::MINUTES_PER_HOUR; } /** * Get the difference in days as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealDays($date = null, $absolute = true) { $date = $this->resolveUTC($date); $utc = $this->avoidMutation()->utc(); $hoursDiff = $utc->floatDiffInRealHours($date, $absolute); return ($hoursDiff < 0 ? -1 : 1) * $utc->diffInDays($date) + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; } /** * Get the difference in weeks as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealWeeks($date = null, $absolute = true) { return $this->floatDiffInRealDays($date, $absolute) / static::DAYS_PER_WEEK; } /** * Get the difference in months as float (microsecond-precision) using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealMonths($date = null, $absolute = true) { $start = $this; $end = $this->resolveCarbon($date); $ascending = ($start <= $end); $sign = $absolute || $ascending ? 1 : -1; if (!$ascending) { [$start, $end] = [$end, $start]; } $monthsDiff = $start->diffInMonths($end); /** @var Carbon|CarbonImmutable $floorEnd */ $floorEnd = $start->avoidMutation()->addMonths($monthsDiff); if ($floorEnd >= $end) { return $sign * $monthsDiff; } /** @var Carbon|CarbonImmutable $startOfMonthAfterFloorEnd */ $startOfMonthAfterFloorEnd = $floorEnd->avoidMutation()->addMonth()->startOfMonth(); if ($startOfMonthAfterFloorEnd > $end) { return $sign * ($monthsDiff + $floorEnd->floatDiffInRealDays($end) / $floorEnd->daysInMonth); } return $sign * ($monthsDiff + $floorEnd->floatDiffInRealDays($startOfMonthAfterFloorEnd) / $floorEnd->daysInMonth + $startOfMonthAfterFloorEnd->floatDiffInRealDays($end) / $end->daysInMonth); } /** * Get the difference in year as float (microsecond-precision) using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealYears($date = null, $absolute = true) { $start = $this; $end = $this->resolveCarbon($date); $ascending = ($start <= $end); $sign = $absolute || $ascending ? 1 : -1; if (!$ascending) { [$start, $end] = [$end, $start]; } $yearsDiff = $start->diffInYears($end); /** @var Carbon|CarbonImmutable $floorEnd */ $floorEnd = $start->avoidMutation()->addYears($yearsDiff); if ($floorEnd >= $end) { return $sign * $yearsDiff; } /** @var Carbon|CarbonImmutable $startOfYearAfterFloorEnd */ $startOfYearAfterFloorEnd = $floorEnd->avoidMutation()->addYear()->startOfYear(); if ($startOfYearAfterFloorEnd > $end) { return $sign * ($yearsDiff + $floorEnd->floatDiffInRealDays($end) / $floorEnd->daysInYear); } return $sign * ($yearsDiff + $floorEnd->floatDiffInRealDays($startOfYearAfterFloorEnd) / $floorEnd->daysInYear + $startOfYearAfterFloorEnd->floatDiffInRealDays($end) / $end->daysInYear); } /** * The number of seconds since midnight. * * @return int */ public function secondsSinceMidnight() { return $this->diffInSeconds($this->avoidMutation()->startOfDay()); } /** * The number of seconds until 23:59:59. * * @return int */ public function secondsUntilEndOfDay() { return $this->diffInSeconds($this->avoidMutation()->endOfDay()); } /** * Get the difference in a human readable format in the current locale from current instance to an other * instance given (or now if null given). * * @example * ``` * echo Carbon::tomorrow()->diffForHumans() . "\n"; * echo Carbon::tomorrow()->diffForHumans(['parts' => 2]) . "\n"; * echo Carbon::tomorrow()->diffForHumans(['parts' => 3, 'join' => true]) . "\n"; * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday()) . "\n"; * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday(), ['short' => true]) . "\n"; * ``` * * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; * if null passed, now will be used as comparison reference; * if any other type, it will be converted to date and used as reference. * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'skip' entry, list of units to skip (array of strings or a single string, * ` it can be the unit name (singular or plural) or its shortcut * ` (y, m, w, d, h, min, s, ms, µs). * - 'aUnit' entry, prefer "an hour" over "1 hour" if true * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'other' entry (see above) * - 'minimumUnit' entry determines the smallest unit of time to display can be long or * ` short form of the units, e.g. 'hour' or 'h' (default value: s) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single unit) * @param int $options human diff options * * @return string */ public function diffForHumans($other = null, $syntax = null, $short = false, $parts = 1, $options = null) { /* @var CarbonInterface $this */ if (\is_array($other)) { $other['syntax'] = \array_key_exists('syntax', $other) ? $other['syntax'] : $syntax; $syntax = $other; $other = $syntax['other'] ?? null; } $intSyntax = &$syntax; if (\is_array($syntax)) { $syntax['syntax'] = $syntax['syntax'] ?? null; $intSyntax = &$syntax['syntax']; } $intSyntax = (int) ($intSyntax ?? static::DIFF_RELATIVE_AUTO); $intSyntax = $intSyntax === static::DIFF_RELATIVE_AUTO && $other === null ? static::DIFF_RELATIVE_TO_NOW : $intSyntax; $parts = min(7, max(1, (int) $parts)); $skip = \is_array($syntax) ? ($syntax['skip'] ?? []) : []; return $this->diffAsCarbonInterval($other, false, (array) $skip) ->setLocalTranslator($this->getLocalTranslator()) ->forHumans($syntax, (bool) $short, $parts, $options ?? $this->localHumanDiffOptions ?? static::getHumanDiffOptions()); } /** * @alias diffForHumans * * Get the difference in a human readable format in the current locale from current instance to an other * instance given (or now if null given). * * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; * if null passed, now will be used as comparison reference; * if any other type, it will be converted to date and used as reference. * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'other' entry (see above) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single unit) * @param int $options human diff options * * @return string */ public function from($other = null, $syntax = null, $short = false, $parts = 1, $options = null) { return $this->diffForHumans($other, $syntax, $short, $parts, $options); } /** * @alias diffForHumans * * Get the difference in a human readable format in the current locale from current instance to an other * instance given (or now if null given). */ public function since($other = null, $syntax = null, $short = false, $parts = 1, $options = null) { return $this->diffForHumans($other, $syntax, $short, $parts, $options); } /** * Get the difference in a human readable format in the current locale from an other * instance given (or now if null given) to current instance. * * When comparing a value in the past to default now: * 1 hour from now * 5 months from now * * When comparing a value in the future to default now: * 1 hour ago * 5 months ago * * When comparing a value in the past to another value: * 1 hour after * 5 months after * * When comparing a value in the future to another value: * 1 hour before * 5 months before * * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; * if null passed, now will be used as comparison reference; * if any other type, it will be converted to date and used as reference. * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'other' entry (see above) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single unit) * @param int $options human diff options * * @return string */ public function to($other = null, $syntax = null, $short = false, $parts = 1, $options = null) { if (!$syntax && !$other) { $syntax = CarbonInterface::DIFF_RELATIVE_TO_NOW; } return $this->resolveCarbon($other)->diffForHumans($this, $syntax, $short, $parts, $options); } /** * @alias to * * Get the difference in a human readable format in the current locale from an other * instance given (or now if null given) to current instance. * * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; * if null passed, now will be used as comparison reference; * if any other type, it will be converted to date and used as reference. * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'other' entry (see above) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single unit) * @param int $options human diff options * * @return string */ public function until($other = null, $syntax = null, $short = false, $parts = 1, $options = null) { return $this->to($other, $syntax, $short, $parts, $options); } /** * Get the difference in a human readable format in the current locale from current * instance to now. * * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single unit) * @param int $options human diff options * * @return string */ public function fromNow($syntax = null, $short = false, $parts = 1, $options = null) { $other = null; if ($syntax instanceof DateTimeInterface) { [$other, $syntax, $short, $parts, $options] = array_pad(\func_get_args(), 5, null); } return $this->from($other, $syntax, $short, $parts, $options); } /** * Get the difference in a human readable format in the current locale from an other * instance given to now * * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single part) * @param int $options human diff options * * @return string */ public function toNow($syntax = null, $short = false, $parts = 1, $options = null) { return $this->to(null, $syntax, $short, $parts, $options); } /** * Get the difference in a human readable format in the current locale from an other * instance given to now * * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single part) * @param int $options human diff options * * @return string */ public function ago($syntax = null, $short = false, $parts = 1, $options = null) { $other = null; if ($syntax instanceof DateTimeInterface) { [$other, $syntax, $short, $parts, $options] = array_pad(\func_get_args(), 5, null); } return $this->from($other, $syntax, $short, $parts, $options); } /** * Get the difference in a human readable format in the current locale from current instance to an other * instance given (or now if null given). * * @return string */ public function timespan($other = null, $timezone = null) { if (!$other instanceof DateTimeInterface) { $other = static::parse($other, $timezone); } return $this->diffForHumans($other, [ 'join' => ', ', 'syntax' => CarbonInterface::DIFF_ABSOLUTE, 'options' => CarbonInterface::NO_ZERO_DIFF, 'parts' => -1, ]); } /** * Returns either day of week + time (e.g. "Last Friday at 3:30 PM") if reference time is within 7 days, * or a calendar date (e.g. "10/29/2017") otherwise. * * Language, date and time formats will change according to the current locale. * * @param Carbon|\DateTimeInterface|string|null $referenceTime * @param array $formats * * @return string */ public function calendar($referenceTime = null, array $formats = []) { /** @var CarbonInterface $current */ $current = $this->avoidMutation()->startOfDay(); /** @var CarbonInterface $other */ $other = $this->resolveCarbon($referenceTime)->avoidMutation()->setTimezone($this->getTimezone())->startOfDay(); $diff = $other->diffInDays($current, false); $format = $diff < -6 ? 'sameElse' : ( $diff < -1 ? 'lastWeek' : ( $diff < 0 ? 'lastDay' : ( $diff < 1 ? 'sameDay' : ( $diff < 2 ? 'nextDay' : ( $diff < 7 ? 'nextWeek' : 'sameElse' ) ) ) ) ); $format = array_merge($this->getCalendarFormats(), $formats)[$format]; if ($format instanceof Closure) { $format = $format($current, $other) ?? ''; } return $this->isoFormat((string) $format); } private function getIntervalDayDiff(DateInterval $interval): int { $daysDiff = (int) $interval->format('%a'); $sign = $interval->format('%r') === '-' ? -1 : 1; if (\is_int($interval->days) && $interval->y === 0 && $interval->m === 0 && version_compare(PHP_VERSION, '8.1.0-dev', '<') && abs($interval->d - $daysDiff) === 1 ) { $daysDiff = abs($interval->d); // @codeCoverageIgnore } return $daysDiff * $sign; } } PKgt[$y*00Carbon/Traits/Units.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\CarbonConverterInterface; use Carbon\CarbonInterface; use Carbon\CarbonInterval; use Carbon\Exceptions\UnitException; use Closure; use DateInterval; use DateMalformedStringException; use ReturnTypeWillChange; /** * Trait Units. * * Add, subtract and set units. */ trait Units { /** * Add seconds to the instance using timestamp. Positive $value travels * forward while negative $value travels into the past. * * @param string $unit * @param int $value * * @return static */ public function addRealUnit($unit, $value = 1) { switch ($unit) { // @call addRealUnit case 'micro': // @call addRealUnit case 'microsecond': /* @var CarbonInterface $this */ $diff = $this->microsecond + $value; $time = $this->getTimestamp(); $seconds = (int) floor($diff / static::MICROSECONDS_PER_SECOND); $time += $seconds; $diff -= $seconds * static::MICROSECONDS_PER_SECOND; $microtime = str_pad((string) $diff, 6, '0', STR_PAD_LEFT); $tz = $this->tz; return $this->tz('UTC')->modify("@$time.$microtime")->tz($tz); // @call addRealUnit case 'milli': // @call addRealUnit case 'millisecond': return $this->addRealUnit('microsecond', $value * static::MICROSECONDS_PER_MILLISECOND); // @call addRealUnit case 'second': break; // @call addRealUnit case 'minute': $value *= static::SECONDS_PER_MINUTE; break; // @call addRealUnit case 'hour': $value *= static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; break; // @call addRealUnit case 'day': $value *= static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; break; // @call addRealUnit case 'week': $value *= static::DAYS_PER_WEEK * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; break; // @call addRealUnit case 'month': $value *= 30 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; break; // @call addRealUnit case 'quarter': $value *= static::MONTHS_PER_QUARTER * 30 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; break; // @call addRealUnit case 'year': $value *= 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; break; // @call addRealUnit case 'decade': $value *= static::YEARS_PER_DECADE * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; break; // @call addRealUnit case 'century': $value *= static::YEARS_PER_CENTURY * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; break; // @call addRealUnit case 'millennium': $value *= static::YEARS_PER_MILLENNIUM * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; break; default: if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { throw new UnitException("Invalid unit for real timestamp add/sub: '$unit'"); } return $this; } /* @var CarbonInterface $this */ return $this->setTimestamp((int) ($this->getTimestamp() + $value)); } public function subRealUnit($unit, $value = 1) { return $this->addRealUnit($unit, -$value); } /** * Returns true if a property can be changed via setter. * * @param string $unit * * @return bool */ public static function isModifiableUnit($unit) { static $modifiableUnits = [ // @call addUnit 'millennium', // @call addUnit 'century', // @call addUnit 'decade', // @call addUnit 'quarter', // @call addUnit 'week', // @call addUnit 'weekday', ]; return \in_array($unit, $modifiableUnits, true) || \in_array($unit, static::$units, true); } /** * Call native PHP DateTime/DateTimeImmutable add() method. * * @param DateInterval $interval * * @return static */ public function rawAdd(DateInterval $interval) { return parent::add($interval); } /** * Add given units or interval to the current instance. * * @example $date->add('hour', 3) * @example $date->add(15, 'days') * @example $date->add(CarbonInterval::days(4)) * * @param string|DateInterval|Closure|CarbonConverterInterface $unit * @param int $value * @param bool|null $overflow * * @return static */ #[ReturnTypeWillChange] public function add($unit, $value = 1, $overflow = null) { if (\is_string($unit) && \func_num_args() === 1) { $unit = CarbonInterval::make($unit, [], true); } if ($unit instanceof CarbonConverterInterface) { return $this->resolveCarbon($unit->convertDate($this, false)); } if ($unit instanceof Closure) { return $this->resolveCarbon($unit($this, false)); } if ($unit instanceof DateInterval) { return parent::add($unit); } if (is_numeric($unit)) { [$value, $unit] = [$unit, $value]; } return $this->addUnit($unit, $value, $overflow); } /** * Add given units to the current instance. * * @param string $unit * @param int $value * @param bool|null $overflow * * @return static */ public function addUnit($unit, $value = 1, $overflow = null) { $originalArgs = \func_get_args(); $date = $this; if (!is_numeric($value) || !(float) $value) { return $date->isMutable() ? $date : $date->avoidMutation(); } $unit = self::singularUnit($unit); $metaUnits = [ 'millennium' => [static::YEARS_PER_MILLENNIUM, 'year'], 'century' => [static::YEARS_PER_CENTURY, 'year'], 'decade' => [static::YEARS_PER_DECADE, 'year'], 'quarter' => [static::MONTHS_PER_QUARTER, 'month'], ]; if (isset($metaUnits[$unit])) { [$factor, $unit] = $metaUnits[$unit]; $value *= $factor; } if ($unit === 'weekday') { $weekendDays = static::getWeekendDays(); if ($weekendDays !== [static::SATURDAY, static::SUNDAY]) { $absoluteValue = abs($value); $sign = $value / max(1, $absoluteValue); $weekDaysCount = 7 - min(6, \count(array_unique($weekendDays))); $weeks = floor($absoluteValue / $weekDaysCount); for ($diff = $absoluteValue % $weekDaysCount; $diff; $diff--) { /** @var static $date */ $date = $date->addDays($sign); while (\in_array($date->dayOfWeek, $weekendDays, true)) { $date = $date->addDays($sign); } } $value = $weeks * $sign; $unit = 'week'; } $timeString = $date->toTimeString(); } elseif ($canOverflow = (\in_array($unit, [ 'month', 'year', ]) && ($overflow === false || ( $overflow === null && ($ucUnit = ucfirst($unit).'s') && !($this->{'local'.$ucUnit.'Overflow'} ?? static::{'shouldOverflow'.$ucUnit}()) )))) { $day = $date->day; } $value = (int) $value; if ($unit === 'milli' || $unit === 'millisecond') { $unit = 'microsecond'; $value *= static::MICROSECONDS_PER_MILLISECOND; } // Work-around for bug https://bugs.php.net/bug.php?id=75642 if ($unit === 'micro' || $unit === 'microsecond') { $microseconds = $this->micro + $value; $second = (int) floor($microseconds / static::MICROSECONDS_PER_SECOND); $microseconds %= static::MICROSECONDS_PER_SECOND; if ($microseconds < 0) { $microseconds += static::MICROSECONDS_PER_SECOND; } $date = $date->microseconds($microseconds); $unit = 'second'; $value = $second; } try { $date = $date->modify("$value $unit"); if (isset($timeString)) { $date = $date->setTimeFromTimeString($timeString); } elseif (isset($canOverflow, $day) && $canOverflow && $day !== $date->day) { $date = $date->modify('last day of previous month'); } } catch (DateMalformedStringException $ignoredException) { // @codeCoverageIgnore $date = null; // @codeCoverageIgnore } if (!$date) { throw new UnitException('Unable to add unit '.var_export($originalArgs, true)); } return $date; } /** * Subtract given units to the current instance. * * @param string $unit * @param int $value * @param bool|null $overflow * * @return static */ public function subUnit($unit, $value = 1, $overflow = null) { return $this->addUnit($unit, -$value, $overflow); } /** * Call native PHP DateTime/DateTimeImmutable sub() method. * * @param DateInterval $interval * * @return static */ public function rawSub(DateInterval $interval) { return parent::sub($interval); } /** * Subtract given units or interval to the current instance. * * @example $date->sub('hour', 3) * @example $date->sub(15, 'days') * @example $date->sub(CarbonInterval::days(4)) * * @param string|DateInterval|Closure|CarbonConverterInterface $unit * @param int $value * @param bool|null $overflow * * @return static */ #[ReturnTypeWillChange] public function sub($unit, $value = 1, $overflow = null) { if (\is_string($unit) && \func_num_args() === 1) { $unit = CarbonInterval::make($unit, [], true); } if ($unit instanceof CarbonConverterInterface) { return $this->resolveCarbon($unit->convertDate($this, true)); } if ($unit instanceof Closure) { return $this->resolveCarbon($unit($this, true)); } if ($unit instanceof DateInterval) { return parent::sub($unit); } if (is_numeric($unit)) { [$value, $unit] = [$unit, $value]; } return $this->addUnit($unit, -(float) $value, $overflow); } /** * Subtract given units or interval to the current instance. * * @see sub() * * @param string|DateInterval $unit * @param int $value * @param bool|null $overflow * * @return static */ public function subtract($unit, $value = 1, $overflow = null) { if (\is_string($unit) && \func_num_args() === 1) { $unit = CarbonInterval::make($unit, [], true); } return $this->sub($unit, $value, $overflow); } } PKgt[H#G3G3Carbon/Traits/Options.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\CarbonInterface; use DateTimeInterface; use Throwable; /** * Trait Options. * * Embed base methods to change settings of Carbon classes. * * Depends on the following methods: * * @method static shiftTimezone($timezone) Set the timezone */ trait Options { use Localization; /** * Customizable PHP_INT_SIZE override. * * @var int */ public static $PHPIntSize = PHP_INT_SIZE; /** * First day of week. * * @var int|string */ protected static $weekStartsAt = CarbonInterface::MONDAY; /** * Last day of week. * * @var int|string */ protected static $weekEndsAt = CarbonInterface::SUNDAY; /** * Days of weekend. * * @var array */ protected static $weekendDays = [ CarbonInterface::SATURDAY, CarbonInterface::SUNDAY, ]; /** * Format regex patterns. * * @var array */ protected static $regexFormats = [ 'd' => '(3[01]|[12][0-9]|0[1-9])', 'D' => '(Sun|Mon|Tue|Wed|Thu|Fri|Sat)', 'j' => '([123][0-9]|[1-9])', 'l' => '([a-zA-Z]{2,})', 'N' => '([1-7])', 'S' => '(st|nd|rd|th)', 'w' => '([0-6])', 'z' => '(36[0-5]|3[0-5][0-9]|[12][0-9]{2}|[1-9]?[0-9])', 'W' => '(5[012]|[1-4][0-9]|0?[1-9])', 'F' => '([a-zA-Z]{2,})', 'm' => '(1[012]|0[1-9])', 'M' => '([a-zA-Z]{3})', 'n' => '(1[012]|[1-9])', 't' => '(2[89]|3[01])', 'L' => '(0|1)', 'o' => '([1-9][0-9]{0,4})', 'Y' => '([1-9]?[0-9]{4})', 'y' => '([0-9]{2})', 'a' => '(am|pm)', 'A' => '(AM|PM)', 'B' => '([0-9]{3})', 'g' => '(1[012]|[1-9])', 'G' => '(2[0-3]|1?[0-9])', 'h' => '(1[012]|0[1-9])', 'H' => '(2[0-3]|[01][0-9])', 'i' => '([0-5][0-9])', 's' => '([0-5][0-9])', 'u' => '([0-9]{1,6})', 'v' => '([0-9]{1,3})', 'e' => '([a-zA-Z]{1,5})|([a-zA-Z]*\\/[a-zA-Z]*)', 'I' => '(0|1)', 'O' => '([+-](1[012]|0[0-9])[0134][05])', 'P' => '([+-](1[012]|0[0-9]):[0134][05])', 'p' => '(Z|[+-](1[012]|0[0-9]):[0134][05])', 'T' => '([a-zA-Z]{1,5})', 'Z' => '(-?[1-5]?[0-9]{1,4})', 'U' => '([0-9]*)', // The formats below are combinations of the above formats. 'c' => '(([1-9]?[0-9]{4})-(1[012]|0[1-9])-(3[01]|[12][0-9]|0[1-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])[+-](1[012]|0[0-9]):([0134][05]))', // Y-m-dTH:i:sP 'r' => '(([a-zA-Z]{3}), ([123][0-9]|0[1-9]) ([a-zA-Z]{3}) ([1-9]?[0-9]{4}) (2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9]) [+-](1[012]|0[0-9])([0134][05]))', // D, d M Y H:i:s O ]; /** * Format modifiers (such as available in createFromFormat) regex patterns. * * @var array */ protected static $regexFormatModifiers = [ '*' => '.+', ' ' => '[ ]', '#' => '[;:\\/.,()-]', '?' => '([^a]|[a])', '!' => '', '|' => '', '+' => '', ]; /** * Indicates if months should be calculated with overflow. * Global setting. * * @var bool */ protected static $monthsOverflow = true; /** * Indicates if years should be calculated with overflow. * Global setting. * * @var bool */ protected static $yearsOverflow = true; /** * Indicates if the strict mode is in use. * Global setting. * * @var bool */ protected static $strictModeEnabled = true; /** * Function to call instead of format. * * @var string|callable|null */ protected static $formatFunction; /** * Function to call instead of createFromFormat. * * @var string|callable|null */ protected static $createFromFormatFunction; /** * Function to call instead of parse. * * @var string|callable|null */ protected static $parseFunction; /** * Indicates if months should be calculated with overflow. * Specific setting. * * @var bool|null */ protected $localMonthsOverflow; /** * Indicates if years should be calculated with overflow. * Specific setting. * * @var bool|null */ protected $localYearsOverflow; /** * Indicates if the strict mode is in use. * Specific setting. * * @var bool|null */ protected $localStrictModeEnabled; /** * Options for diffForHumans and forHumans methods. * * @var bool|null */ protected $localHumanDiffOptions; /** * Format to use on string cast. * * @var string|null */ protected $localToStringFormat; /** * Format to use on JSON serialization. * * @var string|null */ protected $localSerializer; /** * Instance-specific macros. * * @var array|null */ protected $localMacros; /** * Instance-specific generic macros. * * @var array|null */ protected $localGenericMacros; /** * Function to call instead of format. * * @var string|callable|null */ protected $localFormatFunction; /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @see settings * * Enable the strict mode (or disable with passing false). * * @param bool $strictModeEnabled */ public static function useStrictMode($strictModeEnabled = true) { static::$strictModeEnabled = $strictModeEnabled; } /** * Returns true if the strict mode is globally in use, false else. * (It can be overridden in specific instances.) * * @return bool */ public static function isStrictModeEnabled() { return static::$strictModeEnabled; } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @see settings * * Indicates if months should be calculated with overflow. * * @param bool $monthsOverflow * * @return void */ public static function useMonthsOverflow($monthsOverflow = true) { static::$monthsOverflow = $monthsOverflow; } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @see settings * * Reset the month overflow behavior. * * @return void */ public static function resetMonthsOverflow() { static::$monthsOverflow = true; } /** * Get the month overflow global behavior (can be overridden in specific instances). * * @return bool */ public static function shouldOverflowMonths() { return static::$monthsOverflow; } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @see settings * * Indicates if years should be calculated with overflow. * * @param bool $yearsOverflow * * @return void */ public static function useYearsOverflow($yearsOverflow = true) { static::$yearsOverflow = $yearsOverflow; } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @see settings * * Reset the month overflow behavior. * * @return void */ public static function resetYearsOverflow() { static::$yearsOverflow = true; } /** * Get the month overflow global behavior (can be overridden in specific instances). * * @return bool */ public static function shouldOverflowYears() { return static::$yearsOverflow; } /** * Set specific options. * - strictMode: true|false|null * - monthOverflow: true|false|null * - yearOverflow: true|false|null * - humanDiffOptions: int|null * - toStringFormat: string|Closure|null * - toJsonFormat: string|Closure|null * - locale: string|null * - timezone: \DateTimeZone|string|int|null * - macros: array|null * - genericMacros: array|null * * @param array $settings * * @return $this|static */ public function settings(array $settings) { $this->localStrictModeEnabled = $settings['strictMode'] ?? null; $this->localMonthsOverflow = $settings['monthOverflow'] ?? null; $this->localYearsOverflow = $settings['yearOverflow'] ?? null; $this->localHumanDiffOptions = $settings['humanDiffOptions'] ?? null; $this->localToStringFormat = $settings['toStringFormat'] ?? null; $this->localSerializer = $settings['toJsonFormat'] ?? null; $this->localMacros = $settings['macros'] ?? null; $this->localGenericMacros = $settings['genericMacros'] ?? null; $this->localFormatFunction = $settings['formatFunction'] ?? null; if (isset($settings['locale'])) { $locales = $settings['locale']; if (!\is_array($locales)) { $locales = [$locales]; } $this->locale(...$locales); } if (isset($settings['innerTimezone'])) { return $this->setTimezone($settings['innerTimezone']); } if (isset($settings['timezone'])) { return $this->shiftTimezone($settings['timezone']); } return $this; } /** * Returns current local settings. * * @return array */ public function getSettings() { $settings = []; $map = [ 'localStrictModeEnabled' => 'strictMode', 'localMonthsOverflow' => 'monthOverflow', 'localYearsOverflow' => 'yearOverflow', 'localHumanDiffOptions' => 'humanDiffOptions', 'localToStringFormat' => 'toStringFormat', 'localSerializer' => 'toJsonFormat', 'localMacros' => 'macros', 'localGenericMacros' => 'genericMacros', 'locale' => 'locale', 'tzName' => 'timezone', 'localFormatFunction' => 'formatFunction', ]; foreach ($map as $property => $key) { $value = $this->$property ?? null; if ($value !== null && ($key !== 'locale' || $value !== 'en' || $this->localTranslator)) { $settings[$key] = $value; } } return $settings; } /** * Show truthy properties on var_dump(). * * @return array */ public function __debugInfo() { $infos = array_filter(get_object_vars($this), static function ($var) { return $var; }); foreach (['dumpProperties', 'constructedObjectId', 'constructed'] as $property) { if (isset($infos[$property])) { unset($infos[$property]); } } $this->addExtraDebugInfos($infos); return $infos; } protected function addExtraDebugInfos(&$infos): void { if ($this instanceof DateTimeInterface) { try { if (!isset($infos['date'])) { $infos['date'] = $this->format(CarbonInterface::MOCK_DATETIME_FORMAT); } if (!isset($infos['timezone'])) { $infos['timezone'] = $this->tzName; } } catch (Throwable $exception) { // noop } } } } PKgt[5X7b  Carbon/Traits/Macro.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; /** * Trait Macros. * * Allows users to register macros within the Carbon class. */ trait Macro { use Mixin; /** * The registered macros. * * @var array */ protected static $globalMacros = []; /** * The registered generic macros. * * @var array */ protected static $globalGenericMacros = []; /** * Register a custom macro. * * @example * ``` * $userSettings = [ * 'locale' => 'pt', * 'timezone' => 'America/Sao_Paulo', * ]; * Carbon::macro('userFormat', function () use ($userSettings) { * return $this->copy()->locale($userSettings['locale'])->tz($userSettings['timezone'])->calendar(); * }); * echo Carbon::yesterday()->hours(11)->userFormat(); * ``` * * @param string $name * @param object|callable $macro * * @return void */ public static function macro($name, $macro) { static::$globalMacros[$name] = $macro; } /** * Remove all macros and generic macros. */ public static function resetMacros() { static::$globalMacros = []; static::$globalGenericMacros = []; } /** * Register a custom macro. * * @param object|callable $macro * @param int $priority marco with higher priority is tried first * * @return void */ public static function genericMacro($macro, $priority = 0) { if (!isset(static::$globalGenericMacros[$priority])) { static::$globalGenericMacros[$priority] = []; krsort(static::$globalGenericMacros, SORT_NUMERIC); } static::$globalGenericMacros[$priority][] = $macro; } /** * Checks if macro is registered globally. * * @param string $name * * @return bool */ public static function hasMacro($name) { return isset(static::$globalMacros[$name]); } /** * Get the raw callable macro registered globally for a given name. * * @param string $name * * @return callable|null */ public static function getMacro($name) { return static::$globalMacros[$name] ?? null; } /** * Checks if macro is registered globally or locally. * * @param string $name * * @return bool */ public function hasLocalMacro($name) { return ($this->localMacros && isset($this->localMacros[$name])) || static::hasMacro($name); } /** * Get the raw callable macro registered globally or locally for a given name. * * @param string $name * * @return callable|null */ public function getLocalMacro($name) { return ($this->localMacros ?? [])[$name] ?? static::getMacro($name); } } PKgt[ljSGG&Carbon/Traits/DeprecatedProperties.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; trait DeprecatedProperties { /** * the day of week in current locale LC_TIME * * @var string * * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. * Use ->isoFormat('MMM') instead. * Deprecated since 2.55.0 */ public $localeDayOfWeek; /** * the abbreviated day of week in current locale LC_TIME * * @var string * * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. * Use ->isoFormat('dddd') instead. * Deprecated since 2.55.0 */ public $shortLocaleDayOfWeek; /** * the month in current locale LC_TIME * * @var string * * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. * Use ->isoFormat('ddd') instead. * Deprecated since 2.55.0 */ public $localeMonth; /** * the abbreviated month in current locale LC_TIME * * @var string * * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. * Use ->isoFormat('MMMM') instead. * Deprecated since 2.55.0 */ public $shortLocaleMonth; } PKgt[؅؅Carbon/Traits/Date.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use BadMethodCallException; use Carbon\Carbon; use Carbon\CarbonInterface; use Carbon\CarbonPeriod; use Carbon\CarbonTimeZone; use Carbon\Exceptions\BadComparisonUnitException; use Carbon\Exceptions\ImmutableException; use Carbon\Exceptions\InvalidTimeZoneException; use Carbon\Exceptions\InvalidTypeException; use Carbon\Exceptions\UnknownGetterException; use Carbon\Exceptions\UnknownMethodException; use Carbon\Exceptions\UnknownSetterException; use Carbon\Exceptions\UnknownUnitException; use Closure; use DateInterval; use DatePeriod; use DateTime; use DateTimeImmutable; use DateTimeInterface; use DateTimeZone; use InvalidArgumentException; use ReflectionException; use ReturnTypeWillChange; use Throwable; /** * A simple API extension for DateTime. * * @mixin DeprecatedProperties * * * * @property int $year * @property int $yearIso * @property int $month * @property int $day * @property int $hour * @property int $minute * @property int $second * @property int $micro * @property int $microsecond * @property int|float|string $timestamp seconds since the Unix Epoch * @property string $englishDayOfWeek the day of week in English * @property string $shortEnglishDayOfWeek the abbreviated day of week in English * @property string $englishMonth the month in English * @property string $shortEnglishMonth the abbreviated month in English * @property int $milliseconds * @property int $millisecond * @property int $milli * @property int $week 1 through 53 * @property int $isoWeek 1 through 53 * @property int $weekYear year according to week format * @property int $isoWeekYear year according to ISO week format * @property int $dayOfYear 1 through 366 * @property int $age does a diffInYears() with default parameters * @property int $offset the timezone offset in seconds from UTC * @property int $offsetMinutes the timezone offset in minutes from UTC * @property int $offsetHours the timezone offset in hours from UTC * @property CarbonTimeZone $timezone the current timezone * @property CarbonTimeZone $tz alias of $timezone * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday * @property-read int $daysInMonth number of days in the given month * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language * @property-read int $noZeroHour current hour from 1 to 24 * @property-read int $weeksInYear 51 through 53 * @property-read int $isoWeeksInYear 51 through 53 * @property-read int $weekOfMonth 1 through 5 * @property-read int $weekNumberInMonth 1 through 5 * @property-read int $firstWeekDay 0 through 6 * @property-read int $lastWeekDay 0 through 6 * @property-read int $daysInYear 365 or 366 * @property-read int $quarter the quarter of this instance, 1 - 4 * @property-read int $decade the decade of this instance * @property-read int $century the century of this instance * @property-read int $millennium the millennium of this instance * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise * @property-read bool $local checks if the timezone is local, true if local, false otherwise * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise * @property-read string $timezoneName the current timezone name * @property-read string $tzName alias of $timezoneName * @property-read string $locale locale of the current instance * * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) * @method bool isLocal() Check if the current instance has non-UTC timezone. * @method bool isValid() Check if the current instance is a valid date. * @method bool isDST() Check if the current instance is in a daylight saving time. * @method bool isSunday() Checks if the instance day is sunday. * @method bool isMonday() Checks if the instance day is monday. * @method bool isTuesday() Checks if the instance day is tuesday. * @method bool isWednesday() Checks if the instance day is wednesday. * @method bool isThursday() Checks if the instance day is thursday. * @method bool isFriday() Checks if the instance day is friday. * @method bool isSaturday() Checks if the instance day is saturday. * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. * @method CarbonInterface years(int $value) Set current instance year to the given value. * @method CarbonInterface year(int $value) Set current instance year to the given value. * @method CarbonInterface setYears(int $value) Set current instance year to the given value. * @method CarbonInterface setYear(int $value) Set current instance year to the given value. * @method CarbonInterface months(int $value) Set current instance month to the given value. * @method CarbonInterface month(int $value) Set current instance month to the given value. * @method CarbonInterface setMonths(int $value) Set current instance month to the given value. * @method CarbonInterface setMonth(int $value) Set current instance month to the given value. * @method CarbonInterface days(int $value) Set current instance day to the given value. * @method CarbonInterface day(int $value) Set current instance day to the given value. * @method CarbonInterface setDays(int $value) Set current instance day to the given value. * @method CarbonInterface setDay(int $value) Set current instance day to the given value. * @method CarbonInterface hours(int $value) Set current instance hour to the given value. * @method CarbonInterface hour(int $value) Set current instance hour to the given value. * @method CarbonInterface setHours(int $value) Set current instance hour to the given value. * @method CarbonInterface setHour(int $value) Set current instance hour to the given value. * @method CarbonInterface minutes(int $value) Set current instance minute to the given value. * @method CarbonInterface minute(int $value) Set current instance minute to the given value. * @method CarbonInterface setMinutes(int $value) Set current instance minute to the given value. * @method CarbonInterface setMinute(int $value) Set current instance minute to the given value. * @method CarbonInterface seconds(int $value) Set current instance second to the given value. * @method CarbonInterface second(int $value) Set current instance second to the given value. * @method CarbonInterface setSeconds(int $value) Set current instance second to the given value. * @method CarbonInterface setSecond(int $value) Set current instance second to the given value. * @method CarbonInterface millis(int $value) Set current instance millisecond to the given value. * @method CarbonInterface milli(int $value) Set current instance millisecond to the given value. * @method CarbonInterface setMillis(int $value) Set current instance millisecond to the given value. * @method CarbonInterface setMilli(int $value) Set current instance millisecond to the given value. * @method CarbonInterface milliseconds(int $value) Set current instance millisecond to the given value. * @method CarbonInterface millisecond(int $value) Set current instance millisecond to the given value. * @method CarbonInterface setMilliseconds(int $value) Set current instance millisecond to the given value. * @method CarbonInterface setMillisecond(int $value) Set current instance millisecond to the given value. * @method CarbonInterface micros(int $value) Set current instance microsecond to the given value. * @method CarbonInterface micro(int $value) Set current instance microsecond to the given value. * @method CarbonInterface setMicros(int $value) Set current instance microsecond to the given value. * @method CarbonInterface setMicro(int $value) Set current instance microsecond to the given value. * @method CarbonInterface microseconds(int $value) Set current instance microsecond to the given value. * @method CarbonInterface microsecond(int $value) Set current instance microsecond to the given value. * @method CarbonInterface setMicroseconds(int $value) Set current instance microsecond to the given value. * @method CarbonInterface setMicrosecond(int $value) Set current instance microsecond to the given value. * @method CarbonInterface addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addYear() Add one year to the instance (using date interval). * @method CarbonInterface subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subYear() Sub one year to the instance (using date interval). * @method CarbonInterface addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMonth() Add one month to the instance (using date interval). * @method CarbonInterface subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMonth() Sub one month to the instance (using date interval). * @method CarbonInterface addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addDay() Add one day to the instance (using date interval). * @method CarbonInterface subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subDay() Sub one day to the instance (using date interval). * @method CarbonInterface addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addHour() Add one hour to the instance (using date interval). * @method CarbonInterface subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subHour() Sub one hour to the instance (using date interval). * @method CarbonInterface addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMinute() Add one minute to the instance (using date interval). * @method CarbonInterface subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMinute() Sub one minute to the instance (using date interval). * @method CarbonInterface addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addSecond() Add one second to the instance (using date interval). * @method CarbonInterface subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subSecond() Sub one second to the instance (using date interval). * @method CarbonInterface addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMilli() Add one millisecond to the instance (using date interval). * @method CarbonInterface subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMilli() Sub one millisecond to the instance (using date interval). * @method CarbonInterface addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMillisecond() Add one millisecond to the instance (using date interval). * @method CarbonInterface subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMillisecond() Sub one millisecond to the instance (using date interval). * @method CarbonInterface addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMicro() Add one microsecond to the instance (using date interval). * @method CarbonInterface subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMicro() Sub one microsecond to the instance (using date interval). * @method CarbonInterface addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMicrosecond() Add one microsecond to the instance (using date interval). * @method CarbonInterface subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMicrosecond() Sub one microsecond to the instance (using date interval). * @method CarbonInterface addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMillennium() Add one millennium to the instance (using date interval). * @method CarbonInterface subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMillennium() Sub one millennium to the instance (using date interval). * @method CarbonInterface addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addCentury() Add one century to the instance (using date interval). * @method CarbonInterface subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subCentury() Sub one century to the instance (using date interval). * @method CarbonInterface addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addDecade() Add one decade to the instance (using date interval). * @method CarbonInterface subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subDecade() Sub one decade to the instance (using date interval). * @method CarbonInterface addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addQuarter() Add one quarter to the instance (using date interval). * @method CarbonInterface subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subQuarter() Sub one quarter to the instance (using date interval). * @method CarbonInterface addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addWeek() Add one week to the instance (using date interval). * @method CarbonInterface subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subWeek() Sub one week to the instance (using date interval). * @method CarbonInterface addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addWeekday() Add one weekday to the instance (using date interval). * @method CarbonInterface subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subWeekday() Sub one weekday to the instance (using date interval). * @method CarbonInterface addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMicro() Add one microsecond to the instance (using timestamp). * @method CarbonInterface subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMicro() Sub one microsecond to the instance (using timestamp). * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. * @method CarbonInterface addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMicrosecond() Add one microsecond to the instance (using timestamp). * @method CarbonInterface subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMicrosecond() Sub one microsecond to the instance (using timestamp). * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. * @method CarbonInterface addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMilli() Add one millisecond to the instance (using timestamp). * @method CarbonInterface subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMilli() Sub one millisecond to the instance (using timestamp). * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. * @method CarbonInterface addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMillisecond() Add one millisecond to the instance (using timestamp). * @method CarbonInterface subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMillisecond() Sub one millisecond to the instance (using timestamp). * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. * @method CarbonInterface addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealSecond() Add one second to the instance (using timestamp). * @method CarbonInterface subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealSecond() Sub one second to the instance (using timestamp). * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. * @method CarbonInterface addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMinute() Add one minute to the instance (using timestamp). * @method CarbonInterface subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMinute() Sub one minute to the instance (using timestamp). * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. * @method CarbonInterface addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealHour() Add one hour to the instance (using timestamp). * @method CarbonInterface subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealHour() Sub one hour to the instance (using timestamp). * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. * @method CarbonInterface addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealDay() Add one day to the instance (using timestamp). * @method CarbonInterface subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealDay() Sub one day to the instance (using timestamp). * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. * @method CarbonInterface addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealWeek() Add one week to the instance (using timestamp). * @method CarbonInterface subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealWeek() Sub one week to the instance (using timestamp). * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. * @method CarbonInterface addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMonth() Add one month to the instance (using timestamp). * @method CarbonInterface subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMonth() Sub one month to the instance (using timestamp). * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. * @method CarbonInterface addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealQuarter() Add one quarter to the instance (using timestamp). * @method CarbonInterface subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealQuarter() Sub one quarter to the instance (using timestamp). * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. * @method CarbonInterface addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealYear() Add one year to the instance (using timestamp). * @method CarbonInterface subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealYear() Sub one year to the instance (using timestamp). * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. * @method CarbonInterface addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealDecade() Add one decade to the instance (using timestamp). * @method CarbonInterface subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealDecade() Sub one decade to the instance (using timestamp). * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. * @method CarbonInterface addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealCentury() Add one century to the instance (using timestamp). * @method CarbonInterface subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealCentury() Sub one century to the instance (using timestamp). * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. * @method CarbonInterface addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMillennium() Add one millennium to the instance (using timestamp). * @method CarbonInterface subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMillennium() Sub one millennium to the instance (using timestamp). * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. * @method CarbonInterface roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method CarbonInterface roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method CarbonInterface floorYear(float $precision = 1) Truncate the current instance year with given precision. * @method CarbonInterface floorYears(float $precision = 1) Truncate the current instance year with given precision. * @method CarbonInterface ceilYear(float $precision = 1) Ceil the current instance year with given precision. * @method CarbonInterface ceilYears(float $precision = 1) Ceil the current instance year with given precision. * @method CarbonInterface roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method CarbonInterface roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method CarbonInterface floorMonth(float $precision = 1) Truncate the current instance month with given precision. * @method CarbonInterface floorMonths(float $precision = 1) Truncate the current instance month with given precision. * @method CarbonInterface ceilMonth(float $precision = 1) Ceil the current instance month with given precision. * @method CarbonInterface ceilMonths(float $precision = 1) Ceil the current instance month with given precision. * @method CarbonInterface roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method CarbonInterface roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method CarbonInterface floorDay(float $precision = 1) Truncate the current instance day with given precision. * @method CarbonInterface floorDays(float $precision = 1) Truncate the current instance day with given precision. * @method CarbonInterface ceilDay(float $precision = 1) Ceil the current instance day with given precision. * @method CarbonInterface ceilDays(float $precision = 1) Ceil the current instance day with given precision. * @method CarbonInterface roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method CarbonInterface roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method CarbonInterface floorHour(float $precision = 1) Truncate the current instance hour with given precision. * @method CarbonInterface floorHours(float $precision = 1) Truncate the current instance hour with given precision. * @method CarbonInterface ceilHour(float $precision = 1) Ceil the current instance hour with given precision. * @method CarbonInterface ceilHours(float $precision = 1) Ceil the current instance hour with given precision. * @method CarbonInterface roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method CarbonInterface roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method CarbonInterface floorMinute(float $precision = 1) Truncate the current instance minute with given precision. * @method CarbonInterface floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. * @method CarbonInterface ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. * @method CarbonInterface ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. * @method CarbonInterface roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method CarbonInterface roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method CarbonInterface floorSecond(float $precision = 1) Truncate the current instance second with given precision. * @method CarbonInterface floorSeconds(float $precision = 1) Truncate the current instance second with given precision. * @method CarbonInterface ceilSecond(float $precision = 1) Ceil the current instance second with given precision. * @method CarbonInterface ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. * @method CarbonInterface roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method CarbonInterface roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method CarbonInterface floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. * @method CarbonInterface floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. * @method CarbonInterface ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. * @method CarbonInterface ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. * @method CarbonInterface roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method CarbonInterface roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method CarbonInterface floorCentury(float $precision = 1) Truncate the current instance century with given precision. * @method CarbonInterface floorCenturies(float $precision = 1) Truncate the current instance century with given precision. * @method CarbonInterface ceilCentury(float $precision = 1) Ceil the current instance century with given precision. * @method CarbonInterface ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. * @method CarbonInterface roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method CarbonInterface roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method CarbonInterface floorDecade(float $precision = 1) Truncate the current instance decade with given precision. * @method CarbonInterface floorDecades(float $precision = 1) Truncate the current instance decade with given precision. * @method CarbonInterface ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. * @method CarbonInterface ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. * @method CarbonInterface roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method CarbonInterface roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method CarbonInterface floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. * @method CarbonInterface floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. * @method CarbonInterface ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. * @method CarbonInterface ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. * @method CarbonInterface roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method CarbonInterface roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method CarbonInterface floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. * @method CarbonInterface floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. * @method CarbonInterface ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. * @method CarbonInterface ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. * @method CarbonInterface roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method CarbonInterface roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method CarbonInterface floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. * @method CarbonInterface floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. * @method CarbonInterface ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. * @method CarbonInterface ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * * */ trait Date { use Boundaries; use Comparison; use Converter; use Creator; use Difference; use Macro; use MagicParameter; use Modifiers; use Mutability; use ObjectInitialisation; use Options; use Rounding; use Serialization; use Test; use Timestamp; use Units; use Week; /** * Names of days of the week. * * @var array */ protected static $days = [ // @call isDayOfWeek CarbonInterface::SUNDAY => 'Sunday', // @call isDayOfWeek CarbonInterface::MONDAY => 'Monday', // @call isDayOfWeek CarbonInterface::TUESDAY => 'Tuesday', // @call isDayOfWeek CarbonInterface::WEDNESDAY => 'Wednesday', // @call isDayOfWeek CarbonInterface::THURSDAY => 'Thursday', // @call isDayOfWeek CarbonInterface::FRIDAY => 'Friday', // @call isDayOfWeek CarbonInterface::SATURDAY => 'Saturday', ]; /** * Will UTF8 encoding be used to print localized date/time ? * * @var bool */ protected static $utf8 = false; /** * List of unit and magic methods associated as doc-comments. * * @var array */ protected static $units = [ // @call setUnit // @call addUnit 'year', // @call setUnit // @call addUnit 'month', // @call setUnit // @call addUnit 'day', // @call setUnit // @call addUnit 'hour', // @call setUnit // @call addUnit 'minute', // @call setUnit // @call addUnit 'second', // @call setUnit // @call addUnit 'milli', // @call setUnit // @call addUnit 'millisecond', // @call setUnit // @call addUnit 'micro', // @call setUnit // @call addUnit 'microsecond', ]; /** * Creates a DateTimeZone from a string, DateTimeZone or integer offset. * * @param DateTimeZone|string|int|null $object original value to get CarbonTimeZone from it. * @param DateTimeZone|string|int|null $objectDump dump of the object for error messages. * * @throws InvalidTimeZoneException * * @return CarbonTimeZone|false */ protected static function safeCreateDateTimeZone($object, $objectDump = null) { return CarbonTimeZone::instance($object, $objectDump); } /** * Get the TimeZone associated with the Carbon instance (as CarbonTimeZone). * * @return CarbonTimeZone * * @link https://php.net/manual/en/datetime.gettimezone.php */ #[ReturnTypeWillChange] public function getTimezone() { return CarbonTimeZone::instance(parent::getTimezone()); } /** * List of minimum and maximums for each unit. * * @param int $daysInMonth * * @return array */ protected static function getRangesByUnit(int $daysInMonth = 31): array { return [ // @call roundUnit 'year' => [1, 9999], // @call roundUnit 'month' => [1, static::MONTHS_PER_YEAR], // @call roundUnit 'day' => [1, $daysInMonth], // @call roundUnit 'hour' => [0, static::HOURS_PER_DAY - 1], // @call roundUnit 'minute' => [0, static::MINUTES_PER_HOUR - 1], // @call roundUnit 'second' => [0, static::SECONDS_PER_MINUTE - 1], ]; } /** * Get a copy of the instance. * * @return static */ public function copy() { return clone $this; } /** * @alias copy * * Get a copy of the instance. * * @return static */ public function clone() { return clone $this; } /** * Clone the current instance if it's mutable. * * This method is convenient to ensure you don't mutate the initial object * but avoid to make a useless copy of it if it's already immutable. * * @return static */ public function avoidMutation(): self { if ($this instanceof DateTimeImmutable) { return $this; } return clone $this; } /** * Returns a present instance in the same timezone. * * @return static */ public function nowWithSameTz() { return static::now($this->getTimezone()); } /** * Throws an exception if the given object is not a DateTime and does not implement DateTimeInterface. * * @param mixed $date * @param string|array $other * * @throws InvalidTypeException */ protected static function expectDateTime($date, $other = []) { $message = 'Expected '; foreach ((array) $other as $expect) { $message .= "$expect, "; } if (!$date instanceof DateTime && !$date instanceof DateTimeInterface) { throw new InvalidTypeException( $message.'DateTime or DateTimeInterface, '. (\is_object($date) ? \get_class($date) : \gettype($date)).' given' ); } } /** * Return the Carbon instance passed through, a now instance in the same timezone * if null given or parse the input if string given. * * @param Carbon|DateTimeInterface|string|null $date * * @return static */ protected function resolveCarbon($date = null) { if (!$date) { return $this->nowWithSameTz(); } if (\is_string($date)) { return static::parse($date, $this->getTimezone()); } static::expectDateTime($date, ['null', 'string']); return $date instanceof self ? $date : static::instance($date); } /** * Return the Carbon instance passed through, a now instance in UTC * if null given or parse the input if string given (using current timezone * then switching to UTC). * * @param Carbon|DateTimeInterface|string|null $date * * @return static */ protected function resolveUTC($date = null): self { if (!$date) { return static::now('UTC'); } if (\is_string($date)) { return static::parse($date, $this->getTimezone())->utc(); } static::expectDateTime($date, ['null', 'string']); return $date instanceof self ? $date : static::instance($date)->utc(); } /** * Return the Carbon instance passed through, a now instance in the same timezone * if null given or parse the input if string given. * * @param Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|DateTimeInterface|string|null $date * * @return static */ public function carbonize($date = null) { if ($date instanceof DateInterval) { return $this->avoidMutation()->add($date); } if ($date instanceof DatePeriod || $date instanceof CarbonPeriod) { $date = $date->getStartDate(); } return $this->resolveCarbon($date); } /////////////////////////////////////////////////////////////////// ///////////////////////// GETTERS AND SETTERS ///////////////////// /////////////////////////////////////////////////////////////////// /** * Get a part of the Carbon object * * @param string $name * * @throws UnknownGetterException * * @return string|int|bool|DateTimeZone|null */ public function __get($name) { return $this->get($name); } /** * Get a part of the Carbon object * * @param string $name * * @throws UnknownGetterException * * @return string|int|bool|DateTimeZone|null */ public function get($name) { static $formats = [ // @property int 'year' => 'Y', // @property int 'yearIso' => 'o', // @property int // @call isSameUnit 'month' => 'n', // @property int 'day' => 'j', // @property int 'hour' => 'G', // @property int 'minute' => 'i', // @property int 'second' => 's', // @property int 'micro' => 'u', // @property int 'microsecond' => 'u', // @property-read int 0 (for Sunday) through 6 (for Saturday) 'dayOfWeek' => 'w', // @property-read int 1 (for Monday) through 7 (for Sunday) 'dayOfWeekIso' => 'N', // @property-read int ISO-8601 week number of year, weeks starting on Monday 'weekOfYear' => 'W', // @property-read int number of days in the given month 'daysInMonth' => 't', // @property int|float|string seconds since the Unix Epoch 'timestamp' => 'U', // @property-read string "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) 'latinMeridiem' => 'a', // @property-read string "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) 'latinUpperMeridiem' => 'A', // @property string the day of week in English 'englishDayOfWeek' => 'l', // @property string the abbreviated day of week in English 'shortEnglishDayOfWeek' => 'D', // @property string the month in English 'englishMonth' => 'F', // @property string the abbreviated month in English 'shortEnglishMonth' => 'M', // @property string the day of week in current locale LC_TIME // @deprecated // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. // replacement: Use ->isoFormat('MMM') instead. // since: 2.55.0 'localeDayOfWeek' => '%A', // @property string the abbreviated day of week in current locale LC_TIME // @deprecated // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. // replacement: Use ->isoFormat('dddd') instead. // since: 2.55.0 'shortLocaleDayOfWeek' => '%a', // @property string the month in current locale LC_TIME // @deprecated // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. // replacement: Use ->isoFormat('ddd') instead. // since: 2.55.0 'localeMonth' => '%B', // @property string the abbreviated month in current locale LC_TIME // @deprecated // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. // replacement: Use ->isoFormat('MMMM') instead. // since: 2.55.0 'shortLocaleMonth' => '%b', // @property-read string $timezoneAbbreviatedName the current timezone abbreviated name 'timezoneAbbreviatedName' => 'T', // @property-read string $tzAbbrName alias of $timezoneAbbreviatedName 'tzAbbrName' => 'T', ]; switch (true) { case isset($formats[$name]): $format = $formats[$name]; $method = str_starts_with($format, '%') ? 'formatLocalized' : 'rawFormat'; $value = $this->$method($format); return is_numeric($value) ? (int) $value : $value; // @property-read string long name of weekday translated according to Carbon locale, in english if no translation available for current language case $name === 'dayName': return $this->getTranslatedDayName(); // @property-read string short name of weekday translated according to Carbon locale, in english if no translation available for current language case $name === 'shortDayName': return $this->getTranslatedShortDayName(); // @property-read string very short name of weekday translated according to Carbon locale, in english if no translation available for current language case $name === 'minDayName': return $this->getTranslatedMinDayName(); // @property-read string long name of month translated according to Carbon locale, in english if no translation available for current language case $name === 'monthName': return $this->getTranslatedMonthName(); // @property-read string short name of month translated according to Carbon locale, in english if no translation available for current language case $name === 'shortMonthName': return $this->getTranslatedShortMonthName(); // @property-read string lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language case $name === 'meridiem': return $this->meridiem(true); // @property-read string uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language case $name === 'upperMeridiem': return $this->meridiem(); // @property-read int current hour from 1 to 24 case $name === 'noZeroHour': return $this->hour ?: 24; // @property int case $name === 'milliseconds': // @property int case $name === 'millisecond': // @property int case $name === 'milli': return (int) floor(((int) $this->rawFormat('u')) / 1000); // @property int 1 through 53 case $name === 'week': return (int) $this->week(); // @property int 1 through 53 case $name === 'isoWeek': return (int) $this->isoWeek(); // @property int year according to week format case $name === 'weekYear': return (int) $this->weekYear(); // @property int year according to ISO week format case $name === 'isoWeekYear': return (int) $this->isoWeekYear(); // @property-read int 51 through 53 case $name === 'weeksInYear': return $this->weeksInYear(); // @property-read int 51 through 53 case $name === 'isoWeeksInYear': return $this->isoWeeksInYear(); // @property-read int 1 through 5 case $name === 'weekOfMonth': return (int) ceil($this->day / static::DAYS_PER_WEEK); // @property-read int 1 through 5 case $name === 'weekNumberInMonth': return (int) ceil(($this->day + $this->avoidMutation()->startOfMonth()->dayOfWeekIso - 1) / static::DAYS_PER_WEEK); // @property-read int 0 through 6 case $name === 'firstWeekDay': return $this->localTranslator ? ($this->getTranslationMessage('first_day_of_week') ?? 0) : static::getWeekStartsAt(); // @property-read int 0 through 6 case $name === 'lastWeekDay': return $this->localTranslator ? (($this->getTranslationMessage('first_day_of_week') ?? 0) + static::DAYS_PER_WEEK - 1) % static::DAYS_PER_WEEK : static::getWeekEndsAt(); // @property int 1 through 366 case $name === 'dayOfYear': return 1 + (int) ($this->rawFormat('z')); // @property-read int 365 or 366 case $name === 'daysInYear': return $this->isLeapYear() ? 366 : 365; // @property int does a diffInYears() with default parameters case $name === 'age': return $this->diffInYears(); // @property-read int the quarter of this instance, 1 - 4 // @call isSameUnit case $name === 'quarter': return (int) ceil($this->month / static::MONTHS_PER_QUARTER); // @property-read int the decade of this instance // @call isSameUnit case $name === 'decade': return (int) ceil($this->year / static::YEARS_PER_DECADE); // @property-read int the century of this instance // @call isSameUnit case $name === 'century': $factor = 1; $year = $this->year; if ($year < 0) { $year = -$year; $factor = -1; } return (int) ($factor * ceil($year / static::YEARS_PER_CENTURY)); // @property-read int the millennium of this instance // @call isSameUnit case $name === 'millennium': $factor = 1; $year = $this->year; if ($year < 0) { $year = -$year; $factor = -1; } return (int) ($factor * ceil($year / static::YEARS_PER_MILLENNIUM)); // @property int the timezone offset in seconds from UTC case $name === 'offset': return $this->getOffset(); // @property int the timezone offset in minutes from UTC case $name === 'offsetMinutes': return $this->getOffset() / static::SECONDS_PER_MINUTE; // @property int the timezone offset in hours from UTC case $name === 'offsetHours': return $this->getOffset() / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR; // @property-read bool daylight savings time indicator, true if DST, false otherwise case $name === 'dst': return $this->rawFormat('I') === '1'; // @property-read bool checks if the timezone is local, true if local, false otherwise case $name === 'local': return $this->getOffset() === $this->avoidMutation()->setTimezone(date_default_timezone_get())->getOffset(); // @property-read bool checks if the timezone is UTC, true if UTC, false otherwise case $name === 'utc': return $this->getOffset() === 0; // @property CarbonTimeZone $timezone the current timezone // @property CarbonTimeZone $tz alias of $timezone case $name === 'timezone' || $name === 'tz': return CarbonTimeZone::instance($this->getTimezone()); // @property-read string $timezoneName the current timezone name // @property-read string $tzName alias of $timezoneName case $name === 'timezoneName' || $name === 'tzName': return $this->getTimezone()->getName(); // @property-read string locale of the current instance case $name === 'locale': return $this->getTranslatorLocale(); default: $macro = $this->getLocalMacro('get'.ucfirst($name)); if ($macro) { return $this->executeCallableWithContext($macro); } throw new UnknownGetterException($name); } } /** * Check if an attribute exists on the object * * @param string $name * * @return bool */ public function __isset($name) { try { $this->__get($name); } catch (UnknownGetterException | ReflectionException $e) { return false; } return true; } /** * Set a part of the Carbon object * * @param string $name * @param string|int|DateTimeZone $value * * @throws UnknownSetterException|ReflectionException * * @return void */ public function __set($name, $value) { if ($this->constructedObjectId === spl_object_hash($this)) { $this->set($name, $value); return; } $this->$name = $value; } /** * Set a part of the Carbon object * * @param string|array $name * @param string|int|DateTimeZone $value * * @throws ImmutableException|UnknownSetterException * * @return $this */ public function set($name, $value = null) { if ($this->isImmutable()) { throw new ImmutableException(sprintf('%s class', static::class)); } if (\is_array($name)) { foreach ($name as $key => $value) { $this->set($key, $value); } return $this; } switch ($name) { case 'milliseconds': case 'millisecond': case 'milli': case 'microseconds': case 'microsecond': case 'micro': if (str_starts_with($name, 'milli')) { $value *= 1000; } while ($value < 0) { $this->subSecond(); $value += static::MICROSECONDS_PER_SECOND; } while ($value >= static::MICROSECONDS_PER_SECOND) { $this->addSecond(); $value -= static::MICROSECONDS_PER_SECOND; } $this->modify($this->rawFormat('H:i:s.').str_pad((string) round($value), 6, '0', STR_PAD_LEFT)); break; case 'year': case 'month': case 'day': case 'hour': case 'minute': case 'second': [$year, $month, $day, $hour, $minute, $second] = array_map('intval', explode('-', $this->rawFormat('Y-n-j-G-i-s'))); $$name = $value; $this->setDateTime($year, $month, $day, $hour, $minute, $second); break; case 'week': $this->week($value); break; case 'isoWeek': $this->isoWeek($value); break; case 'weekYear': $this->weekYear($value); break; case 'isoWeekYear': $this->isoWeekYear($value); break; case 'dayOfYear': $this->addDays($value - $this->dayOfYear); break; case 'timestamp': $this->setTimestamp($value); break; case 'offset': $this->setTimezone(static::safeCreateDateTimeZone($value / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR)); break; case 'offsetMinutes': $this->setTimezone(static::safeCreateDateTimeZone($value / static::MINUTES_PER_HOUR)); break; case 'offsetHours': $this->setTimezone(static::safeCreateDateTimeZone($value)); break; case 'timezone': case 'tz': $this->setTimezone($value); break; default: $macro = $this->getLocalMacro('set'.ucfirst($name)); if ($macro) { $this->executeCallableWithContext($macro, $value); break; } if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { throw new UnknownSetterException($name); } $this->$name = $value; } return $this; } protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $subKey, $defaultValue) { $key = $baseKey.$keySuffix; $standaloneKey = "{$key}_standalone"; $baseTranslation = $this->getTranslationMessage($key); if ($baseTranslation instanceof Closure) { return $baseTranslation($this, $context, $subKey) ?: $defaultValue; } if ( $this->getTranslationMessage("$standaloneKey.$subKey") && (!$context || (($regExp = $this->getTranslationMessage("{$baseKey}_regexp")) && !preg_match($regExp, $context))) ) { $key = $standaloneKey; } return $this->getTranslationMessage("$key.$subKey", null, $defaultValue); } /** * Get the translation of the current week day name (with context for languages with multiple forms). * * @param string|null $context whole format string * @param string $keySuffix "", "_short" or "_min" * @param string|null $defaultValue default value if translation missing * * @return string */ public function getTranslatedDayName($context = null, $keySuffix = '', $defaultValue = null) { return $this->getTranslatedFormByRegExp('weekdays', $keySuffix, $context, $this->dayOfWeek, $defaultValue ?: $this->englishDayOfWeek); } /** * Get the translation of the current short week day name (with context for languages with multiple forms). * * @param string|null $context whole format string * * @return string */ public function getTranslatedShortDayName($context = null) { return $this->getTranslatedDayName($context, '_short', $this->shortEnglishDayOfWeek); } /** * Get the translation of the current abbreviated week day name (with context for languages with multiple forms). * * @param string|null $context whole format string * * @return string */ public function getTranslatedMinDayName($context = null) { return $this->getTranslatedDayName($context, '_min', $this->shortEnglishDayOfWeek); } /** * Get the translation of the current month day name (with context for languages with multiple forms). * * @param string|null $context whole format string * @param string $keySuffix "" or "_short" * @param string|null $defaultValue default value if translation missing * * @return string */ public function getTranslatedMonthName($context = null, $keySuffix = '', $defaultValue = null) { return $this->getTranslatedFormByRegExp('months', $keySuffix, $context, $this->month - 1, $defaultValue ?: $this->englishMonth); } /** * Get the translation of the current short month day name (with context for languages with multiple forms). * * @param string|null $context whole format string * * @return string */ public function getTranslatedShortMonthName($context = null) { return $this->getTranslatedMonthName($context, '_short', $this->shortEnglishMonth); } /** * Get/set the day of year. * * @param int|null $value new value for day of year if using as setter. * * @return static|int */ public function dayOfYear($value = null) { $dayOfYear = $this->dayOfYear; return $value === null ? $dayOfYear : $this->addDays($value - $dayOfYear); } /** * Get/set the weekday from 0 (Sunday) to 6 (Saturday). * * @param int|null $value new value for weekday if using as setter. * * @return static|int */ public function weekday($value = null) { if ($value === null) { return $this->dayOfWeek; } $firstDay = (int) ($this->getTranslationMessage('first_day_of_week') ?? 0); $dayOfWeek = ($this->dayOfWeek + 7 - $firstDay) % 7; return $this->addDays((($value + 7 - $firstDay) % 7) - $dayOfWeek); } /** * Get/set the ISO weekday from 1 (Monday) to 7 (Sunday). * * @param int|null $value new value for weekday if using as setter. * * @return static|int */ public function isoWeekday($value = null) { $dayOfWeekIso = $this->dayOfWeekIso; return $value === null ? $dayOfWeekIso : $this->addDays($value - $dayOfWeekIso); } /** * Return the number of days since the start of the week (using the current locale or the first parameter * if explicitly given). * * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, * if not provided, start of week is inferred from the locale * (Sunday for en_US, Monday for de_DE, etc.) * * @return int */ public function getDaysFromStartOfWeek(int $weekStartsAt = null): int { $firstDay = (int) ($weekStartsAt ?? $this->getTranslationMessage('first_day_of_week') ?? 0); return ($this->dayOfWeek + 7 - $firstDay) % 7; } /** * Set the day (keeping the current time) to the start of the week + the number of days passed as the first * parameter. First day of week is driven by the locale unless explicitly set with the second parameter. * * @param int $numberOfDays number of days to add after the start of the current week * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, * if not provided, start of week is inferred from the locale * (Sunday for en_US, Monday for de_DE, etc.) * * @return static */ public function setDaysFromStartOfWeek(int $numberOfDays, int $weekStartsAt = null) { return $this->addDays($numberOfDays - $this->getDaysFromStartOfWeek($weekStartsAt)); } /** * Set any unit to a new value without overflowing current other unit given. * * @param string $valueUnit unit name to modify * @param int $value new value for the input unit * @param string $overflowUnit unit name to not overflow * * @return static */ public function setUnitNoOverflow($valueUnit, $value, $overflowUnit) { try { $original = $this->avoidMutation(); /** @var static $date */ $date = $this->$valueUnit($value); $end = $original->avoidMutation()->endOf($overflowUnit); $start = $original->avoidMutation()->startOf($overflowUnit); if ($date < $start) { $date = $date->setDateTimeFrom($start); } elseif ($date > $end) { $date = $date->setDateTimeFrom($end); } return $date; } catch (BadMethodCallException | ReflectionException $exception) { throw new UnknownUnitException($valueUnit, 0, $exception); } } /** * Add any unit to a new value without overflowing current other unit given. * * @param string $valueUnit unit name to modify * @param int $value amount to add to the input unit * @param string $overflowUnit unit name to not overflow * * @return static */ public function addUnitNoOverflow($valueUnit, $value, $overflowUnit) { return $this->setUnitNoOverflow($valueUnit, $this->$valueUnit + $value, $overflowUnit); } /** * Subtract any unit to a new value without overflowing current other unit given. * * @param string $valueUnit unit name to modify * @param int $value amount to subtract to the input unit * @param string $overflowUnit unit name to not overflow * * @return static */ public function subUnitNoOverflow($valueUnit, $value, $overflowUnit) { return $this->setUnitNoOverflow($valueUnit, $this->$valueUnit - $value, $overflowUnit); } /** * Returns the minutes offset to UTC if no arguments passed, else set the timezone with given minutes shift passed. * * @param int|null $minuteOffset * * @return int|static */ public function utcOffset(int $minuteOffset = null) { if (\func_num_args() < 1) { return $this->offsetMinutes; } return $this->setTimezone(CarbonTimeZone::createFromMinuteOffset($minuteOffset)); } /** * Set the date with gregorian year, month and day numbers. * * @see https://php.net/manual/en/datetime.setdate.php * * @param int $year * @param int $month * @param int $day * * @return static */ #[ReturnTypeWillChange] public function setDate($year, $month, $day) { return parent::setDate((int) $year, (int) $month, (int) $day); } /** * Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates. * * @see https://php.net/manual/en/datetime.setisodate.php * * @param int $year * @param int $week * @param int $day * * @return static */ #[ReturnTypeWillChange] public function setISODate($year, $week, $day = 1) { return parent::setISODate((int) $year, (int) $week, (int) $day); } /** * Set the date and time all together. * * @param int $year * @param int $month * @param int $day * @param int $hour * @param int $minute * @param int $second * @param int $microseconds * * @return static */ public function setDateTime($year, $month, $day, $hour, $minute, $second = 0, $microseconds = 0) { return $this->setDate($year, $month, $day)->setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds); } /** * Resets the current time of the DateTime object to a different time. * * @see https://php.net/manual/en/datetime.settime.php * * @param int $hour * @param int $minute * @param int $second * @param int $microseconds * * @return static */ #[ReturnTypeWillChange] public function setTime($hour, $minute, $second = 0, $microseconds = 0) { return parent::setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds); } /** * Set the instance's timestamp. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $unixTimestamp * * @return static */ #[ReturnTypeWillChange] public function setTimestamp($unixTimestamp) { [$timestamp, $microseconds] = self::getIntegerAndDecimalParts($unixTimestamp); return parent::setTimestamp((int) $timestamp)->setMicroseconds((int) $microseconds); } /** * Set the time by time string. * * @param string $time * * @return static */ public function setTimeFromTimeString($time) { if (!str_contains($time, ':')) { $time .= ':0'; } return $this->modify($time); } /** * @alias setTimezone * * @param DateTimeZone|string $value * * @return static */ public function timezone($value) { return $this->setTimezone($value); } /** * Set the timezone or returns the timezone name if no arguments passed. * * @param DateTimeZone|string $value * * @return static|string */ public function tz($value = null) { if (\func_num_args() < 1) { return $this->tzName; } return $this->setTimezone($value); } /** * Set the instance's timezone from a string or object. * * @param DateTimeZone|string $value * * @return static */ #[ReturnTypeWillChange] public function setTimezone($value) { $tz = static::safeCreateDateTimeZone($value); if ($tz === false && !self::isStrictModeEnabled()) { $tz = new CarbonTimeZone(); } return parent::setTimezone($tz); } /** * Set the instance's timezone from a string or object and add/subtract the offset difference. * * @param DateTimeZone|string $value * * @return static */ public function shiftTimezone($value) { $dateTimeString = $this->format('Y-m-d H:i:s.u'); return $this ->setTimezone($value) ->modify($dateTimeString); } /** * Set the instance's timezone to UTC. * * @return static */ public function utc() { return $this->setTimezone('UTC'); } /** * Set the year, month, and date for this instance to that of the passed instance. * * @param Carbon|DateTimeInterface $date now if null * * @return static */ public function setDateFrom($date = null) { $date = $this->resolveCarbon($date); return $this->setDate($date->year, $date->month, $date->day); } /** * Set the hour, minute, second and microseconds for this instance to that of the passed instance. * * @param Carbon|DateTimeInterface $date now if null * * @return static */ public function setTimeFrom($date = null) { $date = $this->resolveCarbon($date); return $this->setTime($date->hour, $date->minute, $date->second, $date->microsecond); } /** * Set the date and time for this instance to that of the passed instance. * * @param Carbon|DateTimeInterface $date * * @return static */ public function setDateTimeFrom($date = null) { $date = $this->resolveCarbon($date); return $this->modify($date->rawFormat('Y-m-d H:i:s.u')); } /** * Get the days of the week * * @return array */ public static function getDays() { return static::$days; } /////////////////////////////////////////////////////////////////// /////////////////////// WEEK SPECIAL DAYS ///////////////////////// /////////////////////////////////////////////////////////////////// private static function getFirstDayOfWeek(): int { return (int) static::getTranslationMessageWith( static::getTranslator(), 'first_day_of_week' ); } /** * Get the first day of week * * @return int */ public static function getWeekStartsAt() { if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { return self::getFirstDayOfWeek(); } return static::$weekStartsAt; } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the * 'first_day_of_week' locale setting to change the start of week according to current locale * selected and implicitly the end of week. * * Set the first day of week * * @param int|string $day week start day (or 'auto' to get the first day of week from Carbon::getLocale() culture). * * @return void */ public static function setWeekStartsAt($day) { static::$weekStartsAt = $day === static::WEEK_DAY_AUTO ? $day : max(0, (7 + $day) % 7); } /** * Get the last day of week * * @return int */ public static function getWeekEndsAt() { if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { return (int) (static::DAYS_PER_WEEK - 1 + self::getFirstDayOfWeek()) % static::DAYS_PER_WEEK; } return static::$weekEndsAt; } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the * start of week according to current locale selected and implicitly the end of week. * * Set the last day of week * * @param int|string $day week end day (or 'auto' to get the day before the first day of week * from Carbon::getLocale() culture). * * @return void */ public static function setWeekEndsAt($day) { static::$weekEndsAt = $day === static::WEEK_DAY_AUTO ? $day : max(0, (7 + $day) % 7); } /** * Get weekend days * * @return array */ public static function getWeekendDays() { return static::$weekendDays; } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather consider week-end is always saturday and sunday, and if you have some custom * week-end days to handle, give to those days an other name and create a macro for them: * * ``` * Carbon::macro('isDayOff', function ($date) { * return $date->isSunday() || $date->isMonday(); * }); * Carbon::macro('isNotDayOff', function ($date) { * return !$date->isDayOff(); * }); * if ($someDate->isDayOff()) ... * if ($someDate->isNotDayOff()) ... * // Add 5 not-off days * $count = 5; * while ($someDate->isDayOff() || ($count-- > 0)) { * $someDate->addDay(); * } * ``` * * Set weekend days * * @param array $days * * @return void */ public static function setWeekendDays($days) { static::$weekendDays = $days; } /** * Determine if a time string will produce a relative date. * * @param string $time * * @return bool true if time match a relative date, false if absolute or invalid time string */ public static function hasRelativeKeywords($time) { if (!$time || strtotime($time) === false) { return false; } $date1 = new DateTime('2000-01-01T00:00:00Z'); $date1->modify($time); $date2 = new DateTime('2001-12-25T00:00:00Z'); $date2->modify($time); return $date1 != $date2; } /////////////////////////////////////////////////////////////////// /////////////////////// STRING FORMATTING ///////////////////////// /////////////////////////////////////////////////////////////////// /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use UTF-8 language packages on every machine. * * Set if UTF8 will be used for localized date/time. * * @param bool $utf8 */ public static function setUtf8($utf8) { static::$utf8 = $utf8; } /** * Format the instance with the current locale. You can set the current * locale using setlocale() https://php.net/setlocale. * * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. * Use ->isoFormat() instead. * Deprecated since 2.55.0 * * @param string $format * * @return string */ public function formatLocalized($format) { // Check for Windows to find and replace the %e modifier correctly. if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $format = preg_replace('#(?toDateTimeString()); $formatted = ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) ? strftime($format, $time) : @strftime($format, $time); return static::$utf8 ? ( \function_exists('mb_convert_encoding') ? mb_convert_encoding($formatted, 'UTF-8', mb_list_encodings()) : utf8_encode($formatted) ) : $formatted; } /** * Returns list of locale formats for ISO formatting. * * @param string|null $locale current locale used if null * * @return array */ public function getIsoFormats($locale = null) { return [ 'LT' => $this->getTranslationMessage('formats.LT', $locale, 'h:mm A'), 'LTS' => $this->getTranslationMessage('formats.LTS', $locale, 'h:mm:ss A'), 'L' => $this->getTranslationMessage('formats.L', $locale, 'MM/DD/YYYY'), 'LL' => $this->getTranslationMessage('formats.LL', $locale, 'MMMM D, YYYY'), 'LLL' => $this->getTranslationMessage('formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), 'LLLL' => $this->getTranslationMessage('formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), 'l' => $this->getTranslationMessage('formats.l', $locale), 'll' => $this->getTranslationMessage('formats.ll', $locale), 'lll' => $this->getTranslationMessage('formats.lll', $locale), 'llll' => $this->getTranslationMessage('formats.llll', $locale), ]; } /** * Returns list of calendar formats for ISO formatting. * * @param string|null $locale current locale used if null * * @return array */ public function getCalendarFormats($locale = null) { return [ 'sameDay' => $this->getTranslationMessage('calendar.sameDay', $locale, '[Today at] LT'), 'nextDay' => $this->getTranslationMessage('calendar.nextDay', $locale, '[Tomorrow at] LT'), 'nextWeek' => $this->getTranslationMessage('calendar.nextWeek', $locale, 'dddd [at] LT'), 'lastDay' => $this->getTranslationMessage('calendar.lastDay', $locale, '[Yesterday at] LT'), 'lastWeek' => $this->getTranslationMessage('calendar.lastWeek', $locale, '[Last] dddd [at] LT'), 'sameElse' => $this->getTranslationMessage('calendar.sameElse', $locale, 'L'), ]; } /** * Returns list of locale units for ISO formatting. * * @return array */ public static function getIsoUnits() { static $units = null; if ($units === null) { $units = [ 'OD' => ['getAltNumber', ['day']], 'OM' => ['getAltNumber', ['month']], 'OY' => ['getAltNumber', ['year']], 'OH' => ['getAltNumber', ['hour']], 'Oh' => ['getAltNumber', ['h']], 'Om' => ['getAltNumber', ['minute']], 'Os' => ['getAltNumber', ['second']], 'D' => 'day', 'DD' => ['rawFormat', ['d']], 'Do' => ['ordinal', ['day', 'D']], 'd' => 'dayOfWeek', 'dd' => function (CarbonInterface $date, $originalFormat = null) { return $date->getTranslatedMinDayName($originalFormat); }, 'ddd' => function (CarbonInterface $date, $originalFormat = null) { return $date->getTranslatedShortDayName($originalFormat); }, 'dddd' => function (CarbonInterface $date, $originalFormat = null) { return $date->getTranslatedDayName($originalFormat); }, 'DDD' => 'dayOfYear', 'DDDD' => ['getPaddedUnit', ['dayOfYear', 3]], 'DDDo' => ['ordinal', ['dayOfYear', 'DDD']], 'e' => ['weekday', []], 'E' => 'dayOfWeekIso', 'H' => ['rawFormat', ['G']], 'HH' => ['rawFormat', ['H']], 'h' => ['rawFormat', ['g']], 'hh' => ['rawFormat', ['h']], 'k' => 'noZeroHour', 'kk' => ['getPaddedUnit', ['noZeroHour']], 'hmm' => ['rawFormat', ['gi']], 'hmmss' => ['rawFormat', ['gis']], 'Hmm' => ['rawFormat', ['Gi']], 'Hmmss' => ['rawFormat', ['Gis']], 'm' => 'minute', 'mm' => ['rawFormat', ['i']], 'a' => 'meridiem', 'A' => 'upperMeridiem', 's' => 'second', 'ss' => ['getPaddedUnit', ['second']], 'S' => function (CarbonInterface $date) { return (string) floor($date->micro / 100000); }, 'SS' => function (CarbonInterface $date) { return str_pad((string) floor($date->micro / 10000), 2, '0', STR_PAD_LEFT); }, 'SSS' => function (CarbonInterface $date) { return str_pad((string) floor($date->micro / 1000), 3, '0', STR_PAD_LEFT); }, 'SSSS' => function (CarbonInterface $date) { return str_pad((string) floor($date->micro / 100), 4, '0', STR_PAD_LEFT); }, 'SSSSS' => function (CarbonInterface $date) { return str_pad((string) floor($date->micro / 10), 5, '0', STR_PAD_LEFT); }, 'SSSSSS' => ['getPaddedUnit', ['micro', 6]], 'SSSSSSS' => function (CarbonInterface $date) { return str_pad((string) floor($date->micro * 10), 7, '0', STR_PAD_LEFT); }, 'SSSSSSSS' => function (CarbonInterface $date) { return str_pad((string) floor($date->micro * 100), 8, '0', STR_PAD_LEFT); }, 'SSSSSSSSS' => function (CarbonInterface $date) { return str_pad((string) floor($date->micro * 1000), 9, '0', STR_PAD_LEFT); }, 'M' => 'month', 'MM' => ['rawFormat', ['m']], 'MMM' => function (CarbonInterface $date, $originalFormat = null) { $month = $date->getTranslatedShortMonthName($originalFormat); $suffix = $date->getTranslationMessage('mmm_suffix'); if ($suffix && $month !== $date->monthName) { $month .= $suffix; } return $month; }, 'MMMM' => function (CarbonInterface $date, $originalFormat = null) { return $date->getTranslatedMonthName($originalFormat); }, 'Mo' => ['ordinal', ['month', 'M']], 'Q' => 'quarter', 'Qo' => ['ordinal', ['quarter', 'M']], 'G' => 'isoWeekYear', 'GG' => ['getPaddedUnit', ['isoWeekYear']], 'GGG' => ['getPaddedUnit', ['isoWeekYear', 3]], 'GGGG' => ['getPaddedUnit', ['isoWeekYear', 4]], 'GGGGG' => ['getPaddedUnit', ['isoWeekYear', 5]], 'g' => 'weekYear', 'gg' => ['getPaddedUnit', ['weekYear']], 'ggg' => ['getPaddedUnit', ['weekYear', 3]], 'gggg' => ['getPaddedUnit', ['weekYear', 4]], 'ggggg' => ['getPaddedUnit', ['weekYear', 5]], 'W' => 'isoWeek', 'WW' => ['getPaddedUnit', ['isoWeek']], 'Wo' => ['ordinal', ['isoWeek', 'W']], 'w' => 'week', 'ww' => ['getPaddedUnit', ['week']], 'wo' => ['ordinal', ['week', 'w']], 'x' => ['valueOf', []], 'X' => 'timestamp', 'Y' => 'year', 'YY' => ['rawFormat', ['y']], 'YYYY' => ['getPaddedUnit', ['year', 4]], 'YYYYY' => ['getPaddedUnit', ['year', 5]], 'YYYYYY' => function (CarbonInterface $date) { return ($date->year < 0 ? '' : '+').$date->getPaddedUnit('year', 6); }, 'z' => ['rawFormat', ['T']], 'zz' => 'tzName', 'Z' => ['getOffsetString', []], 'ZZ' => ['getOffsetString', ['']], ]; } return $units; } /** * Returns a unit of the instance padded with 0 by default or any other string if specified. * * @param string $unit Carbon unit name * @param int $length Length of the output (2 by default) * @param string $padString String to use for padding ("0" by default) * @param int $padType Side(s) to pad (STR_PAD_LEFT by default) * * @return string */ public function getPaddedUnit($unit, $length = 2, $padString = '0', $padType = STR_PAD_LEFT) { return ($this->$unit < 0 ? '-' : '').str_pad((string) abs($this->$unit), $length, $padString, $padType); } /** * Return a property with its ordinal. * * @param string $key * @param string|null $period * * @return string */ public function ordinal(string $key, ?string $period = null): string { $number = $this->$key; $result = $this->translate('ordinal', [ ':number' => $number, ':period' => (string) $period, ]); return (string) ($result === 'ordinal' ? $number : $result); } /** * Return the meridiem of the current time in the current locale. * * @param bool $isLower if true, returns lowercase variant if available in the current locale. * * @return string */ public function meridiem(bool $isLower = false): string { $hour = $this->hour; $index = $hour < 12 ? 0 : 1; if ($isLower) { $key = 'meridiem.'.($index + 2); $result = $this->translate($key); if ($result !== $key) { return $result; } } $key = "meridiem.$index"; $result = $this->translate($key); if ($result === $key) { $result = $this->translate('meridiem', [ ':hour' => $this->hour, ':minute' => $this->minute, ':isLower' => $isLower, ]); if ($result === 'meridiem') { return $isLower ? $this->latinMeridiem : $this->latinUpperMeridiem; } } elseif ($isLower) { $result = mb_strtolower($result); } return $result; } /** * Returns the alternative number for a given date property if available in the current locale. * * @param string $key date property * * @return string */ public function getAltNumber(string $key): string { return $this->translateNumber(\strlen($key) > 1 ? $this->$key : $this->rawFormat('h')); } /** * Format in the current language using ISO replacement patterns. * * @param string $format * @param string|null $originalFormat provide context if a chunk has been passed alone * * @return string */ public function isoFormat(string $format, ?string $originalFormat = null): string { $result = ''; $length = mb_strlen($format); $originalFormat = $originalFormat ?: $format; $inEscaped = false; $formats = null; $units = null; for ($i = 0; $i < $length; $i++) { $char = mb_substr($format, $i, 1); if ($char === '\\') { $result .= mb_substr($format, ++$i, 1); continue; } if ($char === '[' && !$inEscaped) { $inEscaped = true; continue; } if ($char === ']' && $inEscaped) { $inEscaped = false; continue; } if ($inEscaped) { $result .= $char; continue; } $input = mb_substr($format, $i); if (preg_match('/^(LTS|LT|l{1,4}|L{1,4})/', $input, $match)) { if ($formats === null) { $formats = $this->getIsoFormats(); } $code = $match[0]; $sequence = $formats[$code] ?? preg_replace_callback( '/MMMM|MM|DD|dddd/', function ($code) { return mb_substr($code[0], 1); }, $formats[strtoupper($code)] ?? '' ); $rest = mb_substr($format, $i + mb_strlen($code)); $format = mb_substr($format, 0, $i).$sequence.$rest; $length = mb_strlen($format); $input = $sequence.$rest; } if (preg_match('/^'.CarbonInterface::ISO_FORMAT_REGEXP.'/', $input, $match)) { $code = $match[0]; if ($units === null) { $units = static::getIsoUnits(); } $sequence = $units[$code] ?? ''; if ($sequence instanceof Closure) { $sequence = $sequence($this, $originalFormat); } elseif (\is_array($sequence)) { try { $sequence = $this->{$sequence[0]}(...$sequence[1]); } catch (ReflectionException | InvalidArgumentException | BadMethodCallException $e) { $sequence = ''; } } elseif (\is_string($sequence)) { $sequence = $this->$sequence ?? $code; } $format = mb_substr($format, 0, $i).$sequence.mb_substr($format, $i + mb_strlen($code)); $i += mb_strlen((string) $sequence) - 1; $length = mb_strlen($format); $char = $sequence; } $result .= $char; } return $result; } /** * List of replacements from date() format to isoFormat(). * * @return array */ public static function getFormatsToIsoReplacements() { static $replacements = null; if ($replacements === null) { $replacements = [ 'd' => true, 'D' => 'ddd', 'j' => true, 'l' => 'dddd', 'N' => true, 'S' => function ($date) { $day = $date->rawFormat('j'); return str_replace((string) $day, '', $date->isoFormat('Do')); }, 'w' => true, 'z' => true, 'W' => true, 'F' => 'MMMM', 'm' => true, 'M' => 'MMM', 'n' => true, 't' => true, 'L' => true, 'o' => true, 'Y' => true, 'y' => true, 'a' => 'a', 'A' => 'A', 'B' => true, 'g' => true, 'G' => true, 'h' => true, 'H' => true, 'i' => true, 's' => true, 'u' => true, 'v' => true, 'E' => true, 'I' => true, 'O' => true, 'P' => true, 'Z' => true, 'c' => true, 'r' => true, 'U' => true, 'T' => true, ]; } return $replacements; } /** * Format as ->format() do (using date replacements patterns from https://php.net/manual/en/function.date.php) * but translate words whenever possible (months, day names, etc.) using the current locale. * * @param string $format * * @return string */ public function translatedFormat(string $format): string { $replacements = static::getFormatsToIsoReplacements(); $context = ''; $isoFormat = ''; $length = mb_strlen($format); for ($i = 0; $i < $length; $i++) { $char = mb_substr($format, $i, 1); if ($char === '\\') { $replacement = mb_substr($format, $i, 2); $isoFormat .= $replacement; $i++; continue; } if (!isset($replacements[$char])) { $replacement = preg_match('/^[A-Za-z]$/', $char) ? "\\$char" : $char; $isoFormat .= $replacement; $context .= $replacement; continue; } $replacement = $replacements[$char]; if ($replacement === true) { static $contextReplacements = null; if ($contextReplacements === null) { $contextReplacements = [ 'm' => 'MM', 'd' => 'DD', 't' => 'D', 'j' => 'D', 'N' => 'e', 'w' => 'e', 'n' => 'M', 'o' => 'YYYY', 'Y' => 'YYYY', 'y' => 'YY', 'g' => 'h', 'G' => 'H', 'h' => 'hh', 'H' => 'HH', 'i' => 'mm', 's' => 'ss', ]; } $isoFormat .= '['.$this->rawFormat($char).']'; $context .= $contextReplacements[$char] ?? ' '; continue; } if ($replacement instanceof Closure) { $replacement = '['.$replacement($this).']'; $isoFormat .= $replacement; $context .= $replacement; continue; } $isoFormat .= $replacement; $context .= $replacement; } return $this->isoFormat($isoFormat, $context); } /** * Returns the offset hour and minute formatted with +/- and a given separator (":" by default). * For example, if the time zone is 9 hours 30 minutes, you'll get "+09:30", with "@@" as first * argument, "+09@@30", with "" as first argument, "+0930". Negative offset will return something * like "-12:00". * * @param string $separator string to place between hours and minutes (":" by default) * * @return string */ public function getOffsetString($separator = ':') { $second = $this->getOffset(); $symbol = $second < 0 ? '-' : '+'; $minute = abs($second) / static::SECONDS_PER_MINUTE; $hour = str_pad((string) floor($minute / static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); $minute = str_pad((string) (((int) $minute) % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); return "$symbol$hour$separator$minute"; } protected static function executeStaticCallable($macro, ...$parameters) { return static::bindMacroContext(null, function () use (&$macro, &$parameters) { if ($macro instanceof Closure) { $boundMacro = @Closure::bind($macro, null, static::class); return ($boundMacro ?: $macro)(...$parameters); } return $macro(...$parameters); }); } /** * Dynamically handle calls to the class. * * @param string $method magic method name called * @param array $parameters parameters list * * @throws BadMethodCallException * * @return mixed */ public static function __callStatic($method, $parameters) { if (!static::hasMacro($method)) { foreach (static::getGenericMacros() as $callback) { try { return static::executeStaticCallable($callback, $method, ...$parameters); } catch (BadMethodCallException $exception) { continue; } } if (static::isStrictModeEnabled()) { throw new UnknownMethodException(sprintf('%s::%s', static::class, $method)); } return null; } return static::executeStaticCallable(static::$globalMacros[$method], ...$parameters); } /** * Set specified unit to new given value. * * @param string $unit year, month, day, hour, minute, second or microsecond * @param int $value new value for given unit * * @return static */ public function setUnit($unit, $value = null) { $unit = static::singularUnit($unit); $dateUnits = ['year', 'month', 'day']; if (\in_array($unit, $dateUnits)) { return $this->setDate(...array_map(function ($name) use ($unit, $value) { return (int) ($name === $unit ? $value : $this->$name); }, $dateUnits)); } $units = ['hour', 'minute', 'second', 'micro']; if ($unit === 'millisecond' || $unit === 'milli') { $value *= 1000; $unit = 'micro'; } elseif ($unit === 'microsecond') { $unit = 'micro'; } return $this->setTime(...array_map(function ($name) use ($unit, $value) { return (int) ($name === $unit ? $value : $this->$name); }, $units)); } /** * Returns standardized singular of a given singular/plural unit name (in English). * * @param string $unit * * @return string */ public static function singularUnit(string $unit): string { $unit = rtrim(mb_strtolower($unit), 's'); if ($unit === 'centurie') { return 'century'; } if ($unit === 'millennia') { return 'millennium'; } return $unit; } /** * Returns standardized plural of a given singular/plural unit name (in English). * * @param string $unit * * @return string */ public static function pluralUnit(string $unit): string { $unit = rtrim(strtolower($unit), 's'); if ($unit === 'century') { return 'centuries'; } if ($unit === 'millennium' || $unit === 'millennia') { return 'millennia'; } return "{$unit}s"; } protected function executeCallable($macro, ...$parameters) { if ($macro instanceof Closure) { $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); return ($boundMacro ?: $macro)(...$parameters); } return $macro(...$parameters); } protected function executeCallableWithContext($macro, ...$parameters) { return static::bindMacroContext($this, function () use (&$macro, &$parameters) { return $this->executeCallable($macro, ...$parameters); }); } protected static function getGenericMacros() { foreach (static::$globalGenericMacros as $list) { foreach ($list as $macro) { yield $macro; } } } /** * Dynamically handle calls to the class. * * @param string $method magic method name called * @param array $parameters parameters list * * @throws UnknownMethodException|BadMethodCallException|ReflectionException|Throwable * * @return mixed */ public function __call($method, $parameters) { $diffSizes = [ // @mode diffForHumans 'short' => true, // @mode diffForHumans 'long' => false, ]; $diffSyntaxModes = [ // @call diffForHumans 'Absolute' => CarbonInterface::DIFF_ABSOLUTE, // @call diffForHumans 'Relative' => CarbonInterface::DIFF_RELATIVE_AUTO, // @call diffForHumans 'RelativeToNow' => CarbonInterface::DIFF_RELATIVE_TO_NOW, // @call diffForHumans 'RelativeToOther' => CarbonInterface::DIFF_RELATIVE_TO_OTHER, ]; $sizePattern = implode('|', array_keys($diffSizes)); $syntaxPattern = implode('|', array_keys($diffSyntaxModes)); if (preg_match("/^(?$sizePattern)(?$syntaxPattern)DiffForHumans$/", $method, $match)) { $dates = array_filter($parameters, function ($parameter) { return $parameter instanceof DateTimeInterface; }); $other = null; if (\count($dates)) { $key = key($dates); $other = current($dates); array_splice($parameters, $key, 1); } return $this->diffForHumans($other, $diffSyntaxModes[$match['syntax']], $diffSizes[$match['size']], ...$parameters); } $roundedValue = $this->callRoundMethod($method, $parameters); if ($roundedValue !== null) { return $roundedValue; } $unit = rtrim($method, 's'); if (str_starts_with($unit, 'is')) { $word = substr($unit, 2); if (\in_array($word, static::$days, true)) { return $this->isDayOfWeek($word); } switch ($word) { // @call is Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) case 'Utc': case 'UTC': return $this->utc; // @call is Check if the current instance has non-UTC timezone. case 'Local': return $this->local; // @call is Check if the current instance is a valid date. case 'Valid': return $this->year !== 0; // @call is Check if the current instance is in a daylight saving time. case 'DST': return $this->dst; } } $action = substr($unit, 0, 3); $overflow = null; if ($action === 'set') { $unit = strtolower(substr($unit, 3)); } if (\in_array($unit, static::$units, true)) { return $this->setUnit($unit, ...$parameters); } if ($action === 'add' || $action === 'sub') { $unit = substr($unit, 3); if (str_starts_with($unit, 'Real')) { $unit = static::singularUnit(substr($unit, 4)); return $this->{"{$action}RealUnit"}($unit, ...$parameters); } if (preg_match('/^(Month|Quarter|Year|Decade|Century|Centurie|Millennium|Millennia)s?(No|With|Without|WithNo)Overflow$/', $unit, $match)) { $unit = $match[1]; $overflow = $match[2] === 'With'; } $unit = static::singularUnit($unit); } if (static::isModifiableUnit($unit)) { return $this->{"{$action}Unit"}($unit, $this->getMagicParameter($parameters, 0, 'value', 1), $overflow); } $sixFirstLetters = substr($unit, 0, 6); $factor = -1; if ($sixFirstLetters === 'isLast') { $sixFirstLetters = 'isNext'; $factor = 1; } if ($sixFirstLetters === 'isNext') { $lowerUnit = strtolower(substr($unit, 6)); if (static::isModifiableUnit($lowerUnit)) { return $this->copy()->addUnit($lowerUnit, $factor, false)->isSameUnit($lowerUnit, ...$parameters); } } if ($sixFirstLetters === 'isSame') { try { return $this->isSameUnit(strtolower(substr($unit, 6)), ...$parameters); } catch (BadComparisonUnitException $exception) { // Try next } } if (str_starts_with($unit, 'isCurrent')) { try { return $this->isCurrentUnit(strtolower(substr($unit, 9))); } catch (BadComparisonUnitException | BadMethodCallException $exception) { // Try next } } if (str_ends_with($method, 'Until')) { try { $unit = static::singularUnit(substr($method, 0, -5)); return $this->range( $this->getMagicParameter($parameters, 0, 'endDate', $this), $this->getMagicParameter($parameters, 1, 'factor', 1), $unit ); } catch (InvalidArgumentException $exception) { // Try macros } } return static::bindMacroContext($this, function () use (&$method, &$parameters) { $macro = $this->getLocalMacro($method); if (!$macro) { foreach ([$this->localGenericMacros ?: [], static::getGenericMacros()] as $list) { foreach ($list as $callback) { try { return $this->executeCallable($callback, $method, ...$parameters); } catch (BadMethodCallException $exception) { continue; } } } if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { throw new UnknownMethodException($method); } return null; } return $this->executeCallable($macro, ...$parameters); }); } } PKgt[RI!I!Carbon/Traits/Serialization.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\Exceptions\InvalidFormatException; use ReturnTypeWillChange; use Throwable; /** * Trait Serialization. * * Serialization and JSON stuff. * * Depends on the following properties: * * @property int $year * @property int $month * @property int $daysInMonth * @property int $quarter * * Depends on the following methods: * * @method string|static locale(string $locale = null, string ...$fallbackLocales) * @method string toJSON() */ trait Serialization { use ObjectInitialisation; /** * The custom Carbon JSON serializer. * * @var callable|null */ protected static $serializer; /** * List of key to use for dump/serialization. * * @var string[] */ protected $dumpProperties = ['date', 'timezone_type', 'timezone']; /** * Locale to dump comes here before serialization. * * @var string|null */ protected $dumpLocale; /** * Embed date properties to dump in a dedicated variables so it won't overlap native * DateTime ones. * * @var array|null */ protected $dumpDateProperties; /** * Return a serialized string of the instance. * * @return string */ public function serialize() { return serialize($this); } /** * Create an instance from a serialized string. * * @param string $value * * @throws InvalidFormatException * * @return static */ public static function fromSerialized($value) { $instance = @unserialize((string) $value); if (!$instance instanceof static) { throw new InvalidFormatException("Invalid serialized value: $value"); } return $instance; } /** * The __set_state handler. * * @param string|array $dump * * @return static */ #[ReturnTypeWillChange] public static function __set_state($dump) { if (\is_string($dump)) { return static::parse($dump); } /** @var \DateTimeInterface $date */ $date = get_parent_class(static::class) && method_exists(parent::class, '__set_state') ? parent::__set_state((array) $dump) : (object) $dump; return static::instance($date); } /** * Returns the list of properties to dump on serialize() called on. * * Only used by PHP < 7.4. * * @return array */ public function __sleep() { $properties = $this->getSleepProperties(); if ($this->localTranslator ?? null) { $properties[] = 'dumpLocale'; $this->dumpLocale = $this->locale ?? null; } return $properties; } /** * Returns the values to dump on serialize() called on. * * Only used by PHP >= 7.4. * * @return array */ public function __serialize(): array { // @codeCoverageIgnoreStart if (isset($this->timezone_type, $this->timezone, $this->date)) { return [ 'date' => $this->date ?? null, 'timezone_type' => $this->timezone_type, 'timezone' => $this->timezone ?? null, ]; } // @codeCoverageIgnoreEnd $timezone = $this->getTimezone(); $export = [ 'date' => $this->format('Y-m-d H:i:s.u'), 'timezone_type' => $timezone->getType(), 'timezone' => $timezone->getName(), ]; // @codeCoverageIgnoreStart if (\extension_loaded('msgpack') && isset($this->constructedObjectId)) { $export['dumpDateProperties'] = [ 'date' => $this->format('Y-m-d H:i:s.u'), 'timezone' => serialize($this->timezone ?? null), ]; } // @codeCoverageIgnoreEnd if ($this->localTranslator ?? null) { $export['dumpLocale'] = $this->locale ?? null; } return $export; } /** * Set locale if specified on unserialize() called. * * Only used by PHP < 7.4. * * @return void */ #[ReturnTypeWillChange] public function __wakeup() { if (parent::class && method_exists(parent::class, '__wakeup')) { // @codeCoverageIgnoreStart try { parent::__wakeup(); } catch (Throwable $exception) { try { // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. ['date' => $date, 'timezone' => $timezone] = $this->dumpDateProperties; parent::__construct($date, unserialize($timezone)); } catch (Throwable $ignoredException) { throw $exception; } } // @codeCoverageIgnoreEnd } $this->constructedObjectId = spl_object_hash($this); if (isset($this->dumpLocale)) { $this->locale($this->dumpLocale); $this->dumpLocale = null; } $this->cleanupDumpProperties(); } /** * Set locale if specified on unserialize() called. * * Only used by PHP >= 7.4. * * @return void */ public function __unserialize(array $data): void { // @codeCoverageIgnoreStart try { $this->__construct($data['date'] ?? null, $data['timezone'] ?? null); } catch (Throwable $exception) { if (!isset($data['dumpDateProperties']['date'], $data['dumpDateProperties']['timezone'])) { throw $exception; } try { // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. ['date' => $date, 'timezone' => $timezone] = $data['dumpDateProperties']; $this->__construct($date, unserialize($timezone)); } catch (Throwable $ignoredException) { throw $exception; } } // @codeCoverageIgnoreEnd if (isset($data['dumpLocale'])) { $this->locale($data['dumpLocale']); } } /** * Prepare the object for JSON serialization. * * @return array|string */ #[ReturnTypeWillChange] public function jsonSerialize() { $serializer = $this->localSerializer ?? static::$serializer; if ($serializer) { return \is_string($serializer) ? $this->rawFormat($serializer) : $serializer($this); } return $this->toJSON(); } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather transform Carbon object before the serialization. * * JSON serialize all Carbon instances using the given callback. * * @param callable $callback * * @return void */ public static function serializeUsing($callback) { static::$serializer = $callback; } /** * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. * foreach ($date as $_) {} * serializer($date) * var_export($date) * get_object_vars($date) */ public function cleanupDumpProperties() { // @codeCoverageIgnoreStart if (PHP_VERSION < 8.2) { foreach ($this->dumpProperties as $property) { if (isset($this->$property)) { unset($this->$property); } } } // @codeCoverageIgnoreEnd return $this; } private function getSleepProperties(): array { $properties = $this->dumpProperties; // @codeCoverageIgnoreStart if (!\extension_loaded('msgpack')) { return $properties; } if (isset($this->constructedObjectId)) { $this->dumpDateProperties = [ 'date' => $this->format('Y-m-d H:i:s.u'), 'timezone' => serialize($this->timezone ?? null), ]; $properties[] = 'dumpDateProperties'; } return $properties; // @codeCoverageIgnoreEnd } } PKgt[w,,Carbon/Traits/Rounding.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\CarbonInterface; use Carbon\Exceptions\UnknownUnitException; /** * Trait Rounding. * * Round, ceil, floor units. * * Depends on the following methods: * * @method static copy() * @method static startOfWeek(int $weekStartsAt = null) */ trait Rounding { use IntervalRounding; /** * Round the current instance at the given unit with given precision if specified and the given function. * * @param string $unit * @param float|int $precision * @param string $function * * @return CarbonInterface */ public function roundUnit($unit, $precision = 1, $function = 'round') { $metaUnits = [ // @call roundUnit 'millennium' => [static::YEARS_PER_MILLENNIUM, 'year'], // @call roundUnit 'century' => [static::YEARS_PER_CENTURY, 'year'], // @call roundUnit 'decade' => [static::YEARS_PER_DECADE, 'year'], // @call roundUnit 'quarter' => [static::MONTHS_PER_QUARTER, 'month'], // @call roundUnit 'millisecond' => [1000, 'microsecond'], ]; $normalizedUnit = static::singularUnit($unit); $ranges = array_merge(static::getRangesByUnit($this->daysInMonth), [ // @call roundUnit 'microsecond' => [0, 999999], ]); $factor = 1; $initialMonth = $this->month; if ($normalizedUnit === 'week') { $normalizedUnit = 'day'; $precision *= static::DAYS_PER_WEEK; } if (isset($metaUnits[$normalizedUnit])) { [$factor, $normalizedUnit] = $metaUnits[$normalizedUnit]; } $precision *= $factor; if (!isset($ranges[$normalizedUnit])) { throw new UnknownUnitException($unit); } $found = false; $fraction = 0; $arguments = null; $initialValue = null; $factor = $this->year < 0 ? -1 : 1; $changes = []; $minimumInc = null; foreach ($ranges as $unit => [$minimum, $maximum]) { if ($normalizedUnit === $unit) { $arguments = [$this->$unit, $minimum]; $initialValue = $this->$unit; $fraction = $precision - floor($precision); $found = true; continue; } if ($found) { $delta = $maximum + 1 - $minimum; $factor /= $delta; $fraction *= $delta; $inc = ($this->$unit - $minimum) * $factor; if ($inc !== 0.0) { $minimumInc = $minimumInc ?? ($arguments[0] / pow(2, 52)); // If value is still the same when adding a non-zero increment/decrement, // it means precision got lost in the addition if (abs($inc) < $minimumInc) { $inc = $minimumInc * ($inc < 0 ? -1 : 1); } // If greater than $precision, assume precision loss caused an overflow if ($function !== 'floor' || abs($arguments[0] + $inc - $initialValue) >= $precision) { $arguments[0] += $inc; } } $changes[$unit] = round( $minimum + ($fraction ? $fraction * $function(($this->$unit - $minimum) / $fraction) : 0) ); // Cannot use modulo as it lose double precision while ($changes[$unit] >= $delta) { $changes[$unit] -= $delta; } $fraction -= floor($fraction); } } [$value, $minimum] = $arguments; $normalizedValue = floor($function(($value - $minimum) / $precision) * $precision + $minimum); /** @var CarbonInterface $result */ $result = $this->$normalizedUnit($normalizedValue); foreach ($changes as $unit => $value) { $result = $result->$unit($value); } return $normalizedUnit === 'month' && $precision <= 1 && abs($result->month - $initialMonth) === 2 // Re-run the change in case an overflow occurred ? $result->$normalizedUnit($normalizedValue) : $result; } /** * Truncate the current instance at the given unit with given precision if specified. * * @param string $unit * @param float|int $precision * * @return CarbonInterface */ public function floorUnit($unit, $precision = 1) { return $this->roundUnit($unit, $precision, 'floor'); } /** * Ceil the current instance at the given unit with given precision if specified. * * @param string $unit * @param float|int $precision * * @return CarbonInterface */ public function ceilUnit($unit, $precision = 1) { return $this->roundUnit($unit, $precision, 'ceil'); } /** * Round the current instance second with given precision if specified. * * @param float|int|string|\DateInterval|null $precision * @param string $function * * @return CarbonInterface */ public function round($precision = 1, $function = 'round') { return $this->roundWith($precision, $function); } /** * Round the current instance second with given precision if specified. * * @param float|int|string|\DateInterval|null $precision * * @return CarbonInterface */ public function floor($precision = 1) { return $this->round($precision, 'floor'); } /** * Ceil the current instance second with given precision if specified. * * @param float|int|string|\DateInterval|null $precision * * @return CarbonInterface */ public function ceil($precision = 1) { return $this->round($precision, 'ceil'); } /** * Round the current instance week. * * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week * * @return CarbonInterface */ public function roundWeek($weekStartsAt = null) { return $this->closest( $this->avoidMutation()->floorWeek($weekStartsAt), $this->avoidMutation()->ceilWeek($weekStartsAt) ); } /** * Truncate the current instance week. * * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week * * @return CarbonInterface */ public function floorWeek($weekStartsAt = null) { return $this->startOfWeek($weekStartsAt); } /** * Ceil the current instance week. * * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week * * @return CarbonInterface */ public function ceilWeek($weekStartsAt = null) { if ($this->isMutable()) { $startOfWeek = $this->avoidMutation()->startOfWeek($weekStartsAt); return $startOfWeek != $this ? $this->startOfWeek($weekStartsAt)->addWeek() : $this; } $startOfWeek = $this->startOfWeek($weekStartsAt); return $startOfWeek != $this ? $startOfWeek->addWeek() : $this->avoidMutation(); } } PKgt[BBCarbon/Traits/Cast.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\Exceptions\InvalidCastException; use DateTimeInterface; /** * Trait Cast. * * Utils to cast into an other class. */ trait Cast { /** * Cast the current instance into the given class. * * @param string $className The $className::instance() method will be called to cast the current object. * * @return DateTimeInterface */ public function cast(string $className) { if (!method_exists($className, 'instance')) { if (is_a($className, DateTimeInterface::class, true)) { return new $className($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); } throw new InvalidCastException("$className has not the instance() method needed to cast the date."); } return $className::instance($this); } } PKgt[P ] Carbon/Traits/MagicParameter.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; /** * Trait MagicParameter. * * Allows to retrieve parameter in magic calls by index or name. */ trait MagicParameter { private function getMagicParameter(array $parameters, int $index, string $key, $default) { if (\array_key_exists($index, $parameters)) { return $parameters[$index]; } if (\array_key_exists($key, $parameters)) { return $parameters[$key]; } return $default; } } PKgt[ rrCarbon/Traits/Localization.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\CarbonInterface; use Carbon\Exceptions\InvalidTypeException; use Carbon\Exceptions\NotLocaleAwareException; use Carbon\Language; use Carbon\Translator; use Carbon\TranslatorStrongTypeInterface; use Closure; use Symfony\Component\Translation\TranslatorBagInterface; use Symfony\Component\Translation\TranslatorInterface; use Symfony\Contracts\Translation\LocaleAwareInterface; use Symfony\Contracts\Translation\TranslatorInterface as ContractsTranslatorInterface; // @codeCoverageIgnoreStart if (interface_exists('Symfony\\Contracts\\Translation\\TranslatorInterface') && !interface_exists('Symfony\\Component\\Translation\\TranslatorInterface') ) { class_alias( 'Symfony\\Contracts\\Translation\\TranslatorInterface', 'Symfony\\Component\\Translation\\TranslatorInterface' ); } // @codeCoverageIgnoreEnd /** * Trait Localization. * * Embed default and locale translators and translation base methods. */ trait Localization { /** * Default translator. * * @var \Symfony\Component\Translation\TranslatorInterface */ protected static $translator; /** * Specific translator of the current instance. * * @var \Symfony\Component\Translation\TranslatorInterface */ protected $localTranslator; /** * Options for diffForHumans(). * * @var int */ protected static $humanDiffOptions = CarbonInterface::NO_ZERO_DIFF; /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @see settings * * @param int $humanDiffOptions */ public static function setHumanDiffOptions($humanDiffOptions) { static::$humanDiffOptions = $humanDiffOptions; } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @see settings * * @param int $humanDiffOption */ public static function enableHumanDiffOption($humanDiffOption) { static::$humanDiffOptions = static::getHumanDiffOptions() | $humanDiffOption; } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @see settings * * @param int $humanDiffOption */ public static function disableHumanDiffOption($humanDiffOption) { static::$humanDiffOptions = static::getHumanDiffOptions() & ~$humanDiffOption; } /** * Return default humanDiff() options (merged flags as integer). * * @return int */ public static function getHumanDiffOptions() { return static::$humanDiffOptions; } /** * Get the default translator instance in use. * * @return \Symfony\Component\Translation\TranslatorInterface */ public static function getTranslator() { return static::translator(); } /** * Set the default translator instance to use. * * @param \Symfony\Component\Translation\TranslatorInterface $translator * * @return void */ public static function setTranslator(TranslatorInterface $translator) { static::$translator = $translator; } /** * Return true if the current instance has its own translator. * * @return bool */ public function hasLocalTranslator() { return isset($this->localTranslator); } /** * Get the translator of the current instance or the default if none set. * * @return \Symfony\Component\Translation\TranslatorInterface */ public function getLocalTranslator() { return $this->localTranslator ?: static::translator(); } /** * Set the translator for the current instance. * * @param \Symfony\Component\Translation\TranslatorInterface $translator * * @return $this */ public function setLocalTranslator(TranslatorInterface $translator) { $this->localTranslator = $translator; return $this; } /** * Returns raw translation message for a given key. * * @param \Symfony\Component\Translation\TranslatorInterface $translator the translator to use * @param string $key key to find * @param string|null $locale current locale used if null * @param string|null $default default value if translation returns the key * * @return string */ public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) { if (!($translator instanceof TranslatorBagInterface && $translator instanceof TranslatorInterface)) { throw new InvalidTypeException( 'Translator does not implement '.TranslatorInterface::class.' and '.TranslatorBagInterface::class.'. '. (\is_object($translator) ? \get_class($translator) : \gettype($translator)).' has been given.' ); } if (!$locale && $translator instanceof LocaleAwareInterface) { $locale = $translator->getLocale(); } $result = self::getFromCatalogue($translator, $translator->getCatalogue($locale), $key); return $result === $key ? $default : $result; } /** * Returns raw translation message for a given key. * * @param string $key key to find * @param string|null $locale current locale used if null * @param string|null $default default value if translation returns the key * @param \Symfony\Component\Translation\TranslatorInterface $translator an optional translator to use * * @return string */ public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null) { return static::getTranslationMessageWith($translator ?: $this->getLocalTranslator(), $key, $locale, $default); } /** * Translate using translation string or callback available. * * @param \Symfony\Component\Translation\TranslatorInterface $translator * @param string $key * @param array $parameters * @param null $number * * @return string */ public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string { $message = static::getTranslationMessageWith($translator, $key, null, $key); if ($message instanceof Closure) { return (string) $message(...array_values($parameters)); } if ($number !== null) { $parameters['%count%'] = $number; } if (isset($parameters['%count%'])) { $parameters[':count'] = $parameters['%count%']; } // @codeCoverageIgnoreStart $choice = $translator instanceof ContractsTranslatorInterface ? $translator->trans($key, $parameters) : $translator->transChoice($key, $number, $parameters); // @codeCoverageIgnoreEnd return (string) $choice; } /** * Translate using translation string or callback available. * * @param string $key * @param array $parameters * @param string|int|float|null $number * @param \Symfony\Component\Translation\TranslatorInterface|null $translator * @param bool $altNumbers * * @return string */ public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string { $translation = static::translateWith($translator ?: $this->getLocalTranslator(), $key, $parameters, $number); if ($number !== null && $altNumbers) { return str_replace($number, $this->translateNumber($number), $translation); } return $translation; } /** * Returns the alternative number for a given integer if available in the current locale. * * @param int $number * * @return string */ public function translateNumber(int $number): string { $translateKey = "alt_numbers.$number"; $symbol = $this->translate($translateKey); if ($symbol !== $translateKey) { return $symbol; } if ($number > 99 && $this->translate('alt_numbers.99') !== 'alt_numbers.99') { $start = ''; foreach ([10000, 1000, 100] as $exp) { $key = "alt_numbers_pow.$exp"; if ($number >= $exp && $number < $exp * 10 && ($pow = $this->translate($key)) !== $key) { $unit = floor($number / $exp); $number -= $unit * $exp; $start .= ($unit > 1 ? $this->translate("alt_numbers.$unit") : '').$pow; } } $result = ''; while ($number) { $chunk = $number % 100; $result = $this->translate("alt_numbers.$chunk").$result; $number = floor($number / 100); } return "$start$result"; } if ($number > 9 && $this->translate('alt_numbers.9') !== 'alt_numbers.9') { $result = ''; while ($number) { $chunk = $number % 10; $result = $this->translate("alt_numbers.$chunk").$result; $number = floor($number / 10); } return $result; } return (string) $number; } /** * Translate a time string from a locale to an other. * * @param string $timeString date/time/duration string to translate (may also contain English) * @param string|null $from input locale of the $timeString parameter (`Carbon::getLocale()` by default) * @param string|null $to output locale of the result returned (`"en"` by default) * @param int $mode specify what to translate with options: * - CarbonInterface::TRANSLATE_ALL (default) * - CarbonInterface::TRANSLATE_MONTHS * - CarbonInterface::TRANSLATE_DAYS * - CarbonInterface::TRANSLATE_UNITS * - CarbonInterface::TRANSLATE_MERIDIEM * You can use pipe to group: CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS * * @return string */ public static function translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) { // Fallback source and destination locales $from = $from ?: static::getLocale(); $to = $to ?: 'en'; if ($from === $to) { return $timeString; } // Standardize apostrophe $timeString = strtr($timeString, ['’' => "'"]); $fromTranslations = []; $toTranslations = []; foreach (['from', 'to'] as $key) { $language = $$key; $translator = Translator::get($language); $translations = $translator->getMessages(); if (!isset($translations[$language])) { return $timeString; } $translationKey = $key.'Translations'; $messages = $translations[$language]; $months = $messages['months'] ?? []; $weekdays = $messages['weekdays'] ?? []; $meridiem = $messages['meridiem'] ?? ['AM', 'PM']; if (isset($messages['ordinal_words'])) { $timeString = self::replaceOrdinalWords( $timeString, $key === 'from' ? array_flip($messages['ordinal_words']) : $messages['ordinal_words'] ); } if ($key === 'from') { foreach (['months', 'weekdays'] as $variable) { $list = $messages[$variable.'_standalone'] ?? null; if ($list) { foreach ($$variable as $index => &$name) { $name .= '|'.$messages[$variable.'_standalone'][$index]; } } } } $$translationKey = array_merge( $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($months, 12, $timeString) : [], $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($messages['months_short'] ?? [], 12, $timeString) : [], $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($weekdays, 7, $timeString) : [], $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($messages['weekdays_short'] ?? [], 7, $timeString) : [], $mode & CarbonInterface::TRANSLATE_DIFF ? static::translateWordsByKeys([ 'diff_now', 'diff_today', 'diff_yesterday', 'diff_tomorrow', 'diff_before_yesterday', 'diff_after_tomorrow', ], $messages, $key) : [], $mode & CarbonInterface::TRANSLATE_UNITS ? static::translateWordsByKeys([ 'year', 'month', 'week', 'day', 'hour', 'minute', 'second', ], $messages, $key) : [], $mode & CarbonInterface::TRANSLATE_MERIDIEM ? array_map(function ($hour) use ($meridiem) { if (\is_array($meridiem)) { return $meridiem[$hour < 12 ? 0 : 1]; } return $meridiem($hour, 0, false); }, range(0, 23)) : [] ); } return substr(preg_replace_callback('/(?<=[\d\s+.\/,_-])('.implode('|', $fromTranslations).')(?=[\d\s+.\/,_-])/iu', function ($match) use ($fromTranslations, $toTranslations) { [$chunk] = $match; foreach ($fromTranslations as $index => $word) { if (preg_match("/^$word\$/iu", $chunk)) { return $toTranslations[$index] ?? ''; } } return $chunk; // @codeCoverageIgnore }, " $timeString "), 1, -1); } /** * Translate a time string from the current locale (`$date->locale()`) to an other. * * @param string $timeString time string to translate * @param string|null $to output locale of the result returned ("en" by default) * * @return string */ public function translateTimeStringTo($timeString, $to = null) { return static::translateTimeString($timeString, $this->getTranslatorLocale(), $to); } /** * Get/set the locale for the current instance. * * @param string|null $locale * @param string ...$fallbackLocales * * @return $this|string */ public function locale(string $locale = null, ...$fallbackLocales) { if ($locale === null) { return $this->getTranslatorLocale(); } if (!$this->localTranslator || $this->getTranslatorLocale($this->localTranslator) !== $locale) { $translator = Translator::get($locale); if (!empty($fallbackLocales)) { $translator->setFallbackLocales($fallbackLocales); foreach ($fallbackLocales as $fallbackLocale) { $messages = Translator::get($fallbackLocale)->getMessages(); if (isset($messages[$fallbackLocale])) { $translator->setMessages($fallbackLocale, $messages[$fallbackLocale]); } } } $this->localTranslator = $translator; } return $this; } /** * Get the current translator locale. * * @return string */ public static function getLocale() { return static::getLocaleAwareTranslator()->getLocale(); } /** * Set the current translator locale and indicate if the source locale file exists. * Pass 'auto' as locale to use closest language from the current LC_TIME locale. * * @param string $locale locale ex. en * * @return bool */ public static function setLocale($locale) { return static::getLocaleAwareTranslator()->setLocale($locale) !== false; } /** * Set the fallback locale. * * @see https://symfony.com/doc/current/components/translation.html#fallback-locales * * @param string $locale */ public static function setFallbackLocale($locale) { $translator = static::getTranslator(); if (method_exists($translator, 'setFallbackLocales')) { $translator->setFallbackLocales([$locale]); if ($translator instanceof Translator) { $preferredLocale = $translator->getLocale(); $translator->setMessages($preferredLocale, array_replace_recursive( $translator->getMessages()[$locale] ?? [], Translator::get($locale)->getMessages()[$locale] ?? [], $translator->getMessages($preferredLocale) )); } } } /** * Get the fallback locale. * * @see https://symfony.com/doc/current/components/translation.html#fallback-locales * * @return string|null */ public static function getFallbackLocale() { $translator = static::getTranslator(); if (method_exists($translator, 'getFallbackLocales')) { return $translator->getFallbackLocales()[0] ?? null; } return null; } /** * Set the current locale to the given, execute the passed function, reset the locale to previous one, * then return the result of the closure (or null if the closure was void). * * @param string $locale locale ex. en * @param callable $func * * @return mixed */ public static function executeWithLocale($locale, $func) { $currentLocale = static::getLocale(); $result = $func(static::setLocale($locale) ? static::getLocale() : false, static::translator()); static::setLocale($currentLocale); return $result; } /** * Returns true if the given locale is internally supported and has short-units support. * Support is considered enabled if either year, day or hour has a short variant translated. * * @param string $locale locale ex. en * * @return bool */ public static function localeHasShortUnits($locale) { return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { return ($newLocale && (($y = static::translateWith($translator, 'y')) !== 'y' && $y !== static::translateWith($translator, 'year'))) || ( ($y = static::translateWith($translator, 'd')) !== 'd' && $y !== static::translateWith($translator, 'day') ) || ( ($y = static::translateWith($translator, 'h')) !== 'h' && $y !== static::translateWith($translator, 'hour') ); }); } /** * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). * Support is considered enabled if the 4 sentences are translated in the given locale. * * @param string $locale locale ex. en * * @return bool */ public static function localeHasDiffSyntax($locale) { return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { if (!$newLocale) { return false; } foreach (['ago', 'from_now', 'before', 'after'] as $key) { if ($translator instanceof TranslatorBagInterface && self::getFromCatalogue($translator, $translator->getCatalogue($newLocale), $key) instanceof Closure ) { continue; } if ($translator->trans($key) === $key) { return false; } } return true; }); } /** * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). * Support is considered enabled if the 3 words are translated in the given locale. * * @param string $locale locale ex. en * * @return bool */ public static function localeHasDiffOneDayWords($locale) { return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { return $newLocale && $translator->trans('diff_now') !== 'diff_now' && $translator->trans('diff_yesterday') !== 'diff_yesterday' && $translator->trans('diff_tomorrow') !== 'diff_tomorrow'; }); } /** * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). * Support is considered enabled if the 2 words are translated in the given locale. * * @param string $locale locale ex. en * * @return bool */ public static function localeHasDiffTwoDayWords($locale) { return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { return $newLocale && $translator->trans('diff_before_yesterday') !== 'diff_before_yesterday' && $translator->trans('diff_after_tomorrow') !== 'diff_after_tomorrow'; }); } /** * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). * Support is considered enabled if the 4 sentences are translated in the given locale. * * @param string $locale locale ex. en * * @return bool */ public static function localeHasPeriodSyntax($locale) { return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { return $newLocale && $translator->trans('period_recurrences') !== 'period_recurrences' && $translator->trans('period_interval') !== 'period_interval' && $translator->trans('period_start_date') !== 'period_start_date' && $translator->trans('period_end_date') !== 'period_end_date'; }); } /** * Returns the list of internally available locales and already loaded custom locales. * (It will ignore custom translator dynamic loading.) * * @return array */ public static function getAvailableLocales() { $translator = static::getLocaleAwareTranslator(); return $translator instanceof Translator ? $translator->getAvailableLocales() : [$translator->getLocale()]; } /** * Returns list of Language object for each available locale. This object allow you to get the ISO name, native * name, region and variant of the locale. * * @return Language[] */ public static function getAvailableLocalesInfo() { $languages = []; foreach (static::getAvailableLocales() as $id) { $languages[$id] = new Language($id); } return $languages; } /** * Initialize the default translator instance if necessary. * * @return \Symfony\Component\Translation\TranslatorInterface */ protected static function translator() { if (static::$translator === null) { static::$translator = Translator::get(); } return static::$translator; } /** * Get the locale of a given translator. * * If null or omitted, current local translator is used. * If no local translator is in use, current global translator is used. * * @param null $translator * * @return string|null */ protected function getTranslatorLocale($translator = null): ?string { if (\func_num_args() === 0) { $translator = $this->getLocalTranslator(); } $translator = static::getLocaleAwareTranslator($translator); return $translator ? $translator->getLocale() : null; } /** * Throw an error if passed object is not LocaleAwareInterface. * * @param LocaleAwareInterface|null $translator * * @return LocaleAwareInterface|null */ protected static function getLocaleAwareTranslator($translator = null) { if (\func_num_args() === 0) { $translator = static::translator(); } if ($translator && !($translator instanceof LocaleAwareInterface || method_exists($translator, 'getLocale'))) { throw new NotLocaleAwareException($translator); // @codeCoverageIgnore } return $translator; } /** * @param mixed $translator * @param \Symfony\Component\Translation\MessageCatalogueInterface $catalogue * * @return mixed */ private static function getFromCatalogue($translator, $catalogue, string $id, string $domain = 'messages') { return $translator instanceof TranslatorStrongTypeInterface ? $translator->getFromCatalogue($catalogue, $id, $domain) // @codeCoverageIgnore : $catalogue->get($id, $domain); } /** * Return the word cleaned from its translation codes. * * @param string $word * * @return string */ private static function cleanWordFromTranslationString($word) { $word = str_replace([':count', '%count', ':time'], '', $word); $word = strtr($word, ['’' => "'"]); $word = preg_replace('/({\d+(,(\d+|Inf))?}|[\[\]]\d+(,(\d+|Inf))?[\[\]])/', '', $word); return trim($word); } /** * Translate a list of words. * * @param string[] $keys keys to translate. * @param string[] $messages messages bag handling translations. * @param string $key 'to' (to get the translation) or 'from' (to get the detection RegExp pattern). * * @return string[] */ private static function translateWordsByKeys($keys, $messages, $key): array { return array_map(function ($wordKey) use ($messages, $key) { $message = $key === 'from' && isset($messages[$wordKey.'_regexp']) ? $messages[$wordKey.'_regexp'] : ($messages[$wordKey] ?? null); if (!$message) { return '>>DO NOT REPLACE<<'; } $parts = explode('|', $message); return $key === 'to' ? self::cleanWordFromTranslationString(end($parts)) : '(?:'.implode('|', array_map([static::class, 'cleanWordFromTranslationString'], $parts)).')'; }, $keys); } /** * Get an array of translations based on the current date. * * @param callable $translation * @param int $length * @param string $timeString * * @return string[] */ private static function getTranslationArray($translation, $length, $timeString): array { $filler = '>>DO NOT REPLACE<<'; if (\is_array($translation)) { return array_pad($translation, $length, $filler); } $list = []; $date = static::now(); for ($i = 0; $i < $length; $i++) { $list[] = $translation($date, $timeString, $i) ?? $filler; } return $list; } private static function replaceOrdinalWords(string $timeString, array $ordinalWords): string { return preg_replace_callback('/(? * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\CarbonInterface; use Carbon\CarbonTimeZone; use Closure; use DateTimeImmutable; use DateTimeInterface; use InvalidArgumentException; use Throwable; trait Test { /////////////////////////////////////////////////////////////////// ///////////////////////// TESTING AIDS //////////////////////////// /////////////////////////////////////////////////////////////////// /** * A test Carbon instance to be returned when now instances are created. * * @var Closure|static|null */ protected static $testNow; /** * The timezone to resto to when clearing the time mock. * * @var string|null */ protected static $testDefaultTimezone; /** * Set a Carbon instance (real or mock) to be returned when a "now" * instance is created. The provided instance will be returned * specifically under the following conditions: * - A call to the static now() method, ex. Carbon::now() * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') * - When a string containing the desired time is passed to Carbon::parse(). * * Note the timezone parameter was left out of the examples above and * has no affect as the mock value will be returned regardless of its value. * * Only the moment is mocked with setTestNow(), the timezone will still be the one passed * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). * * To clear the test instance call this method using the default * parameter of null. * * /!\ Use this method for unit tests only. * * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance */ public static function setTestNow($testNow = null) { static::$testNow = $testNow instanceof self || $testNow instanceof Closure ? $testNow : static::make($testNow); } /** * Set a Carbon instance (real or mock) to be returned when a "now" * instance is created. The provided instance will be returned * specifically under the following conditions: * - A call to the static now() method, ex. Carbon::now() * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') * - When a string containing the desired time is passed to Carbon::parse(). * * It will also align default timezone (e.g. call date_default_timezone_set()) with * the second argument or if null, with the timezone of the given date object. * * To clear the test instance call this method using the default * parameter of null. * * /!\ Use this method for unit tests only. * * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance */ public static function setTestNowAndTimezone($testNow = null, $tz = null) { if ($testNow) { self::$testDefaultTimezone = self::$testDefaultTimezone ?? date_default_timezone_get(); } $useDateInstanceTimezone = $testNow instanceof DateTimeInterface; if ($useDateInstanceTimezone) { self::setDefaultTimezone($testNow->getTimezone()->getName(), $testNow); } static::setTestNow($testNow); if (!$useDateInstanceTimezone) { $now = static::getMockedTestNow(\func_num_args() === 1 ? null : $tz); $tzName = $now ? $now->tzName : null; self::setDefaultTimezone($tzName ?? self::$testDefaultTimezone ?? 'UTC', $now); } if (!$testNow) { self::$testDefaultTimezone = null; } } /** * Temporarily sets a static date to be used within the callback. * Using setTestNow to set the date, executing the callback, then * clearing the test instance. * * /!\ Use this method for unit tests only. * * @template T * * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance * @param Closure(): T $callback * * @return mixed * @phpstan-return T */ public static function withTestNow($testNow, $callback) { static::setTestNow($testNow); try { $result = $callback(); } finally { static::setTestNow(); } return $result; } /** * Get the Carbon instance (real or mock) to be returned when a "now" * instance is created. * * @return Closure|static the current instance used for testing */ public static function getTestNow() { return static::$testNow; } /** * Determine if there is a valid test instance set. A valid test instance * is anything that is not null. * * @return bool true if there is a test instance, otherwise false */ public static function hasTestNow() { return static::getTestNow() !== null; } /** * Get the mocked date passed in setTestNow() and if it's a Closure, execute it. * * @param string|\DateTimeZone $tz * * @return \Carbon\CarbonImmutable|\Carbon\Carbon|null */ protected static function getMockedTestNow($tz) { $testNow = static::getTestNow(); if ($testNow instanceof Closure) { $realNow = new DateTimeImmutable('now'); $testNow = $testNow(static::parse( $realNow->format('Y-m-d H:i:s.u'), $tz ?: $realNow->getTimezone() )); } /* @var \Carbon\CarbonImmutable|\Carbon\Carbon|null $testNow */ return $testNow instanceof CarbonInterface ? $testNow->avoidMutation()->tz($tz) : $testNow; } protected static function mockConstructorParameters(&$time, $tz) { /** @var \Carbon\CarbonImmutable|\Carbon\Carbon $testInstance */ $testInstance = clone static::getMockedTestNow($tz); if (static::hasRelativeKeywords($time)) { $testInstance = $testInstance->modify($time); } $time = $testInstance instanceof self ? $testInstance->rawFormat(static::MOCK_DATETIME_FORMAT) : $testInstance->format(static::MOCK_DATETIME_FORMAT); } private static function setDefaultTimezone($timezone, DateTimeInterface $date = null) { $previous = null; $success = false; try { $success = date_default_timezone_set($timezone); } catch (Throwable $exception) { $previous = $exception; } if (!$success) { $suggestion = @CarbonTimeZone::create($timezone)->toRegionName($date); throw new InvalidArgumentException( "Timezone ID '$timezone' is invalid". ($suggestion && $suggestion !== $timezone ? ", did you mean '$suggestion'?" : '.')."\n". "It must be one of the IDs from DateTimeZone::listIdentifiers(),\n". 'For the record, hours/minutes offset are relevant only for a particular moment, '. 'but not as a default timezone.', 0, $previous ); } } } PKgt[-c&Carbon/Traits/ObjectInitialisation.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; trait ObjectInitialisation { /** * True when parent::__construct has been called. * * @var string */ protected $constructedObjectId; } PKgt[C! Carbon/Traits/ToStringFormat.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Closure; /** * Trait ToStringFormat. * * Handle global format customization for string cast of the object. */ trait ToStringFormat { /** * Format to use for __toString method when type juggling occurs. * * @var string|Closure|null */ protected static $toStringFormat; /** * Reset the format used to the default when type juggling a Carbon instance to a string * * @return void */ public static function resetToStringFormat() { static::setToStringFormat(null); } /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and * use other method or custom format passed to format() method if you need to dump another string * format. * * Set the default format used when type juggling a Carbon instance to a string. * * @param string|Closure|null $format * * @return void */ public static function setToStringFormat($format) { static::$toStringFormat = $format; } } PKgt[[uCarbon/Traits/Mixin.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\CarbonInterface; use Carbon\CarbonInterval; use Carbon\CarbonPeriod; use Closure; use Generator; use ReflectionClass; use ReflectionException; use ReflectionMethod; use Throwable; /** * Trait Mixin. * * Allows mixing in entire classes with multiple macros. */ trait Mixin { /** * Stack of macro instance contexts. * * @var array */ protected static $macroContextStack = []; /** * Mix another object into the class. * * @example * ``` * Carbon::mixin(new class { * public function addMoon() { * return function () { * return $this->addDays(30); * }; * } * public function subMoon() { * return function () { * return $this->subDays(30); * }; * } * }); * $fullMoon = Carbon::create('2018-12-22'); * $nextFullMoon = $fullMoon->addMoon(); * $blackMoon = Carbon::create('2019-01-06'); * $previousBlackMoon = $blackMoon->subMoon(); * echo "$nextFullMoon\n"; * echo "$previousBlackMoon\n"; * ``` * * @param object|string $mixin * * @throws ReflectionException * * @return void */ public static function mixin($mixin) { \is_string($mixin) && trait_exists($mixin) ? self::loadMixinTrait($mixin) : self::loadMixinClass($mixin); } /** * @param object|string $mixin * * @throws ReflectionException */ private static function loadMixinClass($mixin) { $methods = (new ReflectionClass($mixin))->getMethods( ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED ); foreach ($methods as $method) { if ($method->isConstructor() || $method->isDestructor()) { continue; } $method->setAccessible(true); static::macro($method->name, $method->invoke($mixin)); } } /** * @param string $trait */ private static function loadMixinTrait($trait) { $context = eval(self::getAnonymousClassCodeForTrait($trait)); $className = \get_class($context); $baseClass = static::class; foreach (self::getMixableMethods($context) as $name) { $closureBase = Closure::fromCallable([$context, $name]); static::macro($name, function (...$parameters) use ($closureBase, $className, $baseClass) { $downContext = isset($this) ? ($this) : new $baseClass(); $context = isset($this) ? $this->cast($className) : new $className(); try { // @ is required to handle error if not converted into exceptions $closure = @$closureBase->bindTo($context); } catch (Throwable $throwable) { // @codeCoverageIgnore $closure = $closureBase; // @codeCoverageIgnore } // in case of errors not converted into exceptions $closure = $closure ?: $closureBase; $result = $closure(...$parameters); if (!($result instanceof $className)) { return $result; } if ($downContext instanceof CarbonInterface && $result instanceof CarbonInterface) { if ($context !== $result) { $downContext = $downContext->copy(); } return $downContext ->setTimezone($result->getTimezone()) ->modify($result->format('Y-m-d H:i:s.u')) ->settings($result->getSettings()); } if ($downContext instanceof CarbonInterval && $result instanceof CarbonInterval) { if ($context !== $result) { $downContext = $downContext->copy(); } $downContext->copyProperties($result); self::copyStep($downContext, $result); self::copyNegativeUnits($downContext, $result); return $downContext->settings($result->getSettings()); } if ($downContext instanceof CarbonPeriod && $result instanceof CarbonPeriod) { if ($context !== $result) { $downContext = $downContext->copy(); } return $downContext ->setDates($result->getStartDate(), $result->getEndDate()) ->setRecurrences($result->getRecurrences()) ->setOptions($result->getOptions()) ->settings($result->getSettings()); } return $result; }); } } private static function getAnonymousClassCodeForTrait(string $trait) { return 'return new class() extends '.static::class.' {use '.$trait.';};'; } private static function getMixableMethods(self $context): Generator { foreach (get_class_methods($context) as $name) { if (method_exists(static::class, $name)) { continue; } yield $name; } } /** * Stack a Carbon context from inside calls of self::this() and execute a given action. * * @param static|null $context * @param callable $callable * * @throws Throwable * * @return mixed */ protected static function bindMacroContext($context, callable $callable) { static::$macroContextStack[] = $context; try { return $callable(); } finally { array_pop(static::$macroContextStack); } } /** * Return the current context from inside a macro callee or a null if static. * * @return static|null */ protected static function context() { return end(static::$macroContextStack) ?: null; } /** * Return the current context from inside a macro callee or a new one if static. * * @return static */ protected static function this() { return end(static::$macroContextStack) ?: new static(); } } PKgt[F 9Z;Z;Carbon/Traits/Converter.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\Carbon; use Carbon\CarbonImmutable; use Carbon\CarbonInterface; use Carbon\CarbonInterval; use Carbon\CarbonPeriod; use Carbon\CarbonPeriodImmutable; use Carbon\Exceptions\UnitException; use Closure; use DateTime; use DateTimeImmutable; use ReturnTypeWillChange; /** * Trait Converter. * * Change date into different string formats and types and * handle the string cast. * * Depends on the following methods: * * @method static copy() */ trait Converter { use ToStringFormat; /** * Returns the formatted date string on success or FALSE on failure. * * @see https://php.net/manual/en/datetime.format.php * * @param string $format * * @return string */ #[ReturnTypeWillChange] public function format($format) { $function = $this->localFormatFunction ?: static::$formatFunction; if (!$function) { return $this->rawFormat($format); } if (\is_string($function) && method_exists($this, $function)) { $function = [$this, $function]; } return $function(...\func_get_args()); } /** * @see https://php.net/manual/en/datetime.format.php * * @param string $format * * @return string */ public function rawFormat($format) { return parent::format($format); } /** * Format the instance as a string using the set format * * @example * ``` * echo Carbon::now(); // Carbon instances can be cast to string * ``` * * @return string */ public function __toString() { $format = $this->localToStringFormat ?? static::$toStringFormat; return $format instanceof Closure ? $format($this) : $this->rawFormat($format ?: ( \defined('static::DEFAULT_TO_STRING_FORMAT') ? static::DEFAULT_TO_STRING_FORMAT : CarbonInterface::DEFAULT_TO_STRING_FORMAT )); } /** * Format the instance as date * * @example * ``` * echo Carbon::now()->toDateString(); * ``` * * @return string */ public function toDateString() { return $this->rawFormat('Y-m-d'); } /** * Format the instance as a readable date * * @example * ``` * echo Carbon::now()->toFormattedDateString(); * ``` * * @return string */ public function toFormattedDateString() { return $this->rawFormat('M j, Y'); } /** * Format the instance with the day, and a readable date * * @example * ``` * echo Carbon::now()->toFormattedDayDateString(); * ``` * * @return string */ public function toFormattedDayDateString(): string { return $this->rawFormat('D, M j, Y'); } /** * Format the instance as time * * @example * ``` * echo Carbon::now()->toTimeString(); * ``` * * @param string $unitPrecision * * @return string */ public function toTimeString($unitPrecision = 'second') { return $this->rawFormat(static::getTimeFormatByPrecision($unitPrecision)); } /** * Format the instance as date and time * * @example * ``` * echo Carbon::now()->toDateTimeString(); * ``` * * @param string $unitPrecision * * @return string */ public function toDateTimeString($unitPrecision = 'second') { return $this->rawFormat('Y-m-d '.static::getTimeFormatByPrecision($unitPrecision)); } /** * Return a format from H:i to H:i:s.u according to given unit precision. * * @param string $unitPrecision "minute", "second", "millisecond" or "microsecond" * * @return string */ public static function getTimeFormatByPrecision($unitPrecision) { switch (static::singularUnit($unitPrecision)) { case 'minute': return 'H:i'; case 'second': return 'H:i:s'; case 'm': case 'millisecond': return 'H:i:s.v'; case 'µ': case 'microsecond': return 'H:i:s.u'; } throw new UnitException('Precision unit expected among: minute, second, millisecond and microsecond.'); } /** * Format the instance as date and time T-separated with no timezone * * @example * ``` * echo Carbon::now()->toDateTimeLocalString(); * echo "\n"; * echo Carbon::now()->toDateTimeLocalString('minute'); // You can specify precision among: minute, second, millisecond and microsecond * ``` * * @param string $unitPrecision * * @return string */ public function toDateTimeLocalString($unitPrecision = 'second') { return $this->rawFormat('Y-m-d\T'.static::getTimeFormatByPrecision($unitPrecision)); } /** * Format the instance with day, date and time * * @example * ``` * echo Carbon::now()->toDayDateTimeString(); * ``` * * @return string */ public function toDayDateTimeString() { return $this->rawFormat('D, M j, Y g:i A'); } /** * Format the instance as ATOM * * @example * ``` * echo Carbon::now()->toAtomString(); * ``` * * @return string */ public function toAtomString() { return $this->rawFormat(DateTime::ATOM); } /** * Format the instance as COOKIE * * @example * ``` * echo Carbon::now()->toCookieString(); * ``` * * @return string */ public function toCookieString() { return $this->rawFormat(DateTime::COOKIE); } /** * Format the instance as ISO8601 * * @example * ``` * echo Carbon::now()->toIso8601String(); * ``` * * @return string */ public function toIso8601String() { return $this->toAtomString(); } /** * Format the instance as RFC822 * * @example * ``` * echo Carbon::now()->toRfc822String(); * ``` * * @return string */ public function toRfc822String() { return $this->rawFormat(DateTime::RFC822); } /** * Convert the instance to UTC and return as Zulu ISO8601 * * @example * ``` * echo Carbon::now()->toIso8601ZuluString(); * ``` * * @param string $unitPrecision * * @return string */ public function toIso8601ZuluString($unitPrecision = 'second') { return $this->avoidMutation() ->utc() ->rawFormat('Y-m-d\T'.static::getTimeFormatByPrecision($unitPrecision).'\Z'); } /** * Format the instance as RFC850 * * @example * ``` * echo Carbon::now()->toRfc850String(); * ``` * * @return string */ public function toRfc850String() { return $this->rawFormat(DateTime::RFC850); } /** * Format the instance as RFC1036 * * @example * ``` * echo Carbon::now()->toRfc1036String(); * ``` * * @return string */ public function toRfc1036String() { return $this->rawFormat(DateTime::RFC1036); } /** * Format the instance as RFC1123 * * @example * ``` * echo Carbon::now()->toRfc1123String(); * ``` * * @return string */ public function toRfc1123String() { return $this->rawFormat(DateTime::RFC1123); } /** * Format the instance as RFC2822 * * @example * ``` * echo Carbon::now()->toRfc2822String(); * ``` * * @return string */ public function toRfc2822String() { return $this->rawFormat(DateTime::RFC2822); } /** * Format the instance as RFC3339 * * @param bool $extended * * @example * ``` * echo Carbon::now()->toRfc3339String() . "\n"; * echo Carbon::now()->toRfc3339String(true) . "\n"; * ``` * * @return string */ public function toRfc3339String($extended = false) { $format = DateTime::RFC3339; if ($extended) { $format = DateTime::RFC3339_EXTENDED; } return $this->rawFormat($format); } /** * Format the instance as RSS * * @example * ``` * echo Carbon::now()->toRssString(); * ``` * * @return string */ public function toRssString() { return $this->rawFormat(DateTime::RSS); } /** * Format the instance as W3C * * @example * ``` * echo Carbon::now()->toW3cString(); * ``` * * @return string */ public function toW3cString() { return $this->rawFormat(DateTime::W3C); } /** * Format the instance as RFC7231 * * @example * ``` * echo Carbon::now()->toRfc7231String(); * ``` * * @return string */ public function toRfc7231String() { return $this->avoidMutation() ->setTimezone('GMT') ->rawFormat(\defined('static::RFC7231_FORMAT') ? static::RFC7231_FORMAT : CarbonInterface::RFC7231_FORMAT); } /** * Get default array representation. * * @example * ``` * var_dump(Carbon::now()->toArray()); * ``` * * @return array */ public function toArray() { return [ 'year' => $this->year, 'month' => $this->month, 'day' => $this->day, 'dayOfWeek' => $this->dayOfWeek, 'dayOfYear' => $this->dayOfYear, 'hour' => $this->hour, 'minute' => $this->minute, 'second' => $this->second, 'micro' => $this->micro, 'timestamp' => $this->timestamp, 'formatted' => $this->rawFormat(\defined('static::DEFAULT_TO_STRING_FORMAT') ? static::DEFAULT_TO_STRING_FORMAT : CarbonInterface::DEFAULT_TO_STRING_FORMAT), 'timezone' => $this->timezone, ]; } /** * Get default object representation. * * @example * ``` * var_dump(Carbon::now()->toObject()); * ``` * * @return object */ public function toObject() { return (object) $this->toArray(); } /** * Returns english human readable complete date string. * * @example * ``` * echo Carbon::now()->toString(); * ``` * * @return string */ public function toString() { return $this->avoidMutation()->locale('en')->isoFormat('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); } /** * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept: * 1977-04-22T01:00:00-05:00). * * @example * ``` * echo Carbon::now('America/Toronto')->toISOString() . "\n"; * echo Carbon::now('America/Toronto')->toISOString(true) . "\n"; * ``` * * @param bool $keepOffset Pass true to keep the date offset. Else forced to UTC. * * @return null|string */ public function toISOString($keepOffset = false) { if (!$this->isValid()) { return null; } $yearFormat = $this->year < 0 || $this->year > 9999 ? 'YYYYYY' : 'YYYY'; $tzFormat = $keepOffset ? 'Z' : '[Z]'; $date = $keepOffset ? $this : $this->avoidMutation()->utc(); return $date->isoFormat("$yearFormat-MM-DD[T]HH:mm:ss.SSSSSS$tzFormat"); } /** * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z) with UTC timezone. * * @example * ``` * echo Carbon::now('America/Toronto')->toJSON(); * ``` * * @return null|string */ public function toJSON() { return $this->toISOString(); } /** * Return native DateTime PHP object matching the current instance. * * @example * ``` * var_dump(Carbon::now()->toDateTime()); * ``` * * @return DateTime */ public function toDateTime() { return new DateTime($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); } /** * Return native toDateTimeImmutable PHP object matching the current instance. * * @example * ``` * var_dump(Carbon::now()->toDateTimeImmutable()); * ``` * * @return DateTimeImmutable */ public function toDateTimeImmutable() { return new DateTimeImmutable($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); } /** * @alias toDateTime * * Return native DateTime PHP object matching the current instance. * * @example * ``` * var_dump(Carbon::now()->toDate()); * ``` * * @return DateTime */ public function toDate() { return $this->toDateTime(); } /** * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). * * @param \DateTimeInterface|Carbon|CarbonImmutable|int|null $end period end date or recurrences count if int * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit * @param string|null $unit if specified, $interval must be an integer * * @return CarbonPeriod */ public function toPeriod($end = null, $interval = null, $unit = null) { if ($unit) { $interval = CarbonInterval::make("$interval ".static::pluralUnit($unit)); } $period = ($this->isMutable() ? new CarbonPeriod() : new CarbonPeriodImmutable()) ->setDateClass(static::class) ->setStartDate($this); if ($interval) { $period = $period->setDateInterval($interval); } if (\is_int($end) || (\is_string($end) && ctype_digit($end))) { $period = $period->setRecurrences($end); } elseif ($end) { $period = $period->setEndDate($end); } return $period; } /** * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). * * @param \DateTimeInterface|Carbon|CarbonImmutable|null $end period end date * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit * @param string|null $unit if specified, $interval must be an integer * * @return CarbonPeriod */ public function range($end = null, $interval = null, $unit = null) { return $this->toPeriod($end, $interval, $unit); } } PKgt[1V`zzCarbon/Traits/Creator.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\Carbon; use Carbon\CarbonImmutable; use Carbon\CarbonInterface; use Carbon\Exceptions\InvalidDateException; use Carbon\Exceptions\InvalidFormatException; use Carbon\Exceptions\OutOfRangeException; use Carbon\Translator; use Closure; use DateMalformedStringException; use DateTimeImmutable; use DateTimeInterface; use DateTimeZone; use Exception; use ReturnTypeWillChange; /** * Trait Creator. * * Static creators. * * Depends on the following methods: * * @method static Carbon|CarbonImmutable getTestNow() */ trait Creator { use ObjectInitialisation; /** * The errors that can occur. * * @var array */ protected static $lastErrors; /** * Create a new Carbon instance. * * Please see the testing aids section (specifically static::setTestNow()) * for more on the possibility of this constructor returning a test instance. * * @param DateTimeInterface|string|null $time * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException */ public function __construct($time = null, $tz = null) { if ($time instanceof DateTimeInterface) { $time = $this->constructTimezoneFromDateTime($time, $tz)->format('Y-m-d H:i:s.u'); } if (is_numeric($time) && (!\is_string($time) || !preg_match('/^\d{1,14}$/', $time))) { $time = static::createFromTimestampUTC($time)->format('Y-m-d\TH:i:s.uP'); } // If the class has a test now set and we are trying to create a now() // instance then override as required $isNow = empty($time) || $time === 'now'; if (method_exists(static::class, 'hasTestNow') && method_exists(static::class, 'getTestNow') && static::hasTestNow() && ($isNow || static::hasRelativeKeywords($time)) ) { static::mockConstructorParameters($time, $tz); } // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127 if (!str_contains((string) .1, '.')) { $locale = setlocale(LC_NUMERIC, '0'); // @codeCoverageIgnore setlocale(LC_NUMERIC, 'C'); // @codeCoverageIgnore } try { parent::__construct($time ?: 'now', static::safeCreateDateTimeZone($tz) ?: null); } catch (Exception $exception) { throw new InvalidFormatException($exception->getMessage(), 0, $exception); } $this->constructedObjectId = spl_object_hash($this); if (isset($locale)) { setlocale(LC_NUMERIC, $locale); // @codeCoverageIgnore } self::setLastErrors(parent::getLastErrors()); } /** * Get timezone from a datetime instance. * * @param DateTimeInterface $date * @param DateTimeZone|string|null $tz * * @return DateTimeInterface */ private function constructTimezoneFromDateTime(DateTimeInterface $date, &$tz) { if ($tz !== null) { $safeTz = static::safeCreateDateTimeZone($tz); if ($safeTz) { return ($date instanceof DateTimeImmutable ? $date : clone $date)->setTimezone($safeTz); } return $date; } $tz = $date->getTimezone(); return $date; } /** * Update constructedObjectId on cloned. */ public function __clone() { $this->constructedObjectId = spl_object_hash($this); } /** * Create a Carbon instance from a DateTime one. * * @param DateTimeInterface $date * * @return static */ public static function instance($date) { if ($date instanceof static) { return clone $date; } static::expectDateTime($date); $instance = new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); if ($date instanceof CarbonInterface) { $settings = $date->getSettings(); if (!$date->hasLocalTranslator()) { unset($settings['locale']); } $instance->settings($settings); } return $instance; } /** * Create a carbon instance from a string. * * This is an alias for the constructor that allows better fluent syntax * as it allows you to do Carbon::parse('Monday next week')->fn() rather * than (new Carbon('Monday next week'))->fn(). * * @param string|DateTimeInterface|null $time * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function rawParse($time = null, $tz = null) { if ($time instanceof DateTimeInterface) { return static::instance($time); } try { return new static($time, $tz); } catch (Exception $exception) { // @codeCoverageIgnoreStart try { $date = @static::now($tz)->change($time); } catch (DateMalformedStringException $ignoredException) { $date = null; } // @codeCoverageIgnoreEnd if (!$date) { throw new InvalidFormatException("Could not parse '$time': ".$exception->getMessage(), 0, $exception); } return $date; } } /** * Create a carbon instance from a string. * * This is an alias for the constructor that allows better fluent syntax * as it allows you to do Carbon::parse('Monday next week')->fn() rather * than (new Carbon('Monday next week'))->fn(). * * @param string|DateTimeInterface|null $time * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function parse($time = null, $tz = null) { $function = static::$parseFunction; if (!$function) { return static::rawParse($time, $tz); } if (\is_string($function) && method_exists(static::class, $function)) { $function = [static::class, $function]; } return $function(...\func_get_args()); } /** * Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). * * @param string $time date/time string in the given language (may also contain English). * @param string|null $locale if locale is null or not specified, current global locale will be * used instead. * @param DateTimeZone|string|null $tz optional timezone for the new instance. * * @throws InvalidFormatException * * @return static */ public static function parseFromLocale($time, $locale = null, $tz = null) { return static::rawParse(static::translateTimeString($time, $locale, 'en'), $tz); } /** * Get a Carbon instance for the current date and time. * * @param DateTimeZone|string|null $tz * * @return static */ public static function now($tz = null) { return new static(null, $tz); } /** * Create a Carbon instance for today. * * @param DateTimeZone|string|null $tz * * @return static */ public static function today($tz = null) { return static::rawParse('today', $tz); } /** * Create a Carbon instance for tomorrow. * * @param DateTimeZone|string|null $tz * * @return static */ public static function tomorrow($tz = null) { return static::rawParse('tomorrow', $tz); } /** * Create a Carbon instance for yesterday. * * @param DateTimeZone|string|null $tz * * @return static */ public static function yesterday($tz = null) { return static::rawParse('yesterday', $tz); } /** * Create a Carbon instance for the greatest supported date. * * @return static */ public static function maxValue() { if (self::$PHPIntSize === 4) { // 32 bit return static::createFromTimestamp(PHP_INT_MAX); // @codeCoverageIgnore } // 64 bit return static::create(9999, 12, 31, 23, 59, 59); } /** * Create a Carbon instance for the lowest supported date. * * @return static */ public static function minValue() { if (self::$PHPIntSize === 4) { // 32 bit return static::createFromTimestamp(~PHP_INT_MAX); // @codeCoverageIgnore } // 64 bit return static::create(1, 1, 1, 0, 0, 0); } private static function assertBetween($unit, $value, $min, $max) { if (static::isStrictModeEnabled() && ($value < $min || $value > $max)) { throw new OutOfRangeException($unit, $min, $max, $value); } } private static function createNowInstance($tz) { if (!static::hasTestNow()) { return static::now($tz); } $now = static::getTestNow(); if ($now instanceof Closure) { return $now(static::now($tz)); } return $now->avoidMutation()->tz($tz); } /** * Create a new Carbon instance from a specific date and time. * * If any of $year, $month or $day are set to null their now() values will * be used. * * If $hour is null it will be set to its now() value and the default * values for $minute and $second will be their now() values. * * If $hour is not null then the default values for $minute and $second * will be 0. * * @param DateTimeInterface|int|null $year * @param int|null $month * @param int|null $day * @param int|null $hour * @param int|null $minute * @param int|null $second * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static|false */ public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) { if ((\is_string($year) && !is_numeric($year)) || $year instanceof DateTimeInterface) { return static::parse($year, $tz ?: (\is_string($month) || $month instanceof DateTimeZone ? $month : null)); } $defaults = null; $getDefault = function ($unit) use ($tz, &$defaults) { if ($defaults === null) { $now = self::createNowInstance($tz); $defaults = array_combine([ 'year', 'month', 'day', 'hour', 'minute', 'second', ], explode('-', $now->rawFormat('Y-n-j-G-i-s.u'))); } return $defaults[$unit]; }; $year = $year ?? $getDefault('year'); $month = $month ?? $getDefault('month'); $day = $day ?? $getDefault('day'); $hour = $hour ?? $getDefault('hour'); $minute = $minute ?? $getDefault('minute'); $second = (float) ($second ?? $getDefault('second')); self::assertBetween('month', $month, 0, 99); self::assertBetween('day', $day, 0, 99); self::assertBetween('hour', $hour, 0, 99); self::assertBetween('minute', $minute, 0, 99); self::assertBetween('second', $second, 0, 99); $fixYear = null; if ($year < 0) { $fixYear = $year; $year = 0; } elseif ($year > 9999) { $fixYear = $year - 9999; $year = 9999; } $second = ($second < 10 ? '0' : '').number_format($second, 6); $instance = static::rawCreateFromFormat('!Y-n-j G:i:s.u', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); if ($fixYear !== null) { $instance = $instance->addYears($fixYear); } return $instance; } /** * Create a new safe Carbon instance from a specific date and time. * * If any of $year, $month or $day are set to null their now() values will * be used. * * If $hour is null it will be set to its now() value and the default * values for $minute and $second will be their now() values. * * If $hour is not null then the default values for $minute and $second * will be 0. * * If one of the set values is not valid, an InvalidDateException * will be thrown. * * @param int|null $year * @param int|null $month * @param int|null $day * @param int|null $hour * @param int|null $minute * @param int|null $second * @param DateTimeZone|string|null $tz * * @throws InvalidDateException * * @return static|false */ public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) { $fields = static::getRangesByUnit(); foreach ($fields as $field => $range) { if ($$field !== null && (!\is_int($$field) || $$field < $range[0] || $$field > $range[1])) { if (static::isStrictModeEnabled()) { throw new InvalidDateException($field, $$field); } return false; } } $instance = static::create($year, $month, $day, $hour, $minute, $second, $tz); foreach (array_reverse($fields) as $field => $range) { if ($$field !== null && (!\is_int($$field) || $$field !== $instance->$field)) { if (static::isStrictModeEnabled()) { throw new InvalidDateException($field, $$field); } return false; } } return $instance; } /** * Create a new Carbon instance from a specific date and time using strict validation. * * @see create() * * @param int|null $year * @param int|null $month * @param int|null $day * @param int|null $hour * @param int|null $minute * @param int|null $second * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null): self { $initialStrictMode = static::isStrictModeEnabled(); static::useStrictMode(true); try { $date = static::create($year, $month, $day, $hour, $minute, $second, $tz); } finally { static::useStrictMode($initialStrictMode); } return $date; } /** * Create a Carbon instance from just a date. The time portion is set to now. * * @param int|null $year * @param int|null $month * @param int|null $day * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function createFromDate($year = null, $month = null, $day = null, $tz = null) { return static::create($year, $month, $day, null, null, null, $tz); } /** * Create a Carbon instance from just a date. The time portion is set to midnight. * * @param int|null $year * @param int|null $month * @param int|null $day * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null) { return static::create($year, $month, $day, 0, 0, 0, $tz); } /** * Create a Carbon instance from just a time. The date portion is set to today. * * @param int|null $hour * @param int|null $minute * @param int|null $second * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) { return static::create(null, null, null, $hour, $minute, $second, $tz); } /** * Create a Carbon instance from a time string. The date portion is set to today. * * @param string $time * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function createFromTimeString($time, $tz = null) { return static::today($tz)->setTimeFromTimeString($time); } /** * @param string $format Datetime format * @param string $time * @param DateTimeZone|string|false|null $originalTz * * @return DateTimeInterface|false */ private static function createFromFormatAndTimezone($format, $time, $originalTz) { // Work-around for https://bugs.php.net/bug.php?id=75577 // @codeCoverageIgnoreStart if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { $format = str_replace('.v', '.u', $format); } // @codeCoverageIgnoreEnd if ($originalTz === null) { return parent::createFromFormat($format, (string) $time); } $tz = \is_int($originalTz) ? @timezone_name_from_abbr('', (int) ($originalTz * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE), 1) : $originalTz; $tz = static::safeCreateDateTimeZone($tz, $originalTz); if ($tz === false) { return false; } return parent::createFromFormat($format, (string) $time, $tz); } /** * Create a Carbon instance from a specific format. * * @param string $format Datetime format * @param string $time * @param DateTimeZone|string|false|null $tz * * @throws InvalidFormatException * * @return static|false */ public static function rawCreateFromFormat($format, $time, $tz = null) { // Work-around for https://bugs.php.net/bug.php?id=80141 $format = preg_replace('/(?getTimezone(); } $mock = $mock->copy(); // Prepend mock datetime only if the format does not contain non escaped unix epoch reset flag. if (!preg_match("/{$nonEscaped}[!|]/", $format)) { if (preg_match('/[HhGgisvuB]/', $format)) { $mock = $mock->setTime(0, 0); } $format = static::MOCK_DATETIME_FORMAT.' '.$format; $time = ($mock instanceof self ? $mock->rawFormat(static::MOCK_DATETIME_FORMAT) : $mock->format(static::MOCK_DATETIME_FORMAT)).' '.$time; } // Regenerate date from the modified format to base result on the mocked instance instead of now. $date = self::createFromFormatAndTimezone($format, $time, $tz); } if ($date instanceof DateTimeInterface) { $instance = static::instance($date); $instance::setLastErrors($lastErrors); return $instance; } if (static::isStrictModeEnabled()) { throw new InvalidFormatException(implode(PHP_EOL, $lastErrors['errors'])); } return false; } /** * Create a Carbon instance from a specific format. * * @param string $format Datetime format * @param string $time * @param DateTimeZone|string|false|null $tz * * @throws InvalidFormatException * * @return static|false */ #[ReturnTypeWillChange] public static function createFromFormat($format, $time, $tz = null) { $function = static::$createFromFormatFunction; if (!$function) { return static::rawCreateFromFormat($format, $time, $tz); } if (\is_string($function) && method_exists(static::class, $function)) { $function = [static::class, $function]; } return $function(...\func_get_args()); } /** * Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). * * @param string $format Datetime format * @param string $time * @param DateTimeZone|string|false|null $tz optional timezone * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) * @param \Symfony\Component\Translation\TranslatorInterface $translator optional custom translator to use for macro-formats * * @throws InvalidFormatException * * @return static|false */ public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) { $format = preg_replace_callback('/(? static::getTranslationMessageWith($translator, 'formats.LT', $locale, 'h:mm A'), 'LTS' => static::getTranslationMessageWith($translator, 'formats.LTS', $locale, 'h:mm:ss A'), 'L' => static::getTranslationMessageWith($translator, 'formats.L', $locale, 'MM/DD/YYYY'), 'LL' => static::getTranslationMessageWith($translator, 'formats.LL', $locale, 'MMMM D, YYYY'), 'LLL' => static::getTranslationMessageWith($translator, 'formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), 'LLLL' => static::getTranslationMessageWith($translator, 'formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), ]; } return $formats[$code] ?? preg_replace_callback( '/MMMM|MM|DD|dddd/', function ($code) { return mb_substr($code[0], 1); }, $formats[strtoupper($code)] ?? '' ); }, $format); $format = preg_replace_callback('/(? 'd', 'OM' => 'M', 'OY' => 'Y', 'OH' => 'G', 'Oh' => 'g', 'Om' => 'i', 'Os' => 's', 'D' => 'd', 'DD' => 'd', 'Do' => 'd', 'd' => '!', 'dd' => '!', 'ddd' => 'D', 'dddd' => 'D', 'DDD' => 'z', 'DDDD' => 'z', 'DDDo' => 'z', 'e' => '!', 'E' => '!', 'H' => 'G', 'HH' => 'H', 'h' => 'g', 'hh' => 'h', 'k' => 'G', 'kk' => 'G', 'hmm' => 'gi', 'hmmss' => 'gis', 'Hmm' => 'Gi', 'Hmmss' => 'Gis', 'm' => 'i', 'mm' => 'i', 'a' => 'a', 'A' => 'a', 's' => 's', 'ss' => 's', 'S' => '*', 'SS' => '*', 'SSS' => '*', 'SSSS' => '*', 'SSSSS' => '*', 'SSSSSS' => 'u', 'SSSSSSS' => 'u*', 'SSSSSSSS' => 'u*', 'SSSSSSSSS' => 'u*', 'M' => 'm', 'MM' => 'm', 'MMM' => 'M', 'MMMM' => 'M', 'Mo' => 'm', 'Q' => '!', 'Qo' => '!', 'G' => '!', 'GG' => '!', 'GGG' => '!', 'GGGG' => '!', 'GGGGG' => '!', 'g' => '!', 'gg' => '!', 'ggg' => '!', 'gggg' => '!', 'ggggg' => '!', 'W' => '!', 'WW' => '!', 'Wo' => '!', 'w' => '!', 'ww' => '!', 'wo' => '!', 'x' => 'U???', 'X' => 'U', 'Y' => 'Y', 'YY' => 'y', 'YYYY' => 'Y', 'YYYYY' => 'Y', 'YYYYYY' => 'Y', 'z' => 'e', 'zz' => 'e', 'Z' => 'e', 'ZZ' => 'e', ]; } $format = $replacements[$code] ?? '?'; if ($format === '!') { throw new InvalidFormatException("Format $code not supported for creation."); } return $format; }, $format); return static::rawCreateFromFormat($format, $time, $tz); } /** * Create a Carbon instance from a specific format and a string in a given language. * * @param string $format Datetime format * @param string $locale * @param string $time * @param DateTimeZone|string|false|null $tz * * @throws InvalidFormatException * * @return static|false */ public static function createFromLocaleFormat($format, $locale, $time, $tz = null) { $format = preg_replace_callback( '/(?:\\\\[a-zA-Z]|[bfkqCEJKQRV]){2,}/', static function (array $match) use ($locale): string { $word = str_replace('\\', '', $match[0]); $translatedWord = static::translateTimeString($word, $locale, 'en'); return $word === $translatedWord ? $match[0] : preg_replace('/[a-zA-Z]/', '\\\\$0', $translatedWord); }, $format ); return static::rawCreateFromFormat($format, static::translateTimeString($time, $locale, 'en'), $tz); } /** * Create a Carbon instance from a specific ISO format and a string in a given language. * * @param string $format Datetime ISO format * @param string $locale * @param string $time * @param DateTimeZone|string|false|null $tz * * @throws InvalidFormatException * * @return static|false */ public static function createFromLocaleIsoFormat($format, $locale, $time, $tz = null) { $time = static::translateTimeString($time, $locale, 'en', CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS | CarbonInterface::TRANSLATE_MERIDIEM); return static::createFromIsoFormat($format, $time, $tz, $locale); } /** * Make a Carbon instance from given variable if possible. * * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals * and recurrences). Throw an exception for invalid format, but otherwise return null. * * @param mixed $var * * @throws InvalidFormatException * * @return static|null */ public static function make($var) { if ($var instanceof DateTimeInterface) { return static::instance($var); } $date = null; if (\is_string($var)) { $var = trim($var); if (!preg_match('/^P[\dT]/', $var) && !preg_match('/^R\d/', $var) && preg_match('/[a-z\d]/i', $var) ) { $date = static::parse($var); } } return $date; } /** * Set last errors. * * @param array|bool $lastErrors * * @return void */ private static function setLastErrors($lastErrors) { if (\is_array($lastErrors) || $lastErrors === false) { static::$lastErrors = \is_array($lastErrors) ? $lastErrors : [ 'warning_count' => 0, 'warnings' => [], 'error_count' => 0, 'errors' => [], ]; } } /** * {@inheritdoc} * * @return array */ #[ReturnTypeWillChange] public static function getLastErrors() { return static::$lastErrors; } } PKgt[s+55Carbon/Traits/Mutability.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\Carbon; use Carbon\CarbonImmutable; /** * Trait Mutability. * * Utils to know if the current object is mutable or immutable and convert it. */ trait Mutability { use Cast; /** * Returns true if the current class/instance is mutable. * * @return bool */ public static function isMutable() { return false; } /** * Returns true if the current class/instance is immutable. * * @return bool */ public static function isImmutable() { return !static::isMutable(); } /** * Return a mutable copy of the instance. * * @return Carbon */ public function toMutable() { /** @var Carbon $date */ $date = $this->cast(Carbon::class); return $date; } /** * Return a immutable copy of the instance. * * @return CarbonImmutable */ public function toImmutable() { /** @var CarbonImmutable $date */ $date = $this->cast(CarbonImmutable::class); return $date; } } PKgt[ * * Carbon/Traits/IntervalStep.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; use Carbon\Carbon; use Carbon\CarbonImmutable; use Carbon\CarbonInterface; use Closure; use DateTimeImmutable; use DateTimeInterface; trait IntervalStep { /** * Step to apply instead of a fixed interval to get the new date. * * @var Closure|null */ protected $step; /** * Get the dynamic step in use. * * @return Closure */ public function getStep(): ?Closure { return $this->step; } /** * Set a step to apply instead of a fixed interval to get the new date. * * Or pass null to switch to fixed interval. * * @param Closure|null $step */ public function setStep(?Closure $step): void { $this->step = $step; } /** * Take a date and apply either the step if set, or the current interval else. * * The interval/step is applied negatively (typically subtraction instead of addition) if $negated is true. * * @param DateTimeInterface $dateTime * @param bool $negated * * @return CarbonInterface */ public function convertDate(DateTimeInterface $dateTime, bool $negated = false): CarbonInterface { /** @var CarbonInterface $carbonDate */ $carbonDate = $dateTime instanceof CarbonInterface ? $dateTime : $this->resolveCarbon($dateTime); if ($this->step) { return $carbonDate->setDateTimeFrom(($this->step)($carbonDate->avoidMutation(), $negated)); } if ($negated) { return $carbonDate->rawSub($this); } return $carbonDate->rawAdd($this); } /** * Convert DateTimeImmutable instance to CarbonImmutable instance and DateTime instance to Carbon instance. * * @param DateTimeInterface $dateTime * * @return Carbon|CarbonImmutable */ private function resolveCarbon(DateTimeInterface $dateTime) { if ($dateTime instanceof DateTimeImmutable) { return CarbonImmutable::instance($dateTime); } return Carbon::instance($dateTime); } } PKgt[]Carbon/Traits/Timestamp.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Traits; /** * Trait Timestamp. */ trait Timestamp { /** * Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $timestamp * @param \DateTimeZone|string|null $tz * * @return static */ public static function createFromTimestamp($timestamp, $tz = null) { return static::createFromTimestampUTC($timestamp)->setTimezone($tz); } /** * Create a Carbon instance from an timestamp keeping the timezone to UTC. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $timestamp * * @return static */ public static function createFromTimestampUTC($timestamp) { [$integer, $decimal] = self::getIntegerAndDecimalParts($timestamp); $delta = floor($decimal / static::MICROSECONDS_PER_SECOND); $integer += $delta; $decimal -= $delta * static::MICROSECONDS_PER_SECOND; $decimal = str_pad((string) $decimal, 6, '0', STR_PAD_LEFT); return static::rawCreateFromFormat('U u', "$integer $decimal"); } /** * Create a Carbon instance from a timestamp in milliseconds. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $timestamp * * @return static */ public static function createFromTimestampMsUTC($timestamp) { [$milliseconds, $microseconds] = self::getIntegerAndDecimalParts($timestamp, 3); $sign = $milliseconds < 0 || ($milliseconds === 0.0 && $microseconds < 0) ? -1 : 1; $milliseconds = abs($milliseconds); $microseconds = $sign * abs($microseconds) + static::MICROSECONDS_PER_MILLISECOND * ($milliseconds % static::MILLISECONDS_PER_SECOND); $seconds = $sign * floor($milliseconds / static::MILLISECONDS_PER_SECOND); $delta = floor($microseconds / static::MICROSECONDS_PER_SECOND); $seconds += $delta; $microseconds -= $delta * static::MICROSECONDS_PER_SECOND; $microseconds = str_pad($microseconds, 6, '0', STR_PAD_LEFT); return static::rawCreateFromFormat('U u', "$seconds $microseconds"); } /** * Create a Carbon instance from a timestamp in milliseconds. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $timestamp * @param \DateTimeZone|string|null $tz * * @return static */ public static function createFromTimestampMs($timestamp, $tz = null) { return static::createFromTimestampMsUTC($timestamp) ->setTimezone($tz); } /** * Set the instance's timestamp. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $unixTimestamp * * @return static */ public function timestamp($unixTimestamp) { return $this->setTimestamp($unixTimestamp); } /** * Returns a timestamp rounded with the given precision (6 by default). * * @example getPreciseTimestamp() 1532087464437474 (microsecond maximum precision) * @example getPreciseTimestamp(6) 1532087464437474 * @example getPreciseTimestamp(5) 153208746443747 (1/100000 second precision) * @example getPreciseTimestamp(4) 15320874644375 (1/10000 second precision) * @example getPreciseTimestamp(3) 1532087464437 (millisecond precision) * @example getPreciseTimestamp(2) 153208746444 (1/100 second precision) * @example getPreciseTimestamp(1) 15320874644 (1/10 second precision) * @example getPreciseTimestamp(0) 1532087464 (second precision) * @example getPreciseTimestamp(-1) 153208746 (10 second precision) * @example getPreciseTimestamp(-2) 15320875 (100 second precision) * * @param int $precision * * @return float */ public function getPreciseTimestamp($precision = 6) { return round(((float) $this->rawFormat('Uu')) / pow(10, 6 - $precision)); } /** * Returns the milliseconds timestamps used amongst other by Date javascript objects. * * @return float */ public function valueOf() { return $this->getPreciseTimestamp(3); } /** * Returns the timestamp with millisecond precision. * * @return int */ public function getTimestampMs() { return (int) $this->getPreciseTimestamp(3); } /** * @alias getTimestamp * * Returns the UNIX timestamp for the current date. * * @return int */ public function unix() { return $this->getTimestamp(); } /** * Return an array with integer part digits and decimals digits split from one or more positive numbers * (such as timestamps) as string with the given number of decimals (6 by default). * * By splitting integer and decimal, this method obtain a better precision than * number_format when the input is a string. * * @param float|int|string $numbers one or more numbers * @param int $decimals number of decimals precision (6 by default) * * @return array 0-index is integer part, 1-index is decimal part digits */ private static function getIntegerAndDecimalParts($numbers, $decimals = 6) { if (\is_int($numbers) || \is_float($numbers)) { $numbers = number_format($numbers, $decimals, '.', ''); } $sign = str_starts_with($numbers, '-') ? -1 : 1; $integer = 0; $decimal = 0; foreach (preg_split('`[^\d.]+`', $numbers) as $chunk) { [$integerPart, $decimalPart] = explode('.', "$chunk."); $integer += (int) $integerPart; $decimal += (float) ("0.$decimalPart"); } $overflow = floor($decimal); $integer += $overflow; $decimal -= $overflow; return [$sign * $integer, $decimal === 0.0 ? 0.0 : $sign * round($decimal * pow(10, $decimals))]; } } PKgt['r  Carbon/TranslatorImmutable.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Carbon\Exceptions\ImmutableException; use Symfony\Component\Config\ConfigCacheFactoryInterface; use Symfony\Component\Translation\Formatter\MessageFormatterInterface; class TranslatorImmutable extends Translator { /** @var bool */ private $constructed = false; public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) { parent::__construct($locale, $formatter, $cacheDir, $debug); $this->constructed = true; } /** * @codeCoverageIgnore */ public function setDirectories(array $directories) { $this->disallowMutation(__METHOD__); return parent::setDirectories($directories); } public function setLocale($locale) { $this->disallowMutation(__METHOD__); return parent::setLocale($locale); } /** * @codeCoverageIgnore */ public function setMessages($locale, $messages) { $this->disallowMutation(__METHOD__); return parent::setMessages($locale, $messages); } /** * @codeCoverageIgnore */ public function setTranslations($messages) { $this->disallowMutation(__METHOD__); return parent::setTranslations($messages); } /** * @codeCoverageIgnore */ public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) { $this->disallowMutation(__METHOD__); parent::setConfigCacheFactory($configCacheFactory); } public function resetMessages($locale = null) { $this->disallowMutation(__METHOD__); return parent::resetMessages($locale); } /** * @codeCoverageIgnore */ public function setFallbackLocales(array $locales) { $this->disallowMutation(__METHOD__); parent::setFallbackLocales($locales); } private function disallowMutation($method) { if ($this->constructed) { throw new ImmutableException($method.' not allowed on '.static::class); } } } PKgt[䪦Carbon/Cli/Invoker.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Cli; class Invoker { public const CLI_CLASS_NAME = 'Carbon\\Cli'; protected function runWithCli(string $className, array $parameters): bool { $cli = new $className(); return $cli(...$parameters); } public function __invoke(...$parameters): bool { if (class_exists(self::CLI_CLASS_NAME)) { return $this->runWithCli(self::CLI_CLASS_NAME, $parameters); } $function = (($parameters[1] ?? '') === 'install' ? ($parameters[2] ?? null) : null) ?: 'shell_exec'; $function('composer require carbon-cli/carbon-cli --no-interaction'); echo 'Installation succeeded.'; return true; } } PKgt[,W2Carbon/MessageFormatter/MessageFormatterMapper.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\MessageFormatter; use ReflectionMethod; use Symfony\Component\Translation\Formatter\MessageFormatter; use Symfony\Component\Translation\Formatter\MessageFormatterInterface; // @codeCoverageIgnoreStart $transMethod = new ReflectionMethod(MessageFormatterInterface::class, 'format'); require $transMethod->getParameters()[0]->hasType() ? __DIR__.'/../../../lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php' : __DIR__.'/../../../lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php'; // @codeCoverageIgnoreEnd final class MessageFormatterMapper extends LazyMessageFormatter { /** * Wrapped formatter. * * @var MessageFormatterInterface */ protected $formatter; public function __construct(?MessageFormatterInterface $formatter = null) { $this->formatter = $formatter ?? new MessageFormatter(); } protected function transformLocale(?string $locale): ?string { return $locale ? preg_replace('/[_@][A-Za-z][a-z]{2,}/', '', $locale) : $locale; } } PKgt[TMCarbon/Factory.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Closure; use DateTimeInterface; use ReflectionMethod; /** * A factory to generate Carbon instances with common settings. * * * * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a * new instance. * @method Carbon|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time. * If any of $year, $month or $day are set to null their now() values will * be used. * If $hour is null it will be set to its now() value and the default * values for $minute and $second will be their now() values. * If $hour is not null then the default values for $minute and $second * will be 0. * @method Carbon createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now. * @method Carbon|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. * @method Carbon|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). * @method Carbon|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language. * @method Carbon|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language. * @method Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today. * @method Carbon createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today. * @method Carbon createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). * Timestamp input can be given as int, float or a string containing one or more numbers. * @method Carbon createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds. * Timestamp input can be given as int, float or a string containing one or more numbers. * @method Carbon createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds. * Timestamp input can be given as int, float or a string containing one or more numbers. * @method Carbon createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC. * Timestamp input can be given as int, float or a string containing one or more numbers. * @method Carbon createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight. * @method Carbon|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time. * If any of $year, $month or $day are set to null their now() values will * be used. * If $hour is null it will be set to its now() value and the default * values for $minute and $second will be their now() values. * If $hour is not null then the default values for $minute and $second * will be 0. * If one of the set values is not valid, an InvalidDateException * will be thrown. * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation. * @method Carbon disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @method Carbon enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, * then return the result of the closure (or null if the closure was void). * @method Carbon fromSerialized($value) Create an instance from a serialized string. * @method void genericMacro($macro, $priority = 0) Register a custom macro. * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. * (It will ignore custom translator dynamic loading.) * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native * name, region and variant of the locale. * @method array getDays() Get the days of the week * @method string|null getFallbackLocale() Get the fallback locale. * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). * @method array getIsoUnits() Returns list of locale units for ISO formatting. * @method array getLastErrors() {@inheritdoc} * @method string getLocale() Get the current translator locale. * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. * @method int getMidDayAt() get midday/noon hour * @method Closure|Carbon getTestNow() Get the Carbon instance (real or mock) to be returned when a "now" * instance is created. * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. * @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. * @method int getWeekEndsAt() Get the last day of week * @method int getWeekStartsAt() Get the first day of week * @method array getWeekendDays() Get weekend days * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. * @method bool hasMacro($name) Checks if macro is registered globally. * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance * is anything that is not null. * @method Carbon instance($date) Create a Carbon instance from a DateTime one. * @method bool isImmutable() Returns true if the current class/instance is immutable. * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. * @method bool isMutable() Returns true if the current class/instance is mutable. * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. * (It can be overridden in specific instances.) * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). * Support is considered enabled if the 3 words are translated in the given locale. * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). * Support is considered enabled if the 4 sentences are translated in the given locale. * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). * Support is considered enabled if the 2 words are translated in the given locale. * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). * Support is considered enabled if the 4 sentences are translated in the given locale. * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. * Support is considered enabled if either year, day or hour has a short variant translated. * @method void macro($name, $macro) Register a custom macro. * @method Carbon|null make($var) Make a Carbon instance from given variable if possible. * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals * and recurrences). Throw an exception for invalid format, but otherwise return null. * @method Carbon maxValue() Create a Carbon instance for the greatest supported date. * @method Carbon minValue() Create a Carbon instance for the lowest supported date. * @method void mixin($mixin) Mix another object into the class. * @method Carbon now($tz = null) Get a Carbon instance for the current date and time. * @method Carbon parse($time = null, $tz = null) Create a carbon instance from a string. * This is an alias for the constructor that allows better fluent syntax * as it allows you to do Carbon::parse('Monday next week')->fn() rather * than (new Carbon('Monday next week'))->fn(). * @method Carbon parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). * @method Carbon|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. * @method Carbon rawParse($time = null, $tz = null) Create a carbon instance from a string. * This is an alias for the constructor that allows better fluent syntax * as it allows you to do Carbon::parse('Monday next week')->fn() rather * than (new Carbon('Monday next week'))->fn(). * @method Carbon resetMacros() Remove all macros and generic macros. * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather transform Carbon object before the serialization. * JSON serialize all Carbon instances using the given callback. * @method Carbon setFallbackLocale($locale) Set the fallback locale. * @method Carbon setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. * Pass 'auto' as locale to use closest language from the current LC_TIME locale. * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather consider mid-day is always 12pm, then if you need to test if it's an other * hour, test it explicitly: * $date->format('G') == 13 * or to set explicitly to a given hour: * $date->setTime(13, 0, 0, 0) * Set midday/noon hour * @method Carbon setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now" * instance is created. The provided instance will be returned * specifically under the following conditions: * - A call to the static now() method, ex. Carbon::now() * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') * - When a string containing the desired time is passed to Carbon::parse(). * Note the timezone parameter was left out of the examples above and * has no affect as the mock value will be returned regardless of its value. * Only the moment is mocked with setTestNow(), the timezone will still be the one passed * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). * To clear the test instance call this method using the default * parameter of null. * /!\ Use this method for unit tests only. * @method Carbon setTestNowAndTimezone($testNow = null, $tz = null) Set a Carbon instance (real or mock) to be returned when a "now" * instance is created. The provided instance will be returned * specifically under the following conditions: * - A call to the static now() method, ex. Carbon::now() * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') * - When a string containing the desired time is passed to Carbon::parse(). * It will also align default timezone (e.g. call date_default_timezone_set()) with * the second argument or if null, with the timezone of the given date object. * To clear the test instance call this method using the default * parameter of null. * /!\ Use this method for unit tests only. * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and * use other method or custom format passed to format() method if you need to dump another string * format. * Set the default format used when type juggling a Carbon instance to a string. * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. * @method Carbon setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use UTF-8 language packages on every machine. * Set if UTF8 will be used for localized date/time. * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the * start of week according to current locale selected and implicitly the end of week. * Set the last day of week * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the * 'first_day_of_week' locale setting to change the start of week according to current locale * selected and implicitly the end of week. * Set the first day of week * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather consider week-end is always saturday and sunday, and if you have some custom * week-end days to handle, give to those days an other name and create a macro for them: * ``` * Carbon::macro('isDayOff', function ($date) { * return $date->isSunday() || $date->isMonday(); * }); * Carbon::macro('isNotDayOff', function ($date) { * return !$date->isDayOff(); * }); * if ($someDate->isDayOff()) ... * if ($someDate->isNotDayOff()) ... * // Add 5 not-off days * $count = 5; * while ($someDate->isDayOff() || ($count-- > 0)) { * $someDate->addDay(); * } * ``` * Set weekend days * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). * @method Carbon today($tz = null) Create a Carbon instance for today. * @method Carbon tomorrow($tz = null) Create a Carbon instance for tomorrow. * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. * @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @method Carbon useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback. * Using setTestNow to set the date, executing the callback, then * clearing the test instance. * /!\ Use this method for unit tests only. * @method Carbon yesterday($tz = null) Create a Carbon instance for yesterday. * * */ class Factory { protected $className = Carbon::class; protected $settings = []; public function __construct(array $settings = [], ?string $className = null) { if ($className) { $this->className = $className; } $this->settings = $settings; } public function getClassName() { return $this->className; } public function setClassName(string $className) { $this->className = $className; return $this; } public function className(string $className = null) { return $className === null ? $this->getClassName() : $this->setClassName($className); } public function getSettings() { return $this->settings; } public function setSettings(array $settings) { $this->settings = $settings; return $this; } public function settings(array $settings = null) { return $settings === null ? $this->getSettings() : $this->setSettings($settings); } public function mergeSettings(array $settings) { $this->settings = array_merge($this->settings, $settings); return $this; } public function __call($name, $arguments) { $method = new ReflectionMethod($this->className, $name); $settings = $this->settings; if ($settings && isset($settings['timezone'])) { $tzParameters = array_filter($method->getParameters(), function ($parameter) { return \in_array($parameter->getName(), ['tz', 'timezone'], true); }); if (isset($arguments[0]) && \in_array($name, ['instance', 'make', 'create', 'parse'], true)) { if ($arguments[0] instanceof DateTimeInterface) { $settings['innerTimezone'] = $settings['timezone']; } elseif (\is_string($arguments[0]) && date_parse($arguments[0])['is_localtime']) { unset($settings['timezone'], $settings['innerTimezone']); } } elseif (\count($tzParameters)) { array_splice($arguments, key($tzParameters), 0, [$settings['timezone']]); unset($settings['timezone']); } } $result = $this->className::$name(...$arguments); return $result instanceof CarbonInterface && !empty($settings) ? $result->settings($settings) : $result; } } PKgt[3*JCarbon/Doctrine/CarbonType.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Doctrine; use Doctrine\DBAL\Platforms\AbstractPlatform; class CarbonType extends DateTimeType implements CarbonDoctrineType { /** * {@inheritdoc} * * @return string */ public function getName() { return 'carbon'; } /** * {@inheritdoc} * * @return bool */ public function requiresSQLCommentHint(AbstractPlatform $platform) { return true; } } PKgt[R? ? 'Carbon/Doctrine/CarbonTypeConverter.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Doctrine; use Carbon\Carbon; use Carbon\CarbonInterface; use DateTimeInterface; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Types\ConversionException; use Exception; /** * @template T of CarbonInterface */ trait CarbonTypeConverter { /** * @return class-string */ protected function getCarbonClassName(): string { return Carbon::class; } /** * @return string */ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { $precision = $fieldDeclaration['precision'] ?: 10; if ($fieldDeclaration['secondPrecision'] ?? false) { $precision = 0; } if ($precision === 10) { $precision = DateTimeDefaultPrecision::get(); } $type = parent::getSQLDeclaration($fieldDeclaration, $platform); if (!$precision) { return $type; } if (str_contains($type, '(')) { return preg_replace('/\(\d+\)/', "($precision)", $type); } [$before, $after] = explode(' ', "$type "); return trim("$before($precision) $after"); } /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) * * @return T|null */ public function convertToPHPValue($value, AbstractPlatform $platform) { $class = $this->getCarbonClassName(); if ($value === null || is_a($value, $class)) { return $value; } if ($value instanceof DateTimeInterface) { return $class::instance($value); } $date = null; $error = null; try { $date = $class::parse($value); } catch (Exception $exception) { $error = $exception; } if (!$date) { throw ConversionException::conversionFailedFormat( $value, $this->getName(), 'Y-m-d H:i:s.u or any format supported by '.$class.'::parse()', $error ); } return $date; } /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) * * @return string|null */ public function convertToDatabaseValue($value, AbstractPlatform $platform) { if ($value === null) { return $value; } if ($value instanceof DateTimeInterface) { return $value->format('Y-m-d H:i:s.u'); } throw ConversionException::conversionFailedInvalidType( $value, $this->getName(), ['null', 'DateTime', 'Carbon'] ); } } PKgt[#I'Carbon/Doctrine/CarbonImmutableType.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Doctrine; use Doctrine\DBAL\Platforms\AbstractPlatform; class CarbonImmutableType extends DateTimeImmutableType implements CarbonDoctrineType { /** * {@inheritdoc} * * @return string */ public function getName() { return 'carbon_immutable'; } /** * {@inheritdoc} * * @return bool */ public function requiresSQLCommentHint(AbstractPlatform $platform) { return true; } } PKgt[GuSS)Carbon/Doctrine/DateTimeImmutableType.phpnu[ */ use CarbonTypeConverter; /** * @return class-string */ protected function getCarbonClassName(): string { return CarbonImmutable::class; } } PKgt[>f΁ Carbon/Doctrine/DateTimeType.phpnu[ */ use CarbonTypeConverter; } PKgt[NN&Carbon/Doctrine/CarbonDoctrineType.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Doctrine; use Doctrine\DBAL\Platforms\AbstractPlatform; interface CarbonDoctrineType { public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform); public function convertToPHPValue($value, AbstractPlatform $platform); public function convertToDatabaseValue($value, AbstractPlatform $platform); } PKgt[[nf,Carbon/Doctrine/DateTimeDefaultPrecision.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Doctrine; class DateTimeDefaultPrecision { private static $precision = 6; /** * Change the default Doctrine datetime and datetime_immutable precision. * * @param int $precision */ public static function set(int $precision): void { self::$precision = $precision; } /** * Get the default Doctrine datetime and datetime_immutable precision. * * @return int */ public static function get(): int { return self::$precision; } } PKgt[$`/))Carbon/AbstractTranslator.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Carbon\MessageFormatter\MessageFormatterMapper; use Closure; use ReflectionException; use ReflectionFunction; use Symfony\Component\Translation; use Symfony\Component\Translation\Formatter\MessageFormatterInterface; use Symfony\Component\Translation\Loader\ArrayLoader; abstract class AbstractTranslator extends Translation\Translator { /** * Translator singletons for each language. * * @var array */ protected static $singletons = []; /** * List of custom localized messages. * * @var array */ protected $messages = []; /** * List of custom directories that contain translation files. * * @var string[] */ protected $directories = []; /** * Set to true while constructing. * * @var bool */ protected $initializing = false; /** * List of locales aliases. * * @var array */ protected $aliases = [ 'me' => 'sr_Latn_ME', 'scr' => 'sh', ]; /** * Return a singleton instance of Translator. * * @param string|null $locale optional initial locale ("en" - english by default) * * @return static */ public static function get($locale = null) { $locale = $locale ?: 'en'; $key = static::class === Translator::class ? $locale : static::class.'|'.$locale; if (!isset(static::$singletons[$key])) { static::$singletons[$key] = new static($locale); } return static::$singletons[$key]; } public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) { parent::setLocale($locale); $this->initializing = true; $this->directories = [__DIR__.'/Lang']; $this->addLoader('array', new ArrayLoader()); parent::__construct($locale, new MessageFormatterMapper($formatter), $cacheDir, $debug); $this->initializing = false; } /** * Returns the list of directories translation files are searched in. * * @return array */ public function getDirectories(): array { return $this->directories; } /** * Set list of directories translation files are searched in. * * @param array $directories new directories list * * @return $this */ public function setDirectories(array $directories) { $this->directories = $directories; return $this; } /** * Add a directory to the list translation files are searched in. * * @param string $directory new directory * * @return $this */ public function addDirectory(string $directory) { $this->directories[] = $directory; return $this; } /** * Remove a directory from the list translation files are searched in. * * @param string $directory directory path * * @return $this */ public function removeDirectory(string $directory) { $search = rtrim(strtr($directory, '\\', '/'), '/'); return $this->setDirectories(array_filter($this->getDirectories(), function ($item) use ($search) { return rtrim(strtr($item, '\\', '/'), '/') !== $search; })); } /** * Reset messages of a locale (all locale if no locale passed). * Remove custom messages and reload initial messages from matching * file in Lang directory. * * @param string|null $locale * * @return bool */ public function resetMessages($locale = null) { if ($locale === null) { $this->messages = []; return true; } foreach ($this->getDirectories() as $directory) { $data = @include sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale); if ($data !== false) { $this->messages[$locale] = $data; $this->addResource('array', $this->messages[$locale], $locale); return true; } } return false; } /** * Returns the list of files matching a given locale prefix (or all if empty). * * @param string $prefix prefix required to filter result * * @return array */ public function getLocalesFiles($prefix = '') { $files = []; foreach ($this->getDirectories() as $directory) { $directory = rtrim($directory, '\\/'); foreach (glob("$directory/$prefix*.php") as $file) { $files[] = $file; } } return array_unique($files); } /** * Returns the list of internally available locales and already loaded custom locales. * (It will ignore custom translator dynamic loading.) * * @param string $prefix prefix required to filter result * * @return array */ public function getAvailableLocales($prefix = '') { $locales = []; foreach ($this->getLocalesFiles($prefix) as $file) { $locales[] = substr($file, strrpos($file, '/') + 1, -4); } return array_unique(array_merge($locales, array_keys($this->messages))); } protected function translate(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string { if ($domain === null) { $domain = 'messages'; } $catalogue = $this->getCatalogue($locale); $format = $this instanceof TranslatorStrongTypeInterface ? $this->getFromCatalogue($catalogue, (string) $id, $domain) : $this->getCatalogue($locale)->get((string) $id, $domain); // @codeCoverageIgnore if ($format instanceof Closure) { // @codeCoverageIgnoreStart try { $count = (new ReflectionFunction($format))->getNumberOfRequiredParameters(); } catch (ReflectionException $exception) { $count = 0; } // @codeCoverageIgnoreEnd return $format( ...array_values($parameters), ...array_fill(0, max(0, $count - \count($parameters)), null) ); } return parent::trans($id, $parameters, $domain, $locale); } /** * Init messages language from matching file in Lang directory. * * @param string $locale * * @return bool */ protected function loadMessagesFromFile($locale) { return isset($this->messages[$locale]) || $this->resetMessages($locale); } /** * Set messages of a locale and take file first if present. * * @param string $locale * @param array $messages * * @return $this */ public function setMessages($locale, $messages) { $this->loadMessagesFromFile($locale); $this->addResource('array', $messages, $locale); $this->messages[$locale] = array_merge( $this->messages[$locale] ?? [], $messages ); return $this; } /** * Set messages of the current locale and take file first if present. * * @param array $messages * * @return $this */ public function setTranslations($messages) { return $this->setMessages($this->getLocale(), $messages); } /** * Get messages of a locale, if none given, return all the * languages. * * @param string|null $locale * * @return array */ public function getMessages($locale = null) { return $locale === null ? $this->messages : $this->messages[$locale]; } /** * Set the current translator locale and indicate if the source locale file exists * * @param string $locale locale ex. en * * @return bool */ public function setLocale($locale) { $locale = preg_replace_callback('/[-_]([a-z]{2,}|\d{2,})/', function ($matches) { // _2-letters or YUE is a region, _3+-letters is a variant $upper = strtoupper($matches[1]); if ($upper === 'YUE' || $upper === 'ISO' || \strlen($upper) < 3) { return "_$upper"; } return '_'.ucfirst($matches[1]); }, strtolower($locale)); $previousLocale = $this->getLocale(); if ($previousLocale === $locale && isset($this->messages[$locale])) { return true; } unset(static::$singletons[$previousLocale]); if ($locale === 'auto') { $completeLocale = setlocale(LC_TIME, '0'); $locale = preg_replace('/^([^_.-]+).*$/', '$1', $completeLocale); $locales = $this->getAvailableLocales($locale); $completeLocaleChunks = preg_split('/[_.-]+/', $completeLocale); $getScore = function ($language) use ($completeLocaleChunks) { return self::compareChunkLists($completeLocaleChunks, preg_split('/[_.-]+/', $language)); }; usort($locales, function ($first, $second) use ($getScore) { return $getScore($second) <=> $getScore($first); }); $locale = $locales[0]; } if (isset($this->aliases[$locale])) { $locale = $this->aliases[$locale]; } // If subtag (ex: en_CA) first load the macro (ex: en) to have a fallback if (str_contains($locale, '_') && $this->loadMessagesFromFile($macroLocale = preg_replace('/^([^_]+).*$/', '$1', $locale)) ) { parent::setLocale($macroLocale); } if (!$this->loadMessagesFromFile($locale) && !$this->initializing) { return false; } parent::setLocale($locale); return true; } /** * Show locale on var_dump(). * * @return array */ public function __debugInfo() { return [ 'locale' => $this->getLocale(), ]; } private static function compareChunkLists($referenceChunks, $chunks) { $score = 0; foreach ($referenceChunks as $index => $chunk) { if (!isset($chunks[$index])) { $score++; continue; } if (strtolower($chunks[$index]) === strtolower($chunk)) { $score += 10; } } return $score; } } PKgt[7H)Carbon/CarbonInterface.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use BadMethodCallException; use Carbon\Exceptions\BadComparisonUnitException; use Carbon\Exceptions\ImmutableException; use Carbon\Exceptions\InvalidDateException; use Carbon\Exceptions\InvalidFormatException; use Carbon\Exceptions\UnknownGetterException; use Carbon\Exceptions\UnknownMethodException; use Carbon\Exceptions\UnknownSetterException; use Closure; use DateInterval; use DateTime; use DateTimeImmutable; use DateTimeInterface; use DateTimeZone; use JsonSerializable; use ReflectionException; use ReturnTypeWillChange; use Symfony\Component\Translation\TranslatorInterface; use Throwable; /** * Common interface for Carbon and CarbonImmutable. * * * * @property int $year * @property int $yearIso * @property int $month * @property int $day * @property int $hour * @property int $minute * @property int $second * @property int $micro * @property int $microsecond * @property int|float|string $timestamp seconds since the Unix Epoch * @property string $englishDayOfWeek the day of week in English * @property string $shortEnglishDayOfWeek the abbreviated day of week in English * @property string $englishMonth the month in English * @property string $shortEnglishMonth the abbreviated month in English * @property int $milliseconds * @property int $millisecond * @property int $milli * @property int $week 1 through 53 * @property int $isoWeek 1 through 53 * @property int $weekYear year according to week format * @property int $isoWeekYear year according to ISO week format * @property int $dayOfYear 1 through 366 * @property int $age does a diffInYears() with default parameters * @property int $offset the timezone offset in seconds from UTC * @property int $offsetMinutes the timezone offset in minutes from UTC * @property int $offsetHours the timezone offset in hours from UTC * @property CarbonTimeZone $timezone the current timezone * @property CarbonTimeZone $tz alias of $timezone * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday * @property-read int $daysInMonth number of days in the given month * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language * @property-read int $noZeroHour current hour from 1 to 24 * @property-read int $weeksInYear 51 through 53 * @property-read int $isoWeeksInYear 51 through 53 * @property-read int $weekOfMonth 1 through 5 * @property-read int $weekNumberInMonth 1 through 5 * @property-read int $firstWeekDay 0 through 6 * @property-read int $lastWeekDay 0 through 6 * @property-read int $daysInYear 365 or 366 * @property-read int $quarter the quarter of this instance, 1 - 4 * @property-read int $decade the decade of this instance * @property-read int $century the century of this instance * @property-read int $millennium the millennium of this instance * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise * @property-read bool $local checks if the timezone is local, true if local, false otherwise * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise * @property-read string $timezoneName the current timezone name * @property-read string $tzName alias of $timezoneName * @property-read string $locale locale of the current instance * * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) * @method bool isLocal() Check if the current instance has non-UTC timezone. * @method bool isValid() Check if the current instance is a valid date. * @method bool isDST() Check if the current instance is in a daylight saving time. * @method bool isSunday() Checks if the instance day is sunday. * @method bool isMonday() Checks if the instance day is monday. * @method bool isTuesday() Checks if the instance day is tuesday. * @method bool isWednesday() Checks if the instance day is wednesday. * @method bool isThursday() Checks if the instance day is thursday. * @method bool isFriday() Checks if the instance day is friday. * @method bool isSaturday() Checks if the instance day is saturday. * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. * @method CarbonInterface years(int $value) Set current instance year to the given value. * @method CarbonInterface year(int $value) Set current instance year to the given value. * @method CarbonInterface setYears(int $value) Set current instance year to the given value. * @method CarbonInterface setYear(int $value) Set current instance year to the given value. * @method CarbonInterface months(int $value) Set current instance month to the given value. * @method CarbonInterface month(int $value) Set current instance month to the given value. * @method CarbonInterface setMonths(int $value) Set current instance month to the given value. * @method CarbonInterface setMonth(int $value) Set current instance month to the given value. * @method CarbonInterface days(int $value) Set current instance day to the given value. * @method CarbonInterface day(int $value) Set current instance day to the given value. * @method CarbonInterface setDays(int $value) Set current instance day to the given value. * @method CarbonInterface setDay(int $value) Set current instance day to the given value. * @method CarbonInterface hours(int $value) Set current instance hour to the given value. * @method CarbonInterface hour(int $value) Set current instance hour to the given value. * @method CarbonInterface setHours(int $value) Set current instance hour to the given value. * @method CarbonInterface setHour(int $value) Set current instance hour to the given value. * @method CarbonInterface minutes(int $value) Set current instance minute to the given value. * @method CarbonInterface minute(int $value) Set current instance minute to the given value. * @method CarbonInterface setMinutes(int $value) Set current instance minute to the given value. * @method CarbonInterface setMinute(int $value) Set current instance minute to the given value. * @method CarbonInterface seconds(int $value) Set current instance second to the given value. * @method CarbonInterface second(int $value) Set current instance second to the given value. * @method CarbonInterface setSeconds(int $value) Set current instance second to the given value. * @method CarbonInterface setSecond(int $value) Set current instance second to the given value. * @method CarbonInterface millis(int $value) Set current instance millisecond to the given value. * @method CarbonInterface milli(int $value) Set current instance millisecond to the given value. * @method CarbonInterface setMillis(int $value) Set current instance millisecond to the given value. * @method CarbonInterface setMilli(int $value) Set current instance millisecond to the given value. * @method CarbonInterface milliseconds(int $value) Set current instance millisecond to the given value. * @method CarbonInterface millisecond(int $value) Set current instance millisecond to the given value. * @method CarbonInterface setMilliseconds(int $value) Set current instance millisecond to the given value. * @method CarbonInterface setMillisecond(int $value) Set current instance millisecond to the given value. * @method CarbonInterface micros(int $value) Set current instance microsecond to the given value. * @method CarbonInterface micro(int $value) Set current instance microsecond to the given value. * @method CarbonInterface setMicros(int $value) Set current instance microsecond to the given value. * @method CarbonInterface setMicro(int $value) Set current instance microsecond to the given value. * @method CarbonInterface microseconds(int $value) Set current instance microsecond to the given value. * @method CarbonInterface microsecond(int $value) Set current instance microsecond to the given value. * @method CarbonInterface setMicroseconds(int $value) Set current instance microsecond to the given value. * @method CarbonInterface setMicrosecond(int $value) Set current instance microsecond to the given value. * @method CarbonInterface addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addYear() Add one year to the instance (using date interval). * @method CarbonInterface subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subYear() Sub one year to the instance (using date interval). * @method CarbonInterface addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMonth() Add one month to the instance (using date interval). * @method CarbonInterface subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMonth() Sub one month to the instance (using date interval). * @method CarbonInterface addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addDay() Add one day to the instance (using date interval). * @method CarbonInterface subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subDay() Sub one day to the instance (using date interval). * @method CarbonInterface addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addHour() Add one hour to the instance (using date interval). * @method CarbonInterface subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subHour() Sub one hour to the instance (using date interval). * @method CarbonInterface addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMinute() Add one minute to the instance (using date interval). * @method CarbonInterface subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMinute() Sub one minute to the instance (using date interval). * @method CarbonInterface addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addSecond() Add one second to the instance (using date interval). * @method CarbonInterface subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subSecond() Sub one second to the instance (using date interval). * @method CarbonInterface addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMilli() Add one millisecond to the instance (using date interval). * @method CarbonInterface subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMilli() Sub one millisecond to the instance (using date interval). * @method CarbonInterface addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMillisecond() Add one millisecond to the instance (using date interval). * @method CarbonInterface subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMillisecond() Sub one millisecond to the instance (using date interval). * @method CarbonInterface addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMicro() Add one microsecond to the instance (using date interval). * @method CarbonInterface subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMicro() Sub one microsecond to the instance (using date interval). * @method CarbonInterface addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMicrosecond() Add one microsecond to the instance (using date interval). * @method CarbonInterface subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMicrosecond() Sub one microsecond to the instance (using date interval). * @method CarbonInterface addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addMillennium() Add one millennium to the instance (using date interval). * @method CarbonInterface subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subMillennium() Sub one millennium to the instance (using date interval). * @method CarbonInterface addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addCentury() Add one century to the instance (using date interval). * @method CarbonInterface subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subCentury() Sub one century to the instance (using date interval). * @method CarbonInterface addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addDecade() Add one decade to the instance (using date interval). * @method CarbonInterface subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subDecade() Sub one decade to the instance (using date interval). * @method CarbonInterface addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addQuarter() Add one quarter to the instance (using date interval). * @method CarbonInterface subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subQuarter() Sub one quarter to the instance (using date interval). * @method CarbonInterface addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. * @method CarbonInterface addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. * @method CarbonInterface addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addWeek() Add one week to the instance (using date interval). * @method CarbonInterface subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subWeek() Sub one week to the instance (using date interval). * @method CarbonInterface addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). * @method CarbonInterface addWeekday() Add one weekday to the instance (using date interval). * @method CarbonInterface subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). * @method CarbonInterface subWeekday() Sub one weekday to the instance (using date interval). * @method CarbonInterface addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMicro() Add one microsecond to the instance (using timestamp). * @method CarbonInterface subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMicro() Sub one microsecond to the instance (using timestamp). * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. * @method CarbonInterface addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMicrosecond() Add one microsecond to the instance (using timestamp). * @method CarbonInterface subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMicrosecond() Sub one microsecond to the instance (using timestamp). * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. * @method CarbonInterface addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMilli() Add one millisecond to the instance (using timestamp). * @method CarbonInterface subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMilli() Sub one millisecond to the instance (using timestamp). * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. * @method CarbonInterface addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMillisecond() Add one millisecond to the instance (using timestamp). * @method CarbonInterface subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMillisecond() Sub one millisecond to the instance (using timestamp). * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. * @method CarbonInterface addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealSecond() Add one second to the instance (using timestamp). * @method CarbonInterface subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealSecond() Sub one second to the instance (using timestamp). * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. * @method CarbonInterface addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMinute() Add one minute to the instance (using timestamp). * @method CarbonInterface subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMinute() Sub one minute to the instance (using timestamp). * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. * @method CarbonInterface addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealHour() Add one hour to the instance (using timestamp). * @method CarbonInterface subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealHour() Sub one hour to the instance (using timestamp). * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. * @method CarbonInterface addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealDay() Add one day to the instance (using timestamp). * @method CarbonInterface subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealDay() Sub one day to the instance (using timestamp). * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. * @method CarbonInterface addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealWeek() Add one week to the instance (using timestamp). * @method CarbonInterface subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealWeek() Sub one week to the instance (using timestamp). * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. * @method CarbonInterface addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMonth() Add one month to the instance (using timestamp). * @method CarbonInterface subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMonth() Sub one month to the instance (using timestamp). * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. * @method CarbonInterface addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealQuarter() Add one quarter to the instance (using timestamp). * @method CarbonInterface subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealQuarter() Sub one quarter to the instance (using timestamp). * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. * @method CarbonInterface addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealYear() Add one year to the instance (using timestamp). * @method CarbonInterface subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealYear() Sub one year to the instance (using timestamp). * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. * @method CarbonInterface addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealDecade() Add one decade to the instance (using timestamp). * @method CarbonInterface subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealDecade() Sub one decade to the instance (using timestamp). * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. * @method CarbonInterface addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealCentury() Add one century to the instance (using timestamp). * @method CarbonInterface subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealCentury() Sub one century to the instance (using timestamp). * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. * @method CarbonInterface addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface addRealMillennium() Add one millennium to the instance (using timestamp). * @method CarbonInterface subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). * @method CarbonInterface subRealMillennium() Sub one millennium to the instance (using timestamp). * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. * @method CarbonInterface roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method CarbonInterface roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method CarbonInterface floorYear(float $precision = 1) Truncate the current instance year with given precision. * @method CarbonInterface floorYears(float $precision = 1) Truncate the current instance year with given precision. * @method CarbonInterface ceilYear(float $precision = 1) Ceil the current instance year with given precision. * @method CarbonInterface ceilYears(float $precision = 1) Ceil the current instance year with given precision. * @method CarbonInterface roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method CarbonInterface roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method CarbonInterface floorMonth(float $precision = 1) Truncate the current instance month with given precision. * @method CarbonInterface floorMonths(float $precision = 1) Truncate the current instance month with given precision. * @method CarbonInterface ceilMonth(float $precision = 1) Ceil the current instance month with given precision. * @method CarbonInterface ceilMonths(float $precision = 1) Ceil the current instance month with given precision. * @method CarbonInterface roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method CarbonInterface roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method CarbonInterface floorDay(float $precision = 1) Truncate the current instance day with given precision. * @method CarbonInterface floorDays(float $precision = 1) Truncate the current instance day with given precision. * @method CarbonInterface ceilDay(float $precision = 1) Ceil the current instance day with given precision. * @method CarbonInterface ceilDays(float $precision = 1) Ceil the current instance day with given precision. * @method CarbonInterface roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method CarbonInterface roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method CarbonInterface floorHour(float $precision = 1) Truncate the current instance hour with given precision. * @method CarbonInterface floorHours(float $precision = 1) Truncate the current instance hour with given precision. * @method CarbonInterface ceilHour(float $precision = 1) Ceil the current instance hour with given precision. * @method CarbonInterface ceilHours(float $precision = 1) Ceil the current instance hour with given precision. * @method CarbonInterface roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method CarbonInterface roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method CarbonInterface floorMinute(float $precision = 1) Truncate the current instance minute with given precision. * @method CarbonInterface floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. * @method CarbonInterface ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. * @method CarbonInterface ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. * @method CarbonInterface roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method CarbonInterface roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method CarbonInterface floorSecond(float $precision = 1) Truncate the current instance second with given precision. * @method CarbonInterface floorSeconds(float $precision = 1) Truncate the current instance second with given precision. * @method CarbonInterface ceilSecond(float $precision = 1) Ceil the current instance second with given precision. * @method CarbonInterface ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. * @method CarbonInterface roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method CarbonInterface roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method CarbonInterface floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. * @method CarbonInterface floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. * @method CarbonInterface ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. * @method CarbonInterface ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. * @method CarbonInterface roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method CarbonInterface roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method CarbonInterface floorCentury(float $precision = 1) Truncate the current instance century with given precision. * @method CarbonInterface floorCenturies(float $precision = 1) Truncate the current instance century with given precision. * @method CarbonInterface ceilCentury(float $precision = 1) Ceil the current instance century with given precision. * @method CarbonInterface ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. * @method CarbonInterface roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method CarbonInterface roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method CarbonInterface floorDecade(float $precision = 1) Truncate the current instance decade with given precision. * @method CarbonInterface floorDecades(float $precision = 1) Truncate the current instance decade with given precision. * @method CarbonInterface ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. * @method CarbonInterface ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. * @method CarbonInterface roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method CarbonInterface roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method CarbonInterface floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. * @method CarbonInterface floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. * @method CarbonInterface ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. * @method CarbonInterface ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. * @method CarbonInterface roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method CarbonInterface roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method CarbonInterface floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. * @method CarbonInterface floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. * @method CarbonInterface ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. * @method CarbonInterface ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. * @method CarbonInterface roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method CarbonInterface roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method CarbonInterface floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. * @method CarbonInterface floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. * @method CarbonInterface ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. * @method CarbonInterface ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) * * */ interface CarbonInterface extends DateTimeInterface, JsonSerializable { /** * Diff wording options(expressed in octal). */ public const NO_ZERO_DIFF = 01; public const JUST_NOW = 02; public const ONE_DAY_WORDS = 04; public const TWO_DAY_WORDS = 010; public const SEQUENTIAL_PARTS_ONLY = 020; public const ROUND = 040; public const FLOOR = 0100; public const CEIL = 0200; /** * Diff syntax options. */ public const DIFF_ABSOLUTE = 1; // backward compatibility with true public const DIFF_RELATIVE_AUTO = 0; // backward compatibility with false public const DIFF_RELATIVE_TO_NOW = 2; public const DIFF_RELATIVE_TO_OTHER = 3; /** * Translate string options. */ public const TRANSLATE_MONTHS = 1; public const TRANSLATE_DAYS = 2; public const TRANSLATE_UNITS = 4; public const TRANSLATE_MERIDIEM = 8; public const TRANSLATE_DIFF = 0x10; public const TRANSLATE_ALL = self::TRANSLATE_MONTHS | self::TRANSLATE_DAYS | self::TRANSLATE_UNITS | self::TRANSLATE_MERIDIEM | self::TRANSLATE_DIFF; /** * The day constants. */ public const SUNDAY = 0; public const MONDAY = 1; public const TUESDAY = 2; public const WEDNESDAY = 3; public const THURSDAY = 4; public const FRIDAY = 5; public const SATURDAY = 6; /** * The month constants. * These aren't used by Carbon itself but exist for * convenience sake alone. */ public const JANUARY = 1; public const FEBRUARY = 2; public const MARCH = 3; public const APRIL = 4; public const MAY = 5; public const JUNE = 6; public const JULY = 7; public const AUGUST = 8; public const SEPTEMBER = 9; public const OCTOBER = 10; public const NOVEMBER = 11; public const DECEMBER = 12; /** * Number of X in Y. */ public const YEARS_PER_MILLENNIUM = 1000; public const YEARS_PER_CENTURY = 100; public const YEARS_PER_DECADE = 10; public const MONTHS_PER_YEAR = 12; public const MONTHS_PER_QUARTER = 3; public const QUARTERS_PER_YEAR = 4; public const WEEKS_PER_YEAR = 52; public const WEEKS_PER_MONTH = 4; public const DAYS_PER_YEAR = 365; public const DAYS_PER_WEEK = 7; public const HOURS_PER_DAY = 24; public const MINUTES_PER_HOUR = 60; public const SECONDS_PER_MINUTE = 60; public const MILLISECONDS_PER_SECOND = 1000; public const MICROSECONDS_PER_MILLISECOND = 1000; public const MICROSECONDS_PER_SECOND = 1000000; /** * Special settings to get the start of week from current locale culture. */ public const WEEK_DAY_AUTO = 'auto'; /** * RFC7231 DateTime format. * * @var string */ public const RFC7231_FORMAT = 'D, d M Y H:i:s \G\M\T'; /** * Default format to use for __toString method when type juggling occurs. * * @var string */ public const DEFAULT_TO_STRING_FORMAT = 'Y-m-d H:i:s'; /** * Format for converting mocked time, includes microseconds. * * @var string */ public const MOCK_DATETIME_FORMAT = 'Y-m-d H:i:s.u'; /** * Pattern detection for ->isoFormat and ::createFromIsoFormat. * * @var string */ public const ISO_FORMAT_REGEXP = '(O[YMDHhms]|[Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY?|g{1,5}|G{1,5}|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?)'; // /** * Dynamically handle calls to the class. * * @param string $method magic method name called * @param array $parameters parameters list * * @throws UnknownMethodException|BadMethodCallException|ReflectionException|Throwable * * @return mixed */ public function __call($method, $parameters); /** * Dynamically handle calls to the class. * * @param string $method magic method name called * @param array $parameters parameters list * * @throws BadMethodCallException * * @return mixed */ public static function __callStatic($method, $parameters); /** * Update constructedObjectId on cloned. */ public function __clone(); /** * Create a new Carbon instance. * * Please see the testing aids section (specifically static::setTestNow()) * for more on the possibility of this constructor returning a test instance. * * @param DateTimeInterface|string|null $time * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException */ public function __construct($time = null, $tz = null); /** * Show truthy properties on var_dump(). * * @return array */ public function __debugInfo(); /** * Get a part of the Carbon object * * @param string $name * * @throws UnknownGetterException * * @return string|int|bool|DateTimeZone|null */ public function __get($name); /** * Check if an attribute exists on the object * * @param string $name * * @return bool */ public function __isset($name); /** * Set a part of the Carbon object * * @param string $name * @param string|int|DateTimeZone $value * * @throws UnknownSetterException|ReflectionException * * @return void */ public function __set($name, $value); /** * The __set_state handler. * * @param string|array $dump * * @return static */ #[ReturnTypeWillChange] public static function __set_state($dump); /** * Returns the list of properties to dump on serialize() called on. * * Only used by PHP < 7.4. * * @return array */ public function __sleep(); /** * Format the instance as a string using the set format * * @example * ``` * echo Carbon::now(); // Carbon instances can be cast to string * ``` * * @return string */ public function __toString(); /** * Add given units or interval to the current instance. * * @example $date->add('hour', 3) * @example $date->add(15, 'days') * @example $date->add(CarbonInterval::days(4)) * * @param string|DateInterval|Closure|CarbonConverterInterface $unit * @param int $value * @param bool|null $overflow * * @return static */ #[ReturnTypeWillChange] public function add($unit, $value = 1, $overflow = null); /** * Add seconds to the instance using timestamp. Positive $value travels * forward while negative $value travels into the past. * * @param string $unit * @param int $value * * @return static */ public function addRealUnit($unit, $value = 1); /** * Add given units to the current instance. * * @param string $unit * @param int $value * @param bool|null $overflow * * @return static */ public function addUnit($unit, $value = 1, $overflow = null); /** * Add any unit to a new value without overflowing current other unit given. * * @param string $valueUnit unit name to modify * @param int $value amount to add to the input unit * @param string $overflowUnit unit name to not overflow * * @return static */ public function addUnitNoOverflow($valueUnit, $value, $overflowUnit); /** * Get the difference in a human readable format in the current locale from an other * instance given to now * * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single part) * @param int $options human diff options * * @return string */ public function ago($syntax = null, $short = false, $parts = 1, $options = null); /** * Modify the current instance to the average of a given instance (default now) and the current instance * (second-precision). * * @param \Carbon\Carbon|\DateTimeInterface|null $date * * @return static */ public function average($date = null); /** * Clone the current instance if it's mutable. * * This method is convenient to ensure you don't mutate the initial object * but avoid to make a useless copy of it if it's already immutable. * * @return static */ public function avoidMutation(); /** * Determines if the instance is between two others. * * The third argument allow you to specify if bounds are included or not (true by default) * but for when you including/excluding bounds may produce different results in your application, * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. * * @example * ``` * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * @param bool $equal Indicates if an equal to comparison should be done * * @return bool */ public function between($date1, $date2, $equal = true): bool; /** * Determines if the instance is between two others, bounds excluded. * * @example * ``` * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return bool */ public function betweenExcluded($date1, $date2): bool; /** * Determines if the instance is between two others, bounds included. * * @example * ``` * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return bool */ public function betweenIncluded($date1, $date2): bool; /** * Returns either day of week + time (e.g. "Last Friday at 3:30 PM") if reference time is within 7 days, * or a calendar date (e.g. "10/29/2017") otherwise. * * Language, date and time formats will change according to the current locale. * * @param Carbon|\DateTimeInterface|string|null $referenceTime * @param array $formats * * @return string */ public function calendar($referenceTime = null, array $formats = []); /** * Checks if the (date)time string is in a given format and valid to create a * new instance. * * @example * ``` * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false * ``` * * @param string $date * @param string $format * * @return bool */ public static function canBeCreatedFromFormat($date, $format); /** * Return the Carbon instance passed through, a now instance in the same timezone * if null given or parse the input if string given. * * @param Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|DateTimeInterface|string|null $date * * @return static */ public function carbonize($date = null); /** * Cast the current instance into the given class. * * @param string $className The $className::instance() method will be called to cast the current object. * * @return DateTimeInterface */ public function cast(string $className); /** * Ceil the current instance second with given precision if specified. * * @param float|int|string|\DateInterval|null $precision * * @return CarbonInterface */ public function ceil($precision = 1); /** * Ceil the current instance at the given unit with given precision if specified. * * @param string $unit * @param float|int $precision * * @return CarbonInterface */ public function ceilUnit($unit, $precision = 1); /** * Ceil the current instance week. * * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week * * @return CarbonInterface */ public function ceilWeek($weekStartsAt = null); /** * Similar to native modify() method of DateTime but can handle more grammars. * * @example * ``` * echo Carbon::now()->change('next 2pm'); * ``` * * @link https://php.net/manual/en/datetime.modify.php * * @param string $modifier * * @return static|false */ public function change($modifier); /** * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. * foreach ($date as $_) {} * serializer($date) * var_export($date) * get_object_vars($date) */ public function cleanupDumpProperties(); /** * @alias copy * * Get a copy of the instance. * * @return static */ public function clone(); /** * Get the closest date from the instance (second-precision). * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return static */ public function closest($date1, $date2); /** * Get a copy of the instance. * * @return static */ public function copy(); /** * Create a new Carbon instance from a specific date and time. * * If any of $year, $month or $day are set to null their now() values will * be used. * * If $hour is null it will be set to its now() value and the default * values for $minute and $second will be their now() values. * * If $hour is not null then the default values for $minute and $second * will be 0. * * @param DateTimeInterface|int|null $year * @param int|null $month * @param int|null $day * @param int|null $hour * @param int|null $minute * @param int|null $second * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static|false */ public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null); /** * Create a Carbon instance from just a date. The time portion is set to now. * * @param int|null $year * @param int|null $month * @param int|null $day * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function createFromDate($year = null, $month = null, $day = null, $tz = null); /** * Create a Carbon instance from a specific format. * * @param string $format Datetime format * @param string $time * @param DateTimeZone|string|false|null $tz * * @throws InvalidFormatException * * @return static|false */ #[ReturnTypeWillChange] public static function createFromFormat($format, $time, $tz = null); /** * Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). * * @param string $format Datetime format * @param string $time * @param DateTimeZone|string|false|null $tz optional timezone * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) * @param \Symfony\Component\Translation\TranslatorInterface $translator optional custom translator to use for macro-formats * * @throws InvalidFormatException * * @return static|false */ public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null); /** * Create a Carbon instance from a specific format and a string in a given language. * * @param string $format Datetime format * @param string $locale * @param string $time * @param DateTimeZone|string|false|null $tz * * @throws InvalidFormatException * * @return static|false */ public static function createFromLocaleFormat($format, $locale, $time, $tz = null); /** * Create a Carbon instance from a specific ISO format and a string in a given language. * * @param string $format Datetime ISO format * @param string $locale * @param string $time * @param DateTimeZone|string|false|null $tz * * @throws InvalidFormatException * * @return static|false */ public static function createFromLocaleIsoFormat($format, $locale, $time, $tz = null); /** * Create a Carbon instance from just a time. The date portion is set to today. * * @param int|null $hour * @param int|null $minute * @param int|null $second * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null); /** * Create a Carbon instance from a time string. The date portion is set to today. * * @param string $time * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function createFromTimeString($time, $tz = null); /** * Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $timestamp * @param \DateTimeZone|string|null $tz * * @return static */ public static function createFromTimestamp($timestamp, $tz = null); /** * Create a Carbon instance from a timestamp in milliseconds. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $timestamp * @param \DateTimeZone|string|null $tz * * @return static */ public static function createFromTimestampMs($timestamp, $tz = null); /** * Create a Carbon instance from a timestamp in milliseconds. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $timestamp * * @return static */ public static function createFromTimestampMsUTC($timestamp); /** * Create a Carbon instance from an timestamp keeping the timezone to UTC. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $timestamp * * @return static */ public static function createFromTimestampUTC($timestamp); /** * Create a Carbon instance from just a date. The time portion is set to midnight. * * @param int|null $year * @param int|null $month * @param int|null $day * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null); /** * Create a new safe Carbon instance from a specific date and time. * * If any of $year, $month or $day are set to null their now() values will * be used. * * If $hour is null it will be set to its now() value and the default * values for $minute and $second will be their now() values. * * If $hour is not null then the default values for $minute and $second * will be 0. * * If one of the set values is not valid, an InvalidDateException * will be thrown. * * @param int|null $year * @param int|null $month * @param int|null $day * @param int|null $hour * @param int|null $minute * @param int|null $second * @param DateTimeZone|string|null $tz * * @throws InvalidDateException * * @return static|false */ public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null); /** * Create a new Carbon instance from a specific date and time using strict validation. * * @see create() * * @param int|null $year * @param int|null $month * @param int|null $day * @param int|null $hour * @param int|null $minute * @param int|null $second * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null); /** * Get/set the day of year. * * @param int|null $value new value for day of year if using as setter. * * @return static|int */ public function dayOfYear($value = null); /** * Get the difference as a CarbonInterval instance. * Return relative interval (negative if $absolute flag is not set to true and the given date is before * current one). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return CarbonInterval */ public function diffAsCarbonInterval($date = null, $absolute = true, array $skip = []); /** * Get the difference by the given interval using a filter closure. * * @param CarbonInterval $ci An interval to traverse by * @param Closure $callback * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, $absolute = true); /** * Get the difference in a human readable format in the current locale from current instance to an other * instance given (or now if null given). * * @example * ``` * echo Carbon::tomorrow()->diffForHumans() . "\n"; * echo Carbon::tomorrow()->diffForHumans(['parts' => 2]) . "\n"; * echo Carbon::tomorrow()->diffForHumans(['parts' => 3, 'join' => true]) . "\n"; * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday()) . "\n"; * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday(), ['short' => true]) . "\n"; * ``` * * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; * if null passed, now will be used as comparison reference; * if any other type, it will be converted to date and used as reference. * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'skip' entry, list of units to skip (array of strings or a single string, * ` it can be the unit name (singular or plural) or its shortcut * ` (y, m, w, d, h, min, s, ms, µs). * - 'aUnit' entry, prefer "an hour" over "1 hour" if true * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'other' entry (see above) * - 'minimumUnit' entry determines the smallest unit of time to display can be long or * ` short form of the units, e.g. 'hour' or 'h' (default value: s) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single unit) * @param int $options human diff options * * @return string */ public function diffForHumans($other = null, $syntax = null, $short = false, $parts = 1, $options = null); /** * Get the difference in days rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInDays($date = null, $absolute = true); /** * Get the difference in days using a filter closure rounded down. * * @param Closure $callback * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInDaysFiltered(Closure $callback, $date = null, $absolute = true); /** * Get the difference in hours rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInHours($date = null, $absolute = true); /** * Get the difference in hours using a filter closure rounded down. * * @param Closure $callback * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInHoursFiltered(Closure $callback, $date = null, $absolute = true); /** * Get the difference in microseconds. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInMicroseconds($date = null, $absolute = true); /** * Get the difference in milliseconds rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInMilliseconds($date = null, $absolute = true); /** * Get the difference in minutes rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInMinutes($date = null, $absolute = true); /** * Get the difference in months rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInMonths($date = null, $absolute = true); /** * Get the difference in quarters rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInQuarters($date = null, $absolute = true); /** * Get the difference in hours rounded down using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInRealHours($date = null, $absolute = true); /** * Get the difference in microseconds using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInRealMicroseconds($date = null, $absolute = true); /** * Get the difference in milliseconds rounded down using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInRealMilliseconds($date = null, $absolute = true); /** * Get the difference in minutes rounded down using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInRealMinutes($date = null, $absolute = true); /** * Get the difference in seconds using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInRealSeconds($date = null, $absolute = true); /** * Get the difference in seconds rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInSeconds($date = null, $absolute = true); /** * Get the difference in weekdays rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInWeekdays($date = null, $absolute = true); /** * Get the difference in weekend days using a filter rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInWeekendDays($date = null, $absolute = true); /** * Get the difference in weeks rounded down. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInWeeks($date = null, $absolute = true); /** * Get the difference in years * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return int */ public function diffInYears($date = null, $absolute = true); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @see settings * * @param int $humanDiffOption */ public static function disableHumanDiffOption($humanDiffOption); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @see settings * * @param int $humanDiffOption */ public static function enableHumanDiffOption($humanDiffOption); /** * Modify to end of current given unit. * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16.334455') * ->startOf('month') * ->endOf('week', Carbon::FRIDAY); * ``` * * @param string $unit * @param array $params * * @return static */ public function endOf($unit, ...$params); /** * Resets the date to end of the century and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfCentury(); * ``` * * @return static */ public function endOfCentury(); /** * Resets the time to 23:59:59.999999 end of day * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfDay(); * ``` * * @return static */ public function endOfDay(); /** * Resets the date to end of the decade and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfDecade(); * ``` * * @return static */ public function endOfDecade(); /** * Modify to end of current hour, minutes and seconds become 59 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfHour(); * ``` * * @return static */ public function endOfHour(); /** * Resets the date to end of the millennium and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfMillennium(); * ``` * * @return static */ public function endOfMillennium(); /** * Modify to end of current minute, seconds become 59 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfMinute(); * ``` * * @return static */ public function endOfMinute(); /** * Resets the date to end of the month and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfMonth(); * ``` * * @return static */ public function endOfMonth(); /** * Resets the date to end of the quarter and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfQuarter(); * ``` * * @return static */ public function endOfQuarter(); /** * Modify to end of current second, microseconds become 999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16.334455') * ->endOfSecond() * ->format('H:i:s.u'); * ``` * * @return static */ public function endOfSecond(); /** * Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek() . "\n"; * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->endOfWeek() . "\n"; * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek(Carbon::SATURDAY) . "\n"; * ``` * * @param int $weekEndsAt optional start allow you to specify the day of week to use to end the week * * @return static */ public function endOfWeek($weekEndsAt = null); /** * Resets the date to end of the year and time to 23:59:59.999999 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->endOfYear(); * ``` * * @return static */ public function endOfYear(); /** * Determines if the instance is equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->eq(Carbon::parse('2018-07-25 12:45:16')); // true * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see equalTo() * * @return bool */ public function eq($date): bool; /** * Determines if the instance is equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->equalTo(Carbon::parse('2018-07-25 12:45:16')); // true * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function equalTo($date): bool; /** * Set the current locale to the given, execute the passed function, reset the locale to previous one, * then return the result of the closure (or null if the closure was void). * * @param string $locale locale ex. en * @param callable $func * * @return mixed */ public static function executeWithLocale($locale, $func); /** * Get the farthest date from the instance (second-precision). * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return static */ public function farthest($date1, $date2); /** * Modify to the first occurrence of a given day of the week * in the current month. If no dayOfWeek is provided, modify to the * first day of the current month. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek * * @return static */ public function firstOfMonth($dayOfWeek = null); /** * Modify to the first occurrence of a given day of the week * in the current quarter. If no dayOfWeek is provided, modify to the * first day of the current quarter. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek day of the week default null * * @return static */ public function firstOfQuarter($dayOfWeek = null); /** * Modify to the first occurrence of a given day of the week * in the current year. If no dayOfWeek is provided, modify to the * first day of the current year. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek day of the week default null * * @return static */ public function firstOfYear($dayOfWeek = null); /** * Get the difference in days as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInDays($date = null, $absolute = true); /** * Get the difference in hours as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInHours($date = null, $absolute = true); /** * Get the difference in minutes as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInMinutes($date = null, $absolute = true); /** * Get the difference in months as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInMonths($date = null, $absolute = true); /** * Get the difference in days as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealDays($date = null, $absolute = true); /** * Get the difference in hours as float (microsecond-precision) using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealHours($date = null, $absolute = true); /** * Get the difference in minutes as float (microsecond-precision) using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealMinutes($date = null, $absolute = true); /** * Get the difference in months as float (microsecond-precision) using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealMonths($date = null, $absolute = true); /** * Get the difference in seconds as float (microsecond-precision) using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealSeconds($date = null, $absolute = true); /** * Get the difference in weeks as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealWeeks($date = null, $absolute = true); /** * Get the difference in year as float (microsecond-precision) using timestamps. * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInRealYears($date = null, $absolute = true); /** * Get the difference in seconds as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInSeconds($date = null, $absolute = true); /** * Get the difference in weeks as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInWeeks($date = null, $absolute = true); /** * Get the difference in year as float (microsecond-precision). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference * * @return float */ public function floatDiffInYears($date = null, $absolute = true); /** * Round the current instance second with given precision if specified. * * @param float|int|string|\DateInterval|null $precision * * @return CarbonInterface */ public function floor($precision = 1); /** * Truncate the current instance at the given unit with given precision if specified. * * @param string $unit * @param float|int $precision * * @return CarbonInterface */ public function floorUnit($unit, $precision = 1); /** * Truncate the current instance week. * * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week * * @return CarbonInterface */ public function floorWeek($weekStartsAt = null); /** * Format the instance with the current locale. You can set the current * locale using setlocale() https://php.net/setlocale. * * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. * Use ->isoFormat() instead. * Deprecated since 2.55.0 * * @param string $format * * @return string */ public function formatLocalized($format); /** * @alias diffForHumans * * Get the difference in a human readable format in the current locale from current instance to an other * instance given (or now if null given). * * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; * if null passed, now will be used as comparison reference; * if any other type, it will be converted to date and used as reference. * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'other' entry (see above) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single unit) * @param int $options human diff options * * @return string */ public function from($other = null, $syntax = null, $short = false, $parts = 1, $options = null); /** * Get the difference in a human readable format in the current locale from current * instance to now. * * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single unit) * @param int $options human diff options * * @return string */ public function fromNow($syntax = null, $short = false, $parts = 1, $options = null); /** * Create an instance from a serialized string. * * @param string $value * * @throws InvalidFormatException * * @return static */ public static function fromSerialized($value); /** * Register a custom macro. * * @param object|callable $macro * @param int $priority marco with higher priority is tried first * * @return void */ public static function genericMacro($macro, $priority = 0); /** * Get a part of the Carbon object * * @param string $name * * @throws UnknownGetterException * * @return string|int|bool|DateTimeZone|null */ public function get($name); /** * Returns the alternative number for a given date property if available in the current locale. * * @param string $key date property * * @return string */ public function getAltNumber(string $key): string; /** * Returns the list of internally available locales and already loaded custom locales. * (It will ignore custom translator dynamic loading.) * * @return array */ public static function getAvailableLocales(); /** * Returns list of Language object for each available locale. This object allow you to get the ISO name, native * name, region and variant of the locale. * * @return Language[] */ public static function getAvailableLocalesInfo(); /** * Returns list of calendar formats for ISO formatting. * * @param string|null $locale current locale used if null * * @return array */ public function getCalendarFormats($locale = null); /** * Get the days of the week * * @return array */ public static function getDays(); /** * Return the number of days since the start of the week (using the current locale or the first parameter * if explicitly given). * * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, * if not provided, start of week is inferred from the locale * (Sunday for en_US, Monday for de_DE, etc.) * * @return int */ public function getDaysFromStartOfWeek(?int $weekStartsAt = null): int; /** * Get the fallback locale. * * @see https://symfony.com/doc/current/components/translation.html#fallback-locales * * @return string|null */ public static function getFallbackLocale(); /** * List of replacements from date() format to isoFormat(). * * @return array */ public static function getFormatsToIsoReplacements(); /** * Return default humanDiff() options (merged flags as integer). * * @return int */ public static function getHumanDiffOptions(); /** * Returns list of locale formats for ISO formatting. * * @param string|null $locale current locale used if null * * @return array */ public function getIsoFormats($locale = null); /** * Returns list of locale units for ISO formatting. * * @return array */ public static function getIsoUnits(); /** * {@inheritdoc} * * @return array */ #[ReturnTypeWillChange] public static function getLastErrors(); /** * Get the raw callable macro registered globally or locally for a given name. * * @param string $name * * @return callable|null */ public function getLocalMacro($name); /** * Get the translator of the current instance or the default if none set. * * @return \Symfony\Component\Translation\TranslatorInterface */ public function getLocalTranslator(); /** * Get the current translator locale. * * @return string */ public static function getLocale(); /** * Get the raw callable macro registered globally for a given name. * * @param string $name * * @return callable|null */ public static function getMacro($name); /** * get midday/noon hour * * @return int */ public static function getMidDayAt(); /** * Returns the offset hour and minute formatted with +/- and a given separator (":" by default). * For example, if the time zone is 9 hours 30 minutes, you'll get "+09:30", with "@@" as first * argument, "+09@@30", with "" as first argument, "+0930". Negative offset will return something * like "-12:00". * * @param string $separator string to place between hours and minutes (":" by default) * * @return string */ public function getOffsetString($separator = ':'); /** * Returns a unit of the instance padded with 0 by default or any other string if specified. * * @param string $unit Carbon unit name * @param int $length Length of the output (2 by default) * @param string $padString String to use for padding ("0" by default) * @param int $padType Side(s) to pad (STR_PAD_LEFT by default) * * @return string */ public function getPaddedUnit($unit, $length = 2, $padString = '0', $padType = 0); /** * Returns a timestamp rounded with the given precision (6 by default). * * @example getPreciseTimestamp() 1532087464437474 (microsecond maximum precision) * @example getPreciseTimestamp(6) 1532087464437474 * @example getPreciseTimestamp(5) 153208746443747 (1/100000 second precision) * @example getPreciseTimestamp(4) 15320874644375 (1/10000 second precision) * @example getPreciseTimestamp(3) 1532087464437 (millisecond precision) * @example getPreciseTimestamp(2) 153208746444 (1/100 second precision) * @example getPreciseTimestamp(1) 15320874644 (1/10 second precision) * @example getPreciseTimestamp(0) 1532087464 (second precision) * @example getPreciseTimestamp(-1) 153208746 (10 second precision) * @example getPreciseTimestamp(-2) 15320875 (100 second precision) * * @param int $precision * * @return float */ public function getPreciseTimestamp($precision = 6); /** * Returns current local settings. * * @return array */ public function getSettings(); /** * Get the Carbon instance (real or mock) to be returned when a "now" * instance is created. * * @return Closure|static the current instance used for testing */ public static function getTestNow(); /** * Return a format from H:i to H:i:s.u according to given unit precision. * * @param string $unitPrecision "minute", "second", "millisecond" or "microsecond" * * @return string */ public static function getTimeFormatByPrecision($unitPrecision); /** * Returns the timestamp with millisecond precision. * * @return int */ public function getTimestampMs(); /** * Get the translation of the current week day name (with context for languages with multiple forms). * * @param string|null $context whole format string * @param string $keySuffix "", "_short" or "_min" * @param string|null $defaultValue default value if translation missing * * @return string */ public function getTranslatedDayName($context = null, $keySuffix = '', $defaultValue = null); /** * Get the translation of the current abbreviated week day name (with context for languages with multiple forms). * * @param string|null $context whole format string * * @return string */ public function getTranslatedMinDayName($context = null); /** * Get the translation of the current month day name (with context for languages with multiple forms). * * @param string|null $context whole format string * @param string $keySuffix "" or "_short" * @param string|null $defaultValue default value if translation missing * * @return string */ public function getTranslatedMonthName($context = null, $keySuffix = '', $defaultValue = null); /** * Get the translation of the current short week day name (with context for languages with multiple forms). * * @param string|null $context whole format string * * @return string */ public function getTranslatedShortDayName($context = null); /** * Get the translation of the current short month day name (with context for languages with multiple forms). * * @param string|null $context whole format string * * @return string */ public function getTranslatedShortMonthName($context = null); /** * Returns raw translation message for a given key. * * @param string $key key to find * @param string|null $locale current locale used if null * @param string|null $default default value if translation returns the key * @param \Symfony\Component\Translation\TranslatorInterface $translator an optional translator to use * * @return string */ public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null); /** * Returns raw translation message for a given key. * * @param \Symfony\Component\Translation\TranslatorInterface $translator the translator to use * @param string $key key to find * @param string|null $locale current locale used if null * @param string|null $default default value if translation returns the key * * @return string */ public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null); /** * Get the default translator instance in use. * * @return \Symfony\Component\Translation\TranslatorInterface */ public static function getTranslator(); /** * Get the last day of week * * @return int */ public static function getWeekEndsAt(); /** * Get the first day of week * * @return int */ public static function getWeekStartsAt(); /** * Get weekend days * * @return array */ public static function getWeekendDays(); /** * Determines if the instance is greater (after) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:15'); // true * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function greaterThan($date): bool; /** * Determines if the instance is greater (after) than or equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:15'); // true * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function greaterThanOrEqualTo($date): bool; /** * Determines if the instance is greater (after) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:15'); // true * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see greaterThan() * * @return bool */ public function gt($date): bool; /** * Determines if the instance is greater (after) than or equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:15'); // true * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see greaterThanOrEqualTo() * * @return bool */ public function gte($date): bool; /** * Checks if the (date)time string is in a given format. * * @example * ``` * Carbon::hasFormat('11:12:45', 'h:i:s'); // true * Carbon::hasFormat('13:12:45', 'h:i:s'); // false * ``` * * @param string $date * @param string $format * * @return bool */ public static function hasFormat($date, $format); /** * Checks if the (date)time string is in a given format. * * @example * ``` * Carbon::hasFormatWithModifiers('31/08/2015', 'd#m#Y'); // true * Carbon::hasFormatWithModifiers('31/08/2015', 'm#d#Y'); // false * ``` * * @param string $date * @param string $format * * @return bool */ public static function hasFormatWithModifiers($date, $format): bool; /** * Checks if macro is registered globally or locally. * * @param string $name * * @return bool */ public function hasLocalMacro($name); /** * Return true if the current instance has its own translator. * * @return bool */ public function hasLocalTranslator(); /** * Checks if macro is registered globally. * * @param string $name * * @return bool */ public static function hasMacro($name); /** * Determine if a time string will produce a relative date. * * @param string $time * * @return bool true if time match a relative date, false if absolute or invalid time string */ public static function hasRelativeKeywords($time); /** * Determine if there is a valid test instance set. A valid test instance * is anything that is not null. * * @return bool true if there is a test instance, otherwise false */ public static function hasTestNow(); /** * Create a Carbon instance from a DateTime one. * * @param DateTimeInterface $date * * @return static */ public static function instance($date); /** * Returns true if the current date matches the given string. * * @example * ``` * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2018')); // false * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('06-02')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06-02')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('Sunday')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('June')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:45')); // true * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:00')); // false * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12h')); // true * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3pm')); // true * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3am')); // false * ``` * * @param string $tester day name, month name, hour, date, etc. as string * * @return bool */ public function is(string $tester); /** * Determines if the instance is greater (after) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:15'); // true * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:17'); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see greaterThan() * * @return bool */ public function isAfter($date): bool; /** * Determines if the instance is less (before) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:15'); // false * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see lessThan() * * @return bool */ public function isBefore($date): bool; /** * Determines if the instance is between two others * * @example * ``` * Carbon::parse('2018-07-25')->isBetween('2018-07-14', '2018-08-01'); // true * Carbon::parse('2018-07-25')->isBetween('2018-08-01', '2018-08-20'); // false * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01'); // true * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01', false); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * @param bool $equal Indicates if an equal to comparison should be done * * @return bool */ public function isBetween($date1, $date2, $equal = true): bool; /** * Check if its the birthday. Compares the date/month values of the two dates. * * @example * ``` * Carbon::now()->subYears(5)->isBirthday(); // true * Carbon::now()->subYears(5)->subDay()->isBirthday(); // false * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false * ``` * * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. * * @return bool */ public function isBirthday($date = null); /** * Determines if the instance is in the current unit given. * * @example * ``` * Carbon::now()->isCurrentUnit('hour'); // true * Carbon::now()->subHours(2)->isCurrentUnit('hour'); // false * ``` * * @param string $unit The unit to test. * * @throws BadMethodCallException * * @return bool */ public function isCurrentUnit($unit); /** * Checks if this day is a specific day of the week. * * @example * ``` * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::WEDNESDAY); // true * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::FRIDAY); // false * Carbon::parse('2019-07-17')->isDayOfWeek('Wednesday'); // true * Carbon::parse('2019-07-17')->isDayOfWeek('Friday'); // false * ``` * * @param int $dayOfWeek * * @return bool */ public function isDayOfWeek($dayOfWeek); /** * Check if the instance is end of day. * * @example * ``` * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(); // true * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(); // true * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(); // true * Carbon::parse('2019-02-28 23:59:58.999999')->isEndOfDay(); // false * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(true); // true * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(true); // false * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(true); // false * ``` * * @param bool $checkMicroseconds check time at microseconds precision * * @return bool */ public function isEndOfDay($checkMicroseconds = false); /** * Returns true if the date was created using CarbonImmutable::endOfTime() * * @return bool */ public function isEndOfTime(): bool; /** * Determines if the instance is in the future, ie. greater (after) than now. * * @example * ``` * Carbon::now()->addHours(5)->isFuture(); // true * Carbon::now()->subHours(5)->isFuture(); // false * ``` * * @return bool */ public function isFuture(); /** * Returns true if the current class/instance is immutable. * * @return bool */ public static function isImmutable(); /** * Check if today is the last day of the Month * * @example * ``` * Carbon::parse('2019-02-28')->isLastOfMonth(); // true * Carbon::parse('2019-03-28')->isLastOfMonth(); // false * Carbon::parse('2019-03-30')->isLastOfMonth(); // false * Carbon::parse('2019-03-31')->isLastOfMonth(); // true * Carbon::parse('2019-04-30')->isLastOfMonth(); // true * ``` * * @return bool */ public function isLastOfMonth(); /** * Determines if the instance is a leap year. * * @example * ``` * Carbon::parse('2020-01-01')->isLeapYear(); // true * Carbon::parse('2019-01-01')->isLeapYear(); // false * ``` * * @return bool */ public function isLeapYear(); /** * Determines if the instance is a long year (using ISO 8601 year). * * @example * ``` * Carbon::parse('2015-01-01')->isLongIsoYear(); // true * Carbon::parse('2016-01-01')->isLongIsoYear(); // true * Carbon::parse('2016-01-03')->isLongIsoYear(); // false * Carbon::parse('2019-12-29')->isLongIsoYear(); // false * Carbon::parse('2019-12-30')->isLongIsoYear(); // true * ``` * * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates * * @return bool */ public function isLongIsoYear(); /** * Determines if the instance is a long year (using calendar year). * * ⚠️ This method completely ignores month and day to use the numeric year number, * it's not correct if the exact date matters. For instance as `2019-12-30` is already * in the first week of the 2020 year, if you want to know from this date if ISO week * year 2020 is a long year, use `isLongIsoYear` instead. * * @example * ``` * Carbon::create(2015)->isLongYear(); // true * Carbon::create(2016)->isLongYear(); // false * ``` * * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates * * @return bool */ public function isLongYear(); /** * Check if the instance is midday. * * @example * ``` * Carbon::parse('2019-02-28 11:59:59.999999')->isMidday(); // false * Carbon::parse('2019-02-28 12:00:00')->isMidday(); // true * Carbon::parse('2019-02-28 12:00:00.999999')->isMidday(); // true * Carbon::parse('2019-02-28 12:00:01')->isMidday(); // false * ``` * * @return bool */ public function isMidday(); /** * Check if the instance is start of day / midnight. * * @example * ``` * Carbon::parse('2019-02-28 00:00:00')->isMidnight(); // true * Carbon::parse('2019-02-28 00:00:00.999999')->isMidnight(); // true * Carbon::parse('2019-02-28 00:00:01')->isMidnight(); // false * ``` * * @return bool */ public function isMidnight(); /** * Returns true if a property can be changed via setter. * * @param string $unit * * @return bool */ public static function isModifiableUnit($unit); /** * Returns true if the current class/instance is mutable. * * @return bool */ public static function isMutable(); /** * Determines if the instance is in the past, ie. less (before) than now. * * @example * ``` * Carbon::now()->subHours(5)->isPast(); // true * Carbon::now()->addHours(5)->isPast(); // false * ``` * * @return bool */ public function isPast(); /** * Compares the formatted values of the two dates. * * @example * ``` * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false * ``` * * @param string $format date formats to compare. * @param \Carbon\Carbon|\DateTimeInterface|string|null $date instance to compare with or null to use current day. * * @return bool */ public function isSameAs($format, $date = null); /** * Checks if the passed in date is in the same month as the instance´s month. * * @example * ``` * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-01-01')); // true * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-02-01')); // false * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. * @param bool $ofSameYear Check if it is the same month in the same year. * * @return bool */ public function isSameMonth($date = null, $ofSameYear = true); /** * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). * * @example * ``` * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-03-01')); // true * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-04-01')); // false * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01')); // false * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01'), false); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|string|null $date The instance to compare with or null to use current day. * @param bool $ofSameYear Check if it is the same month in the same year. * * @return bool */ public function isSameQuarter($date = null, $ofSameYear = true); /** * Determines if the instance is in the current unit given. * * @example * ``` * Carbon::parse('2019-01-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // true * Carbon::parse('2018-12-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // false * ``` * * @param string $unit singular unit string * @param \Carbon\Carbon|\DateTimeInterface|null $date instance to compare with or null to use current day. * * @throws BadComparisonUnitException * * @return bool */ public function isSameUnit($unit, $date = null); /** * Check if the instance is start of day / midnight. * * @example * ``` * Carbon::parse('2019-02-28 00:00:00')->isStartOfDay(); // true * Carbon::parse('2019-02-28 00:00:00.999999')->isStartOfDay(); // true * Carbon::parse('2019-02-28 00:00:01')->isStartOfDay(); // false * Carbon::parse('2019-02-28 00:00:00.000000')->isStartOfDay(true); // true * Carbon::parse('2019-02-28 00:00:00.000012')->isStartOfDay(true); // false * ``` * * @param bool $checkMicroseconds check time at microseconds precision * * @return bool */ public function isStartOfDay($checkMicroseconds = false); /** * Returns true if the date was created using CarbonImmutable::startOfTime() * * @return bool */ public function isStartOfTime(): bool; /** * Returns true if the strict mode is globally in use, false else. * (It can be overridden in specific instances.) * * @return bool */ public static function isStrictModeEnabled(); /** * Determines if the instance is today. * * @example * ``` * Carbon::today()->isToday(); // true * Carbon::tomorrow()->isToday(); // false * ``` * * @return bool */ public function isToday(); /** * Determines if the instance is tomorrow. * * @example * ``` * Carbon::tomorrow()->isTomorrow(); // true * Carbon::yesterday()->isTomorrow(); // false * ``` * * @return bool */ public function isTomorrow(); /** * Determines if the instance is a weekday. * * @example * ``` * Carbon::parse('2019-07-14')->isWeekday(); // false * Carbon::parse('2019-07-15')->isWeekday(); // true * ``` * * @return bool */ public function isWeekday(); /** * Determines if the instance is a weekend day. * * @example * ``` * Carbon::parse('2019-07-14')->isWeekend(); // true * Carbon::parse('2019-07-15')->isWeekend(); // false * ``` * * @return bool */ public function isWeekend(); /** * Determines if the instance is yesterday. * * @example * ``` * Carbon::yesterday()->isYesterday(); // true * Carbon::tomorrow()->isYesterday(); // false * ``` * * @return bool */ public function isYesterday(); /** * Format in the current language using ISO replacement patterns. * * @param string $format * @param string|null $originalFormat provide context if a chunk has been passed alone * * @return string */ public function isoFormat(string $format, ?string $originalFormat = null): string; /** * Get/set the week number using given first day of week and first * day of year included in the first week. Or use ISO format if no settings * given. * * @param int|null $week * @param int|null $dayOfWeek * @param int|null $dayOfYear * * @return int|static */ public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = null); /** * Set/get the week number of year using given first day of week and first * day of year included in the first week. Or use ISO format if no settings * given. * * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) * @param int|null $dayOfYear first day of year included in the week #1 * * @return int|static */ public function isoWeekYear($year = null, $dayOfWeek = null, $dayOfYear = null); /** * Get/set the ISO weekday from 1 (Monday) to 7 (Sunday). * * @param int|null $value new value for weekday if using as setter. * * @return static|int */ public function isoWeekday($value = null); /** * Get the number of weeks of the current week-year using given first day of week and first * day of year included in the first week. Or use ISO format if no settings * given. * * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) * @param int|null $dayOfYear first day of year included in the week #1 * * @return int */ public function isoWeeksInYear($dayOfWeek = null, $dayOfYear = null); /** * Prepare the object for JSON serialization. * * @return array|string */ #[ReturnTypeWillChange] public function jsonSerialize(); /** * Modify to the last occurrence of a given day of the week * in the current month. If no dayOfWeek is provided, modify to the * last day of the current month. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek * * @return static */ public function lastOfMonth($dayOfWeek = null); /** * Modify to the last occurrence of a given day of the week * in the current quarter. If no dayOfWeek is provided, modify to the * last day of the current quarter. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek day of the week default null * * @return static */ public function lastOfQuarter($dayOfWeek = null); /** * Modify to the last occurrence of a given day of the week * in the current year. If no dayOfWeek is provided, modify to the * last day of the current year. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int|null $dayOfWeek day of the week default null * * @return static */ public function lastOfYear($dayOfWeek = null); /** * Determines if the instance is less (before) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:15'); // false * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function lessThan($date): bool; /** * Determines if the instance is less (before) or equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:15'); // false * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function lessThanOrEqualTo($date): bool; /** * Get/set the locale for the current instance. * * @param string|null $locale * @param string ...$fallbackLocales * * @return $this|string */ public function locale(?string $locale = null, ...$fallbackLocales); /** * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). * Support is considered enabled if the 3 words are translated in the given locale. * * @param string $locale locale ex. en * * @return bool */ public static function localeHasDiffOneDayWords($locale); /** * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). * Support is considered enabled if the 4 sentences are translated in the given locale. * * @param string $locale locale ex. en * * @return bool */ public static function localeHasDiffSyntax($locale); /** * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). * Support is considered enabled if the 2 words are translated in the given locale. * * @param string $locale locale ex. en * * @return bool */ public static function localeHasDiffTwoDayWords($locale); /** * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). * Support is considered enabled if the 4 sentences are translated in the given locale. * * @param string $locale locale ex. en * * @return bool */ public static function localeHasPeriodSyntax($locale); /** * Returns true if the given locale is internally supported and has short-units support. * Support is considered enabled if either year, day or hour has a short variant translated. * * @param string $locale locale ex. en * * @return bool */ public static function localeHasShortUnits($locale); /** * Determines if the instance is less (before) than another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:15'); // false * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see lessThan() * * @return bool */ public function lt($date): bool; /** * Determines if the instance is less (before) or equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:15'); // false * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:16'); // true * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see lessThanOrEqualTo() * * @return bool */ public function lte($date): bool; /** * Register a custom macro. * * @example * ``` * $userSettings = [ * 'locale' => 'pt', * 'timezone' => 'America/Sao_Paulo', * ]; * Carbon::macro('userFormat', function () use ($userSettings) { * return $this->copy()->locale($userSettings['locale'])->tz($userSettings['timezone'])->calendar(); * }); * echo Carbon::yesterday()->hours(11)->userFormat(); * ``` * * @param string $name * @param object|callable $macro * * @return void */ public static function macro($name, $macro); /** * Make a Carbon instance from given variable if possible. * * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals * and recurrences). Throw an exception for invalid format, but otherwise return null. * * @param mixed $var * * @throws InvalidFormatException * * @return static|null */ public static function make($var); /** * Get the maximum instance between a given instance (default now) and the current instance. * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return static */ public function max($date = null); /** * Create a Carbon instance for the greatest supported date. * * @return static */ public static function maxValue(); /** * Get the maximum instance between a given instance (default now) and the current instance. * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see max() * * @return static */ public function maximum($date = null); /** * Return the meridiem of the current time in the current locale. * * @param bool $isLower if true, returns lowercase variant if available in the current locale. * * @return string */ public function meridiem(bool $isLower = false): string; /** * Modify to midday, default to self::$midDayAt * * @return static */ public function midDay(); /** * Get the minimum instance between a given instance (default now) and the current instance. * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return static */ public function min($date = null); /** * Create a Carbon instance for the lowest supported date. * * @return static */ public static function minValue(); /** * Get the minimum instance between a given instance (default now) and the current instance. * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see min() * * @return static */ public function minimum($date = null); /** * Mix another object into the class. * * @example * ``` * Carbon::mixin(new class { * public function addMoon() { * return function () { * return $this->addDays(30); * }; * } * public function subMoon() { * return function () { * return $this->subDays(30); * }; * } * }); * $fullMoon = Carbon::create('2018-12-22'); * $nextFullMoon = $fullMoon->addMoon(); * $blackMoon = Carbon::create('2019-01-06'); * $previousBlackMoon = $blackMoon->subMoon(); * echo "$nextFullMoon\n"; * echo "$previousBlackMoon\n"; * ``` * * @param object|string $mixin * * @throws ReflectionException * * @return void */ public static function mixin($mixin); /** * Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else. * * @see https://php.net/manual/en/datetime.modify.php * * @return static|false */ #[ReturnTypeWillChange] public function modify($modify); /** * Determines if the instance is not equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->ne(Carbon::parse('2018-07-25 12:45:16')); // false * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see notEqualTo() * * @return bool */ public function ne($date): bool; /** * Modify to the next occurrence of a given modifier such as a day of * the week. If no modifier is provided, modify to the next occurrence * of the current day of the week. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param string|int|null $modifier * * @return static|false */ public function next($modifier = null); /** * Go forward to the next weekday. * * @return static */ public function nextWeekday(); /** * Go forward to the next weekend day. * * @return static */ public function nextWeekendDay(); /** * Determines if the instance is not equal to another * * @example * ``` * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:16'); // false * Carbon::parse('2018-07-25 12:45:16')->notEqualTo(Carbon::parse('2018-07-25 12:45:16')); // false * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:17'); // true * ``` * * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ public function notEqualTo($date): bool; /** * Get a Carbon instance for the current date and time. * * @param DateTimeZone|string|null $tz * * @return static */ public static function now($tz = null); /** * Returns a present instance in the same timezone. * * @return static */ public function nowWithSameTz(); /** * Modify to the given occurrence of a given day of the week * in the current month. If the calculated occurrence is outside the scope * of the current month, then return false and no modifications are made. * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int $nth * @param int $dayOfWeek * * @return mixed */ public function nthOfMonth($nth, $dayOfWeek); /** * Modify to the given occurrence of a given day of the week * in the current quarter. If the calculated occurrence is outside the scope * of the current quarter, then return false and no modifications are made. * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int $nth * @param int $dayOfWeek * * @return mixed */ public function nthOfQuarter($nth, $dayOfWeek); /** * Modify to the given occurrence of a given day of the week * in the current year. If the calculated occurrence is outside the scope * of the current year, then return false and no modifications are made. * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param int $nth * @param int $dayOfWeek * * @return mixed */ public function nthOfYear($nth, $dayOfWeek); /** * Return a property with its ordinal. * * @param string $key * @param string|null $period * * @return string */ public function ordinal(string $key, ?string $period = null): string; /** * Create a carbon instance from a string. * * This is an alias for the constructor that allows better fluent syntax * as it allows you to do Carbon::parse('Monday next week')->fn() rather * than (new Carbon('Monday next week'))->fn(). * * @param string|DateTimeInterface|null $time * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function parse($time = null, $tz = null); /** * Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). * * @param string $time date/time string in the given language (may also contain English). * @param string|null $locale if locale is null or not specified, current global locale will be * used instead. * @param DateTimeZone|string|null $tz optional timezone for the new instance. * * @throws InvalidFormatException * * @return static */ public static function parseFromLocale($time, $locale = null, $tz = null); /** * Returns standardized plural of a given singular/plural unit name (in English). * * @param string $unit * * @return string */ public static function pluralUnit(string $unit): string; /** * Modify to the previous occurrence of a given modifier such as a day of * the week. If no dayOfWeek is provided, modify to the previous occurrence * of the current day of the week. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * * @param string|int|null $modifier * * @return static|false */ public function previous($modifier = null); /** * Go backward to the previous weekday. * * @return static */ public function previousWeekday(); /** * Go backward to the previous weekend day. * * @return static */ public function previousWeekendDay(); /** * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). * * @param \DateTimeInterface|Carbon|CarbonImmutable|null $end period end date * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit * @param string|null $unit if specified, $interval must be an integer * * @return CarbonPeriod */ public function range($end = null, $interval = null, $unit = null); /** * Call native PHP DateTime/DateTimeImmutable add() method. * * @param DateInterval $interval * * @return static */ public function rawAdd(DateInterval $interval); /** * Create a Carbon instance from a specific format. * * @param string $format Datetime format * @param string $time * @param DateTimeZone|string|false|null $tz * * @throws InvalidFormatException * * @return static|false */ public static function rawCreateFromFormat($format, $time, $tz = null); /** * @see https://php.net/manual/en/datetime.format.php * * @param string $format * * @return string */ public function rawFormat($format); /** * Create a carbon instance from a string. * * This is an alias for the constructor that allows better fluent syntax * as it allows you to do Carbon::parse('Monday next week')->fn() rather * than (new Carbon('Monday next week'))->fn(). * * @param string|DateTimeInterface|null $time * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * * @return static */ public static function rawParse($time = null, $tz = null); /** * Call native PHP DateTime/DateTimeImmutable sub() method. * * @param DateInterval $interval * * @return static */ public function rawSub(DateInterval $interval); /** * Remove all macros and generic macros. */ public static function resetMacros(); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @see settings * * Reset the month overflow behavior. * * @return void */ public static function resetMonthsOverflow(); /** * Reset the format used to the default when type juggling a Carbon instance to a string * * @return void */ public static function resetToStringFormat(); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @see settings * * Reset the month overflow behavior. * * @return void */ public static function resetYearsOverflow(); /** * Round the current instance second with given precision if specified. * * @param float|int|string|\DateInterval|null $precision * @param string $function * * @return CarbonInterface */ public function round($precision = 1, $function = 'round'); /** * Round the current instance at the given unit with given precision if specified and the given function. * * @param string $unit * @param float|int $precision * @param string $function * * @return CarbonInterface */ public function roundUnit($unit, $precision = 1, $function = 'round'); /** * Round the current instance week. * * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week * * @return CarbonInterface */ public function roundWeek($weekStartsAt = null); /** * The number of seconds since midnight. * * @return int */ public function secondsSinceMidnight(); /** * The number of seconds until 23:59:59. * * @return int */ public function secondsUntilEndOfDay(); /** * Return a serialized string of the instance. * * @return string */ public function serialize(); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather transform Carbon object before the serialization. * * JSON serialize all Carbon instances using the given callback. * * @param callable $callback * * @return void */ public static function serializeUsing($callback); /** * Set a part of the Carbon object * * @param string|array $name * @param string|int|DateTimeZone $value * * @throws ImmutableException|UnknownSetterException * * @return $this */ public function set($name, $value = null); /** * Set the date with gregorian year, month and day numbers. * * @see https://php.net/manual/en/datetime.setdate.php * * @param int $year * @param int $month * @param int $day * * @return static */ #[ReturnTypeWillChange] public function setDate($year, $month, $day); /** * Set the year, month, and date for this instance to that of the passed instance. * * @param Carbon|DateTimeInterface $date now if null * * @return static */ public function setDateFrom($date = null); /** * Set the date and time all together. * * @param int $year * @param int $month * @param int $day * @param int $hour * @param int $minute * @param int $second * @param int $microseconds * * @return static */ public function setDateTime($year, $month, $day, $hour, $minute, $second = 0, $microseconds = 0); /** * Set the date and time for this instance to that of the passed instance. * * @param Carbon|DateTimeInterface $date * * @return static */ public function setDateTimeFrom($date = null); /** * Set the day (keeping the current time) to the start of the week + the number of days passed as the first * parameter. First day of week is driven by the locale unless explicitly set with the second parameter. * * @param int $numberOfDays number of days to add after the start of the current week * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, * if not provided, start of week is inferred from the locale * (Sunday for en_US, Monday for de_DE, etc.) * * @return static */ public function setDaysFromStartOfWeek(int $numberOfDays, ?int $weekStartsAt = null); /** * Set the fallback locale. * * @see https://symfony.com/doc/current/components/translation.html#fallback-locales * * @param string $locale */ public static function setFallbackLocale($locale); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @see settings * * @param int $humanDiffOptions */ public static function setHumanDiffOptions($humanDiffOptions); /** * Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates. * * @see https://php.net/manual/en/datetime.setisodate.php * * @param int $year * @param int $week * @param int $day * * @return static */ #[ReturnTypeWillChange] public function setISODate($year, $week, $day = 1); /** * Set the translator for the current instance. * * @param \Symfony\Component\Translation\TranslatorInterface $translator * * @return $this */ public function setLocalTranslator(TranslatorInterface $translator); /** * Set the current translator locale and indicate if the source locale file exists. * Pass 'auto' as locale to use closest language from the current LC_TIME locale. * * @param string $locale locale ex. en * * @return bool */ public static function setLocale($locale); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather consider mid-day is always 12pm, then if you need to test if it's an other * hour, test it explicitly: * $date->format('G') == 13 * or to set explicitly to a given hour: * $date->setTime(13, 0, 0, 0) * * Set midday/noon hour * * @param int $hour midday hour * * @return void */ public static function setMidDayAt($hour); /** * Set a Carbon instance (real or mock) to be returned when a "now" * instance is created. The provided instance will be returned * specifically under the following conditions: * - A call to the static now() method, ex. Carbon::now() * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') * - When a string containing the desired time is passed to Carbon::parse(). * * Note the timezone parameter was left out of the examples above and * has no affect as the mock value will be returned regardless of its value. * * Only the moment is mocked with setTestNow(), the timezone will still be the one passed * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). * * To clear the test instance call this method using the default * parameter of null. * * /!\ Use this method for unit tests only. * * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance */ public static function setTestNow($testNow = null); /** * Set a Carbon instance (real or mock) to be returned when a "now" * instance is created. The provided instance will be returned * specifically under the following conditions: * - A call to the static now() method, ex. Carbon::now() * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') * - When a string containing the desired time is passed to Carbon::parse(). * * It will also align default timezone (e.g. call date_default_timezone_set()) with * the second argument or if null, with the timezone of the given date object. * * To clear the test instance call this method using the default * parameter of null. * * /!\ Use this method for unit tests only. * * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance */ public static function setTestNowAndTimezone($testNow = null, $tz = null); /** * Resets the current time of the DateTime object to a different time. * * @see https://php.net/manual/en/datetime.settime.php * * @param int $hour * @param int $minute * @param int $second * @param int $microseconds * * @return static */ #[ReturnTypeWillChange] public function setTime($hour, $minute, $second = 0, $microseconds = 0); /** * Set the hour, minute, second and microseconds for this instance to that of the passed instance. * * @param Carbon|DateTimeInterface $date now if null * * @return static */ public function setTimeFrom($date = null); /** * Set the time by time string. * * @param string $time * * @return static */ public function setTimeFromTimeString($time); /** * Set the instance's timestamp. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $unixTimestamp * * @return static */ #[ReturnTypeWillChange] public function setTimestamp($unixTimestamp); /** * Set the instance's timezone from a string or object. * * @param DateTimeZone|string $value * * @return static */ #[ReturnTypeWillChange] public function setTimezone($value); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and * use other method or custom format passed to format() method if you need to dump another string * format. * * Set the default format used when type juggling a Carbon instance to a string. * * @param string|Closure|null $format * * @return void */ public static function setToStringFormat($format); /** * Set the default translator instance to use. * * @param \Symfony\Component\Translation\TranslatorInterface $translator * * @return void */ public static function setTranslator(TranslatorInterface $translator); /** * Set specified unit to new given value. * * @param string $unit year, month, day, hour, minute, second or microsecond * @param int $value new value for given unit * * @return static */ public function setUnit($unit, $value = null); /** * Set any unit to a new value without overflowing current other unit given. * * @param string $valueUnit unit name to modify * @param int $value new value for the input unit * @param string $overflowUnit unit name to not overflow * * @return static */ public function setUnitNoOverflow($valueUnit, $value, $overflowUnit); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use UTF-8 language packages on every machine. * * Set if UTF8 will be used for localized date/time. * * @param bool $utf8 */ public static function setUtf8($utf8); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the * start of week according to current locale selected and implicitly the end of week. * * Set the last day of week * * @param int|string $day week end day (or 'auto' to get the day before the first day of week * from Carbon::getLocale() culture). * * @return void */ public static function setWeekEndsAt($day); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the * 'first_day_of_week' locale setting to change the start of week according to current locale * selected and implicitly the end of week. * * Set the first day of week * * @param int|string $day week start day (or 'auto' to get the first day of week from Carbon::getLocale() culture). * * @return void */ public static function setWeekStartsAt($day); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather consider week-end is always saturday and sunday, and if you have some custom * week-end days to handle, give to those days an other name and create a macro for them: * * ``` * Carbon::macro('isDayOff', function ($date) { * return $date->isSunday() || $date->isMonday(); * }); * Carbon::macro('isNotDayOff', function ($date) { * return !$date->isDayOff(); * }); * if ($someDate->isDayOff()) ... * if ($someDate->isNotDayOff()) ... * // Add 5 not-off days * $count = 5; * while ($someDate->isDayOff() || ($count-- > 0)) { * $someDate->addDay(); * } * ``` * * Set weekend days * * @param array $days * * @return void */ public static function setWeekendDays($days); /** * Set specific options. * - strictMode: true|false|null * - monthOverflow: true|false|null * - yearOverflow: true|false|null * - humanDiffOptions: int|null * - toStringFormat: string|Closure|null * - toJsonFormat: string|Closure|null * - locale: string|null * - timezone: \DateTimeZone|string|int|null * - macros: array|null * - genericMacros: array|null * * @param array $settings * * @return $this|static */ public function settings(array $settings); /** * Set the instance's timezone from a string or object and add/subtract the offset difference. * * @param DateTimeZone|string $value * * @return static */ public function shiftTimezone($value); /** * Get the month overflow global behavior (can be overridden in specific instances). * * @return bool */ public static function shouldOverflowMonths(); /** * Get the month overflow global behavior (can be overridden in specific instances). * * @return bool */ public static function shouldOverflowYears(); /** * @alias diffForHumans * * Get the difference in a human readable format in the current locale from current instance to an other * instance given (or now if null given). */ public function since($other = null, $syntax = null, $short = false, $parts = 1, $options = null); /** * Returns standardized singular of a given singular/plural unit name (in English). * * @param string $unit * * @return string */ public static function singularUnit(string $unit): string; /** * Modify to start of current given unit. * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16.334455') * ->startOf('month') * ->endOf('week', Carbon::FRIDAY); * ``` * * @param string $unit * @param array $params * * @return static */ public function startOf($unit, ...$params); /** * Resets the date to the first day of the century and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfCentury(); * ``` * * @return static */ public function startOfCentury(); /** * Resets the time to 00:00:00 start of day * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfDay(); * ``` * * @return static */ public function startOfDay(); /** * Resets the date to the first day of the decade and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfDecade(); * ``` * * @return static */ public function startOfDecade(); /** * Modify to start of current hour, minutes and seconds become 0 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfHour(); * ``` * * @return static */ public function startOfHour(); /** * Resets the date to the first day of the millennium and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfMillennium(); * ``` * * @return static */ public function startOfMillennium(); /** * Modify to start of current minute, seconds become 0 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfMinute(); * ``` * * @return static */ public function startOfMinute(); /** * Resets the date to the first day of the month and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfMonth(); * ``` * * @return static */ public function startOfMonth(); /** * Resets the date to the first day of the quarter and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfQuarter(); * ``` * * @return static */ public function startOfQuarter(); /** * Modify to start of current second, microseconds become 0 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16.334455') * ->startOfSecond() * ->format('H:i:s.u'); * ``` * * @return static */ public function startOfSecond(); /** * Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek() . "\n"; * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->startOfWeek() . "\n"; * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek(Carbon::SUNDAY) . "\n"; * ``` * * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week * * @return static */ public function startOfWeek($weekStartsAt = null); /** * Resets the date to the first day of the year and the time to 00:00:00 * * @example * ``` * echo Carbon::parse('2018-07-25 12:45:16')->startOfYear(); * ``` * * @return static */ public function startOfYear(); /** * Subtract given units or interval to the current instance. * * @example $date->sub('hour', 3) * @example $date->sub(15, 'days') * @example $date->sub(CarbonInterval::days(4)) * * @param string|DateInterval|Closure|CarbonConverterInterface $unit * @param int $value * @param bool|null $overflow * * @return static */ #[ReturnTypeWillChange] public function sub($unit, $value = 1, $overflow = null); public function subRealUnit($unit, $value = 1); /** * Subtract given units to the current instance. * * @param string $unit * @param int $value * @param bool|null $overflow * * @return static */ public function subUnit($unit, $value = 1, $overflow = null); /** * Subtract any unit to a new value without overflowing current other unit given. * * @param string $valueUnit unit name to modify * @param int $value amount to subtract to the input unit * @param string $overflowUnit unit name to not overflow * * @return static */ public function subUnitNoOverflow($valueUnit, $value, $overflowUnit); /** * Subtract given units or interval to the current instance. * * @see sub() * * @param string|DateInterval $unit * @param int $value * @param bool|null $overflow * * @return static */ public function subtract($unit, $value = 1, $overflow = null); /** * Get the difference in a human readable format in the current locale from current instance to an other * instance given (or now if null given). * * @return string */ public function timespan($other = null, $timezone = null); /** * Set the instance's timestamp. * * Timestamp input can be given as int, float or a string containing one or more numbers. * * @param float|int|string $unixTimestamp * * @return static */ public function timestamp($unixTimestamp); /** * @alias setTimezone * * @param DateTimeZone|string $value * * @return static */ public function timezone($value); /** * Get the difference in a human readable format in the current locale from an other * instance given (or now if null given) to current instance. * * When comparing a value in the past to default now: * 1 hour from now * 5 months from now * * When comparing a value in the future to default now: * 1 hour ago * 5 months ago * * When comparing a value in the past to another value: * 1 hour after * 5 months after * * When comparing a value in the future to another value: * 1 hour before * 5 months before * * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; * if null passed, now will be used as comparison reference; * if any other type, it will be converted to date and used as reference. * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'other' entry (see above) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single unit) * @param int $options human diff options * * @return string */ public function to($other = null, $syntax = null, $short = false, $parts = 1, $options = null); /** * Get default array representation. * * @example * ``` * var_dump(Carbon::now()->toArray()); * ``` * * @return array */ public function toArray(); /** * Format the instance as ATOM * * @example * ``` * echo Carbon::now()->toAtomString(); * ``` * * @return string */ public function toAtomString(); /** * Format the instance as COOKIE * * @example * ``` * echo Carbon::now()->toCookieString(); * ``` * * @return string */ public function toCookieString(); /** * @alias toDateTime * * Return native DateTime PHP object matching the current instance. * * @example * ``` * var_dump(Carbon::now()->toDate()); * ``` * * @return DateTime */ public function toDate(); /** * Format the instance as date * * @example * ``` * echo Carbon::now()->toDateString(); * ``` * * @return string */ public function toDateString(); /** * Return native DateTime PHP object matching the current instance. * * @example * ``` * var_dump(Carbon::now()->toDateTime()); * ``` * * @return DateTime */ public function toDateTime(); /** * Return native toDateTimeImmutable PHP object matching the current instance. * * @example * ``` * var_dump(Carbon::now()->toDateTimeImmutable()); * ``` * * @return DateTimeImmutable */ public function toDateTimeImmutable(); /** * Format the instance as date and time T-separated with no timezone * * @example * ``` * echo Carbon::now()->toDateTimeLocalString(); * echo "\n"; * echo Carbon::now()->toDateTimeLocalString('minute'); // You can specify precision among: minute, second, millisecond and microsecond * ``` * * @param string $unitPrecision * * @return string */ public function toDateTimeLocalString($unitPrecision = 'second'); /** * Format the instance as date and time * * @example * ``` * echo Carbon::now()->toDateTimeString(); * ``` * * @param string $unitPrecision * * @return string */ public function toDateTimeString($unitPrecision = 'second'); /** * Format the instance with day, date and time * * @example * ``` * echo Carbon::now()->toDayDateTimeString(); * ``` * * @return string */ public function toDayDateTimeString(); /** * Format the instance as a readable date * * @example * ``` * echo Carbon::now()->toFormattedDateString(); * ``` * * @return string */ public function toFormattedDateString(); /** * Format the instance with the day, and a readable date * * @example * ``` * echo Carbon::now()->toFormattedDayDateString(); * ``` * * @return string */ public function toFormattedDayDateString(): string; /** * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept: * 1977-04-22T01:00:00-05:00). * * @example * ``` * echo Carbon::now('America/Toronto')->toISOString() . "\n"; * echo Carbon::now('America/Toronto')->toISOString(true) . "\n"; * ``` * * @param bool $keepOffset Pass true to keep the date offset. Else forced to UTC. * * @return null|string */ public function toISOString($keepOffset = false); /** * Return a immutable copy of the instance. * * @return CarbonImmutable */ public function toImmutable(); /** * Format the instance as ISO8601 * * @example * ``` * echo Carbon::now()->toIso8601String(); * ``` * * @return string */ public function toIso8601String(); /** * Convert the instance to UTC and return as Zulu ISO8601 * * @example * ``` * echo Carbon::now()->toIso8601ZuluString(); * ``` * * @param string $unitPrecision * * @return string */ public function toIso8601ZuluString($unitPrecision = 'second'); /** * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z) with UTC timezone. * * @example * ``` * echo Carbon::now('America/Toronto')->toJSON(); * ``` * * @return null|string */ public function toJSON(); /** * Return a mutable copy of the instance. * * @return Carbon */ public function toMutable(); /** * Get the difference in a human readable format in the current locale from an other * instance given to now * * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single part) * @param int $options human diff options * * @return string */ public function toNow($syntax = null, $short = false, $parts = 1, $options = null); /** * Get default object representation. * * @example * ``` * var_dump(Carbon::now()->toObject()); * ``` * * @return object */ public function toObject(); /** * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). * * @param \DateTimeInterface|Carbon|CarbonImmutable|int|null $end period end date or recurrences count if int * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit * @param string|null $unit if specified, $interval must be an integer * * @return CarbonPeriod */ public function toPeriod($end = null, $interval = null, $unit = null); /** * Format the instance as RFC1036 * * @example * ``` * echo Carbon::now()->toRfc1036String(); * ``` * * @return string */ public function toRfc1036String(); /** * Format the instance as RFC1123 * * @example * ``` * echo Carbon::now()->toRfc1123String(); * ``` * * @return string */ public function toRfc1123String(); /** * Format the instance as RFC2822 * * @example * ``` * echo Carbon::now()->toRfc2822String(); * ``` * * @return string */ public function toRfc2822String(); /** * Format the instance as RFC3339 * * @param bool $extended * * @example * ``` * echo Carbon::now()->toRfc3339String() . "\n"; * echo Carbon::now()->toRfc3339String(true) . "\n"; * ``` * * @return string */ public function toRfc3339String($extended = false); /** * Format the instance as RFC7231 * * @example * ``` * echo Carbon::now()->toRfc7231String(); * ``` * * @return string */ public function toRfc7231String(); /** * Format the instance as RFC822 * * @example * ``` * echo Carbon::now()->toRfc822String(); * ``` * * @return string */ public function toRfc822String(); /** * Format the instance as RFC850 * * @example * ``` * echo Carbon::now()->toRfc850String(); * ``` * * @return string */ public function toRfc850String(); /** * Format the instance as RSS * * @example * ``` * echo Carbon::now()->toRssString(); * ``` * * @return string */ public function toRssString(); /** * Returns english human readable complete date string. * * @example * ``` * echo Carbon::now()->toString(); * ``` * * @return string */ public function toString(); /** * Format the instance as time * * @example * ``` * echo Carbon::now()->toTimeString(); * ``` * * @param string $unitPrecision * * @return string */ public function toTimeString($unitPrecision = 'second'); /** * Format the instance as W3C * * @example * ``` * echo Carbon::now()->toW3cString(); * ``` * * @return string */ public function toW3cString(); /** * Create a Carbon instance for today. * * @param DateTimeZone|string|null $tz * * @return static */ public static function today($tz = null); /** * Create a Carbon instance for tomorrow. * * @param DateTimeZone|string|null $tz * * @return static */ public static function tomorrow($tz = null); /** * Translate using translation string or callback available. * * @param string $key * @param array $parameters * @param string|int|float|null $number * @param \Symfony\Component\Translation\TranslatorInterface|null $translator * @param bool $altNumbers * * @return string */ public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string; /** * Returns the alternative number for a given integer if available in the current locale. * * @param int $number * * @return string */ public function translateNumber(int $number): string; /** * Translate a time string from a locale to an other. * * @param string $timeString date/time/duration string to translate (may also contain English) * @param string|null $from input locale of the $timeString parameter (`Carbon::getLocale()` by default) * @param string|null $to output locale of the result returned (`"en"` by default) * @param int $mode specify what to translate with options: * - self::TRANSLATE_ALL (default) * - CarbonInterface::TRANSLATE_MONTHS * - CarbonInterface::TRANSLATE_DAYS * - CarbonInterface::TRANSLATE_UNITS * - CarbonInterface::TRANSLATE_MERIDIEM * You can use pipe to group: CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS * * @return string */ public static function translateTimeString($timeString, $from = null, $to = null, $mode = self::TRANSLATE_ALL); /** * Translate a time string from the current locale (`$date->locale()`) to an other. * * @param string $timeString time string to translate * @param string|null $to output locale of the result returned ("en" by default) * * @return string */ public function translateTimeStringTo($timeString, $to = null); /** * Translate using translation string or callback available. * * @param \Symfony\Component\Translation\TranslatorInterface $translator * @param string $key * @param array $parameters * @param null $number * * @return string */ public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string; /** * Format as ->format() do (using date replacements patterns from https://php.net/manual/en/function.date.php) * but translate words whenever possible (months, day names, etc.) using the current locale. * * @param string $format * * @return string */ public function translatedFormat(string $format): string; /** * Set the timezone or returns the timezone name if no arguments passed. * * @param DateTimeZone|string $value * * @return static|string */ public function tz($value = null); /** * @alias getTimestamp * * Returns the UNIX timestamp for the current date. * * @return int */ public function unix(); /** * @alias to * * Get the difference in a human readable format in the current locale from an other * instance given (or now if null given) to current instance. * * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; * if null passed, now will be used as comparison reference; * if any other type, it will be converted to date and used as reference. * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: * - 'syntax' entry (see below) * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string * ` - if $join is an array, the first item will be the default glue, and the second item * ` will be used instead of the glue for the last item * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'other' entry (see above) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier * Default value: CarbonInterface::DIFF_ABSOLUTE * @param bool $short displays short format of time units * @param int $parts maximum number of parts to display (default value: 1: single unit) * @param int $options human diff options * * @return string */ public function until($other = null, $syntax = null, $short = false, $parts = 1, $options = null); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @see settings * * Indicates if months should be calculated with overflow. * * @param bool $monthsOverflow * * @return void */ public static function useMonthsOverflow($monthsOverflow = true); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * @see settings * * Enable the strict mode (or disable with passing false). * * @param bool $strictModeEnabled */ public static function useStrictMode($strictModeEnabled = true); /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use the ->settings() method. * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). * @see settings * * Indicates if years should be calculated with overflow. * * @param bool $yearsOverflow * * @return void */ public static function useYearsOverflow($yearsOverflow = true); /** * Set the instance's timezone to UTC. * * @return static */ public function utc(); /** * Returns the minutes offset to UTC if no arguments passed, else set the timezone with given minutes shift passed. * * @param int|null $minuteOffset * * @return int|static */ public function utcOffset(?int $minuteOffset = null); /** * Returns the milliseconds timestamps used amongst other by Date javascript objects. * * @return float */ public function valueOf(); /** * Get/set the week number using given first day of week and first * day of year included in the first week. Or use US format if no settings * given (Sunday / Jan 6). * * @param int|null $week * @param int|null $dayOfWeek * @param int|null $dayOfYear * * @return int|static */ public function week($week = null, $dayOfWeek = null, $dayOfYear = null); /** * Set/get the week number of year using given first day of week and first * day of year included in the first week. Or use US format if no settings * given (Sunday / Jan 6). * * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) * @param int|null $dayOfYear first day of year included in the week #1 * * @return int|static */ public function weekYear($year = null, $dayOfWeek = null, $dayOfYear = null); /** * Get/set the weekday from 0 (Sunday) to 6 (Saturday). * * @param int|null $value new value for weekday if using as setter. * * @return static|int */ public function weekday($value = null); /** * Get the number of weeks of the current week-year using given first day of week and first * day of year included in the first week. Or use US format if no settings * given (Sunday / Jan 6). * * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) * @param int|null $dayOfYear first day of year included in the week #1 * * @return int */ public function weeksInYear($dayOfWeek = null, $dayOfYear = null); /** * Temporarily sets a static date to be used within the callback. * Using setTestNow to set the date, executing the callback, then * clearing the test instance. * * /!\ Use this method for unit tests only. * * @template T * * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance * @param Closure(): T $callback * * @return mixed * @phpstan-return T */ public static function withTestNow($testNow, $callback); /** * Create a Carbon instance for yesterday. * * @param DateTimeZone|string|null $tz * * @return static */ public static function yesterday($tz = null); // } PKgt[Q.JJCarbon/CarbonPeriod.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Carbon\Exceptions\EndLessPeriodException; use Carbon\Exceptions\InvalidCastException; use Carbon\Exceptions\InvalidIntervalException; use Carbon\Exceptions\InvalidPeriodDateException; use Carbon\Exceptions\InvalidPeriodParameterException; use Carbon\Exceptions\NotACarbonClassException; use Carbon\Exceptions\NotAPeriodException; use Carbon\Exceptions\UnknownGetterException; use Carbon\Exceptions\UnknownMethodException; use Carbon\Exceptions\UnreachableException; use Carbon\Traits\IntervalRounding; use Carbon\Traits\Mixin; use Carbon\Traits\Options; use Carbon\Traits\ToStringFormat; use Closure; use Countable; use DateInterval; use DatePeriod; use DateTime; use DateTimeImmutable; use DateTimeInterface; use DateTimeZone; use InvalidArgumentException; use Iterator; use JsonSerializable; use ReflectionException; use ReturnTypeWillChange; use RuntimeException; /** * Substitution of DatePeriod with some modifications and many more features. * * @property-read int|float $recurrences number of recurrences (if end not set). * @property-read bool $include_start_date rather the start date is included in the iteration. * @property-read bool $include_end_date rather the end date is included in the iteration (if recurrences not set). * @property-read CarbonInterface $start Period start date. * @property-read CarbonInterface $current Current date from the iteration. * @property-read CarbonInterface $end Period end date. * @property-read CarbonInterval $interval Underlying date interval instance. Always present, one day by default. * * @method static static start($date, $inclusive = null) Create instance specifying start date or modify the start date if called on an instance. * @method static static since($date, $inclusive = null) Alias for start(). * @method static static sinceNow($inclusive = null) Create instance with start date set to now or set the start date to now if called on an instance. * @method static static end($date = null, $inclusive = null) Create instance specifying end date or modify the end date if called on an instance. * @method static static until($date = null, $inclusive = null) Alias for end(). * @method static static untilNow($inclusive = null) Create instance with end date set to now or set the end date to now if called on an instance. * @method static static dates($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. * @method static static between($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. * @method static static recurrences($recurrences = null) Create instance with maximum number of recurrences or modify the number of recurrences if called on an instance. * @method static static times($recurrences = null) Alias for recurrences(). * @method static static options($options = null) Create instance with options or modify the options if called on an instance. * @method static static toggle($options, $state = null) Create instance with options toggled on or off, or toggle options if called on an instance. * @method static static filter($callback, $name = null) Create instance with filter added to the stack or append a filter if called on an instance. * @method static static push($callback, $name = null) Alias for filter(). * @method static static prepend($callback, $name = null) Create instance with filter prepended to the stack or prepend a filter if called on an instance. * @method static static filters(array $filters = []) Create instance with filters stack or replace the whole filters stack if called on an instance. * @method static static interval($interval) Create instance with given date interval or modify the interval if called on an instance. * @method static static each($interval) Create instance with given date interval or modify the interval if called on an instance. * @method static static every($interval) Create instance with given date interval or modify the interval if called on an instance. * @method static static step($interval) Create instance with given date interval or modify the interval if called on an instance. * @method static static stepBy($interval) Create instance with given date interval or modify the interval if called on an instance. * @method static static invert() Create instance with inverted date interval or invert the interval if called on an instance. * @method static static years($years = 1) Create instance specifying a number of years for date interval or replace the interval by the given a number of years if called on an instance. * @method static static year($years = 1) Alias for years(). * @method static static months($months = 1) Create instance specifying a number of months for date interval or replace the interval by the given a number of months if called on an instance. * @method static static month($months = 1) Alias for months(). * @method static static weeks($weeks = 1) Create instance specifying a number of weeks for date interval or replace the interval by the given a number of weeks if called on an instance. * @method static static week($weeks = 1) Alias for weeks(). * @method static static days($days = 1) Create instance specifying a number of days for date interval or replace the interval by the given a number of days if called on an instance. * @method static static dayz($days = 1) Alias for days(). * @method static static day($days = 1) Alias for days(). * @method static static hours($hours = 1) Create instance specifying a number of hours for date interval or replace the interval by the given a number of hours if called on an instance. * @method static static hour($hours = 1) Alias for hours(). * @method static static minutes($minutes = 1) Create instance specifying a number of minutes for date interval or replace the interval by the given a number of minutes if called on an instance. * @method static static minute($minutes = 1) Alias for minutes(). * @method static static seconds($seconds = 1) Create instance specifying a number of seconds for date interval or replace the interval by the given a number of seconds if called on an instance. * @method static static second($seconds = 1) Alias for seconds(). * @method static static milliseconds($milliseconds = 1) Create instance specifying a number of milliseconds for date interval or replace the interval by the given a number of milliseconds if called on an instance. * @method static static millisecond($milliseconds = 1) Alias for milliseconds(). * @method static static microseconds($microseconds = 1) Create instance specifying a number of microseconds for date interval or replace the interval by the given a number of microseconds if called on an instance. * @method static static microsecond($microseconds = 1) Alias for microseconds(). * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. * @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision. * @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision. * @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision. * @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. * @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision. * @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision. * @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision. * @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision. * @method $this roundWeek(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method $this roundWeeks(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method $this floorWeek(float $precision = 1) Truncate the current instance day with given precision. * @method $this floorWeeks(float $precision = 1) Truncate the current instance day with given precision. * @method $this ceilWeek(float $precision = 1) Ceil the current instance day with given precision. * @method $this ceilWeeks(float $precision = 1) Ceil the current instance day with given precision. * @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. * @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision. * @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision. * @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision. * @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision. * @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. * @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision. * @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision. * @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision. * @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision. * @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. * @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision. * @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. * @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. * @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. * @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. * @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision. * @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision. * @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision. * @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. * @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. * @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. * @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. * @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. * @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. * @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. * @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision. * @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision. * @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision. * @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. * @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. * @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision. * @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision. * @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. * @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. * @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. * @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. * @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. * @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. * @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. * @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. * @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. * @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. * @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. * @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. * @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. * @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CarbonPeriod implements Iterator, Countable, JsonSerializable { use IntervalRounding; use Mixin { Mixin::mixin as baseMixin; } use Options; use ToStringFormat; /** * Built-in filter for limit by recurrences. * * @var callable */ public const RECURRENCES_FILTER = [self::class, 'filterRecurrences']; /** * Built-in filter for limit to an end. * * @var callable */ public const END_DATE_FILTER = [self::class, 'filterEndDate']; /** * Special value which can be returned by filters to end iteration. Also a filter. * * @var callable */ public const END_ITERATION = [self::class, 'endIteration']; /** * Exclude start date from iteration. * * @var int */ public const EXCLUDE_START_DATE = 1; /** * Exclude end date from iteration. * * @var int */ public const EXCLUDE_END_DATE = 2; /** * Yield CarbonImmutable instances. * * @var int */ public const IMMUTABLE = 4; /** * Number of maximum attempts before giving up on finding next valid date. * * @var int */ public const NEXT_MAX_ATTEMPTS = 1000; /** * Number of maximum attempts before giving up on finding end date. * * @var int */ public const END_MAX_ATTEMPTS = 10000; /** * The registered macros. * * @var array */ protected static $macros = []; /** * Date class of iteration items. * * @var string */ protected $dateClass = Carbon::class; /** * Underlying date interval instance. Always present, one day by default. * * @var CarbonInterval */ protected $dateInterval; /** * True once __construct is finished. * * @var bool */ protected $constructed = false; /** * Whether current date interval was set by default. * * @var bool */ protected $isDefaultInterval; /** * The filters stack. * * @var array */ protected $filters = []; /** * Period start date. Applied on rewind. Always present, now by default. * * @var CarbonInterface */ protected $startDate; /** * Period end date. For inverted interval should be before the start date. Applied via a filter. * * @var CarbonInterface|null */ protected $endDate; /** * Limit for number of recurrences. Applied via a filter. * * @var int|null */ protected $recurrences; /** * Iteration options. * * @var int */ protected $options; /** * Index of current date. Always sequential, even if some dates are skipped by filters. * Equal to null only before the first iteration. * * @var int */ protected $key; /** * Current date. May temporarily hold unaccepted value when looking for a next valid date. * Equal to null only before the first iteration. * * @var CarbonInterface */ protected $current; /** * Timezone of current date. Taken from the start date. * * @var \DateTimeZone|null */ protected $timezone; /** * The cached validation result for current date. * * @var bool|string|null */ protected $validationResult; /** * Timezone handler for settings() method. * * @var mixed */ protected $tzName; /** * Make a CarbonPeriod instance from given variable if possible. * * @param mixed $var * * @return static|null */ public static function make($var) { try { return static::instance($var); } catch (NotAPeriodException $e) { return static::create($var); } } /** * Create a new instance from a DatePeriod or CarbonPeriod object. * * @param CarbonPeriod|DatePeriod $period * * @return static */ public static function instance($period) { if ($period instanceof static) { return $period->copy(); } if ($period instanceof self) { return new static( $period->getStartDate(), $period->getEndDate() ?: $period->getRecurrences(), $period->getDateInterval(), $period->getOptions() ); } if ($period instanceof DatePeriod) { return new static( $period->start, $period->end ?: ($period->recurrences - 1), $period->interval, $period->include_start_date ? 0 : static::EXCLUDE_START_DATE ); } $class = static::class; $type = \gettype($period); throw new NotAPeriodException( 'Argument 1 passed to '.$class.'::'.__METHOD__.'() '. 'must be an instance of DatePeriod or '.$class.', '. ($type === 'object' ? 'instance of '.\get_class($period) : $type).' given.' ); } /** * Create a new instance. * * @return static */ public static function create(...$params) { return static::createFromArray($params); } /** * Create a new instance from an array of parameters. * * @param array $params * * @return static */ public static function createFromArray(array $params) { return new static(...$params); } /** * Create CarbonPeriod from ISO 8601 string. * * @param string $iso * @param int|null $options * * @return static */ public static function createFromIso($iso, $options = null) { $params = static::parseIso8601($iso); $instance = static::createFromArray($params); if ($options !== null) { $instance->setOptions($options); } return $instance; } /** * Return whether given interval contains non zero value of any time unit. * * @param \DateInterval $interval * * @return bool */ protected static function intervalHasTime(DateInterval $interval) { return $interval->h || $interval->i || $interval->s || $interval->f; } /** * Return whether given variable is an ISO 8601 specification. * * Note: Check is very basic, as actual validation will be done later when parsing. * We just want to ensure that variable is not any other type of a valid parameter. * * @param mixed $var * * @return bool */ protected static function isIso8601($var) { if (!\is_string($var)) { return false; } // Match slash but not within a timezone name. $part = '[a-z]+(?:[_-][a-z]+)*'; preg_match("#\b$part/$part\b|(/)#i", $var, $match); return isset($match[1]); } /** * Parse given ISO 8601 string into an array of arguments. * * @SuppressWarnings(PHPMD.ElseExpression) * * @param string $iso * * @return array */ protected static function parseIso8601($iso) { $result = []; $interval = null; $start = null; $end = null; foreach (explode('/', $iso) as $key => $part) { if ($key === 0 && preg_match('/^R(\d*|INF)$/', $part, $match)) { $parsed = \strlen($match[1]) ? (($match[1] !== 'INF') ? (int) $match[1] : INF) : null; } elseif ($interval === null && $parsed = CarbonInterval::make($part)) { $interval = $part; } elseif ($start === null && $parsed = Carbon::make($part)) { $start = $part; } elseif ($end === null && $parsed = Carbon::make(static::addMissingParts($start ?? '', $part))) { $end = $part; } else { throw new InvalidPeriodParameterException("Invalid ISO 8601 specification: $iso."); } $result[] = $parsed; } return $result; } /** * Add missing parts of the target date from the soure date. * * @param string $source * @param string $target * * @return string */ protected static function addMissingParts($source, $target) { $pattern = '/'.preg_replace('/\d+/', '[0-9]+', preg_quote($target, '/')).'$/'; $result = preg_replace($pattern, $target, $source, 1, $count); return $count ? $result : $target; } /** * Register a custom macro. * * @example * ``` * CarbonPeriod::macro('middle', function () { * return $this->getStartDate()->average($this->getEndDate()); * }); * echo CarbonPeriod::since('2011-05-12')->until('2011-06-03')->middle(); * ``` * * @param string $name * @param object|callable $macro * * @return void */ public static function macro($name, $macro) { static::$macros[$name] = $macro; } /** * Register macros from a mixin object. * * @example * ``` * CarbonPeriod::mixin(new class { * public function addDays() { * return function ($count = 1) { * return $this->setStartDate( * $this->getStartDate()->addDays($count) * )->setEndDate( * $this->getEndDate()->addDays($count) * ); * }; * } * public function subDays() { * return function ($count = 1) { * return $this->setStartDate( * $this->getStartDate()->subDays($count) * )->setEndDate( * $this->getEndDate()->subDays($count) * ); * }; * } * }); * echo CarbonPeriod::create('2000-01-01', '2000-02-01')->addDays(5)->subDays(3); * ``` * * @param object|string $mixin * * @throws ReflectionException * * @return void */ public static function mixin($mixin) { static::baseMixin($mixin); } /** * Check if macro is registered. * * @param string $name * * @return bool */ public static function hasMacro($name) { return isset(static::$macros[$name]); } /** * Provide static proxy for instance aliases. * * @param string $method * @param array $parameters * * @return mixed */ public static function __callStatic($method, $parameters) { $date = new static(); if (static::hasMacro($method)) { return static::bindMacroContext(null, function () use (&$method, &$parameters, &$date) { return $date->callMacro($method, $parameters); }); } return $date->$method(...$parameters); } /** * CarbonPeriod constructor. * * @SuppressWarnings(PHPMD.ElseExpression) * * @throws InvalidArgumentException */ public function __construct(...$arguments) { if (is_a($this->dateClass, DateTimeImmutable::class, true)) { $this->options = static::IMMUTABLE; } // Parse and assign arguments one by one. First argument may be an ISO 8601 spec, // which will be first parsed into parts and then processed the same way. $argumentsCount = \count($arguments); if ($argumentsCount && static::isIso8601($iso = $arguments[0])) { array_splice($arguments, 0, 1, static::parseIso8601($iso)); } if ($argumentsCount === 1) { if ($arguments[0] instanceof DatePeriod) { $arguments = [ $arguments[0]->start, $arguments[0]->end ?: ($arguments[0]->recurrences - 1), $arguments[0]->interval, $arguments[0]->include_start_date ? 0 : static::EXCLUDE_START_DATE, ]; } elseif ($arguments[0] instanceof self) { $arguments = [ $arguments[0]->getStartDate(), $arguments[0]->getEndDate() ?: $arguments[0]->getRecurrences(), $arguments[0]->getDateInterval(), $arguments[0]->getOptions(), ]; } } $optionsSet = false; foreach ($arguments as $argument) { $parsedDate = null; if ($argument instanceof DateTimeZone) { $this->setTimezone($argument); } elseif ($this->dateInterval === null && ( (\is_string($argument) && preg_match( '/^(-?\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T\d].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i', $argument )) || $argument instanceof DateInterval || $argument instanceof Closure ) && $parsedInterval = @CarbonInterval::make($argument) ) { $this->setDateInterval($parsedInterval); } elseif ($this->startDate === null && $parsedDate = $this->makeDateTime($argument)) { $this->setStartDate($parsedDate); } elseif ($this->endDate === null && ($parsedDate = $parsedDate ?? $this->makeDateTime($argument))) { $this->setEndDate($parsedDate); } elseif ($this->recurrences === null && $this->endDate === null && is_numeric($argument)) { $this->setRecurrences($argument); } elseif (!$optionsSet && (\is_int($argument) || $argument === null)) { $optionsSet = true; $this->setOptions(((int) $this->options) | ((int) $argument)); } else { throw new InvalidPeriodParameterException('Invalid constructor parameters.'); } } if ($this->startDate === null) { $this->setStartDate(Carbon::now()); } if ($this->dateInterval === null) { $this->setDateInterval(CarbonInterval::day()); $this->isDefaultInterval = true; } if ($this->options === null) { $this->setOptions(0); } $this->constructed = true; } /** * Get a copy of the instance. * * @return static */ public function copy() { return clone $this; } /** * Prepare the instance to be set (self if mutable to be mutated, * copy if immutable to generate a new instance). * * @return static */ protected function copyIfImmutable() { return $this; } /** * Get the getter for a property allowing both `DatePeriod` snakeCase and camelCase names. * * @param string $name * * @return callable|null */ protected function getGetter(string $name) { switch (strtolower(preg_replace('/[A-Z]/', '_$0', $name))) { case 'start': case 'start_date': return [$this, 'getStartDate']; case 'end': case 'end_date': return [$this, 'getEndDate']; case 'interval': case 'date_interval': return [$this, 'getDateInterval']; case 'recurrences': return [$this, 'getRecurrences']; case 'include_start_date': return [$this, 'isStartIncluded']; case 'include_end_date': return [$this, 'isEndIncluded']; case 'current': return [$this, 'current']; default: return null; } } /** * Get a property allowing both `DatePeriod` snakeCase and camelCase names. * * @param string $name * * @return bool|CarbonInterface|CarbonInterval|int|null */ public function get(string $name) { $getter = $this->getGetter($name); if ($getter) { return $getter(); } throw new UnknownGetterException($name); } /** * Get a property allowing both `DatePeriod` snakeCase and camelCase names. * * @param string $name * * @return bool|CarbonInterface|CarbonInterval|int|null */ public function __get(string $name) { return $this->get($name); } /** * Check if an attribute exists on the object * * @param string $name * * @return bool */ public function __isset(string $name): bool { return $this->getGetter($name) !== null; } /** * @alias copy * * Get a copy of the instance. * * @return static */ public function clone() { return clone $this; } /** * Set the iteration item class. * * @param string $dateClass * * @return static */ public function setDateClass(string $dateClass) { if (!is_a($dateClass, CarbonInterface::class, true)) { throw new NotACarbonClassException($dateClass); } $self = $this->copyIfImmutable(); $self->dateClass = $dateClass; if (is_a($dateClass, Carbon::class, true)) { $self->options = $self->options & ~static::IMMUTABLE; } elseif (is_a($dateClass, CarbonImmutable::class, true)) { $self->options = $self->options | static::IMMUTABLE; } return $self; } /** * Returns iteration item date class. * * @return string */ public function getDateClass(): string { return $this->dateClass; } /** * Change the period date interval. * * @param DateInterval|string $interval * * @throws InvalidIntervalException * * @return static */ public function setDateInterval($interval) { if (!$interval = CarbonInterval::make($interval)) { throw new InvalidIntervalException('Invalid interval.'); } if ($interval->spec() === 'PT0S' && !$interval->f && !$interval->getStep()) { throw new InvalidIntervalException('Empty interval is not accepted.'); } $self = $this->copyIfImmutable(); $self->dateInterval = $interval; $self->isDefaultInterval = false; $self->handleChangedParameters(); return $self; } /** * Invert the period date interval. * * @return static */ public function invertDateInterval() { return $this->setDateInterval($this->dateInterval->invert()); } /** * Set start and end date. * * @param DateTime|DateTimeInterface|string $start * @param DateTime|DateTimeInterface|string|null $end * * @return static */ public function setDates($start, $end) { return $this->setStartDate($start)->setEndDate($end); } /** * Change the period options. * * @param int|null $options * * @throws InvalidArgumentException * * @return static */ public function setOptions($options) { if (!\is_int($options) && $options !== null) { throw new InvalidPeriodParameterException('Invalid options.'); } $self = $this->copyIfImmutable(); $self->options = $options ?: 0; $self->handleChangedParameters(); return $self; } /** * Get the period options. * * @return int */ public function getOptions() { return $this->options; } /** * Toggle given options on or off. * * @param int $options * @param bool|null $state * * @throws \InvalidArgumentException * * @return static */ public function toggleOptions($options, $state = null) { if ($state === null) { $state = ($this->options & $options) !== $options; } return $this->setOptions( $state ? $this->options | $options : $this->options & ~$options ); } /** * Toggle EXCLUDE_START_DATE option. * * @param bool $state * * @return static */ public function excludeStartDate($state = true) { return $this->toggleOptions(static::EXCLUDE_START_DATE, $state); } /** * Toggle EXCLUDE_END_DATE option. * * @param bool $state * * @return static */ public function excludeEndDate($state = true) { return $this->toggleOptions(static::EXCLUDE_END_DATE, $state); } /** * Get the underlying date interval. * * @return CarbonInterval */ public function getDateInterval() { return $this->dateInterval->copy(); } /** * Get start date of the period. * * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. * * @return CarbonInterface */ public function getStartDate(string $rounding = null) { $date = $this->startDate->avoidMutation(); return $rounding ? $date->round($this->getDateInterval(), $rounding) : $date; } /** * Get end date of the period. * * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. * * @return CarbonInterface|null */ public function getEndDate(string $rounding = null) { if (!$this->endDate) { return null; } $date = $this->endDate->avoidMutation(); return $rounding ? $date->round($this->getDateInterval(), $rounding) : $date; } /** * Get number of recurrences. * * @return int|float|null */ public function getRecurrences() { return $this->recurrences; } /** * Returns true if the start date should be excluded. * * @return bool */ public function isStartExcluded() { return ($this->options & static::EXCLUDE_START_DATE) !== 0; } /** * Returns true if the end date should be excluded. * * @return bool */ public function isEndExcluded() { return ($this->options & static::EXCLUDE_END_DATE) !== 0; } /** * Returns true if the start date should be included. * * @return bool */ public function isStartIncluded() { return !$this->isStartExcluded(); } /** * Returns true if the end date should be included. * * @return bool */ public function isEndIncluded() { return !$this->isEndExcluded(); } /** * Return the start if it's included by option, else return the start + 1 period interval. * * @return CarbonInterface */ public function getIncludedStartDate() { $start = $this->getStartDate(); if ($this->isStartExcluded()) { return $start->add($this->getDateInterval()); } return $start; } /** * Return the end if it's included by option, else return the end - 1 period interval. * Warning: if the period has no fixed end, this method will iterate the period to calculate it. * * @return CarbonInterface */ public function getIncludedEndDate() { $end = $this->getEndDate(); if (!$end) { return $this->calculateEnd(); } if ($this->isEndExcluded()) { return $end->sub($this->getDateInterval()); } return $end; } /** * Add a filter to the stack. * * @SuppressWarnings(PHPMD.UnusedFormalParameter) * * @param callable $callback * @param string $name * * @return static */ public function addFilter($callback, $name = null) { $self = $this->copyIfImmutable(); $tuple = $self->createFilterTuple(\func_get_args()); $self->filters[] = $tuple; $self->handleChangedParameters(); return $self; } /** * Prepend a filter to the stack. * * @SuppressWarnings(PHPMD.UnusedFormalParameter) * * @param callable $callback * @param string $name * * @return static */ public function prependFilter($callback, $name = null) { $self = $this->copyIfImmutable(); $tuple = $self->createFilterTuple(\func_get_args()); array_unshift($self->filters, $tuple); $self->handleChangedParameters(); return $self; } /** * Remove a filter by instance or name. * * @param callable|string $filter * * @return static */ public function removeFilter($filter) { $self = $this->copyIfImmutable(); $key = \is_callable($filter) ? 0 : 1; $self->filters = array_values(array_filter( $this->filters, function ($tuple) use ($key, $filter) { return $tuple[$key] !== $filter; } )); $self->updateInternalState(); $self->handleChangedParameters(); return $self; } /** * Return whether given instance or name is in the filter stack. * * @param callable|string $filter * * @return bool */ public function hasFilter($filter) { $key = \is_callable($filter) ? 0 : 1; foreach ($this->filters as $tuple) { if ($tuple[$key] === $filter) { return true; } } return false; } /** * Get filters stack. * * @return array */ public function getFilters() { return $this->filters; } /** * Set filters stack. * * @param array $filters * * @return static */ public function setFilters(array $filters) { $self = $this->copyIfImmutable(); $self->filters = $filters; $self->updateInternalState(); $self->handleChangedParameters(); return $self; } /** * Reset filters stack. * * @return static */ public function resetFilters() { $self = $this->copyIfImmutable(); $self->filters = []; if ($self->endDate !== null) { $self->filters[] = [static::END_DATE_FILTER, null]; } if ($self->recurrences !== null) { $self->filters[] = [static::RECURRENCES_FILTER, null]; } $self->handleChangedParameters(); return $self; } /** * Add a recurrences filter (set maximum number of recurrences). * * @param int|float|null $recurrences * * @throws InvalidArgumentException * * @return static */ public function setRecurrences($recurrences) { if ((!is_numeric($recurrences) && $recurrences !== null) || $recurrences < 0) { throw new InvalidPeriodParameterException('Invalid number of recurrences.'); } if ($recurrences === null) { return $this->removeFilter(static::RECURRENCES_FILTER); } /** @var self $self */ $self = $this->copyIfImmutable(); $self->recurrences = $recurrences === INF ? INF : (int) $recurrences; if (!$self->hasFilter(static::RECURRENCES_FILTER)) { return $self->addFilter(static::RECURRENCES_FILTER); } $self->handleChangedParameters(); return $self; } /** * Change the period start date. * * @param DateTime|DateTimeInterface|string $date * @param bool|null $inclusive * * @throws InvalidPeriodDateException * * @return static */ public function setStartDate($date, $inclusive = null) { if (!$this->isInfiniteDate($date) && !($date = ([$this->dateClass, 'make'])($date))) { throw new InvalidPeriodDateException('Invalid start date.'); } $self = $this->copyIfImmutable(); $self->startDate = $date; if ($inclusive !== null) { $self = $self->toggleOptions(static::EXCLUDE_START_DATE, !$inclusive); } return $self; } /** * Change the period end date. * * @param DateTime|DateTimeInterface|string|null $date * @param bool|null $inclusive * * @throws \InvalidArgumentException * * @return static */ public function setEndDate($date, $inclusive = null) { if ($date !== null && !$this->isInfiniteDate($date) && !$date = ([$this->dateClass, 'make'])($date)) { throw new InvalidPeriodDateException('Invalid end date.'); } if (!$date) { return $this->removeFilter(static::END_DATE_FILTER); } $self = $this->copyIfImmutable(); $self->endDate = $date; if ($inclusive !== null) { $self = $self->toggleOptions(static::EXCLUDE_END_DATE, !$inclusive); } if (!$self->hasFilter(static::END_DATE_FILTER)) { return $self->addFilter(static::END_DATE_FILTER); } $self->handleChangedParameters(); return $self; } /** * Check if the current position is valid. * * @return bool */ #[ReturnTypeWillChange] public function valid() { return $this->validateCurrentDate() === true; } /** * Return the current key. * * @return int|null */ #[ReturnTypeWillChange] public function key() { return $this->valid() ? $this->key : null; } /** * Return the current date. * * @return CarbonInterface|null */ #[ReturnTypeWillChange] public function current() { return $this->valid() ? $this->prepareForReturn($this->current) : null; } /** * Move forward to the next date. * * @throws RuntimeException * * @return void */ #[ReturnTypeWillChange] public function next() { if ($this->current === null) { $this->rewind(); } if ($this->validationResult !== static::END_ITERATION) { $this->key++; $this->incrementCurrentDateUntilValid(); } } /** * Rewind to the start date. * * Iterating over a date in the UTC timezone avoids bug during backward DST change. * * @see https://bugs.php.net/bug.php?id=72255 * @see https://bugs.php.net/bug.php?id=74274 * @see https://wiki.php.net/rfc/datetime_and_daylight_saving_time * * @throws RuntimeException * * @return void */ #[ReturnTypeWillChange] public function rewind() { $this->key = 0; $this->current = ([$this->dateClass, 'make'])($this->startDate); $settings = $this->getSettings(); if ($this->hasLocalTranslator()) { $settings['locale'] = $this->getTranslatorLocale(); } $this->current->settings($settings); $this->timezone = static::intervalHasTime($this->dateInterval) ? $this->current->getTimezone() : null; if ($this->timezone) { $this->current = $this->current->utc(); } $this->validationResult = null; if ($this->isStartExcluded() || $this->validateCurrentDate() === false) { $this->incrementCurrentDateUntilValid(); } } /** * Skip iterations and returns iteration state (false if ended, true if still valid). * * @param int $count steps number to skip (1 by default) * * @return bool */ public function skip($count = 1) { for ($i = $count; $this->valid() && $i > 0; $i--) { $this->next(); } return $this->valid(); } /** * Format the date period as ISO 8601. * * @return string */ public function toIso8601String() { $parts = []; if ($this->recurrences !== null) { $parts[] = 'R'.$this->recurrences; } $parts[] = $this->startDate->toIso8601String(); $parts[] = $this->dateInterval->spec(); if ($this->endDate !== null) { $parts[] = $this->endDate->toIso8601String(); } return implode('/', $parts); } /** * Convert the date period into a string. * * @return string */ public function toString() { $format = $this->localToStringFormat ?? static::$toStringFormat; if ($format instanceof Closure) { return $format($this); } $translator = ([$this->dateClass, 'getTranslator'])(); $parts = []; $format = $format ?? ( !$this->startDate->isStartOfDay() || ($this->endDate && !$this->endDate->isStartOfDay()) ? 'Y-m-d H:i:s' : 'Y-m-d' ); if ($this->recurrences !== null) { $parts[] = $this->translate('period_recurrences', [], $this->recurrences, $translator); } $parts[] = $this->translate('period_interval', [':interval' => $this->dateInterval->forHumans([ 'join' => true, ])], null, $translator); $parts[] = $this->translate('period_start_date', [':date' => $this->startDate->rawFormat($format)], null, $translator); if ($this->endDate !== null) { $parts[] = $this->translate('period_end_date', [':date' => $this->endDate->rawFormat($format)], null, $translator); } $result = implode(' ', $parts); return mb_strtoupper(mb_substr($result, 0, 1)).mb_substr($result, 1); } /** * Format the date period as ISO 8601. * * @return string */ public function spec() { return $this->toIso8601String(); } /** * Cast the current instance into the given class. * * @param string $className The $className::instance() method will be called to cast the current object. * * @return DatePeriod */ public function cast(string $className) { if (!method_exists($className, 'instance')) { if (is_a($className, DatePeriod::class, true)) { return new $className( $this->rawDate($this->getStartDate()), $this->getDateInterval(), $this->getEndDate() ? $this->rawDate($this->getIncludedEndDate()) : $this->getRecurrences(), $this->isStartExcluded() ? DatePeriod::EXCLUDE_START_DATE : 0 ); } throw new InvalidCastException("$className has not the instance() method needed to cast the date."); } return $className::instance($this); } /** * Return native DatePeriod PHP object matching the current instance. * * @example * ``` * var_dump(CarbonPeriod::create('2021-01-05', '2021-02-15')->toDatePeriod()); * ``` * * @return DatePeriod */ public function toDatePeriod() { return $this->cast(DatePeriod::class); } /** * Return `true` if the period has no custom filter and is guaranteed to be endless. * * Note that we can't check if a period is endless as soon as it has custom filters * because filters can emit `CarbonPeriod::END_ITERATION` to stop the iteration in * a way we can't predict without actually iterating the period. */ public function isUnfilteredAndEndLess(): bool { foreach ($this->filters as $filter) { switch ($filter) { case [static::RECURRENCES_FILTER, null]: if ($this->recurrences !== null && is_finite($this->recurrences)) { return false; } break; case [static::END_DATE_FILTER, null]: if ($this->endDate !== null && !$this->endDate->isEndOfTime()) { return false; } break; default: return false; } } return true; } /** * Convert the date period into an array without changing current iteration state. * * @return CarbonInterface[] */ public function toArray() { if ($this->isUnfilteredAndEndLess()) { throw new EndLessPeriodException("Endless period can't be converted to array nor counted."); } $state = [ $this->key, $this->current ? $this->current->avoidMutation() : null, $this->validationResult, ]; $result = iterator_to_array($this); [$this->key, $this->current, $this->validationResult] = $state; return $result; } /** * Count dates in the date period. * * @return int */ #[ReturnTypeWillChange] public function count() { return \count($this->toArray()); } /** * Return the first date in the date period. * * @return CarbonInterface|null */ public function first() { if ($this->isUnfilteredAndEndLess()) { foreach ($this as $date) { $this->rewind(); return $date; } return null; } return ($this->toArray() ?: [])[0] ?? null; } /** * Return the last date in the date period. * * @return CarbonInterface|null */ public function last() { $array = $this->toArray(); return $array ? $array[\count($array) - 1] : null; } /** * Convert the date period into a string. * * @return string */ public function __toString() { return $this->toString(); } /** * Add aliases for setters. * * CarbonPeriod::days(3)->hours(5)->invert() * ->sinceNow()->until('2010-01-10') * ->filter(...) * ->count() * * Note: We use magic method to let static and instance aliases with the same names. * * @param string $method * @param array $parameters * * @return mixed */ public function __call($method, $parameters) { if (static::hasMacro($method)) { return static::bindMacroContext($this, function () use (&$method, &$parameters) { return $this->callMacro($method, $parameters); }); } $roundedValue = $this->callRoundMethod($method, $parameters); if ($roundedValue !== null) { return $roundedValue; } switch ($method) { case 'start': case 'since': self::setDefaultParameters($parameters, [ [0, 'date', null], ]); return $this->setStartDate(...$parameters); case 'sinceNow': return $this->setStartDate(new Carbon(), ...$parameters); case 'end': case 'until': self::setDefaultParameters($parameters, [ [0, 'date', null], ]); return $this->setEndDate(...$parameters); case 'untilNow': return $this->setEndDate(new Carbon(), ...$parameters); case 'dates': case 'between': self::setDefaultParameters($parameters, [ [0, 'start', null], [1, 'end', null], ]); return $this->setDates(...$parameters); case 'recurrences': case 'times': self::setDefaultParameters($parameters, [ [0, 'recurrences', null], ]); return $this->setRecurrences(...$parameters); case 'options': self::setDefaultParameters($parameters, [ [0, 'options', null], ]); return $this->setOptions(...$parameters); case 'toggle': self::setDefaultParameters($parameters, [ [0, 'options', null], ]); return $this->toggleOptions(...$parameters); case 'filter': case 'push': return $this->addFilter(...$parameters); case 'prepend': return $this->prependFilter(...$parameters); case 'filters': self::setDefaultParameters($parameters, [ [0, 'filters', []], ]); return $this->setFilters(...$parameters); case 'interval': case 'each': case 'every': case 'step': case 'stepBy': return $this->setDateInterval(...$parameters); case 'invert': return $this->invertDateInterval(); case 'years': case 'year': case 'months': case 'month': case 'weeks': case 'week': case 'days': case 'dayz': case 'day': case 'hours': case 'hour': case 'minutes': case 'minute': case 'seconds': case 'second': case 'milliseconds': case 'millisecond': case 'microseconds': case 'microsecond': return $this->setDateInterval(( // Override default P1D when instantiating via fluent setters. [$this->isDefaultInterval ? new CarbonInterval('PT0S') : $this->dateInterval, $method] )(...$parameters)); } if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { throw new UnknownMethodException($method); } return $this; } /** * Set the instance's timezone from a string or object and apply it to start/end. * * @param \DateTimeZone|string $timezone * * @return static */ public function setTimezone($timezone) { $self = $this->copyIfImmutable(); $self->tzName = $timezone; $self->timezone = $timezone; if ($self->startDate) { $self = $self->setStartDate($self->startDate->setTimezone($timezone)); } if ($self->endDate) { $self = $self->setEndDate($self->endDate->setTimezone($timezone)); } return $self; } /** * Set the instance's timezone from a string or object and add/subtract the offset difference to start/end. * * @param \DateTimeZone|string $timezone * * @return static */ public function shiftTimezone($timezone) { $self = $this->copyIfImmutable(); $self->tzName = $timezone; $self->timezone = $timezone; if ($self->startDate) { $self = $self->setStartDate($self->startDate->shiftTimezone($timezone)); } if ($self->endDate) { $self = $self->setEndDate($self->endDate->shiftTimezone($timezone)); } return $self; } /** * Returns the end is set, else calculated from start an recurrences. * * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. * * @return CarbonInterface */ public function calculateEnd(string $rounding = null) { if ($end = $this->getEndDate($rounding)) { return $end; } if ($this->dateInterval->isEmpty()) { return $this->getStartDate($rounding); } $date = $this->getEndFromRecurrences() ?? $this->iterateUntilEnd(); if ($date && $rounding) { $date = $date->avoidMutation()->round($this->getDateInterval(), $rounding); } return $date; } /** * @return CarbonInterface|null */ private function getEndFromRecurrences() { if ($this->recurrences === null) { throw new UnreachableException( "Could not calculate period end without either explicit end or recurrences.\n". "If you're looking for a forever-period, use ->setRecurrences(INF)." ); } if ($this->recurrences === INF) { $start = $this->getStartDate(); return $start < $start->avoidMutation()->add($this->getDateInterval()) ? CarbonImmutable::endOfTime() : CarbonImmutable::startOfTime(); } if ($this->filters === [[static::RECURRENCES_FILTER, null]]) { return $this->getStartDate()->avoidMutation()->add( $this->getDateInterval()->times( $this->recurrences - ($this->isStartExcluded() ? 0 : 1) ) ); } return null; } /** * @return CarbonInterface|null */ private function iterateUntilEnd() { $attempts = 0; $date = null; foreach ($this as $date) { if (++$attempts > static::END_MAX_ATTEMPTS) { throw new UnreachableException( 'Could not calculate period end after iterating '.static::END_MAX_ATTEMPTS.' times.' ); } } return $date; } /** * Returns true if the current period overlaps the given one (if 1 parameter passed) * or the period between 2 dates (if 2 parameters passed). * * @param CarbonPeriod|\DateTimeInterface|Carbon|CarbonImmutable|string $rangeOrRangeStart * @param \DateTimeInterface|Carbon|CarbonImmutable|string|null $rangeEnd * * @return bool */ public function overlaps($rangeOrRangeStart, $rangeEnd = null) { $range = $rangeEnd ? static::create($rangeOrRangeStart, $rangeEnd) : $rangeOrRangeStart; if (!($range instanceof self)) { $range = static::create($range); } [$start, $end] = $this->orderCouple($this->getStartDate(), $this->calculateEnd()); [$rangeStart, $rangeEnd] = $this->orderCouple($range->getStartDate(), $range->calculateEnd()); return $end > $rangeStart && $rangeEnd > $start; } /** * Execute a given function on each date of the period. * * @example * ``` * Carbon::create('2020-11-29')->daysUntil('2020-12-24')->forEach(function (Carbon $date) { * echo $date->diffInDays('2020-12-25')." days before Christmas!\n"; * }); * ``` * * @param callable $callback */ public function forEach(callable $callback) { foreach ($this as $date) { $callback($date); } } /** * Execute a given function on each date of the period and yield the result of this function. * * @example * ``` * $period = Carbon::create('2020-11-29')->daysUntil('2020-12-24'); * echo implode("\n", iterator_to_array($period->map(function (Carbon $date) { * return $date->diffInDays('2020-12-25').' days before Christmas!'; * }))); * ``` * * @param callable $callback * * @return \Generator */ public function map(callable $callback) { foreach ($this as $date) { yield $callback($date); } } /** * Determines if the instance is equal to another. * Warning: if options differ, instances wil never be equal. * * @param mixed $period * * @see equalTo() * * @return bool */ public function eq($period): bool { return $this->equalTo($period); } /** * Determines if the instance is equal to another. * Warning: if options differ, instances wil never be equal. * * @param mixed $period * * @return bool */ public function equalTo($period): bool { if (!($period instanceof self)) { $period = self::make($period); } $end = $this->getEndDate(); return $period !== null && $this->getDateInterval()->eq($period->getDateInterval()) && $this->getStartDate()->eq($period->getStartDate()) && ($end ? $end->eq($period->getEndDate()) : $this->getRecurrences() === $period->getRecurrences()) && ($this->getOptions() & (~static::IMMUTABLE)) === ($period->getOptions() & (~static::IMMUTABLE)); } /** * Determines if the instance is not equal to another. * Warning: if options differ, instances wil never be equal. * * @param mixed $period * * @see notEqualTo() * * @return bool */ public function ne($period): bool { return $this->notEqualTo($period); } /** * Determines if the instance is not equal to another. * Warning: if options differ, instances wil never be equal. * * @param mixed $period * * @return bool */ public function notEqualTo($period): bool { return !$this->eq($period); } /** * Determines if the start date is before an other given date. * (Rather start/end are included by options is ignored.) * * @param mixed $date * * @return bool */ public function startsBefore($date = null): bool { return $this->getStartDate()->lessThan($this->resolveCarbon($date)); } /** * Determines if the start date is before or the same as a given date. * (Rather start/end are included by options is ignored.) * * @param mixed $date * * @return bool */ public function startsBeforeOrAt($date = null): bool { return $this->getStartDate()->lessThanOrEqualTo($this->resolveCarbon($date)); } /** * Determines if the start date is after an other given date. * (Rather start/end are included by options is ignored.) * * @param mixed $date * * @return bool */ public function startsAfter($date = null): bool { return $this->getStartDate()->greaterThan($this->resolveCarbon($date)); } /** * Determines if the start date is after or the same as a given date. * (Rather start/end are included by options is ignored.) * * @param mixed $date * * @return bool */ public function startsAfterOrAt($date = null): bool { return $this->getStartDate()->greaterThanOrEqualTo($this->resolveCarbon($date)); } /** * Determines if the start date is the same as a given date. * (Rather start/end are included by options is ignored.) * * @param mixed $date * * @return bool */ public function startsAt($date = null): bool { return $this->getStartDate()->equalTo($this->resolveCarbon($date)); } /** * Determines if the end date is before an other given date. * (Rather start/end are included by options is ignored.) * * @param mixed $date * * @return bool */ public function endsBefore($date = null): bool { return $this->calculateEnd()->lessThan($this->resolveCarbon($date)); } /** * Determines if the end date is before or the same as a given date. * (Rather start/end are included by options is ignored.) * * @param mixed $date * * @return bool */ public function endsBeforeOrAt($date = null): bool { return $this->calculateEnd()->lessThanOrEqualTo($this->resolveCarbon($date)); } /** * Determines if the end date is after an other given date. * (Rather start/end are included by options is ignored.) * * @param mixed $date * * @return bool */ public function endsAfter($date = null): bool { return $this->calculateEnd()->greaterThan($this->resolveCarbon($date)); } /** * Determines if the end date is after or the same as a given date. * (Rather start/end are included by options is ignored.) * * @param mixed $date * * @return bool */ public function endsAfterOrAt($date = null): bool { return $this->calculateEnd()->greaterThanOrEqualTo($this->resolveCarbon($date)); } /** * Determines if the end date is the same as a given date. * (Rather start/end are included by options is ignored.) * * @param mixed $date * * @return bool */ public function endsAt($date = null): bool { return $this->calculateEnd()->equalTo($this->resolveCarbon($date)); } /** * Return true if start date is now or later. * (Rather start/end are included by options is ignored.) * * @return bool */ public function isStarted(): bool { return $this->startsBeforeOrAt(); } /** * Return true if end date is now or later. * (Rather start/end are included by options is ignored.) * * @return bool */ public function isEnded(): bool { return $this->endsBeforeOrAt(); } /** * Return true if now is between start date (included) and end date (excluded). * (Rather start/end are included by options is ignored.) * * @return bool */ public function isInProgress(): bool { return $this->isStarted() && !$this->isEnded(); } /** * Round the current instance at the given unit with given precision if specified and the given function. * * @param string $unit * @param float|int|string|\DateInterval|null $precision * @param string $function * * @return static */ public function roundUnit($unit, $precision = 1, $function = 'round') { $self = $this->copyIfImmutable(); $self = $self->setStartDate($self->getStartDate()->roundUnit($unit, $precision, $function)); if ($self->endDate) { $self = $self->setEndDate($self->getEndDate()->roundUnit($unit, $precision, $function)); } return $self->setDateInterval($self->getDateInterval()->roundUnit($unit, $precision, $function)); } /** * Truncate the current instance at the given unit with given precision if specified. * * @param string $unit * @param float|int|string|\DateInterval|null $precision * * @return static */ public function floorUnit($unit, $precision = 1) { return $this->roundUnit($unit, $precision, 'floor'); } /** * Ceil the current instance at the given unit with given precision if specified. * * @param string $unit * @param float|int|string|\DateInterval|null $precision * * @return static */ public function ceilUnit($unit, $precision = 1) { return $this->roundUnit($unit, $precision, 'ceil'); } /** * Round the current instance second with given precision if specified (else period interval is used). * * @param float|int|string|\DateInterval|null $precision * @param string $function * * @return static */ public function round($precision = null, $function = 'round') { return $this->roundWith( $precision ?? $this->getDateInterval()->setLocalTranslator(TranslatorImmutable::get('en'))->forHumans(), $function ); } /** * Round the current instance second with given precision if specified (else period interval is used). * * @param float|int|string|\DateInterval|null $precision * * @return static */ public function floor($precision = null) { return $this->round($precision, 'floor'); } /** * Ceil the current instance second with given precision if specified (else period interval is used). * * @param float|int|string|\DateInterval|null $precision * * @return static */ public function ceil($precision = null) { return $this->round($precision, 'ceil'); } /** * Specify data which should be serialized to JSON. * * @link https://php.net/manual/en/jsonserializable.jsonserialize.php * * @return CarbonInterface[] */ #[ReturnTypeWillChange] public function jsonSerialize() { return $this->toArray(); } /** * Return true if the given date is between start and end. * * @param \Carbon\Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|\DateTimeInterface|string|null $date * * @return bool */ public function contains($date = null): bool { $startMethod = 'startsBefore'.($this->isStartIncluded() ? 'OrAt' : ''); $endMethod = 'endsAfter'.($this->isEndIncluded() ? 'OrAt' : ''); return $this->$startMethod($date) && $this->$endMethod($date); } /** * Return true if the current period follows a given other period (with no overlap). * For instance, [2019-08-01 -> 2019-08-12] follows [2019-07-29 -> 2019-07-31] * Note than in this example, follows() would be false if 2019-08-01 or 2019-07-31 was excluded by options. * * @param \Carbon\CarbonPeriod|\DatePeriod|string $period * * @return bool */ public function follows($period, ...$arguments): bool { $period = $this->resolveCarbonPeriod($period, ...$arguments); return $this->getIncludedStartDate()->equalTo($period->getIncludedEndDate()->add($period->getDateInterval())); } /** * Return true if the given other period follows the current one (with no overlap). * For instance, [2019-07-29 -> 2019-07-31] is followed by [2019-08-01 -> 2019-08-12] * Note than in this example, isFollowedBy() would be false if 2019-08-01 or 2019-07-31 was excluded by options. * * @param \Carbon\CarbonPeriod|\DatePeriod|string $period * * @return bool */ public function isFollowedBy($period, ...$arguments): bool { $period = $this->resolveCarbonPeriod($period, ...$arguments); return $period->follows($this); } /** * Return true if the given period either follows or is followed by the current one. * * @see follows() * @see isFollowedBy() * * @param \Carbon\CarbonPeriod|\DatePeriod|string $period * * @return bool */ public function isConsecutiveWith($period, ...$arguments): bool { return $this->follows($period, ...$arguments) || $this->isFollowedBy($period, ...$arguments); } /** * Update properties after removing built-in filters. * * @return void */ protected function updateInternalState() { if (!$this->hasFilter(static::END_DATE_FILTER)) { $this->endDate = null; } if (!$this->hasFilter(static::RECURRENCES_FILTER)) { $this->recurrences = null; } } /** * Create a filter tuple from raw parameters. * * Will create an automatic filter callback for one of Carbon's is* methods. * * @param array $parameters * * @return array */ protected function createFilterTuple(array $parameters) { $method = array_shift($parameters); if (!$this->isCarbonPredicateMethod($method)) { return [$method, array_shift($parameters)]; } return [function ($date) use ($method, $parameters) { return ([$date, $method])(...$parameters); }, $method]; } /** * Return whether given callable is a string pointing to one of Carbon's is* methods * and should be automatically converted to a filter callback. * * @param callable $callable * * @return bool */ protected function isCarbonPredicateMethod($callable) { return \is_string($callable) && str_starts_with($callable, 'is') && (method_exists($this->dateClass, $callable) || ([$this->dateClass, 'hasMacro'])($callable)); } /** * Recurrences filter callback (limits number of recurrences). * * @SuppressWarnings(PHPMD.UnusedFormalParameter) * * @param \Carbon\Carbon $current * @param int $key * * @return bool|string */ protected function filterRecurrences($current, $key) { if ($key < $this->recurrences) { return true; } return static::END_ITERATION; } /** * End date filter callback. * * @param \Carbon\Carbon $current * * @return bool|string */ protected function filterEndDate($current) { if (!$this->isEndExcluded() && $current == $this->endDate) { return true; } if ($this->dateInterval->invert ? $current > $this->endDate : $current < $this->endDate) { return true; } return static::END_ITERATION; } /** * End iteration filter callback. * * @return string */ protected function endIteration() { return static::END_ITERATION; } /** * Handle change of the parameters. */ protected function handleChangedParameters() { if (($this->getOptions() & static::IMMUTABLE) && $this->dateClass === Carbon::class) { $this->dateClass = CarbonImmutable::class; } elseif (!($this->getOptions() & static::IMMUTABLE) && $this->dateClass === CarbonImmutable::class) { $this->dateClass = Carbon::class; } $this->validationResult = null; } /** * Validate current date and stop iteration when necessary. * * Returns true when current date is valid, false if it is not, or static::END_ITERATION * when iteration should be stopped. * * @return bool|string */ protected function validateCurrentDate() { if ($this->current === null) { $this->rewind(); } // Check after the first rewind to avoid repeating the initial validation. return $this->validationResult ?? ($this->validationResult = $this->checkFilters()); } /** * Check whether current value and key pass all the filters. * * @return bool|string */ protected function checkFilters() { $current = $this->prepareForReturn($this->current); foreach ($this->filters as $tuple) { $result = \call_user_func( $tuple[0], $current->avoidMutation(), $this->key, $this ); if ($result === static::END_ITERATION) { return static::END_ITERATION; } if (!$result) { return false; } } return true; } /** * Prepare given date to be returned to the external logic. * * @param CarbonInterface $date * * @return CarbonInterface */ protected function prepareForReturn(CarbonInterface $date) { $date = ([$this->dateClass, 'make'])($date); if ($this->timezone) { $date = $date->setTimezone($this->timezone); } return $date; } /** * Keep incrementing the current date until a valid date is found or the iteration is ended. * * @throws RuntimeException * * @return void */ protected function incrementCurrentDateUntilValid() { $attempts = 0; do { $this->current = $this->current->add($this->dateInterval); $this->validationResult = null; if (++$attempts > static::NEXT_MAX_ATTEMPTS) { throw new UnreachableException('Could not find next valid date.'); } } while ($this->validateCurrentDate() === false); } /** * Call given macro. * * @param string $name * @param array $parameters * * @return mixed */ protected function callMacro($name, $parameters) { $macro = static::$macros[$name]; if ($macro instanceof Closure) { $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); return ($boundMacro ?: $macro)(...$parameters); } return $macro(...$parameters); } /** * Return the Carbon instance passed through, a now instance in the same timezone * if null given or parse the input if string given. * * @param \Carbon\Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|\DateTimeInterface|string|null $date * * @return \Carbon\CarbonInterface */ protected function resolveCarbon($date = null) { return $this->getStartDate()->nowWithSameTz()->carbonize($date); } /** * Resolve passed arguments or DatePeriod to a CarbonPeriod object. * * @param mixed $period * @param mixed ...$arguments * * @return static */ protected function resolveCarbonPeriod($period, ...$arguments) { if ($period instanceof self) { return $period; } return $period instanceof DatePeriod ? static::instance($period) : static::create($period, ...$arguments); } private function orderCouple($first, $second): array { return $first > $second ? [$second, $first] : [$first, $second]; } private function makeDateTime($value): ?DateTimeInterface { if ($value instanceof DateTimeInterface) { return $value; } if (\is_string($value)) { $value = trim($value); if (!preg_match('/^P[\dT]/', $value) && !preg_match('/^R\d/', $value) && preg_match('/[a-z\d]/i', $value) ) { return Carbon::parse($value, $this->tzName); } } return null; } private function isInfiniteDate($date): bool { return $date instanceof CarbonInterface && ($date->isEndOfTime() || $date->isStartOfTime()); } private function rawDate($date): ?DateTimeInterface { if ($date === false || $date === null) { return null; } if ($date instanceof CarbonInterface) { return $date->isMutable() ? $date->toDateTime() : $date->toDateTimeImmutable(); } if (\in_array(\get_class($date), [DateTime::class, DateTimeImmutable::class], true)) { return $date; } $class = $date instanceof DateTime ? DateTime::class : DateTimeImmutable::class; return new $class($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); } private static function setDefaultParameters(array &$parameters, array $defaults): void { foreach ($defaults as [$index, $name, $value]) { if (!\array_key_exists($index, $parameters) && !\array_key_exists($name, $parameters)) { $parameters[$index] = $value; } } } } PKgt[vvCarbon/PHPStan/MacroScanner.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\PHPStan; use Carbon\CarbonInterface; use PHPStan\Reflection\ReflectionProvider; use ReflectionClass; use ReflectionException; final class MacroScanner { /** * @var \PHPStan\Reflection\ReflectionProvider */ private $reflectionProvider; /** * MacroScanner constructor. * * @param \PHPStan\Reflection\ReflectionProvider $reflectionProvider */ public function __construct(ReflectionProvider $reflectionProvider) { $this->reflectionProvider = $reflectionProvider; } /** * Return true if the given pair class-method is a Carbon macro. * * @param string $className * @phpstan-param class-string $className * * @param string $methodName * * @return bool */ public function hasMethod(string $className, string $methodName): bool { $classReflection = $this->reflectionProvider->getClass($className); if ( $classReflection->getName() !== CarbonInterface::class && !$classReflection->isSubclassOf(CarbonInterface::class) ) { return false; } return \is_callable([$className, 'hasMacro']) && $className::hasMacro($methodName); } /** * Return the Macro for a given pair class-method. * * @param string $className * @phpstan-param class-string $className * * @param string $methodName * * @throws ReflectionException * * @return Macro */ public function getMethod(string $className, string $methodName): Macro { $reflectionClass = new ReflectionClass($className); $property = $reflectionClass->getProperty('globalMacros'); $property->setAccessible(true); $macro = $property->getValue()[$methodName]; return new Macro( $className, $methodName, $macro ); } } PKgt[R-Carbon/PHPStan/Macro.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\PHPStan; use PHPStan\BetterReflection\Reflection\Adapter; use PHPStan\Reflection\Php\BuiltinMethodReflection; use ReflectionMethod; $method = new ReflectionMethod(BuiltinMethodReflection::class, 'getReflection'); require $method->hasReturnType() && $method->getReturnType()->getName() === Adapter\ReflectionMethod::class ? __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroStatic.php' : __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroBuiltin.php'; $method = new ReflectionMethod(BuiltinMethodReflection::class, 'getFileName'); require $method->hasReturnType() ? __DIR__.'/../../../lazy/Carbon/PHPStan/MacroStrongType.php' : __DIR__.'/../../../lazy/Carbon/PHPStan/MacroWeakType.php'; final class Macro extends LazyMacro { } PKgt[ tѦ Carbon/PHPStan/AbstractMacro.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\PHPStan; use Closure; use InvalidArgumentException; use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter as AdapterReflectionParameter; use PHPStan\BetterReflection\Reflection\Adapter\ReflectionType as AdapterReflectionType; use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; use PHPStan\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction; use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; use PHPStan\Reflection\Php\BuiltinMethodReflection; use PHPStan\TrinaryLogic; use ReflectionClass; use ReflectionFunction; use ReflectionMethod; use ReflectionParameter; use ReflectionType; use stdClass; use Throwable; abstract class AbstractMacro implements BuiltinMethodReflection { /** * The reflection function/method. * * @var ReflectionFunction|ReflectionMethod */ protected $reflectionFunction; /** * The class name. * * @var class-string */ private $className; /** * The method name. * * @var string */ private $methodName; /** * The parameters. * * @var ReflectionParameter[] */ private $parameters; /** * The is static. * * @var bool */ private $static = false; /** * Macro constructor. * * @param string $className * @phpstan-param class-string $className * * @param string $methodName * @param callable $macro */ public function __construct(string $className, string $methodName, $macro) { $this->className = $className; $this->methodName = $methodName; $rawReflectionFunction = \is_array($macro) ? new ReflectionMethod($macro[0], $macro[1]) : new ReflectionFunction($macro); $this->reflectionFunction = self::hasModernParser() ? $this->getReflectionFunction($macro) : $rawReflectionFunction; // @codeCoverageIgnore $this->parameters = array_map( function ($parameter) { if ($parameter instanceof BetterReflectionParameter) { return new AdapterReflectionParameter($parameter); } return $parameter; // @codeCoverageIgnore }, $this->reflectionFunction->getParameters() ); if ($rawReflectionFunction->isClosure()) { try { $closure = $rawReflectionFunction->getClosure(); $boundClosure = Closure::bind($closure, new stdClass()); $this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null); } catch (Throwable $e) { $this->static = true; } } } private function getReflectionFunction($spec) { if (\is_array($spec) && \count($spec) === 2 && \is_string($spec[1])) { \assert($spec[1] !== ''); if (\is_object($spec[0])) { return BetterReflectionClass::createFromInstance($spec[0]) ->getMethod($spec[1]); } return BetterReflectionClass::createFromName($spec[0]) ->getMethod($spec[1]); } if (\is_string($spec)) { return BetterReflectionFunction::createFromName($spec); } if ($spec instanceof Closure) { return BetterReflectionFunction::createFromClosure($spec); } throw new InvalidArgumentException('Could not create reflection from the spec given'); // @codeCoverageIgnore } /** * {@inheritdoc} */ public function getDeclaringClass(): ReflectionClass { return new ReflectionClass($this->className); } /** * {@inheritdoc} */ public function isPrivate(): bool { return false; } /** * {@inheritdoc} */ public function isPublic(): bool { return true; } /** * {@inheritdoc} */ public function isFinal(): bool { return false; } /** * {@inheritdoc} */ public function isInternal(): bool { return false; } /** * {@inheritdoc} */ public function isAbstract(): bool { return false; } /** * {@inheritdoc} */ public function isStatic(): bool { return $this->static; } /** * {@inheritdoc} */ public function getDocComment(): ?string { return $this->reflectionFunction->getDocComment() ?: null; } /** * {@inheritdoc} */ public function getName(): string { return $this->methodName; } /** * {@inheritdoc} */ public function getParameters(): array { return $this->parameters; } /** * {@inheritdoc} */ public function getReturnType(): ?ReflectionType { $type = $this->reflectionFunction->getReturnType(); if ($type instanceof ReflectionType) { return $type; // @codeCoverageIgnore } return self::adaptType($type); } /** * {@inheritdoc} */ public function isDeprecated(): TrinaryLogic { return TrinaryLogic::createFromBoolean( $this->reflectionFunction->isDeprecated() || preg_match('/@deprecated/i', $this->getDocComment() ?: '') ); } /** * {@inheritdoc} */ public function isVariadic(): bool { return $this->reflectionFunction->isVariadic(); } /** * {@inheritdoc} */ public function getPrototype(): BuiltinMethodReflection { return $this; } public function getTentativeReturnType(): ?ReflectionType { return null; } public function returnsByReference(): TrinaryLogic { return TrinaryLogic::createNo(); } private static function adaptType($type) { $method = method_exists(AdapterReflectionType::class, 'fromTypeOrNull') ? 'fromTypeOrNull' : 'fromReturnTypeOrNull'; // @codeCoverageIgnore return AdapterReflectionType::$method($type); } private static function hasModernParser(): bool { static $modernParser = null; if ($modernParser !== null) { return $modernParser; } $modernParser = method_exists(AdapterReflectionType::class, 'fromTypeOrNull'); return $modernParser; } } PKgt[lq~  !Carbon/PHPStan/MacroExtension.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\PHPStan; use PHPStan\Reflection\Assertions; use PHPStan\Reflection\ClassReflection; use PHPStan\Reflection\MethodReflection; use PHPStan\Reflection\MethodsClassReflectionExtension; use PHPStan\Reflection\Php\PhpMethodReflectionFactory; use PHPStan\Reflection\ReflectionProvider; use PHPStan\Type\TypehintHelper; /** * Class MacroExtension. * * @codeCoverageIgnore Pure PHPStan wrapper. */ final class MacroExtension implements MethodsClassReflectionExtension { /** * @var PhpMethodReflectionFactory */ protected $methodReflectionFactory; /** * @var MacroScanner */ protected $scanner; /** * Extension constructor. * * @param PhpMethodReflectionFactory $methodReflectionFactory * @param ReflectionProvider $reflectionProvider */ public function __construct( PhpMethodReflectionFactory $methodReflectionFactory, ReflectionProvider $reflectionProvider ) { $this->scanner = new MacroScanner($reflectionProvider); $this->methodReflectionFactory = $methodReflectionFactory; } /** * {@inheritdoc} */ public function hasMethod(ClassReflection $classReflection, string $methodName): bool { return $this->scanner->hasMethod($classReflection->getName(), $methodName); } /** * {@inheritdoc} */ public function getMethod(ClassReflection $classReflection, string $methodName): MethodReflection { $builtinMacro = $this->scanner->getMethod($classReflection->getName(), $methodName); $supportAssertions = class_exists(Assertions::class); return $this->methodReflectionFactory->create( $classReflection, null, $builtinMacro, $classReflection->getActiveTemplateTypeMap(), [], TypehintHelper::decideTypeFromReflection($builtinMacro->getReturnType()), null, null, $builtinMacro->isDeprecated()->yes(), $builtinMacro->isInternal(), $builtinMacro->isFinal(), $supportAssertions ? null : $builtinMacro->getDocComment(), $supportAssertions ? Assertions::createEmpty() : null, null, $builtinMacro->getDocComment(), [] ); } } PKgt[))Carbon/Lang/ar_DJ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ar.php', [ ]); PKgt[Carbon/Lang/wa_BE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Djan SACRE Pablo Saratxaga pablo@mandrakesoft.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['di djanvî', 'di fevrî', 'di måss', 'd’ avri', 'di may', 'di djun', 'di djulete', 'd’ awousse', 'di setimbe', 'd’ octôbe', 'di nôvimbe', 'di decimbe'], 'months_short' => ['dja', 'fev', 'mås', 'avr', 'may', 'djn', 'djl', 'awo', 'set', 'oct', 'nôv', 'dec'], 'weekdays' => ['dimegne', 'londi', 'mårdi', 'mierkidi', 'djudi', 'vénrdi', 'semdi'], 'weekdays_short' => ['dim', 'lon', 'mår', 'mie', 'dju', 'vén', 'sem'], 'weekdays_min' => ['dim', 'lon', 'mår', 'mie', 'dju', 'vén', 'sem'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count anêye', 'y' => ':count anêye', 'a_year' => ':count anêye', 'month' => ':count meûs', 'm' => ':count meûs', 'a_month' => ':count meûs', 'week' => ':count samwinne', 'w' => ':count samwinne', 'a_week' => ':count samwinne', 'day' => ':count djoû', 'd' => ':count djoû', 'a_day' => ':count djoû', 'hour' => ':count eure', 'h' => ':count eure', 'a_hour' => ':count eure', 'minute' => ':count munute', 'min' => ':count munute', 'a_minute' => ':count munute', 'second' => ':count Sigonde', 's' => ':count Sigonde', 'a_second' => ':count Sigonde', ]); PKgt[M2AACarbon/Lang/asa.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['icheheavo', 'ichamthi'], 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Ijm', 'Jmo'], 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Ijm', 'Jmo'], 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Dec'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[4ECarbon/Lang/en_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YY', 'LL' => 'MMMM DD, YYYY', 'LLL' => 'DD MMM HH:mm', 'LLLL' => 'MMMM DD, YYYY HH:mm', ], 'day_of_first_week_of_year' => 1, ]); PKgt[=Y~~Carbon/Lang/sw_UG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/sw.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', ], ]); PKgt[ХCarbon/Lang/sr.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - shaishavgandhi05 * - Serhan Apaydın * - JD Isaacks * - Glavić * - Milos Sakovic */ use Carbon\CarbonInterface; return [ 'year' => ':count godina|:count godine|:count godina', 'y' => ':count g.', 'month' => ':count mesec|:count meseca|:count meseci', 'm' => ':count mj.', 'week' => ':count nedelja|:count nedelje|:count nedelja', 'w' => ':count ned.', 'day' => ':count dan|:count dana|:count dana', 'd' => ':count d.', 'hour' => ':count sat|:count sata|:count sati', 'h' => ':count č.', 'minute' => ':count minut|:count minuta|:count minuta', 'min' => ':count min.', 'second' => ':count sekundu|:count sekunde|:count sekundi', 's' => ':count sek.', 'ago' => 'pre :time', 'from_now' => 'za :time', 'after' => 'nakon :time', 'before' => 'pre :time', 'year_from_now' => ':count godinu|:count godine|:count godina', 'year_ago' => ':count godinu|:count godine|:count godina', 'week_from_now' => ':count nedelju|:count nedelje|:count nedelja', 'week_ago' => ':count nedelju|:count nedelje|:count nedelja', 'diff_now' => 'upravo sada', 'diff_today' => 'danas', 'diff_today_regexp' => 'danas(?:\\s+u)?', 'diff_yesterday' => 'juče', 'diff_yesterday_regexp' => 'juče(?:\\s+u)?', 'diff_tomorrow' => 'sutra', 'diff_tomorrow_regexp' => 'sutra(?:\\s+u)?', 'diff_before_yesterday' => 'prekjuče', 'diff_after_tomorrow' => 'preksutra', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY H:mm', 'LLLL' => 'dddd, D. MMMM YYYY H:mm', ], 'calendar' => [ 'sameDay' => '[danas u] LT', 'nextDay' => '[sutra u] LT', 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[u nedelju u] LT'; case 3: return '[u sredu u] LT'; case 6: return '[u subotu u] LT'; default: return '[u] dddd [u] LT'; } }, 'lastDay' => '[juče u] LT', 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[prošle nedelje u] LT'; case 1: return '[prošlog ponedeljka u] LT'; case 2: return '[prošlog utorka u] LT'; case 3: return '[prošle srede u] LT'; case 4: return '[prošlog četvrtka u] LT'; case 5: return '[prošlog petka u] LT'; default: return '[prošle subote u] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'], 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'], 'weekdays' => ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'], 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sre.', 'čet.', 'pet.', 'sub.'], 'weekdays_min' => ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' i '], ]; PKgt[ Carbon/Lang/bm.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Estelle Comment */ return [ 'year' => 'san :count', 'a_year' => '{1}san kelen|san :count', 'y' => 'san :count', 'month' => 'kalo :count', 'a_month' => '{1}kalo kelen|kalo :count', 'm' => 'k. :count', 'week' => 'dɔgɔkun :count', 'a_week' => 'dɔgɔkun kelen', 'w' => 'd. :count', 'day' => 'tile :count', 'd' => 't. :count', 'a_day' => '{1}tile kelen|tile :count', 'hour' => 'lɛrɛ :count', 'a_hour' => '{1}lɛrɛ kelen|lɛrɛ :count', 'h' => 'l. :count', 'minute' => 'miniti :count', 'a_minute' => '{1}miniti kelen|miniti :count', 'min' => 'm. :count', 'second' => 'sekondi :count', 'a_second' => '{1}sanga dama dama|sekondi :count', 's' => 'sek. :count', 'ago' => 'a bɛ :time bɔ', 'from_now' => ':time kɔnɔ', 'diff_today' => 'Bi', 'diff_yesterday' => 'Kunu', 'diff_yesterday_regexp' => 'Kunu(?:\\s+lɛrɛ)?', 'diff_tomorrow' => 'Sini', 'diff_tomorrow_regexp' => 'Sini(?:\\s+lɛrɛ)?', 'diff_today_regexp' => 'Bi(?:\\s+lɛrɛ)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'MMMM [tile] D [san] YYYY', 'LLL' => 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', 'LLLL' => 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', ], 'calendar' => [ 'sameDay' => '[Bi lɛrɛ] LT', 'nextDay' => '[Sini lɛrɛ] LT', 'nextWeek' => 'dddd [don lɛrɛ] LT', 'lastDay' => '[Kunu lɛrɛ] LT', 'lastWeek' => 'dddd [tɛmɛnen lɛrɛ] LT', 'sameElse' => 'L', ], 'months' => ['Zanwuyekalo', 'Fewuruyekalo', 'Marisikalo', 'Awirilikalo', 'Mɛkalo', 'Zuwɛnkalo', 'Zuluyekalo', 'Utikalo', 'Sɛtanburukalo', 'ɔkutɔburukalo', 'Nowanburukalo', 'Desanburukalo'], 'months_short' => ['Zan', 'Few', 'Mar', 'Awi', 'Mɛ', 'Zuw', 'Zul', 'Uti', 'Sɛt', 'ɔku', 'Now', 'Des'], 'weekdays' => ['Kari', 'Ntɛnɛn', 'Tarata', 'Araba', 'Alamisa', 'Juma', 'Sibiri'], 'weekdays_short' => ['Kar', 'Ntɛ', 'Tar', 'Ara', 'Ala', 'Jum', 'Sib'], 'weekdays_min' => ['Ka', 'Nt', 'Ta', 'Ar', 'Al', 'Ju', 'Si'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' ni '], ]; PKgt[Z  Carbon/Lang/ro_MD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ro.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY, HH:mm', 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', ], ]); PKgt[8 Carbon/Lang/tzm.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - JD Isaacks */ return [ 'year' => '{1}ⴰⵙⴳⴰⵙ|:count ⵉⵙⴳⴰⵙⵏ', 'month' => '{1}ⴰⵢoⵓⵔ|:count ⵉⵢⵢⵉⵔⵏ', 'week' => ':count ⵉⵎⴰⵍⴰⵙⵙ', 'day' => '{1}ⴰⵙⵙ|:count oⵙⵙⴰⵏ', 'hour' => '{1}ⵙⴰⵄⴰ|:count ⵜⴰⵙⵙⴰⵄⵉⵏ', 'minute' => '{1}ⵎⵉⵏⵓⴺ|:count ⵎⵉⵏⵓⴺ', 'second' => '{1}ⵉⵎⵉⴽ|:count ⵉⵎⵉⴽ', 'ago' => 'ⵢⴰⵏ :time', 'from_now' => 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ :time', 'diff_today' => 'ⴰⵙⴷⵅ', 'diff_yesterday' => 'ⴰⵚⴰⵏⵜ', 'diff_yesterday_regexp' => 'ⴰⵚⴰⵏⵜ(?:\\s+ⴴ)?', 'diff_tomorrow' => 'ⴰⵙⴽⴰ', 'diff_tomorrow_regexp' => 'ⴰⵙⴽⴰ(?:\\s+ⴴ)?', 'diff_today_regexp' => 'ⴰⵙⴷⵅ(?:\\s+ⴴ)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[ⴰⵙⴷⵅ ⴴ] LT', 'nextDay' => '[ⴰⵙⴽⴰ ⴴ] LT', 'nextWeek' => 'dddd [ⴴ] LT', 'lastDay' => '[ⴰⵚⴰⵏⵜ ⴴ] LT', 'lastWeek' => 'dddd [ⴴ] LT', 'sameElse' => 'L', ], 'months' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵟⵓⴱⵕ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⵏⴱⵉⵔ'], 'months_short' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵟⵓⴱⵕ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⵏⴱⵉⵔ'], 'weekdays' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵔⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⴰⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], 'weekdays_short' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵔⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⴰⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], 'weekdays_min' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵔⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⴰⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'weekend' => [5, 6], ]; PKgt[v__Carbon/Lang/bi_VU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com & maninder1.s@samsung.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'dddd DD MMM YYYY', ], 'months' => ['jenuware', 'febwari', 'maj', 'epril', 'mei', 'jun', 'julae', 'ogis', 'septemba', 'oktoba', 'novemba', 'disemba'], 'months_short' => ['jen', 'feb', 'maj', 'epr', 'mei', 'jun', 'jul', 'ogi', 'sep', 'okt', 'nov', 'dis'], 'weekdays' => ['sande', 'mande', 'maj', 'wota', 'fraede', 'sarede'], 'weekdays_short' => ['san', 'man', 'maj', 'wot', 'fra', 'sar'], 'weekdays_min' => ['san', 'man', 'maj', 'wot', 'fra', 'sar'], 'year' => ':count seven', // less reliable 'y' => ':count seven', // less reliable 'a_year' => ':count seven', // less reliable 'month' => ':count mi', // less reliable 'm' => ':count mi', // less reliable 'a_month' => ':count mi', // less reliable 'week' => ':count sarede', // less reliable 'w' => ':count sarede', // less reliable 'a_week' => ':count sarede', // less reliable 'day' => ':count betde', // less reliable 'd' => ':count betde', // less reliable 'a_day' => ':count betde', // less reliable 'hour' => ':count klok', // less reliable 'h' => ':count klok', // less reliable 'a_hour' => ':count klok', // less reliable 'minute' => ':count smol', // less reliable 'min' => ':count smol', // less reliable 'a_minute' => ':count smol', // less reliable 'second' => ':count tu', // less reliable 's' => ':count tu', // less reliable 'a_second' => ':count tu', // less reliable ]); PKgt[[ia  Carbon/Lang/pt_GQ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/pt.php'; PKgt[BCarbon/Lang/mg_MG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - The Debian Project modified by GNU//Linux Malagasy Rado Ramarotafika,Do-Risika RAFIEFERANTSIARONJY rado@linuxmg.org,dourix@free.fr */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['Janoary', 'Febroary', 'Martsa', 'Aprily', 'Mey', 'Jona', 'Jolay', 'Aogositra', 'Septambra', 'Oktobra', 'Novambra', 'Desambra'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mey', 'Jon', 'Jol', 'Aog', 'Sep', 'Okt', 'Nov', 'Des'], 'weekdays' => ['alahady', 'alatsinainy', 'talata', 'alarobia', 'alakamisy', 'zoma', 'sabotsy'], 'weekdays_short' => ['lhd', 'lts', 'tlt', 'lrb', 'lkm', 'zom', 'sab'], 'weekdays_min' => ['lhd', 'lts', 'tlt', 'lrb', 'lkm', 'zom', 'sab'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'minute' => ':count minitra', // less reliable 'min' => ':count minitra', // less reliable 'a_minute' => ':count minitra', // less reliable 'year' => ':count taona', 'y' => ':count taona', 'a_year' => ':count taona', 'month' => ':count volana', 'm' => ':count volana', 'a_month' => ':count volana', 'week' => ':count herinandro', 'w' => ':count herinandro', 'a_week' => ':count herinandro', 'day' => ':count andro', 'd' => ':count andro', 'a_day' => ':count andro', 'hour' => ':count ora', 'h' => ':count ora', 'a_hour' => ':count ora', 'second' => ':count segondra', 's' => ':count segondra', 'a_second' => ':count segondra', ]); PKgt[.  Carbon/Lang/sv_FI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/sv.php'; PKgt[:NNCarbon/Lang/yo_BJ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/yo.php', [ 'meridiem' => ['Àárɔ̀', 'Ɔ̀sán'], 'weekdays' => ['Ɔjɔ́ Àìkú', 'Ɔjɔ́ Ajé', 'Ɔjɔ́ Ìsɛ́gun', 'Ɔjɔ́rú', 'Ɔjɔ́bɔ', 'Ɔjɔ́ Ɛtì', 'Ɔjɔ́ Àbámɛ́ta'], 'weekdays_short' => ['Àìkú', 'Ajé', 'Ìsɛ́gun', 'Ɔjɔ́rú', 'Ɔjɔ́bɔ', 'Ɛtì', 'Àbámɛ́ta'], 'weekdays_min' => ['Àìkú', 'Ajé', 'Ìsɛ́gun', 'Ɔjɔ́rú', 'Ɔjɔ́bɔ', 'Ɛtì', 'Àbámɛ́ta'], 'months' => ['Oshù Shɛ́rɛ́', 'Oshù Èrèlè', 'Oshù Ɛrɛ̀nà', 'Oshù Ìgbé', 'Oshù Ɛ̀bibi', 'Oshù Òkúdu', 'Oshù Agɛmɔ', 'Oshù Ògún', 'Oshù Owewe', 'Oshù Ɔ̀wàrà', 'Oshù Bélú', 'Oshù Ɔ̀pɛ̀'], 'months_short' => ['Shɛ́rɛ́', 'Èrèlè', 'Ɛrɛ̀nà', 'Ìgbé', 'Ɛ̀bibi', 'Òkúdu', 'Agɛmɔ', 'Ògún', 'Owewe', 'Ɔ̀wàrà', 'Bélú', 'Ɔ̀pɛ̀'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[pGGCarbon/Lang/en_SI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[pGGCarbon/Lang/en_AI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[vR`OOCarbon/Lang/mhr.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/mhr_RU.php'; PKgt[pGGCarbon/Lang/en_TV.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[Carbon/Lang/en_NG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[w  Carbon/Lang/fr_VU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd D MMMM YYYY h:mm a', ], ]); PKgt[a= Carbon/Lang/ps.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Muhammad Nasir Rahimi * - Nassim Nasibullah (spinzar) */ return [ 'year' => ':count کال|:count کاله', 'y' => ':countکال|:countکاله', 'month' => ':count مياشت|:count مياشتي', 'm' => ':countمياشت|:countمياشتي', 'week' => ':count اونۍ|:count اونۍ', 'w' => ':countاونۍ|:countاونۍ', 'day' => ':count ورځ|:count ورځي', 'd' => ':countورځ|:countورځي', 'hour' => ':count ساعت|:count ساعته', 'h' => ':countساعت|:countساعته', 'minute' => ':count دقيقه|:count دقيقې', 'min' => ':countدقيقه|:countدقيقې', 'second' => ':count ثانيه|:count ثانيې', 's' => ':countثانيه|:countثانيې', 'ago' => ':time دمخه', 'from_now' => ':time له اوس څخه', 'after' => ':time وروسته', 'before' => ':time دمخه', 'list' => ['، ', ' او '], 'meridiem' => ['غ.م.', 'غ.و.'], 'weekdays' => ['اتوار', 'ګل', 'نهه', 'شورو', 'زيارت', 'جمعه', 'خالي'], 'weekdays_short' => ['ا', 'ګ', 'ن', 'ش', 'ز', 'ج', 'خ'], 'weekdays_min' => ['ا', 'ګ', 'ن', 'ش', 'ز', 'ج', 'خ'], 'months' => ['جنوري', 'فبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سېپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'months_short' => ['جنوري', 'فبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سېپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'months_standalone' => ['جنوري', 'فېبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'months_short_standalone' => ['جنوري', 'فبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'first_day_of_week' => 6, 'weekend' => [4, 5], 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'YYYY/M/d', 'LL' => 'YYYY MMM D', 'LLL' => 'د YYYY د MMMM D H:mm', 'LLLL' => 'dddd د YYYY د MMMM D H:mm', ], ]; PKgt[,͹  Carbon/Lang/ro.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - JD Isaacks * - Cătălin Georgescu * - Valentin Ivaşcu (oriceon) */ return [ 'year' => ':count an|:count ani|:count ani', 'a_year' => 'un an|:count ani|:count ani', 'y' => ':count a.', 'month' => ':count lună|:count luni|:count luni', 'a_month' => 'o lună|:count luni|:count luni', 'm' => ':count l.', 'week' => ':count săptămână|:count săptămâni|:count săptămâni', 'a_week' => 'o săptămână|:count săptămâni|:count săptămâni', 'w' => ':count săp.', 'day' => ':count zi|:count zile|:count zile', 'a_day' => 'o zi|:count zile|:count zile', 'd' => ':count z.', 'hour' => ':count oră|:count ore|:count ore', 'a_hour' => 'o oră|:count ore|:count ore', 'h' => ':count o.', 'minute' => ':count minut|:count minute|:count minute', 'a_minute' => 'un minut|:count minute|:count minute', 'min' => ':count m.', 'second' => ':count secundă|:count secunde|:count secunde', 'a_second' => 'câteva secunde|:count secunde|:count secunde', 's' => ':count sec.', 'ago' => ':time în urmă', 'from_now' => 'peste :time', 'after' => 'peste :time', 'before' => 'acum :time', 'diff_now' => 'acum', 'diff_today' => 'azi', 'diff_today_regexp' => 'azi(?:\\s+la)?', 'diff_yesterday' => 'ieri', 'diff_yesterday_regexp' => 'ieri(?:\\s+la)?', 'diff_tomorrow' => 'mâine', 'diff_tomorrow_regexp' => 'mâine(?:\\s+la)?', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY H:mm', 'LLLL' => 'dddd, D MMMM YYYY H:mm', ], 'calendar' => [ 'sameDay' => '[azi la] LT', 'nextDay' => '[mâine la] LT', 'nextWeek' => 'dddd [la] LT', 'lastDay' => '[ieri la] LT', 'lastWeek' => '[fosta] dddd [la] LT', 'sameElse' => 'L', ], 'months' => ['ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie'], 'months_short' => ['ian.', 'feb.', 'mar.', 'apr.', 'mai', 'iun.', 'iul.', 'aug.', 'sept.', 'oct.', 'nov.', 'dec.'], 'weekdays' => ['duminică', 'luni', 'marți', 'miercuri', 'joi', 'vineri', 'sâmbătă'], 'weekdays_short' => ['dum', 'lun', 'mar', 'mie', 'joi', 'vin', 'sâm'], 'weekdays_min' => ['du', 'lu', 'ma', 'mi', 'jo', 'vi', 'sâ'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' și '], 'meridiem' => ['a.m.', 'p.m.'], ]; PKgt[(|@zGGCarbon/Lang/es_GQ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 1, ]); PKgt[jCarbon/Lang/ber_DZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Pablo Saratxaga pablo@mandrakesoft.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek'], 'weekdays' => ['bazar günü', 'birinci gün', 'ikinci gün', 'üçüncü gün', 'dördüncü gün', 'beşinci gün', 'altıncı gün'], 'weekdays_short' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], 'weekdays_min' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, ]); PKgt[pGGCarbon/Lang/en_001.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[coCarbon/Lang/rw_RW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Rwanda Steve Murphy murf@e-tools.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['Mutarama', 'Gashyantare', 'Werurwe', 'Mata', 'Gicuransi', 'Kamena', 'Nyakanga', 'Kanama', 'Nzeli', 'Ukwakira', 'Ugushyingo', 'Ukuboza'], 'months_short' => ['Mut', 'Gas', 'Wer', 'Mat', 'Gic', 'Kam', 'Nya', 'Kan', 'Nze', 'Ukw', 'Ugu', 'Uku'], 'weekdays' => ['Ku cyumweru', 'Kuwa mbere', 'Kuwa kabiri', 'Kuwa gatatu', 'Kuwa kane', 'Kuwa gatanu', 'Kuwa gatandatu'], 'weekdays_short' => ['Mwe', 'Mbe', 'Kab', 'Gtu', 'Kan', 'Gnu', 'Gnd'], 'weekdays_min' => ['Mwe', 'Mbe', 'Kab', 'Gtu', 'Kan', 'Gnu', 'Gnd'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'second' => ':count vuna', // less reliable 's' => ':count vuna', // less reliable 'a_second' => ':count vuna', // less reliable 'year' => 'aka :count', 'y' => 'aka :count', 'a_year' => 'aka :count', 'month' => 'ezi :count', 'm' => 'ezi :count', 'a_month' => 'ezi :count', 'week' => ':count icyumweru', 'w' => ':count icyumweru', 'a_week' => ':count icyumweru', 'day' => ':count nsi', 'd' => ':count nsi', 'a_day' => ':count nsi', 'hour' => 'saha :count', 'h' => 'saha :count', 'a_hour' => 'saha :count', 'minute' => ':count -nzinya', 'min' => ':count -nzinya', 'a_minute' => ':count -nzinya', ]); PKgt[vCarbon/Lang/sw_TZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kamusi Project Martin Benjamin locales@kamusi.org */ return array_replace_recursive(require __DIR__.'/sw.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], 'weekdays_short' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['asubuhi', 'alasiri'], ]); PKgt[pGGCarbon/Lang/en_SB.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[''x  Carbon/Lang/fr_GQ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[cQQCarbon/Lang/ca_ES_Valencia.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Component\Translation\PluralizationRules; // @codeCoverageIgnoreStart if (class_exists(PluralizationRules::class)) { PluralizationRules::set(static function ($number) { return PluralizationRules::get($number, 'ca'); }, 'ca_ES_Valencia'); } // @codeCoverageIgnoreEnd return array_replace_recursive(require __DIR__.'/ca.php', [ ]); PKgt[<00Carbon/Lang/bas.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['I bikɛ̂glà', 'I ɓugajɔp'], 'weekdays' => ['ŋgwà nɔ̂y', 'ŋgwà njaŋgumba', 'ŋgwà ûm', 'ŋgwà ŋgê', 'ŋgwà mbɔk', 'ŋgwà kɔɔ', 'ŋgwà jôn'], 'weekdays_short' => ['nɔy', 'nja', 'uum', 'ŋge', 'mbɔ', 'kɔɔ', 'jon'], 'weekdays_min' => ['nɔy', 'nja', 'uum', 'ŋge', 'mbɔ', 'kɔɔ', 'jon'], 'months' => ['Kɔndɔŋ', 'Màcɛ̂l', 'Màtùmb', 'Màtop', 'M̀puyɛ', 'Hìlòndɛ̀', 'Njèbà', 'Hìkaŋ', 'Dìpɔ̀s', 'Bìòôm', 'Màyɛsèp', 'Lìbuy li ńyèe'], 'months_short' => ['kɔn', 'mac', 'mat', 'mto', 'mpu', 'hil', 'nje', 'hik', 'dip', 'bio', 'may', 'liɓ'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'second' => ':count móndî', // less reliable 's' => ':count móndî', // less reliable 'a_second' => ':count móndî', // less reliable ]); PKgt[Ӿ6Carbon/Lang/yue_Hans.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/zh_Hans.php'; PKgt[pGGCarbon/Lang/en_NL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[.{{Carbon/Lang/ca.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - mestremuten * - François B * - Marc Ordinas i Llopis * - Pere Orga * - JD Isaacks * - Quentí * - Víctor Díaz * - Xavi * - qcardona */ use Carbon\CarbonInterface; return [ 'year' => ':count any|:count anys', 'a_year' => 'un any|:count anys', 'y' => ':count any|:count anys', 'month' => ':count mes|:count mesos', 'a_month' => 'un mes|:count mesos', 'm' => ':count mes|:count mesos', 'week' => ':count setmana|:count setmanes', 'a_week' => 'una setmana|:count setmanes', 'w' => ':count setmana|:count setmanes', 'day' => ':count dia|:count dies', 'a_day' => 'un dia|:count dies', 'd' => ':count d', 'hour' => ':count hora|:count hores', 'a_hour' => 'una hora|:count hores', 'h' => ':count h', 'minute' => ':count minut|:count minuts', 'a_minute' => 'un minut|:count minuts', 'min' => ':count min', 'second' => ':count segon|:count segons', 'a_second' => 'uns segons|:count segons', 's' => ':count s', 'ago' => 'fa :time', 'from_now' => 'd\'aquí a :time', 'after' => ':time després', 'before' => ':time abans', 'diff_now' => 'ara mateix', 'diff_today' => 'avui', 'diff_today_regexp' => 'avui(?:\\s+a)?(?:\\s+les)?', 'diff_yesterday' => 'ahir', 'diff_yesterday_regexp' => 'ahir(?:\\s+a)?(?:\\s+les)?', 'diff_tomorrow' => 'demà', 'diff_tomorrow_regexp' => 'demà(?:\\s+a)?(?:\\s+les)?', 'diff_before_yesterday' => 'abans d\'ahir', 'diff_after_tomorrow' => 'demà passat', 'period_recurrences' => ':count cop|:count cops', 'period_interval' => 'cada :interval', 'period_start_date' => 'de :date', 'period_end_date' => 'fins a :date', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM [de] YYYY', 'LLL' => 'D MMMM [de] YYYY [a les] H:mm', 'LLLL' => 'dddd D MMMM [de] YYYY [a les] H:mm', ], 'calendar' => [ 'sameDay' => function (CarbonInterface $current) { return '[avui a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; }, 'nextDay' => function (CarbonInterface $current) { return '[demà a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; }, 'nextWeek' => function (CarbonInterface $current) { return 'dddd [a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; }, 'lastDay' => function (CarbonInterface $current) { return '[ahir a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; }, 'lastWeek' => function (CarbonInterface $current) { return '[el] dddd [passat a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; }, 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { return $number.( ($period === 'w' || $period === 'W') ? 'a' : ( ($number === 1) ? 'r' : ( ($number === 2) ? 'n' : ( ($number === 3) ? 'r' : ( ($number === 4) ? 't' : 'è' ) ) ) ) ); }, 'months' => ['de gener', 'de febrer', 'de març', 'd\'abril', 'de maig', 'de juny', 'de juliol', 'd\'agost', 'de setembre', 'd\'octubre', 'de novembre', 'de desembre'], 'months_standalone' => ['gener', 'febrer', 'març', 'abril', 'maig', 'juny', 'juliol', 'agost', 'setembre', 'octubre', 'novembre', 'desembre'], 'months_short' => ['de gen.', 'de febr.', 'de març', 'd\'abr.', 'de maig', 'de juny', 'de jul.', 'd\'ag.', 'de set.', 'd\'oct.', 'de nov.', 'de des.'], 'months_short_standalone' => ['gen.', 'febr.', 'març', 'abr.', 'maig', 'juny', 'jul.', 'ag.', 'set.', 'oct.', 'nov.', 'des.'], 'months_regexp' => '/(D[oD]?[\s,]+MMMM?|L{2,4}|l{2,4})/', 'weekdays' => ['diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte'], 'weekdays_short' => ['dg.', 'dl.', 'dt.', 'dc.', 'dj.', 'dv.', 'ds.'], 'weekdays_min' => ['dg', 'dl', 'dt', 'dc', 'dj', 'dv', 'ds'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' i '], 'meridiem' => ['a. m.', 'p. m.'], ]; PKgt[3`  Carbon/Lang/th_TH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/th.php'; PKgt[Carbon/Lang/en_CA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Zhan Tong Zhang * - Mayank Badola * - JD Isaacks */ return array_replace_recursive(require __DIR__.'/en.php', [ 'from_now' => 'in :time', 'formats' => [ 'LT' => 'h:mm A', 'LTS' => 'h:mm:ss A', 'L' => 'YYYY-MM-DD', 'LL' => 'MMMM D, YYYY', 'LLL' => 'MMMM D, YYYY h:mm A', 'LLLL' => 'dddd, MMMM D, YYYY h:mm A', ], ]); PKgt[}"Carbon/Lang/st_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Pherekgong', 'Hlakola', 'Tlhakubele', 'Mmese', 'Motsheanong', 'Phupjane', 'Phupu', 'Phato', 'Leotse', 'Mphalane', 'Pudungwana', 'Tshitwe'], 'months_short' => ['Phe', 'Hla', 'TlH', 'Mme', 'Mot', 'Jan', 'Upu', 'Pha', 'Leo', 'Mph', 'Pud', 'Tsh'], 'weekdays' => ['Sontaha', 'Mantaha', 'Labobedi', 'Laboraro', 'Labone', 'Labohlano', 'Moqebelo'], 'weekdays_short' => ['Son', 'Mma', 'Bed', 'Rar', 'Ne', 'Hla', 'Moq'], 'weekdays_min' => ['Son', 'Mma', 'Bed', 'Rar', 'Ne', 'Hla', 'Moq'], 'day_of_first_week_of_year' => 1, 'week' => ':count Sontaha', // less reliable 'w' => ':count Sontaha', // less reliable 'a_week' => ':count Sontaha', // less reliable 'day' => ':count letsatsi', // less reliable 'd' => ':count letsatsi', // less reliable 'a_day' => ':count letsatsi', // less reliable 'hour' => ':count sešupanako', // less reliable 'h' => ':count sešupanako', // less reliable 'a_hour' => ':count sešupanako', // less reliable 'minute' => ':count menyane', // less reliable 'min' => ':count menyane', // less reliable 'a_minute' => ':count menyane', // less reliable 'second' => ':count thusa', // less reliable 's' => ':count thusa', // less reliable 'a_second' => ':count thusa', // less reliable 'year' => ':count selemo', 'y' => ':count selemo', 'a_year' => ':count selemo', 'month' => ':count kgwedi', 'm' => ':count kgwedi', 'a_month' => ':count kgwedi', ]); PKgt[җ1kNNCarbon/Lang/aa.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/aa_DJ.php'; PKgt[lWCarbon/Lang/naq.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ǁgoagas', 'ǃuias'], 'weekdays' => ['Sontaxtsees', 'Mantaxtsees', 'Denstaxtsees', 'Wunstaxtsees', 'Dondertaxtsees', 'Fraitaxtsees', 'Satertaxtsees'], 'weekdays_short' => ['Son', 'Ma', 'De', 'Wu', 'Do', 'Fr', 'Sat'], 'weekdays_min' => ['Son', 'Ma', 'De', 'Wu', 'Do', 'Fr', 'Sat'], 'months' => ['ǃKhanni', 'ǃKhanǀgôab', 'ǀKhuuǁkhâb', 'ǃHôaǂkhaib', 'ǃKhaitsâb', 'Gamaǀaeb', 'ǂKhoesaob', 'Aoǁkhuumûǁkhâb', 'Taraǀkhuumûǁkhâb', 'ǂNûǁnâiseb', 'ǀHooǂgaeb', 'Hôasoreǁkhâb'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd, D MMMM YYYY h:mm a', ], 'year' => ':count kurigu', 'y' => ':count kurigu', 'a_year' => ':count kurigu', 'month' => ':count ǁaub', // less reliable 'm' => ':count ǁaub', // less reliable 'a_month' => ':count ǁaub', // less reliable 'week' => ':count hû', // less reliable 'w' => ':count hû', // less reliable 'a_week' => ':count hû', // less reliable 'day' => ':count ǀhobas', // less reliable 'd' => ':count ǀhobas', // less reliable 'a_day' => ':count ǀhobas', // less reliable 'hour' => ':count ǂgaes', // less reliable 'h' => ':count ǂgaes', // less reliable 'a_hour' => ':count ǂgaes', // less reliable 'minute' => ':count minutga', // less reliable 'min' => ':count minutga', // less reliable 'a_minute' => ':count minutga', // less reliable ]); PKgt[}  Carbon/Lang/gl_ES.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/gl.php'; PKgt[=Y~~Carbon/Lang/sw_CD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/sw.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', ], ]); PKgt[pGGCarbon/Lang/en_MU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[LOOCarbon/Lang/brx.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/brx_IN.php'; PKgt[pGGCarbon/Lang/en_SC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[}<  Carbon/Lang/mt_MT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/mt.php'; PKgt[s!!Carbon/Lang/mn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - Tsutomu Kuroda * - tjku * - Max Melentiev * - Zolzaya Erdenebaatar * - Tom Hughes * - Akira Matsuda * - Christopher Dell * - Michael Kessler * - Enrique Vidal * - Simone Carletti * - Aaron Patterson * - Nicolás Hock Isaza * - Ochirkhuyag * - Batmandakh * - lucifer-crybaby */ return [ 'year' => ':count жил', 'y' => ':count жил', 'month' => ':count сар', 'm' => ':count сар', 'week' => ':count долоо хоног', 'w' => ':count долоо хоног', 'day' => ':count өдөр', 'd' => ':count өдөр', 'hour' => ':count цаг', 'h' => ':countц', 'minute' => ':count минут', 'min' => ':countм', 'second' => ':count секунд', 's' => ':countс', 'ago_mode' => 'last', 'ago' => ':time өмнө', 'year_ago' => ':count жилийн', 'y_ago' => ':count жилийн', 'month_ago' => ':count сарын', 'm_ago' => ':count сарын', 'day_ago' => ':count хоногийн', 'd_ago' => ':count хоногийн', 'week_ago' => ':count долоо хоногийн', 'w_ago' => ':count долоо хоногийн', 'hour_ago' => ':count цагийн', 'minute_ago' => ':count минутын', 'second_ago' => ':count секундын', 'from_now_mode' => 'last', 'from_now' => 'одоогоос :time', 'year_from_now' => ':count жилийн дараа', 'y_from_now' => ':count жилийн дараа', 'month_from_now' => ':count сарын дараа', 'm_from_now' => ':count сарын дараа', 'day_from_now' => ':count хоногийн дараа', 'd_from_now' => ':count хоногийн дараа', 'hour_from_now' => ':count цагийн дараа', 'minute_from_now' => ':count минутын дараа', 'second_from_now' => ':count секундын дараа', 'after_mode' => 'last', 'after' => ':time дараа', 'year_after' => ':count жилийн', 'y_after' => ':count жилийн', 'month_after' => ':count сарын', 'm_after' => ':count сарын', 'day_after' => ':count хоногийн', 'd_after' => ':count хоногийн', 'hour_after' => ':count цагийн', 'minute_after' => ':count минутын', 'second_after' => ':count секундын', 'before_mode' => 'last', 'before' => ':time өмнө', 'year_before' => ':count жилийн', 'y_before' => ':count жилийн', 'month_before' => ':count сарын', 'm_before' => ':count сарын', 'day_before' => ':count хоногийн', 'd_before' => ':count хоногийн', 'hour_before' => ':count цагийн', 'minute_before' => ':count минутын', 'second_before' => ':count секундын', 'list' => ', ', 'diff_now' => 'одоо', 'diff_yesterday' => 'өчигдөр', 'diff_tomorrow' => 'маргааш', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-DD', 'LL' => 'YYYY MMMM DD', 'LLL' => 'YY-MM-DD, HH:mm', 'LLLL' => 'YYYY MMMM DD, HH:mm', ], 'weekdays' => ['Ням', 'Даваа', 'Мягмар', 'Лхагва', 'Пүрэв', 'Баасан', 'Бямба'], 'weekdays_short' => ['Ня', 'Да', 'Мя', 'Лх', 'Пү', 'Ба', 'Бя'], 'weekdays_min' => ['Ня', 'Да', 'Мя', 'Лх', 'Пү', 'Ба', 'Бя'], 'months' => ['1 сар', '2 сар', '3 сар', '4 сар', '5 сар', '6 сар', '7 сар', '8 сар', '9 сар', '10 сар', '11 сар', '12 сар'], 'months_short' => ['1 сар', '2 сар', '3 сар', '4 сар', '5 сар', '6 сар', '7 сар', '8 сар', '9 сар', '10 сар', '11 сар', '12 сар'], 'meridiem' => ['өглөө', 'орой'], 'first_day_of_week' => 1, ]; PKgt[}))Carbon/Lang/ca_FR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ca.php', [ ]); PKgt[sCarbon/Lang/cgg.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Sande', 'Orwokubanza', 'Orwakabiri', 'Orwakashatu', 'Orwakana', 'Orwakataano', 'Orwamukaaga'], 'weekdays_short' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], 'weekdays_min' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], 'months' => ['Okwokubanza', 'Okwakabiri', 'Okwakashatu', 'Okwakana', 'Okwakataana', 'Okwamukaaga', 'Okwamushanju', 'Okwamunaana', 'Okwamwenda', 'Okwaikumi', 'Okwaikumi na kumwe', 'Okwaikumi na ibiri'], 'months_short' => ['KBZ', 'KBR', 'KST', 'KKN', 'KTN', 'KMK', 'KMS', 'KMN', 'KMW', 'KKM', 'KNK', 'KNB'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'day' => ':count ruhanga', // less reliable 'd' => ':count ruhanga', // less reliable 'a_day' => ':count ruhanga', // less reliable ]); PKgt[+3Carbon/Lang/ar_YE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[7,Carbon/Lang/brx_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Red Hat Pune bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'M/D/YY', ], 'months' => ['जानुवारी', 'फेब्रुवारी', 'मार्स', 'एफ्रिल', 'मे', 'जुन', 'जुलाइ', 'आगस्थ', 'सेबथेज्ब़र', 'अखथबर', 'नबेज्ब़र', 'दिसेज्ब़र'], 'months_short' => ['जानुवारी', 'फेब्रुवारी', 'मार्स', 'एप्रिल', 'मे', 'जुन', 'जुलाइ', 'आगस्थ', 'सेबथेज्ब़र', 'अखथबर', 'नबेज्ब़र', 'दिसेज्ब़र'], 'weekdays' => ['रबिबार', 'सोबार', 'मंगलबार', 'बुदबार', 'बिसथिबार', 'सुखुरबार', 'सुनिबार'], 'weekdays_short' => ['रबि', 'सम', 'मंगल', 'बुद', 'बिसथि', 'सुखुर', 'सुनि'], 'weekdays_min' => ['रबि', 'सम', 'मंगल', 'बुद', 'बिसथि', 'सुखुर', 'सुनि'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['फुं.', 'बेलासे.'], ]); PKgt[O DMMCarbon/Lang/agr_PE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - somosazucar.org libc-alpha@sourceware.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['Petsatin', 'Kupitin', 'Uyaitin', 'Tayutin', 'Kegketin', 'Tegmatin', 'Kuntutin', 'Yagkujutin', 'Daiktatin', 'Ipamtatin', 'Shinutin', 'Sakamtin'], 'months_short' => ['Pet', 'Kup', 'Uya', 'Tay', 'Keg', 'Teg', 'Kun', 'Yag', 'Dait', 'Ipam', 'Shin', 'Sak'], 'weekdays' => ['Tuntuamtin', 'Achutin', 'Kugkuktin', 'Saketin', 'Shimpitin', 'Imaptin', 'Bataetin'], 'weekdays_short' => ['Tun', 'Ach', 'Kug', 'Sak', 'Shim', 'Im', 'Bat'], 'weekdays_min' => ['Tun', 'Ach', 'Kug', 'Sak', 'Shim', 'Im', 'Bat'], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 7, 'meridiem' => ['VM', 'NM'], 'year' => ':count yaya', // less reliable 'y' => ':count yaya', // less reliable 'a_year' => ':count yaya', // less reliable 'month' => ':count nantu', // less reliable 'm' => ':count nantu', // less reliable 'a_month' => ':count nantu', // less reliable 'day' => ':count nayaim', // less reliable 'd' => ':count nayaim', // less reliable 'a_day' => ':count nayaim', // less reliable 'hour' => ':count kuwiš', // less reliable 'h' => ':count kuwiš', // less reliable 'a_hour' => ':count kuwiš', // less reliable ]); PKgt[й@@Carbon/Lang/ksb.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['makeo', 'nyiaghuo'], 'weekdays' => ['Jumaapii', 'Jumaatatu', 'Jumaane', 'Jumaatano', 'Alhamisi', 'Ijumaa', 'Jumaamosi'], 'weekdays_short' => ['Jpi', 'Jtt', 'Jmn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'weekdays_min' => ['Jpi', 'Jtt', 'Jmn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'months' => ['Januali', 'Febluali', 'Machi', 'Aplili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[V V Carbon/Lang/sq.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - JD Isaacks * - Fadion Dashi */ return [ 'year' => ':count vit|:count vjet', 'a_year' => 'një vit|:count vite', 'y' => ':count v.', 'month' => ':count muaj', 'a_month' => 'një muaj|:count muaj', 'm' => ':count muaj', 'week' => ':count javë', 'a_week' => ':count javë|:count javë', 'w' => ':count j.', 'day' => ':count ditë', 'a_day' => 'një ditë|:count ditë', 'd' => ':count d.', 'hour' => ':count orë', 'a_hour' => 'një orë|:count orë', 'h' => ':count o.', 'minute' => ':count minutë|:count minuta', 'a_minute' => 'një minutë|:count minuta', 'min' => ':count min.', 'second' => ':count sekondë|:count sekonda', 'a_second' => 'disa sekonda|:count sekonda', 's' => ':count s.', 'ago' => ':time më parë', 'from_now' => 'në :time', 'after' => ':time pas', 'before' => ':time para', 'diff_now' => 'tani', 'diff_today' => 'Sot', 'diff_today_regexp' => 'Sot(?:\\s+në)?', 'diff_yesterday' => 'dje', 'diff_yesterday_regexp' => 'Dje(?:\\s+në)?', 'diff_tomorrow' => 'nesër', 'diff_tomorrow_regexp' => 'Nesër(?:\\s+në)?', 'diff_before_yesterday' => 'pardje', 'diff_after_tomorrow' => 'pasnesër', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Sot në] LT', 'nextDay' => '[Nesër në] LT', 'nextWeek' => 'dddd [në] LT', 'lastDay' => '[Dje në] LT', 'lastWeek' => 'dddd [e kaluar në] LT', 'sameElse' => 'L', ], 'ordinal' => ':number.', 'meridiem' => ['PD', 'MD'], 'months' => ['janar', 'shkurt', 'mars', 'prill', 'maj', 'qershor', 'korrik', 'gusht', 'shtator', 'tetor', 'nëntor', 'dhjetor'], 'months_short' => ['jan', 'shk', 'mar', 'pri', 'maj', 'qer', 'kor', 'gus', 'sht', 'tet', 'nën', 'dhj'], 'weekdays' => ['e diel', 'e hënë', 'e martë', 'e mërkurë', 'e enjte', 'e premte', 'e shtunë'], 'weekdays_short' => ['die', 'hën', 'mar', 'mër', 'enj', 'pre', 'sht'], 'weekdays_min' => ['d', 'h', 'ma', 'më', 'e', 'p', 'sh'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' dhe '], ]; PKgt[Y#NCarbon/Lang/unm_US.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['enikwsi', 'chkwali', 'xamokhwite', 'kwetayoxe', 'tainipen', 'kichinipen', 'lainipen', 'winaminke', 'kichitahkok', 'puksit', 'wini', 'muxkotae'], 'months_short' => ['eni', 'chk', 'xam', 'kwe', 'tai', 'nip', 'lai', 'win', 'tah', 'puk', 'kun', 'mux'], 'weekdays' => ['kentuwei', 'manteke', 'tusteke', 'lelai', 'tasteke', 'pelaiteke', 'sateteke'], 'weekdays_short' => ['ken', 'man', 'tus', 'lel', 'tas', 'pel', 'sat'], 'weekdays_min' => ['ken', 'man', 'tus', 'lel', 'tas', 'pel', 'sat'], 'day_of_first_week_of_year' => 1, // Too unreliable /* 'year' => ':count kaxtëne', 'y' => ':count kaxtëne', 'a_year' => ':count kaxtëne', 'month' => ':count piskewëni kishux', // less reliable 'm' => ':count piskewëni kishux', // less reliable 'a_month' => ':count piskewëni kishux', // less reliable 'week' => ':count kishku', // less reliable 'w' => ':count kishku', // less reliable 'a_week' => ':count kishku', // less reliable 'day' => ':count kishku', 'd' => ':count kishku', 'a_day' => ':count kishku', 'hour' => ':count xkuk', // less reliable 'h' => ':count xkuk', // less reliable 'a_hour' => ':count xkuk', // less reliable 'minute' => ':count txituwàk', // less reliable 'min' => ':count txituwàk', // less reliable 'a_minute' => ':count txituwàk', // less reliable 'second' => ':count nisha', // less reliable 's' => ':count nisha', // less reliable 'a_second' => ':count nisha', // less reliable */ ]); PKgt[*vCarbon/Lang/ta_MY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ta.php', [ 'formats' => [ 'LT' => 'a h:mm', 'LTS' => 'a h:mm:ss', 'L' => 'D/M/yy', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM, YYYY, a h:mm', 'LLLL' => 'dddd, D MMMM, YYYY, a h:mm', ], 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], 'months_short' => ['ஜன.', 'பிப்.', 'மார்.', 'ஏப்.', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக.', 'செப்.', 'அக்.', 'நவ.', 'டிச.'], 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], 'weekdays_short' => ['ஞாயி.', 'திங்.', 'செவ்.', 'புத.', 'வியா.', 'வெள்.', 'சனி'], 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], 'first_day_of_week' => 1, 'meridiem' => ['மு.ப', 'பி.ப'], ]); PKgt[ڼCarbon/Lang/ksf.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['sárúwá', 'cɛɛ́nko'], 'weekdays' => ['sɔ́ndǝ', 'lǝndí', 'maadí', 'mɛkrɛdí', 'jǝǝdí', 'júmbá', 'samdí'], 'weekdays_short' => ['sɔ́n', 'lǝn', 'maa', 'mɛk', 'jǝǝ', 'júm', 'sam'], 'weekdays_min' => ['sɔ́n', 'lǝn', 'maa', 'mɛk', 'jǝǝ', 'júm', 'sam'], 'months' => ['ŋwíí a ntɔ́ntɔ', 'ŋwíí akǝ bɛ́ɛ', 'ŋwíí akǝ ráá', 'ŋwíí akǝ nin', 'ŋwíí akǝ táan', 'ŋwíí akǝ táafɔk', 'ŋwíí akǝ táabɛɛ', 'ŋwíí akǝ táaraa', 'ŋwíí akǝ táanin', 'ŋwíí akǝ ntɛk', 'ŋwíí akǝ ntɛk di bɔ́k', 'ŋwíí akǝ ntɛk di bɛ́ɛ'], 'months_short' => ['ŋ1', 'ŋ2', 'ŋ3', 'ŋ4', 'ŋ5', 'ŋ6', 'ŋ7', 'ŋ8', 'ŋ9', 'ŋ10', 'ŋ11', 'ŋ12'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], ]); PKgt[{A ]GGCarbon/Lang/it.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ash * - François B * - Marco Perrando * - Massimiliano Caniparoli * - JD Isaacks * - Andrea Martini * - Francesco Marasco * - Tizianoz93 * - Davide Casiraghi (davide-casiraghi) * - Pete Scopes (pdscopes) */ use Carbon\CarbonInterface; return [ 'year' => ':count anno|:count anni', 'a_year' => 'un anno|:count anni', 'y' => ':count anno|:count anni', 'month' => ':count mese|:count mesi', 'a_month' => 'un mese|:count mesi', 'm' => ':count mese|:count mesi', 'week' => ':count settimana|:count settimane', 'a_week' => 'una settimana|:count settimane', 'w' => ':count set.', 'day' => ':count giorno|:count giorni', 'a_day' => 'un giorno|:count giorni', 'd' => ':count g|:count gg', 'hour' => ':count ora|:count ore', 'a_hour' => 'un\'ora|:count ore', 'h' => ':count h', 'minute' => ':count minuto|:count minuti', 'a_minute' => 'un minuto|:count minuti', 'min' => ':count min.', 'second' => ':count secondo|:count secondi', 'a_second' => 'alcuni secondi|:count secondi', 's' => ':count sec.', 'millisecond' => ':count millisecondo|:count millisecondi', 'a_millisecond' => 'un millisecondo|:count millisecondi', 'ms' => ':countms', 'microsecond' => ':count microsecondo|:count microsecondi', 'a_microsecond' => 'un microsecondo|:count microsecondi', 'µs' => ':countµs', 'ago' => ':time fa', 'from_now' => function ($time) { return (preg_match('/^\d.+$/', $time) ? 'tra' : 'in')." $time"; }, 'after' => ':time dopo', 'before' => ':time prima', 'diff_now' => 'proprio ora', 'diff_today' => 'Oggi', 'diff_today_regexp' => 'Oggi(?:\\s+alle)?', 'diff_yesterday' => 'ieri', 'diff_yesterday_regexp' => 'Ieri(?:\\s+alle)?', 'diff_tomorrow' => 'domani', 'diff_tomorrow_regexp' => 'Domani(?:\\s+alle)?', 'diff_before_yesterday' => 'l\'altro ieri', 'diff_after_tomorrow' => 'dopodomani', 'period_interval' => 'ogni :interval', 'period_start_date' => 'dal :date', 'period_end_date' => 'al :date', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Oggi alle] LT', 'nextDay' => '[Domani alle] LT', 'nextWeek' => 'dddd [alle] LT', 'lastDay' => '[Ieri alle] LT', 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[la scorsa] dddd [alle] LT'; default: return '[lo scorso] dddd [alle] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => ':numberº', 'months' => ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'], 'months_short' => ['gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic'], 'weekdays' => ['domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato'], 'weekdays_short' => ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'], 'weekdays_min' => ['do', 'lu', 'ma', 'me', 'gi', 've', 'sa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' e '], 'ordinal_words' => [ 'of' => 'di', 'first' => 'primo', 'second' => 'secondo', 'third' => 'terzo', 'fourth' => 'quarto', 'fifth' => 'quinto', 'last' => 'ultimo', ], ]; PKgt[pGGCarbon/Lang/en_PG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[XNeeCarbon/Lang/crh_UA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Reşat SABIQ tilde.birlik@gmail.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'Mayıs', 'İyun', 'İyul', 'Avgust', 'Sentâbr', 'Oktâbr', 'Noyabr', 'Dekabr'], 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avg', 'Sen', 'Okt', 'Noy', 'Dek'], 'weekdays' => ['Bazar', 'Bazarertesi', 'Salı', 'Çarşembe', 'Cumaaqşamı', 'Cuma', 'Cumaertesi'], 'weekdays_short' => ['Baz', 'Ber', 'Sal', 'Çar', 'Caq', 'Cum', 'Cer'], 'weekdays_min' => ['Baz', 'Ber', 'Sal', 'Çar', 'Caq', 'Cum', 'Cer'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['ÜE', 'ÜS'], 'year' => ':count yıl', 'y' => ':count yıl', 'a_year' => ':count yıl', 'month' => ':count ay', 'm' => ':count ay', 'a_month' => ':count ay', 'week' => ':count afta', 'w' => ':count afta', 'a_week' => ':count afta', 'day' => ':count kün', 'd' => ':count kün', 'a_day' => ':count kün', 'hour' => ':count saat', 'h' => ':count saat', 'a_hour' => ':count saat', 'minute' => ':count daqqa', 'min' => ':count daqqa', 'a_minute' => ':count daqqa', 'second' => ':count ekinci', 's' => ':count ekinci', 'a_second' => ':count ekinci', ]); PKgt[OOCarbon/Lang/csb.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/csb_PL.php'; PKgt[h Carbon/Lang/se.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Karamell */ return [ 'year' => '{1}:count jahki|:count jagit', 'a_year' => '{1}okta jahki|:count jagit', 'y' => ':count j.', 'month' => '{1}:count mánnu|:count mánut', 'a_month' => '{1}okta mánnu|:count mánut', 'm' => ':count mán.', 'week' => '{1}:count vahkku|:count vahkku', 'a_week' => '{1}okta vahkku|:count vahkku', 'w' => ':count v.', 'day' => '{1}:count beaivi|:count beaivvit', 'a_day' => '{1}okta beaivi|:count beaivvit', 'd' => ':count b.', 'hour' => '{1}:count diimmu|:count diimmut', 'a_hour' => '{1}okta diimmu|:count diimmut', 'h' => ':count d.', 'minute' => '{1}:count minuhta|:count minuhtat', 'a_minute' => '{1}okta minuhta|:count minuhtat', 'min' => ':count min.', 'second' => '{1}:count sekunddat|:count sekunddat', 'a_second' => '{1}moadde sekunddat|:count sekunddat', 's' => ':count s.', 'ago' => 'maŋit :time', 'from_now' => ':time geažes', 'diff_yesterday' => 'ikte', 'diff_yesterday_regexp' => 'ikte(?:\\s+ti)?', 'diff_today' => 'otne', 'diff_today_regexp' => 'otne(?:\\s+ti)?', 'diff_tomorrow' => 'ihttin', 'diff_tomorrow_regexp' => 'ihttin(?:\\s+ti)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'MMMM D. [b.] YYYY', 'LLL' => 'MMMM D. [b.] YYYY [ti.] HH:mm', 'LLLL' => 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm', ], 'calendar' => [ 'sameDay' => '[otne ti] LT', 'nextDay' => '[ihttin ti] LT', 'nextWeek' => 'dddd [ti] LT', 'lastDay' => '[ikte ti] LT', 'lastWeek' => '[ovddit] dddd [ti] LT', 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['ođđajagemánnu', 'guovvamánnu', 'njukčamánnu', 'cuoŋománnu', 'miessemánnu', 'geassemánnu', 'suoidnemánnu', 'borgemánnu', 'čakčamánnu', 'golggotmánnu', 'skábmamánnu', 'juovlamánnu'], 'months_short' => ['ođđj', 'guov', 'njuk', 'cuo', 'mies', 'geas', 'suoi', 'borg', 'čakč', 'golg', 'skáb', 'juov'], 'weekdays' => ['sotnabeaivi', 'vuossárga', 'maŋŋebárga', 'gaskavahkku', 'duorastat', 'bearjadat', 'lávvardat'], 'weekdays_short' => ['sotn', 'vuos', 'maŋ', 'gask', 'duor', 'bear', 'láv'], 'weekdays_min' => ['s', 'v', 'm', 'g', 'd', 'b', 'L'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' ja '], 'meridiem' => ['i.b.', 'e.b.'], ]; PKgt[''x  Carbon/Lang/fr_MC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[L(OOCarbon/Lang/wal.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/wal_ET.php'; PKgt[VCarbon/Lang/lzh_TW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'OY[年]MMMMOD[日]', ], 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], 'months_short' => [' 一 ', ' 二 ', ' 三 ', ' 四 ', ' 五 ', ' 六 ', ' 七 ', ' 八 ', ' 九 ', ' 十 ', '十一', '十二'], 'weekdays' => ['週日', '週一', '週二', '週三', '週四', '週五', '週六'], 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五', '十六', '十七', '十八', '十九', '廿', '廿一', '廿二', '廿三', '廿四', '廿五', '廿六', '廿七', '廿八', '廿九', '卅', '卅一'], 'meridiem' => ['朝', '暮'], 'year' => ':count 夏', // less reliable 'y' => ':count 夏', // less reliable 'a_year' => ':count 夏', // less reliable 'month' => ':count 月', // less reliable 'm' => ':count 月', // less reliable 'a_month' => ':count 月', // less reliable 'hour' => ':count 氧', // less reliable 'h' => ':count 氧', // less reliable 'a_hour' => ':count 氧', // less reliable 'minute' => ':count 點', // less reliable 'min' => ':count 點', // less reliable 'a_minute' => ':count 點', // less reliable 'second' => ':count 楚', // less reliable 's' => ':count 楚', // less reliable 'a_second' => ':count 楚', // less reliable 'week' => ':count 星期', 'w' => ':count 星期', 'a_week' => ':count 星期', 'day' => ':count 日(曆法)', 'd' => ':count 日(曆法)', 'a_day' => ':count 日(曆法)', ]); PKgt[FƸCarbon/Lang/lag.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['TOO', 'MUU'], 'weekdays' => ['Jumapíiri', 'Jumatátu', 'Jumaíne', 'Jumatáano', 'Alamíisi', 'Ijumáa', 'Jumamóosi'], 'weekdays_short' => ['Píili', 'Táatu', 'Íne', 'Táano', 'Alh', 'Ijm', 'Móosi'], 'weekdays_min' => ['Píili', 'Táatu', 'Íne', 'Táano', 'Alh', 'Ijm', 'Móosi'], 'months' => ['Kʉfúngatɨ', 'Kʉnaanɨ', 'Kʉkeenda', 'Kwiikumi', 'Kwiinyambála', 'Kwiidwaata', 'Kʉmʉʉnchɨ', 'Kʉvɨɨrɨ', 'Kʉsaatʉ', 'Kwiinyi', 'Kʉsaano', 'Kʉsasatʉ'], 'months_short' => ['Fúngatɨ', 'Naanɨ', 'Keenda', 'Ikúmi', 'Inyambala', 'Idwaata', 'Mʉʉnchɨ', 'Vɨɨrɨ', 'Saatʉ', 'Inyi', 'Saano', 'Sasatʉ'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[ ))Carbon/Lang/kkj.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ ]); PKgt[DhCarbon/Lang/en_PH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'day_of_first_week_of_year' => 1, ]); PKgt[?Ej  Carbon/Lang/en_PK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[b Carbon/Lang/bs.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bokideckonja * - Josh Soref * - François B * - shaishavgandhi05 * - Serhan Apaydın * - JD Isaacks */ use Carbon\CarbonInterface; return [ 'year' => ':count godina|:count godine|:count godina', 'y' => ':count godina|:count godine|:count godina', 'month' => ':count mjesec|:count mjeseca|:count mjeseci', 'm' => ':count mjesec|:count mjeseca|:count mjeseci', 'week' => ':count sedmice|:count sedmicu|:count sedmica', 'w' => ':count sedmice|:count sedmicu|:count sedmica', 'day' => ':count dan|:count dana|:count dana', 'd' => ':count dan|:count dana|:count dana', 'hour' => ':count sat|:count sata|:count sati', 'h' => ':count sat|:count sata|:count sati', 'minute' => ':count minut|:count minuta|:count minuta', 'min' => ':count minut|:count minuta|:count minuta', 'second' => ':count sekund|:count sekunda|:count sekundi', 's' => ':count sekund|:count sekunda|:count sekundi', 'ago' => 'prije :time', 'from_now' => 'za :time', 'after' => 'nakon :time', 'before' => ':time ranije', 'diff_now' => 'sada', 'diff_today' => 'danas', 'diff_today_regexp' => 'danas(?:\\s+u)?', 'diff_yesterday' => 'jučer', 'diff_yesterday_regexp' => 'jučer(?:\\s+u)?', 'diff_tomorrow' => 'sutra', 'diff_tomorrow_regexp' => 'sutra(?:\\s+u)?', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY H:mm', 'LLLL' => 'dddd, D. MMMM YYYY H:mm', ], 'calendar' => [ 'sameDay' => '[danas u] LT', 'nextDay' => '[sutra u] LT', 'nextWeek' => function (CarbonInterface $current) { switch ($current->dayOfWeek) { case 0: return '[u] [nedjelju] [u] LT'; case 3: return '[u] [srijedu] [u] LT'; case 6: return '[u] [subotu] [u] LT'; default: return '[u] dddd [u] LT'; } }, 'lastDay' => '[jučer u] LT', 'lastWeek' => function (CarbonInterface $current) { switch ($current->dayOfWeek) { case 0: case 3: return '[prošlu] dddd [u] LT'; case 6: return '[prošle] [subote] [u] LT'; default: return '[prošli] dddd [u] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['januar', 'februar', 'mart', 'april', 'maj', 'juni', 'juli', 'august', 'septembar', 'oktobar', 'novembar', 'decembar'], 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj.', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'], 'weekdays' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], 'weekdays_min' => ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' i '], 'meridiem' => ['prijepodne', 'popodne'], ]; PKgt[r9Carbon/Lang/tt_RU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Rinat Norkin Pablo Saratxaga, Rinat Norkin pablo@mandrakesoft.com, rinat@taif.ru */ return [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'DD MMM, HH:mm', 'LLLL' => 'DD MMMM YYYY, HH:mm', ], 'months' => ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'], 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], 'weekdays' => ['якшәмбе', 'дышәмбе', 'сишәмбе', 'чәршәәмбе', 'пәнҗешмбе', 'җомга', 'шимбә'], 'weekdays_short' => ['якш', 'дыш', 'сиш', 'чәрш', 'пәнҗ', 'җом', 'шим'], 'weekdays_min' => ['якш', 'дыш', 'сиш', 'чәрш', 'пәнҗ', 'җом', 'шим'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => ':count ел', 'month' => ':count ай', 'week' => ':count атна', 'day' => ':count көн', 'hour' => ':count сәгать', 'minute' => ':count минут', 'second' => ':count секунд', ]; PKgt[''x  Carbon/Lang/fr_KM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[': Carbon/Lang/uz.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Dmitriy Shabanov * - JD Isaacks * - Inoyatulloh * - Jamshid * - aarkhipov * - Philippe Vaucher * - felixthemagnificent * - Tsutomu Kuroda * - tjku * - Max Melentiev * - Juanito Fatas * - Alisher Ulugbekov * - Ergashev Adizbek */ return [ 'year' => ':count йил', 'a_year' => '{1}бир йил|:count йил', 'y' => ':count й', 'month' => ':count ой', 'a_month' => '{1}бир ой|:count ой', 'm' => ':count о', 'week' => ':count ҳафта', 'a_week' => '{1}бир ҳафта|:count ҳафта', 'w' => ':count ҳ', 'day' => ':count кун', 'a_day' => '{1}бир кун|:count кун', 'd' => ':count к', 'hour' => ':count соат', 'a_hour' => '{1}бир соат|:count соат', 'h' => ':count с', 'minute' => ':count дақиқа', 'a_minute' => '{1}бир дақиқа|:count дақиқа', 'min' => ':count д', 'second' => ':count сония', 'a_second' => '{1}сония|:count сония', 's' => ':count с', 'ago' => ':time аввал', 'from_now' => 'Якин :time ичида', 'after' => ':timeдан кейин', 'before' => ':time олдин', 'diff_now' => 'ҳозир', 'diff_today' => 'Бугун', 'diff_today_regexp' => 'Бугун(?:\\s+соат)?', 'diff_yesterday' => 'Кеча', 'diff_yesterday_regexp' => 'Кеча(?:\\s+соат)?', 'diff_tomorrow' => 'Эртага', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'D MMMM YYYY, dddd HH:mm', ], 'calendar' => [ 'sameDay' => '[Бугун соат] LT [да]', 'nextDay' => '[Эртага] LT [да]', 'nextWeek' => 'dddd [куни соат] LT [да]', 'lastDay' => '[Кеча соат] LT [да]', 'lastWeek' => '[Утган] dddd [куни соат] LT [да]', 'sameElse' => 'L', ], 'months' => ['январ', 'феврал', 'март', 'апрел', 'май', 'июн', 'июл', 'август', 'сентябр', 'октябр', 'ноябр', 'декабр'], 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], 'weekdays' => ['якшанба', 'душанба', 'сешанба', 'чоршанба', 'пайшанба', 'жума', 'шанба'], 'weekdays_short' => ['якш', 'душ', 'сеш', 'чор', 'пай', 'жум', 'шан'], 'weekdays_min' => ['як', 'ду', 'се', 'чо', 'па', 'жу', 'ша'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['эрталаб', 'кечаси'], 'list' => [', ', ' ва '], ]; PKgt[''x  Carbon/Lang/fr_NC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[Ƣ: Carbon/Lang/br.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Serhan Apaydın * - JD Isaacks */ return [ 'year' => '{1}:count bloaz|{3,4,5,9}:count bloaz|[0,Inf[:count vloaz', 'a_year' => '{1}ur bloaz|{3,4,5,9}:count bloaz|[0,Inf[:count vloaz', 'month' => '{1}:count miz|{2}:count viz|[0,Inf[:count miz', 'a_month' => '{1}ur miz|{2}:count viz|[0,Inf[:count miz', 'week' => ':count sizhun', 'a_week' => '{1}ur sizhun|:count sizhun', 'day' => '{1}:count devezh|{2}:count zevezh|[0,Inf[:count devezh', 'a_day' => '{1}un devezh|{2}:count zevezh|[0,Inf[:count devezh', 'hour' => ':count eur', 'a_hour' => '{1}un eur|:count eur', 'minute' => '{1}:count vunutenn|{2}:count vunutenn|[0,Inf[:count munutenn', 'a_minute' => '{1}ur vunutenn|{2}:count vunutenn|[0,Inf[:count munutenn', 'second' => ':count eilenn', 'a_second' => '{1}un nebeud segondennoù|[0,Inf[:count eilenn', 'ago' => ':time \'zo', 'from_now' => 'a-benn :time', 'diff_now' => 'bremañ', 'diff_today' => 'Hiziv', 'diff_today_regexp' => 'Hiziv(?:\\s+da)?', 'diff_yesterday' => 'decʼh', 'diff_yesterday_regexp' => 'Dec\'h(?:\\s+da)?', 'diff_tomorrow' => 'warcʼhoazh', 'diff_tomorrow_regexp' => 'Warc\'hoazh(?:\\s+da)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D [a viz] MMMM YYYY', 'LLL' => 'D [a viz] MMMM YYYY HH:mm', 'LLLL' => 'dddd, D [a viz] MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Hiziv da] LT', 'nextDay' => '[Warc\'hoazh da] LT', 'nextWeek' => 'dddd [da] LT', 'lastDay' => '[Dec\'h da] LT', 'lastWeek' => 'dddd [paset da] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { return $number.($number === 1 ? 'añ' : 'vet'); }, 'months' => ['Genver', 'C\'hwevrer', 'Meurzh', 'Ebrel', 'Mae', 'Mezheven', 'Gouere', 'Eost', 'Gwengolo', 'Here', 'Du', 'Kerzu'], 'months_short' => ['Gen', 'C\'hwe', 'Meu', 'Ebr', 'Mae', 'Eve', 'Gou', 'Eos', 'Gwe', 'Her', 'Du', 'Ker'], 'weekdays' => ['Sul', 'Lun', 'Meurzh', 'Merc\'her', 'Yaou', 'Gwener', 'Sadorn'], 'weekdays_short' => ['Sul', 'Lun', 'Meu', 'Mer', 'Yao', 'Gwe', 'Sad'], 'weekdays_min' => ['Su', 'Lu', 'Me', 'Mer', 'Ya', 'Gw', 'Sa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' hag '], 'meridiem' => ['A.M.', 'G.M.'], 'y' => ':count bl.', 'd' => ':count d', 'h' => ':count e', 'min' => ':count min', 's' => ':count s', ]; PKgt[q~~Carbon/Lang/pt_BR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Cassiano Montanari * - Eduardo Dalla Vecchia * - David Rodrigues * - Matt Pope * - François B * - Prodis * - Marlon Maxwel * - JD Isaacks * - Raphael Amorim * - Rafael Raupp * - felipeleite1 * - swalker * - Lucas Macedo * - Paulo Freitas * - Sebastian Thierer */ return array_replace_recursive(require __DIR__.'/pt.php', [ 'period_recurrences' => 'uma|:count vez', 'period_interval' => 'toda :interval', 'formats' => [ 'LLL' => 'D [de] MMMM [de] YYYY [às] HH:mm', 'LLLL' => 'dddd, D [de] MMMM [de] YYYY [às] HH:mm', ], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[5Carbon/Lang/li_NL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandriva.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['jannewarie', 'fibberwarie', 'miert', 'eprèl', 'meij', 'junie', 'julie', 'augustus', 'september', 'oktober', 'november', 'desember'], 'months_short' => ['jan', 'fib', 'mie', 'epr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], 'weekdays' => ['zóndig', 'maondig', 'daensdig', 'goonsdig', 'dónderdig', 'vriedig', 'zaoterdig'], 'weekdays_short' => ['zón', 'mao', 'dae', 'goo', 'dón', 'vri', 'zao'], 'weekdays_min' => ['zón', 'mao', 'dae', 'goo', 'dón', 'vri', 'zao'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'minute' => ':count momênt', // less reliable 'min' => ':count momênt', // less reliable 'a_minute' => ':count momênt', // less reliable 'year' => ':count jaor', 'y' => ':count jaor', 'a_year' => ':count jaor', 'month' => ':count maond', 'm' => ':count maond', 'a_month' => ':count maond', 'week' => ':count waek', 'w' => ':count waek', 'a_week' => ':count waek', 'day' => ':count daag', 'd' => ':count daag', 'a_day' => ':count daag', 'hour' => ':count oer', 'h' => ':count oer', 'a_hour' => ':count oer', 'second' => ':count Secónd', 's' => ':count Secónd', 'a_second' => ':count Secónd', ]); PKgt[DɳCarbon/Lang/zh_CN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - monkeycon * - François B * - Jason Katz-Brown * - Serhan Apaydın * - Matt Johnson * - JD Isaacks * - Zeno Zeng * - Chris Hemp * - shankesgk2 */ return array_merge(require __DIR__.'/zh.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY/MM/DD', 'LL' => 'YYYY年M月D日', 'LLL' => 'YYYY年M月D日Ah点mm分', 'LLLL' => 'YYYY年M月D日ddddAh点mm分', ], ]); PKgt[DhCarbon/Lang/en_HK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'day_of_first_week_of_year' => 1, ]); PKgt[?Ej  Carbon/Lang/en_PR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[c""Carbon/Lang/wo_SN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - The Debian Project Christian Perrier bubulle@debian.org */ return [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'MMMM DD, YYYY', 'LLL' => 'DD MMM HH:mm', 'LLLL' => 'MMMM DD, YYYY HH:mm', ], 'months' => ['sanwiy\'e', 'feebriy\'e', 'mars', 'awril', 'me', 'suwen', 'sulet', 'uut', 'septaambar', 'oktoobar', 'nowaambar', 'desaambar'], 'months_short' => ['san', 'fee', 'mar', 'awr', 'me ', 'suw', 'sul', 'uut', 'sep', 'okt', 'now', 'des'], 'weekdays' => ['dib\'eer', 'altine', 'talaata', 'allarba', 'alxames', 'ajjuma', 'gaawu'], 'weekdays_short' => ['dib', 'alt', 'tal', 'all', 'alx', 'ajj', 'gaa'], 'weekdays_min' => ['dib', 'alt', 'tal', 'all', 'alx', 'ajj', 'gaa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => ':count at', 'month' => ':count wèr', 'week' => ':count ayubés', 'day' => ':count bés', 'hour' => ':count waxtu', 'minute' => ':count simili', 'second' => ':count saa', ]; PKgt[Carbon/Lang/sq_MK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/sq.php', [ 'formats' => [ 'L' => 'D.M.YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY, HH:mm', 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', ], ]); PKgt[ޙCarbon/Lang/ta_SG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ta.php', [ 'formats' => [ 'LT' => 'a h:mm', 'LTS' => 'a h:mm:ss', 'L' => 'D/M/yy', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM, YYYY, a h:mm', 'LLLL' => 'dddd, D MMMM, YYYY, a h:mm', ], 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], 'months_short' => ['ஜன.', 'பிப்.', 'மார்.', 'ஏப்.', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக.', 'செப்.', 'அக்.', 'நவ.', 'டிச.'], 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], 'weekdays_short' => ['ஞாயி.', 'திங்.', 'செவ்.', 'புத.', 'வியா.', 'வெள்.', 'சனி'], 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], 'meridiem' => ['மு.ப', 'பி.ப'], ]); PKgt[{kOOCarbon/Lang/tpi.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/tpi_PG.php'; PKgt[vCarbon/Lang/fr_CH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Dieter Sting * - François B * - Gaspard Bucher * - Maxime VALY * - JD Isaacks */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], ]); PKgt[7$Carbon/Lang/en_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YY', 'LL' => 'MMMM DD, YYYY', 'LLL' => 'DD MMM HH:mm', 'LLLL' => 'MMMM DD, YYYY HH:mm', ], 'day_of_first_week_of_year' => 1, ]); PKgt[''x  Carbon/Lang/fr_MU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[pGGCarbon/Lang/en_GH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[ڗOOCarbon/Lang/dsb.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/dsb_DE.php'; PKgt[?Ej  Carbon/Lang/en_MH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[pGGCarbon/Lang/en_MW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[?uL  Carbon/Lang/af_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/af.php'; PKgt[pGGCarbon/Lang/en_SL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[-OOCarbon/Lang/mag.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/mag_IN.php'; PKgt[(RHkkCarbon/Lang/es_US.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kunal Marwaha * - Josh Soref * - Jørn Ølmheim * - Craig Patik * - bustta * - François B * - Tim Fish * - Claire Coloma * - Steven Heinrich * - JD Isaacks * - Raphael Amorim */ return array_replace_recursive(require __DIR__.'/es.php', [ 'diff_before_yesterday' => 'anteayer', 'formats' => [ 'LT' => 'h:mm A', 'LTS' => 'h:mm:ss A', 'L' => 'MM/DD/YYYY', 'LL' => 'MMMM [de] D [de] YYYY', 'LLL' => 'MMMM [de] D [de] YYYY h:mm A', 'LLLL' => 'dddd, MMMM [de] D [de] YYYY h:mm A', ], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[i9  Carbon/Lang/da_DK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/da.php'; PKgt[ʷCarbon/Lang/zh_Hant_TW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/zh_Hant.php'; PKgt[K  Carbon/Lang/eu_ES.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/eu.php'; PKgt[HlCarbon/Lang/mjw_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Jor Teron bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['Arkoi', 'Thangthang', 'There', 'Jangmi', 'Aru', 'Vosik', 'Jakhong', 'Paipai', 'Chiti', 'Phere', 'Phaikuni', 'Matijong'], 'months_short' => ['Ark', 'Thang', 'The', 'Jang', 'Aru', 'Vos', 'Jak', 'Pai', 'Chi', 'Phe', 'Phai', 'Mati'], 'weekdays' => ['Bhomkuru', 'Urmi', 'Durmi', 'Thelang', 'Theman', 'Bhomta', 'Bhomti'], 'weekdays_short' => ['Bhom', 'Ur', 'Dur', 'Tkel', 'Tkem', 'Bhta', 'Bhti'], 'weekdays_min' => ['Bhom', 'Ur', 'Dur', 'Tkel', 'Tkem', 'Bhta', 'Bhti'], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[))Carbon/Lang/ar_SO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ar.php', [ ]); PKgt[?Ej  Carbon/Lang/en_TT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[yCarbon/Lang/tl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return [ 'year' => ':count taon', 'a_year' => '{1}isang taon|:count taon', 'month' => ':count buwan', 'a_month' => '{1}isang buwan|:count buwan', 'week' => ':count linggo', 'a_week' => '{1}isang linggo|:count linggo', 'day' => ':count araw', 'a_day' => '{1}isang araw|:count araw', 'hour' => ':count oras', 'a_hour' => '{1}isang oras|:count oras', 'minute' => ':count minuto', 'a_minute' => '{1}isang minuto|:count minuto', 'min' => ':count min.', 'second' => ':count segundo', 'a_second' => '{1}ilang segundo|:count segundo', 's' => ':count seg.', 'ago' => ':time ang nakalipas', 'from_now' => 'sa loob ng :time', 'diff_now' => 'ngayon', 'diff_today' => 'ngayong', 'diff_today_regexp' => 'ngayong(?:\\s+araw)?', 'diff_yesterday' => 'kahapon', 'diff_tomorrow' => 'bukas', 'diff_tomorrow_regexp' => 'Bukas(?:\\s+ng)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'MM/D/YYYY', 'LL' => 'MMMM D, YYYY', 'LLL' => 'MMMM D, YYYY HH:mm', 'LLLL' => 'dddd, MMMM DD, YYYY HH:mm', ], 'calendar' => [ 'sameDay' => 'LT [ngayong araw]', 'nextDay' => '[Bukas ng] LT', 'nextWeek' => 'LT [sa susunod na] dddd', 'lastDay' => 'LT [kahapon]', 'lastWeek' => 'LT [noong nakaraang] dddd', 'sameElse' => 'L', ], 'months' => ['Enero', 'Pebrero', 'Marso', 'Abril', 'Mayo', 'Hunyo', 'Hulyo', 'Agosto', 'Setyembre', 'Oktubre', 'Nobyembre', 'Disyembre'], 'months_short' => ['Ene', 'Peb', 'Mar', 'Abr', 'May', 'Hun', 'Hul', 'Ago', 'Set', 'Okt', 'Nob', 'Dis'], 'weekdays' => ['Linggo', 'Lunes', 'Martes', 'Miyerkules', 'Huwebes', 'Biyernes', 'Sabado'], 'weekdays_short' => ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'], 'weekdays_min' => ['Li', 'Lu', 'Ma', 'Mi', 'Hu', 'Bi', 'Sab'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' at '], ]; PKgt[m0בCarbon/Lang/kw_GB.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Alastair McKinstry bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['mis Genver', 'mis Hwevrer', 'mis Meurth', 'mis Ebrel', 'mis Me', 'mis Metheven', 'mis Gortheren', 'mis Est', 'mis Gwynngala', 'mis Hedra', 'mis Du', 'mis Kevardhu'], 'months_short' => ['Gen', 'Hwe', 'Meu', 'Ebr', 'Me', 'Met', 'Gor', 'Est', 'Gwn', 'Hed', 'Du', 'Kev'], 'weekdays' => ['De Sul', 'De Lun', 'De Merth', 'De Merher', 'De Yow', 'De Gwener', 'De Sadorn'], 'weekdays_short' => ['Sul', 'Lun', 'Mth', 'Mhr', 'Yow', 'Gwe', 'Sad'], 'weekdays_min' => ['Sul', 'Lun', 'Mth', 'Mhr', 'Yow', 'Gwe', 'Sad'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count bledhen', 'y' => ':count bledhen', 'a_year' => ':count bledhen', 'month' => ':count mis', 'm' => ':count mis', 'a_month' => ':count mis', 'week' => ':count seythen', 'w' => ':count seythen', 'a_week' => ':count seythen', 'day' => ':count dydh', 'd' => ':count dydh', 'a_day' => ':count dydh', 'hour' => ':count eur', 'h' => ':count eur', 'a_hour' => ':count eur', 'minute' => ':count mynysen', 'min' => ':count mynysen', 'a_minute' => ':count mynysen', 'second' => ':count pryjwyth', 's' => ':count pryjwyth', 'a_second' => ':count pryjwyth', ]); PKgt[f/xxCarbon/Lang/zgh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - BAKTETE Miloud */ return [ 'year' => ':count ⵓⵙⴳⴳⵯⴰⵙ|:count ⵉⵙⴳⴳⵓⵙⴰ', 'a_year' => 'ⵓⵙⴳⴳⵯⴰⵙ|:count ⵉⵙⴳⴳⵓⵙⴰ', 'y' => ':count ⵓⵙⴳⴳⵯⴰⵙ|:count ⵉⵙⴳⴳⵓⵙⴰ', 'month' => ':count ⵡⴰⵢⵢⵓⵔ|:count ⴰⵢⵢⵓⵔⵏ', 'a_month' => 'ⵉⴷⵊ ⵡⴰⵢⵢⵓⵔ|:count ⴰⵢⵢⵓⵔⵏ', 'm' => ':count ⴰⵢⵢⵓⵔⵏ', 'week' => ':count ⵉⵎⴰⵍⴰⵙⵙ|:count ⵉⵎⴰⵍⴰⵙⵙⵏ', 'a_week' => 'ⵉⵛⵜ ⵉⵎⴰⵍⴰⵙⵙ|:count ⵉⵎⴰⵍⴰⵙⵙⵏ', 'w' => ':count ⵉⵎⴰⵍⴰⵙⵙ.', 'day' => ':count ⵡⴰⵙⵙ|:count ⵓⵙⵙⴰⵏ', 'a_day' => 'ⵉⴷⵊ ⵡⴰⵙⵙ|:count ⵓⵙⵙⴰⵏ', 'd' => ':count ⵓ', 'hour' => ':count ⵜⵙⵔⴰⴳⵜ|:count ⵜⵉⵙⵔⴰⴳⵉⵏ', 'a_hour' => 'ⵉⵛⵜ ⵜⵙⵔⴰⴳⵜ|:count ⵜⵉⵙⵔⴰⴳⵉⵏ', 'h' => ':count ⵜ', 'minute' => ':count ⵜⵓⵙⴷⵉⴷⵜ|:count ⵜⵓⵙⴷⵉⴷⵉⵏ', 'a_minute' => 'ⵉⵛⵜ ⵜⵓⵙⴷⵉⴷⵜ|:count ⵜⵓⵙⴷⵉⴷⵉⵏ', 'min' => ':count ⵜⵓⵙ', 'second' => ':count ⵜⵙⵉⵏⵜ|:count ⵜⵉⵙⵉⵏⴰ', 'a_second' => 'ⴽⵔⴰ ⵜⵉⵙⵉⵏⴰ|:count ⵜⵉⵙⵉⵏⴰ', 's' => ':count ⵜ', 'ago' => 'ⵣⴳ :time', 'from_now' => 'ⴷⴳ :time', 'after' => ':time ⴰⵡⴰⵔ', 'before' => ':time ⴷⴰⵜ', 'diff_now' => 'ⴰⴷⵡⴰⵍⵉ', 'diff_today' => 'ⴰⵙⵙ', 'diff_today_regexp' => 'ⴰⵙⵙ(?:\\s+ⴰ/ⴰⴷ)?(?:\\s+ⴳ)?', 'diff_yesterday' => 'ⴰⵙⵙⵏⵏⴰⵟ', 'diff_yesterday_regexp' => 'ⴰⵙⵙⵏⵏⴰⵟ(?:\\s+ⴳ)?', 'diff_tomorrow' => 'ⴰⵙⴽⴽⴰ', 'diff_tomorrow_regexp' => 'ⴰⵙⴽⴽⴰ(?:\\s+ⴳ)?', 'diff_before_yesterday' => 'ⴼⵔ ⵉⴹⵏⵏⴰⵟ', 'diff_after_tomorrow' => 'ⵏⴰⴼ ⵓⵙⴽⴽⴰ', 'period_recurrences' => ':count ⵜⵉⴽⴽⴰⵍ', 'period_interval' => 'ⴽⵓ :interval', 'period_start_date' => 'ⴳ :date', 'period_end_date' => 'ⵉ :date', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[ⴰⵙⵙ ⴰ/ⴰⴷ ⴳ] LT', 'nextDay' => '[ⴰⵙⴽⴽⴰ ⴳ] LT', 'nextWeek' => 'dddd [ⴳ] LT', 'lastDay' => '[ⴰⵙⵙⵏⵏⴰⵟ ⴳ] LT', 'lastWeek' => 'dddd [ⴰⵎⴳⴳⴰⵔⵓ ⴳ] LT', 'sameElse' => 'L', ], 'meridiem' => ['ⵜⵉⴼⴰⵡⵜ', 'ⵜⴰⴷⴳⴳⵯⴰⵜ'], 'months' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵟⵓⴱⵕ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⴰⵏⴱⵉⵔ'], 'months_short' => ['ⵉⵏⵏ', 'ⴱⵕⴰ', 'ⵎⴰⵕ', 'ⵉⴱⵔ', 'ⵎⴰⵢ', 'ⵢⵓⵏ', 'ⵢⵓⵍ', 'ⵖⵓⵛ', 'ⵛⵓⵜ', 'ⴽⵟⵓ', 'ⵏⵓⵡ', 'ⴷⵓⵊ'], 'weekdays' => ['ⵓⵙⴰⵎⴰⵙ', 'ⵡⴰⵢⵏⴰⵙ', 'ⵓⵙⵉⵏⴰⵙ', 'ⵡⴰⴽⵕⴰⵙ', 'ⵓⴽⵡⴰⵙ', 'ⵓⵙⵉⵎⵡⴰⵙ', 'ⵓⵙⵉⴹⵢⴰⵙ'], 'weekdays_short' => ['ⵓⵙⴰ', 'ⵡⴰⵢ', 'ⵓⵙⵉ', 'ⵡⴰⴽ', 'ⵓⴽⵡ', 'ⵓⵙⵉⵎ', 'ⵓⵙⵉⴹ'], 'weekdays_min' => ['ⵓⵙⴰ', 'ⵡⴰⵢ', 'ⵓⵙⵉ', 'ⵡⴰⴽ', 'ⵓⴽⵡ', 'ⵓⵙⵉⵎ', 'ⵓⵙⵉⴹ'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' ⴷ '], ]; PKgt[?Ej  Carbon/Lang/en_UM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[}:be  Carbon/Lang/gu_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/gu.php'; PKgt[2UwwCarbon/Lang/oc.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Quentí */ // @codeCoverageIgnoreStart use Symfony\Component\Translation\PluralizationRules; if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { PluralizationRules::set(static function ($number) { return $number == 1 ? 0 : 1; }, 'oc'); } // @codeCoverageIgnoreEnd return [ 'year' => ':count an|:count ans', 'a_year' => 'un an|:count ans', 'y' => ':count an|:count ans', 'month' => ':count mes|:count meses', 'a_month' => 'un mes|:count meses', 'm' => ':count mes|:count meses', 'week' => ':count setmana|:count setmanas', 'a_week' => 'una setmana|:count setmanas', 'w' => ':count setmana|:count setmanas', 'day' => ':count jorn|:count jorns', 'a_day' => 'un jorn|:count jorns', 'd' => ':count jorn|:count jorns', 'hour' => ':count ora|:count oras', 'a_hour' => 'una ora|:count oras', 'h' => ':count ora|:count oras', 'minute' => ':count minuta|:count minutas', 'a_minute' => 'una minuta|:count minutas', 'min' => ':count minuta|:count minutas', 'second' => ':count segonda|:count segondas', 'a_second' => 'una segonda|:count segondas', 's' => ':count segonda|:count segondas', 'ago' => 'fa :time', 'from_now' => 'd\'aquí :time', 'after' => ':time aprèp', 'before' => ':time abans', 'diff_now' => 'ara meteis', 'diff_today' => 'Uèi', 'diff_today_regexp' => 'Uèi(?:\\s+a)?', 'diff_yesterday' => 'ièr', 'diff_yesterday_regexp' => 'Ièr(?:\\s+a)?', 'diff_tomorrow' => 'deman', 'diff_tomorrow_regexp' => 'Deman(?:\\s+a)?', 'diff_before_yesterday' => 'ièr delà', 'diff_after_tomorrow' => 'deman passat', 'period_recurrences' => ':count còp|:count còps', 'period_interval' => 'cada :interval', 'period_start_date' => 'de :date', 'period_end_date' => 'fins a :date', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM [de] YYYY', 'LLL' => 'D MMMM [de] YYYY [a] H:mm', 'LLLL' => 'dddd D MMMM [de] YYYY [a] H:mm', ], 'calendar' => [ 'sameDay' => '[Uèi a] LT', 'nextDay' => '[Deman a] LT', 'nextWeek' => 'dddd [a] LT', 'lastDay' => '[Ièr a] LT', 'lastWeek' => 'dddd [passat a] LT', 'sameElse' => 'L', ], 'months' => ['de genièr', 'de febrièr', 'de març', 'd\'abrial', 'de mai', 'de junh', 'de julhet', 'd\'agost', 'de setembre', 'd’octòbre', 'de novembre', 'de decembre'], 'months_standalone' => ['genièr', 'febrièr', 'març', 'abrial', 'mai', 'junh', 'julh', 'agost', 'setembre', 'octòbre', 'novembre', 'decembre'], 'months_short' => ['gen.', 'feb.', 'març', 'abr.', 'mai', 'junh', 'julh', 'ago.', 'sep.', 'oct.', 'nov.', 'dec.'], 'weekdays' => ['dimenge', 'diluns', 'dimars', 'dimècres', 'dijòus', 'divendres', 'dissabte'], 'weekdays_short' => ['dg', 'dl', 'dm', 'dc', 'dj', 'dv', 'ds'], 'weekdays_min' => ['dg', 'dl', 'dm', 'dc', 'dj', 'dv', 'ds'], 'ordinal' => function ($number, string $period = '') { $ordinal = [1 => 'èr', 2 => 'nd'][(int) $number] ?? 'en'; // feminine for year, week, hour, minute, second if (preg_match('/^[yYwWhHgGis]$/', $period)) { $ordinal .= 'a'; } return $number.$ordinal; }, 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' e '], ]; PKgt[  Carbon/Lang/sl_SI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/sl.php'; PKgt[ECarbon/Lang/pt_PT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/pt.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'], 'months_short' => ['jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez'], 'weekdays' => ['domingo', 'segunda', 'terça', 'quarta', 'quinta', 'sexta', 'sábado'], 'weekdays_short' => ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sáb'], 'weekdays_min' => ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sáb'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[ 7||Carbon/Lang/mhr_RU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - PeshSajSoft Ltd. Vyacheslav Kileev slavakileev@yandex.ru */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY.MM.DD', ], 'months' => ['Шорыкйол', 'Пургыж', 'Ӱярня', 'Вӱдшор', 'Ага', 'Пеледыш', 'Сӱрем', 'Сорла', 'Идым', 'Шыжа', 'Кылме', 'Теле'], 'months_short' => ['Шрк', 'Пгж', 'Ӱрн', 'Вшр', 'Ага', 'Пдш', 'Срм', 'Срл', 'Идм', 'Шыж', 'Клм', 'Тел'], 'weekdays' => ['Рушарня', 'Шочмо', 'Кушкыжмо', 'Вӱргече', 'Изарня', 'Кугарня', 'Шуматкече'], 'weekdays_short' => ['Ршр', 'Шчм', 'Кжм', 'Вгч', 'Изр', 'Кгр', 'Шмт'], 'weekdays_min' => ['Ршр', 'Шчм', 'Кжм', 'Вгч', 'Изр', 'Кгр', 'Шмт'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => ':count идалык', 'y' => ':count идалык', 'a_year' => ':count идалык', 'month' => ':count Тылзе', 'm' => ':count Тылзе', 'a_month' => ':count Тылзе', 'week' => ':count арня', 'w' => ':count арня', 'a_week' => ':count арня', 'day' => ':count кече', 'd' => ':count кече', 'a_day' => ':count кече', 'hour' => ':count час', 'h' => ':count час', 'a_hour' => ':count час', 'minute' => ':count минут', 'min' => ':count минут', 'a_minute' => ':count минут', 'second' => ':count кокымшан', 's' => ':count кокымшан', 'a_second' => ':count кокымшан', ]); PKgt[>Carbon/Lang/sr_Cyrl_XK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Component\Translation\PluralizationRules; // @codeCoverageIgnoreStart if (class_exists(PluralizationRules::class)) { PluralizationRules::set(static function ($number) { return PluralizationRules::get($number, 'sr'); }, 'sr_Cyrl_XK'); } // @codeCoverageIgnoreEnd return array_replace_recursive(require __DIR__.'/sr_Cyrl_BA.php', [ 'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'], ]); PKgt[hOOCarbon/Lang/mai.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/mai_IN.php'; PKgt[ңqqCarbon/Lang/kk.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - Talat Uspanov * - Нурлан Рахимжанов * - Toleugazy Kali */ return [ 'year' => ':count жыл', 'a_year' => '{1}бір жыл|:count жыл', 'y' => ':count ж.', 'month' => ':count ай', 'a_month' => '{1}бір ай|:count ай', 'm' => ':count ай', 'week' => ':count апта', 'a_week' => '{1}бір апта', 'w' => ':count ап.', 'day' => ':count күн', 'a_day' => '{1}бір күн|:count күн', 'd' => ':count к.', 'hour' => ':count сағат', 'a_hour' => '{1}бір сағат|:count сағат', 'h' => ':count са.', 'minute' => ':count минут', 'a_minute' => '{1}бір минут|:count минут', 'min' => ':count м.', 'second' => ':count секунд', 'a_second' => '{1}бірнеше секунд|:count секунд', 's' => ':count се.', 'ago' => ':time бұрын', 'from_now' => ':time ішінде', 'after' => ':time кейін', 'before' => ':time бұрын', 'diff_now' => 'қазір', 'diff_today' => 'Бүгін', 'diff_today_regexp' => 'Бүгін(?:\\s+сағат)?', 'diff_yesterday' => 'кеше', 'diff_yesterday_regexp' => 'Кеше(?:\\s+сағат)?', 'diff_tomorrow' => 'ертең', 'diff_tomorrow_regexp' => 'Ертең(?:\\s+сағат)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Бүгін сағат] LT', 'nextDay' => '[Ертең сағат] LT', 'nextWeek' => 'dddd [сағат] LT', 'lastDay' => '[Кеше сағат] LT', 'lastWeek' => '[Өткен аптаның] dddd [сағат] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { static $suffixes = [ 0 => '-ші', 1 => '-ші', 2 => '-ші', 3 => '-ші', 4 => '-ші', 5 => '-ші', 6 => '-шы', 7 => '-ші', 8 => '-ші', 9 => '-шы', 10 => '-шы', 20 => '-шы', 30 => '-шы', 40 => '-шы', 50 => '-ші', 60 => '-шы', 70 => '-ші', 80 => '-ші', 90 => '-шы', 100 => '-ші', ]; return $number.($suffixes[$number] ?? $suffixes[$number % 10] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); }, 'months' => ['қаңтар', 'ақпан', 'наурыз', 'сәуір', 'мамыр', 'маусым', 'шілде', 'тамыз', 'қыркүйек', 'қазан', 'қараша', 'желтоқсан'], 'months_short' => ['қаң', 'ақп', 'нау', 'сәу', 'мам', 'мау', 'шіл', 'там', 'қыр', 'қаз', 'қар', 'жел'], 'weekdays' => ['жексенбі', 'дүйсенбі', 'сейсенбі', 'сәрсенбі', 'бейсенбі', 'жұма', 'сенбі'], 'weekdays_short' => ['жек', 'дүй', 'сей', 'сәр', 'бей', 'жұм', 'сен'], 'weekdays_min' => ['жк', 'дй', 'сй', 'ср', 'бй', 'жм', 'сн'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' және '], ]; PKgt[;OOCarbon/Lang/bhb.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/bhb_IN.php'; PKgt[L' ' Carbon/Lang/gu.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - Kaushik Thanki * - Josh Soref */ return [ 'year' => 'એક વર્ષ|:count વર્ષ', 'y' => ':countવર્ષ|:countવર્ષો', 'month' => 'એક મહિનો|:count મહિના', 'm' => ':countમહિનો|:countમહિના', 'week' => ':count અઠવાડિયું|:count અઠવાડિયા', 'w' => ':countઅઠ.|:countઅઠ.', 'day' => 'એક દિવસ|:count દિવસ', 'd' => ':countદિ.|:countદિ.', 'hour' => 'એક કલાક|:count કલાક', 'h' => ':countક.|:countક.', 'minute' => 'એક મિનિટ|:count મિનિટ', 'min' => ':countમિ.|:countમિ.', 'second' => 'અમુક પળો|:count સેકંડ', 's' => ':countસે.|:countસે.', 'ago' => ':time પેહલા', 'from_now' => ':time મા', 'after' => ':time પછી', 'before' => ':time પહેલા', 'diff_now' => 'હમણાં', 'diff_today' => 'આજ', 'diff_yesterday' => 'ગઇકાલે', 'diff_tomorrow' => 'કાલે', 'formats' => [ 'LT' => 'A h:mm વાગ્યે', 'LTS' => 'A h:mm:ss વાગ્યે', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, A h:mm વાગ્યે', 'LLLL' => 'dddd, D MMMM YYYY, A h:mm વાગ્યે', ], 'calendar' => [ 'sameDay' => '[આજ] LT', 'nextDay' => '[કાલે] LT', 'nextWeek' => 'dddd, LT', 'lastDay' => '[ગઇકાલે] LT', 'lastWeek' => '[પાછલા] dddd, LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 4) { return 'રાત'; } if ($hour < 10) { return 'સવાર'; } if ($hour < 17) { return 'બપોર'; } if ($hour < 20) { return 'સાંજ'; } return 'રાત'; }, 'months' => ['જાન્યુઆરી', 'ફેબ્રુઆરી', 'માર્ચ', 'એપ્રિલ', 'મે', 'જૂન', 'જુલાઈ', 'ઑગસ્ટ', 'સપ્ટેમ્બર', 'ઑક્ટ્બર', 'નવેમ્બર', 'ડિસેમ્બર'], 'months_short' => ['જાન્યુ.', 'ફેબ્રુ.', 'માર્ચ', 'એપ્રિ.', 'મે', 'જૂન', 'જુલા.', 'ઑગ.', 'સપ્ટે.', 'ઑક્ટ્.', 'નવે.', 'ડિસે.'], 'weekdays' => ['રવિવાર', 'સોમવાર', 'મંગળવાર', 'બુધ્વાર', 'ગુરુવાર', 'શુક્રવાર', 'શનિવાર'], 'weekdays_short' => ['રવિ', 'સોમ', 'મંગળ', 'બુધ્', 'ગુરુ', 'શુક્ર', 'શનિ'], 'weekdays_min' => ['ર', 'સો', 'મં', 'બુ', 'ગુ', 'શુ', 'શ'], 'list' => [', ', ' અને '], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'weekend' => [0, 0], ]; PKgt[ # # Carbon/Lang/et.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - Andres Ivanov * - Tsutomu Kuroda * - tjku * - Max Melentiev * - Juanito Fatas * - RM87 * - Akira Matsuda * - Christopher Dell * - Enrique Vidal * - Simone Carletti * - Aaron Patterson * - Esko Lehtme * - Mart Karu * - Nicolás Hock Isaza * - Kevin Valdek * - Zahhar Kirillov * - João Magalhães * - Ingmar * - Illimar Tambek * - Mihkel */ return [ 'year' => ':count aasta|:count aastat', 'y' => ':count a', 'month' => ':count kuu|:count kuud', 'm' => ':count k', 'week' => ':count nädal|:count nädalat', 'w' => ':count näd', 'day' => ':count päev|:count päeva', 'd' => ':count p', 'hour' => ':count tund|:count tundi', 'h' => ':count t', 'minute' => ':count minut|:count minutit', 'min' => ':count min', 'second' => ':count sekund|:count sekundit', 's' => ':count s', 'ago' => ':time tagasi', 'from_now' => ':time pärast', 'after' => ':time pärast', 'before' => ':time enne', 'year_from_now' => ':count aasta', 'month_from_now' => ':count kuu', 'week_from_now' => ':count nädala', 'day_from_now' => ':count päeva', 'hour_from_now' => ':count tunni', 'minute_from_now' => ':count minuti', 'second_from_now' => ':count sekundi', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'diff_now' => 'nüüd', 'diff_today' => 'täna', 'diff_yesterday' => 'eile', 'diff_tomorrow' => 'homme', 'diff_before_yesterday' => 'üleeile', 'diff_after_tomorrow' => 'ülehomme', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY HH:mm', 'LLLL' => 'dddd, D. MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[täna] LT', 'nextDay' => '[homme] LT', 'lastDay' => '[eile] LT', 'nextWeek' => 'dddd LT', 'lastWeek' => '[eelmine] dddd LT', 'sameElse' => 'L', ], 'months' => ['jaanuar', 'veebruar', 'märts', 'aprill', 'mai', 'juuni', 'juuli', 'august', 'september', 'oktoober', 'november', 'detsember'], 'months_short' => ['jaan', 'veebr', 'märts', 'apr', 'mai', 'juuni', 'juuli', 'aug', 'sept', 'okt', 'nov', 'dets'], 'weekdays' => ['pühapäev', 'esmaspäev', 'teisipäev', 'kolmapäev', 'neljapäev', 'reede', 'laupäev'], 'weekdays_short' => ['P', 'E', 'T', 'K', 'N', 'R', 'L'], 'weekdays_min' => ['P', 'E', 'T', 'K', 'N', 'R', 'L'], 'list' => [', ', ' ja '], 'meridiem' => ['enne lõunat', 'pärast lõunat'], ]; PKgt[OOCarbon/Lang/fur.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/fur_IT.php'; PKgt[''x  Carbon/Lang/fr_NE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt["wNNCarbon/Lang/sm.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/sm_WS.php'; PKgt[5uOOCarbon/Lang/raj.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/raj_IN.php'; PKgt[pGGCarbon/Lang/en_KY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[EAACarbon/Lang/fr_SY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'first_day_of_week' => 6, 'weekend' => [5, 6], 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd D MMMM YYYY h:mm a', ], ]); PKgt[X`Carbon/Lang/ur_PK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/ur.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'months_short' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'weekdays' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], 'weekdays_short' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], 'weekdays_min' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['ص', 'ش'], ]); PKgt[oOOCarbon/Lang/the.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/the_NP.php'; PKgt[BCarbon/Lang/bn_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/bn.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], 'months_short' => ['জানু', 'ফেব', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], 'weekdays' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার'], 'weekdays_short' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'শুক্র', 'শনি'], 'weekdays_min' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'শুক্র', 'শনি'], 'day_of_first_week_of_year' => 1, ]); PKgt[[ia  Carbon/Lang/pt_LU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/pt.php'; PKgt[   Carbon/Lang/or_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM AP Linux Technology Center, Yamato Software Laboratory bug-glibc@gnu.org */ return [ 'diff_now' => 'ବର୍ତ୍ତମାନ', 'diff_yesterday' => 'ଗତକାଲି', 'diff_tomorrow' => 'ଆସନ୍ତାକାଲି', 'formats' => [ 'LT' => 'Oh:Om A', 'LTS' => 'Oh:Om:Os A', 'L' => 'OD-OM-OY', 'LL' => 'OD MMMM OY', 'LLL' => 'OD MMMM OY Oh:Om A', 'LLLL' => 'dddd OD MMMM OY Oh:Om A', ], 'months' => ['ଜାନୁଆରୀ', 'ଫେବୃଆରୀ', 'ମାର୍ଚ୍ଚ', 'ଅପ୍ରେଲ', 'ମଇ', 'ଜୁନ', 'ଜୁଲାଇ', 'ଅଗଷ୍ଟ', 'ସେପ୍ଟେମ୍ବର', 'ଅକ୍ଟୋବର', 'ନଭେମ୍ବର', 'ଡିସେମ୍ବର'], 'months_short' => ['ଜାନୁଆରୀ', 'ଫେବୃଆରୀ', 'ମାର୍ଚ୍ଚ', 'ଅପ୍ରେଲ', 'ମଇ', 'ଜୁନ', 'ଜୁଲାଇ', 'ଅଗଷ୍ଟ', 'ସେପ୍ଟେମ୍ବର', 'ଅକ୍ଟୋବର', 'ନଭେମ୍ବର', 'ଡିସେମ୍ବର'], 'weekdays' => ['ରବିବାର', 'ସୋମବାର', 'ମଙ୍ଗଳବାର', 'ବୁଧବାର', 'ଗୁରୁବାର', 'ଶୁକ୍ରବାର', 'ଶନିବାର'], 'weekdays_short' => ['ରବି', 'ସୋମ', 'ମଙ୍ଗଳ', 'ବୁଧ', 'ଗୁରୁ', 'ଶୁକ୍ର', 'ଶନି'], 'weekdays_min' => ['ରବି', 'ସୋମ', 'ମଙ୍ଗଳ', 'ବୁଧ', 'ଗୁରୁ', 'ଶୁକ୍ର', 'ଶନି'], 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['୦', '୧', '୨', '୩', '୪', '୫', '୬', '୭', '୮', '୯', '୧୦', '୧୧', '୧୨', '୧୩', '୧୪', '୧୫', '୧୬', '୧୭', '୧୮', '୧୯', '୨୦', '୨୧', '୨୨', '୨୩', '୨୪', '୨୫', '୨୬', '୨୭', '୨୮', '୨୯', '୩୦', '୩୧', '୩୨', '୩୩', '୩୪', '୩୫', '୩୬', '୩୭', '୩୮', '୩୯', '୪୦', '୪୧', '୪୨', '୪୩', '୪୪', '୪୫', '୪୬', '୪୭', '୪୮', '୪୯', '୫୦', '୫୧', '୫୨', '୫୩', '୫୪', '୫୫', '୫୬', '୫୭', '୫୮', '୫୯', '୬୦', '୬୧', '୬୨', '୬୩', '୬୪', '୬୫', '୬୬', '୬୭', '୬୮', '୬୯', '୭୦', '୭୧', '୭୨', '୭୩', '୭୪', '୭୫', '୭୬', '୭୭', '୭୮', '୭୯', '୮୦', '୮୧', '୮୨', '୮୩', '୮୪', '୮୫', '୮୬', '୮୭', '୮୮', '୮୯', '୯୦', '୯୧', '୯୨', '୯୩', '୯୪', '୯୫', '୯୬', '୯୭', '୯୮', '୯୯'], 'year' => ':count ବର୍ଷ', 'y' => ':count ବ.', 'month' => ':count ମାସ', 'm' => ':count ମା.', 'week' => ':count ସପ୍ତାହ', 'w' => ':count ସପ୍ତା.', 'day' => ':count ଦିନ', 'd' => ':count ଦିନ', 'hour' => ':count ଘଣ୍ତ', 'h' => ':count ଘ.', 'minute' => ':count ମିନଟ', 'min' => ':count ମି.', 'second' => ':count ସେକଣ୍ଢ', 's' => ':count ସେ.', 'ago' => ':time ପୂର୍ବେ', 'from_now' => ':timeରେ', ]; PKgt[,}s` ` Carbon/Lang/he.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Daniel Cohen Gindi * - JD Isaacks * - Itai Nathaniel * - GabMic * - Yaakov Dahan (yakidahan) */ return [ 'year' => 'שנה|{2}שנתיים|:count שנים', 'y' => 'שנה|:count שנ׳', 'month' => 'חודש|{2}חודשיים|:count חודשים', 'm' => 'חודש|:count חו׳', 'week' => 'שבוע|{2}שבועיים|:count שבועות', 'w' => 'שבוע|:count שב׳', 'day' => 'יום|{2}יומיים|:count ימים', 'd' => 'יום|:count ימ׳', 'hour' => 'שעה|{2}שעתיים|:count שעות', 'h' => 'שעה|:count שע׳', 'minute' => 'דקה|{2}שתי דקות|:count דקות', 'min' => 'דקה|:count דק׳', 'second' => 'שנייה|:count שניות', 'a_second' => 'כמה שניות|:count שניות', 's' => 'שניה|:count שנ׳', 'ago' => 'לפני :time', 'from_now' => 'בעוד :time מעכשיו', 'after' => 'אחרי :time', 'before' => 'לפני :time', 'diff_now' => 'עכשיו', 'diff_today' => 'היום', 'diff_today_regexp' => 'היום(?:\\s+ב־)?', 'diff_yesterday' => 'אתמול', 'diff_yesterday_regexp' => 'אתמול(?:\\s+ב־)?', 'diff_tomorrow' => 'מחר', 'diff_tomorrow_regexp' => 'מחר(?:\\s+ב־)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D [ב]MMMM YYYY', 'LLL' => 'D [ב]MMMM YYYY HH:mm', 'LLLL' => 'dddd, D [ב]MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[היום ב־]LT', 'nextDay' => '[מחר ב־]LT', 'nextWeek' => 'dddd [בשעה] LT', 'lastDay' => '[אתמול ב־]LT', 'lastWeek' => '[ביום] dddd [האחרון בשעה] LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour, $minute, $isLower) { if ($hour < 5) { return 'לפנות בוקר'; } if ($hour < 10) { return 'בבוקר'; } if ($hour < 12) { return $isLower ? 'לפנה"צ' : 'לפני הצהריים'; } if ($hour < 18) { return $isLower ? 'אחה"צ' : 'אחרי הצהריים'; } return 'בערב'; }, 'months' => ['ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'], 'months_short' => ['ינו׳', 'פבר׳', 'מרץ', 'אפר׳', 'מאי', 'יוני', 'יולי', 'אוג׳', 'ספט׳', 'אוק׳', 'נוב׳', 'דצמ׳'], 'weekdays' => ['ראשון', 'שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת'], 'weekdays_short' => ['א׳', 'ב׳', 'ג׳', 'ד׳', 'ה׳', 'ו׳', 'ש׳'], 'weekdays_min' => ['א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ש'], 'list' => [', ', ' ו -'], 'weekend' => [5, 6], ]; PKgt[^َCarbon/Lang/ln_CF.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ln.php', [ 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa míbalé', 'mokɔlɔ mwa mísáto', 'mokɔlɔ ya mínéi', 'mokɔlɔ ya mítáno', 'mpɔ́sɔ'], 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], 'weekdays_min' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], 'meridiem' => ['ntɔ́ngɔ́', 'mpókwa'], ]); PKgt[(NNCarbon/Lang/mg.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/mg_MG.php'; PKgt[pGGCarbon/Lang/en_LC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[ڑQQCarbon/Lang/so_KE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return require __DIR__.'/so.php'; PKgt[&5  Carbon/Lang/nl_SX.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/nl.php'; PKgt[M **Carbon/Lang/lrc_IQ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/lrc.php', [ ]); PKgt[ov22Carbon/Lang/ce_RU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - ANCHR */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY.DD.MM', ], 'months' => ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'], 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], 'weekdays' => ['КӀиранан де', 'Оршотан де', 'Шинарин де', 'Кхаарин де', 'Еарин де', 'ПӀераскан де', 'Шот де'], 'weekdays_short' => ['КӀ', 'Ор', 'Ши', 'Кх', 'Еа', 'ПӀ', 'Шо'], 'weekdays_min' => ['КӀ', 'Ор', 'Ши', 'Кх', 'Еа', 'ПӀ', 'Шо'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => ':count шо', 'y' => ':count шо', 'a_year' => ':count шо', 'month' => ':count бутт', 'm' => ':count бутт', 'a_month' => ':count бутт', 'week' => ':count кӏира', 'w' => ':count кӏира', 'a_week' => ':count кӏира', 'day' => ':count де', 'd' => ':count де', 'a_day' => ':count де', 'hour' => ':count сахьт', 'h' => ':count сахьт', 'a_hour' => ':count сахьт', 'minute' => ':count минот', 'min' => ':count минот', 'a_minute' => ':count минот', 'second' => ':count секунд', 's' => ':count секунд', 'a_second' => ':count секунд', ]); PKgt[if)OOCarbon/Lang/fil.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/fil_PH.php'; PKgt[pGGCarbon/Lang/en_DG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[''x  Carbon/Lang/fr_CG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[Carbon/Lang/sg.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ND', 'LK'], 'weekdays' => ['Bikua-ôko', 'Bïkua-ûse', 'Bïkua-ptâ', 'Bïkua-usïö', 'Bïkua-okü', 'Lâpôsö', 'Lâyenga'], 'weekdays_short' => ['Bk1', 'Bk2', 'Bk3', 'Bk4', 'Bk5', 'Lâp', 'Lây'], 'weekdays_min' => ['Bk1', 'Bk2', 'Bk3', 'Bk4', 'Bk5', 'Lâp', 'Lây'], 'months' => ['Nyenye', 'Fulundïgi', 'Mbängü', 'Ngubùe', 'Bêläwü', 'Föndo', 'Lengua', 'Kükürü', 'Mvuka', 'Ngberere', 'Nabändüru', 'Kakauka'], 'months_short' => ['Nye', 'Ful', 'Mbä', 'Ngu', 'Bêl', 'Fön', 'Len', 'Kük', 'Mvu', 'Ngb', 'Nab', 'Kak'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'year' => ':count dā', // less reliable 'y' => ':count dā', // less reliable 'a_year' => ':count dā', // less reliable 'week' => ':count bïkua-okü', // less reliable 'w' => ':count bïkua-okü', // less reliable 'a_week' => ':count bïkua-okü', // less reliable 'day' => ':count ziggawâ', // less reliable 'd' => ':count ziggawâ', // less reliable 'a_day' => ':count ziggawâ', // less reliable 'hour' => ':count yângâködörö', // less reliable 'h' => ':count yângâködörö', // less reliable 'a_hour' => ':count yângâködörö', // less reliable 'second' => ':count bïkua-ôko', // less reliable 's' => ':count bïkua-ôko', // less reliable 'a_second' => ':count bïkua-ôko', // less reliable 'month' => ':count Nze tî ngu', 'm' => ':count Nze tî ngu', 'a_month' => ':count Nze tî ngu', ]); PKgt[1NNCarbon/Lang/zu.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/zu_ZA.php'; PKgt[aؠOOCarbon/Lang/tig.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/tig_ER.php'; PKgt[huCarbon/Lang/kea.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['a', 'p'], 'weekdays' => ['dumingu', 'sigunda-fera', 'tersa-fera', 'kuarta-fera', 'kinta-fera', 'sesta-fera', 'sabadu'], 'weekdays_short' => ['dum', 'sig', 'ter', 'kua', 'kin', 'ses', 'sab'], 'weekdays_min' => ['du', 'si', 'te', 'ku', 'ki', 'se', 'sa'], 'weekdays_standalone' => ['dumingu', 'sigunda-fera', 'tersa-fera', 'kuarta-fera', 'kinta-fera', 'sesta-fera', 'sábadu'], 'months' => ['Janeru', 'Febreru', 'Marsu', 'Abril', 'Maiu', 'Junhu', 'Julhu', 'Agostu', 'Setenbru', 'Otubru', 'Nuvenbru', 'Dizenbru'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Otu', 'Nuv', 'Diz'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D [di] MMMM [di] YYYY HH:mm', 'LLLL' => 'dddd, D [di] MMMM [di] YYYY HH:mm', ], 'year' => ':count otunu', // less reliable 'y' => ':count otunu', // less reliable 'a_year' => ':count otunu', // less reliable 'week' => ':count día dumingu', // less reliable 'w' => ':count día dumingu', // less reliable 'a_week' => ':count día dumingu', // less reliable 'day' => ':count diâ', // less reliable 'd' => ':count diâ', // less reliable 'a_day' => ':count diâ', // less reliable 'minute' => ':count sugundu', // less reliable 'min' => ':count sugundu', // less reliable 'a_minute' => ':count sugundu', // less reliable 'second' => ':count dós', // less reliable 's' => ':count dós', // less reliable 'a_second' => ':count dós', // less reliable ]); PKgt[EV?DDCarbon/Lang/es_ES.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return require __DIR__.'/es.php'; PKgt[1H((Carbon/Lang/aa_ER@saaho.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Qunxa Garablu', 'Naharsi Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Leqeeni', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], 'months_short' => ['Qun', 'Nah', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'], 'weekdays' => ['Naba Sambat', 'Sani', 'Salus', 'Rabuq', 'Camus', 'Jumqata', 'Qunxa Sambat'], 'weekdays_short' => ['Nab', 'San', 'Sal', 'Rab', 'Cam', 'Jum', 'Qun'], 'weekdays_min' => ['Nab', 'San', 'Sal', 'Rab', 'Cam', 'Jum', 'Qun'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['saaku', 'carra'], ]); PKgt[k_ؾ4 4 Carbon/Lang/mi.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - John Corrigan * - François B */ return [ 'year' => ':count tau', 'a_year' => '{1}he tau|:count tau', 'month' => ':count marama', 'a_month' => '{1}he marama|:count marama', 'week' => ':count wiki', 'a_week' => '{1}he wiki|:count wiki', 'day' => ':count ra', 'a_day' => '{1}he ra|:count ra', 'hour' => ':count haora', 'a_hour' => '{1}te haora|:count haora', 'minute' => ':count meneti', 'a_minute' => '{1}he meneti|:count meneti', 'second' => ':count hēkona', 'a_second' => '{1}te hēkona ruarua|:count hēkona', 'ago' => ':time i mua', 'from_now' => 'i roto i :time', 'diff_yesterday' => 'inanahi', 'diff_yesterday_regexp' => 'inanahi(?:\\s+i)?', 'diff_today' => 'i teie', 'diff_today_regexp' => 'i teie(?:\\s+mahana,)?(?:\\s+i)?', 'diff_tomorrow' => 'apopo', 'diff_tomorrow_regexp' => 'apopo(?:\\s+i)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY [i] HH:mm', 'LLLL' => 'dddd, D MMMM YYYY [i] HH:mm', ], 'calendar' => [ 'sameDay' => '[i teie mahana, i] LT', 'nextDay' => '[apopo i] LT', 'nextWeek' => 'dddd [i] LT', 'lastDay' => '[inanahi i] LT', 'lastWeek' => 'dddd [whakamutunga i] LT', 'sameElse' => 'L', ], 'ordinal' => ':numberº', 'months' => ['Kohi-tāte', 'Hui-tanguru', 'Poutū-te-rangi', 'Paenga-whāwhā', 'Haratua', 'Pipiri', 'Hōngoingoi', 'Here-turi-kōkā', 'Mahuru', 'Whiringa-ā-nuku', 'Whiringa-ā-rangi', 'Hakihea'], 'months_short' => ['Kohi', 'Hui', 'Pou', 'Pae', 'Hara', 'Pipi', 'Hōngoi', 'Here', 'Mahu', 'Whi-nu', 'Whi-ra', 'Haki'], 'weekdays' => ['Rātapu', 'Mane', 'Tūrei', 'Wenerei', 'Tāite', 'Paraire', 'Hātarei'], 'weekdays_short' => ['Ta', 'Ma', 'Tū', 'We', 'Tāi', 'Pa', 'Hā'], 'weekdays_min' => ['Ta', 'Ma', 'Tū', 'We', 'Tāi', 'Pa', 'Hā'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' me te '], ]; PKgt[)ˊ Carbon/Lang/gd.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Jon Ashdown */ return [ 'year' => ':count bliadhna', 'a_year' => '{1}bliadhna|:count bliadhna', 'y' => ':count b.', 'month' => ':count mìosan', 'a_month' => '{1}mìos|:count mìosan', 'm' => ':count ms.', 'week' => ':count seachdainean', 'a_week' => '{1}seachdain|:count seachdainean', 'w' => ':count s.', 'day' => ':count latha', 'a_day' => '{1}latha|:count latha', 'd' => ':count l.', 'hour' => ':count uairean', 'a_hour' => '{1}uair|:count uairean', 'h' => ':count u.', 'minute' => ':count mionaidean', 'a_minute' => '{1}mionaid|:count mionaidean', 'min' => ':count md.', 'second' => ':count diogan', 'a_second' => '{1}beagan diogan|:count diogan', 's' => ':count d.', 'ago' => 'bho chionn :time', 'from_now' => 'ann an :time', 'diff_yesterday' => 'An-dè', 'diff_yesterday_regexp' => 'An-dè(?:\\s+aig)?', 'diff_today' => 'An-diugh', 'diff_today_regexp' => 'An-diugh(?:\\s+aig)?', 'diff_tomorrow' => 'A-màireach', 'diff_tomorrow_regexp' => 'A-màireach(?:\\s+aig)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[An-diugh aig] LT', 'nextDay' => '[A-màireach aig] LT', 'nextWeek' => 'dddd [aig] LT', 'lastDay' => '[An-dè aig] LT', 'lastWeek' => 'dddd [seo chaidh] [aig] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { return $number.($number === 1 ? 'd' : ($number % 10 === 2 ? 'na' : 'mh')); }, 'months' => ['Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'], 'months_short' => ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'], 'weekdays' => ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'], 'weekdays_short' => ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'], 'weekdays_min' => ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' agus '], 'meridiem' => ['m', 'f'], ]; PKgt[I Carbon/Lang/lkt.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'month' => ':count haŋwí', // less reliable 'm' => ':count haŋwí', // less reliable 'a_month' => ':count haŋwí', // less reliable 'week' => ':count šakówiŋ', // less reliable 'w' => ':count šakówiŋ', // less reliable 'a_week' => ':count šakówiŋ', // less reliable 'hour' => ':count maza škaŋškaŋ', // less reliable 'h' => ':count maza škaŋškaŋ', // less reliable 'a_hour' => ':count maza škaŋškaŋ', // less reliable 'minute' => ':count číkʼala', // less reliable 'min' => ':count číkʼala', // less reliable 'a_minute' => ':count číkʼala', // less reliable 'year' => ':count waníyetu', 'y' => ':count waníyetu', 'a_year' => ':count waníyetu', 'day' => ':count aŋpétu', 'd' => ':count aŋpétu', 'a_day' => ':count aŋpétu', 'second' => ':count icinuŋpa', 's' => ':count icinuŋpa', 'a_second' => ':count icinuŋpa', ]); PKgt[ςCarbon/Lang/tr_CY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/tr.php', [ 'weekdays_short' => ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt'], 'weekdays_min' => ['Pa', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct'], 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'D.MM.YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'D MMMM YYYY dddd h:mm a', ], ]); PKgt[VVCarbon/Lang/lu.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Dinda', 'Dilolo'], 'weekdays' => ['Lumingu', 'Nkodya', 'Ndàayà', 'Ndangù', 'Njòwa', 'Ngòvya', 'Lubingu'], 'weekdays_short' => ['Lum', 'Nko', 'Ndy', 'Ndg', 'Njw', 'Ngv', 'Lub'], 'weekdays_min' => ['Lum', 'Nko', 'Ndy', 'Ndg', 'Njw', 'Ngv', 'Lub'], 'months' => ['Ciongo', 'Lùishi', 'Lusòlo', 'Mùuyà', 'Lumùngùlù', 'Lufuimi', 'Kabàlàshìpù', 'Lùshìkà', 'Lutongolo', 'Lungùdi', 'Kaswèkèsè', 'Ciswà'], 'months_short' => ['Cio', 'Lui', 'Lus', 'Muu', 'Lum', 'Luf', 'Kab', 'Lush', 'Lut', 'Lun', 'Kas', 'Cis'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], ]); PKgt[dCarbon/Lang/es_PE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[?`WCarbon/Lang/ak_GH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Sugar Labs // OLPC sugarlabs.org libc-alpha@sourceware.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY/MM/DD', ], 'months' => ['Sanda-Ɔpɛpɔn', 'Kwakwar-Ɔgyefuo', 'Ebɔw-Ɔbenem', 'Ebɔbira-Oforisuo', 'Esusow Aketseaba-Kɔtɔnimba', 'Obirade-Ayɛwohomumu', 'Ayɛwoho-Kitawonsa', 'Difuu-Ɔsandaa', 'Fankwa-Ɛbɔ', 'Ɔbɛsɛ-Ahinime', 'Ɔberɛfɛw-Obubuo', 'Mumu-Ɔpɛnimba'], 'months_short' => ['S-Ɔ', 'K-Ɔ', 'E-Ɔ', 'E-O', 'E-K', 'O-A', 'A-K', 'D-Ɔ', 'F-Ɛ', 'Ɔ-A', 'Ɔ-O', 'M-Ɔ'], 'weekdays' => ['Kwesida', 'Dwowda', 'Benada', 'Wukuda', 'Yawda', 'Fida', 'Memeneda'], 'weekdays_short' => ['Kwe', 'Dwo', 'Ben', 'Wuk', 'Yaw', 'Fia', 'Mem'], 'weekdays_min' => ['Kwe', 'Dwo', 'Ben', 'Wuk', 'Yaw', 'Fia', 'Mem'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['AN', 'EW'], 'year' => ':count afe', 'y' => ':count afe', 'a_year' => ':count afe', 'month' => ':count bosume', 'm' => ':count bosume', 'a_month' => ':count bosume', 'day' => ':count ɛda', 'd' => ':count ɛda', 'a_day' => ':count ɛda', ]); PKgt[pGGCarbon/Lang/en_CX.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[iV  Carbon/Lang/ku_TR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ku.php'; PKgt[ȌffCarbon/Lang/nyn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Sande', 'Orwokubanza', 'Orwakabiri', 'Orwakashatu', 'Orwakana', 'Orwakataano', 'Orwamukaaga'], 'weekdays_short' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], 'weekdays_min' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], 'months' => ['Okwokubanza', 'Okwakabiri', 'Okwakashatu', 'Okwakana', 'Okwakataana', 'Okwamukaaga', 'Okwamushanju', 'Okwamunaana', 'Okwamwenda', 'Okwaikumi', 'Okwaikumi na kumwe', 'Okwaikumi na ibiri'], 'months_short' => ['KBZ', 'KBR', 'KST', 'KKN', 'KTN', 'KMK', 'KMS', 'KMN', 'KMW', 'KKM', 'KNK', 'KNB'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[O%ėOOCarbon/Lang/cmn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/cmn_TW.php'; PKgt[nCarbon/Lang/lij_IT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Gastaldi alessio.gastaldi@libero.it */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['zenâ', 'fevrâ', 'marzo', 'avrî', 'mazzo', 'zûgno', 'lûggio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dixembre'], 'months_short' => ['zen', 'fev', 'mar', 'arv', 'maz', 'zûg', 'lûg', 'ago', 'set', 'ött', 'nov', 'dix'], 'weekdays' => ['domenega', 'lûnedì', 'martedì', 'mercUrdì', 'zêggia', 'venardì', 'sabbo'], 'weekdays_short' => ['dom', 'lûn', 'mar', 'mer', 'zêu', 'ven', 'sab'], 'weekdays_min' => ['dom', 'lûn', 'mar', 'mer', 'zêu', 'ven', 'sab'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count etæ', // less reliable 'y' => ':count etæ', // less reliable 'a_year' => ':count etæ', // less reliable 'month' => ':count meize', 'm' => ':count meize', 'a_month' => ':count meize', 'week' => ':count settemannha', 'w' => ':count settemannha', 'a_week' => ':count settemannha', 'day' => ':count giorno', 'd' => ':count giorno', 'a_day' => ':count giorno', 'hour' => ':count reléuio', // less reliable 'h' => ':count reléuio', // less reliable 'a_hour' => ':count reléuio', // less reliable 'minute' => ':count menûo', 'min' => ':count menûo', 'a_minute' => ':count menûo', 'second' => ':count segondo', 's' => ':count segondo', 'a_second' => ':count segondo', ]); PKgt[pGGCarbon/Lang/en_MP.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[泺4>>Carbon/Lang/ar_LB.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[ا4l44Carbon/Lang/zu_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Januwari', 'Februwari', 'Mashi', 'Ephreli', 'Meyi', 'Juni', 'Julayi', 'Agasti', 'Septhemba', 'Okthoba', 'Novemba', 'Disemba'], 'months_short' => ['Jan', 'Feb', 'Mas', 'Eph', 'Mey', 'Jun', 'Jul', 'Aga', 'Sep', 'Okt', 'Nov', 'Dis'], 'weekdays' => ['iSonto', 'uMsombuluko', 'uLwesibili', 'uLwesithathu', 'uLwesine', 'uLwesihlanu', 'uMgqibelo'], 'weekdays_short' => ['Son', 'Mso', 'Bil', 'Tha', 'Sin', 'Hla', 'Mgq'], 'weekdays_min' => ['Son', 'Mso', 'Bil', 'Tha', 'Sin', 'Hla', 'Mgq'], 'day_of_first_week_of_year' => 1, 'year' => 'kweminyaka engu-:count', 'y' => 'kweminyaka engu-:count', 'a_year' => 'kweminyaka engu-:count', 'month' => 'izinyanga ezingu-:count', 'm' => 'izinyanga ezingu-:count', 'a_month' => 'izinyanga ezingu-:count', 'week' => 'lwamasonto angu-:count', 'w' => 'lwamasonto angu-:count', 'a_week' => 'lwamasonto angu-:count', 'day' => 'ezingaba ngu-:count', 'd' => 'ezingaba ngu-:count', 'a_day' => 'ezingaba ngu-:count', 'hour' => 'amahora angu-:count', 'h' => 'amahora angu-:count', 'a_hour' => 'amahora angu-:count', 'minute' => 'ngemizuzu engu-:count', 'min' => 'ngemizuzu engu-:count', 'a_minute' => 'ngemizuzu engu-:count', 'second' => 'imizuzwana engu-:count', 's' => 'imizuzwana engu-:count', 'a_second' => 'imizuzwana engu-:count', ]); PKgt[azCarbon/Lang/hy_AM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - Tim Fish * - Serhan Apaydın * - JD Isaacks */ return array_replace_recursive(require __DIR__.'/hy.php', [ 'from_now' => ':time հետո', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[!/] ] Carbon/Lang/jv.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - tgfjt * - JD Isaacks */ return [ 'year' => '{1}setaun|]1,Inf[:count taun', 'month' => '{1}sewulan|]1,Inf[:count wulan', 'week' => '{1}sakminggu|]1,Inf[:count minggu', 'day' => '{1}sedinten|]1,Inf[:count dinten', 'hour' => '{1}setunggal jam|]1,Inf[:count jam', 'minute' => '{1}setunggal menit|]1,Inf[:count menit', 'second' => '{1}sawetawis detik|]1,Inf[:count detik', 'ago' => ':time ingkang kepengker', 'from_now' => 'wonten ing :time', 'diff_today' => 'Dinten', 'diff_yesterday' => 'Kala', 'diff_yesterday_regexp' => 'Kala(?:\\s+wingi)?(?:\\s+pukul)?', 'diff_tomorrow' => 'Mbenjang', 'diff_tomorrow_regexp' => 'Mbenjang(?:\\s+pukul)?', 'diff_today_regexp' => 'Dinten(?:\\s+puniko)?(?:\\s+pukul)?', 'formats' => [ 'LT' => 'HH.mm', 'LTS' => 'HH.mm.ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY [pukul] HH.mm', 'LLLL' => 'dddd, D MMMM YYYY [pukul] HH.mm', ], 'calendar' => [ 'sameDay' => '[Dinten puniko pukul] LT', 'nextDay' => '[Mbenjang pukul] LT', 'nextWeek' => 'dddd [pukul] LT', 'lastDay' => '[Kala wingi pukul] LT', 'lastWeek' => 'dddd [kepengker pukul] LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 11) { return 'enjing'; } if ($hour < 15) { return 'siyang'; } if ($hour < 19) { return 'sonten'; } return 'ndalu'; }, 'months' => ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'Nopember', 'Desember'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ags', 'Sep', 'Okt', 'Nop', 'Des'], 'weekdays' => ['Minggu', 'Senen', 'Seloso', 'Rebu', 'Kemis', 'Jemuwah', 'Septu'], 'weekdays_short' => ['Min', 'Sen', 'Sel', 'Reb', 'Kem', 'Jem', 'Sep'], 'weekdays_min' => ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sp'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' lan '], ]; PKgt[lCarbon/Lang/te.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kunal Marwaha * - Josh Soref * - François B * - kc */ return [ 'year' => ':count సంవత్సరం|:count సంవత్సరాలు', 'a_year' => 'ఒక సంవత్సరం|:count సంవత్సరాలు', 'y' => ':count సం.', 'month' => ':count నెల|:count నెలలు', 'a_month' => 'ఒక నెల|:count నెలలు', 'm' => ':count నెల|:count నెల.', 'week' => ':count వారం|:count వారాలు', 'a_week' => 'ఒక వారం|:count వారాలు', 'w' => ':count వార.|:count వారా.', 'day' => ':count రోజు|:count రోజులు', 'a_day' => 'ఒక రోజు|:count రోజులు', 'd' => ':count రోజు|:count రోజు.', 'hour' => ':count గంట|:count గంటలు', 'a_hour' => 'ఒక గంట|:count గంటలు', 'h' => ':count గం.', 'minute' => ':count నిమిషం|:count నిమిషాలు', 'a_minute' => 'ఒక నిమిషం|:count నిమిషాలు', 'min' => ':count నిమి.', 'second' => ':count సెకను|:count సెకన్లు', 'a_second' => 'కొన్ని క్షణాలు|:count సెకన్లు', 's' => ':count సెక.', 'ago' => ':time క్రితం', 'from_now' => ':time లో', 'diff_now' => 'ప్రస్తుతం', 'diff_today' => 'నేడు', 'diff_yesterday' => 'నిన్న', 'diff_tomorrow' => 'రేపు', 'formats' => [ 'LT' => 'A h:mm', 'LTS' => 'A h:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, A h:mm', 'LLLL' => 'dddd, D MMMM YYYY, A h:mm', ], 'calendar' => [ 'sameDay' => '[నేడు] LT', 'nextDay' => '[రేపు] LT', 'nextWeek' => 'dddd, LT', 'lastDay' => '[నిన్న] LT', 'lastWeek' => '[గత] dddd, LT', 'sameElse' => 'L', ], 'ordinal' => ':numberవ', 'meridiem' => function ($hour) { if ($hour < 4) { return 'రాత్రి'; } if ($hour < 10) { return 'ఉదయం'; } if ($hour < 17) { return 'మధ్యాహ్నం'; } if ($hour < 20) { return 'సాయంత్రం'; } return ' రాత్రి'; }, 'months' => ['జనవరి', 'ఫిబ్రవరి', 'మార్చి', 'ఏప్రిల్', 'మే', 'జూన్', 'జూలై', 'ఆగస్టు', 'సెప్టెంబర్', 'అక్టోబర్', 'నవంబర్', 'డిసెంబర్'], 'months_short' => ['జన.', 'ఫిబ్ర.', 'మార్చి', 'ఏప్రి.', 'మే', 'జూన్', 'జూలై', 'ఆగ.', 'సెప్.', 'అక్టో.', 'నవ.', 'డిసె.'], 'weekdays' => ['ఆదివారం', 'సోమవారం', 'మంగళవారం', 'బుధవారం', 'గురువారం', 'శుక్రవారం', 'శనివారం'], 'weekdays_short' => ['ఆది', 'సోమ', 'మంగళ', 'బుధ', 'గురు', 'శుక్ర', 'శని'], 'weekdays_min' => ['ఆ', 'సో', 'మం', 'బు', 'గు', 'శు', 'శ'], 'list' => ', ', 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'weekend' => [0, 0], ]; PKgt["Carbon/Lang/kam.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Ĩyakwakya', 'Ĩyawĩoo'], 'weekdays' => ['Wa kyumwa', 'Wa kwambĩlĩlya', 'Wa kelĩ', 'Wa katatũ', 'Wa kana', 'Wa katano', 'Wa thanthatũ'], 'weekdays_short' => ['Wky', 'Wkw', 'Wkl', 'Wtũ', 'Wkn', 'Wtn', 'Wth'], 'weekdays_min' => ['Wky', 'Wkw', 'Wkl', 'Wtũ', 'Wkn', 'Wtn', 'Wth'], 'months' => ['Mwai wa mbee', 'Mwai wa kelĩ', 'Mwai wa katatũ', 'Mwai wa kana', 'Mwai wa katano', 'Mwai wa thanthatũ', 'Mwai wa muonza', 'Mwai wa nyaanya', 'Mwai wa kenda', 'Mwai wa ĩkumi', 'Mwai wa ĩkumi na ĩmwe', 'Mwai wa ĩkumi na ilĩ'], 'months_short' => ['Mbe', 'Kel', 'Ktũ', 'Kan', 'Ktn', 'Tha', 'Moo', 'Nya', 'Knd', 'Ĩku', 'Ĩkm', 'Ĩkl'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], // Too unreliable /* 'year' => ':count mbua', // less reliable 'y' => ':count mbua', // less reliable 'a_year' => ':count mbua', // less reliable 'month' => ':count ndakitali', // less reliable 'm' => ':count ndakitali', // less reliable 'a_month' => ':count ndakitali', // less reliable 'day' => ':count wia', // less reliable 'd' => ':count wia', // less reliable 'a_day' => ':count wia', // less reliable 'hour' => ':count orasan', // less reliable 'h' => ':count orasan', // less reliable 'a_hour' => ':count orasan', // less reliable 'minute' => ':count orasan', // less reliable 'min' => ':count orasan', // less reliable 'a_minute' => ':count orasan', // less reliable */ ]); PKgt[''x  Carbon/Lang/fr_HT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[vCarbon/Lang/wae_CH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Walser Translation Team ml@translate-wae.ch */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY-MM-DD', ], 'months' => ['Jenner', 'Hornig', 'Märze', 'Abrille', 'Meije', 'Bráčet', 'Heiwet', 'Öigšte', 'Herbštmánet', 'Wímánet', 'Wintermánet', 'Chrištmánet'], 'months_short' => ['Jen', 'Hor', 'Mär', 'Abr', 'Mei', 'Brá', 'Hei', 'Öig', 'Her', 'Wím', 'Win', 'Chr'], 'weekdays' => ['Suntag', 'Mäntag', 'Zischtag', 'Mittwuch', 'Frontag', 'Fritag', 'Samschtag'], 'weekdays_short' => ['Sun', 'Män', 'Zis', 'Mit', 'Fro', 'Fri', 'Sam'], 'weekdays_min' => ['Sun', 'Män', 'Zis', 'Mit', 'Fro', 'Fri', 'Sam'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'month' => ':count Maano', // less reliable 'm' => ':count Maano', // less reliable 'a_month' => ':count Maano', // less reliable ]); PKgt[^4 Carbon/Lang/sat_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Red Hat Pune libc-alpha@sourceware.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रेल', 'मई', 'जुन', 'जुलाई', 'अगस्त', 'सितम्बर', 'अखथबर', 'नवम्बर', 'दिसम्बर'], 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रेल', 'मई', 'जुन', 'जुलाई', 'अगस्त', 'सितम्बर', 'अखथबर', 'नवम्बर', 'दिसम्बर'], 'weekdays' => ['सिंगेमाँहाँ', 'ओतेमाँहाँ', 'बालेमाँहाँ', 'सागुनमाँहाँ', 'सारदीमाँहाँ', 'जारुममाँहाँ', 'ञुहुममाँहाँ'], 'weekdays_short' => ['सिंगे', 'ओते', 'बाले', 'सागुन', 'सारदी', 'जारुम', 'ञुहुम'], 'weekdays_min' => ['सिंगे', 'ओते', 'बाले', 'सागुन', 'सारदी', 'जारुम', 'ञुहुम'], 'day_of_first_week_of_year' => 1, 'month' => ':count ńindạ cando', // less reliable 'm' => ':count ńindạ cando', // less reliable 'a_month' => ':count ńindạ cando', // less reliable 'week' => ':count mãhã', // less reliable 'w' => ':count mãhã', // less reliable 'a_week' => ':count mãhã', // less reliable 'hour' => ':count ᱥᱳᱱᱚ', // less reliable 'h' => ':count ᱥᱳᱱᱚ', // less reliable 'a_hour' => ':count ᱥᱳᱱᱚ', // less reliable 'minute' => ':count ᱯᱤᱞᱪᱩ', // less reliable 'min' => ':count ᱯᱤᱞᱪᱩ', // less reliable 'a_minute' => ':count ᱯᱤᱞᱪᱩ', // less reliable 'second' => ':count ar', // less reliable 's' => ':count ar', // less reliable 'a_second' => ':count ar', // less reliable 'year' => ':count ne̲s', 'y' => ':count ne̲s', 'a_year' => ':count ne̲s', 'day' => ':count ᱫᱤᱱ', 'd' => ':count ᱫᱤᱱ', 'a_day' => ':count ᱫᱤᱱ', ]); PKgt[dCarbon/Lang/es_EC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[pGGCarbon/Lang/en_KI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[ڑQQCarbon/Lang/so_ET.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return require __DIR__.'/so.php'; PKgt[  Carbon/Lang/hr_HR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/hr.php'; PKgt[ϑ  Carbon/Lang/hi_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/hi.php'; PKgt[se  Carbon/Lang/uk_UA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/uk.php'; PKgt[KNnnCarbon/Lang/no.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Daniel S. Billing * - Paul * - Jimmie Johansson * - Jens Herlevsen */ return array_replace_recursive(require __DIR__.'/nb.php', [ 'formats' => [ 'LLL' => 'D. MMMM YYYY HH:mm', 'LLLL' => 'dddd, D. MMMM YYYY [kl.] HH:mm', ], 'calendar' => [ 'nextWeek' => 'på dddd [kl.] LT', 'lastWeek' => '[i] dddd[s kl.] LT', ], ]); PKgt[k``Carbon/Lang/en_SD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 6, 'weekend' => [5, 6], ]); PKgt[pGGCarbon/Lang/en_RW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[㼦t..Carbon/Lang/lt.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - Tsutomu Kuroda * - tjku * - valdas406 * - Justas Palumickas * - Max Melentiev * - Andrius Janauskas * - Juanito Fatas * - Akira Matsuda * - Christopher Dell * - Enrique Vidal * - Simone Carletti * - Aaron Patterson * - Nicolás Hock Isaza * - Laurynas Butkus * - Sven Fuchs * - Dominykas Tijūnaitis * - Justinas Bolys * - Ričardas * - Kirill Chalkin * - Rolandas * - Justinas (Gamesh) */ return [ 'year' => ':count metai|:count metai|:count metų', 'y' => ':count m.', 'month' => ':count mėnuo|:count mėnesiai|:count mėnesį', 'm' => ':count mėn.', 'week' => ':count savaitė|:count savaitės|:count savaitę', 'w' => ':count sav.', 'day' => ':count diena|:count dienos|:count dienų', 'd' => ':count d.', 'hour' => ':count valanda|:count valandos|:count valandų', 'h' => ':count val.', 'minute' => ':count minutė|:count minutės|:count minutę', 'min' => ':count min.', 'second' => ':count sekundė|:count sekundės|:count sekundžių', 's' => ':count sek.', 'year_ago' => ':count metus|:count metus|:count metų', 'month_ago' => ':count mėnesį|:count mėnesius|:count mėnesių', 'week_ago' => ':count savaitę|:count savaites|:count savaičių', 'day_ago' => ':count dieną|:count dienas|:count dienų', 'hour_ago' => ':count valandą|:count valandas|:count valandų', 'minute_ago' => ':count minutę|:count minutes|:count minučių', 'second_ago' => ':count sekundę|:count sekundes|:count sekundžių', 'year_from_now' => ':count metų', 'month_from_now' => ':count mėnesio|:count mėnesių|:count mėnesių', 'week_from_now' => ':count savaitės|:count savaičių|:count savaičių', 'day_from_now' => ':count dienos|:count dienų|:count dienų', 'hour_from_now' => ':count valandos|:count valandų|:count valandų', 'minute_from_now' => ':count minutės|:count minučių|:count minučių', 'second_from_now' => ':count sekundės|:count sekundžių|:count sekundžių', 'year_after' => ':count metų', 'month_after' => ':count mėnesio|:count mėnesių|:count mėnesių', 'week_after' => ':count savaitės|:count savaičių|:count savaičių', 'day_after' => ':count dienos|:count dienų|:count dienų', 'hour_after' => ':count valandos|:count valandų|:count valandų', 'minute_after' => ':count minutės|:count minučių|:count minučių', 'second_after' => ':count sekundės|:count sekundžių|:count sekundžių', 'ago' => 'prieš :time', 'from_now' => ':time nuo dabar', 'after' => 'po :time', 'before' => 'už :time', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'diff_now' => 'ką tik', 'diff_today' => 'Šiandien', 'diff_yesterday' => 'vakar', 'diff_yesterday_regexp' => 'Vakar', 'diff_tomorrow' => 'rytoj', 'diff_tomorrow_regexp' => 'Rytoj', 'diff_before_yesterday' => 'užvakar', 'diff_after_tomorrow' => 'poryt', 'period_recurrences' => 'kartą|:count kartų', 'period_interval' => 'kiekvieną :interval', 'period_start_date' => 'nuo :date', 'period_end_date' => 'iki :date', 'months' => ['sausio', 'vasario', 'kovo', 'balandžio', 'gegužės', 'birželio', 'liepos', 'rugpjūčio', 'rugsėjo', 'spalio', 'lapkričio', 'gruodžio'], 'months_standalone' => ['sausis', 'vasaris', 'kovas', 'balandis', 'gegužė', 'birželis', 'liepa', 'rugpjūtis', 'rugsėjis', 'spalis', 'lapkritis', 'gruodis'], 'months_regexp' => '/(L{2,4}|D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?)/', 'months_short' => ['sau', 'vas', 'kov', 'bal', 'geg', 'bir', 'lie', 'rgp', 'rgs', 'spa', 'lap', 'gru'], 'weekdays' => ['sekmadienį', 'pirmadienį', 'antradienį', 'trečiadienį', 'ketvirtadienį', 'penktadienį', 'šeštadienį'], 'weekdays_standalone' => ['sekmadienis', 'pirmadienis', 'antradienis', 'trečiadienis', 'ketvirtadienis', 'penktadienis', 'šeštadienis'], 'weekdays_short' => ['sek', 'pir', 'ant', 'tre', 'ket', 'pen', 'šeš'], 'weekdays_min' => ['se', 'pi', 'an', 'tr', 'ke', 'pe', 'še'], 'list' => [', ', ' ir '], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-DD', 'LL' => 'MMMM DD, YYYY', 'LLL' => 'DD MMM HH:mm', 'LLLL' => 'MMMM DD, YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Šiandien] LT', 'nextDay' => '[Rytoj] LT', 'nextWeek' => 'dddd LT', 'lastDay' => '[Vakar] LT', 'lastWeek' => '[Paskutinį] dddd LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { switch ($number) { case 0: return '0-is'; case 3: return '3-ias'; default: return "$number-as"; } }, 'meridiem' => ['priešpiet', 'popiet'], ]; PKgt[kzNNCarbon/Lang/ms_MY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - Azri Jamil * - JD Isaacks */ return require __DIR__.'/ms.php'; PKgt[C2X))Carbon/Lang/qu.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/es_UY.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM, YYYY HH:mm', ], 'first_day_of_week' => 0, ]); PKgt[w  Carbon/Lang/fr_MR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd D MMMM YYYY h:mm a', ], ]); PKgt[4D ooCarbon/Lang/bg.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - Serhan Apaydın * - JD Isaacks * - Glavić */ use Carbon\CarbonInterface; return [ 'year' => ':count година|:count години', 'a_year' => 'година|:count години', 'y' => ':count година|:count години', 'month' => ':count месец|:count месеца', 'a_month' => 'месец|:count месеца', 'm' => ':count месец|:count месеца', 'week' => ':count седмица|:count седмици', 'a_week' => 'седмица|:count седмици', 'w' => ':count седмица|:count седмици', 'day' => ':count ден|:count дни', 'a_day' => 'ден|:count дни', 'd' => ':count ден|:count дни', 'hour' => ':count час|:count часа', 'a_hour' => 'час|:count часа', 'h' => ':count час|:count часа', 'minute' => ':count минута|:count минути', 'a_minute' => 'минута|:count минути', 'min' => ':count минута|:count минути', 'second' => ':count секунда|:count секунди', 'a_second' => 'няколко секунди|:count секунди', 's' => ':count секунда|:count секунди', 'ago' => 'преди :time', 'from_now' => 'след :time', 'after' => 'след :time', 'before' => 'преди :time', 'diff_now' => 'сега', 'diff_today' => 'Днес', 'diff_today_regexp' => 'Днес(?:\\s+в)?', 'diff_yesterday' => 'вчера', 'diff_yesterday_regexp' => 'Вчера(?:\\s+в)?', 'diff_tomorrow' => 'утре', 'diff_tomorrow_regexp' => 'Утре(?:\\s+в)?', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'D.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY H:mm', 'LLLL' => 'dddd, D MMMM YYYY H:mm', ], 'calendar' => [ 'sameDay' => '[Днес в] LT', 'nextDay' => '[Утре в] LT', 'nextWeek' => 'dddd [в] LT', 'lastDay' => '[Вчера в] LT', 'lastWeek' => function (CarbonInterface $current) { switch ($current->dayOfWeek) { case 0: case 3: case 6: return '[В изминалата] dddd [в] LT'; default: return '[В изминалия] dddd [в] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => function ($number) { $lastDigit = $number % 10; $last2Digits = $number % 100; if ($number === 0) { return "$number-ев"; } if ($last2Digits === 0) { return "$number-ен"; } if ($last2Digits > 10 && $last2Digits < 20) { return "$number-ти"; } if ($lastDigit === 1) { return "$number-ви"; } if ($lastDigit === 2) { return "$number-ри"; } if ($lastDigit === 7 || $lastDigit === 8) { return "$number-ми"; } return "$number-ти"; }, 'months' => ['януари', 'февруари', 'март', 'април', 'май', 'юни', 'юли', 'август', 'септември', 'октомври', 'ноември', 'декември'], 'months_short' => ['яну', 'фев', 'мар', 'апр', 'май', 'юни', 'юли', 'авг', 'сеп', 'окт', 'ное', 'дек'], 'weekdays' => ['неделя', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота'], 'weekdays_short' => ['нед', 'пон', 'вто', 'сря', 'чет', 'пет', 'съб'], 'weekdays_min' => ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' и '], 'meridiem' => ['преди обяд', 'следобед'], ]; PKgt[pGGCarbon/Lang/en_GY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[+v0%  Carbon/Lang/br_FR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/br.php'; PKgt[K}OOCarbon/Lang/nds.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/nds_DE.php'; PKgt[L-xVOOCarbon/Lang/shn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/shn_MM.php'; PKgt[Carbon/Lang/nan_TW@latin.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Arne Goetje arne@canonical.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY-MM-DD', ], 'months' => ['1goe̍h', '2goe̍h', '3goe̍h', '4goe̍h', '5goe̍h', '6goe̍h', '7goe̍h', '8goe̍h', '9goe̍h', '10goe̍h', '11goe̍h', '12goe̍h'], 'months_short' => ['1g', '2g', '3g', '4g', '5g', '6g', '7g', '8g', '9g', '10g', '11g', '12g'], 'weekdays' => ['lé-pài-ji̍t', 'pài-it', 'pài-jī', 'pài-saⁿ', 'pài-sì', 'pài-gō͘', 'pài-la̍k'], 'weekdays_short' => ['lp', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6'], 'weekdays_min' => ['lp', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['téng-po͘', 'ē-po͘'], ]); PKgt[ԴCarbon/Lang/ast.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Jordi Mallach jordi@gnu.org * - Adolfo Jayme-Barrientos (fitojb) */ return array_replace_recursive(require __DIR__.'/es.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['de xineru', 'de febreru', 'de marzu', 'd’abril', 'de mayu', 'de xunu', 'de xunetu', 'd’agostu', 'de setiembre', 'd’ochobre', 'de payares', 'd’avientu'], 'months_short' => ['xin', 'feb', 'mar', 'abr', 'may', 'xun', 'xnt', 'ago', 'set', 'och', 'pay', 'avi'], 'weekdays' => ['domingu', 'llunes', 'martes', 'miércoles', 'xueves', 'vienres', 'sábadu'], 'weekdays_short' => ['dom', 'llu', 'mar', 'mié', 'xue', 'vie', 'sáb'], 'weekdays_min' => ['dom', 'llu', 'mar', 'mié', 'xue', 'vie', 'sáb'], 'year' => ':count añu|:count años', 'y' => ':count añu|:count años', 'a_year' => 'un añu|:count años', 'month' => ':count mes', 'm' => ':count mes', 'a_month' => 'un mes|:count mes', 'week' => ':count selmana|:count selmanes', 'w' => ':count selmana|:count selmanes', 'a_week' => 'una selmana|:count selmanes', 'day' => ':count día|:count díes', 'd' => ':count día|:count díes', 'a_day' => 'un día|:count díes', 'hour' => ':count hora|:count hores', 'h' => ':count hora|:count hores', 'a_hour' => 'una hora|:count hores', 'minute' => ':count minutu|:count minutos', 'min' => ':count minutu|:count minutos', 'a_minute' => 'un minutu|:count minutos', 'second' => ':count segundu|:count segundos', 's' => ':count segundu|:count segundos', 'a_second' => 'un segundu|:count segundos', 'ago' => 'hai :time', 'from_now' => 'en :time', 'after' => ':time dempués', 'before' => ':time enantes', ]); PKgt[#!!Carbon/Lang/ckb.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Swara Mohammed */ $months = [ 'ڕێبەندان', 'ڕەشەمە', 'نەورۆز', 'گوڵان', 'جۆزەردان', 'پوشپەڕ', 'گەلاوێژ', 'خەرمانان', 'ڕەزبەر', 'گەڵاڕێزان', 'سەرماوەرز', 'بەفرانبار', ]; return [ 'year' => implode('|', ['{0}:count ساڵێک', '{1}ساڵێک', '{2}دوو ساڵ', ']2,11[:count ساڵ', ']10,Inf[:count ساڵ']), 'a_year' => implode('|', ['{0}:count ساڵێک', '{1}ساڵێک', '{2}دوو ساڵ', ']2,11[:count ساڵ', ']10,Inf[:count ساڵ']), 'month' => implode('|', ['{0}:count مانگێک', '{1}مانگێک', '{2}دوو مانگ', ']2,11[:count مانگ', ']10,Inf[:count مانگ']), 'a_month' => implode('|', ['{0}:count مانگێک', '{1}مانگێک', '{2}دوو مانگ', ']2,11[:count مانگ', ']10,Inf[:count مانگ']), 'week' => implode('|', ['{0}:count هەفتەیەک', '{1}هەفتەیەک', '{2}دوو هەفتە', ']2,11[:count هەفتە', ']10,Inf[:count هەفتە']), 'a_week' => implode('|', ['{0}:count هەفتەیەک', '{1}هەفتەیەک', '{2}دوو هەفتە', ']2,11[:count هەفتە', ']10,Inf[:count هەفتە']), 'day' => implode('|', ['{0}:count ڕۆژێک', '{1}ڕۆژێک', '{2}دوو ڕۆژ', ']2,11[:count ڕۆژ', ']10,Inf[:count ڕۆژ']), 'a_day' => implode('|', ['{0}:count ڕۆژێک', '{1}ڕۆژێک', '{2}دوو ڕۆژ', ']2,11[:count ڕۆژ', ']10,Inf[:count ڕۆژ']), 'hour' => implode('|', ['{0}:count کاتژمێرێک', '{1}کاتژمێرێک', '{2}دوو کاتژمێر', ']2,11[:count کاتژمێر', ']10,Inf[:count کاتژمێر']), 'a_hour' => implode('|', ['{0}:count کاتژمێرێک', '{1}کاتژمێرێک', '{2}دوو کاتژمێر', ']2,11[:count کاتژمێر', ']10,Inf[:count کاتژمێر']), 'minute' => implode('|', ['{0}:count خولەکێک', '{1}خولەکێک', '{2}دوو خولەک', ']2,11[:count خولەک', ']10,Inf[:count خولەک']), 'a_minute' => implode('|', ['{0}:count خولەکێک', '{1}خولەکێک', '{2}دوو خولەک', ']2,11[:count خولەک', ']10,Inf[:count خولەک']), 'second' => implode('|', ['{0}:count چرکەیەک', '{1}چرکەیەک', '{2}دوو چرکە', ']2,11[:count چرکە', ']10,Inf[:count چرکە']), 'a_second' => implode('|', ['{0}:count چرکەیەک', '{1}چرکەیەک', '{2}دوو چرکە', ']2,11[:count چرکە', ']10,Inf[:count چرکە']), 'ago' => 'پێش :time', 'from_now' => ':time لە ئێستاوە', 'after' => 'دوای :time', 'before' => 'پێش :time', 'diff_now' => 'ئێستا', 'diff_today' => 'ئەمڕۆ', 'diff_today_regexp' => 'ڕۆژ(?:\\s+لە)?(?:\\s+کاتژمێر)?', 'diff_yesterday' => 'دوێنێ', 'diff_yesterday_regexp' => 'دوێنێ(?:\\s+لە)?(?:\\s+کاتژمێر)?', 'diff_tomorrow' => 'سبەینێ', 'diff_tomorrow_regexp' => 'سبەینێ(?:\\s+لە)?(?:\\s+کاتژمێر)?', 'diff_before_yesterday' => 'پێش دوێنێ', 'diff_after_tomorrow' => 'دوای سبەینێ', 'period_recurrences' => implode('|', ['{0}جار', '{1}جار', '{2}:count دووجار', ']2,11[:count جار', ']10,Inf[:count جار']), 'period_interval' => 'هەموو :interval', 'period_start_date' => 'لە :date', 'period_end_date' => 'بۆ :date', 'months' => $months, 'months_short' => $months, 'weekdays' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], 'weekdays_short' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], 'weekdays_min' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], 'list' => ['، ', ' و '], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[ئەمڕۆ لە کاتژمێر] LT', 'nextDay' => '[سبەینێ لە کاتژمێر] LT', 'nextWeek' => 'dddd [لە کاتژمێر] LT', 'lastDay' => '[دوێنێ لە کاتژمێر] LT', 'lastWeek' => 'dddd [لە کاتژمێر] LT', 'sameElse' => 'L', ], 'meridiem' => ['پ.ن', 'د.ن'], 'weekend' => [5, 6], ]; PKgt[㪍q Carbon/Lang/lb.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - Tsutomu Kuroda * - dan-nl * - Simon Lelorrain (slelorrain) */ use Carbon\CarbonInterface; return [ 'year' => ':count Joer', 'y' => ':countJ', 'month' => ':count Mount|:count Méint', 'm' => ':countMo', 'week' => ':count Woch|:count Wochen', 'w' => ':countWo|:countWo', 'day' => ':count Dag|:count Deeg', 'd' => ':countD', 'hour' => ':count Stonn|:count Stonnen', 'h' => ':countSto', 'minute' => ':count Minutt|:count Minutten', 'min' => ':countM', 'second' => ':count Sekonn|:count Sekonnen', 's' => ':countSek', 'ago' => 'virun :time', 'from_now' => 'an :time', 'before' => ':time virdrun', 'after' => ':time duerno', 'diff_today' => 'Haut', 'diff_yesterday' => 'Gëschter', 'diff_yesterday_regexp' => 'Gëschter(?:\\s+um)?', 'diff_tomorrow' => 'Muer', 'diff_tomorrow_regexp' => 'Muer(?:\\s+um)?', 'diff_today_regexp' => 'Haut(?:\\s+um)?', 'formats' => [ 'LT' => 'H:mm [Auer]', 'LTS' => 'H:mm:ss [Auer]', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY H:mm [Auer]', 'LLLL' => 'dddd, D. MMMM YYYY H:mm [Auer]', ], 'calendar' => [ 'sameDay' => '[Haut um] LT', 'nextDay' => '[Muer um] LT', 'nextWeek' => 'dddd [um] LT', 'lastDay' => '[Gëschter um] LT', 'lastWeek' => function (CarbonInterface $date) { // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule switch ($date->dayOfWeek) { case 2: case 4: return '[Leschten] dddd [um] LT'; default: return '[Leschte] dddd [um] LT'; } }, 'sameElse' => 'L', ], 'months' => ['Januar', 'Februar', 'Mäerz', 'Abrëll', 'Mee', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], 'months_short' => ['Jan.', 'Febr.', 'Mrz.', 'Abr.', 'Mee', 'Jun.', 'Jul.', 'Aug.', 'Sept.', 'Okt.', 'Nov.', 'Dez.'], 'weekdays' => ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'], 'weekdays_short' => ['So.', 'Mé.', 'Dë.', 'Më.', 'Do.', 'Fr.', 'Sa.'], 'weekdays_min' => ['So', 'Mé', 'Dë', 'Më', 'Do', 'Fr', 'Sa'], 'ordinal' => ':number.', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' an '], 'meridiem' => ['moies', 'mëttes'], 'weekdays_short_standalone' => ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'], 'months_short_standalone' => ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], ]; PKgt[I  Carbon/Lang/lb_LU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/lb.php'; PKgt[ Carbon/Lang/bo_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/bo.php', [ 'meridiem' => ['སྔ་དྲོ་', 'ཕྱི་དྲོ་'], 'weekdays' => ['གཟའ་ཉི་མ་', 'གཟའ་ཟླ་བ་', 'གཟའ་མིག་དམར་', 'གཟའ་ལྷག་པ་', 'གཟའ་ཕུར་བུ་', 'གཟའ་པ་སངས་', 'གཟའ་སྤེན་པ་'], 'weekdays_short' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ་', 'པ་སངས་', 'སྤེན་པ་'], 'weekdays_min' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ་', 'པ་སངས་', 'སྤེན་པ་'], 'months' => ['ཟླ་བ་དང་པོ', 'ཟླ་བ་གཉིས་པ', 'ཟླ་བ་གསུམ་པ', 'ཟླ་བ་བཞི་པ', 'ཟླ་བ་ལྔ་པ', 'ཟླ་བ་དྲུག་པ', 'ཟླ་བ་བདུན་པ', 'ཟླ་བ་བརྒྱད་པ', 'ཟླ་བ་དགུ་པ', 'ཟླ་བ་བཅུ་པ', 'ཟླ་བ་བཅུ་གཅིག་པ', 'ཟླ་བ་བཅུ་གཉིས་པ'], 'months_short' => ['ཟླ་༡', 'ཟླ་༢', 'ཟླ་༣', 'ཟླ་༤', 'ཟླ་༥', 'ཟླ་༦', 'ཟླ་༧', 'ཟླ་༨', 'ཟླ་༩', 'ཟླ་༡༠', 'ཟླ་༡༡', 'ཟླ་༡༢'], 'months_standalone' => ['ཟླ་བ་དང་པོ་', 'ཟླ་བ་གཉིས་པ་', 'ཟླ་བ་གསུམ་པ་', 'ཟླ་བ་བཞི་པ་', 'ཟླ་བ་ལྔ་པ་', 'ཟླ་བ་དྲུག་པ་', 'ཟླ་བ་བདུན་པ་', 'ཟླ་བ་བརྒྱད་པ་', 'ཟླ་བ་དགུ་པ་', 'ཟླ་བ་བཅུ་པ་', 'ཟླ་བ་བཅུ་གཅིག་པ་', 'ཟླ་བ་བཅུ་གཉིས་པ་'], 'weekend' => [0, 0], 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'YYYY-MM-DD', 'LL' => 'YYYY ལོའི་MMMཚེས་D', 'LLL' => 'སྤྱི་ལོ་YYYY MMMMའི་ཚེས་D h:mm a', 'LLLL' => 'YYYY MMMMའི་ཚེས་D, dddd h:mm a', ], ]); PKgt[NNCarbon/Lang/xh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/xh_ZA.php'; PKgt[7șNNCarbon/Lang/ik.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ik_CA.php'; PKgt[&  Carbon/Lang/ky_KG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ky.php'; PKgt[}4OOCarbon/Lang/quz.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/quz_PE.php'; PKgt[pg  Carbon/Lang/kk_KZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/kk.php'; PKgt[?J& Carbon/Lang/sr_Latn_ME.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Glavić * - Milos Sakovic */ use Carbon\CarbonInterface; use Symfony\Component\Translation\PluralizationRules; // @codeCoverageIgnoreStart if (class_exists(PluralizationRules::class)) { PluralizationRules::set(static function ($number) { return PluralizationRules::get($number, 'sr'); }, 'sr_Latn_ME'); } // @codeCoverageIgnoreEnd return array_replace_recursive(require __DIR__.'/sr.php', [ 'month' => ':count mjesec|:count mjeseca|:count mjeseci', 'week' => ':count nedjelja|:count nedjelje|:count nedjelja', 'second' => ':count sekund|:count sekunde|:count sekundi', 'ago' => 'prije :time', 'from_now' => 'za :time', 'after' => ':time nakon', 'before' => ':time prije', 'week_from_now' => ':count nedjelju|:count nedjelje|:count nedjelja', 'week_ago' => ':count nedjelju|:count nedjelje|:count nedjelja', 'second_ago' => ':count sekund|:count sekunde|:count sekundi', 'diff_tomorrow' => 'sjutra', 'calendar' => [ 'nextDay' => '[sjutra u] LT', 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[u nedjelju u] LT'; case 3: return '[u srijedu u] LT'; case 6: return '[u subotu u] LT'; default: return '[u] dddd [u] LT'; } }, 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[prošle nedjelje u] LT'; case 1: return '[prošle nedjelje u] LT'; case 2: return '[prošlog utorka u] LT'; case 3: return '[prošle srijede u] LT'; case 4: return '[prošlog četvrtka u] LT'; case 5: return '[prošlog petka u] LT'; default: return '[prošle subote u] LT'; } }, ], 'weekdays' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], ]); PKgt[d Z  Carbon/Lang/si_LK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/si.php'; PKgt[%..Carbon/Lang/zh_SG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/zh.php', [ 'formats' => [ 'L' => 'YYYY年MM月DD日', ], 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], 'months_short' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], 'day_of_first_week_of_year' => 1, ]); PKgt[Nn  Carbon/Lang/ro_RO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ro.php'; PKgt[wjOOCarbon/Lang/az.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - Kunal Marwaha * - François B * - JD Isaacks * - Orxan * - Şəhriyar İmanov * - Baran Şengül */ return [ 'year' => ':count il', 'a_year' => '{1}bir il|]1,Inf[:count il', 'y' => ':count il', 'month' => ':count ay', 'a_month' => '{1}bir ay|]1,Inf[:count ay', 'm' => ':count ay', 'week' => ':count həftə', 'a_week' => '{1}bir həftə|]1,Inf[:count həftə', 'w' => ':count h.', 'day' => ':count gün', 'a_day' => '{1}bir gün|]1,Inf[:count gün', 'd' => ':count g.', 'hour' => ':count saat', 'a_hour' => '{1}bir saat|]1,Inf[:count saat', 'h' => ':count saat', 'minute' => ':count d.', 'a_minute' => '{1}bir dəqiqə|]1,Inf[:count dəqiqə', 'min' => ':count dəqiqə', 'second' => ':count san.', 'a_second' => '{1}birneçə saniyə|]1,Inf[:count saniyə', 's' => ':count saniyə', 'ago' => ':time əvvəl', 'from_now' => ':time sonra', 'after' => ':time sonra', 'before' => ':time əvvəl', 'diff_now' => 'indi', 'diff_today' => 'bugün', 'diff_today_regexp' => 'bugün(?:\\s+saat)?', 'diff_yesterday' => 'dünən', 'diff_tomorrow' => 'sabah', 'diff_tomorrow_regexp' => 'sabah(?:\\s+saat)?', 'diff_before_yesterday' => 'srağagün', 'diff_after_tomorrow' => 'birisi gün', 'period_recurrences' => ':count dəfədən bir', 'period_interval' => 'hər :interval', 'period_start_date' => ':date tarixindən başlayaraq', 'period_end_date' => ':date tarixinədək', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[bugün saat] LT', 'nextDay' => '[sabah saat] LT', 'nextWeek' => '[gələn həftə] dddd [saat] LT', 'lastDay' => '[dünən] LT', 'lastWeek' => '[keçən həftə] dddd [saat] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { if ($number === 0) { // special case for zero return "$number-ıncı"; } static $suffixes = [ 1 => '-inci', 5 => '-inci', 8 => '-inci', 70 => '-inci', 80 => '-inci', 2 => '-nci', 7 => '-nci', 20 => '-nci', 50 => '-nci', 3 => '-üncü', 4 => '-üncü', 100 => '-üncü', 6 => '-ncı', 9 => '-uncu', 10 => '-uncu', 30 => '-uncu', 60 => '-ıncı', 90 => '-ıncı', ]; $lastDigit = $number % 10; return $number.($suffixes[$lastDigit] ?? $suffixes[$number % 100 - $lastDigit] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); }, 'meridiem' => function ($hour) { if ($hour < 4) { return 'gecə'; } if ($hour < 12) { return 'səhər'; } if ($hour < 17) { return 'gündüz'; } return 'axşam'; }, 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], 'months_short' => ['yan', 'fev', 'mar', 'apr', 'may', 'iyn', 'iyl', 'avq', 'sen', 'okt', 'noy', 'dek'], 'months_standalone' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'İyun', 'İyul', 'Avqust', 'Sentyabr', 'Oktyabr', 'Noyabr', 'Dekabr'], 'weekdays' => ['bazar', 'bazar ertəsi', 'çərşənbə axşamı', 'çərşənbə', 'cümə axşamı', 'cümə', 'şənbə'], 'weekdays_short' => ['baz', 'bze', 'çax', 'çər', 'cax', 'cüm', 'şən'], 'weekdays_min' => ['bz', 'be', 'ça', 'çə', 'ca', 'cü', 'şə'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' və '], ]; PKgt[pGGCarbon/Lang/en_LS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[Carbon/Lang/el.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Alessandro Di Felice * - François B * - Tim Fish * - Gabriel Monteagudo * - JD Isaacks * - yiannisdesp * - Ilias Kasmeridis (iliaskasm) */ use Carbon\CarbonInterface; return [ 'year' => ':count χρόνος|:count χρόνια', 'a_year' => 'ένας χρόνος|:count χρόνια', 'y' => ':count χρ.', 'month' => ':count μήνας|:count μήνες', 'a_month' => 'ένας μήνας|:count μήνες', 'm' => ':count μήν.', 'week' => ':count εβδομάδα|:count εβδομάδες', 'a_week' => 'μια εβδομάδα|:count εβδομάδες', 'w' => ':count εβδ.', 'day' => ':count μέρα|:count μέρες', 'a_day' => 'μία μέρα|:count μέρες', 'd' => ':count μέρ.', 'hour' => ':count ώρα|:count ώρες', 'a_hour' => 'μία ώρα|:count ώρες', 'h' => ':count ώρα|:count ώρες', 'minute' => ':count λεπτό|:count λεπτά', 'a_minute' => 'ένα λεπτό|:count λεπτά', 'min' => ':count λεπ.', 'second' => ':count δευτερόλεπτο|:count δευτερόλεπτα', 'a_second' => 'λίγα δευτερόλεπτα|:count δευτερόλεπτα', 's' => ':count δευ.', 'ago' => 'πριν :time', 'from_now' => 'σε :time', 'after' => ':time μετά', 'before' => ':time πριν', 'diff_now' => 'τώρα', 'diff_today' => 'Σήμερα', 'diff_today_regexp' => 'Σήμερα(?:\\s+{})?', 'diff_yesterday' => 'χθες', 'diff_yesterday_regexp' => 'Χθες(?:\\s+{})?', 'diff_tomorrow' => 'αύριο', 'diff_tomorrow_regexp' => 'Αύριο(?:\\s+{})?', 'formats' => [ 'LT' => 'h:mm A', 'LTS' => 'h:mm:ss A', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY h:mm A', 'LLLL' => 'dddd, D MMMM YYYY h:mm A', ], 'calendar' => [ 'sameDay' => '[Σήμερα {}] LT', 'nextDay' => '[Αύριο {}] LT', 'nextWeek' => 'dddd [{}] LT', 'lastDay' => '[Χθες {}] LT', 'lastWeek' => function (CarbonInterface $current) { switch ($current->dayOfWeek) { case 6: return '[το προηγούμενο] dddd [{}] LT'; default: return '[την προηγούμενη] dddd [{}] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => ':numberη', 'meridiem' => ['ΠΜ', 'ΜΜ', 'πμ', 'μμ'], 'months' => ['Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου'], 'months_standalone' => ['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'], 'months_regexp' => '/(D[oD]?[\s,]+MMMM|L{2,4}|l{2,4})/', 'months_short' => ['Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ'], 'weekdays' => ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'], 'weekdays_short' => ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'], 'weekdays_min' => ['Κυ', 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σα'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' και '], ]; PKgt[pGGCarbon/Lang/en_150.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[ fCarbon/Lang/luo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['OD', 'OT'], 'weekdays' => ['Jumapil', 'Wuok Tich', 'Tich Ariyo', 'Tich Adek', 'Tich Ang’wen', 'Tich Abich', 'Ngeso'], 'weekdays_short' => ['JMP', 'WUT', 'TAR', 'TAD', 'TAN', 'TAB', 'NGS'], 'weekdays_min' => ['JMP', 'WUT', 'TAR', 'TAD', 'TAN', 'TAB', 'NGS'], 'months' => ['Dwe mar Achiel', 'Dwe mar Ariyo', 'Dwe mar Adek', 'Dwe mar Ang’wen', 'Dwe mar Abich', 'Dwe mar Auchiel', 'Dwe mar Abiriyo', 'Dwe mar Aboro', 'Dwe mar Ochiko', 'Dwe mar Apar', 'Dwe mar gi achiel', 'Dwe mar Apar gi ariyo'], 'months_short' => ['DAC', 'DAR', 'DAD', 'DAN', 'DAH', 'DAU', 'DAO', 'DAB', 'DOC', 'DAP', 'DGI', 'DAG'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'year' => 'higni :count', 'y' => 'higni :count', 'a_year' => ':higni :count', 'month' => 'dweche :count', 'm' => 'dweche :count', 'a_month' => 'dweche :count', 'week' => 'jumbe :count', 'w' => 'jumbe :count', 'a_week' => 'jumbe :count', 'day' => 'ndalo :count', 'd' => 'ndalo :count', 'a_day' => 'ndalo :count', 'hour' => 'seche :count', 'h' => 'seche :count', 'a_hour' => 'seche :count', 'minute' => 'dakika :count', 'min' => 'dakika :count', 'a_minute' => 'dakika :count', 'second' => 'nus dakika :count', 's' => 'nus dakika :count', 'a_second' => 'nus dakika :count', ]); PKgt[*%*%Carbon/Lang/uk.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Carbon\CarbonInterface; $processHoursFunction = function (CarbonInterface $date, string $format) { return $format.'о'.($date->hour === 11 ? 'б' : '').'] LT'; }; /* * Authors: * - Kunal Marwaha * - Josh Soref * - François B * - Tim Fish * - Serhan Apaydın * - Max Mykhailenko * - JD Isaacks * - Max Kovpak * - AucT * - Philippe Vaucher * - Ilya Shaplyko * - Vadym Ievsieiev * - Denys Kurets * - Igor Kasyanchuk * - Tsutomu Kuroda * - tjku * - Max Melentiev * - Oleh * - epaminond * - Juanito Fatas * - Vitalii Khustochka * - Akira Matsuda * - Christopher Dell * - Enrique Vidal * - Simone Carletti * - Aaron Patterson * - Andriy Tyurnikov * - Nicolás Hock Isaza * - Iwakura Taro * - Andrii Ponomarov * - alecrabbit * - vystepanenko * - AlexWalkerson * - Andre Havryliuk (Andrend) * - Max Datsenko (datsenko-md) */ return [ 'year' => ':count рік|:count роки|:count років', 'y' => ':countр', 'a_year' => '{1}рік|:count рік|:count роки|:count років', 'month' => ':count місяць|:count місяці|:count місяців', 'm' => ':countм', 'a_month' => '{1}місяць|:count місяць|:count місяці|:count місяців', 'week' => ':count тиждень|:count тижні|:count тижнів', 'w' => ':countт', 'a_week' => '{1}тиждень|:count тиждень|:count тижні|:count тижнів', 'day' => ':count день|:count дні|:count днів', 'd' => ':countд', 'a_day' => '{1}день|:count день|:count дні|:count днів', 'hour' => ':count година|:count години|:count годин', 'h' => ':countг', 'a_hour' => '{1}година|:count година|:count години|:count годин', 'minute' => ':count хвилина|:count хвилини|:count хвилин', 'min' => ':countхв', 'a_minute' => '{1}хвилина|:count хвилина|:count хвилини|:count хвилин', 'second' => ':count секунда|:count секунди|:count секунд', 's' => ':countсек', 'a_second' => '{1}декілька секунд|:count секунда|:count секунди|:count секунд', 'hour_ago' => ':count годину|:count години|:count годин', 'a_hour_ago' => '{1}годину|:count годину|:count години|:count годин', 'minute_ago' => ':count хвилину|:count хвилини|:count хвилин', 'a_minute_ago' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', 'second_ago' => ':count секунду|:count секунди|:count секунд', 'a_second_ago' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', 'hour_from_now' => ':count годину|:count години|:count годин', 'a_hour_from_now' => '{1}годину|:count годину|:count години|:count годин', 'minute_from_now' => ':count хвилину|:count хвилини|:count хвилин', 'a_minute_from_now' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', 'second_from_now' => ':count секунду|:count секунди|:count секунд', 'a_second_from_now' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', 'hour_after' => ':count годину|:count години|:count годин', 'a_hour_after' => '{1}годину|:count годину|:count години|:count годин', 'minute_after' => ':count хвилину|:count хвилини|:count хвилин', 'a_minute_after' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', 'second_after' => ':count секунду|:count секунди|:count секунд', 'a_second_after' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', 'hour_before' => ':count годину|:count години|:count годин', 'a_hour_before' => '{1}годину|:count годину|:count години|:count годин', 'minute_before' => ':count хвилину|:count хвилини|:count хвилин', 'a_minute_before' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', 'second_before' => ':count секунду|:count секунди|:count секунд', 'a_second_before' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', 'ago' => ':time тому', 'from_now' => 'за :time', 'after' => ':time після', 'before' => ':time до', 'diff_now' => 'щойно', 'diff_today' => 'Сьогодні', 'diff_today_regexp' => 'Сьогодні(?:\\s+о)?', 'diff_yesterday' => 'вчора', 'diff_yesterday_regexp' => 'Вчора(?:\\s+о)?', 'diff_tomorrow' => 'завтра', 'diff_tomorrow_regexp' => 'Завтра(?:\\s+о)?', 'diff_before_yesterday' => 'позавчора', 'diff_after_tomorrow' => 'післязавтра', 'period_recurrences' => 'один раз|:count рази|:count разів', 'period_interval' => 'кожні :interval', 'period_start_date' => 'з :date', 'period_end_date' => 'до :date', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, HH:mm', 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', ], 'calendar' => [ 'sameDay' => function (CarbonInterface $date) use ($processHoursFunction) { return $processHoursFunction($date, '[Сьогодні '); }, 'nextDay' => function (CarbonInterface $date) use ($processHoursFunction) { return $processHoursFunction($date, '[Завтра '); }, 'nextWeek' => function (CarbonInterface $date) use ($processHoursFunction) { return $processHoursFunction($date, '[У] dddd ['); }, 'lastDay' => function (CarbonInterface $date) use ($processHoursFunction) { return $processHoursFunction($date, '[Вчора '); }, 'lastWeek' => function (CarbonInterface $date) use ($processHoursFunction) { switch ($date->dayOfWeek) { case 0: case 3: case 5: case 6: return $processHoursFunction($date, '[Минулої] dddd ['); default: return $processHoursFunction($date, '[Минулого] dddd ['); } }, 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { switch ($period) { case 'M': case 'd': case 'DDD': case 'w': case 'W': return $number.'-й'; case 'D': return $number.'-го'; default: return $number; } }, 'meridiem' => function ($hour) { if ($hour < 4) { return 'ночі'; } if ($hour < 12) { return 'ранку'; } if ($hour < 17) { return 'дня'; } return 'вечора'; }, 'months' => ['січня', 'лютого', 'березня', 'квітня', 'травня', 'червня', 'липня', 'серпня', 'вересня', 'жовтня', 'листопада', 'грудня'], 'months_standalone' => ['січень', 'лютий', 'березень', 'квітень', 'травень', 'червень', 'липень', 'серпень', 'вересень', 'жовтень', 'листопад', 'грудень'], 'months_short' => ['січ', 'лют', 'бер', 'кві', 'тра', 'чер', 'лип', 'сер', 'вер', 'жов', 'лис', 'гру'], 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', 'weekdays' => function (CarbonInterface $date, $format, $index) { static $words = [ 'nominative' => ['неділя', 'понеділок', 'вівторок', 'середа', 'четвер', 'п’ятниця', 'субота'], 'accusative' => ['неділю', 'понеділок', 'вівторок', 'середу', 'четвер', 'п’ятницю', 'суботу'], 'genitive' => ['неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниці', 'суботи'], ]; $format = $format ?? ''; $nounCase = preg_match('/(\[(В|в|У|у)\])\s+dddd/u', $format) ? 'accusative' : ( preg_match('/\[?(?:минулої|наступної)?\s*\]\s+dddd/u', $format) ? 'genitive' : 'nominative' ); return $words[$nounCase][$index] ?? null; }, 'weekdays_short' => ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], 'weekdays_min' => ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' i '], ]; PKgt[ !R  Carbon/Lang/ss_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ss.php'; PKgt[ mNNCarbon/Lang/st.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/st_ZA.php'; PKgt[x$Carbon/Lang/ee_TG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ee.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'LLL' => 'HH:mm MMMM D [lia] YYYY', 'LLLL' => 'HH:mm dddd, MMMM D [lia] YYYY', ], ]); PKgt[eNNCarbon/Lang/ve.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ve_ZA.php'; PKgt[BVC C Carbon/Lang/gl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Fidel Pita * - JD Isaacks * - Diego Vilariño * - Sebastian Thierer */ use Carbon\CarbonInterface; return [ 'year' => ':count ano|:count anos', 'a_year' => 'un ano|:count anos', 'y' => ':count a.', 'month' => ':count mes|:count meses', 'a_month' => 'un mes|:count meses', 'm' => ':count mes.', 'week' => ':count semana|:count semanas', 'a_week' => 'unha semana|:count semanas', 'w' => ':count sem.', 'day' => ':count día|:count días', 'a_day' => 'un día|:count días', 'd' => ':count d.', 'hour' => ':count hora|:count horas', 'a_hour' => 'unha hora|:count horas', 'h' => ':count h.', 'minute' => ':count minuto|:count minutos', 'a_minute' => 'un minuto|:count minutos', 'min' => ':count min.', 'second' => ':count segundo|:count segundos', 'a_second' => 'uns segundos|:count segundos', 's' => ':count seg.', 'ago' => 'hai :time', 'from_now' => function ($time) { if (str_starts_with($time, 'un')) { return "n$time"; } return "en $time"; }, 'diff_now' => 'agora', 'diff_today' => 'hoxe', 'diff_today_regexp' => 'hoxe(?:\\s+ás)?', 'diff_yesterday' => 'onte', 'diff_yesterday_regexp' => 'onte(?:\\s+á)?', 'diff_tomorrow' => 'mañá', 'diff_tomorrow_regexp' => 'mañá(?:\\s+ás)?', 'after' => ':time despois', 'before' => ':time antes', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D [de] MMMM [de] YYYY', 'LLL' => 'D [de] MMMM [de] YYYY H:mm', 'LLLL' => 'dddd, D [de] MMMM [de] YYYY H:mm', ], 'calendar' => [ 'sameDay' => function (CarbonInterface $current) { return '[hoxe '.($current->hour !== 1 ? 'ás' : 'á').'] LT'; }, 'nextDay' => function (CarbonInterface $current) { return '[mañá '.($current->hour !== 1 ? 'ás' : 'á').'] LT'; }, 'nextWeek' => function (CarbonInterface $current) { return 'dddd ['.($current->hour !== 1 ? 'ás' : 'á').'] LT'; }, 'lastDay' => function (CarbonInterface $current) { return '[onte '.($current->hour !== 1 ? 'á' : 'a').'] LT'; }, 'lastWeek' => function (CarbonInterface $current) { return '[o] dddd [pasado '.($current->hour !== 1 ? 'ás' : 'á').'] LT'; }, 'sameElse' => 'L', ], 'ordinal' => ':numberº', 'months' => ['xaneiro', 'febreiro', 'marzo', 'abril', 'maio', 'xuño', 'xullo', 'agosto', 'setembro', 'outubro', 'novembro', 'decembro'], 'months_short' => ['xan.', 'feb.', 'mar.', 'abr.', 'mai.', 'xuñ.', 'xul.', 'ago.', 'set.', 'out.', 'nov.', 'dec.'], 'weekdays' => ['domingo', 'luns', 'martes', 'mércores', 'xoves', 'venres', 'sábado'], 'weekdays_short' => ['dom.', 'lun.', 'mar.', 'mér.', 'xov.', 'ven.', 'sáb.'], 'weekdays_min' => ['do', 'lu', 'ma', 'mé', 'xo', 've', 'sá'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' e '], 'meridiem' => ['a.m.', 'p.m.'], ]; PKgt[[ia  Carbon/Lang/pt_TL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/pt.php'; PKgt[M|UNNCarbon/Lang/tn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/tn_ZA.php'; PKgt[j\ Carbon/Lang/ks_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Red Hat, Pune bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'M/D/YY', ], 'months' => ['جنؤری', 'فرؤری', 'مارٕچ', 'اپریل', 'میٔ', 'جوٗن', 'جوٗلایی', 'اگست', 'ستمبر', 'اکتوٗبر', 'نومبر', 'دسمبر'], 'months_short' => ['جنؤری', 'فرؤری', 'مارٕچ', 'اپریل', 'میٔ', 'جوٗن', 'جوٗلایی', 'اگست', 'ستمبر', 'اکتوٗبر', 'نومبر', 'دسمبر'], 'weekdays' => ['آتهوار', 'ژءندروار', 'بوءںوار', 'بودهوار', 'برىسوار', 'جمع', 'بٹوار'], 'weekdays_short' => ['آتهوار', 'ژءنتروار', 'بوءںوار', 'بودهوار', 'برىسوار', 'جمع', 'بٹوار'], 'weekdays_min' => ['آتهوار', 'ژءنتروار', 'بوءںوار', 'بودهوار', 'برىسوار', 'جمع', 'بٹوار'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['دوپھربرونھ', 'دوپھرپتھ'], 'year' => ':count آب', // less reliable 'y' => ':count آب', // less reliable 'a_year' => ':count آب', // less reliable 'month' => ':count रान्', // less reliable 'm' => ':count रान्', // less reliable 'a_month' => ':count रान्', // less reliable 'week' => ':count آتھٕوار', // less reliable 'w' => ':count آتھٕوار', // less reliable 'a_week' => ':count آتھٕوار', // less reliable 'hour' => ':count سۄن', // less reliable 'h' => ':count سۄن', // less reliable 'a_hour' => ':count سۄن', // less reliable 'minute' => ':count فَن', // less reliable 'min' => ':count فَن', // less reliable 'a_minute' => ':count فَن', // less reliable 'second' => ':count दोʼयुम', // less reliable 's' => ':count दोʼयुम', // less reliable 'a_second' => ':count दोʼयुम', // less reliable ]); PKgt[=8Carbon/Lang/ar_DZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Authors: * - Josh Soref * - Noureddine LOUAHEDJ * - JD Isaacks * - Atef Ben Ali (atefBB) * - Mohamed Sabil (mohamedsabil83) */ $months = [ 'جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان', 'جويلية', 'أوت', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر', ]; return [ 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'ago' => 'منذ :time', 'from_now' => 'في :time', 'after' => 'بعد :time', 'before' => 'قبل :time', 'diff_now' => 'الآن', 'diff_today' => 'اليوم', 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', 'diff_yesterday' => 'أمس', 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', 'diff_tomorrow' => 'غداً', 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', 'diff_before_yesterday' => 'قبل الأمس', 'diff_after_tomorrow' => 'بعد غد', 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), 'period_interval' => 'كل :interval', 'period_start_date' => 'من :date', 'period_end_date' => 'إلى :date', 'months' => $months, 'months_short' => $months, 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], 'weekdays_min' => ['أح', 'إث', 'ثلا', 'أر', 'خم', 'جم', 'سب'], 'list' => ['، ', ' و '], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 4, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[اليوم على الساعة] LT', 'nextDay' => '[غدا على الساعة] LT', 'nextWeek' => 'dddd [على الساعة] LT', 'lastDay' => '[أمس على الساعة] LT', 'lastWeek' => 'dddd [على الساعة] LT', 'sameElse' => 'L', ], 'meridiem' => ['ص', 'م'], ]; PKgt[I I Carbon/Lang/as_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Amitakhya Phukan, Red Hat bug-glibc@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D-MM-YYYY', ], 'months' => ['জানুৱাৰী', 'ফেব্ৰুৱাৰী', 'মাৰ্চ', 'এপ্ৰিল', 'মে', 'জুন', 'জুলাই', 'আগষ্ট', 'ছেপ্তেম্বৰ', 'অক্টোবৰ', 'নৱেম্বৰ', 'ডিচেম্বৰ'], 'months_short' => ['জানু', 'ফেব্ৰু', 'মাৰ্চ', 'এপ্ৰিল', 'মে', 'জুন', 'জুলাই', 'আগ', 'সেপ্ট', 'অক্টো', 'নভে', 'ডিসে'], 'weekdays' => ['দেওবাৰ', 'সোমবাৰ', 'মঙ্গলবাৰ', 'বুধবাৰ', 'বৃহষ্পতিবাৰ', 'শুক্ৰবাৰ', 'শনিবাৰ'], 'weekdays_short' => ['দেও', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহষ্পতি', 'শুক্ৰ', 'শনি'], 'weekdays_min' => ['দেও', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহষ্পতি', 'শুক্ৰ', 'শনি'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['পূৰ্ব্বাহ্ন', 'অপৰাহ্ন'], 'year' => ':count বছৰ', 'y' => ':count বছৰ', 'a_year' => ':count বছৰ', 'month' => ':count মাহ', 'm' => ':count মাহ', 'a_month' => ':count মাহ', 'week' => ':count সপ্তাহ', 'w' => ':count সপ্তাহ', 'a_week' => ':count সপ্তাহ', 'day' => ':count বাৰ', 'd' => ':count বাৰ', 'a_day' => ':count বাৰ', 'hour' => ':count ঘণ্টা', 'h' => ':count ঘণ্টা', 'a_hour' => ':count ঘণ্টা', 'minute' => ':count মিনিট', 'min' => ':count মিনিট', 'a_minute' => ':count মিনিট', 'second' => ':count দ্বিতীয়', 's' => ':count দ্বিতীয়', 'a_second' => ':count দ্বিতীয়', ]); PKgt[>Carbon/Lang/yuw_PG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Information from native speakers Hannah Sarvasy nungon.localization@gmail.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['jenuari', 'febuari', 'mas', 'epril', 'mei', 'jun', 'julai', 'ögus', 'septemba', 'öktoba', 'nöwemba', 'diksemba'], 'months_short' => ['jen', 'feb', 'mas', 'epr', 'mei', 'jun', 'jul', 'ögu', 'sep', 'ökt', 'nöw', 'dis'], 'weekdays' => ['sönda', 'mönda', 'sinda', 'mitiwö', 'sogipbono', 'nenggo', 'söndanggie'], 'weekdays_short' => ['sön', 'mön', 'sin', 'mit', 'soi', 'nen', 'sab'], 'weekdays_min' => ['sön', 'mön', 'sin', 'mit', 'soi', 'nen', 'sab'], 'day_of_first_week_of_year' => 1, ]); PKgt[K:Carbon/Lang/sah_RU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Valery Timiriliyev Valery Timiriliyev timiriliyev@gmail.com */ return array_replace_recursive(require __DIR__.'/ru.php', [ 'formats' => [ 'L' => 'YYYY.MM.DD', ], 'months' => ['тохсунньу', 'олунньу', 'кулун тутар', 'муус устар', 'ыам ыйын', 'бэс ыйын', 'от ыйын', 'атырдьах ыйын', 'балаҕан ыйын', 'алтынньы', 'сэтинньи', 'ахсынньы'], 'months_short' => ['тохс', 'олун', 'кул', 'муус', 'ыам', 'бэс', 'от', 'атыр', 'бал', 'алт', 'сэт', 'ахс'], 'weekdays' => ['баскыһыанньа', 'бэнидиэнньик', 'оптуорунньук', 'сэрэдэ', 'чэппиэр', 'бээтинсэ', 'субуота'], 'weekdays_short' => ['бс', 'бн', 'оп', 'ср', 'чп', 'бт', 'сб'], 'weekdays_min' => ['бс', 'бн', 'оп', 'ср', 'чп', 'бт', 'сб'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[ՉNNCarbon/Lang/wo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/wo_SN.php'; PKgt[8 Carbon/Lang/ne.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - nootanghimire * - Josh Soref * - Nj Subedi * - JD Isaacks */ return [ 'year' => 'एक बर्ष|:count बर्ष', 'y' => ':count वर्ष', 'month' => 'एक महिना|:count महिना', 'm' => ':count महिना', 'week' => ':count हप्ता', 'w' => ':count हप्ता', 'day' => 'एक दिन|:count दिन', 'd' => ':count दिन', 'hour' => 'एक घण्टा|:count घण्टा', 'h' => ':count घण्टा', 'minute' => 'एक मिनेट|:count मिनेट', 'min' => ':count मिनेट', 'second' => 'केही क्षण|:count सेकेण्ड', 's' => ':count सेकेण्ड', 'ago' => ':time अगाडि', 'from_now' => ':timeमा', 'after' => ':time पछि', 'before' => ':time अघि', 'diff_now' => 'अहिले', 'diff_today' => 'आज', 'diff_yesterday' => 'हिजो', 'diff_tomorrow' => 'भोलि', 'formats' => [ 'LT' => 'Aको h:mm बजे', 'LTS' => 'Aको h:mm:ss बजे', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, Aको h:mm बजे', 'LLLL' => 'dddd, D MMMM YYYY, Aको h:mm बजे', ], 'calendar' => [ 'sameDay' => '[आज] LT', 'nextDay' => '[भोलि] LT', 'nextWeek' => '[आउँदो] dddd[,] LT', 'lastDay' => '[हिजो] LT', 'lastWeek' => '[गएको] dddd[,] LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 3) { return 'राति'; } if ($hour < 12) { return 'बिहान'; } if ($hour < 16) { return 'दिउँसो'; } if ($hour < 20) { return 'साँझ'; } return 'राति'; }, 'months' => ['जनवरी', 'फेब्रुवरी', 'मार्च', 'अप्रिल', 'मई', 'जुन', 'जुलाई', 'अगष्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'], 'months_short' => ['जन.', 'फेब्रु.', 'मार्च', 'अप्रि.', 'मई', 'जुन', 'जुलाई.', 'अग.', 'सेप्ट.', 'अक्टो.', 'नोभे.', 'डिसे.'], 'weekdays' => ['आइतबार', 'सोमबार', 'मङ्गलबार', 'बुधबार', 'बिहिबार', 'शुक्रबार', 'शनिबार'], 'weekdays_short' => ['आइत.', 'सोम.', 'मङ्गल.', 'बुध.', 'बिहि.', 'शुक्र.', 'शनि.'], 'weekdays_min' => ['आ.', 'सो.', 'मं.', 'बु.', 'बि.', 'शु.', 'श.'], 'list' => [', ', ' र '], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]; PKgt[ Carbon/Lang/hy.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - mhamlet */ return [ 'year' => ':count տարի', 'a_year' => 'տարի|:count տարի', 'y' => ':countտ', 'month' => ':count ամիս', 'a_month' => 'ամիս|:count ամիս', 'm' => ':countամ', 'week' => ':count շաբաթ', 'a_week' => 'շաբաթ|:count շաբաթ', 'w' => ':countշ', 'day' => ':count օր', 'a_day' => 'օր|:count օր', 'd' => ':countօր', 'hour' => ':count ժամ', 'a_hour' => 'ժամ|:count ժամ', 'h' => ':countժ', 'minute' => ':count րոպե', 'a_minute' => 'րոպե|:count րոպե', 'min' => ':countր', 'second' => ':count վայրկյան', 'a_second' => 'մի քանի վայրկյան|:count վայրկյան', 's' => ':countվրկ', 'ago' => ':time առաջ', 'from_now' => ':timeից', 'after' => ':time հետո', 'before' => ':time առաջ', 'diff_now' => 'հիմա', 'diff_today' => 'այսօր', 'diff_yesterday' => 'երեկ', 'diff_tomorrow' => 'վաղը', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY թ.', 'LLL' => 'D MMMM YYYY թ., HH:mm', 'LLLL' => 'dddd, D MMMM YYYY թ., HH:mm', ], 'calendar' => [ 'sameDay' => '[այսօր] LT', 'nextDay' => '[վաղը] LT', 'nextWeek' => 'dddd [օրը ժամը] LT', 'lastDay' => '[երեկ] LT', 'lastWeek' => '[անցած] dddd [օրը ժամը] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { switch ($period) { case 'DDD': case 'w': case 'W': case 'DDDo': return $number.($number === 1 ? '-ին' : '-րդ'); default: return $number; } }, 'meridiem' => function ($hour) { if ($hour < 4) { return 'գիշերվա'; } if ($hour < 12) { return 'առավոտվա'; } if ($hour < 17) { return 'ցերեկվա'; } return 'երեկոյան'; }, 'months' => ['հունվարի', 'փետրվարի', 'մարտի', 'ապրիլի', 'մայիսի', 'հունիսի', 'հուլիսի', 'օգոստոսի', 'սեպտեմբերի', 'հոկտեմբերի', 'նոյեմբերի', 'դեկտեմբերի'], 'months_standalone' => ['հունվար', 'փետրվար', 'մարտ', 'ապրիլ', 'մայիս', 'հունիս', 'հուլիս', 'օգոստոս', 'սեպտեմբեր', 'հոկտեմբեր', 'նոյեմբեր', 'դեկտեմբեր'], 'months_short' => ['հնվ', 'փտր', 'մրտ', 'ապր', 'մյս', 'հնս', 'հլս', 'օգս', 'սպտ', 'հկտ', 'նմբ', 'դկտ'], 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', 'weekdays' => ['կիրակի', 'երկուշաբթի', 'երեքշաբթի', 'չորեքշաբթի', 'հինգշաբթի', 'ուրբաթ', 'շաբաթ'], 'weekdays_short' => ['կրկ', 'երկ', 'երք', 'չրք', 'հնգ', 'ուրբ', 'շբթ'], 'weekdays_min' => ['կրկ', 'երկ', 'երք', 'չրք', 'հնգ', 'ուրբ', 'շբթ'], 'list' => [', ', ' եւ '], 'first_day_of_week' => 1, ]; PKgt[oP Carbon/Lang/uz_Latn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - Rasulbek * - Ilyosjon Kamoldinov (ilyosjon09) */ return [ 'year' => ':count yil', 'a_year' => '{1}bir yil|:count yil', 'y' => ':count y', 'month' => ':count oy', 'a_month' => '{1}bir oy|:count oy', 'm' => ':count o', 'week' => ':count hafta', 'a_week' => '{1}bir hafta|:count hafta', 'w' => ':count h', 'day' => ':count kun', 'a_day' => '{1}bir kun|:count kun', 'd' => ':count k', 'hour' => ':count soat', 'a_hour' => '{1}bir soat|:count soat', 'h' => ':count soat', 'minute' => ':count daqiqa', 'a_minute' => '{1}bir daqiqa|:count daqiqa', 'min' => ':count d', 'second' => ':count soniya', 'a_second' => '{1}soniya|:count soniya', 's' => ':count son.', 'ago' => ':time avval', 'from_now' => 'Yaqin :time ichida', 'after' => ':timedan keyin', 'before' => ':time oldin', 'diff_yesterday' => 'Kecha', 'diff_yesterday_regexp' => 'Kecha(?:\\s+soat)?', 'diff_today' => 'Bugun', 'diff_today_regexp' => 'Bugun(?:\\s+soat)?', 'diff_tomorrow' => 'Ertaga', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'D MMMM YYYY, dddd HH:mm', ], 'calendar' => [ 'sameDay' => '[Bugun soat] LT [da]', 'nextDay' => '[Ertaga] LT [da]', 'nextWeek' => 'dddd [kuni soat] LT [da]', 'lastDay' => '[Kecha soat] LT [da]', 'lastWeek' => '[O\'tgan] dddd [kuni soat] LT [da]', 'sameElse' => 'L', ], 'months' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'Iyun', 'Iyul', 'Avgust', 'Sentabr', 'Oktabr', 'Noyabr', 'Dekabr'], 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'Iyun', 'Iyul', 'Avg', 'Sen', 'Okt', 'Noy', 'Dek'], 'weekdays' => ['Yakshanba', 'Dushanba', 'Seshanba', 'Chorshanba', 'Payshanba', 'Juma', 'Shanba'], 'weekdays_short' => ['Yak', 'Dush', 'Sesh', 'Chor', 'Pay', 'Jum', 'Shan'], 'weekdays_min' => ['Ya', 'Du', 'Se', 'Cho', 'Pa', 'Ju', 'Sha'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' va '], 'meridiem' => ['TO', 'TK'], ]; PKgt[v55Carbon/Lang/sr_Cyrl_ME.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Glavić * - Milos Sakovic */ use Carbon\CarbonInterface; use Symfony\Component\Translation\PluralizationRules; // @codeCoverageIgnoreStart if (class_exists(PluralizationRules::class)) { PluralizationRules::set(static function ($number) { return PluralizationRules::get($number, 'sr'); }, 'sr_Cyrl_ME'); } // @codeCoverageIgnoreEnd return [ 'year' => ':count година|:count године|:count година', 'y' => ':count г.', 'month' => ':count мјесец|:count мјесеца|:count мјесеци', 'm' => ':count мј.', 'week' => ':count недјеља|:count недјеље|:count недјеља', 'w' => ':count нед.', 'day' => ':count дан|:count дана|:count дана', 'd' => ':count д.', 'hour' => ':count сат|:count сата|:count сати', 'h' => ':count ч.', 'minute' => ':count минут|:count минута|:count минута', 'min' => ':count мин.', 'second' => ':count секунд|:count секунде|:count секунди', 's' => ':count сек.', 'ago' => 'прије :time', 'from_now' => 'за :time', 'after' => ':time након', 'before' => ':time прије', 'year_from_now' => ':count годину|:count године|:count година', 'year_ago' => ':count годину|:count године|:count година', 'week_from_now' => ':count недјељу|:count недјеље|:count недјеља', 'week_ago' => ':count недјељу|:count недјеље|:count недјеља', 'diff_now' => 'управо сада', 'diff_today' => 'данас', 'diff_today_regexp' => 'данас(?:\\s+у)?', 'diff_yesterday' => 'јуче', 'diff_yesterday_regexp' => 'јуче(?:\\s+у)?', 'diff_tomorrow' => 'сутра', 'diff_tomorrow_regexp' => 'сутра(?:\\s+у)?', 'diff_before_yesterday' => 'прекјуче', 'diff_after_tomorrow' => 'прекосјутра', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY H:mm', 'LLLL' => 'dddd, D. MMMM YYYY H:mm', ], 'calendar' => [ 'sameDay' => '[данас у] LT', 'nextDay' => '[сутра у] LT', 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[у недељу у] LT'; case 3: return '[у среду у] LT'; case 6: return '[у суботу у] LT'; default: return '[у] dddd [у] LT'; } }, 'lastDay' => '[јуче у] LT', 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[прошле недеље у] LT'; case 1: return '[прошлог понедељка у] LT'; case 2: return '[прошлог уторка у] LT'; case 3: return '[прошле среде у] LT'; case 4: return '[прошлог четвртка у] LT'; case 5: return '[прошлог петка у] LT'; default: return '[прошле суботе у] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['јануар', 'фебруар', 'март', 'април', 'мај', 'јун', 'јул', 'август', 'септембар', 'октобар', 'новембар', 'децембар'], 'months_short' => ['јан.', 'феб.', 'мар.', 'апр.', 'мај', 'јун', 'јул', 'авг.', 'сеп.', 'окт.', 'нов.', 'дец.'], 'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'], 'weekdays_short' => ['нед.', 'пон.', 'уто.', 'сре.', 'чет.', 'пет.', 'суб.'], 'weekdays_min' => ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' и '], 'meridiem' => ['АМ', 'ПМ'], ]; PKgt[i?#Carbon/Lang/en_AG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'day_of_first_week_of_year' => 1, ]); PKgt[ۨrCarbon/Lang/dyo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Dimas', 'Teneŋ', 'Talata', 'Alarbay', 'Aramisay', 'Arjuma', 'Sibiti'], 'weekdays_short' => ['Dim', 'Ten', 'Tal', 'Ala', 'Ara', 'Arj', 'Sib'], 'weekdays_min' => ['Dim', 'Ten', 'Tal', 'Ala', 'Ara', 'Arj', 'Sib'], 'months' => ['Sanvie', 'Fébirie', 'Mars', 'Aburil', 'Mee', 'Sueŋ', 'Súuyee', 'Ut', 'Settembar', 'Oktobar', 'Novembar', 'Disambar'], 'months_short' => ['Sa', 'Fe', 'Ma', 'Ab', 'Me', 'Su', 'Sú', 'Ut', 'Se', 'Ok', 'No', 'De'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], ]); PKgt[+  Carbon/Lang/se_SE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/se.php'; PKgt[''x  Carbon/Lang/fr_BI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[Ӿ6Carbon/Lang/zh_Hans_SG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/zh_Hans.php'; PKgt[-  Carbon/Lang/ff_GN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ff.php'; PKgt[[)66Carbon/Lang/kde.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Muhi', 'Chilo'], 'weekdays' => ['Liduva lyapili', 'Liduva lyatatu', 'Liduva lyanchechi', 'Liduva lyannyano', 'Liduva lyannyano na linji', 'Liduva lyannyano na mavili', 'Liduva litandi'], 'weekdays_short' => ['Ll2', 'Ll3', 'Ll4', 'Ll5', 'Ll6', 'Ll7', 'Ll1'], 'weekdays_min' => ['Ll2', 'Ll3', 'Ll4', 'Ll5', 'Ll6', 'Ll7', 'Ll1'], 'months' => ['Mwedi Ntandi', 'Mwedi wa Pili', 'Mwedi wa Tatu', 'Mwedi wa Nchechi', 'Mwedi wa Nnyano', 'Mwedi wa Nnyano na Umo', 'Mwedi wa Nnyano na Mivili', 'Mwedi wa Nnyano na Mitatu', 'Mwedi wa Nnyano na Nchechi', 'Mwedi wa Nnyano na Nnyano', 'Mwedi wa Nnyano na Nnyano na U', 'Mwedi wa Nnyano na Nnyano na M'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[M  Carbon/Lang/tr_TR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/tr.php'; PKgt[8QsppCarbon/Lang/om.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation & Sagalee Oromoo Publishing Co. Inc. locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'dd-MMM-YYYY', 'LLL' => 'dd MMMM YYYY HH:mm', 'LLLL' => 'dddd, MMMM D, YYYY HH:mm', ], 'months' => ['Amajjii', 'Guraandhala', 'Bitooteessa', 'Elba', 'Caamsa', 'Waxabajjii', 'Adooleessa', 'Hagayya', 'Fuulbana', 'Onkololeessa', 'Sadaasa', 'Muddee'], 'months_short' => ['Ama', 'Gur', 'Bit', 'Elb', 'Cam', 'Wax', 'Ado', 'Hag', 'Ful', 'Onk', 'Sad', 'Mud'], 'weekdays' => ['Dilbata', 'Wiixata', 'Qibxata', 'Roobii', 'Kamiisa', 'Jimaata', 'Sanbata'], 'weekdays_short' => ['Dil', 'Wix', 'Qib', 'Rob', 'Kam', 'Jim', 'San'], 'weekdays_min' => ['Dil', 'Wix', 'Qib', 'Rob', 'Kam', 'Jim', 'San'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['WD', 'WB'], 'year' => 'wggoota :count', 'y' => 'wggoota :count', 'a_year' => 'wggoota :count', 'month' => 'ji’a :count', 'm' => 'ji’a :count', 'a_month' => 'ji’a :count', 'week' => 'torban :count', 'w' => 'torban :count', 'a_week' => 'torban :count', 'day' => 'guyyaa :count', 'd' => 'guyyaa :count', 'a_day' => 'guyyaa :count', 'hour' => 'saʼaatii :count', 'h' => 'saʼaatii :count', 'a_hour' => 'saʼaatii :count', 'minute' => 'daqiiqaa :count', 'min' => 'daqiiqaa :count', 'a_minute' => 'daqiiqaa :count', 'second' => 'sekoondii :count', 's' => 'sekoondii :count', 'a_second' => 'sekoondii :count', ]); PKgt[*痖Carbon/Lang/nso_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Janaware', 'Febereware', 'Matšhe', 'Aprele', 'Mei', 'June', 'Julae', 'Agostose', 'Setemere', 'Oktobere', 'Nofemere', 'Disemere'], 'months_short' => ['Jan', 'Feb', 'Mat', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Set', 'Okt', 'Nof', 'Dis'], 'weekdays' => ['LaMorena', 'Mošupologo', 'Labobedi', 'Laboraro', 'Labone', 'Labohlano', 'Mokibelo'], 'weekdays_short' => ['Son', 'Moš', 'Bed', 'Rar', 'Ne', 'Hla', 'Mok'], 'weekdays_min' => ['Son', 'Moš', 'Bed', 'Rar', 'Ne', 'Hla', 'Mok'], 'day_of_first_week_of_year' => 1, 'year' => ':count ngwaga', 'y' => ':count ngwaga', 'a_year' => ':count ngwaga', 'month' => ':count Kgwedi', 'm' => ':count Kgwedi', 'a_month' => ':count Kgwedi', 'week' => ':count Beke', 'w' => ':count Beke', 'a_week' => ':count Beke', 'day' => ':count Letšatši', 'd' => ':count Letšatši', 'a_day' => ':count Letšatši', 'hour' => ':count Iri', 'h' => ':count Iri', 'a_hour' => ':count Iri', 'minute' => ':count Motsotso', 'min' => ':count Motsotso', 'a_minute' => ':count Motsotso', 'second' => ':count motsotswana', 's' => ':count motsotswana', 'a_second' => ':count motsotswana', ]); PKgt[6Carbon/Lang/fr_CA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Dieter Sting * - François B * - Maxime VALY * - JD Isaacks */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'formats' => [ 'L' => 'YYYY-MM-DD', ], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[ Carbon/Lang/lo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - ryanhart2 */ return [ 'year' => ':count ປີ', 'y' => ':count ປີ', 'month' => ':count ເດືອນ', 'm' => ':count ດ. ', 'week' => ':count ອາທິດ', 'w' => ':count ອທ. ', 'day' => ':count ມື້', 'd' => ':count ມື້', 'hour' => ':count ຊົ່ວໂມງ', 'h' => ':count ຊມ. ', 'minute' => ':count ນາທີ', 'min' => ':count ນທ. ', 'second' => '{1}ບໍ່ເທົ່າໃດວິນາທີ|]1,Inf[:count ວິນາທີ', 's' => ':count ວິ. ', 'ago' => ':timeຜ່ານມາ', 'from_now' => 'ອີກ :time', 'diff_now' => 'ຕອນນີ້', 'diff_today' => 'ມື້ນີ້ເວລາ', 'diff_yesterday' => 'ມື້ວານນີ້ເວລາ', 'diff_tomorrow' => 'ມື້ອື່ນເວລາ', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'ວັນdddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[ມື້ນີ້ເວລາ] LT', 'nextDay' => '[ມື້ອື່ນເວລາ] LT', 'nextWeek' => '[ວັນ]dddd[ໜ້າເວລາ] LT', 'lastDay' => '[ມື້ວານນີ້ເວລາ] LT', 'lastWeek' => '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', 'sameElse' => 'L', ], 'ordinal' => 'ທີ່:number', 'meridiem' => ['ຕອນເຊົ້າ', 'ຕອນແລງ'], 'months' => ['ມັງກອນ', 'ກຸມພາ', 'ມີນາ', 'ເມສາ', 'ພຶດສະພາ', 'ມິຖຸນາ', 'ກໍລະກົດ', 'ສິງຫາ', 'ກັນຍາ', 'ຕຸລາ', 'ພະຈິກ', 'ທັນວາ'], 'months_short' => ['ມັງກອນ', 'ກຸມພາ', 'ມີນາ', 'ເມສາ', 'ພຶດສະພາ', 'ມິຖຸນາ', 'ກໍລະກົດ', 'ສິງຫາ', 'ກັນຍາ', 'ຕຸລາ', 'ພະຈິກ', 'ທັນວາ'], 'weekdays' => ['ອາທິດ', 'ຈັນ', 'ອັງຄານ', 'ພຸດ', 'ພະຫັດ', 'ສຸກ', 'ເສົາ'], 'weekdays_short' => ['ທິດ', 'ຈັນ', 'ອັງຄານ', 'ພຸດ', 'ພະຫັດ', 'ສຸກ', 'ເສົາ'], 'weekdays_min' => ['ທ', 'ຈ', 'ອຄ', 'ພ', 'ພຫ', 'ສກ', 'ສ'], 'list' => [', ', 'ແລະ '], ]; PKgt[Carbon/Lang/en_IE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Martin McWhorter * - François B * - Chris Cartlidge * - JD Isaacks */ return array_replace_recursive(require __DIR__.'/en.php', [ 'from_now' => 'in :time', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD-MM-YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[އ  Carbon/Lang/ml.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - JD Isaacks */ return [ 'year' => ':count വർഷം', 'a_year' => 'ഒരു വർഷം|:count വർഷം', 'month' => ':count മാസം', 'a_month' => 'ഒരു മാസം|:count മാസം', 'week' => ':count ആഴ്ച', 'a_week' => 'ഒരാഴ്ച|:count ആഴ്ച', 'day' => ':count ദിവസം', 'a_day' => 'ഒരു ദിവസം|:count ദിവസം', 'hour' => ':count മണിക്കൂർ', 'a_hour' => 'ഒരു മണിക്കൂർ|:count മണിക്കൂർ', 'minute' => ':count മിനിറ്റ്', 'a_minute' => 'ഒരു മിനിറ്റ്|:count മിനിറ്റ്', 'second' => ':count സെക്കൻഡ്', 'a_second' => 'അൽപ നിമിഷങ്ങൾ|:count സെക്കൻഡ്', 'ago' => ':time മുൻപ്', 'from_now' => ':time കഴിഞ്ഞ്', 'diff_now' => 'ഇപ്പോൾ', 'diff_today' => 'ഇന്ന്', 'diff_yesterday' => 'ഇന്നലെ', 'diff_tomorrow' => 'നാളെ', 'formats' => [ 'LT' => 'A h:mm -നു', 'LTS' => 'A h:mm:ss -നു', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, A h:mm -നു', 'LLLL' => 'dddd, D MMMM YYYY, A h:mm -നു', ], 'calendar' => [ 'sameDay' => '[ഇന്ന്] LT', 'nextDay' => '[നാളെ] LT', 'nextWeek' => 'dddd, LT', 'lastDay' => '[ഇന്നലെ] LT', 'lastWeek' => '[കഴിഞ്ഞ] dddd, LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 4) { return 'രാത്രി'; } if ($hour < 12) { return 'രാവിലെ'; } if ($hour < 17) { return 'ഉച്ച കഴിഞ്ഞ്'; } if ($hour < 20) { return 'വൈകുന്നേരം'; } return 'രാത്രി'; }, 'months' => ['ജനുവരി', 'ഫെബ്രുവരി', 'മാർച്ച്', 'ഏപ്രിൽ', 'മേയ്', 'ജൂൺ', 'ജൂലൈ', 'ഓഗസ്റ്റ്', 'സെപ്റ്റംബർ', 'ഒക്ടോബർ', 'നവംബർ', 'ഡിസംബർ'], 'months_short' => ['ജനു.', 'ഫെബ്രു.', 'മാർ.', 'ഏപ്രി.', 'മേയ്', 'ജൂൺ', 'ജൂലൈ.', 'ഓഗ.', 'സെപ്റ്റ.', 'ഒക്ടോ.', 'നവം.', 'ഡിസം.'], 'weekdays' => ['ഞായറാഴ്ച', 'തിങ്കളാഴ്ച', 'ചൊവ്വാഴ്ച', 'ബുധനാഴ്ച', 'വ്യാഴാഴ്ച', 'വെള്ളിയാഴ്ച', 'ശനിയാഴ്ച'], 'weekdays_short' => ['ഞായർ', 'തിങ്കൾ', 'ചൊവ്വ', 'ബുധൻ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'], 'weekdays_min' => ['ഞാ', 'തി', 'ചൊ', 'ബു', 'വ്യാ', 'വെ', 'ശ'], 'list' => ', ', 'weekend' => [0, 0], ]; PKgt[.`Carbon/Lang/dav.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Luma lwa K', 'luma lwa p'], 'weekdays' => ['Ituku ja jumwa', 'Kuramuka jimweri', 'Kuramuka kawi', 'Kuramuka kadadu', 'Kuramuka kana', 'Kuramuka kasanu', 'Kifula nguwo'], 'weekdays_short' => ['Jum', 'Jim', 'Kaw', 'Kad', 'Kan', 'Kas', 'Ngu'], 'weekdays_min' => ['Jum', 'Jim', 'Kaw', 'Kad', 'Kan', 'Kas', 'Ngu'], 'months' => ['Mori ghwa imbiri', 'Mori ghwa kawi', 'Mori ghwa kadadu', 'Mori ghwa kana', 'Mori ghwa kasanu', 'Mori ghwa karandadu', 'Mori ghwa mfungade', 'Mori ghwa wunyanya', 'Mori ghwa ikenda', 'Mori ghwa ikumi', 'Mori ghwa ikumi na imweri', 'Mori ghwa ikumi na iwi'], 'months_short' => ['Imb', 'Kaw', 'Kad', 'Kan', 'Kas', 'Kar', 'Mfu', 'Wun', 'Ike', 'Iku', 'Imw', 'Iwi'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[NNCarbon/Lang/ks.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ks_IN.php'; PKgt[@OOCarbon/Lang/hif.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/hif_FJ.php'; PKgt[&$Carbon/Lang/en_AU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kunal Marwaha * - François B * - Mayank Badola * - JD Isaacks */ return array_replace_recursive(require __DIR__.'/en.php', [ 'from_now' => 'in :time', 'formats' => [ 'LT' => 'h:mm A', 'LTS' => 'h:mm:ss A', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY h:mm A', 'LLLL' => 'dddd, D MMMM YYYY h:mm A', ], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[Â~~Carbon/Lang/ar_SS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[Z,vcCarbon/Lang/nr_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Janabari', 'uFeberbari', 'uMatjhi', 'u-Apreli', 'Meyi', 'Juni', 'Julayi', 'Arhostosi', 'Septemba', 'Oktoba', 'Usinyikhaba', 'Disemba'], 'months_short' => ['Jan', 'Feb', 'Mat', 'Apr', 'Mey', 'Jun', 'Jul', 'Arh', 'Sep', 'Okt', 'Usi', 'Dis'], 'weekdays' => ['uSonto', 'uMvulo', 'uLesibili', 'lesithathu', 'uLesine', 'ngoLesihlanu', 'umGqibelo'], 'weekdays_short' => ['Son', 'Mvu', 'Bil', 'Tha', 'Ne', 'Hla', 'Gqi'], 'weekdays_min' => ['Son', 'Mvu', 'Bil', 'Tha', 'Ne', 'Hla', 'Gqi'], 'day_of_first_week_of_year' => 1, ]); PKgt[pGGCarbon/Lang/en_FM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[&Carbon/Lang/dje.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Subbaahi', 'Zaarikay b'], 'weekdays' => ['Alhadi', 'Atinni', 'Atalaata', 'Alarba', 'Alhamisi', 'Alzuma', 'Asibti'], 'weekdays_short' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], 'weekdays_min' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], 'months' => ['Žanwiye', 'Feewiriye', 'Marsi', 'Awiril', 'Me', 'Žuweŋ', 'Žuyye', 'Ut', 'Sektanbur', 'Oktoobur', 'Noowanbur', 'Deesanbur'], 'months_short' => ['Žan', 'Fee', 'Mar', 'Awi', 'Me', 'Žuw', 'Žuy', 'Ut', 'Sek', 'Okt', 'Noo', 'Dee'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'year' => ':count hari', // less reliable 'y' => ':count hari', // less reliable 'a_year' => ':count hari', // less reliable 'week' => ':count alzuma', // less reliable 'w' => ':count alzuma', // less reliable 'a_week' => ':count alzuma', // less reliable 'second' => ':count atinni', // less reliable 's' => ':count atinni', // less reliable 'a_second' => ':count atinni', // less reliable ]); PKgt[W]FNNCarbon/Lang/an.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/an_ES.php'; PKgt[, HCarbon/Lang/iu_CA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Pablo Saratxaga pablo@mandriva.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'MM/DD/YY', ], 'months' => ['ᔮᓄᐊᓕ', 'ᕕᕗᐊᓕ', 'ᒪᔅᓯ', 'ᐃᐳᓗ', 'ᒪᐃ', 'ᔪᓂ', 'ᔪᓚᐃ', 'ᐊᒋᓯ', 'ᓯᑎᕙ', 'ᐊᑦᑐᕙ', 'ᓄᕕᕙ', 'ᑎᓯᕝᕙ'], 'months_short' => ['ᔮᓄ', 'ᕕᕗ', 'ᒪᔅ', 'ᐃᐳ', 'ᒪᐃ', 'ᔪᓂ', 'ᔪᓚ', 'ᐊᒋ', 'ᓯᑎ', 'ᐊᑦ', 'ᓄᕕ', 'ᑎᓯ'], 'weekdays' => ['ᓈᑦᑎᖑᔭᕐᕕᒃ', 'ᓇᒡᒐᔾᔭᐅ', 'ᓇᒡᒐᔾᔭᐅᓕᖅᑭᑦ', 'ᐱᖓᓲᓕᖅᓯᐅᑦ', 'ᕿᑎᖅᑰᑦ', 'ᐅᓪᓗᕈᓘᑐᐃᓇᖅ', 'ᓯᕙᑖᕕᒃ'], 'weekdays_short' => ['ᓈ', 'ᓇ', 'ᓕ', 'ᐱ', 'ᕿ', 'ᐅ', 'ᓯ'], 'weekdays_min' => ['ᓈ', 'ᓇ', 'ᓕ', 'ᐱ', 'ᕿ', 'ᐅ', 'ᓯ'], 'day_of_first_week_of_year' => 1, 'year' => ':count ᐅᑭᐅᖅ', 'y' => ':count ᐅᑭᐅᖅ', 'a_year' => ':count ᐅᑭᐅᖅ', 'month' => ':count qaammat', 'm' => ':count qaammat', 'a_month' => ':count qaammat', 'week' => ':count sapaatip akunnera', 'w' => ':count sapaatip akunnera', 'a_week' => ':count sapaatip akunnera', 'day' => ':count ulloq', 'd' => ':count ulloq', 'a_day' => ':count ulloq', 'hour' => ':count ikarraq', 'h' => ':count ikarraq', 'a_hour' => ':count ikarraq', 'minute' => ':count titiqqaralaaq', // less reliable 'min' => ':count titiqqaralaaq', // less reliable 'a_minute' => ':count titiqqaralaaq', // less reliable 'second' => ':count marluk', // less reliable 's' => ':count marluk', // less reliable 'a_second' => ':count marluk', // less reliable ]); PKgt[pGGCarbon/Lang/en_PW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[jCarbon/Lang/ber_MA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Pablo Saratxaga pablo@mandrakesoft.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek'], 'weekdays' => ['bazar günü', 'birinci gün', 'ikinci gün', 'üçüncü gün', 'dördüncü gün', 'beşinci gün', 'altıncı gün'], 'weekdays_short' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], 'weekdays_min' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, ]); PKgt[6kkCarbon/Lang/pap_CW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - information from native speaker Pablo Saratxaga pablo@mandrakesoft.com */ return require __DIR__.'/pap.php'; PKgt[Carbon/Lang/aa_ET.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Qunxa Garablu', 'Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Liiqen', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], 'months_short' => ['Qun', 'Kud', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'], 'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'], 'weekdays_short' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], 'weekdays_min' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['saaku', 'carra'], ]); PKgt[dCarbon/Lang/es_HN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[pGGCarbon/Lang/en_GG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[w7GGCarbon/Lang/es_BR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, ]); PKgt[,Carbon/Lang/ar_QA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[]jwOOCarbon/Lang/shs.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/shs_CA.php'; PKgt[''x  Carbon/Lang/fr_MF.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[. Carbon/Lang/dv_MV.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ahmed Ali */ $months = [ 'ޖެނުއަރީ', 'ފެބްރުއަރީ', 'މާރިޗު', 'އޭޕްރީލު', 'މޭ', 'ޖޫން', 'ޖުލައި', 'އޯގަސްޓު', 'ސެޕްޓެމްބަރު', 'އޮކްޓޯބަރު', 'ނޮވެމްބަރު', 'ޑިސެމްބަރު', ]; $weekdays = [ 'އާދިއްތަ', 'ހޯމަ', 'އަންގާރަ', 'ބުދަ', 'ބުރާސްފަތި', 'ހުކުރު', 'ހޮނިހިރު', ]; return [ 'year' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު', 'y' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު', 'month' => '{0}މައްސަރެއް|[1,Inf]:count މަސް', 'm' => '{0}މައްސަރެއް|[1,Inf]:count މަސް', 'week' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ', 'w' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ', 'day' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް', 'd' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް', 'hour' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި', 'h' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި', 'minute' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް', 'min' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް', 'second' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު', 's' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު', 'ago' => ':time ކުރިން', 'from_now' => ':time ފަހުން', 'after' => ':time ފަހުން', 'before' => ':time ކުރި', 'diff_yesterday' => 'އިއްޔެ', 'diff_today' => 'މިއަދު', 'diff_tomorrow' => 'މާދަމާ', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[މިއަދު] LT', 'nextDay' => '[މާދަމާ] LT', 'nextWeek' => 'dddd LT', 'lastDay' => '[އިއްޔެ] LT', 'lastWeek' => '[ފާއިތުވި] dddd LT', 'sameElse' => 'L', ], 'meridiem' => ['މކ', 'މފ'], 'months' => $months, 'months_short' => $months, 'weekdays' => $weekdays, 'weekdays_short' => $weekdays, 'weekdays_min' => ['އާދި', 'ހޯމަ', 'އަން', 'ބުދަ', 'ބުރާ', 'ހުކު', 'ހޮނި'], 'list' => [', ', ' އަދި '], ]; PKgt[pGGCarbon/Lang/en_TK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[JBmCarbon/Lang/aa_DJ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['Qunxa Garablu', 'Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Liiqen', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], 'months_short' => ['qun', 'nah', 'cig', 'agd', 'cax', 'qas', 'qad', 'leq', 'way', 'dit', 'xim', 'kax'], 'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'], 'weekdays_short' => ['aca', 'etl', 'tal', 'arb', 'kam', 'gum', 'sab'], 'weekdays_min' => ['aca', 'etl', 'tal', 'arb', 'kam', 'gum', 'sab'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'meridiem' => ['saaku', 'carra'], 'year' => ':count gaqambo', // less reliable 'y' => ':count gaqambo', // less reliable 'a_year' => ':count gaqambo', // less reliable 'month' => ':count àlsa', 'm' => ':count àlsa', 'a_month' => ':count àlsa', 'day' => ':count saaku', // less reliable 'd' => ':count saaku', // less reliable 'a_day' => ':count saaku', // less reliable 'hour' => ':count ayti', // less reliable 'h' => ':count ayti', // less reliable 'a_hour' => ':count ayti', // less reliable ]); PKgt[R  Carbon/Lang/bo_CN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/bo.php'; PKgt[*QCarbon/Lang/sd.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $months = [ 'جنوري', 'فيبروري', 'مارچ', 'اپريل', 'مئي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر', ]; $weekdays = [ 'آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر', ]; /* * Authors: * - Narain Sagar * - Sawood Alam * - Narain Sagar */ return [ 'year' => '{1}'.'هڪ سال'.'|:count '.'سال', 'month' => '{1}'.'هڪ مهينو'.'|:count '.'مهينا', 'week' => '{1}'.'ھڪ ھفتو'.'|:count '.'هفتا', 'day' => '{1}'.'هڪ ڏينهن'.'|:count '.'ڏينهن', 'hour' => '{1}'.'هڪ ڪلاڪ'.'|:count '.'ڪلاڪ', 'minute' => '{1}'.'هڪ منٽ'.'|:count '.'منٽ', 'second' => '{1}'.'چند سيڪنڊ'.'|:count '.'سيڪنڊ', 'ago' => ':time اڳ', 'from_now' => ':time پوء', 'diff_yesterday' => 'ڪالهه', 'diff_today' => 'اڄ', 'diff_tomorrow' => 'سڀاڻي', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd، D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[اڄ] LT', 'nextDay' => '[سڀاڻي] LT', 'nextWeek' => 'dddd [اڳين هفتي تي] LT', 'lastDay' => '[ڪالهه] LT', 'lastWeek' => '[گزريل هفتي] dddd [تي] LT', 'sameElse' => 'L', ], 'meridiem' => ['صبح', 'شام'], 'months' => $months, 'months_short' => $months, 'weekdays' => $weekdays, 'weekdays_short' => $weekdays, 'weekdays_min' => $weekdays, 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => ['، ', ' ۽ '], ]; PKgt[lIQOOCarbon/Lang/yue.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/yue_HK.php'; PKgt[Carbon/Lang/eu.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - JD Isaacks */ return [ 'year' => 'urte bat|:count urte', 'y' => 'Urte 1|:count urte', 'month' => 'hilabete bat|:count hilabete', 'm' => 'Hile 1|:count hile', 'week' => 'Aste 1|:count aste', 'w' => 'Aste 1|:count aste', 'day' => 'egun bat|:count egun', 'd' => 'Egun 1|:count egun', 'hour' => 'ordu bat|:count ordu', 'h' => 'Ordu 1|:count ordu', 'minute' => 'minutu bat|:count minutu', 'min' => 'Minutu 1|:count minutu', 'second' => 'segundo batzuk|:count segundo', 's' => 'Segundu 1|:count segundu', 'ago' => 'duela :time', 'from_now' => ':time barru', 'after' => ':time geroago', 'before' => ':time lehenago', 'diff_now' => 'orain', 'diff_today' => 'gaur', 'diff_yesterday' => 'atzo', 'diff_tomorrow' => 'bihar', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-DD', 'LL' => 'YYYY[ko] MMMM[ren] D[a]', 'LLL' => 'YYYY[ko] MMMM[ren] D[a] HH:mm', 'LLLL' => 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', ], 'calendar' => [ 'sameDay' => '[gaur] LT[etan]', 'nextDay' => '[bihar] LT[etan]', 'nextWeek' => 'dddd LT[etan]', 'lastDay' => '[atzo] LT[etan]', 'lastWeek' => '[aurreko] dddd LT[etan]', 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['urtarrila', 'otsaila', 'martxoa', 'apirila', 'maiatza', 'ekaina', 'uztaila', 'abuztua', 'iraila', 'urria', 'azaroa', 'abendua'], 'months_short' => ['urt.', 'ots.', 'mar.', 'api.', 'mai.', 'eka.', 'uzt.', 'abu.', 'ira.', 'urr.', 'aza.', 'abe.'], 'weekdays' => ['igandea', 'astelehena', 'asteartea', 'asteazkena', 'osteguna', 'ostirala', 'larunbata'], 'weekdays_short' => ['ig.', 'al.', 'ar.', 'az.', 'og.', 'ol.', 'lr.'], 'weekdays_min' => ['ig', 'al', 'ar', 'az', 'og', 'ol', 'lr'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' eta '], 'meridiem' => ['g', 'a'], ]; PKgt[f8 Carbon/Lang/sv.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Kristoffer Snabb * - JD Isaacks * - Jens Herlevsen * - Nightpine * - Anders Nygren (litemerafrukt) */ return [ 'year' => ':count år', 'a_year' => 'ett år|:count år', 'y' => ':count år', 'month' => ':count månad|:count månader', 'a_month' => 'en månad|:count månader', 'm' => ':count mån', 'week' => ':count vecka|:count veckor', 'a_week' => 'en vecka|:count veckor', 'w' => ':count v', 'day' => ':count dag|:count dagar', 'a_day' => 'en dag|:count dagar', 'd' => ':count dgr', 'hour' => ':count timme|:count timmar', 'a_hour' => 'en timme|:count timmar', 'h' => ':count tim', 'minute' => ':count minut|:count minuter', 'a_minute' => 'en minut|:count minuter', 'min' => ':count min', 'second' => ':count sekund|:count sekunder', 'a_second' => 'några sekunder|:count sekunder', 's' => ':count s', 'ago' => 'för :time sedan', 'from_now' => 'om :time', 'after' => ':time efter', 'before' => ':time före', 'diff_now' => 'nu', 'diff_today' => 'I dag', 'diff_yesterday' => 'i går', 'diff_yesterday_regexp' => 'I går', 'diff_tomorrow' => 'i morgon', 'diff_tomorrow_regexp' => 'I morgon', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-DD', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY [kl.] HH:mm', 'LLLL' => 'dddd D MMMM YYYY [kl.] HH:mm', ], 'calendar' => [ 'sameDay' => '[I dag] LT', 'nextDay' => '[I morgon] LT', 'nextWeek' => '[På] dddd LT', 'lastDay' => '[I går] LT', 'lastWeek' => '[I] dddd[s] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { $lastDigit = $number % 10; return $number.( ((int) ($number % 100 / 10) === 1) ? 'e' : ( ($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e' ) ); }, 'months' => ['januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], 'weekdays' => ['söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag'], 'weekdays_short' => ['sön', 'mån', 'tis', 'ons', 'tors', 'fre', 'lör'], 'weekdays_min' => ['sö', 'må', 'ti', 'on', 'to', 'fr', 'lö'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' och '], 'meridiem' => ['fm', 'em'], ]; PKgt[XkkCarbon/Lang/mer.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['RŨ', 'ŨG'], 'weekdays' => ['Kiumia', 'Muramuko', 'Wairi', 'Wethatu', 'Wena', 'Wetano', 'Jumamosi'], 'weekdays_short' => ['KIU', 'MRA', 'WAI', 'WET', 'WEN', 'WTN', 'JUM'], 'weekdays_min' => ['KIU', 'MRA', 'WAI', 'WET', 'WEN', 'WTN', 'JUM'], 'months' => ['Januarĩ', 'Feburuarĩ', 'Machi', 'Ĩpurũ', 'Mĩĩ', 'Njuni', 'Njuraĩ', 'Agasti', 'Septemba', 'Oktũba', 'Novemba', 'Dicemba'], 'months_short' => ['JAN', 'FEB', 'MAC', 'ĨPU', 'MĨĨ', 'NJU', 'NJR', 'AGA', 'SPT', 'OKT', 'NOV', 'DEC'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'year' => ':count murume', // less reliable 'y' => ':count murume', // less reliable 'a_year' => ':count murume', // less reliable 'month' => ':count muchaara', // less reliable 'm' => ':count muchaara', // less reliable 'a_month' => ':count muchaara', // less reliable 'minute' => ':count monto', // less reliable 'min' => ':count monto', // less reliable 'a_minute' => ':count monto', // less reliable 'second' => ':count gikeno', // less reliable 's' => ':count gikeno', // less reliable 'a_second' => ':count gikeno', // less reliable ]); PKgt[nROOCarbon/Lang/crh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/crh_UA.php'; PKgt[))Carbon/Lang/be_BY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/be.php', [ 'months' => ['студзеня', 'лютага', 'сакавіка', 'красавіка', 'мая', 'чэрвеня', 'ліпеня', 'жніўня', 'верасня', 'кастрычніка', 'лістапада', 'снежня'], 'months_short' => ['сту', 'лют', 'сак', 'кра', 'мая', 'чэр', 'ліп', 'жні', 'вер', 'кас', 'ліс', 'сне'], 'weekdays' => ['Нядзеля', 'Панядзелак', 'Аўторак', 'Серада', 'Чацвер', 'Пятніца', 'Субота'], 'weekdays_short' => ['Няд', 'Пан', 'Аўт', 'Срд', 'Чцв', 'Пят', 'Суб'], 'weekdays_min' => ['Няд', 'Пан', 'Аўт', 'Срд', 'Чцв', 'Пят', 'Суб'], ]); PKgt[7h##Carbon/Lang/tn_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Ferikgong', 'Tlhakole', 'Mopitlwe', 'Moranang', 'Motsheganong', 'Seetebosigo', 'Phukwi', 'Phatwe', 'Lwetse', 'Diphalane', 'Ngwanatsele', 'Sedimonthole'], 'months_short' => ['Fer', 'Tlh', 'Mop', 'Mor', 'Mot', 'See', 'Phu', 'Pha', 'Lwe', 'Dip', 'Ngw', 'Sed'], 'weekdays' => ['laTshipi', 'Mosupologo', 'Labobedi', 'Laboraro', 'Labone', 'Labotlhano', 'Lamatlhatso'], 'weekdays_short' => ['Tsh', 'Mos', 'Bed', 'Rar', 'Ne', 'Tlh', 'Mat'], 'weekdays_min' => ['Tsh', 'Mos', 'Bed', 'Rar', 'Ne', 'Tlh', 'Mat'], 'day_of_first_week_of_year' => 1, 'year' => 'dingwaga di le :count', 'y' => 'dingwaga di le :count', 'a_year' => 'dingwaga di le :count', 'month' => 'dikgwedi di le :count', 'm' => 'dikgwedi di le :count', 'a_month' => 'dikgwedi di le :count', 'week' => 'dibeke di le :count', 'w' => 'dibeke di le :count', 'a_week' => 'dibeke di le :count', 'day' => 'malatsi :count', 'd' => 'malatsi :count', 'a_day' => 'malatsi :count', 'hour' => 'diura di le :count', 'h' => 'diura di le :count', 'a_hour' => 'diura di le :count', 'minute' => 'metsotso e le :count', 'min' => 'metsotso e le :count', 'a_minute' => 'metsotso e le :count', 'second' => 'metsotswana e le :count', 's' => 'metsotswana e le :count', 'a_second' => 'metsotswana e le :count', ]); PKgt[&*BccCarbon/Lang/sr_RS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - sr_YU, sr_CS locale Danilo Segan bug-glibc-locales@gnu.org */ return require __DIR__.'/sr_Cyrl.php'; PKgt[''x  Carbon/Lang/fr_SC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[:ɷCarbon/Lang/de_AT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - sheriffmarley * - Timo * - Michael Hohl * - Namoshek * - Bernhard Baumrock (BernhardBaumrock) */ return array_replace_recursive(require __DIR__.'/de.php', [ 'months' => [ 0 => 'Jänner', ], 'months_short' => [ 0 => 'Jän', ], ]); PKgt[náCarbon/Lang/sd_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Red Hat, Pune bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/sd.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['جنوري', 'فبروري', 'مارچ', 'اپريل', 'مي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽيمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر'], 'months_short' => ['جنوري', 'فبروري', 'مارچ', 'اپريل', 'مي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽيمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر'], 'weekdays' => ['آرتوارُ', 'سومرُ', 'منگلُ', 'ٻُڌرُ', 'وسپت', 'جُمو', 'ڇنڇر'], 'weekdays_short' => ['آرتوارُ', 'سومرُ', 'منگلُ', 'ٻُڌرُ', 'وسپت', 'جُمو', 'ڇنڇر'], 'weekdays_min' => ['آرتوارُ', 'سومرُ', 'منگلُ', 'ٻُڌرُ', 'وسپت', 'جُمو', 'ڇنڇر'], 'day_of_first_week_of_year' => 1, ]); PKgt[^<<Carbon/Lang/khq.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Adduha', 'Aluula'], 'weekdays' => ['Alhadi', 'Atini', 'Atalata', 'Alarba', 'Alhamiisa', 'Aljuma', 'Assabdu'], 'weekdays_short' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alj', 'Ass'], 'weekdays_min' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alj', 'Ass'], 'months' => ['Žanwiye', 'Feewiriye', 'Marsi', 'Awiril', 'Me', 'Žuweŋ', 'Žuyye', 'Ut', 'Sektanbur', 'Oktoobur', 'Noowanbur', 'Deesanbur'], 'months_short' => ['Žan', 'Fee', 'Mar', 'Awi', 'Me', 'Žuw', 'Žuy', 'Ut', 'Sek', 'Okt', 'Noo', 'Dee'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], ]); PKgt[%uuCarbon/Lang/ia_FR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Fedora Project Nik Kalach nikka@fedoraproject.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['januario', 'februario', 'martio', 'april', 'maio', 'junio', 'julio', 'augusto', 'septembre', 'octobre', 'novembre', 'decembre'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'], 'weekdays' => ['dominica', 'lunedi', 'martedi', 'mercuridi', 'jovedi', 'venerdi', 'sabbato'], 'weekdays_short' => ['dom', 'lun', 'mar', 'mer', 'jov', 'ven', 'sab'], 'weekdays_min' => ['dom', 'lun', 'mar', 'mer', 'jov', 'ven', 'sab'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => 'anno :count', 'y' => 'anno :count', 'a_year' => 'anno :count', 'month' => ':count mense', 'm' => ':count mense', 'a_month' => ':count mense', 'week' => ':count septimana', 'w' => ':count septimana', 'a_week' => ':count septimana', 'day' => ':count die', 'd' => ':count die', 'a_day' => ':count die', 'hour' => ':count hora', 'h' => ':count hora', 'a_hour' => ':count hora', 'minute' => ':count minuscule', 'min' => ':count minuscule', 'a_minute' => ':count minuscule', 'second' => ':count secunda', 's' => ':count secunda', 'a_second' => ':count secunda', ]); PKgt[(|@zGGCarbon/Lang/es_EA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 1, ]); PKgt[X  Carbon/Lang/th.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Nate Whittaker * - John MacAslan * - Chanintorn Asavavichairoj * - JD Isaacks * - ROKAISAKKON * - RO'KAISAKKON * - Andreas Möller * - nithisa */ return [ 'year' => ':count ปี', 'y' => ':count ปี', 'month' => ':count เดือน', 'm' => ':count เดือน', 'week' => ':count สัปดาห์', 'w' => ':count สัปดาห์', 'day' => ':count วัน', 'd' => ':count วัน', 'hour' => ':count ชั่วโมง', 'h' => ':count ชั่วโมง', 'minute' => ':count นาที', 'min' => ':count นาที', 'second' => ':count วินาที', 'a_second' => '{1}ไม่กี่วินาที|]1,Inf[:count วินาที', 's' => ':count วินาที', 'ago' => ':timeที่แล้ว', 'from_now' => 'อีก :time', 'after' => ':timeหลังจากนี้', 'before' => ':timeก่อน', 'diff_now' => 'ขณะนี้', 'diff_today' => 'วันนี้', 'diff_today_regexp' => 'วันนี้(?:\\s+เวลา)?', 'diff_yesterday' => 'เมื่อวาน', 'diff_yesterday_regexp' => 'เมื่อวานนี้(?:\\s+เวลา)?', 'diff_tomorrow' => 'พรุ่งนี้', 'diff_tomorrow_regexp' => 'พรุ่งนี้(?:\\s+เวลา)?', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY เวลา H:mm', 'LLLL' => 'วันddddที่ D MMMM YYYY เวลา H:mm', ], 'calendar' => [ 'sameDay' => '[วันนี้ เวลา] LT', 'nextDay' => '[พรุ่งนี้ เวลา] LT', 'nextWeek' => 'dddd[หน้า เวลา] LT', 'lastDay' => '[เมื่อวานนี้ เวลา] LT', 'lastWeek' => '[วัน]dddd[ที่แล้ว เวลา] LT', 'sameElse' => 'L', ], 'meridiem' => ['ก่อนเที่ยง', 'หลังเที่ยง'], 'months' => ['มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'], 'months_short' => ['ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.'], 'weekdays' => ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัสบดี', 'ศุกร์', 'เสาร์'], 'weekdays_short' => ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัส', 'ศุกร์', 'เสาร์'], 'weekdays_min' => ['อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'], 'list' => [', ', ' และ '], ]; PKgt[pGGCarbon/Lang/en_SS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[\GGCarbon/Lang/qu_EC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/qu.php', [ 'first_day_of_week' => 1, ]); PKgt[D[[Carbon/Lang/ewo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['kíkíríg', 'ngəgógəle'], 'weekdays' => ['sɔ́ndɔ', 'mɔ́ndi', 'sɔ́ndɔ məlú mə́bɛ̌', 'sɔ́ndɔ məlú mə́lɛ́', 'sɔ́ndɔ məlú mə́nyi', 'fúladé', 'séradé'], 'weekdays_short' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'fúl', 'sér'], 'weekdays_min' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'fúl', 'sér'], 'months' => ['ngɔn osú', 'ngɔn bɛ̌', 'ngɔn lála', 'ngɔn nyina', 'ngɔn tána', 'ngɔn saməna', 'ngɔn zamgbála', 'ngɔn mwom', 'ngɔn ebulú', 'ngɔn awóm', 'ngɔn awóm ai dziá', 'ngɔn awóm ai bɛ̌'], 'months_short' => ['ngo', 'ngb', 'ngl', 'ngn', 'ngt', 'ngs', 'ngz', 'ngm', 'nge', 'nga', 'ngad', 'ngab'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], // Too unreliable /* 'year' => ':count mbu', // less reliable 'y' => ':count mbu', // less reliable 'a_year' => ':count mbu', // less reliable 'month' => ':count ngòn', // less reliable 'm' => ':count ngòn', // less reliable 'a_month' => ':count ngòn', // less reliable 'week' => ':count mësë', // less reliable 'w' => ':count mësë', // less reliable 'a_week' => ':count mësë', // less reliable 'day' => ':count mësë', // less reliable 'd' => ':count mësë', // less reliable 'a_day' => ':count mësë', // less reliable 'hour' => ':count awola', // less reliable 'h' => ':count awola', // less reliable 'a_hour' => ':count awola', // less reliable 'minute' => ':count awola', // less reliable 'min' => ':count awola', // less reliable 'a_minute' => ':count awola', // less reliable */ ]); PKgt[[ɃCarbon/Lang/es_SV.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], 'day_of_first_week_of_year' => 1, ]); PKgt[ibEECarbon/Lang/hne_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Red Hat, Pune bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अपरेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितमबर', 'अकटूबर', 'नवमबर', 'दिसमबर'], 'months_short' => ['जन', 'फर', 'मार्च', 'अप', 'मई', 'जून', 'जुला', 'अग', 'सित', 'अकटू', 'नव', 'दिस'], 'weekdays' => ['इतवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'बिरसपत', 'सुकरवार', 'सनिवार'], 'weekdays_short' => ['इत', 'सोम', 'मंग', 'बुध', 'बिर', 'सुक', 'सनि'], 'weekdays_min' => ['इत', 'सोम', 'मंग', 'बुध', 'बिर', 'सुक', 'सनि'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['बिहिनियाँ', 'मंझनियाँ'], ]); PKgt[,qqCarbon/Lang/dua.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['idiɓa', 'ebyámu'], 'weekdays' => ['éti', 'mɔ́sú', 'kwasú', 'mukɔ́sú', 'ŋgisú', 'ɗónɛsú', 'esaɓasú'], 'weekdays_short' => ['ét', 'mɔ́s', 'kwa', 'muk', 'ŋgi', 'ɗón', 'esa'], 'weekdays_min' => ['ét', 'mɔ́s', 'kwa', 'muk', 'ŋgi', 'ɗón', 'esa'], 'months' => ['dimɔ́di', 'ŋgɔndɛ', 'sɔŋɛ', 'diɓáɓá', 'emiasele', 'esɔpɛsɔpɛ', 'madiɓɛ́díɓɛ́', 'diŋgindi', 'nyɛtɛki', 'mayésɛ́', 'tiníní', 'eláŋgɛ́'], 'months_short' => ['di', 'ŋgɔn', 'sɔŋ', 'diɓ', 'emi', 'esɔ', 'mad', 'diŋ', 'nyɛt', 'may', 'tin', 'elá'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'year' => ':count ma mbu', // less reliable 'y' => ':count ma mbu', // less reliable 'a_year' => ':count ma mbu', // less reliable 'month' => ':count myo̱di', // less reliable 'm' => ':count myo̱di', // less reliable 'a_month' => ':count myo̱di', // less reliable 'week' => ':count woki', // less reliable 'w' => ':count woki', // less reliable 'a_week' => ':count woki', // less reliable 'day' => ':count buńa', // less reliable 'd' => ':count buńa', // less reliable 'a_day' => ':count buńa', // less reliable 'hour' => ':count ma awa', // less reliable 'h' => ':count ma awa', // less reliable 'a_hour' => ':count ma awa', // less reliable 'minute' => ':count minuti', // less reliable 'min' => ':count minuti', // less reliable 'a_minute' => ':count minuti', // less reliable 'second' => ':count maba', // less reliable 's' => ':count maba', // less reliable 'a_second' => ':count maba', // less reliable ]); PKgt[JV Carbon/Lang/sk.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - Martin Suja * - Tsutomu Kuroda * - tjku * - Max Melentiev * - Juanito Fatas * - Ivan Stana * - Akira Matsuda * - Christopher Dell * - James McKinney * - Enrique Vidal * - Simone Carletti * - Aaron Patterson * - Jozef Fulop * - Nicolás Hock Isaza * - Tom Hughes * - Simon Hürlimann (CyT) * - jofi * - Jakub ADAMEC * - Marek Adamický * - AlterwebStudio */ return [ 'year' => 'rok|:count roky|:count rokov', 'y' => ':count r', 'month' => 'mesiac|:count mesiace|:count mesiacov', 'm' => ':count m', 'week' => 'týždeň|:count týždne|:count týždňov', 'w' => ':count t', 'day' => 'deň|:count dni|:count dní', 'd' => ':count d', 'hour' => 'hodinu|:count hodiny|:count hodín', 'h' => ':count h', 'minute' => 'minútu|:count minúty|:count minút', 'min' => ':count min', 'second' => 'sekundu|:count sekundy|:count sekúnd', 'a_second' => 'pár sekúnd|:count sekundy|:count sekúnd', 's' => ':count s', 'ago' => 'pred :time', 'from_now' => 'o :time', 'after' => ':time po', 'before' => ':time pred', 'year_ago' => 'rokom|:count rokmi|:count rokmi', 'month_ago' => 'mesiacom|:count mesiacmi|:count mesiacmi', 'week_ago' => 'týždňom|:count týždňami|:count týždňami', 'day_ago' => 'dňom|:count dňami|:count dňami', 'hour_ago' => 'hodinou|:count hodinami|:count hodinami', 'minute_ago' => 'minútou|:count minútami|:count minútami', 'second_ago' => 'sekundou|:count sekundami|:count sekundami', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' a '], 'diff_now' => 'teraz', 'diff_yesterday' => 'včera', 'diff_tomorrow' => 'zajtra', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'DD. MMMM YYYY', 'LLL' => 'D. M. HH:mm', 'LLLL' => 'dddd D. MMMM YYYY HH:mm', ], 'weekdays' => ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'], 'weekdays_short' => ['ned', 'pod', 'uto', 'str', 'štv', 'pia', 'sob'], 'weekdays_min' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'], 'months' => ['január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'máj', 'jún', 'júl', 'aug', 'sep', 'okt', 'nov', 'dec'], 'meridiem' => ['dopoludnia', 'popoludní'], ]; PKgt[>KNNCarbon/Lang/sc.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/sc_IT.php'; PKgt[Zб  Carbon/Lang/in.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/id.php'; PKgt[dCarbon/Lang/es_CL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[nE%%Carbon/Lang/en_CH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], ]); PKgt[Carbon/Lang/bs_Cyrl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/bs.php', [ 'meridiem' => ['пре подне', 'поподне'], 'weekdays' => ['недјеља', 'понедјељак', 'уторак', 'сриједа', 'четвртак', 'петак', 'субота'], 'weekdays_short' => ['нед', 'пон', 'уто', 'сри', 'чет', 'пет', 'суб'], 'weekdays_min' => ['нед', 'пон', 'уто', 'сри', 'чет', 'пет', 'суб'], 'months' => ['јануар', 'фебруар', 'март', 'април', 'мај', 'јуни', 'јули', 'аугуст', 'септембар', 'октобар', 'новембар', 'децембар'], 'months_short' => ['јан', 'феб', 'мар', 'апр', 'мај', 'јун', 'јул', 'ауг', 'сеп', 'окт', 'нов', 'дец'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D.M.YYYY.', 'LL' => 'DD.MM.YYYY.', 'LLL' => 'DD. MMMM YYYY. HH:mm', 'LLLL' => 'dddd, DD. MMMM YYYY. HH:mm', ], ]); PKgt[DCarbon/Lang/niu_NU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RockET Systems Emani Fakaotimanava-Lui emani@niue.nu */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['Ianuali', 'Fepuali', 'Masi', 'Apelila', 'Me', 'Iuni', 'Iulai', 'Aokuso', 'Sepetema', 'Oketopa', 'Novema', 'Tesemo'], 'months_short' => ['Ian', 'Fep', 'Mas', 'Ape', 'Me', 'Iun', 'Iul', 'Aok', 'Sep', 'Oke', 'Nov', 'Tes'], 'weekdays' => ['Aho Tapu', 'Aho Gofua', 'Aho Ua', 'Aho Lotu', 'Aho Tuloto', 'Aho Falaile', 'Aho Faiumu'], 'weekdays_short' => ['Tapu', 'Gofua', 'Ua', 'Lotu', 'Tuloto', 'Falaile', 'Faiumu'], 'weekdays_min' => ['Tapu', 'Gofua', 'Ua', 'Lotu', 'Tuloto', 'Falaile', 'Faiumu'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => ':count tau', 'y' => ':count tau', 'a_year' => ':count tau', 'month' => ':count mahina', 'm' => ':count mahina', 'a_month' => ':count mahina', 'week' => ':count faahi tapu', 'w' => ':count faahi tapu', 'a_week' => ':count faahi tapu', 'day' => ':count aho', 'd' => ':count aho', 'a_day' => ':count aho', 'hour' => ':count e tulā', 'h' => ':count e tulā', 'a_hour' => ':count e tulā', 'minute' => ':count minuti', 'min' => ':count minuti', 'a_minute' => ':count minuti', 'second' => ':count sekone', 's' => ':count sekone', 'a_second' => ':count sekone', ]); PKgt[ +  Carbon/Lang/ast_ES.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ast.php'; PKgt[,Carbon/Lang/ar_BH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[C=5  Carbon/Lang/ru_MD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ru.php'; PKgt[6NNCarbon/Lang/ak.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ak_GH.php'; PKgt[W?Carbon/Lang/ar_PS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[''x  Carbon/Lang/fr_GF.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[9>Carbon/Lang/ar_SA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Authors: * - Josh Soref * - JD Isaacks * - Atef Ben Ali (atefBB) * - Mohamed Sabil (mohamedsabil83) * - Abdullah-Alhariri */ $months = [ 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر', ]; return [ 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'ago' => 'منذ :time', 'from_now' => 'في :time', 'after' => 'بعد :time', 'before' => 'قبل :time', 'diff_now' => 'الآن', 'diff_today' => 'اليوم', 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', 'diff_yesterday' => 'أمس', 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', 'diff_tomorrow' => 'غداً', 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', 'diff_before_yesterday' => 'قبل الأمس', 'diff_after_tomorrow' => 'بعد غد', 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), 'period_interval' => 'كل :interval', 'period_start_date' => 'من :date', 'period_end_date' => 'إلى :date', 'months' => $months, 'months_short' => $months, 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'list' => ['، ', ' و '], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[اليوم على الساعة] LT', 'nextDay' => '[غدا على الساعة] LT', 'nextWeek' => 'dddd [على الساعة] LT', 'lastDay' => '[أمس على الساعة] LT', 'lastWeek' => 'dddd [على الساعة] LT', 'sameElse' => 'L', ], 'meridiem' => ['ص', 'م'], 'weekend' => [5, 6], 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]; PKgt[It Carbon/Lang/cv.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - JD Isaacks */ return [ 'year' => ':count ҫул', 'a_year' => '{1}пӗр ҫул|:count ҫул', 'month' => ':count уйӑх', 'a_month' => '{1}пӗр уйӑх|:count уйӑх', 'week' => ':count эрне', 'a_week' => '{1}пӗр эрне|:count эрне', 'day' => ':count кун', 'a_day' => '{1}пӗр кун|:count кун', 'hour' => ':count сехет', 'a_hour' => '{1}пӗр сехет|:count сехет', 'minute' => ':count минут', 'a_minute' => '{1}пӗр минут|:count минут', 'second' => ':count ҫеккунт', 'a_second' => '{1}пӗр-ик ҫеккунт|:count ҫеккунт', 'ago' => ':time каялла', 'from_now' => function ($time) { return $time.(preg_match('/сехет$/u', $time) ? 'рен' : (preg_match('/ҫул/u', $time) ? 'тан' : 'ран')); }, 'diff_yesterday' => 'Ӗнер', 'diff_today' => 'Паян', 'diff_tomorrow' => 'Ыран', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD-MM-YYYY', 'LL' => 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', 'LLL' => 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', 'LLLL' => 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', ], 'calendar' => [ 'sameDay' => '[Паян] LT [сехетре]', 'nextDay' => '[Ыран] LT [сехетре]', 'nextWeek' => '[Ҫитес] dddd LT [сехетре]', 'lastDay' => '[Ӗнер] LT [сехетре]', 'lastWeek' => '[Иртнӗ] dddd LT [сехетре]', 'sameElse' => 'L', ], 'ordinal' => ':number-мӗш', 'months' => ['кӑрлач', 'нарӑс', 'пуш', 'ака', 'май', 'ҫӗртме', 'утӑ', 'ҫурла', 'авӑн', 'юпа', 'чӳк', 'раштав'], 'months_short' => ['кӑр', 'нар', 'пуш', 'ака', 'май', 'ҫӗр', 'утӑ', 'ҫур', 'авн', 'юпа', 'чӳк', 'раш'], 'weekdays' => ['вырсарникун', 'тунтикун', 'ытларикун', 'юнкун', 'кӗҫнерникун', 'эрнекун', 'шӑматкун'], 'weekdays_short' => ['выр', 'тун', 'ытл', 'юн', 'кӗҫ', 'эрн', 'шӑм'], 'weekdays_min' => ['вр', 'тн', 'ыт', 'юн', 'кҫ', 'эр', 'шм'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' тата '], ]; PKgt[lNNCarbon/Lang/ti.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ti_ER.php'; PKgt[fK,Carbon/Lang/hr.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - Tim Fish * - shaishavgandhi05 * - Serhan Apaydın * - JD Isaacks * - tomhorvat * - Josh Soref * - François B * - shaishavgandhi05 * - Serhan Apaydın * - JD Isaacks * - tomhorvat * - Stjepan Majdak * - Vanja Retkovac (vr00) */ use Carbon\CarbonInterface; return [ 'year' => ':count godinu|:count godine|:count godina', 'y' => ':count god.|:count god.|:count god.', 'month' => ':count mjesec|:count mjeseca|:count mjeseci', 'm' => ':count mj.|:count mj.|:count mj.', 'week' => ':count tjedan|:count tjedna|:count tjedana', 'w' => ':count tj.|:count tj.|:count tj.', 'day' => ':count dan|:count dana|:count dana', 'd' => ':count d.|:count d.|:count d.', 'hour' => ':count sat|:count sata|:count sati', 'h' => ':count sat|:count sata|:count sati', 'minute' => ':count minutu|:count minute|:count minuta', 'min' => ':count min.|:count min.|:count min.', 'second' => ':count sekundu|:count sekunde|:count sekundi', 'a_second' => 'nekoliko sekundi|:count sekunde|:count sekundi', 's' => ':count sek.|:count sek.|:count sek.', 'ago' => 'prije :time', 'from_now' => 'za :time', 'after' => ':time poslije', 'before' => ':time prije', 'diff_now' => 'sad', 'diff_today' => 'danas', 'diff_today_regexp' => 'danas(?:\\s+u)?', 'diff_yesterday' => 'jučer', 'diff_yesterday_regexp' => 'jučer(?:\\s+u)?', 'diff_tomorrow' => 'sutra', 'diff_tomorrow_regexp' => 'sutra(?:\\s+u)?', 'diff_before_yesterday' => 'prekjučer', 'diff_after_tomorrow' => 'prekosutra', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'D. M. YYYY.', 'LL' => 'D. MMMM YYYY.', 'LLL' => 'D. MMMM YYYY. H:mm', 'LLLL' => 'dddd, D. MMMM YYYY. H:mm', ], 'calendar' => [ 'sameDay' => '[danas u] LT', 'nextDay' => '[sutra u] LT', 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[u] [nedjelju] [u] LT'; case 3: return '[u] [srijedu] [u] LT'; case 6: return '[u] [subotu] [u] LT'; default: return '[u] dddd [u] LT'; } }, 'lastDay' => '[jučer u] LT', 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: case 3: return '[prošlu] dddd [u] LT'; case 6: return '[prošle] [subote] [u] LT'; default: return '[prošli] dddd [u] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['siječnja', 'veljače', 'ožujka', 'travnja', 'svibnja', 'lipnja', 'srpnja', 'kolovoza', 'rujna', 'listopada', 'studenoga', 'prosinca'], 'months_standalone' => ['siječanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac'], 'months_short' => ['sij.', 'velj.', 'ožu.', 'tra.', 'svi.', 'lip.', 'srp.', 'kol.', 'ruj.', 'lis.', 'stu.', 'pro.'], 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', 'weekdays' => ['nedjelju', 'ponedjeljak', 'utorak', 'srijedu', 'četvrtak', 'petak', 'subotu'], 'weekdays_standalone' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], 'weekdays_min' => ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' i '], ]; PKgt[''x  Carbon/Lang/fr_PF.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[}*B  Carbon/Lang/ha_NG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ha.php'; PKgt[wOOCarbon/Lang/ber.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ber_DZ.php'; PKgt[''x  Carbon/Lang/fr_TG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[pCarbon/Lang/sr_ME.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/sr_Latn_ME.php'; PKgt[-|KCarbon/Lang/es_PR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[+kkCarbon/Lang/ig_NG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - pablo@mandriva.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['Jenụwarị', 'Febrụwarị', 'Maachị', 'Eprel', 'Mee', 'Juun', 'Julaị', 'Ọgọọst', 'Septemba', 'Ọktoba', 'Novemba', 'Disemba'], 'months_short' => ['Jen', 'Feb', 'Maa', 'Epr', 'Mee', 'Juu', 'Jul', 'Ọgọ', 'Sep', 'Ọkt', 'Nov', 'Dis'], 'weekdays' => ['sọnde', 'mọnde', 'tuzde', 'wenzde', 'tọsde', 'fraịde', 'satọde'], 'weekdays_short' => ['sọn', 'mọn', 'tuz', 'wen', 'tọs', 'fra', 'sat'], 'weekdays_min' => ['sọn', 'mọn', 'tuz', 'wen', 'tọs', 'fra', 'sat'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => 'afo :count', 'y' => 'afo :count', 'a_year' => 'afo :count', 'month' => 'önwa :count', 'm' => 'önwa :count', 'a_month' => 'önwa :count', 'week' => 'izu :count', 'w' => 'izu :count', 'a_week' => 'izu :count', 'day' => 'ụbọchị :count', 'd' => 'ụbọchị :count', 'a_day' => 'ụbọchị :count', 'hour' => 'awa :count', 'h' => 'awa :count', 'a_hour' => 'awa :count', 'minute' => 'minit :count', 'min' => 'minit :count', 'a_minute' => 'minit :count', 'second' => 'sekọnd :count', 's' => 'sekọnd :count', 'a_second' => 'sekọnd :count', ]); PKgt[<-OOCarbon/Lang/bho.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/bho_IN.php'; PKgt[^َCarbon/Lang/ln_CG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ln.php', [ 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa míbalé', 'mokɔlɔ mwa mísáto', 'mokɔlɔ ya mínéi', 'mokɔlɔ ya mítáno', 'mpɔ́sɔ'], 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], 'weekdays_min' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], 'meridiem' => ['ntɔ́ngɔ́', 'mpókwa'], ]); PKgt[/{POOCarbon/Lang/hak.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/hak_TW.php'; PKgt[$rllCarbon/Lang/gsw_LI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/gsw.php', [ 'meridiem' => ['vorm.', 'nam.'], 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'Septämber', 'Oktoober', 'Novämber', 'Dezämber'], 'first_day_of_week' => 1, 'formats' => [ 'LLL' => 'Do MMMM YYYY HH:mm', 'LLLL' => 'dddd, Do MMMM YYYY HH:mm', ], ]); PKgt[$rllCarbon/Lang/gsw_FR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/gsw.php', [ 'meridiem' => ['vorm.', 'nam.'], 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'Septämber', 'Oktoober', 'Novämber', 'Dezämber'], 'first_day_of_week' => 1, 'formats' => [ 'LLL' => 'Do MMMM YYYY HH:mm', 'LLLL' => 'dddd, Do MMMM YYYY HH:mm', ], ]); PKgt[))Carbon/Lang/ar_ER.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ar.php', [ ]); PKgt[?Ej  Carbon/Lang/en_ZW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[?Ej  Carbon/Lang/en_JM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[  Carbon/Lang/fa_IR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fa.php'; PKgt[YCarbon/Lang/mgo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Aneg 1', 'Aneg 2', 'Aneg 3', 'Aneg 4', 'Aneg 5', 'Aneg 6', 'Aneg 7'], 'weekdays_short' => ['Aneg 1', 'Aneg 2', 'Aneg 3', 'Aneg 4', 'Aneg 5', 'Aneg 6', 'Aneg 7'], 'weekdays_min' => ['1', '2', '3', '4', '5', '6', '7'], 'months' => ['iməg mbegtug', 'imeg àbùbì', 'imeg mbəŋchubi', 'iməg ngwə̀t', 'iməg fog', 'iməg ichiibɔd', 'iməg àdùmbə̀ŋ', 'iməg ichika', 'iməg kud', 'iməg tèsiʼe', 'iməg zò', 'iməg krizmed'], 'months_short' => ['mbegtug', 'imeg àbùbì', 'imeg mbəŋchubi', 'iməg ngwə̀t', 'iməg fog', 'iməg ichiibɔd', 'iməg àdùmbə̀ŋ', 'iməg ichika', 'iməg kud', 'iməg tèsiʼe', 'iməg zò', 'iməg krizmed'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-dd', 'LL' => 'YYYY MMM D', 'LLL' => 'YYYY MMMM D HH:mm', 'LLLL' => 'dddd, YYYY MMMM DD HH:mm', ], ]); PKgt[SSSCarbon/Lang/tl_PH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Ian De La Cruz * - JD Isaacks */ return require __DIR__.'/tl.php'; PKgt[ܒCarbon/Lang/prg.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-dd', 'LL' => 'YYYY MMM D', 'LLL' => 'YYYY MMMM D HH:mm', 'LLLL' => 'YYYY MMMM D, dddd HH:mm', ], 'year' => ':count meta', 'y' => ':count meta', 'a_year' => ':count meta', 'month' => ':count mēniks', // less reliable 'm' => ':count mēniks', // less reliable 'a_month' => ':count mēniks', // less reliable 'week' => ':count sawaītin', // less reliable 'w' => ':count sawaītin', // less reliable 'a_week' => ':count sawaītin', // less reliable 'day' => ':count di', 'd' => ':count di', 'a_day' => ':count di', 'hour' => ':count bruktēt', // less reliable 'h' => ':count bruktēt', // less reliable 'a_hour' => ':count bruktēt', // less reliable 'minute' => ':count līkuts', // less reliable 'min' => ':count līkuts', // less reliable 'a_minute' => ':count līkuts', // less reliable 'second' => ':count kitan', // less reliable 's' => ':count kitan', // less reliable 'a_second' => ':count kitan', // less reliable ]); PKgt[ Carbon/Lang/mgh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['wichishu', 'mchochil’l'], 'weekdays' => ['Sabato', 'Jumatatu', 'Jumanne', 'Jumatano', 'Arahamisi', 'Ijumaa', 'Jumamosi'], 'weekdays_short' => ['Sab', 'Jtt', 'Jnn', 'Jtn', 'Ara', 'Iju', 'Jmo'], 'weekdays_min' => ['Sab', 'Jtt', 'Jnn', 'Jtn', 'Ara', 'Iju', 'Jmo'], 'months' => ['Mweri wo kwanza', 'Mweri wo unayeli', 'Mweri wo uneraru', 'Mweri wo unecheshe', 'Mweri wo unethanu', 'Mweri wo thanu na mocha', 'Mweri wo saba', 'Mweri wo nane', 'Mweri wo tisa', 'Mweri wo kumi', 'Mweri wo kumi na moja', 'Mweri wo kumi na yel’li'], 'months_short' => ['Kwa', 'Una', 'Rar', 'Che', 'Tha', 'Moc', 'Sab', 'Nan', 'Tis', 'Kum', 'Moj', 'Yel'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[Carbon/Lang/tr.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - Alan Agius * - Erhan Gundogan * - François B * - JD Isaacks * - Murat Yüksel * - Baran Şengül * - Selami (selamialtin) * - TeomanBey */ return [ 'year' => ':count yıl', 'a_year' => '{1}bir yıl|]1,Inf[:count yıl', 'y' => ':county', 'month' => ':count ay', 'a_month' => '{1}bir ay|]1,Inf[:count ay', 'm' => ':countay', 'week' => ':count hafta', 'a_week' => '{1}bir hafta|]1,Inf[:count hafta', 'w' => ':counth', 'day' => ':count gün', 'a_day' => '{1}bir gün|]1,Inf[:count gün', 'd' => ':countg', 'hour' => ':count saat', 'a_hour' => '{1}bir saat|]1,Inf[:count saat', 'h' => ':countsa', 'minute' => ':count dakika', 'a_minute' => '{1}bir dakika|]1,Inf[:count dakika', 'min' => ':countdk', 'second' => ':count saniye', 'a_second' => '{1}birkaç saniye|]1,Inf[:count saniye', 's' => ':countsn', 'ago' => ':time önce', 'from_now' => ':time sonra', 'after' => ':time sonra', 'before' => ':time önce', 'diff_now' => 'şimdi', 'diff_today' => 'bugün', 'diff_today_regexp' => 'bugün(?:\\s+saat)?', 'diff_yesterday' => 'dün', 'diff_tomorrow' => 'yarın', 'diff_tomorrow_regexp' => 'yarın(?:\\s+saat)?', 'diff_before_yesterday' => 'evvelsi gün', 'diff_after_tomorrow' => 'öbür gün', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[bugün saat] LT', 'nextDay' => '[yarın saat] LT', 'nextWeek' => '[gelecek] dddd [saat] LT', 'lastDay' => '[dün] LT', 'lastWeek' => '[geçen] dddd [saat] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { switch ($period) { case 'd': case 'D': case 'Do': case 'DD': return $number; default: if ($number === 0) { // special case for zero return "$number'ıncı"; } static $suffixes = [ 1 => '\'inci', 5 => '\'inci', 8 => '\'inci', 70 => '\'inci', 80 => '\'inci', 2 => '\'nci', 7 => '\'nci', 20 => '\'nci', 50 => '\'nci', 3 => '\'üncü', 4 => '\'üncü', 100 => '\'üncü', 6 => '\'ncı', 9 => '\'uncu', 10 => '\'uncu', 30 => '\'uncu', 60 => '\'ıncı', 90 => '\'ıncı', ]; $lastDigit = $number % 10; return $number.($suffixes[$lastDigit] ?? $suffixes[$number % 100 - $lastDigit] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); } }, 'meridiem' => ['ÖÖ', 'ÖS', 'öö', 'ös'], 'months' => ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'], 'months_short' => ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'], 'weekdays' => ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi'], 'weekdays_short' => ['Paz', 'Pts', 'Sal', 'Çar', 'Per', 'Cum', 'Cts'], 'weekdays_min' => ['Pz', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' ve '], ]; PKgt[x Carbon/Lang/ss.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Nicolai Davies */ return [ 'year' => '{1}umnyaka|:count iminyaka', 'month' => '{1}inyanga|:count tinyanga', 'week' => '{1}:count liviki|:count emaviki', 'day' => '{1}lilanga|:count emalanga', 'hour' => '{1}lihora|:count emahora', 'minute' => '{1}umzuzu|:count emizuzu', 'second' => '{1}emizuzwana lomcane|:count mzuzwana', 'ago' => 'wenteka nga :time', 'from_now' => 'nga :time', 'diff_yesterday' => 'Itolo', 'diff_yesterday_regexp' => 'Itolo(?:\\s+nga)?', 'diff_today' => 'Namuhla', 'diff_today_regexp' => 'Namuhla(?:\\s+nga)?', 'diff_tomorrow' => 'Kusasa', 'diff_tomorrow_regexp' => 'Kusasa(?:\\s+nga)?', 'formats' => [ 'LT' => 'h:mm A', 'LTS' => 'h:mm:ss A', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY h:mm A', 'LLLL' => 'dddd, D MMMM YYYY h:mm A', ], 'calendar' => [ 'sameDay' => '[Namuhla nga] LT', 'nextDay' => '[Kusasa nga] LT', 'nextWeek' => 'dddd [nga] LT', 'lastDay' => '[Itolo nga] LT', 'lastWeek' => 'dddd [leliphelile] [nga] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { $lastDigit = $number % 10; return $number.( ((int) ($number % 100 / 10) === 1) ? 'e' : ( ($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e' ) ); }, 'meridiem' => function ($hour) { if ($hour < 11) { return 'ekuseni'; } if ($hour < 15) { return 'emini'; } if ($hour < 19) { return 'entsambama'; } return 'ebusuku'; }, 'months' => ['Bhimbidvwane', 'Indlovana', 'Indlov\'lenkhulu', 'Mabasa', 'Inkhwekhweti', 'Inhlaba', 'Kholwane', 'Ingci', 'Inyoni', 'Imphala', 'Lweti', 'Ingongoni'], 'months_short' => ['Bhi', 'Ina', 'Inu', 'Mab', 'Ink', 'Inh', 'Kho', 'Igc', 'Iny', 'Imp', 'Lwe', 'Igo'], 'weekdays' => ['Lisontfo', 'Umsombuluko', 'Lesibili', 'Lesitsatfu', 'Lesine', 'Lesihlanu', 'Umgcibelo'], 'weekdays_short' => ['Lis', 'Umb', 'Lsb', 'Les', 'Lsi', 'Lsh', 'Umg'], 'weekdays_min' => ['Li', 'Us', 'Lb', 'Lt', 'Ls', 'Lh', 'Ug'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]; PKgt[pGGCarbon/Lang/en_DE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[zCarbon/Lang/shn_MM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - ubuntu Myanmar LoCo Team https://ubuntu-mm.net Bone Pyae Sone bone.burma@mail.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'OY MMM OD dddd', ], 'months' => ['လိူၼ်ၵမ်', 'လိူၼ်သၢမ်', 'လိူၼ်သီ', 'လိူၼ်ႁႃႈ', 'လိူၼ်ႁူၵ်း', 'လိူၼ်ၸဵတ်း', 'လိူၼ်ပႅတ်ႇ', 'လိူၼ်ၵဝ်ႈ', 'လိူၼ်သိပ်း', 'လိူၼ်သိပ်းဢိတ်း', 'လိူၼ်သိပ်းဢိတ်းသွင်', 'လိူၼ်ၸဵင်'], 'months_short' => ['လိူၼ်ၵမ်', 'လိူၼ်သၢမ်', 'လိူၼ်သီ', 'လိူၼ်ႁႃႈ', 'လိူၼ်ႁူၵ်း', 'လိူၼ်ၸဵတ်း', 'လိူၼ်ပႅတ်ႇ', 'လိူၼ်ၵဝ်ႈ', 'လိူၼ်သိပ်း', 'လိူၼ်သိပ်းဢိတ်း', 'လိူၼ်သိပ်းဢိတ်းသွင်', 'လိူၼ်ၸဵင်'], 'weekdays' => ['ဝၼ်းဢႃးတိတ်ႉ', 'ဝၼ်းၸၼ်', 'ဝၼ်း​ဢၢင်း​ၵၢၼ်း', 'ဝၼ်းပူတ်ႉ', 'ဝၼ်းၽတ်း', 'ဝၼ်းသုၵ်း', 'ဝၼ်းသဝ်'], 'weekdays_short' => ['တိတ့်', 'ၸၼ်', 'ၵၢၼ်း', 'ပုတ့်', 'ၽတ်း', 'သုၵ်း', 'သဝ်'], 'weekdays_min' => ['တိတ့်', 'ၸၼ်', 'ၵၢၼ်း', 'ပုတ့်', 'ၽတ်း', 'သုၵ်း', 'သဝ်'], 'alt_numbers' => ['႐႐', '႐႑', '႐႒', '႐႓', '႐႔', '႐႕', '႐႖', '႐႗', '႐႘', '႐႙', '႑႐', '႑႑', '႑႒', '႑႓', '႑႔', '႑႕', '႑႖', '႑႗', '႑႘', '႑႙', '႒႐', '႒႑', '႒႒', '႒႓', '႒႔', '႒႕', '႒႖', '႒႗', '႒႘', '႒႙', '႓႐', '႓႑', '႓႒', '႓႓', '႓႔', '႓႕', '႓႖', '႓႗', '႓႘', '႓႙', '႔႐', '႔႑', '႔႒', '႔႓', '႔႔', '႔႕', '႔႖', '႔႗', '႔႘', '႔႙', '႕႐', '႕႑', '႕႒', '႕႓', '႕႔', '႕႕', '႕႖', '႕႗', '႕႘', '႕႙', '႖႐', '႖႑', '႖႒', '႖႓', '႖႔', '႖႕', '႖႖', '႖႗', '႖႘', '႖႙', '႗႐', '႗႑', '႗႒', '႗႓', '႗႔', '႗႕', '႗႖', '႗႗', '႗႘', '႗႙', '႘႐', '႘႑', '႘႒', '႘႓', '႘႔', '႘႕', '႘႖', '႘႗', '႘႘', '႘႙', '႙႐', '႙႑', '႙႒', '႙႓', '႙႔', '႙႕', '႙႖', '႙႗', '႙႘', '႙႙'], 'meridiem' => ['ၵၢင်ၼႂ်', 'တၢမ်းၶမ်ႈ'], 'month' => ':count လိူၼ်', // less reliable 'm' => ':count လိူၼ်', // less reliable 'a_month' => ':count လိူၼ်', // less reliable 'week' => ':count ဝၼ်း', // less reliable 'w' => ':count ဝၼ်း', // less reliable 'a_week' => ':count ဝၼ်း', // less reliable 'hour' => ':count ຕີ', // less reliable 'h' => ':count ຕີ', // less reliable 'a_hour' => ':count ຕີ', // less reliable 'minute' => ':count ເດັກ', // less reliable 'min' => ':count ເດັກ', // less reliable 'a_minute' => ':count ເດັກ', // less reliable 'second' => ':count ဢိုၼ်ႇ', // less reliable 's' => ':count ဢိုၼ်ႇ', // less reliable 'a_second' => ':count ဢိုၼ်ႇ', // less reliable 'year' => ':count ပီ', 'y' => ':count ပီ', 'a_year' => ':count ပီ', 'day' => ':count ກາງວັນ', 'd' => ':count ກາງວັນ', 'a_day' => ':count ກາງວັນ', ]); PKgt[4NNCarbon/Lang/ia.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ia_FR.php'; PKgt[WCarbon/Lang/seh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Dimingu', 'Chiposi', 'Chipiri', 'Chitatu', 'Chinai', 'Chishanu', 'Sabudu'], 'weekdays_short' => ['Dim', 'Pos', 'Pir', 'Tat', 'Nai', 'Sha', 'Sab'], 'weekdays_min' => ['Dim', 'Pos', 'Pir', 'Tat', 'Nai', 'Sha', 'Sab'], 'months' => ['Janeiro', 'Fevreiro', 'Marco', 'Abril', 'Maio', 'Junho', 'Julho', 'Augusto', 'Setembro', 'Otubro', 'Novembro', 'Decembro'], 'months_short' => ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Aug', 'Set', 'Otu', 'Nov', 'Dec'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'd [de] MMM [de] YYYY', 'LLL' => 'd [de] MMMM [de] YYYY HH:mm', 'LLLL' => 'dddd, d [de] MMMM [de] YYYY HH:mm', ], ]); PKgt[JeCarbon/Lang/miq_NI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['siakwa kati', 'kuswa kati', 'kakamuk kati', 'lî wainhka kati', 'lih mairin kati', 'lî kati', 'pastara kati', 'sikla kati', 'wîs kati', 'waupasa kati', 'yahbra kati', 'trisu kati'], 'months_short' => ['siakwa kati', 'kuswa kati', 'kakamuk kati', 'lî wainhka kati', 'lih mairin kati', 'lî kati', 'pastara kati', 'sikla kati', 'wîs kati', 'waupasa kati', 'yahbra kati', 'trisu kati'], 'weekdays' => ['sandi', 'mundi', 'tiusdi', 'wensde', 'tausde', 'praidi', 'satadi'], 'weekdays_short' => ['san', 'mun', 'tius', 'wens', 'taus', 'prai', 'sat'], 'weekdays_min' => ['san', 'mun', 'tius', 'wens', 'taus', 'prai', 'sat'], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 7, 'meridiem' => ['VM', 'NM'], 'month' => ':count kati', // less reliable 'm' => ':count kati', // less reliable 'a_month' => ':count kati', // less reliable ]); PKgt[100Carbon/Lang/fil_PH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Rene Torres Rene Torres, Pablo Saratxaga rgtorre@rocketmail.com, pablo@mandrakesoft.com * - Jaycee Mariano (alohajaycee) */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'MM/DD/YY', ], 'months' => ['Enero', 'Pebrero', 'Marso', 'Abril', 'Mayo', 'Hunyo', 'Hulyo', 'Agosto', 'Setyembre', 'Oktubre', 'Nobyembre', 'Disyembre'], 'months_short' => ['Ene', 'Peb', 'Mar', 'Abr', 'May', 'Hun', 'Hul', 'Ago', 'Set', 'Okt', 'Nob', 'Dis'], 'weekdays' => ['Linggo', 'Lunes', 'Martes', 'Miyerkoles', 'Huwebes', 'Biyernes', 'Sabado'], 'weekdays_short' => ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'], 'weekdays_min' => ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['N.U.', 'N.H.'], 'before' => ':time bago', 'after' => ':time pagkatapos', 'year' => ':count taon', 'y' => ':count taon', 'a_year' => ':count taon', 'month' => ':count buwan', 'm' => ':count buwan', 'a_month' => ':count buwan', 'week' => ':count linggo', 'w' => ':count linggo', 'a_week' => ':count linggo', 'day' => ':count araw', 'd' => ':count araw', 'a_day' => ':count araw', 'hour' => ':count oras', 'h' => ':count oras', 'a_hour' => ':count oras', 'minute' => ':count minuto', 'min' => ':count minuto', 'a_minute' => ':count minuto', 'second' => ':count segundo', 's' => ':count segundo', 'a_second' => ':count segundo', 'ago' => ':time ang nakalipas', 'from_now' => 'sa :time', ]); PKgt[BCarbon/Lang/anp_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bhashaghar@googlegroups.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर"'], 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर'], 'weekdays' => ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'बृहस्पतिवार', 'शुक्रवार', 'शनिवार'], 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], ]); PKgt[Carbon/Lang/uz_Arab.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fa.php', [ 'weekdays' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'], 'weekdays_short' => ['ی.', 'د.', 'س.', 'چ.', 'پ.', 'ج.', 'ش.'], 'weekdays_min' => ['ی.', 'د.', 'س.', 'چ.', 'پ.', 'ج.', 'ش.'], 'months' => ['جنوری', 'فبروری', 'مارچ', 'اپریل', 'می', 'جون', 'جولای', 'اگست', 'سپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'months_short' => ['جنو', 'فبر', 'مار', 'اپر', 'می', 'جون', 'جول', 'اگس', 'سپت', 'اکت', 'نوم', 'دسم'], 'first_day_of_week' => 6, 'weekend' => [4, 5], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-dd', 'LL' => 'YYYY MMM D', 'LLL' => 'YYYY MMMM D HH:mm', 'LLLL' => 'YYYY MMMM D, dddd HH:mm', ], ]); PKgt[/kOOCarbon/Lang/wae.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/wae_CH.php'; PKgt[~` Carbon/Lang/sa_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - The Debian project Christian Perrier bubulle@debian.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D-MM-YY', ], 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], 'weekdays' => ['रविवासर:', 'सोमवासर:', 'मंगलवासर:', 'बुधवासर:', 'बृहस्पतिवासरः', 'शुक्रवासर', 'शनिवासर:'], 'weekdays_short' => ['रविः', 'सोम:', 'मंगल:', 'बुध:', 'बृहस्पतिः', 'शुक्र', 'शनि:'], 'weekdays_min' => ['रविः', 'सोम:', 'मंगल:', 'बुध:', 'बृहस्पतिः', 'शुक्र', 'शनि:'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], 'minute' => ':count होरा', // less reliable 'min' => ':count होरा', // less reliable 'a_minute' => ':count होरा', // less reliable 'year' => ':count वर्ष', 'y' => ':count वर्ष', 'a_year' => ':count वर्ष', 'month' => ':count मास', 'm' => ':count मास', 'a_month' => ':count मास', 'week' => ':count सप्ताहः saptahaĥ', 'w' => ':count सप्ताहः saptahaĥ', 'a_week' => ':count सप्ताहः saptahaĥ', 'day' => ':count दिन', 'd' => ':count दिन', 'a_day' => ':count दिन', 'hour' => ':count घण्टा', 'h' => ':count घण्टा', 'a_hour' => ':count घण्टा', 'second' => ':count द्वितीयः', 's' => ':count द्वितीयः', 'a_second' => ':count द्वितीयः', ]); PKgt[8OOCarbon/Lang/chr.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/chr_US.php'; PKgt['  Carbon/Lang/sq_AL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/sq.php'; PKgt[OOCarbon/Lang/nhn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/nhn_MX.php'; PKgt[?7  Carbon/Lang/pl_PL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/pl.php'; PKgt[F1k Carbon/Lang/ko.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kunal Marwaha * - FourwingsY * - François B * - Jason Katz-Brown * - Seokjun Kim * - Junho Kim * - JD Isaacks * - Juwon Kim */ return [ 'year' => ':count년', 'a_year' => '{1}일년|]1,Inf[:count년', 'y' => ':count년', 'month' => ':count개월', 'a_month' => '{1}한달|]1,Inf[:count개월', 'm' => ':count개월', 'week' => ':count주', 'a_week' => '{1}일주일|]1,Inf[:count 주', 'w' => ':count주일', 'day' => ':count일', 'a_day' => '{1}하루|]1,Inf[:count일', 'd' => ':count일', 'hour' => ':count시간', 'a_hour' => '{1}한시간|]1,Inf[:count시간', 'h' => ':count시간', 'minute' => ':count분', 'a_minute' => '{1}일분|]1,Inf[:count분', 'min' => ':count분', 'second' => ':count초', 'a_second' => '{1}몇초|]1,Inf[:count초', 's' => ':count초', 'ago' => ':time 전', 'from_now' => ':time 후', 'after' => ':time 후', 'before' => ':time 전', 'diff_now' => '지금', 'diff_today' => '오늘', 'diff_yesterday' => '어제', 'diff_tomorrow' => '내일', 'formats' => [ 'LT' => 'A h:mm', 'LTS' => 'A h:mm:ss', 'L' => 'YYYY.MM.DD.', 'LL' => 'YYYY년 MMMM D일', 'LLL' => 'YYYY년 MMMM D일 A h:mm', 'LLLL' => 'YYYY년 MMMM D일 dddd A h:mm', ], 'calendar' => [ 'sameDay' => '오늘 LT', 'nextDay' => '내일 LT', 'nextWeek' => 'dddd LT', 'lastDay' => '어제 LT', 'lastWeek' => '지난주 dddd LT', 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { switch ($period) { case 'd': case 'D': case 'DDD': return $number.'일'; case 'M': return $number.'월'; case 'w': case 'W': return $number.'주'; default: return $number; } }, 'meridiem' => ['오전', '오후'], 'months' => ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], 'months_short' => ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], 'weekdays' => ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'], 'weekdays_short' => ['일', '월', '화', '수', '목', '금', '토'], 'weekdays_min' => ['일', '월', '화', '수', '목', '금', '토'], 'list' => ' ', ]; PKgt[''x  Carbon/Lang/fr_RE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[*'. Carbon/Lang/tg.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Orif N. Jr */ return [ 'year' => '{1}як сол|:count сол', 'month' => '{1}як моҳ|:count моҳ', 'week' => '{1}як ҳафта|:count ҳафта', 'day' => '{1}як рӯз|:count рӯз', 'hour' => '{1}як соат|:count соат', 'minute' => '{1}як дақиқа|:count дақиқа', 'second' => '{1}якчанд сония|:count сония', 'ago' => ':time пеш', 'from_now' => 'баъди :time', 'diff_today' => 'Имрӯз', 'diff_yesterday' => 'Дирӯз', 'diff_yesterday_regexp' => 'Дирӯз(?:\\s+соати)?', 'diff_tomorrow' => 'Пагоҳ', 'diff_tomorrow_regexp' => 'Пагоҳ(?:\\s+соати)?', 'diff_today_regexp' => 'Имрӯз(?:\\s+соати)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Имрӯз соати] LT', 'nextDay' => '[Пагоҳ соати] LT', 'nextWeek' => 'dddd[и] [ҳафтаи оянда соати] LT', 'lastDay' => '[Дирӯз соати] LT', 'lastWeek' => 'dddd[и] [ҳафтаи гузашта соати] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { if ($number === 0) { // special case for zero return "$number-ıncı"; } static $suffixes = [ 0 => '-ум', 1 => '-ум', 2 => '-юм', 3 => '-юм', 4 => '-ум', 5 => '-ум', 6 => '-ум', 7 => '-ум', 8 => '-ум', 9 => '-ум', 10 => '-ум', 12 => '-ум', 13 => '-ум', 20 => '-ум', 30 => '-юм', 40 => '-ум', 50 => '-ум', 60 => '-ум', 70 => '-ум', 80 => '-ум', 90 => '-ум', 100 => '-ум', ]; return $number.($suffixes[$number] ?? $suffixes[$number % 10] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); }, 'meridiem' => function ($hour) { if ($hour < 4) { return 'шаб'; } if ($hour < 11) { return 'субҳ'; } if ($hour < 16) { return 'рӯз'; } if ($hour < 19) { return 'бегоҳ'; } return 'шаб'; }, 'months' => ['январ', 'феврал', 'март', 'апрел', 'май', 'июн', 'июл', 'август', 'сентябр', 'октябр', 'ноябр', 'декабр'], 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], 'weekdays' => ['якшанбе', 'душанбе', 'сешанбе', 'чоршанбе', 'панҷшанбе', 'ҷумъа', 'шанбе'], 'weekdays_short' => ['яшб', 'дшб', 'сшб', 'чшб', 'пшб', 'ҷум', 'шнб'], 'weekdays_min' => ['яш', 'дш', 'сш', 'чш', 'пш', 'ҷм', 'шб'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' ва '], ]; PKgt[haKCarbon/Lang/az_AZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Pablo Saratxaga pablo@mandrakesoft.com */ return array_replace_recursive(require __DIR__.'/az.php', [ 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek'], 'weekdays' => ['bazar günü', 'bazar ertəsi', 'çərşənbə axşamı', 'çərşənbə', 'cümə axşamı', 'cümə', 'şənbə'], 'weekdays_short' => ['baz', 'ber', 'çax', 'çər', 'cax', 'cüm', 'şnb'], 'weekdays_min' => ['baz', 'ber', 'çax', 'çər', 'cax', 'cüm', 'şnb'], ]); PKgt[]Carbon/Lang/fr_LU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months_short' => ['jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jui', 'aoû', 'sep', 'oct', 'nov', 'déc'], ]); PKgt[dCarbon/Lang/es_PY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[EAACarbon/Lang/fr_DZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'first_day_of_week' => 6, 'weekend' => [5, 6], 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd D MMMM YYYY h:mm a', ], ]); PKgt[7OOCarbon/Lang/tcy.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/tcy_IN.php'; PKgt[hk  Carbon/Lang/is_IS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/is.php'; PKgt[pGGCarbon/Lang/en_CM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[dOOCarbon/Lang/yuw.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/yuw_PG.php'; PKgt[8Carbon/Lang/my.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - JD Isaacks * - Nay Lin Aung */ return [ 'year' => '{1}တစ်နှစ်|]1,Inf[:count နှစ်', 'y' => ':count နှစ်', 'month' => '{1}တစ်လ|]1,Inf[:count လ', 'm' => ':count လ', 'week' => ':count ပတ်', 'w' => ':count ပတ်', 'day' => '{1}တစ်ရက်|]1,Inf[:count ရက်', 'd' => ':count ရက်', 'hour' => '{1}တစ်နာရီ|]1,Inf[:count နာရီ', 'h' => ':count နာရီ', 'minute' => '{1}တစ်မိနစ်|]1,Inf[:count မိနစ်', 'min' => ':count မိနစ်', 'second' => '{1}စက္ကန်.အနည်းငယ်|]1,Inf[:count စက္ကန့်', 's' => ':count စက္ကန့်', 'ago' => 'လွန်ခဲ့သော :time က', 'from_now' => 'လာမည့် :time မှာ', 'after' => ':time ကြာပြီးနောက်', 'before' => ':time မတိုင်ခင်', 'diff_now' => 'အခုလေးတင်', 'diff_today' => 'ယနေ.', 'diff_yesterday' => 'မနေ့က', 'diff_yesterday_regexp' => 'မနေ.က', 'diff_tomorrow' => 'မနက်ဖြန်', 'diff_before_yesterday' => 'တမြန်နေ့က', 'diff_after_tomorrow' => 'တဘက်ခါ', 'period_recurrences' => ':count ကြိမ်', 'formats' => [ 'LT' => 'Oh:Om A', 'LTS' => 'Oh:Om:Os A', 'L' => 'OD/OM/OY', 'LL' => 'OD MMMM OY', 'LLL' => 'OD MMMM OY Oh:Om A', 'LLLL' => 'dddd OD MMMM OY Oh:Om A', ], 'calendar' => [ 'sameDay' => '[ယနေ.] LT [မှာ]', 'nextDay' => '[မနက်ဖြန်] LT [မှာ]', 'nextWeek' => 'dddd LT [မှာ]', 'lastDay' => '[မနေ.က] LT [မှာ]', 'lastWeek' => '[ပြီးခဲ့သော] dddd LT [မှာ]', 'sameElse' => 'L', ], 'months' => ['ဇန်နဝါရီ', 'ဖေဖော်ဝါရီ', 'မတ်', 'ဧပြီ', 'မေ', 'ဇွန်', 'ဇူလိုင်', 'သြဂုတ်', 'စက်တင်ဘာ', 'အောက်တိုဘာ', 'နိုဝင်ဘာ', 'ဒီဇင်ဘာ'], 'months_short' => ['ဇန်', 'ဖေ', 'မတ်', 'ပြီ', 'မေ', 'ဇွန်', 'လိုင်', 'သြ', 'စက်', 'အောက်', 'နို', 'ဒီ'], 'weekdays' => ['တနင်္ဂနွေ', 'တနင်္လာ', 'အင်္ဂါ', 'ဗုဒ္ဓဟူး', 'ကြာသပတေး', 'သောကြာ', 'စနေ'], 'weekdays_short' => ['နွေ', 'လာ', 'ဂါ', 'ဟူး', 'ကြာ', 'သော', 'နေ'], 'weekdays_min' => ['နွေ', 'လာ', 'ဂါ', 'ဟူး', 'ကြာ', 'သော', 'နေ'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'alt_numbers' => ['၀၀', '၀၁', '၀၂', '၀၃', '၀၄', '၀၅', '၀၆', '၀၇', '၀၈', '၀၉', '၁၀', '၁၁', '၁၂', '၁၃', '၁၄', '၁၅', '၁၆', '၁၇', '၁၈', '၁၉', '၂၀', '၂၁', '၂၂', '၂၃', '၂၄', '၂၅', '၂၆', '၂၇', '၂၈', '၂၉', '၃၀', '၃၁', '၃၂', '၃၃', '၃၄', '၃၅', '၃၆', '၃၇', '၃၈', '၃၉', '၄၀', '၄၁', '၄၂', '၄၃', '၄၄', '၄၅', '၄၆', '၄၇', '၄၈', '၄၉', '၅၀', '၅၁', '၅၂', '၅၃', '၅၄', '၅၅', '၅၆', '၅၇', '၅၈', '၅၉', '၆၀', '၆၁', '၆၂', '၆၃', '၆၄', '၆၅', '၆၆', '၆၇', '၆၈', '၆၉', '၇၀', '၇၁', '၇၂', '၇၃', '၇၄', '၇၅', '၇၆', '၇၇', '၇၈', '၇၉', '၈၀', '၈၁', '၈၂', '၈၃', '၈၄', '၈၅', '၈၆', '၈၇', '၈၈', '၈၉', '၉၀', '၉၁', '၉၂', '၉၃', '၉၄', '၉၅', '၉၆', '၉၇', '၉၈', '၉၉'], 'meridiem' => ['နံနက်', 'ညနေ'], ]; PKgt[-!b>>Carbon/Lang/ar_SY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[}]Carbon/Lang/ru.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Bari Badamshin * - Jørn Ølmheim * - François B * - Tim Fish * - Коренберг Марк (imac) * - Serhan Apaydın * - RomeroMsk * - vsn4ik * - JD Isaacks * - Bari Badamshin * - Jørn Ølmheim * - François B * - Коренберг Марк (imac) * - Serhan Apaydın * - RomeroMsk * - vsn4ik * - JD Isaacks * - Fellzo * - andrey-helldar * - Pavel Skripkin (psxx) * - AlexWalkerson * - Vladislav UnsealedOne * - dima-bzz */ use Carbon\CarbonInterface; $transformDiff = function ($input) { return strtr($input, [ 'неделя' => 'неделю', 'секунда' => 'секунду', 'минута' => 'минуту', ]); }; return [ 'year' => ':count год|:count года|:count лет', 'y' => ':count г.|:count г.|:count л.', 'a_year' => '{1}год|:count год|:count года|:count лет', 'month' => ':count месяц|:count месяца|:count месяцев', 'm' => ':count мес.', 'a_month' => '{1}месяц|:count месяц|:count месяца|:count месяцев', 'week' => ':count неделя|:count недели|:count недель', 'w' => ':count нед.', 'a_week' => '{1}неделя|:count неделю|:count недели|:count недель', 'day' => ':count день|:count дня|:count дней', 'd' => ':count д.', 'a_day' => '{1}день|:count день|:count дня|:count дней', 'hour' => ':count час|:count часа|:count часов', 'h' => ':count ч.', 'a_hour' => '{1}час|:count час|:count часа|:count часов', 'minute' => ':count минута|:count минуты|:count минут', 'min' => ':count мин.', 'a_minute' => '{1}минута|:count минута|:count минуты|:count минут', 'second' => ':count секунда|:count секунды|:count секунд', 's' => ':count сек.', 'a_second' => '{1}несколько секунд|:count секунду|:count секунды|:count секунд', 'ago' => function ($time) use ($transformDiff) { return $transformDiff($time).' назад'; }, 'from_now' => function ($time) use ($transformDiff) { return 'через '.$transformDiff($time); }, 'after' => function ($time) use ($transformDiff) { return $transformDiff($time).' после'; }, 'before' => function ($time) use ($transformDiff) { return $transformDiff($time).' до'; }, 'diff_now' => 'только что', 'diff_today' => 'Сегодня,', 'diff_today_regexp' => 'Сегодня,?(?:\\s+в)?', 'diff_yesterday' => 'вчера', 'diff_yesterday_regexp' => 'Вчера,?(?:\\s+в)?', 'diff_tomorrow' => 'завтра', 'diff_tomorrow_regexp' => 'Завтра,?(?:\\s+в)?', 'diff_before_yesterday' => 'позавчера', 'diff_after_tomorrow' => 'послезавтра', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY г.', 'LLL' => 'D MMMM YYYY г., H:mm', 'LLLL' => 'dddd, D MMMM YYYY г., H:mm', ], 'calendar' => [ 'sameDay' => '[Сегодня, в] LT', 'nextDay' => '[Завтра, в] LT', 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { if ($current->week !== $other->week) { switch ($current->dayOfWeek) { case 0: return '[В следующее] dddd, [в] LT'; case 1: case 2: case 4: return '[В следующий] dddd, [в] LT'; case 3: case 5: case 6: return '[В следующую] dddd, [в] LT'; } } if ($current->dayOfWeek === 2) { return '[Во] dddd, [в] LT'; } return '[В] dddd, [в] LT'; }, 'lastDay' => '[Вчера, в] LT', 'lastWeek' => function (CarbonInterface $current, CarbonInterface $other) { if ($current->week !== $other->week) { switch ($current->dayOfWeek) { case 0: return '[В прошлое] dddd, [в] LT'; case 1: case 2: case 4: return '[В прошлый] dddd, [в] LT'; case 3: case 5: case 6: return '[В прошлую] dddd, [в] LT'; } } if ($current->dayOfWeek === 2) { return '[Во] dddd, [в] LT'; } return '[В] dddd, [в] LT'; }, 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { switch ($period) { case 'M': case 'd': case 'DDD': return $number.'-й'; case 'D': return $number.'-го'; case 'w': case 'W': return $number.'-я'; default: return $number; } }, 'meridiem' => function ($hour) { if ($hour < 4) { return 'ночи'; } if ($hour < 12) { return 'утра'; } if ($hour < 17) { return 'дня'; } return 'вечера'; }, 'months' => ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'], 'months_standalone' => ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'], 'months_short' => ['янв', 'фев', 'мар', 'апр', 'мая', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], 'months_short_standalone' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], 'months_regexp' => '/(DD?o?\.?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', 'weekdays' => ['воскресенье', 'понедельник', 'вторник', 'среду', 'четверг', 'пятницу', 'субботу'], 'weekdays_standalone' => ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'], 'weekdays_short' => ['вск', 'пнд', 'втр', 'срд', 'чтв', 'птн', 'сбт'], 'weekdays_min' => ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], 'weekdays_regexp' => '/\[\s*(В|в)\s*((?:прошлую|следующую|эту)\s*)?\]\s*dddd/', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' и '], ]; PKgt[J> OOCarbon/Lang/lzh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/lzh_TW.php'; PKgt[-!b>>Carbon/Lang/ar_JO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[* TCarbon/Lang/nmg.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['maná', 'kugú'], 'weekdays' => ['sɔ́ndɔ', 'mɔ́ndɔ', 'sɔ́ndɔ mafú mába', 'sɔ́ndɔ mafú málal', 'sɔ́ndɔ mafú mána', 'mabágá má sukul', 'sásadi'], 'weekdays_short' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'mbs', 'sas'], 'weekdays_min' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'mbs', 'sas'], 'months' => ['ngwɛn matáhra', 'ngwɛn ńmba', 'ngwɛn ńlal', 'ngwɛn ńna', 'ngwɛn ńtan', 'ngwɛn ńtuó', 'ngwɛn hɛmbuɛrí', 'ngwɛn lɔmbi', 'ngwɛn rɛbvuâ', 'ngwɛn wum', 'ngwɛn wum navǔr', 'krísimin'], 'months_short' => ['ng1', 'ng2', 'ng3', 'ng4', 'ng5', 'ng6', 'ng7', 'ng8', 'ng9', 'ng10', 'ng11', 'kris'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], ]); PKgt[''x  Carbon/Lang/fr_GN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[ Carbon/Lang/da_GL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/da.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', 'LL' => 'D. MMM YYYY', 'LLL' => 'D. MMMM YYYY HH.mm', 'LLLL' => 'dddd [den] D. MMMM YYYY HH.mm', ], ]); PKgt[vCarbon/Lang/so_DJ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/so.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], ]); PKgt[ `Carbon/Lang/es_MX.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'diff_before_yesterday' => 'antier', 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[Ym6]VVCarbon/Lang/doi_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Red Hat Pune libc-alpha@sourceware.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'एप्रैल', 'मेई', 'जून', 'जूलै', 'अगस्त', 'सितंबर', 'अक्तूबर', 'नवंबर', 'दिसंबर'], 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'एप्रैल', 'मेई', 'जून', 'जूलै', 'अगस्त', 'सितंबर', 'अक्तूबर', 'नवंबर', 'दिसंबर'], 'weekdays' => ['ऐतबार', 'सोमबार', 'मंगलबर', 'बुधबार', 'बीरबार', 'शुक्करबार', 'श्नीचरबार'], 'weekdays_short' => ['ऐत', 'सोम', 'मंगल', 'बुध', 'बीर', 'शुक्कर', 'श्नीचर'], 'weekdays_min' => ['ऐत', 'सोम', 'मंगल', 'बुध', 'बीर', 'शुक्कर', 'श्नीचर'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['सञं', 'सबेर'], 'second' => ':count सङार', // less reliable 's' => ':count सङार', // less reliable 'a_second' => ':count सङार', // less reliable ]); PKgt[2Carbon/Lang/sid_ET.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 'weekdays' => ['Sambata', 'Sanyo', 'Maakisanyo', 'Roowe', 'Hamuse', 'Arbe', 'Qidaame'], 'weekdays_short' => ['Sam', 'San', 'Mak', 'Row', 'Ham', 'Arb', 'Qid'], 'weekdays_min' => ['Sam', 'San', 'Mak', 'Row', 'Ham', 'Arb', 'Qid'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['soodo', 'hawwaro'], ]); PKgt[ZCarbon/Lang/nan_TW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY年MM月DD日', ], 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], 'months_short' => [' 1月', ' 2月', ' 3月', ' 4月', ' 5月', ' 6月', ' 7月', ' 8月', ' 9月', '10月', '11月', '12月'], 'weekdays' => ['禮拜日', '禮拜一', '禮拜二', '禮拜三', '禮拜四', '禮拜五', '禮拜六'], 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['頂晡', '下晡'], 'year' => ':count 年', 'y' => ':count 年', 'a_year' => ':count 年', 'month' => ':count goe̍h', 'm' => ':count goe̍h', 'a_month' => ':count goe̍h', 'week' => ':count lé-pài', 'w' => ':count lé-pài', 'a_week' => ':count lé-pài', 'day' => ':count 日', 'd' => ':count 日', 'a_day' => ':count 日', 'hour' => ':count tiám-cheng', 'h' => ':count tiám-cheng', 'a_hour' => ':count tiám-cheng', 'minute' => ':count Hun-cheng', 'min' => ':count Hun-cheng', 'a_minute' => ':count Hun-cheng', 'second' => ':count Bió', 's' => ':count Bió', 'a_second' => ':count Bió', ]); PKgt[tCarbon/Lang/tk_TM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Authors: * - Ghorban M. Tavakoly Pablo Saratxaga & Ghorban M. Tavakoly pablo@walon.org & gmt314@yahoo.com * - SuperManPHP * - Maksat Meredow (isadma) */ $transformDiff = function ($input) { return strtr($input, [ 'sekunt' => 'sekunt', 'hepde' => 'hepde', ]); }; return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['Ýanwar', 'Fewral', 'Mart', 'Aprel', 'Maý', 'Iýun', 'Iýul', 'Awgust', 'Sentýabr', 'Oktýabr', 'Noýabr', 'Dekabr'], 'months_short' => ['Ýan', 'Few', 'Mar', 'Apr', 'Maý', 'Iýn', 'Iýl', 'Awg', 'Sen', 'Okt', 'Noý', 'Dek'], 'weekdays' => ['Duşenbe', 'Sişenbe', 'Çarşenbe', 'Penşenbe', 'Anna', 'Şenbe', 'Ýekşenbe'], 'weekdays_short' => ['Duş', 'Siş', 'Çar', 'Pen', 'Ann', 'Şen', 'Ýek'], 'weekdays_min' => ['Du', 'Si', 'Ça', 'Pe', 'An', 'Şe', 'Ýe'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => ':count ýyl', 'y' => ':count ýyl', 'a_year' => ':count ýyl', 'month' => ':count aý', 'm' => ':count aý', 'a_month' => ':count aý', 'week' => ':count hepde', 'w' => ':count hepde', 'a_week' => ':count hepde', 'day' => ':count gün', 'd' => ':count gün', 'a_day' => ':count gün', 'hour' => ':count sagat', 'h' => ':count sagat', 'a_hour' => ':count sagat', 'minute' => ':count minut', 'min' => ':count minut', 'a_minute' => ':count minut', 'second' => ':count sekunt', 's' => ':count sekunt', 'a_second' => ':count sekunt', 'ago' => function ($time) use ($transformDiff) { return $transformDiff($time).' ozal'; }, 'from_now' => function ($time) use ($transformDiff) { return $transformDiff($time).' soňra'; }, 'after' => function ($time) use ($transformDiff) { return $transformDiff($time).' soň'; }, 'before' => function ($time) use ($transformDiff) { return $transformDiff($time).' öň'; }, ]); PKgt[T.CCCarbon/Lang/jmc.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['utuko', 'kyiukonyi'], 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'months' => ['Januari', 'Februari', 'Machi', 'Aprilyi', 'Mei', 'Junyi', 'Julyai', 'Agusti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[Hv|Carbon/Lang/bho_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bhashaghar@googlegroups.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर"'], 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर"'], 'weekdays' => ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'], 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'], 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], 'hour' => ':count मौसम', 'h' => ':count मौसम', 'a_hour' => ':count मौसम', 'minute' => ':count कला', 'min' => ':count कला', 'a_minute' => ':count कला', 'second' => ':count सोमार', 's' => ':count सोमार', 'a_second' => ':count सोमार', 'year' => ':count साल', 'y' => ':count साल', 'a_year' => ':count साल', 'month' => ':count महिना', 'm' => ':count महिना', 'a_month' => ':count महिना', 'week' => ':count सप्ताह', 'w' => ':count सप्ताह', 'a_week' => ':count सप्ताह', 'day' => ':count दिन', 'd' => ':count दिन', 'a_day' => ':count दिन', ]); PKgt[-!b>>Carbon/Lang/ar_IQ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[5ƭ  Carbon/Lang/gsw.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Christopher Dell * - Akira Matsuda * - Enrique Vidal * - Simone Carletti * - Henning Kiel * - Aaron Patterson * - Florian Hanke */ return [ 'year' => ':count Johr', 'month' => ':count Monet', 'week' => ':count Woche', 'day' => ':count Tag', 'hour' => ':count Schtund', 'minute' => ':count Minute', 'second' => ':count Sekunde', 'weekdays' => ['Sunntig', 'Mäntig', 'Ziischtig', 'Mittwuch', 'Dunschtig', 'Friitig', 'Samschtig'], 'weekdays_short' => ['Su', 'Mä', 'Zi', 'Mi', 'Du', 'Fr', 'Sa'], 'weekdays_min' => ['Su', 'Mä', 'Zi', 'Mi', 'Du', 'Fr', 'Sa'], 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'September', 'Oktober', 'November', 'Dezember'], 'months_short' => ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], 'meridiem' => ['am Vormittag', 'am Namittag'], 'ordinal' => ':number.', 'list' => [', ', ' und '], 'diff_now' => 'now', 'diff_yesterday' => 'geschter', 'diff_tomorrow' => 'moorn', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'Do MMMM YYYY', 'LLL' => 'Do MMMM, HH:mm [Uhr]', 'LLLL' => 'dddd, Do MMMM YYYY, HH:mm [Uhr]', ], ]; PKgt[pGGCarbon/Lang/en_SX.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[}OOCarbon/Lang/mfe.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/mfe_MU.php'; PKgt[''x  Carbon/Lang/fr_FR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[NJCarbon/Lang/sc_IT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Sardinian Translators Team Massimeddu Cireddu massimeddu@gmail.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD. MM. YY', ], 'months' => ['Ghennàrgiu', 'Freàrgiu', 'Martzu', 'Abrile', 'Maju', 'Làmpadas', 'Argiolas//Trìulas', 'Austu', 'Cabudanni', 'Santugaine//Ladàmine', 'Onniasantu//Santandria', 'Nadale//Idas'], 'months_short' => ['Ghe', 'Fre', 'Mar', 'Abr', 'Maj', 'Làm', 'Arg', 'Aus', 'Cab', 'Lad', 'Onn', 'Nad'], 'weekdays' => ['Domìnigu', 'Lunis', 'Martis', 'Mèrcuris', 'Giòbia', 'Chenàbura', 'Sàbadu'], 'weekdays_short' => ['Dom', 'Lun', 'Mar', 'Mèr', 'Giò', 'Che', 'Sàb'], 'weekdays_min' => ['Dom', 'Lun', 'Mar', 'Mèr', 'Giò', 'Che', 'Sàb'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'minute' => ':count mementu', // less reliable 'min' => ':count mementu', // less reliable 'a_minute' => ':count mementu', // less reliable 'year' => ':count annu', 'y' => ':count annu', 'a_year' => ':count annu', 'month' => ':count mese', 'm' => ':count mese', 'a_month' => ':count mese', 'week' => ':count chida', 'w' => ':count chida', 'a_week' => ':count chida', 'day' => ':count dí', 'd' => ':count dí', 'a_day' => ':count dí', 'hour' => ':count ora', 'h' => ':count ora', 'a_hour' => ':count ora', 'second' => ':count secundu', 's' => ':count secundu', 'a_second' => ':count secundu', ]); PKgt[ߜHHCarbon/Lang/mas_TZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/mas.php', [ 'first_day_of_week' => 1, ]); PKgt[pGGCarbon/Lang/en_FJ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[9##Carbon/Lang/fr_TN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'weekend' => [5, 6], 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd D MMMM YYYY h:mm a', ], ]); PKgt[6kkCarbon/Lang/pap_AW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - information from native speaker Pablo Saratxaga pablo@mandrakesoft.com */ return require __DIR__.'/pap.php'; PKgt[HDDCarbon/Lang/it_IT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return require __DIR__.'/it.php'; PKgt[v}V V Carbon/Lang/gom_Latn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return [ 'year' => ':count voros|:count vorsam', 'y' => ':countv', 'month' => ':count mhoino|:count mhoine', 'm' => ':countmh', 'week' => ':count satolleacho|:count satolleache', 'w' => ':countsa|:countsa', 'day' => ':count dis', 'd' => ':countd', 'hour' => ':count hor|:count horam', 'h' => ':counth', 'minute' => ':count minute|:count mintam', 'min' => ':countm', 'second' => ':count second', 's' => ':counts', 'diff_today' => 'Aiz', 'diff_yesterday' => 'Kal', 'diff_tomorrow' => 'Faleam', 'formats' => [ 'LT' => 'A h:mm [vazta]', 'LTS' => 'A h:mm:ss [vazta]', 'L' => 'DD-MM-YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY A h:mm [vazta]', 'LLLL' => 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]', 'llll' => 'ddd, D MMM YYYY, A h:mm [vazta]', ], 'calendar' => [ 'sameDay' => '[Aiz] LT', 'nextDay' => '[Faleam] LT', 'nextWeek' => '[Ieta to] dddd[,] LT', 'lastDay' => '[Kal] LT', 'lastWeek' => '[Fatlo] dddd[,] LT', 'sameElse' => 'L', ], 'months' => ['Janer', 'Febrer', 'Mars', 'Abril', 'Mai', 'Jun', 'Julai', 'Agost', 'Setembr', 'Otubr', 'Novembr', 'Dezembr'], 'months_short' => ['Jan.', 'Feb.', 'Mars', 'Abr.', 'Mai', 'Jun', 'Jul.', 'Ago.', 'Set.', 'Otu.', 'Nov.', 'Dez.'], 'weekdays' => ['Aitar', 'Somar', 'Mongllar', 'Budvar', 'Brestar', 'Sukrar', 'Son\'var'], 'weekdays_short' => ['Ait.', 'Som.', 'Mon.', 'Bud.', 'Bre.', 'Suk.', 'Son.'], 'weekdays_min' => ['Ai', 'Sm', 'Mo', 'Bu', 'Br', 'Su', 'Sn'], 'ordinal' => function ($number, $period) { return $number.($period === 'D' ? 'er' : ''); }, 'meridiem' => function ($hour) { if ($hour < 4) { return 'rati'; } if ($hour < 12) { return 'sokalli'; } if ($hour < 16) { return 'donparam'; } if ($hour < 20) { return 'sanje'; } return 'rati'; }, 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' ani '], ]; PKgt[  Carbon/Lang/sr_Latn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/sr.php'; PKgt[Carbon/Lang/nnh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['mbaʼámbaʼ', 'ncwònzém'], 'weekdays' => null, 'weekdays_short' => ['lyɛʼɛ́ sẅíŋtè', 'mvfò lyɛ̌ʼ', 'mbɔ́ɔntè mvfò lyɛ̌ʼ', 'tsètsɛ̀ɛ lyɛ̌ʼ', 'mbɔ́ɔntè tsetsɛ̀ɛ lyɛ̌ʼ', 'mvfò màga lyɛ̌ʼ', 'màga lyɛ̌ʼ'], 'weekdays_min' => null, 'months' => null, 'months_short' => ['saŋ tsetsɛ̀ɛ lùm', 'saŋ kàg ngwóŋ', 'saŋ lepyè shúm', 'saŋ cÿó', 'saŋ tsɛ̀ɛ cÿó', 'saŋ njÿoláʼ', 'saŋ tyɛ̀b tyɛ̀b mbʉ̀ŋ', 'saŋ mbʉ̀ŋ', 'saŋ ngwɔ̀ʼ mbÿɛ', 'saŋ tàŋa tsetsáʼ', 'saŋ mejwoŋó', 'saŋ lùm'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/yy', 'LL' => 'D MMM, YYYY', 'LLL' => '[lyɛ]̌ʼ d [na] MMMM, YYYY HH:mm', 'LLLL' => 'dddd , [lyɛ]̌ʼ d [na] MMMM, YYYY HH:mm', ], ]); PKgt[#z Carbon/Lang/ga.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Thanks to André Silva : https://github.com/askpt */ return [ 'year' => ':count bliain', 'a_year' => '{1}bliain|:count bliain', 'y' => ':countb', 'month' => ':count mí', 'a_month' => '{1}mí|:count mí', 'm' => ':countm', 'week' => ':count sheachtain', 'a_week' => '{1}sheachtain|:count sheachtain', 'w' => ':countsh', 'day' => ':count lá', 'a_day' => '{1}lá|:count lá', 'd' => ':countl', 'hour' => ':count uair an chloig', 'a_hour' => '{1}uair an chloig|:count uair an chloig', 'h' => ':countu', 'minute' => ':count nóiméad', 'a_minute' => '{1}nóiméad|:count nóiméad', 'min' => ':countn', 'second' => ':count soicind', 'a_second' => '{1}cúpla soicind|:count soicind', 's' => ':countso', 'ago' => ':time ó shin', 'from_now' => 'i :time', 'after' => ':time tar éis', 'before' => ':time roimh', 'diff_now' => 'anois', 'diff_today' => 'Inniu', 'diff_today_regexp' => 'Inniu(?:\\s+ag)?', 'diff_yesterday' => 'inné', 'diff_yesterday_regexp' => 'Inné(?:\\s+aig)?', 'diff_tomorrow' => 'amárach', 'diff_tomorrow_regexp' => 'Amárach(?:\\s+ag)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Inniu ag] LT', 'nextDay' => '[Amárach ag] LT', 'nextWeek' => 'dddd [ag] LT', 'lastDay' => '[Inné aig] LT', 'lastWeek' => 'dddd [seo caite] [ag] LT', 'sameElse' => 'L', ], 'months' => ['Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Méitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deaireadh Fómhair', 'Samhain', 'Nollaig'], 'months_short' => ['Eaná', 'Feab', 'Márt', 'Aibr', 'Beal', 'Méit', 'Iúil', 'Lúna', 'Meán', 'Deai', 'Samh', 'Noll'], 'weekdays' => ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Satharn'], 'weekdays_short' => ['Dom', 'Lua', 'Mái', 'Céa', 'Déa', 'hAo', 'Sat'], 'weekdays_min' => ['Do', 'Lu', 'Má', 'Ce', 'Dé', 'hA', 'Sa'], 'ordinal' => function ($number) { return $number.($number === 1 ? 'd' : ($number % 10 === 2 ? 'na' : 'mh')); }, 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' agus '], 'meridiem' => ['r.n.', 'i.n.'], ]; PKgt[pGGCarbon/Lang/en_GD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[ 8((Carbon/Lang/ms_SG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ms.php', [ 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'D/MM/yy', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY, h:mm a', 'LLLL' => 'dddd, D MMMM YYYY, h:mm a', ], 'meridiem' => ['a', 'p'], ]); PKgt[ECarbon/Lang/mfe_MU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['zanvie', 'fevriye', 'mars', 'avril', 'me', 'zin', 'zilye', 'out', 'septam', 'oktob', 'novam', 'desam'], 'months_short' => ['zan', 'fev', 'mar', 'avr', 'me', 'zin', 'zil', 'out', 'sep', 'okt', 'nov', 'des'], 'weekdays' => ['dimans', 'lindi', 'mardi', 'merkredi', 'zedi', 'vandredi', 'samdi'], 'weekdays_short' => ['dim', 'lin', 'mar', 'mer', 'ze', 'van', 'sam'], 'weekdays_min' => ['dim', 'lin', 'mar', 'mer', 'ze', 'van', 'sam'], 'year' => ':count banané', 'y' => ':count banané', 'a_year' => ':count banané', 'month' => ':count mwa', 'm' => ':count mwa', 'a_month' => ':count mwa', 'week' => ':count sémenn', 'w' => ':count sémenn', 'a_week' => ':count sémenn', 'day' => ':count zour', 'd' => ':count zour', 'a_day' => ':count zour', 'hour' => ':count -er-tan', 'h' => ':count -er-tan', 'a_hour' => ':count -er-tan', 'minute' => ':count minitt', 'min' => ':count minitt', 'a_minute' => ':count minitt', 'second' => ':count déziém', 's' => ':count déziém', 'a_second' => ':count déziém', ]); PKgt[ɠnd  Carbon/Lang/oc_FR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/oc.php'; PKgt[Carbon/Lang/de_CH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - sheriffmarley * - Timo * - Michael Hohl */ return array_replace_recursive(require __DIR__.'/de.php', [ 'weekdays_short' => ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], ]); PKgt[UppCarbon/Lang/lv.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Carbon\CarbonInterface; /** * This file is part of the Carbon package. * * (c) Brian Nesbitt * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - pirminis * - Tsutomu Kuroda * - tjku * - Andris Zāģeris * - Max Melentiev * - Edgars Beigarts * - Juanito Fatas * - Vitauts Stočka * - Akira Matsuda * - Christopher Dell * - Enrique Vidal * - Simone Carletti * - Aaron Patterson * - Kaspars Bankovskis * - Nicolás Hock Isaza * - Viesturs Kavacs (Kavacky) * - zakse * - Janis Eglitis (janiseglitis) * - Guntars * - Juris Sudmalis */ $daysOfWeek = ['svētdiena', 'pirmdiena', 'otrdiena', 'trešdiena', 'ceturtdiena', 'piektdiena', 'sestdiena']; $daysOfWeekLocativum = ['svētdien', 'pirmdien', 'otrdien', 'trešdien', 'ceturtdien', 'piektdien', 'sestdien']; $transformDiff = function ($input) { return strtr($input, [ // Nominative => "pirms/pēc" Dative 'gads' => 'gada', 'gadi' => 'gadiem', 'gadu' => 'gadiem', 'mēnesis' => 'mēneša', 'mēneši' => 'mēnešiem', 'mēnešu' => 'mēnešiem', 'nedēļa' => 'nedēļas', 'nedēļas' => 'nedēļām', 'nedēļu' => 'nedēļām', 'diena' => 'dienas', 'dienas' => 'dienām', 'dienu' => 'dienām', 'stunda' => 'stundas', 'stundas' => 'stundām', 'stundu' => 'stundām', 'minūte' => 'minūtes', 'minūtes' => 'minūtēm', 'minūšu' => 'minūtēm', 'sekunde' => 'sekundes', 'sekundes' => 'sekundēm', 'sekunžu' => 'sekundēm', ]); }; return [ 'ago' => function ($time) use ($transformDiff) { return 'pirms '.$transformDiff($time); }, 'from_now' => function ($time) use ($transformDiff) { return 'pēc '.$transformDiff($time); }, 'year' => '0 gadu|:count gads|:count gadi', 'y' => ':count g.', 'a_year' => '{1}gads|0 gadu|:count gads|:count gadi', 'month' => '0 mēnešu|:count mēnesis|:count mēneši', 'm' => ':count mēn.', 'a_month' => '{1}mēnesis|0 mēnešu|:count mēnesis|:count mēneši', 'week' => '0 nedēļu|:count nedēļa|:count nedēļas', 'w' => ':count ned.', 'a_week' => '{1}nedēļa|0 nedēļu|:count nedēļa|:count nedēļas', 'day' => '0 dienu|:count diena|:count dienas', 'd' => ':count d.', 'a_day' => '{1}diena|0 dienu|:count diena|:count dienas', 'hour' => '0 stundu|:count stunda|:count stundas', 'h' => ':count st.', 'a_hour' => '{1}stunda|0 stundu|:count stunda|:count stundas', 'minute' => '0 minūšu|:count minūte|:count minūtes', 'min' => ':count min.', 'a_minute' => '{1}minūte|0 minūšu|:count minūte|:count minūtes', 'second' => '0 sekunžu|:count sekunde|:count sekundes', 's' => ':count sek.', 'a_second' => '{1}sekunde|0 sekunžu|:count sekunde|:count sekundes', 'after' => ':time vēlāk', 'year_after' => '0 gadus|:count gadu|:count gadus', 'a_year_after' => '{1}gadu|0 gadus|:count gadu|:count gadus', 'month_after' => '0 mēnešus|:count mēnesi|:count mēnešus', 'a_month_after' => '{1}mēnesi|0 mēnešus|:count mēnesi|:count mēnešus', 'week_after' => '0 nedēļas|:count nedēļu|:count nedēļas', 'a_week_after' => '{1}nedēļu|0 nedēļas|:count nedēļu|:count nedēļas', 'day_after' => '0 dienas|:count dienu|:count dienas', 'a_day_after' => '{1}dienu|0 dienas|:count dienu|:count dienas', 'hour_after' => '0 stundas|:count stundu|:count stundas', 'a_hour_after' => '{1}stundu|0 stundas|:count stundu|:count stundas', 'minute_after' => '0 minūtes|:count minūti|:count minūtes', 'a_minute_after' => '{1}minūti|0 minūtes|:count minūti|:count minūtes', 'second_after' => '0 sekundes|:count sekundi|:count sekundes', 'a_second_after' => '{1}sekundi|0 sekundes|:count sekundi|:count sekundes', 'before' => ':time agrāk', 'year_before' => '0 gadus|:count gadu|:count gadus', 'a_year_before' => '{1}gadu|0 gadus|:count gadu|:count gadus', 'month_before' => '0 mēnešus|:count mēnesi|:count mēnešus', 'a_month_before' => '{1}mēnesi|0 mēnešus|:count mēnesi|:count mēnešus', 'week_before' => '0 nedēļas|:count nedēļu|:count nedēļas', 'a_week_before' => '{1}nedēļu|0 nedēļas|:count nedēļu|:count nedēļas', 'day_before' => '0 dienas|:count dienu|:count dienas', 'a_day_before' => '{1}dienu|0 dienas|:count dienu|:count dienas', 'hour_before' => '0 stundas|:count stundu|:count stundas', 'a_hour_before' => '{1}stundu|0 stundas|:count stundu|:count stundas', 'minute_before' => '0 minūtes|:count minūti|:count minūtes', 'a_minute_before' => '{1}minūti|0 minūtes|:count minūti|:count minūtes', 'second_before' => '0 sekundes|:count sekundi|:count sekundes', 'a_second_before' => '{1}sekundi|0 sekundes|:count sekundi|:count sekundes', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' un '], 'diff_now' => 'tagad', 'diff_today' => 'šodien', 'diff_yesterday' => 'vakar', 'diff_before_yesterday' => 'aizvakar', 'diff_tomorrow' => 'rīt', 'diff_after_tomorrow' => 'parīt', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY.', 'LL' => 'YYYY. [gada] D. MMMM', 'LLL' => 'DD.MM.YYYY., HH:mm', 'LLLL' => 'YYYY. [gada] D. MMMM, HH:mm', ], 'calendar' => [ 'sameDay' => '[šodien] [plkst.] LT', 'nextDay' => '[rīt] [plkst.] LT', 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) use ($daysOfWeekLocativum) { if ($current->week !== $other->week) { return '[nākošo] ['.$daysOfWeekLocativum[$current->dayOfWeek].'] [plkst.] LT'; } return '['.$daysOfWeekLocativum[$current->dayOfWeek].'] [plkst.] LT'; }, 'lastDay' => '[vakar] [plkst.] LT', 'lastWeek' => function (CarbonInterface $current) use ($daysOfWeekLocativum) { return '[pagājušo] ['.$daysOfWeekLocativum[$current->dayOfWeek].'] [plkst.] LT'; }, 'sameElse' => 'L', ], 'weekdays' => $daysOfWeek, 'weekdays_short' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'], 'weekdays_min' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'], 'months' => ['janvāris', 'februāris', 'marts', 'aprīlis', 'maijs', 'jūnijs', 'jūlijs', 'augusts', 'septembris', 'oktobris', 'novembris', 'decembris'], 'months_standalone' => ['janvārī', 'februārī', 'martā', 'aprīlī', 'maijā', 'jūnijā', 'jūlijā', 'augustā', 'septembrī', 'oktobrī', 'novembrī', 'decembrī'], 'months_short' => ['janv.', 'febr.', 'martā', 'apr.', 'maijā', 'jūn.', 'jūl.', 'aug.', 'sept.', 'okt.', 'nov.', 'dec.'], 'meridiem' => ['priekšpusdiena', 'pēcpusdiena'], ]; PKgt[?Ej  Carbon/Lang/en_US.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[."NNCarbon/Lang/wa.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/wa_BE.php'; PKgt[dCarbon/Lang/es_419.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[pGGCarbon/Lang/en_MG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[̄A.Carbon/Lang/el_CY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Greek Debian Translation Team bug-glibc@gnu.org */ return array_replace_recursive(require __DIR__.'/el.php', [ 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[T.CCCarbon/Lang/vun.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['utuko', 'kyiukonyi'], 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'months' => ['Januari', 'Februari', 'Machi', 'Aprilyi', 'Mei', 'Junyi', 'Julyai', 'Agusti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[''x  Carbon/Lang/fr_ML.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[bMNNCarbon/Lang/ce.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ce_RU.php'; PKgt[nvB]??Carbon/Lang/pt.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Cassiano Montanari * - Matt Pope * - François B * - Prodis * - JD Isaacks * - Raphael Amorim * - João Magalhães * - victortobias * - Paulo Freitas * - Sebastian Thierer * - Claudson Martins (claudsonm) */ use Carbon\CarbonInterface; return [ 'year' => ':count ano|:count anos', 'a_year' => 'um ano|:count anos', 'y' => ':counta', 'month' => ':count mês|:count meses', 'a_month' => 'um mês|:count meses', 'm' => ':countm', 'week' => ':count semana|:count semanas', 'a_week' => 'uma semana|:count semanas', 'w' => ':countsem', 'day' => ':count dia|:count dias', 'a_day' => 'um dia|:count dias', 'd' => ':countd', 'hour' => ':count hora|:count horas', 'a_hour' => 'uma hora|:count horas', 'h' => ':counth', 'minute' => ':count minuto|:count minutos', 'a_minute' => 'um minuto|:count minutos', 'min' => ':countmin', 'second' => ':count segundo|:count segundos', 'a_second' => 'alguns segundos|:count segundos', 's' => ':counts', 'millisecond' => ':count milissegundo|:count milissegundos', 'a_millisecond' => 'um milissegundo|:count milissegundos', 'ms' => ':countms', 'microsecond' => ':count microssegundo|:count microssegundos', 'a_microsecond' => 'um microssegundo|:count microssegundos', 'µs' => ':countµs', 'ago' => 'há :time', 'from_now' => 'em :time', 'after' => ':time depois', 'before' => ':time antes', 'diff_now' => 'agora', 'diff_today' => 'Hoje', 'diff_today_regexp' => 'Hoje(?:\\s+às)?', 'diff_yesterday' => 'ontem', 'diff_yesterday_regexp' => 'Ontem(?:\\s+às)?', 'diff_tomorrow' => 'amanhã', 'diff_tomorrow_regexp' => 'Amanhã(?:\\s+às)?', 'diff_before_yesterday' => 'anteontem', 'diff_after_tomorrow' => 'depois de amanhã', 'period_recurrences' => 'uma vez|:count vezes', 'period_interval' => 'cada :interval', 'period_start_date' => 'de :date', 'period_end_date' => 'até :date', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D [de] MMMM [de] YYYY', 'LLL' => 'D [de] MMMM [de] YYYY HH:mm', 'LLLL' => 'dddd, D [de] MMMM [de] YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Hoje às] LT', 'nextDay' => '[Amanhã às] LT', 'nextWeek' => 'dddd [às] LT', 'lastDay' => '[Ontem às] LT', 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: case 6: return '[Último] dddd [às] LT'; default: return '[Última] dddd [às] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => ':numberº', 'months' => ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'], 'months_short' => ['jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez'], 'weekdays' => ['domingo', 'segunda-feira', 'terça-feira', 'quarta-feira', 'quinta-feira', 'sexta-feira', 'sábado'], 'weekdays_short' => ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sáb'], 'weekdays_min' => ['Do', '2ª', '3ª', '4ª', '5ª', '6ª', 'Sá'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' e '], 'ordinal_words' => [ 'of' => 'de', 'first' => 'primeira', 'second' => 'segunda', 'third' => 'terceira', 'fourth' => 'quarta', 'fifth' => 'quinta', 'last' => 'última', ], ]; PKgt[,Carbon/Lang/ar_OM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[pGGCarbon/Lang/en_SH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[!HjjCarbon/Lang/ee.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ŋ', 'ɣ'], 'weekdays' => ['kɔsiɖa', 'dzoɖa', 'blaɖa', 'kuɖa', 'yawoɖa', 'fiɖa', 'memleɖa'], 'weekdays_short' => ['kɔs', 'dzo', 'bla', 'kuɖ', 'yaw', 'fiɖ', 'mem'], 'weekdays_min' => ['kɔs', 'dzo', 'bla', 'kuɖ', 'yaw', 'fiɖ', 'mem'], 'months' => ['dzove', 'dzodze', 'tedoxe', 'afɔfĩe', 'dama', 'masa', 'siamlɔm', 'deasiamime', 'anyɔnyɔ', 'kele', 'adeɛmekpɔxe', 'dzome'], 'months_short' => ['dzv', 'dzd', 'ted', 'afɔ', 'dam', 'mas', 'sia', 'dea', 'any', 'kel', 'ade', 'dzm'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'a [ga] h:mm', 'LTS' => 'a [ga] h:mm:ss', 'L' => 'M/D/YYYY', 'LL' => 'MMM D [lia], YYYY', 'LLL' => 'a [ga] h:mm MMMM D [lia] YYYY', 'LLLL' => 'a [ga] h:mm dddd, MMMM D [lia] YYYY', ], 'year' => 'ƒe :count', 'y' => 'ƒe :count', 'a_year' => 'ƒe :count', 'month' => 'ɣleti :count', 'm' => 'ɣleti :count', 'a_month' => 'ɣleti :count', 'week' => 'kwasiɖa :count', 'w' => 'kwasiɖa :count', 'a_week' => 'kwasiɖa :count', 'day' => 'ŋkeke :count', 'd' => 'ŋkeke :count', 'a_day' => 'ŋkeke :count', 'hour' => 'gaƒoƒo :count', 'h' => 'gaƒoƒo :count', 'a_hour' => 'gaƒoƒo :count', 'minute' => 'miniti :count', // less reliable 'min' => 'miniti :count', // less reliable 'a_minute' => 'miniti :count', // less reliable 'second' => 'sɛkɛnd :count', // less reliable 's' => 'sɛkɛnd :count', // less reliable 'a_second' => 'sɛkɛnd :count', // less reliable ]); PKgt[;n Carbon/Lang/af.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - JD Isaacks * - Pierre du Plessis */ return [ 'year' => ':count jaar', 'a_year' => '\'n jaar|:count jaar', 'y' => ':count j.', 'month' => ':count maand|:count maande', 'a_month' => '\'n maand|:count maande', 'm' => ':count maa.', 'week' => ':count week|:count weke', 'a_week' => '\'n week|:count weke', 'w' => ':count w.', 'day' => ':count dag|:count dae', 'a_day' => '\'n dag|:count dae', 'd' => ':count d.', 'hour' => ':count uur', 'a_hour' => '\'n uur|:count uur', 'h' => ':count u.', 'minute' => ':count minuut|:count minute', 'a_minute' => '\'n minuut|:count minute', 'min' => ':count min.', 'second' => ':count sekond|:count sekondes', 'a_second' => '\'n paar sekondes|:count sekondes', 's' => ':count s.', 'ago' => ':time gelede', 'from_now' => 'oor :time', 'after' => ':time na', 'before' => ':time voor', 'diff_now' => 'Nou', 'diff_today' => 'Vandag', 'diff_today_regexp' => 'Vandag(?:\\s+om)?', 'diff_yesterday' => 'Gister', 'diff_yesterday_regexp' => 'Gister(?:\\s+om)?', 'diff_tomorrow' => 'Môre', 'diff_tomorrow_regexp' => 'Môre(?:\\s+om)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Vandag om] LT', 'nextDay' => '[Môre om] LT', 'nextWeek' => 'dddd [om] LT', 'lastDay' => '[Gister om] LT', 'lastWeek' => '[Laas] dddd [om] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { return $number.(($number === 1 || $number === 8 || $number >= 20) ? 'ste' : 'de'); }, 'meridiem' => ['VM', 'NM'], 'months' => ['Januarie', 'Februarie', 'Maart', 'April', 'Mei', 'Junie', 'Julie', 'Augustus', 'September', 'Oktober', 'November', 'Desember'], 'months_short' => ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], 'weekdays' => ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], 'weekdays_short' => ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'], 'weekdays_min' => ['So', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Sa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' en '], ]; PKgt[ )vCarbon/Lang/mua.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['comme', 'lilli'], 'weekdays' => ['Com’yakke', 'Comlaaɗii', 'Comzyiiɗii', 'Comkolle', 'Comkaldǝɓlii', 'Comgaisuu', 'Comzyeɓsuu'], 'weekdays_short' => ['Cya', 'Cla', 'Czi', 'Cko', 'Cka', 'Cga', 'Cze'], 'weekdays_min' => ['Cya', 'Cla', 'Czi', 'Cko', 'Cka', 'Cga', 'Cze'], 'months' => ['Fĩi Loo', 'Cokcwaklaŋne', 'Cokcwaklii', 'Fĩi Marfoo', 'Madǝǝuutǝbijaŋ', 'Mamǝŋgwãafahbii', 'Mamǝŋgwãalii', 'Madǝmbii', 'Fĩi Dǝɓlii', 'Fĩi Mundaŋ', 'Fĩi Gwahlle', 'Fĩi Yuru'], 'months_short' => ['FLO', 'CLA', 'CKI', 'FMF', 'MAD', 'MBI', 'MLI', 'MAM', 'FDE', 'FMU', 'FGW', 'FYU'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], ]); PKgt[uNNCarbon/Lang/as.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/as_IN.php'; PKgt[pGGCarbon/Lang/en_FK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[M44Carbon/Lang/az_IR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Mousa Moradi mousamk@gmail.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'OY/OM/OD', ], 'months' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مئی', 'ژوئن', 'جولای', 'آقۇست', 'سپتامبر', 'اوْکتوْبر', 'نوْوامبر', 'دسامبر'], 'months_short' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مئی', 'ژوئن', 'جولای', 'آقۇست', 'سپتامبر', 'اوْکتوْبر', 'نوْوامبر', 'دسامبر'], 'weekdays' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چارشنبه', 'جۆمعه آخشامی', 'جۆمعه', 'شنبه'], 'weekdays_short' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چارشنبه', 'جۆمعه آخشامی', 'جۆمعه', 'شنبه'], 'weekdays_min' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چارشنبه', 'جۆمعه آخشامی', 'جۆمعه', 'شنبه'], 'first_day_of_week' => 6, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰۴', '۰۵', '۰۶', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱۴', '۱۵', '۱۶', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲۴', '۲۵', '۲۶', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳۴', '۳۵', '۳۶', '۳۷', '۳۸', '۳۹', '۴۰', '۴۱', '۴۲', '۴۳', '۴۴', '۴۵', '۴۶', '۴۷', '۴۸', '۴۹', '۵۰', '۵۱', '۵۲', '۵۳', '۵۴', '۵۵', '۵۶', '۵۷', '۵۸', '۵۹', '۶۰', '۶۱', '۶۲', '۶۳', '۶۴', '۶۵', '۶۶', '۶۷', '۶۸', '۶۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷۴', '۷۵', '۷۶', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸۴', '۸۵', '۸۶', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹۴', '۹۵', '۹۶', '۹۷', '۹۸', '۹۹'], ]); PKgt["BOOCarbon/Lang/anp.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/anp_IN.php'; PKgt[{9tCarbon/Lang/hif_FJ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'dddd DD MMM YYYY', ], 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 'weekdays' => ['Ravivar', 'Somvar', 'Mangalvar', 'Budhvar', 'Guruvar', 'Shukravar', 'Shanivar'], 'weekdays_short' => ['Ravi', 'Som', 'Mangal', 'Budh', 'Guru', 'Shukra', 'Shani'], 'weekdays_min' => ['Ravi', 'Som', 'Mangal', 'Budh', 'Guru', 'Shukra', 'Shani'], 'meridiem' => ['Purvahan', 'Aparaahna'], 'hour' => ':count minit', // less reliable 'h' => ':count minit', // less reliable 'a_hour' => ':count minit', // less reliable 'year' => ':count saal', 'y' => ':count saal', 'a_year' => ':count saal', 'month' => ':count Mahina', 'm' => ':count Mahina', 'a_month' => ':count Mahina', 'week' => ':count Hafta', 'w' => ':count Hafta', 'a_week' => ':count Hafta', 'day' => ':count Din', 'd' => ':count Din', 'a_day' => ':count Din', 'minute' => ':count Minit', 'min' => ':count Minit', 'a_minute' => ':count Minit', 'second' => ':count Second', 's' => ':count Second', 'a_second' => ':count Second', ]); PKgt[C=5  Carbon/Lang/ru_RU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ru.php'; PKgt[pGGCarbon/Lang/en_NF.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[pGGCarbon/Lang/en_IM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[pGGCarbon/Lang/en_KN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[s QQCarbon/Lang/gom.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/gom_Latn.php'; PKgt[2o>  Carbon/Lang/ik_CA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - pablo@mandriva.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['Siqiññaatchiaq', 'Siqiññaasrugruk', 'Paniqsiqsiivik', 'Qilġich Tatqiat', 'Suppivik', 'Iġñivik', 'Itchavik', 'Tiññivik', 'Amiġaiqsivik', 'Sikkuvik', 'Nippivik', 'Siqiñġiḷaq'], 'months_short' => ['Sñt', 'Sñs', 'Pan', 'Qil', 'Sup', 'Iġñ', 'Itc', 'Tiñ', 'Ami', 'Sik', 'Nip', 'Siq'], 'weekdays' => ['Minġuiqsioiq', 'Savałłiq', 'Ilaqtchiioiq', 'Qitchiioiq', 'Sisamiioiq', 'Tallimmiioiq', 'Maqinġuoiq'], 'weekdays_short' => ['Min', 'Sav', 'Ila', 'Qit', 'Sis', 'Tal', 'Maq'], 'weekdays_min' => ['Min', 'Sav', 'Ila', 'Qit', 'Sis', 'Tal', 'Maq'], 'day_of_first_week_of_year' => 1, 'year' => ':count ukiuq', 'y' => ':count ukiuq', 'a_year' => ':count ukiuq', 'month' => ':count Tatqiat', 'm' => ':count Tatqiat', 'a_month' => ':count Tatqiat', 'week' => ':count tatqiat', // less reliable 'w' => ':count tatqiat', // less reliable 'a_week' => ':count tatqiat', // less reliable 'day' => ':count siqiñiq', // less reliable 'd' => ':count siqiñiq', // less reliable 'a_day' => ':count siqiñiq', // less reliable 'hour' => ':count Siḷa', // less reliable 'h' => ':count Siḷa', // less reliable 'a_hour' => ':count Siḷa', // less reliable 'second' => ':count iġñiq', // less reliable 's' => ':count iġñiq', // less reliable 'a_second' => ':count iġñiq', // less reliable ]); PKgt[}  Carbon/Lang/mk_MK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/mk.php'; PKgt[~OOCarbon/Lang/kab.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/kab_DZ.php'; PKgt[4r(nnCarbon/Lang/xh_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['eyoMqungu', 'eyoMdumba', 'eyoKwindla', 'uTshazimpuzi', 'uCanzibe', 'eyeSilimela', 'eyeKhala', 'eyeThupa', 'eyoMsintsi', 'eyeDwarha', 'eyeNkanga', 'eyoMnga'], 'months_short' => ['Mqu', 'Mdu', 'Kwi', 'Tsh', 'Can', 'Sil', 'Kha', 'Thu', 'Msi', 'Dwa', 'Nka', 'Mng'], 'weekdays' => ['iCawa', 'uMvulo', 'lwesiBini', 'lwesiThathu', 'ulweSine', 'lwesiHlanu', 'uMgqibelo'], 'weekdays_short' => ['Caw', 'Mvu', 'Bin', 'Tha', 'Sin', 'Hla', 'Mgq'], 'weekdays_min' => ['Caw', 'Mvu', 'Bin', 'Tha', 'Sin', 'Hla', 'Mgq'], 'day_of_first_week_of_year' => 1, 'year' => ':count ihlobo', // less reliable 'y' => ':count ihlobo', // less reliable 'a_year' => ':count ihlobo', // less reliable 'hour' => ':count iwotshi', // less reliable 'h' => ':count iwotshi', // less reliable 'a_hour' => ':count iwotshi', // less reliable 'minute' => ':count ingqalelo', // less reliable 'min' => ':count ingqalelo', // less reliable 'a_minute' => ':count ingqalelo', // less reliable 'second' => ':count nceda', // less reliable 's' => ':count nceda', // less reliable 'a_second' => ':count nceda', // less reliable 'month' => ':count inyanga', 'm' => ':count inyanga', 'a_month' => ':count inyanga', 'week' => ':count veki', 'w' => ':count veki', 'a_week' => ':count veki', 'day' => ':count imini', 'd' => ':count imini', 'a_day' => ':count imini', ]); PKgt[}))Carbon/Lang/ca_AD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ca.php', [ ]); PKgt[!NNCarbon/Lang/os.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/os_RU.php'; PKgt[:ZSSCarbon/Lang/mk.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Sashko Todorov * - Josh Soref * - François B * - Serhan Apaydın * - Borislav Mickov * - JD Isaacks * - Tomi Atanasoski */ use Carbon\CarbonInterface; return [ 'year' => ':count година|:count години', 'a_year' => 'година|:count години', 'y' => ':count год.', 'month' => ':count месец|:count месеци', 'a_month' => 'месец|:count месеци', 'm' => ':count месец|:count месеци', 'week' => ':count седмица|:count седмици', 'a_week' => 'седмица|:count седмици', 'w' => ':count седмица|:count седмици', 'day' => ':count ден|:count дена', 'a_day' => 'ден|:count дена', 'd' => ':count ден|:count дена', 'hour' => ':count час|:count часа', 'a_hour' => 'час|:count часа', 'h' => ':count час|:count часа', 'minute' => ':count минута|:count минути', 'a_minute' => 'минута|:count минути', 'min' => ':count мин.', 'second' => ':count секунда|:count секунди', 'a_second' => 'неколку секунди|:count секунди', 's' => ':count сек.', 'ago' => 'пред :time', 'from_now' => 'после :time', 'after' => 'по :time', 'before' => 'пред :time', 'diff_now' => 'сега', 'diff_today' => 'Денес', 'diff_today_regexp' => 'Денес(?:\\s+во)?', 'diff_yesterday' => 'вчера', 'diff_yesterday_regexp' => 'Вчера(?:\\s+во)?', 'diff_tomorrow' => 'утре', 'diff_tomorrow_regexp' => 'Утре(?:\\s+во)?', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'D.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY H:mm', 'LLLL' => 'dddd, D MMMM YYYY H:mm', ], 'calendar' => [ 'sameDay' => '[Денес во] LT', 'nextDay' => '[Утре во] LT', 'nextWeek' => '[Во] dddd [во] LT', 'lastDay' => '[Вчера во] LT', 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: case 3: case 6: return '[Изминатата] dddd [во] LT'; default: return '[Изминатиот] dddd [во] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => function ($number) { $lastDigit = $number % 10; $last2Digits = $number % 100; if ($number === 0) { return $number.'-ев'; } if ($last2Digits === 0) { return $number.'-ен'; } if ($last2Digits > 10 && $last2Digits < 20) { return $number.'-ти'; } if ($lastDigit === 1) { return $number.'-ви'; } if ($lastDigit === 2) { return $number.'-ри'; } if ($lastDigit === 7 || $lastDigit === 8) { return $number.'-ми'; } return $number.'-ти'; }, 'months' => ['јануари', 'февруари', 'март', 'април', 'мај', 'јуни', 'јули', 'август', 'септември', 'октомври', 'ноември', 'декември'], 'months_short' => ['јан', 'фев', 'мар', 'апр', 'мај', 'јун', 'јул', 'авг', 'сеп', 'окт', 'ное', 'дек'], 'weekdays' => ['недела', 'понеделник', 'вторник', 'среда', 'четврток', 'петок', 'сабота'], 'weekdays_short' => ['нед', 'пон', 'вто', 'сре', 'чет', 'пет', 'саб'], 'weekdays_min' => ['нe', 'пo', 'вт', 'ср', 'че', 'пе', 'сa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' и '], 'meridiem' => ['АМ', 'ПМ'], ]; PKgt[pGGCarbon/Lang/en_MS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[`  Carbon/Lang/he_IL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/he.php'; PKgt[xssCarbon/Lang/ii.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ꎸꄑ', 'ꁯꋒ'], 'weekdays' => ['ꑭꆏꑍ', 'ꆏꊂꋍ', 'ꆏꊂꑍ', 'ꆏꊂꌕ', 'ꆏꊂꇖ', 'ꆏꊂꉬ', 'ꆏꊂꃘ'], 'weekdays_short' => ['ꑭꆏ', 'ꆏꋍ', 'ꆏꑍ', 'ꆏꌕ', 'ꆏꇖ', 'ꆏꉬ', 'ꆏꃘ'], 'weekdays_min' => ['ꑭꆏ', 'ꆏꋍ', 'ꆏꑍ', 'ꆏꌕ', 'ꆏꇖ', 'ꆏꉬ', 'ꆏꃘ'], 'months' => null, 'months_short' => ['ꋍꆪ', 'ꑍꆪ', 'ꌕꆪ', 'ꇖꆪ', 'ꉬꆪ', 'ꃘꆪ', 'ꏃꆪ', 'ꉆꆪ', 'ꈬꆪ', 'ꊰꆪ', 'ꊰꊪꆪ', 'ꊰꑋꆪ'], 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'YYYY-MM-dd', 'LL' => 'YYYY MMM D', 'LLL' => 'YYYY MMMM D h:mm a', 'LLLL' => 'YYYY MMMM D, dddd h:mm a', ], 'year' => ':count ꒉ', // less reliable 'y' => ':count ꒉ', // less reliable 'a_year' => ':count ꒉ', // less reliable 'month' => ':count ꆪ', 'm' => ':count ꆪ', 'a_month' => ':count ꆪ', 'week' => ':count ꏃ', // less reliable 'w' => ':count ꏃ', // less reliable 'a_week' => ':count ꏃ', // less reliable 'day' => ':count ꏜ', // less reliable 'd' => ':count ꏜ', // less reliable 'a_day' => ':count ꏜ', // less reliable 'hour' => ':count ꄮꈉ', 'h' => ':count ꄮꈉ', 'a_hour' => ':count ꄮꈉ', 'minute' => ':count ꀄꊭ', // less reliable 'min' => ':count ꀄꊭ', // less reliable 'a_minute' => ':count ꀄꊭ', // less reliable 'second' => ':count ꇅ', // less reliable 's' => ':count ꇅ', // less reliable 'a_second' => ':count ꇅ', // less reliable ]); PKgt[ǖCarbon/Lang/an_ES.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Softaragones Jordi Mallach Pérez, Juan Pablo Martínez bug-glibc-locales@gnu.org, softaragones@softaragones.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['chinero', 'febrero', 'marzo', 'abril', 'mayo', 'chunyo', 'chuliol', 'agosto', 'setiembre', 'octubre', 'noviembre', 'aviento'], 'months_short' => ['chi', 'feb', 'mar', 'abr', 'may', 'chn', 'chl', 'ago', 'set', 'oct', 'nov', 'avi'], 'weekdays' => ['domingo', 'luns', 'martes', 'mierques', 'chueves', 'viernes', 'sabado'], 'weekdays_short' => ['dom', 'lun', 'mar', 'mie', 'chu', 'vie', 'sab'], 'weekdays_min' => ['dom', 'lun', 'mar', 'mie', 'chu', 'vie', 'sab'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count año', 'y' => ':count año', 'a_year' => ':count año', 'month' => ':count mes', 'm' => ':count mes', 'a_month' => ':count mes', 'week' => ':count semana', 'w' => ':count semana', 'a_week' => ':count semana', 'day' => ':count día', 'd' => ':count día', 'a_day' => ':count día', 'hour' => ':count reloch', // less reliable 'h' => ':count reloch', // less reliable 'a_hour' => ':count reloch', // less reliable 'minute' => ':count minuto', 'min' => ':count minuto', 'a_minute' => ':count minuto', 'second' => ':count segundo', 's' => ':count segundo', 'a_second' => ':count segundo', ]); PKgt[DOOCarbon/Lang/bem.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/bem_ZM.php'; PKgt[Carbon/Lang/ti_ER.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['ጥሪ', 'ለካቲት', 'መጋቢት', 'ሚያዝያ', 'ግንቦት', 'ሰነ', 'ሓምለ', 'ነሓሰ', 'መስከረም', 'ጥቅምቲ', 'ሕዳር', 'ታሕሳስ'], 'months_short' => ['ጥሪ ', 'ለካቲ', 'መጋቢ', 'ሚያዝ', 'ግንቦ', 'ሰነ ', 'ሓምለ', 'ነሓሰ', 'መስከ', 'ጥቅም', 'ሕዳር', 'ታሕሳ'], 'weekdays' => ['ሰንበት', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], 'weekdays_short' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], 'weekdays_min' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['ንጉሆ ሰዓተ', 'ድሕር ሰዓት'], 'year' => ':count ዓመት', 'y' => ':count ዓመት', 'a_year' => ':count ዓመት', 'month' => 'ወርሒ :count', 'm' => 'ወርሒ :count', 'a_month' => 'ወርሒ :count', 'week' => ':count ሰሙን', 'w' => ':count ሰሙን', 'a_week' => ':count ሰሙን', 'day' => ':count መዓልቲ', 'd' => ':count መዓልቲ', 'a_day' => ':count መዓልቲ', 'hour' => ':count ሰዓት', 'h' => ':count ሰዓት', 'a_hour' => ':count ሰዓት', 'minute' => ':count ደቒቕ', 'min' => ':count ደቒቕ', 'a_minute' => ':count ደቒቕ', 'second' => ':count ሰከንድ', 's' => ':count ሰከንድ', 'a_second' => ':count ሰከንድ', ]); PKgt[Carbon/Lang/en_CY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - NehaGautam */ return array_replace_recursive(require __DIR__.'/en.php', [ 'from_now' => 'in :time', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD-MM-YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[(|@zGGCarbon/Lang/es_CU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 1, ]); PKgt[?Ej  Carbon/Lang/en_GU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[7\\Carbon/Lang/sr_Cyrl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - shaishavgandhi05 * - Serhan Apaydın * - JD Isaacks * - Glavić * - Nikola Zeravcic * - Milos Sakovic */ use Carbon\CarbonInterface; return [ 'year' => ':count година|:count године|:count година', 'y' => ':count г.', 'month' => ':count месец|:count месеца|:count месеци', 'm' => ':count м.', 'week' => ':count недеља|:count недеље|:count недеља', 'w' => ':count нед.', 'day' => ':count дан|:count дана|:count дана', 'd' => ':count д.', 'hour' => ':count сат|:count сата|:count сати', 'h' => ':count ч.', 'minute' => ':count минут|:count минута|:count минута', 'min' => ':count мин.', 'second' => ':count секунд|:count секунде|:count секунди', 's' => ':count сек.', 'ago' => 'пре :time', 'from_now' => 'за :time', 'after' => ':time након', 'before' => ':time пре', 'year_from_now' => ':count годину|:count године|:count година', 'year_ago' => ':count годину|:count године|:count година', 'week_from_now' => ':count недељу|:count недеље|:count недеља', 'week_ago' => ':count недељу|:count недеље|:count недеља', 'diff_now' => 'управо сада', 'diff_today' => 'данас', 'diff_today_regexp' => 'данас(?:\\s+у)?', 'diff_yesterday' => 'јуче', 'diff_yesterday_regexp' => 'јуче(?:\\s+у)?', 'diff_tomorrow' => 'сутра', 'diff_tomorrow_regexp' => 'сутра(?:\\s+у)?', 'diff_before_yesterday' => 'прекјуче', 'diff_after_tomorrow' => 'прекосутра', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY H:mm', 'LLLL' => 'dddd, D. MMMM YYYY H:mm', ], 'calendar' => [ 'sameDay' => '[данас у] LT', 'nextDay' => '[сутра у] LT', 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[у недељу у] LT'; case 3: return '[у среду у] LT'; case 6: return '[у суботу у] LT'; default: return '[у] dddd [у] LT'; } }, 'lastDay' => '[јуче у] LT', 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[прошле недеље у] LT'; case 1: return '[прошлог понедељка у] LT'; case 2: return '[прошлог уторка у] LT'; case 3: return '[прошле среде у] LT'; case 4: return '[прошлог четвртка у] LT'; case 5: return '[прошлог петка у] LT'; default: return '[прошле суботе у] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['јануар', 'фебруар', 'март', 'април', 'мај', 'јун', 'јул', 'август', 'септембар', 'октобар', 'новембар', 'децембар'], 'months_short' => ['јан.', 'феб.', 'мар.', 'апр.', 'мај', 'јун', 'јул', 'авг.', 'сеп.', 'окт.', 'нов.', 'дец.'], 'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'], 'weekdays_short' => ['нед.', 'пон.', 'уто.', 'сре.', 'чет.', 'пет.', 'суб.'], 'weekdays_min' => ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' и '], 'meridiem' => ['АМ', 'ПМ'], ]; PKgt[[ia  Carbon/Lang/pt_AO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/pt.php'; PKgt[ߟ$$Carbon/Lang/aa_ER.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Qunxa Garablu', 'Naharsi Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Leqeeni', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], 'months_short' => ['Qun', 'Nah', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'], 'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'], 'weekdays_short' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], 'weekdays_min' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['saaku', 'carra'], ]); PKgt[\  Carbon/Lang/ff_MR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ff.php', [ 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'D/M/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd D MMMM YYYY h:mm a', ], ]); PKgt[^5&Carbon/Lang/fa.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - Nasser Ghiasi * - JD Isaacks * - Hossein Jabbari * - nimamo * - hafezdivandari * - Hassan Pezeshk (hpez) */ return [ 'year' => ':count سال', 'a_year' => 'یک سال'.'|:count '.'سال', 'y' => ':count سال', 'month' => ':count ماه', 'a_month' => 'یک ماه'.'|:count '.'ماه', 'm' => ':count ماه', 'week' => ':count هفته', 'a_week' => 'یک هفته'.'|:count '.'هفته', 'w' => ':count هفته', 'day' => ':count روز', 'a_day' => 'یک روز'.'|:count '.'روز', 'd' => ':count روز', 'hour' => ':count ساعت', 'a_hour' => 'یک ساعت'.'|:count '.'ساعت', 'h' => ':count ساعت', 'minute' => ':count دقیقه', 'a_minute' => 'یک دقیقه'.'|:count '.'دقیقه', 'min' => ':count دقیقه', 'second' => ':count ثانیه', 's' => ':count ثانیه', 'ago' => ':time پیش', 'from_now' => ':time دیگر', 'after' => ':time پس از', 'before' => ':time پیش از', 'diff_now' => 'اکنون', 'diff_today' => 'امروز', 'diff_today_regexp' => 'امروز(?:\\s+ساعت)?', 'diff_yesterday' => 'دیروز', 'diff_yesterday_regexp' => 'دیروز(?:\\s+ساعت)?', 'diff_tomorrow' => 'فردا', 'diff_tomorrow_regexp' => 'فردا(?:\\s+ساعت)?', 'formats' => [ 'LT' => 'OH:Om', 'LTS' => 'OH:Om:Os', 'L' => 'OD/OM/OY', 'LL' => 'OD MMMM OY', 'LLL' => 'OD MMMM OY OH:Om', 'LLLL' => 'dddd, OD MMMM OY OH:Om', ], 'calendar' => [ 'sameDay' => '[امروز ساعت] LT', 'nextDay' => '[فردا ساعت] LT', 'nextWeek' => 'dddd [ساعت] LT', 'lastDay' => '[دیروز ساعت] LT', 'lastWeek' => 'dddd [پیش] [ساعت] LT', 'sameElse' => 'L', ], 'ordinal' => ':timeم', 'meridiem' => ['قبل از ظهر', 'بعد از ظهر'], 'months' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], 'months_short' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], 'weekdays' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'], 'weekdays_short' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'], 'weekdays_min' => ['ی', 'د', 'س', 'چ', 'پ', 'ج', 'ش'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'list' => ['، ', ' و '], 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰۴', '۰۵', '۰۶', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱۴', '۱۵', '۱۶', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲۴', '۲۵', '۲۶', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳۴', '۳۵', '۳۶', '۳۷', '۳۸', '۳۹', '۴۰', '۴۱', '۴۲', '۴۳', '۴۴', '۴۵', '۴۶', '۴۷', '۴۸', '۴۹', '۵۰', '۵۱', '۵۲', '۵۳', '۵۴', '۵۵', '۵۶', '۵۷', '۵۸', '۵۹', '۶۰', '۶۱', '۶۲', '۶۳', '۶۴', '۶۵', '۶۶', '۶۷', '۶۸', '۶۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷۴', '۷۵', '۷۶', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸۴', '۸۵', '۸۶', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹۴', '۹۵', '۹۶', '۹۷', '۹۸', '۹۹'], 'months_short_standalone' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], 'weekend' => [5, 5], ]; PKgt[x^ Carbon/Lang/ms.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - Azri Jamil * - JD Isaacks * - Josh Soref * - Azri Jamil * - Hariadi Hinta * - Ashraf Kamarudin */ return [ 'year' => ':count tahun', 'a_year' => '{1}setahun|]1,Inf[:count tahun', 'y' => ':count tahun', 'month' => ':count bulan', 'a_month' => '{1}sebulan|]1,Inf[:count bulan', 'm' => ':count bulan', 'week' => ':count minggu', 'a_week' => '{1}seminggu|]1,Inf[:count minggu', 'w' => ':count minggu', 'day' => ':count hari', 'a_day' => '{1}sehari|]1,Inf[:count hari', 'd' => ':count hari', 'hour' => ':count jam', 'a_hour' => '{1}sejam|]1,Inf[:count jam', 'h' => ':count jam', 'minute' => ':count minit', 'a_minute' => '{1}seminit|]1,Inf[:count minit', 'min' => ':count minit', 'second' => ':count saat', 'a_second' => '{1}beberapa saat|]1,Inf[:count saat', 'millisecond' => ':count milisaat', 'a_millisecond' => '{1}semilisaat|]1,Inf[:count milliseconds', 'microsecond' => ':count mikrodetik', 'a_microsecond' => '{1}semikrodetik|]1,Inf[:count mikrodetik', 's' => ':count saat', 'ago' => ':time yang lepas', 'from_now' => ':time dari sekarang', 'after' => ':time kemudian', 'before' => ':time sebelum', 'diff_now' => 'sekarang', 'diff_today' => 'Hari', 'diff_today_regexp' => 'Hari(?:\\s+ini)?(?:\\s+pukul)?', 'diff_yesterday' => 'semalam', 'diff_yesterday_regexp' => 'Semalam(?:\\s+pukul)?', 'diff_tomorrow' => 'esok', 'diff_tomorrow_regexp' => 'Esok(?:\\s+pukul)?', 'diff_before_yesterday' => 'kelmarin', 'diff_after_tomorrow' => 'lusa', 'formats' => [ 'LT' => 'HH.mm', 'LTS' => 'HH.mm.ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY [pukul] HH.mm', 'LLLL' => 'dddd, D MMMM YYYY [pukul] HH.mm', ], 'calendar' => [ 'sameDay' => '[Hari ini pukul] LT', 'nextDay' => '[Esok pukul] LT', 'nextWeek' => 'dddd [pukul] LT', 'lastDay' => '[Kelmarin pukul] LT', 'lastWeek' => 'dddd [lepas pukul] LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 1) { return 'tengah malam'; } if ($hour < 12) { return 'pagi'; } if ($hour < 13) { return 'tengah hari'; } if ($hour < 19) { return 'petang'; } return 'malam'; }, 'months' => ['Januari', 'Februari', 'Mac', 'April', 'Mei', 'Jun', 'Julai', 'Ogos', 'September', 'Oktober', 'November', 'Disember'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ogs', 'Sep', 'Okt', 'Nov', 'Dis'], 'weekdays' => ['Ahad', 'Isnin', 'Selasa', 'Rabu', 'Khamis', 'Jumaat', 'Sabtu'], 'weekdays_short' => ['Ahd', 'Isn', 'Sel', 'Rab', 'Kha', 'Jum', 'Sab'], 'weekdays_min' => ['Ah', 'Is', 'Sl', 'Rb', 'Km', 'Jm', 'Sb'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' dan '], ]; PKgt[.z/Carbon/Lang/quz_PE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Sugar Labs // OLPC sugarlabs.org libc-alpha@sourceware.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['iniru', 'phiwriru', 'marsu', 'awril', 'mayu', 'huniyu', 'huliyu', 'agustu', 'siptiyimri', 'uktuwri', 'nuwiyimri', 'tisiyimri'], 'months_short' => ['ini', 'phi', 'mar', 'awr', 'may', 'hun', 'hul', 'agu', 'sip', 'ukt', 'nuw', 'tis'], 'weekdays' => ['tuminku', 'lunis', 'martis', 'miyirkulis', 'juywis', 'wiyirnis', 'sawatu'], 'weekdays_short' => ['tum', 'lun', 'mar', 'miy', 'juy', 'wiy', 'saw'], 'weekdays_min' => ['tum', 'lun', 'mar', 'miy', 'juy', 'wiy', 'saw'], 'day_of_first_week_of_year' => 1, 'minute' => ':count uchuy', // less reliable 'min' => ':count uchuy', // less reliable 'a_minute' => ':count uchuy', // less reliable 'year' => ':count wata', 'y' => ':count wata', 'a_year' => ':count wata', 'month' => ':count killa', 'm' => ':count killa', 'a_month' => ':count killa', 'week' => ':count simana', 'w' => ':count simana', 'a_week' => ':count simana', 'day' => ':count pʼunchaw', 'd' => ':count pʼunchaw', 'a_day' => ':count pʼunchaw', 'hour' => ':count ura', 'h' => ':count ura', 'a_hour' => ':count ura', 'second' => ':count iskay ñiqin', 's' => ':count iskay ñiqin', 'a_second' => ':count iskay ñiqin', ]); PKgt[cNzCarbon/Lang/uz_Cyrl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/uz.php', [ 'formats' => [ 'L' => 'DD/MM/yy', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM, YYYY HH:mm', 'LLLL' => 'dddd, DD MMMM, YYYY HH:mm', ], 'meridiem' => ['ТО', 'ТК'], ]); PKgt[]CCCarbon/Lang/ccp_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ccp.php', [ 'weekend' => [0, 0], ]); PKgt[Carbon/Lang/sq_XK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/sq.php', [ 'formats' => [ 'L' => 'D.M.YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY, HH:mm', 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', ], ]); PKgt[Carbon/Lang/ebu.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['KI', 'UT'], 'weekdays' => ['Kiumia', 'Njumatatu', 'Njumaine', 'Njumatano', 'Aramithi', 'Njumaa', 'NJumamothii'], 'weekdays_short' => ['Kma', 'Tat', 'Ine', 'Tan', 'Arm', 'Maa', 'NMM'], 'weekdays_min' => ['Kma', 'Tat', 'Ine', 'Tan', 'Arm', 'Maa', 'NMM'], 'months' => ['Mweri wa mbere', 'Mweri wa kaĩri', 'Mweri wa kathatũ', 'Mweri wa kana', 'Mweri wa gatano', 'Mweri wa gatantatũ', 'Mweri wa mũgwanja', 'Mweri wa kanana', 'Mweri wa kenda', 'Mweri wa ikũmi', 'Mweri wa ikũmi na ũmwe', 'Mweri wa ikũmi na Kaĩrĩ'], 'months_short' => ['Mbe', 'Kai', 'Kat', 'Kan', 'Gat', 'Gan', 'Mug', 'Knn', 'Ken', 'Iku', 'Imw', 'Igi'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[FCarbon/Lang/os_RU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['январы', 'февралы', 'мартъийы', 'апрелы', 'майы', 'июны', 'июлы', 'августы', 'сентябры', 'октябры', 'ноябры', 'декабры'], 'months_short' => ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'], 'weekdays' => ['Хуыцаубон', 'Къуырисæр', 'Дыццæг', 'Æртыццæг', 'Цыппæрæм', 'Майрæмбон', 'Сабат'], 'weekdays_short' => ['Хцб', 'Крс', 'Дцг', 'Æрт', 'Цпр', 'Мрб', 'Сбт'], 'weekdays_min' => ['Хцб', 'Крс', 'Дцг', 'Æрт', 'Цпр', 'Мрб', 'Сбт'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'minute' => ':count гыццыл', // less reliable 'min' => ':count гыццыл', // less reliable 'a_minute' => ':count гыццыл', // less reliable 'second' => ':count æндæр', // less reliable 's' => ':count æндæр', // less reliable 'a_second' => ':count æндæр', // less reliable 'year' => ':count аз', 'y' => ':count аз', 'a_year' => ':count аз', 'month' => ':count мӕй', 'm' => ':count мӕй', 'a_month' => ':count мӕй', 'week' => ':count къуыри', 'w' => ':count къуыри', 'a_week' => ':count къуыри', 'day' => ':count бон', 'd' => ':count бон', 'a_day' => ':count бон', 'hour' => ':count сахат', 'h' => ':count сахат', 'a_hour' => ':count сахат', ]); PKgt[&5  Carbon/Lang/nl_SR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/nl.php'; PKgt[8Carbon/Lang/csb_PL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - csb_PL locale Michal Ostrowski bug-glibc-locales@gnu.org */ return [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-DD', 'LL' => 'MMMM DD, YYYY', 'LLL' => 'DD MMM HH:mm', 'LLLL' => 'MMMM DD, YYYY HH:mm', ], 'months' => ['stëcznika', 'gromicznika', 'strëmiannika', 'łżëkwiata', 'maja', 'czerwińca', 'lëpińca', 'zélnika', 'séwnika', 'rujana', 'lëstopadnika', 'gòdnika'], 'months_short' => ['stë', 'gro', 'str', 'łżë', 'maj', 'cze', 'lëp', 'zél', 'séw', 'ruj', 'lës', 'gòd'], 'weekdays' => ['niedzela', 'pòniedzôłk', 'wtórk', 'strzoda', 'czwiôrtk', 'piątk', 'sobòta'], 'weekdays_short' => ['nie', 'pòn', 'wtó', 'str', 'czw', 'pią', 'sob'], 'weekdays_min' => ['nie', 'pòn', 'wtó', 'str', 'czw', 'pią', 'sob'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' a téż '], 'two_words_connector' => ' a téż ', 'year' => ':count rok', 'month' => ':count miesiąc', 'week' => ':count tidzéń', 'day' => ':count dzéń', 'hour' => ':count gòdzëna', 'minute' => ':count minuta', 'second' => ':count sekunda', ]; PKgt[Carbon/Lang/bn_BD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ankur Group, Taneem Ahmed, Jamil Ahmed */ return array_replace_recursive(require __DIR__.'/bn.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], 'months_short' => ['জানু', 'ফেব', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], 'weekdays' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার'], 'weekdays_short' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহঃ', 'শুক্র', 'শনি'], 'weekdays_min' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহঃ', 'শুক্র', 'শনি'], 'first_day_of_week' => 5, 'day_of_first_week_of_year' => 1, ]); PKgt[ >vvCarbon/Lang/ses.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Adduha', 'Aluula'], 'weekdays' => ['Alhadi', 'Atinni', 'Atalaata', 'Alarba', 'Alhamiisa', 'Alzuma', 'Asibti'], 'weekdays_short' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], 'weekdays_min' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], 'months' => ['Žanwiye', 'Feewiriye', 'Marsi', 'Awiril', 'Me', 'Žuweŋ', 'Žuyye', 'Ut', 'Sektanbur', 'Oktoobur', 'Noowanbur', 'Deesanbur'], 'months_short' => ['Žan', 'Fee', 'Mar', 'Awi', 'Me', 'Žuw', 'Žuy', 'Ut', 'Sek', 'Okt', 'Noo', 'Dee'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'month' => ':count alaada', // less reliable 'm' => ':count alaada', // less reliable 'a_month' => ':count alaada', // less reliable 'hour' => ':count ɲaajin', // less reliable 'h' => ':count ɲaajin', // less reliable 'a_hour' => ':count ɲaajin', // less reliable 'minute' => ':count zarbu', // less reliable 'min' => ':count zarbu', // less reliable 'a_minute' => ':count zarbu', // less reliable 'year' => ':count jiiri', 'y' => ':count jiiri', 'a_year' => ':count jiiri', 'week' => ':count jirbiiyye', 'w' => ':count jirbiiyye', 'a_week' => ':count jirbiiyye', 'day' => ':count zaari', 'd' => ':count zaari', 'a_day' => ':count zaari', 'second' => ':count ihinkante', 's' => ':count ihinkante', 'a_second' => ':count ihinkante', ]); PKgt[  Carbon/Lang/mn_MN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/mn.php'; PKgt[ Carbon/Lang/smn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ip.', 'ep.'], 'weekdays' => ['pasepeeivi', 'vuossaargâ', 'majebaargâ', 'koskoho', 'tuorâstuv', 'vástuppeeivi', 'lávurduv'], 'weekdays_short' => ['pas', 'vuo', 'maj', 'kos', 'tuo', 'vás', 'láv'], 'weekdays_min' => ['pa', 'vu', 'ma', 'ko', 'tu', 'vá', 'lá'], 'weekdays_standalone' => ['pasepeivi', 'vuossargâ', 'majebargâ', 'koskokko', 'tuorâstâh', 'vástuppeivi', 'lávurdâh'], 'months' => ['uđđâivemáánu', 'kuovâmáánu', 'njuhčâmáánu', 'cuáŋuimáánu', 'vyesimáánu', 'kesimáánu', 'syeinimáánu', 'porgemáánu', 'čohčâmáánu', 'roovvâdmáánu', 'skammâmáánu', 'juovlâmáánu'], 'months_short' => ['uđiv', 'kuovâ', 'njuhčâ', 'cuáŋui', 'vyesi', 'kesi', 'syeini', 'porge', 'čohčâ', 'roovvâd', 'skammâ', 'juovlâ'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'H.mm', 'LTS' => 'H.mm.ss', 'L' => 'D.M.YYYY', 'LL' => 'MMM D. YYYY', 'LLL' => 'MMMM D. YYYY H.mm', 'LLLL' => 'dddd, MMMM D. YYYY H.mm', ], 'hour' => ':count äigi', // less reliable 'h' => ':count äigi', // less reliable 'a_hour' => ':count äigi', // less reliable 'year' => ':count ihe', 'y' => ':count ihe', 'a_year' => ':count ihe', 'month' => ':count mánuppaje', 'm' => ':count mánuppaje', 'a_month' => ':count mánuppaje', 'week' => ':count okko', 'w' => ':count okko', 'a_week' => ':count okko', 'day' => ':count peivi', 'd' => ':count peivi', 'a_day' => ':count peivi', 'minute' => ':count miinut', 'min' => ':count miinut', 'a_minute' => ':count miinut', 'second' => ':count nubbe', 's' => ':count nubbe', 'a_second' => ':count nubbe', ]); PKgt[A``Carbon/Lang/fr_MA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'first_day_of_week' => 6, 'weekend' => [5, 6], ]); PKgt[hhCarbon/Lang/bn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - Shakib Hossain * - Raju * - Aniruddha Adhikary * - JD Isaacks * - Saiful Islam * - Faisal Islam */ return [ 'year' => ':count বছর', 'a_year' => 'এক বছর|:count বছর', 'y' => '১ বছর|:count বছর', 'month' => ':count মাস', 'a_month' => 'এক মাস|:count মাস', 'm' => '১ মাস|:count মাস', 'week' => ':count সপ্তাহ', 'a_week' => '১ সপ্তাহ|:count সপ্তাহ', 'w' => '১ সপ্তাহ|:count সপ্তাহ', 'day' => ':count দিন', 'a_day' => 'এক দিন|:count দিন', 'd' => '১ দিন|:count দিন', 'hour' => ':count ঘন্টা', 'a_hour' => 'এক ঘন্টা|:count ঘন্টা', 'h' => '১ ঘন্টা|:count ঘন্টা', 'minute' => ':count মিনিট', 'a_minute' => 'এক মিনিট|:count মিনিট', 'min' => '১ মিনিট|:count মিনিট', 'second' => ':count সেকেন্ড', 'a_second' => 'কয়েক সেকেন্ড|:count সেকেন্ড', 's' => '১ সেকেন্ড|:count সেকেন্ড', 'ago' => ':time আগে', 'from_now' => ':time পরে', 'after' => ':time পরে', 'before' => ':time আগে', 'diff_now' => 'এখন', 'diff_today' => 'আজ', 'diff_yesterday' => 'গতকাল', 'diff_tomorrow' => 'আগামীকাল', 'period_recurrences' => ':count বার|:count বার', 'period_interval' => 'প্রতি :interval', 'period_start_date' => ':date থেকে', 'period_end_date' => ':date পর্যন্ত', 'formats' => [ 'LT' => 'A Oh:Om সময়', 'LTS' => 'A Oh:Om:Os সময়', 'L' => 'OD/OM/OY', 'LL' => 'OD MMMM OY', 'LLL' => 'OD MMMM OY, A Oh:Om সময়', 'LLLL' => 'dddd, OD MMMM OY, A Oh:Om সময়', ], 'calendar' => [ 'sameDay' => '[আজ] LT', 'nextDay' => '[আগামীকাল] LT', 'nextWeek' => 'dddd, LT', 'lastDay' => '[গতকাল] LT', 'lastWeek' => '[গত] dddd, LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 4) { return 'রাত'; } if ($hour < 10) { return 'সকাল'; } if ($hour < 17) { return 'দুপুর'; } if ($hour < 20) { return 'বিকাল'; } return 'রাত'; }, 'months' => ['জানুয়ারী', 'ফেব্রুয়ারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], 'months_short' => ['জানু', 'ফেব', 'মার্চ', 'এপ্র', 'মে', 'জুন', 'জুল', 'আগ', 'সেপ্ট', 'অক্টো', 'নভে', 'ডিসে'], 'weekdays' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার'], 'weekdays_short' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'শুক্র', 'শনি'], 'weekdays_min' => ['রবি', 'সোম', 'মঙ্গ', 'বুধ', 'বৃহঃ', 'শুক্র', 'শনি'], 'list' => [', ', ' এবং '], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'weekdays_standalone' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহষ্পতিবার', 'শুক্রবার', 'শনিবার'], 'weekdays_min_standalone' => ['রঃ', 'সোঃ', 'মঃ', 'বুঃ', 'বৃঃ', 'শুঃ', 'শনি'], 'months_short_standalone' => ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], 'alt_numbers' => ['০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯'], ]; PKgt[Bk  Carbon/Lang/ps_AF.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ps.php'; PKgt[^OOCarbon/Lang/sid.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/sid_ET.php'; PKgt[ /ebCarbon/Lang/lrc.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'minute' => ':count هنر', // less reliable 'min' => ':count هنر', // less reliable 'a_minute' => ':count هنر', // less reliable ]); PKgt[KV--NNCarbon/Lang/kw.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/kw_GB.php'; PKgt[ Carbon/Lang/bem_ZM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - ANLoc Martin Benjamin locales@africanlocalization.net */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'MM/DD/YYYY', ], 'months' => ['Januari', 'Februari', 'Machi', 'Epreo', 'Mei', 'Juni', 'Julai', 'Ogasti', 'Septemba', 'Oktoba', 'Novemba', 'Disemba'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Epr', 'Mei', 'Jun', 'Jul', 'Oga', 'Sep', 'Okt', 'Nov', 'Dis'], 'weekdays' => ['Pa Mulungu', 'Palichimo', 'Palichibuli', 'Palichitatu', 'Palichine', 'Palichisano', 'Pachibelushi'], 'weekdays_short' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], 'weekdays_min' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['uluchelo', 'akasuba'], 'year' => 'myaka :count', 'y' => 'myaka :count', 'a_year' => 'myaka :count', 'month' => 'myeshi :count', 'm' => 'myeshi :count', 'a_month' => 'myeshi :count', 'week' => 'umulungu :count', 'w' => 'umulungu :count', 'a_week' => 'umulungu :count', 'day' => 'inshiku :count', 'd' => 'inshiku :count', 'a_day' => 'inshiku :count', 'hour' => 'awala :count', 'h' => 'awala :count', 'a_hour' => 'awala :count', 'minute' => 'miniti :count', 'min' => 'miniti :count', 'a_minute' => 'miniti :count', 'second' => 'sekondi :count', 's' => 'sekondi :count', 'a_second' => 'sekondi :count', ]); PKgt[ Carbon/Lang/es_BO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[C=5  Carbon/Lang/ru_BY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ru.php'; PKgt[< Carbon/Lang/vi.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Andre Polykanine A.K.A. Menelion Elensúlë * - JD Isaacks */ return [ 'year' => ':count năm', 'a_year' => '{1}một năm|]1, Inf[:count năm', 'y' => ':count năm', 'month' => ':count tháng', 'a_month' => '{1}một tháng|]1, Inf[:count tháng', 'm' => ':count tháng', 'week' => ':count tuần', 'a_week' => '{1}một tuần|]1, Inf[:count tuần', 'w' => ':count tuần', 'day' => ':count ngày', 'a_day' => '{1}một ngày|]1, Inf[:count ngày', 'd' => ':count ngày', 'hour' => ':count giờ', 'a_hour' => '{1}một giờ|]1, Inf[:count giờ', 'h' => ':count giờ', 'minute' => ':count phút', 'a_minute' => '{1}một phút|]1, Inf[:count phút', 'min' => ':count phút', 'second' => ':count giây', 'a_second' => '{1}vài giây|]1, Inf[:count giây', 's' => ':count giây', 'ago' => ':time trước', 'from_now' => ':time tới', 'after' => ':time sau', 'before' => ':time trước', 'diff_now' => 'bây giờ', 'diff_today' => 'Hôm', 'diff_today_regexp' => 'Hôm(?:\\s+nay)?(?:\\s+lúc)?', 'diff_yesterday' => 'Hôm qua', 'diff_yesterday_regexp' => 'Hôm(?:\\s+qua)?(?:\\s+lúc)?', 'diff_tomorrow' => 'Ngày mai', 'diff_tomorrow_regexp' => 'Ngày(?:\\s+mai)?(?:\\s+lúc)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM [năm] YYYY', 'LLL' => 'D MMMM [năm] YYYY HH:mm', 'LLLL' => 'dddd, D MMMM [năm] YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Hôm nay lúc] LT', 'nextDay' => '[Ngày mai lúc] LT', 'nextWeek' => 'dddd [tuần tới lúc] LT', 'lastDay' => '[Hôm qua lúc] LT', 'lastWeek' => 'dddd [tuần trước lúc] LT', 'sameElse' => 'L', ], 'meridiem' => ['SA', 'CH'], 'months' => ['tháng 1', 'tháng 2', 'tháng 3', 'tháng 4', 'tháng 5', 'tháng 6', 'tháng 7', 'tháng 8', 'tháng 9', 'tháng 10', 'tháng 11', 'tháng 12'], 'months_short' => ['Th01', 'Th02', 'Th03', 'Th04', 'Th05', 'Th06', 'Th07', 'Th08', 'Th09', 'Th10', 'Th11', 'Th12'], 'weekdays' => ['chủ nhật', 'thứ hai', 'thứ ba', 'thứ tư', 'thứ năm', 'thứ sáu', 'thứ bảy'], 'weekdays_short' => ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], 'weekdays_min' => ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' và '], ]; PKgt["Carbon/Lang/bez.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['pamilau', 'pamunyi'], 'weekdays' => ['pa mulungu', 'pa shahuviluha', 'pa hivili', 'pa hidatu', 'pa hitayi', 'pa hihanu', 'pa shahulembela'], 'weekdays_short' => ['Mul', 'Vil', 'Hiv', 'Hid', 'Hit', 'Hih', 'Lem'], 'weekdays_min' => ['Mul', 'Vil', 'Hiv', 'Hid', 'Hit', 'Hih', 'Lem'], 'months' => ['pa mwedzi gwa hutala', 'pa mwedzi gwa wuvili', 'pa mwedzi gwa wudatu', 'pa mwedzi gwa wutai', 'pa mwedzi gwa wuhanu', 'pa mwedzi gwa sita', 'pa mwedzi gwa saba', 'pa mwedzi gwa nane', 'pa mwedzi gwa tisa', 'pa mwedzi gwa kumi', 'pa mwedzi gwa kumi na moja', 'pa mwedzi gwa kumi na mbili'], 'months_short' => ['Hut', 'Vil', 'Dat', 'Tai', 'Han', 'Sit', 'Sab', 'Nan', 'Tis', 'Kum', 'Kmj', 'Kmb'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[?Ej  Carbon/Lang/en_MT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[''x  Carbon/Lang/fr_WF.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[pGGCarbon/Lang/en_BB.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[%Carbon/Lang/iw.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'], 'months_short' => ['ינו׳', 'פבר׳', 'מרץ', 'אפר׳', 'מאי', 'יוני', 'יולי', 'אוג׳', 'ספט׳', 'אוק׳', 'נוב׳', 'דצמ׳'], 'weekdays' => ['יום ראשון', 'יום שני', 'יום שלישי', 'יום רביעי', 'יום חמישי', 'יום שישי', 'יום שבת'], 'weekdays_short' => ['יום א׳', 'יום ב׳', 'יום ג׳', 'יום ד׳', 'יום ה׳', 'יום ו׳', 'שבת'], 'weekdays_min' => ['א׳', 'ב׳', 'ג׳', 'ד׳', 'ה׳', 'ו׳', 'ש׳'], 'meridiem' => ['לפנה״צ', 'אחה״צ'], 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'D.M.YYYY', 'LL' => 'D בMMM YYYY', 'LLL' => 'D בMMMM YYYY H:mm', 'LLLL' => 'dddd, D בMMMM YYYY H:mm', ], 'year' => ':count שנה', 'y' => ':count שנה', 'a_year' => ':count שנה', 'month' => ':count חודש', 'm' => ':count חודש', 'a_month' => ':count חודש', 'week' => ':count שבוע', 'w' => ':count שבוע', 'a_week' => ':count שבוע', 'day' => ':count יום', 'd' => ':count יום', 'a_day' => ':count יום', 'hour' => ':count שעה', 'h' => ':count שעה', 'a_hour' => ':count שעה', 'minute' => ':count דקה', 'min' => ':count דקה', 'a_minute' => ':count דקה', 'second' => ':count שניה', 's' => ':count שניה', 'a_second' => ':count שניה', 'ago' => 'לפני :time', 'from_now' => 'בעוד :time', ]); PKgt[))Carbon/Lang/ar_MR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ar.php', [ ]); PKgt[gY Y Carbon/Lang/id.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - du * - JD Isaacks * - Nafies Luthfi * - Raymundus Jati Primanda (mundusjp) * - diankur313 * - a-wip0 */ return [ 'year' => ':count tahun', 'a_year' => '{1}setahun|]1,Inf[:count tahun', 'y' => ':countthn', 'month' => ':count bulan', 'a_month' => '{1}sebulan|]1,Inf[:count bulan', 'm' => ':countbln', 'week' => ':count minggu', 'a_week' => '{1}seminggu|]1,Inf[:count minggu', 'w' => ':countmgg', 'day' => ':count hari', 'a_day' => '{1}sehari|]1,Inf[:count hari', 'd' => ':counthr', 'hour' => ':count jam', 'a_hour' => '{1}sejam|]1,Inf[:count jam', 'h' => ':countj', 'minute' => ':count menit', 'a_minute' => '{1}semenit|]1,Inf[:count menit', 'min' => ':countmnt', 'second' => ':count detik', 'a_second' => '{1}beberapa detik|]1,Inf[:count detik', 's' => ':countdt', 'ago' => ':time yang lalu', 'from_now' => ':time dari sekarang', 'after' => ':time setelahnya', 'before' => ':time sebelumnya', 'diff_now' => 'sekarang', 'diff_today' => 'Hari', 'diff_today_regexp' => 'Hari(?:\\s+ini)?(?:\\s+pukul)?', 'diff_yesterday' => 'kemarin', 'diff_yesterday_regexp' => 'Kemarin(?:\\s+pukul)?', 'diff_tomorrow' => 'besok', 'diff_tomorrow_regexp' => 'Besok(?:\\s+pukul)?', 'formats' => [ 'LT' => 'HH.mm', 'LTS' => 'HH.mm.ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY [pukul] HH.mm', 'LLLL' => 'dddd, D MMMM YYYY [pukul] HH.mm', ], 'calendar' => [ 'sameDay' => '[Hari ini pukul] LT', 'nextDay' => '[Besok pukul] LT', 'nextWeek' => 'dddd [pukul] LT', 'lastDay' => '[Kemarin pukul] LT', 'lastWeek' => 'dddd [lalu pukul] LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 11) { return 'pagi'; } if ($hour < 15) { return 'siang'; } if ($hour < 19) { return 'sore'; } return 'malam'; }, 'months' => ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agt', 'Sep', 'Okt', 'Nov', 'Des'], 'weekdays' => ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'], 'weekdays_short' => ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'], 'weekdays_min' => ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sb'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' dan '], ]; PKgt[pW)QCarbon/Lang/kab_DZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - belkacem77@gmail.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Yennayer', 'Fuṛar', 'Meɣres', 'Yebrir', 'Mayyu', 'Yunyu', 'Yulyu', 'ɣuct', 'Ctembeṛ', 'Tubeṛ', 'Wambeṛ', 'Dujembeṛ'], 'months_short' => ['Yen', 'Fur', 'Meɣ', 'Yeb', 'May', 'Yun', 'Yul', 'ɣuc', 'Cte', 'Tub', 'Wam', 'Duj'], 'weekdays' => ['Acer', 'Arim', 'Aram', 'Ahad', 'Amhad', 'Sem', 'Sed'], 'weekdays_short' => ['Ace', 'Ari', 'Ara', 'Aha', 'Amh', 'Sem', 'Sed'], 'weekdays_min' => ['Ace', 'Ari', 'Ara', 'Aha', 'Amh', 'Sem', 'Sed'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'meridiem' => ['FT', 'MD'], 'year' => ':count n yiseggasen', 'y' => ':count n yiseggasen', 'a_year' => ':count n yiseggasen', 'month' => ':count n wayyuren', 'm' => ':count n wayyuren', 'a_month' => ':count n wayyuren', 'week' => ':count n ledwaṛ', // less reliable 'w' => ':count n ledwaṛ', // less reliable 'a_week' => ':count n ledwaṛ', // less reliable 'day' => ':count n wussan', 'd' => ':count n wussan', 'a_day' => ':count n wussan', 'hour' => ':count n tsaɛtin', 'h' => ':count n tsaɛtin', 'a_hour' => ':count n tsaɛtin', 'minute' => ':count n tedqiqin', 'min' => ':count n tedqiqin', 'a_minute' => ':count n tedqiqin', 'second' => ':count tasdidt', // less reliable 's' => ':count tasdidt', // less reliable 'a_second' => ':count tasdidt', // less reliable ]); PKgt[a OOCarbon/Lang/mni.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/mni_IN.php'; PKgt[CL  Carbon/Lang/lo_LA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/lo.php'; PKgt[x0NNCarbon/Lang/ts.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ts_ZA.php'; PKgt[1ssCarbon/Lang/vai_Latn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], 'weekdays_short' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], 'weekdays_min' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], 'months' => ['luukao kemã', 'ɓandaɓu', 'vɔɔ', 'fulu', 'goo', '6', '7', 'kɔnde', 'saah', 'galo', 'kenpkato ɓololɔ', 'luukao lɔma'], 'months_short' => ['luukao kemã', 'ɓandaɓu', 'vɔɔ', 'fulu', 'goo', '6', '7', 'kɔnde', 'saah', 'galo', 'kenpkato ɓololɔ', 'luukao lɔma'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd, D MMMM YYYY h:mm a', ], ]); PKgt[pGGCarbon/Lang/en_CC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[jtXXCarbon/Lang/twq.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ses.php', [ 'meridiem' => ['Subbaahi', 'Zaarikay b'], ]); PKgt[-'OOCarbon/Lang/doi.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/doi_IN.php'; PKgt[Carbon/Lang/guz.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Ma', 'Mo'], 'weekdays' => ['Chumapiri', 'Chumatato', 'Chumaine', 'Chumatano', 'Aramisi', 'Ichuma', 'Esabato'], 'weekdays_short' => ['Cpr', 'Ctt', 'Cmn', 'Cmt', 'Ars', 'Icm', 'Est'], 'weekdays_min' => ['Cpr', 'Ctt', 'Cmn', 'Cmt', 'Ars', 'Icm', 'Est'], 'months' => ['Chanuari', 'Feburari', 'Machi', 'Apiriri', 'Mei', 'Juni', 'Chulai', 'Agosti', 'Septemba', 'Okitoba', 'Nobemba', 'Disemba'], 'months_short' => ['Can', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Cul', 'Agt', 'Sep', 'Okt', 'Nob', 'Dis'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'month' => ':count omotunyi', // less reliable 'm' => ':count omotunyi', // less reliable 'a_month' => ':count omotunyi', // less reliable 'week' => ':count isano naibere', // less reliable 'w' => ':count isano naibere', // less reliable 'a_week' => ':count isano naibere', // less reliable 'second' => ':count ibere', // less reliable 's' => ':count ibere', // less reliable 'a_second' => ':count ibere', // less reliable 'year' => ':count omwaka', 'y' => ':count omwaka', 'a_year' => ':count omwaka', 'day' => ':count rituko', 'd' => ':count rituko', 'a_day' => ':count rituko', ]); PKgt[pGGCarbon/Lang/en_ER.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[_Carbon/Lang/az_Latn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/az.php', [ 'meridiem' => ['a', 'p'], 'weekdays' => ['bazar', 'bazar ertəsi', 'çərşənbə axşamı', 'çərşənbə', 'cümə axşamı', 'cümə', 'şənbə'], 'weekdays_short' => ['B.', 'B.E.', 'Ç.A.', 'Ç.', 'C.A.', 'C.', 'Ş.'], 'weekdays_min' => ['B.', 'B.E.', 'Ç.A.', 'Ç.', 'C.A.', 'C.', 'Ş.'], 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], 'months_short' => ['yan', 'fev', 'mar', 'apr', 'may', 'iyn', 'iyl', 'avq', 'sen', 'okt', 'noy', 'dek'], 'months_standalone' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'İyun', 'İyul', 'Avqust', 'Sentyabr', 'Oktyabr', 'Noyabr', 'Dekabr'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'D MMMM YYYY, dddd HH:mm', ], ]); PKgt[ Carbon/Lang/sw.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - leyluj * - Josh Soref * - ryanhart2 */ return [ 'year' => 'mwaka :count|miaka :count', 'a_year' => 'mwaka mmoja|miaka :count', 'y' => 'mwaka :count|miaka :count', 'month' => 'mwezi :count|miezi :count', 'a_month' => 'mwezi mmoja|miezi :count', 'm' => 'mwezi :count|miezi :count', 'week' => 'wiki :count', 'a_week' => 'wiki mmoja|wiki :count', 'w' => 'w. :count', 'day' => 'siku :count', 'a_day' => 'siku moja|masiku :count', 'd' => 'si. :count', 'hour' => 'saa :count|masaa :count', 'a_hour' => 'saa limoja|masaa :count', 'h' => 'saa :count|masaa :count', 'minute' => 'dakika :count', 'a_minute' => 'dakika moja|dakika :count', 'min' => 'd. :count', 'second' => 'sekunde :count', 'a_second' => 'hivi punde|sekunde :count', 's' => 'se. :count', 'ago' => 'tokea :time', 'from_now' => ':time baadaye', 'after' => ':time baada', 'before' => ':time kabla', 'diff_now' => 'sasa hivi', 'diff_today' => 'leo', 'diff_today_regexp' => 'leo(?:\\s+saa)?', 'diff_yesterday' => 'jana', 'diff_tomorrow' => 'kesho', 'diff_tomorrow_regexp' => 'kesho(?:\\s+saa)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[leo saa] LT', 'nextDay' => '[kesho saa] LT', 'nextWeek' => '[wiki ijayo] dddd [saat] LT', 'lastDay' => '[jana] LT', 'lastWeek' => '[wiki iliyopita] dddd [saat] LT', 'sameElse' => 'L', ], 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], 'weekdays_short' => ['Jpl', 'Jtat', 'Jnne', 'Jtan', 'Alh', 'Ijm', 'Jmos'], 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Al', 'Ij', 'J1'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' na '], ]; PKgt[pGGCarbon/Lang/en_TO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[4Carbon/Lang/it_CH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Propaganistas */ return array_replace_recursive(require __DIR__.'/it.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], ]); PKgt[>NCarbon/Lang/ka.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Tornike Razmadze * - François B * - Lasha Dolidze * - Tim Fish * - JD Isaacks * - Tornike Razmadze * - François B * - Lasha Dolidze * - JD Isaacks * - LONGMAN * - Avtandil Kikabidze (akalongman) * - Levan Velijanashvili (Stichoza) */ use Carbon\CarbonInterface; return [ 'year' => ':count წელი', 'y' => ':count წელი', 'a_year' => '{1}წელი|]1,Inf[:count წელი', 'month' => ':count თვე', 'm' => ':count თვე', 'a_month' => '{1}თვე|]1,Inf[:count თვე', 'week' => ':count კვირა', 'w' => ':count კვირა', 'a_week' => '{1}კვირა|]1,Inf[:count კვირა', 'day' => ':count დღე', 'd' => ':count დღე', 'a_day' => '{1}დღე|]1,Inf[:count დღე', 'hour' => ':count საათი', 'h' => ':count საათი', 'a_hour' => '{1}საათი|]1,Inf[:count საათი', 'minute' => ':count წუთი', 'min' => ':count წუთი', 'a_minute' => '{1}წუთი|]1,Inf[:count წუთი', 'second' => ':count წამი', 's' => ':count წამი', 'a_second' => '{1}რამდენიმე წამი|]1,Inf[:count წამი', 'ago' => function ($time) { $replacements = [ // year 'წელი' => 'წლის', // month 'თვე' => 'თვის', // week 'კვირა' => 'კვირის', // day 'დღე' => 'დღის', // hour 'საათი' => 'საათის', // minute 'წუთი' => 'წუთის', // second 'წამი' => 'წამის', ]; $time = strtr($time, array_flip($replacements)); $time = strtr($time, $replacements); return "$time წინ"; }, 'from_now' => function ($time) { $replacements = [ // year 'წელი' => 'წელიწადში', // week 'კვირა' => 'კვირაში', // day 'დღე' => 'დღეში', // month 'თვე' => 'თვეში', // hour 'საათი' => 'საათში', // minute 'წუთი' => 'წუთში', // second 'წამი' => 'წამში', ]; $time = strtr($time, array_flip($replacements)); $time = strtr($time, $replacements); return $time; }, 'after' => function ($time) { $replacements = [ // year 'წელი' => 'წლის', // month 'თვე' => 'თვის', // week 'კვირა' => 'კვირის', // day 'დღე' => 'დღის', // hour 'საათი' => 'საათის', // minute 'წუთი' => 'წუთის', // second 'წამი' => 'წამის', ]; $time = strtr($time, array_flip($replacements)); $time = strtr($time, $replacements); return "$time შემდეგ"; }, 'before' => function ($time) { $replacements = [ // year 'წელი' => 'წლით', // month 'თვე' => 'თვით', // week 'კვირა' => 'კვირით', // day 'დღე' => 'დღით', // hour 'საათი' => 'საათით', // minute 'წუთი' => 'წუთით', // second 'წამი' => 'წამით', ]; $time = strtr($time, array_flip($replacements)); $time = strtr($time, $replacements); return "$time ადრე"; }, 'diff_now' => 'ახლა', 'diff_today' => 'დღეს', 'diff_yesterday' => 'გუშინ', 'diff_tomorrow' => 'ხვალ', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[დღეს], LT[-ზე]', 'nextDay' => '[ხვალ], LT[-ზე]', 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { return ($current->isSameWeek($other) ? '' : '[შემდეგ] ').'dddd, LT[-ზე]'; }, 'lastDay' => '[გუშინ], LT[-ზე]', 'lastWeek' => '[წინა] dddd, LT-ზე', 'sameElse' => 'L', ], 'ordinal' => function ($number) { if ($number === 0) { return $number; } if ($number === 1) { return $number.'-ლი'; } if (($number < 20) || ($number <= 100 && ($number % 20 === 0)) || ($number % 100 === 0)) { return 'მე-'.$number; } return $number.'-ე'; }, 'months' => ['იანვარი', 'თებერვალი', 'მარტი', 'აპრილი', 'მაისი', 'ივნისი', 'ივლისი', 'აგვისტო', 'სექტემბერი', 'ოქტომბერი', 'ნოემბერი', 'დეკემბერი'], 'months_standalone' => ['იანვარს', 'თებერვალს', 'მარტს', 'აპრილს', 'მაისს', 'ივნისს', 'ივლისს', 'აგვისტოს', 'სექტემბერს', 'ოქტომბერს', 'ნოემბერს', 'დეკემბერს'], 'months_short' => ['იან', 'თებ', 'მარ', 'აპრ', 'მაი', 'ივნ', 'ივლ', 'აგვ', 'სექ', 'ოქტ', 'ნოე', 'დეკ'], 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', 'weekdays' => ['კვირას', 'ორშაბათს', 'სამშაბათს', 'ოთხშაბათს', 'ხუთშაბათს', 'პარასკევს', 'შაბათს'], 'weekdays_standalone' => ['კვირა', 'ორშაბათი', 'სამშაბათი', 'ოთხშაბათი', 'ხუთშაბათი', 'პარასკევი', 'შაბათი'], 'weekdays_short' => ['კვი', 'ორშ', 'სამ', 'ოთხ', 'ხუთ', 'პარ', 'შაბ'], 'weekdays_min' => ['კვ', 'ორ', 'სა', 'ოთ', 'ხუ', 'პა', 'შა'], 'weekdays_regexp' => '/^([^d].*|.*[^d])$/', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' და '], 'meridiem' => function ($hour) { if ($hour >= 4) { if ($hour < 11) { return 'დილის'; } if ($hour < 16) { return 'შუადღის'; } if ($hour < 22) { return 'საღამოს'; } } return 'ღამის'; }, ]; PKgt[  Carbon/Lang/sr_RS@latin.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/sr.php'; PKgt[dCarbon/Lang/es_VE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[X  Carbon/Lang/mi_NZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/mi.php'; PKgt[NNCarbon/Lang/yi.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/yi_US.php'; PKgt[EWccCarbon/Lang/sbp.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Lwamilawu', 'Pashamihe'], 'weekdays' => ['Mulungu', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alahamisi', 'Ijumaa', 'Jumamosi'], 'weekdays_short' => ['Mul', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'weekdays_min' => ['Mul', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'months' => ['Mupalangulwa', 'Mwitope', 'Mushende', 'Munyi', 'Mushende Magali', 'Mujimbi', 'Mushipepo', 'Mupuguto', 'Munyense', 'Mokhu', 'Musongandembwe', 'Muhaano'], 'months_short' => ['Mup', 'Mwi', 'Msh', 'Mun', 'Mag', 'Muj', 'Msp', 'Mpg', 'Mye', 'Mok', 'Mus', 'Muh'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[pNNCarbon/Lang/kl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/kl_GL.php'; PKgt[S%OOCarbon/Lang/niu.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/niu_NU.php'; PKgt[ KKCarbon/Lang/hsb_DE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Information from Michael Wolf Andrzej Krzysztofowicz ankry@mif.pg.gda.pl */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'DD. MMMM YYYY', 'LLL' => 'DD. MMMM, HH:mm [hodź.]', 'LLLL' => 'dddd, DD. MMMM YYYY, HH:mm [hodź.]', ], 'months' => ['januara', 'februara', 'měrca', 'apryla', 'meje', 'junija', 'julija', 'awgusta', 'septembra', 'oktobra', 'nowembra', 'decembra'], 'months_short' => ['Jan', 'Feb', 'Měr', 'Apr', 'Mej', 'Jun', 'Jul', 'Awg', 'Sep', 'Okt', 'Now', 'Dec'], 'weekdays' => ['Njedźela', 'Póndźela', 'Wutora', 'Srjeda', 'Štvórtk', 'Pjatk', 'Sobota'], 'weekdays_short' => ['Nj', 'Pó', 'Wu', 'Sr', 'Št', 'Pj', 'So'], 'weekdays_min' => ['Nj', 'Pó', 'Wu', 'Sr', 'Št', 'Pj', 'So'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count lěto', 'y' => ':count lěto', 'a_year' => ':count lěto', 'month' => ':count měsac', 'm' => ':count měsac', 'a_month' => ':count měsac', 'week' => ':count tydźeń', 'w' => ':count tydźeń', 'a_week' => ':count tydźeń', 'day' => ':count dźeń', 'd' => ':count dźeń', 'a_day' => ':count dźeń', 'hour' => ':count hodźina', 'h' => ':count hodźina', 'a_hour' => ':count hodźina', 'minute' => ':count chwila', 'min' => ':count chwila', 'a_minute' => ':count chwila', 'second' => ':count druhi', 's' => ':count druhi', 'a_second' => ':count druhi', ]); PKgt[0RXwCarbon/Lang/chr_US.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Cherokee Nation Joseph Erb josepherb7@gmail.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'MM/DD/YYYY', ], 'months' => ['ᎤᏃᎸᏔᏅ', 'ᎧᎦᎵ', 'ᎠᏅᏱ', 'ᎧᏬᏂ', 'ᎠᏂᏍᎬᏘ', 'ᏕᎭᎷᏱ', 'ᎫᏰᏉᏂ', 'ᎦᎶᏂ', 'ᏚᎵᏍᏗ', 'ᏚᏂᏅᏗ', 'ᏅᏓᏕᏆ', 'ᎥᏍᎩᏱ'], 'months_short' => ['ᎤᏃ', 'ᎧᎦ', 'ᎠᏅ', 'ᎧᏬ', 'ᎠᏂ', 'ᏕᎭ', 'ᎫᏰ', 'ᎦᎶ', 'ᏚᎵ', 'ᏚᏂ', 'ᏅᏓ', 'ᎥᏍ'], 'weekdays' => ['ᎤᎾᏙᏓᏆᏍᎬ', 'ᎤᎾᏙᏓᏉᏅᎯ', 'ᏔᎵᏁᎢᎦ', 'ᏦᎢᏁᎢᎦ', 'ᏅᎩᏁᎢᎦ', 'ᏧᎾᎩᎶᏍᏗ', 'ᎤᎾᏙᏓᏈᏕᎾ'], 'weekdays_short' => ['ᏆᏍᎬ', 'ᏉᏅᎯ', 'ᏔᎵᏁ', 'ᏦᎢᏁ', 'ᏅᎩᏁ', 'ᏧᎾᎩ', 'ᏈᏕᎾ'], 'weekdays_min' => ['ᏆᏍᎬ', 'ᏉᏅᎯ', 'ᏔᎵᏁ', 'ᏦᎢᏁ', 'ᏅᎩᏁ', 'ᏧᎾᎩ', 'ᏈᏕᎾ'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['ᏌᎾᎴ', 'ᏒᎯᏱᎢᏗᏢ', 'ꮜꮎꮄ', 'ꮢꭿᏹꭲꮧꮲ'], 'second' => ':count ᏐᎢ', // less reliable 's' => ':count ᏐᎢ', // less reliable 'a_second' => ':count ᏐᎢ', // less reliable 'year' => ':count ᏑᏕᏘᏴᏓ', 'y' => ':count ᏑᏕᏘᏴᏓ', 'a_year' => ':count ᏑᏕᏘᏴᏓ', 'month' => ':count ᏏᏅᏙ', 'm' => ':count ᏏᏅᏙ', 'a_month' => ':count ᏏᏅᏙ', 'week' => ':count ᏑᎾᏙᏓᏆᏍᏗ', 'w' => ':count ᏑᎾᏙᏓᏆᏍᏗ', 'a_week' => ':count ᏑᎾᏙᏓᏆᏍᏗ', 'day' => ':count ᎢᎦ', 'd' => ':count ᎢᎦ', 'a_day' => ':count ᎢᎦ', 'hour' => ':count ᏑᏟᎶᏛ', 'h' => ':count ᏑᏟᎶᏛ', 'a_hour' => ':count ᏑᏟᎶᏛ', 'minute' => ':count ᎢᏯᏔᏬᏍᏔᏅ', 'min' => ':count ᎢᏯᏔᏬᏍᏔᏅ', 'a_minute' => ':count ᎢᏯᏔᏬᏍᏔᏅ', 'ago' => ':time ᏥᎨᏒ', 'from_now' => 'ᎾᎿ :time', ]); PKgt[a$MMCarbon/Lang/fr_CM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'meridiem' => ['mat.', 'soir'], ]); PKgt[ۺ  Carbon/Lang/hu_HU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/hu.php'; PKgt[`Y Carbon/Lang/zh_Hans.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - monkeycon * - François B * - Jason Katz-Brown * - Konstantin Konev * - Chris Lam * - Serhan Apaydın * - Gary Lo * - JD Isaacks * - Chris Hemp * - shankesgk2 * - Daniel Cheung (danvim) */ return [ 'year' => ':count:optional-space年', 'y' => ':count:optional-space年', 'month' => ':count:optional-space个月', 'm' => ':count:optional-space个月', 'week' => ':count:optional-space周', 'w' => ':count:optional-space周', 'day' => ':count:optional-space天', 'd' => ':count:optional-space天', 'hour' => ':count:optional-space小时', 'h' => ':count:optional-space小时', 'minute' => ':count:optional-space分钟', 'min' => ':count:optional-space分钟', 'second' => ':count:optional-space秒', 'a_second' => '{1}几秒|]1,Inf[:count:optional-space秒', 's' => ':count:optional-space秒', 'ago' => ':time前', 'from_now' => ':time后', 'after' => ':time后', 'before' => ':time前', 'diff_now' => '现在', 'diff_today' => '今天', 'diff_yesterday' => '昨天', 'diff_tomorrow' => '明天', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY/MM/DD', 'LL' => 'YYYY年M月D日', 'LLL' => 'YYYY年M月D日 HH:mm', 'LLLL' => 'YYYY年M月D日dddd HH:mm', ], 'calendar' => [ 'sameDay' => '[今天]LT', 'nextDay' => '[明天]LT', 'nextWeek' => '[下]ddddLT', 'lastDay' => '[昨天]LT', 'lastWeek' => '[上]ddddLT', 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { switch ($period) { case 'd': case 'D': case 'DDD': return $number.'日'; case 'M': return $number.'月'; case 'w': case 'W': return $number.'周'; default: return $number; } }, 'meridiem' => function ($hour, $minute) { $time = $hour * 100 + $minute; if ($time < 600) { return '凌晨'; } if ($time < 900) { return '早上'; } if ($time < 1130) { return '上午'; } if ($time < 1230) { return '中午'; } if ($time < 1800) { return '下午'; } return '晚上'; }, 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], 'weekdays_short' => ['周日', '周一', '周二', '周三', '周四', '周五', '周六'], 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => '', ]; PKgt[''x  Carbon/Lang/fr_PM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/teo.php', [ 'first_day_of_week' => 0, ]); PKgt[^ӧv v Carbon/Lang/mt.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Alessandro Maruccia */ return [ 'year' => 'sena|:count sni|:count sni|:count sni', 'y' => 'sa sena|:count snin|:count snin|:count snin', 'month' => 'xahar|:count xhur|:count xhur|:count xhur', 'm' => ':count xahar|:count xhur|:count xhur|:count xhur', 'week' => 'gimgħa|:count ġimgħat|:count ġimgħat|:count ġimgħat', 'w' => 'ġimgħa|:count ġimgħat|:count ġimgħat|:count ġimgħat', 'day' => 'ġurnata|:count ġranet|:count ġranet|:count ġranet', 'd' => 'ġurnata|:count ġranet|:count ġranet|:count ġranet', 'hour' => 'siegħa|:count siegħat|:count siegħat|:count siegħat', 'h' => 'siegħa|:count sigħat|:count sigħat|:count sigħat', 'minute' => 'minuta|:count minuti|:count minuti|:count minuti', 'min' => 'min.|:count min.|:count min.|:count min.', 'second' => 'ftit sekondi|:count sekondi|:count sekondi|:count sekondi', 's' => 'sek.|:count sek.|:count sek.|:count sek.', 'ago' => ':time ilu', 'from_now' => 'f’ :time', 'diff_now' => 'issa', 'diff_today' => 'Illum', 'diff_today_regexp' => 'Illum(?:\\s+fil-)?', 'diff_yesterday' => 'lbieraħ', 'diff_yesterday_regexp' => 'Il-bieraħ(?:\\s+fil-)?', 'diff_tomorrow' => 'għada', 'diff_tomorrow_regexp' => 'Għada(?:\\s+fil-)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Illum fil-]LT', 'nextDay' => '[Għada fil-]LT', 'nextWeek' => 'dddd [fil-]LT', 'lastDay' => '[Il-bieraħ fil-]LT', 'lastWeek' => 'dddd [li għadda] [fil-]LT', 'sameElse' => 'L', ], 'ordinal' => ':numberº', 'months' => ['Jannar', 'Frar', 'Marzu', 'April', 'Mejju', 'Ġunju', 'Lulju', 'Awwissu', 'Settembru', 'Ottubru', 'Novembru', 'Diċembru'], 'months_short' => ['Jan', 'Fra', 'Mar', 'Apr', 'Mej', 'Ġun', 'Lul', 'Aww', 'Set', 'Ott', 'Nov', 'Diċ'], 'weekdays' => ['Il-Ħadd', 'It-Tnejn', 'It-Tlieta', 'L-Erbgħa', 'Il-Ħamis', 'Il-Ġimgħa', 'Is-Sibt'], 'weekdays_short' => ['Ħad', 'Tne', 'Tli', 'Erb', 'Ħam', 'Ġim', 'Sib'], 'weekdays_min' => ['Ħa', 'Tn', 'Tl', 'Er', 'Ħa', 'Ġi', 'Si'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' u '], ]; PKgt[<Carbon/Lang/ln.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ubuntu René Manassé GALEKWA renemanasse@gmail.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'months' => ['sánzá ya yambo', 'sánzá ya míbalé', 'sánzá ya mísáto', 'sánzá ya mínei', 'sánzá ya mítáno', 'sánzá ya motóbá', 'sánzá ya nsambo', 'sánzá ya mwambe', 'sánzá ya libwa', 'sánzá ya zómi', 'sánzá ya zómi na mɔ̌kɔ́', 'sánzá ya zómi na míbalé'], 'months_short' => ['yan', 'fbl', 'msi', 'apl', 'mai', 'yun', 'yul', 'agt', 'stb', 'ɔtb', 'nvb', 'dsb'], 'weekdays' => ['Lomíngo', 'Mosálá mɔ̌kɔ́', 'Misálá míbalé', 'Misálá mísáto', 'Misálá mínei', 'Misálá mítáno', 'Mpɔ́sɔ'], 'weekdays_short' => ['m1.', 'm2.', 'm3.', 'm4.', 'm5.', 'm6.', 'm7.'], 'weekdays_min' => ['m1.', 'm2.', 'm3.', 'm4.', 'm5.', 'm6.', 'm7.'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => 'mbula :count', 'y' => 'mbula :count', 'a_year' => 'mbula :count', 'month' => 'sánzá :count', 'm' => 'sánzá :count', 'a_month' => 'sánzá :count', 'week' => 'mpɔ́sɔ :count', 'w' => 'mpɔ́sɔ :count', 'a_week' => 'mpɔ́sɔ :count', 'day' => 'mokɔlɔ :count', 'd' => 'mokɔlɔ :count', 'a_day' => 'mokɔlɔ :count', 'hour' => 'ngonga :count', 'h' => 'ngonga :count', 'a_hour' => 'ngonga :count', 'minute' => 'miniti :count', 'min' => 'miniti :count', 'a_minute' => 'miniti :count', 'second' => 'segɔnde :count', 's' => 'segɔnde :count', 'a_second' => 'segɔnde :count', ]); PKgt[!kCarbon/Lang/ru_UA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RFC 2319 bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/ru.php', [ 'weekdays' => ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'], 'weekdays_short' => ['вск', 'пнд', 'вто', 'срд', 'чтв', 'птн', 'суб'], 'weekdays_min' => ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'су'], ]); PKgt[?Ej  Carbon/Lang/en_VI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[pGGCarbon/Lang/en_VU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[pGGCarbon/Lang/en_TZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[+  Carbon/Lang/se_NO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/se.php'; PKgt[Zб  Carbon/Lang/id_ID.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/id.php'; PKgt[{  Carbon/Lang/ka_GE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ka.php'; PKgt[5NoCarbon/Lang/en_NZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Mayank Badola * - Luke McGregor * - JD Isaacks */ return array_replace_recursive(require __DIR__.'/en.php', [ 'from_now' => 'in :time', 'formats' => [ 'LT' => 'h:mm A', 'LTS' => 'h:mm:ss A', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY h:mm A', 'LLLL' => 'dddd, D MMMM YYYY h:mm A', ], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[FCarbon/Lang/en_DK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Danish Standards Association bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY-MM-DD', ], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[pGGCarbon/Lang/en_NU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[ NNCarbon/Lang/ig.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ig_NG.php'; PKgt[ŽCarbon/Lang/kln.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['krn', 'koosk'], 'weekdays' => ['Kotisap', 'Kotaai', 'Koaeng’', 'Kosomok', 'Koang’wan', 'Komuut', 'Kolo'], 'weekdays_short' => ['Kts', 'Kot', 'Koo', 'Kos', 'Koa', 'Kom', 'Kol'], 'weekdays_min' => ['Kts', 'Kot', 'Koo', 'Kos', 'Koa', 'Kom', 'Kol'], 'months' => ['Mulgul', 'Ng’atyaato', 'Kiptaamo', 'Iwootkuut', 'Mamuut', 'Paagi', 'Ng’eiyeet', 'Rooptui', 'Bureet', 'Epeeso', 'Kipsuunde ne taai', 'Kipsuunde nebo aeng’'], 'months_short' => ['Mul', 'Ngat', 'Taa', 'Iwo', 'Mam', 'Paa', 'Nge', 'Roo', 'Bur', 'Epe', 'Kpt', 'Kpa'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'year' => ':count maghatiat', // less reliable 'y' => ':count maghatiat', // less reliable 'a_year' => ':count maghatiat', // less reliable ]); PKgt[.aCarbon/Lang/sv_AX.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/sv.php', [ 'formats' => [ 'L' => 'YYYY-MM-dd', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], ]); PKgt[^َCarbon/Lang/ln_AO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ln.php', [ 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa míbalé', 'mokɔlɔ mwa mísáto', 'mokɔlɔ ya mínéi', 'mokɔlɔ ya mítáno', 'mpɔ́sɔ'], 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], 'weekdays_min' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], 'meridiem' => ['ntɔ́ngɔ́', 'mpókwa'], ]); PKgt[I))Carbon/Lang/agq.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['a.g', 'a.k'], 'weekdays' => ['tsuʔntsɨ', 'tsuʔukpà', 'tsuʔughɔe', 'tsuʔutɔ̀mlò', 'tsuʔumè', 'tsuʔughɨ̂m', 'tsuʔndzɨkɔʔɔ'], 'weekdays_short' => ['nts', 'kpa', 'ghɔ', 'tɔm', 'ume', 'ghɨ', 'dzk'], 'weekdays_min' => ['nts', 'kpa', 'ghɔ', 'tɔm', 'ume', 'ghɨ', 'dzk'], 'months' => ['ndzɔ̀ŋɔ̀nùm', 'ndzɔ̀ŋɔ̀kƗ̀zùʔ', 'ndzɔ̀ŋɔ̀tƗ̀dʉ̀ghà', 'ndzɔ̀ŋɔ̀tǎafʉ̄ghā', 'ndzɔ̀ŋèsèe', 'ndzɔ̀ŋɔ̀nzùghò', 'ndzɔ̀ŋɔ̀dùmlo', 'ndzɔ̀ŋɔ̀kwîfɔ̀e', 'ndzɔ̀ŋɔ̀tƗ̀fʉ̀ghàdzughù', 'ndzɔ̀ŋɔ̀ghǔuwelɔ̀m', 'ndzɔ̀ŋɔ̀chwaʔàkaa wo', 'ndzɔ̀ŋèfwòo'], 'months_short' => ['nùm', 'kɨz', 'tɨd', 'taa', 'see', 'nzu', 'dum', 'fɔe', 'dzu', 'lɔm', 'kaa', 'fwo'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], ]); PKgt[ʷCarbon/Lang/zh_Hant_MO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/zh_Hant.php'; PKgt[Ӿ6Carbon/Lang/zh_Hans_MO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/zh_Hans.php'; PKgt[R^IICarbon/Lang/cmn_TW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY年MM月DD號', ], 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], 'months_short' => [' 1月', ' 2月', ' 3月', ' 4月', ' 5月', ' 6月', ' 7月', ' 8月', ' 9月', '10月', '11月', '12月'], 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], 'meridiem' => ['上午', '下午'], 'year' => ':count 年', 'y' => ':count 年', 'a_year' => ':count 年', 'month' => ':count 月', 'm' => ':count 月', 'a_month' => ':count 月', 'week' => ':count 周', 'w' => ':count 周', 'a_week' => ':count 周', 'day' => ':count 白天', 'd' => ':count 白天', 'a_day' => ':count 白天', 'hour' => ':count 小时', 'h' => ':count 小时', 'a_hour' => ':count 小时', 'minute' => ':count 分钟', 'min' => ':count 分钟', 'a_minute' => ':count 分钟', 'second' => ':count 秒', 's' => ':count 秒', 'a_second' => ':count 秒', ]); PKgt[pGGCarbon/Lang/en_NR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[NNCarbon/Lang/or.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/or_IN.php'; PKgt[-jINNCarbon/Lang/to.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/to_TO.php'; PKgt[-Ј Carbon/Lang/zh_Hant.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Adam * - monkeycon * - François B * - Jason Katz-Brown * - Chris Lam * - Serhan Apaydın * - Gary Lo * - JD Isaacks * - Chris Hemp * - Eddie * - KID * - shankesgk2 * - Daniel Cheung (danvim) */ return [ 'year' => ':count:optional-space年', 'y' => ':count:optional-space年', 'month' => ':count:optional-space個月', 'm' => ':count:optional-space月', 'week' => ':count:optional-space週', 'w' => ':count:optional-space週', 'day' => ':count:optional-space天', 'd' => ':count:optional-space天', 'hour' => ':count:optional-space小時', 'h' => ':count:optional-space小時', 'minute' => ':count:optional-space分鐘', 'min' => ':count:optional-space分鐘', 'second' => ':count:optional-space秒', 'a_second' => '{1}幾秒|]1,Inf[:count:optional-space秒', 's' => ':count:optional-space秒', 'ago' => ':time前', 'from_now' => ':time後', 'after' => ':time後', 'before' => ':time前', 'diff_now' => '現在', 'diff_today' => '今天', 'diff_yesterday' => '昨天', 'diff_tomorrow' => '明天', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY/MM/DD', 'LL' => 'YYYY年M月D日', 'LLL' => 'YYYY年M月D日 HH:mm', 'LLLL' => 'YYYY年M月D日dddd HH:mm', ], 'calendar' => [ 'sameDay' => '[今天] LT', 'nextDay' => '[明天] LT', 'nextWeek' => '[下]dddd LT', 'lastDay' => '[昨天] LT', 'lastWeek' => '[上]dddd LT', 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { switch ($period) { case 'd': case 'D': case 'DDD': return $number.'日'; case 'M': return $number.'月'; case 'w': case 'W': return $number.'周'; default: return $number; } }, 'meridiem' => function ($hour, $minute) { $time = $hour * 100 + $minute; if ($time < 600) { return '凌晨'; } if ($time < 900) { return '早上'; } if ($time < 1130) { return '上午'; } if ($time < 1230) { return '中午'; } if ($time < 1800) { return '下午'; } return '晚上'; }, 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], 'weekdays_short' => ['週日', '週一', '週二', '週三', '週四', '週五', '週六'], 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => '', ]; PKgt[ PccCarbon/Lang/pa_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Guo Xiang Tan * - Josh Soref * - Ash * - harpreetkhalsagtbit */ return require __DIR__.'/pa.php'; PKgt["Ϟ Carbon/Lang/fo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kristian Sakarisson * - François B * - JD Isaacks * - Sverri Mohr Olsen */ return [ 'year' => 'eitt ár|:count ár', 'y' => ':count ár|:count ár', 'month' => 'ein mánaði|:count mánaðir', 'm' => ':count mánaður|:count mánaðir', 'week' => ':count vika|:count vikur', 'w' => ':count vika|:count vikur', 'day' => 'ein dagur|:count dagar', 'd' => ':count dag|:count dagar', 'hour' => 'ein tími|:count tímar', 'h' => ':count tími|:count tímar', 'minute' => 'ein minutt|:count minuttir', 'min' => ':count minutt|:count minuttir', 'second' => 'fá sekund|:count sekundir', 's' => ':count sekund|:count sekundir', 'ago' => ':time síðani', 'from_now' => 'um :time', 'after' => ':time aftaná', 'before' => ':time áðrenn', 'diff_today' => 'Í', 'diff_yesterday' => 'Í', 'diff_yesterday_regexp' => 'Í(?:\\s+gjár)?(?:\\s+kl.)?', 'diff_tomorrow' => 'Í', 'diff_tomorrow_regexp' => 'Í(?:\\s+morgin)?(?:\\s+kl.)?', 'diff_today_regexp' => 'Í(?:\\s+dag)?(?:\\s+kl.)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D. MMMM, YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Í dag kl.] LT', 'nextDay' => '[Í morgin kl.] LT', 'nextWeek' => 'dddd [kl.] LT', 'lastDay' => '[Í gjár kl.] LT', 'lastWeek' => '[síðstu] dddd [kl] LT', 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['januar', 'februar', 'mars', 'apríl', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], 'weekdays' => ['sunnudagur', 'mánadagur', 'týsdagur', 'mikudagur', 'hósdagur', 'fríggjadagur', 'leygardagur'], 'weekdays_short' => ['sun', 'mán', 'týs', 'mik', 'hós', 'frí', 'ley'], 'weekdays_min' => ['su', 'má', 'tý', 'mi', 'hó', 'fr', 'le'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' og '], ]; PKgt[+H  Carbon/Lang/vi_VN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/vi.php'; PKgt[''x  Carbon/Lang/fr_BF.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[q  Carbon/Lang/om_ET.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/om.php'; PKgt[% Carbon/Lang/so.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Author: * - Abdifatah Abdilahi(@abdifatahz) */ return [ 'year' => ':count sanad|:count sanadood', 'a_year' => 'sanad|:count sanadood', 'y' => '{1}:countsn|{0}:countsns|]1,Inf[:countsn', 'month' => ':count bil|:count bilood', 'a_month' => 'bil|:count bilood', 'm' => ':countbil', 'week' => ':count isbuuc', 'a_week' => 'isbuuc|:count isbuuc', 'w' => ':countis', 'day' => ':count maalin|:count maalmood', 'a_day' => 'maalin|:count maalmood', 'd' => ':countml', 'hour' => ':count saac', 'a_hour' => 'saacad|:count saac', 'h' => ':countsc', 'minute' => ':count daqiiqo', 'a_minute' => 'daqiiqo|:count daqiiqo', 'min' => ':countdq', 'second' => ':count ilbidhiqsi', 'a_second' => 'xooga ilbidhiqsiyo|:count ilbidhiqsi', 's' => ':countil', 'ago' => ':time kahor', 'from_now' => ':time gudahood', 'after' => ':time kedib', 'before' => ':time kahor', 'diff_now' => 'hada', 'diff_today' => 'maanta', 'diff_today_regexp' => 'maanta(?:\s+markay\s+(?:tahay|ahayd))?', 'diff_yesterday' => 'shalayto', 'diff_yesterday_regexp' => 'shalayto(?:\s+markay\s+ahayd)?', 'diff_tomorrow' => 'beri', 'diff_tomorrow_regexp' => 'beri(?:\s+markay\s+tahay)?', 'diff_before_yesterday' => 'doraato', 'diff_after_tomorrow' => 'saadanbe', 'period_recurrences' => 'mar|:count jeer', 'period_interval' => ':interval kasta', 'period_start_date' => 'laga bilaabo :date', 'period_end_date' => 'ilaa :date', 'months' => ['Janaayo', 'Febraayo', 'Abriil', 'Maajo', 'Juun', 'Luuliyo', 'Agoosto', 'Sebteembar', 'Oktoobar', 'Nofeembar', 'Diseembar'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Abr', 'Mjo', 'Jun', 'Lyo', 'Agt', 'Seb', 'Okt', 'Nof', 'Dis'], 'weekdays' => ['Axad', 'Isniin', 'Talaada', 'Arbaca', 'Khamiis', 'Jimce', 'Sabti'], 'weekdays_short' => ['Axd', 'Isn', 'Tal', 'Arb', 'Kha', 'Jim', 'Sbt'], 'weekdays_min' => ['Ax', 'Is', 'Ta', 'Ar', 'Kh', 'Ji', 'Sa'], 'list' => [', ', ' and '], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'calendar' => [ 'sameDay' => '[Maanta markay tahay] LT', 'nextDay' => '[Beri markay tahay] LT', 'nextWeek' => 'dddd [markay tahay] LT', 'lastDay' => '[Shalay markay ahayd] LT', 'lastWeek' => '[Hore] dddd [Markay ahayd] LT', 'sameElse' => 'L', ], ]; PKgt[O??Carbon/Lang/ht_HT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Sugar Labs // OLPC sugarlabs.org libc-alpha@sourceware.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['janvye', 'fevriye', 'mas', 'avril', 'me', 'jen', 'jiyè', 'out', 'septanm', 'oktòb', 'novanm', 'desanm'], 'months_short' => ['jan', 'fev', 'mas', 'avr', 'me', 'jen', 'jiy', 'out', 'sep', 'okt', 'nov', 'des'], 'weekdays' => ['dimanch', 'lendi', 'madi', 'mèkredi', 'jedi', 'vandredi', 'samdi'], 'weekdays_short' => ['dim', 'len', 'mad', 'mèk', 'jed', 'van', 'sam'], 'weekdays_min' => ['dim', 'len', 'mad', 'mèk', 'jed', 'van', 'sam'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => ':count lane', 'y' => ':count lane', 'a_year' => ':count lane', 'month' => 'mwa :count', 'm' => 'mwa :count', 'a_month' => 'mwa :count', 'week' => 'semèn :count', 'w' => 'semèn :count', 'a_week' => 'semèn :count', 'day' => ':count jou', 'd' => ':count jou', 'a_day' => ':count jou', 'hour' => ':count lè', 'h' => ':count lè', 'a_hour' => ':count lè', 'minute' => ':count minit', 'min' => ':count minit', 'a_minute' => ':count minit', 'second' => ':count segonn', 's' => ':count segonn', 'a_second' => ':count segonn', ]); PKgt[w'0y y Carbon/Lang/mai_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Maithili Computing Research Center, Pune, India rajeshkajha@yahoo.com,akhilesh.k@samusng.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['बैसाख', 'जेठ', 'अषाढ़', 'सावोन', 'भादो', 'आसिन', 'कातिक', 'अगहन', 'पूस', 'माघ', 'फागुन', 'चैति'], 'months_short' => ['बैसाख', 'जेठ', 'अषाढ़', 'सावोन', 'भादो', 'आसिन', 'कातिक', 'अगहन', 'पूस', 'माघ', 'फागुन', 'चैति'], 'weekdays' => ['रविदिन', 'सोमदिन', 'मंगलदिन', 'बुधदिन', 'बृहस्पतीदिन', 'शुक्रदिन', 'शनीदिन'], 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पती', 'शुक्र', 'शनी'], 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पती', 'शुक्र', 'शनी'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], 'year' => ':count ऋतु', // less reliable 'y' => ':count ऋतु', // less reliable 'a_year' => ':count ऋतु', // less reliable 'month' => ':count महिना', 'm' => ':count महिना', 'a_month' => ':count महिना', 'week' => ':count श्रेणी:क्यालेन्डर', // less reliable 'w' => ':count श्रेणी:क्यालेन्डर', // less reliable 'a_week' => ':count श्रेणी:क्यालेन्डर', // less reliable 'day' => ':count दिन', 'd' => ':count दिन', 'a_day' => ':count दिन', 'hour' => ':count घण्टा', 'h' => ':count घण्टा', 'a_hour' => ':count घण्टा', 'minute' => ':count समय', // less reliable 'min' => ':count समय', // less reliable 'a_minute' => ':count समय', // less reliable ]); PKgt[&5  Carbon/Lang/nl_BQ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/nl.php'; PKgt[''x  Carbon/Lang/fr_BJ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[pGGCarbon/Lang/en_IO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt['Ht̽Carbon/Lang/nus.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['RW', 'TŊ'], 'weekdays' => ['Cäŋ kuɔth', 'Jiec la̱t', 'Rɛw lätni', 'Diɔ̱k lätni', 'Ŋuaan lätni', 'Dhieec lätni', 'Bäkɛl lätni'], 'weekdays_short' => ['Cäŋ', 'Jiec', 'Rɛw', 'Diɔ̱k', 'Ŋuaan', 'Dhieec', 'Bäkɛl'], 'weekdays_min' => ['Cäŋ', 'Jiec', 'Rɛw', 'Diɔ̱k', 'Ŋuaan', 'Dhieec', 'Bäkɛl'], 'months' => ['Tiop thar pɛt', 'Pɛt', 'Duɔ̱ɔ̱ŋ', 'Guak', 'Duät', 'Kornyoot', 'Pay yie̱tni', 'Tho̱o̱r', 'Tɛɛr', 'Laath', 'Kur', 'Tio̱p in di̱i̱t'], 'months_short' => ['Tiop', 'Pɛt', 'Duɔ̱ɔ̱', 'Guak', 'Duä', 'Kor', 'Pay', 'Thoo', 'Tɛɛ', 'Laa', 'Kur', 'Tid'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'D/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd D MMMM YYYY h:mm a', ], 'year' => ':count jiök', // less reliable 'y' => ':count jiök', // less reliable 'a_year' => ':count jiök', // less reliable 'month' => ':count pay', // less reliable 'm' => ':count pay', // less reliable 'a_month' => ':count pay', // less reliable ]); PKgt[ʷCarbon/Lang/yue_Hant.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/zh_Hant.php'; PKgt[MCarbon/Lang/cu.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-DD', 'LL' => 'YYYY MMM D', 'LLL' => 'YYYY MMMM D HH:mm', 'LLLL' => 'YYYY MMMM D, dddd HH:mm', ], 'year' => ':count лѣто', 'y' => ':count лѣто', 'a_year' => ':count лѣто', 'month' => ':count мѣсѧць', 'm' => ':count мѣсѧць', 'a_month' => ':count мѣсѧць', 'week' => ':count сєдмица', 'w' => ':count сєдмица', 'a_week' => ':count сєдмица', 'day' => ':count дьнь', 'd' => ':count дьнь', 'a_day' => ':count дьнь', 'hour' => ':count година', 'h' => ':count година', 'a_hour' => ':count година', 'minute' => ':count малъ', // less reliable 'min' => ':count малъ', // less reliable 'a_minute' => ':count малъ', // less reliable 'second' => ':count въторъ', 's' => ':count въторъ', 'a_second' => ':count въторъ', ]); PKgt[Z7$$Carbon/Lang/luy.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Jumapiri', 'Jumatatu', 'Jumanne', 'Jumatano', 'Murwa wa Kanne', 'Murwa wa Katano', 'Jumamosi'], 'weekdays_short' => ['J2', 'J3', 'J4', 'J5', 'Al', 'Ij', 'J1'], 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Al', 'Ij', 'J1'], 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], // Too unreliable /* 'year' => ':count liliino', // less reliable 'y' => ':count liliino', // less reliable 'a_year' => ':count liliino', // less reliable 'month' => ':count kumwesi', // less reliable 'm' => ':count kumwesi', // less reliable 'a_month' => ':count kumwesi', // less reliable 'week' => ':count olutambi', // less reliable 'w' => ':count olutambi', // less reliable 'a_week' => ':count olutambi', // less reliable 'day' => ':count luno', // less reliable 'd' => ':count luno', // less reliable 'a_day' => ':count luno', // less reliable 'hour' => ':count ekengele', // less reliable 'h' => ':count ekengele', // less reliable 'a_hour' => ':count ekengele', // less reliable 'minute' => ':count omundu', // less reliable 'min' => ':count omundu', // less reliable 'a_minute' => ':count omundu', // less reliable 'second' => ':count liliino', // less reliable 's' => ':count liliino', // less reliable 'a_second' => ':count liliino', // less reliable */ ]); PKgt[3I1OOCarbon/Lang/agr.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/agr_PE.php'; PKgt[dIk  Carbon/Lang/bg_BG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/bg.php'; PKgt[ߴ/wwCarbon/Lang/se_FI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/se.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'months' => ['ođđajagemánnu', 'guovvamánnu', 'njukčamánnu', 'cuoŋománnu', 'miessemánnu', 'geassemánnu', 'suoidnemánnu', 'borgemánnu', 'čakčamánnu', 'golggotmánnu', 'skábmamánnu', 'juovlamánnu'], 'months_short' => ['ođđj', 'guov', 'njuk', 'cuoŋ', 'mies', 'geas', 'suoi', 'borg', 'čakč', 'golg', 'skáb', 'juov'], 'weekdays' => ['sotnabeaivi', 'mánnodat', 'disdat', 'gaskavahkku', 'duorastat', 'bearjadat', 'lávvordat'], 'weekdays_short' => ['so', 'má', 'di', 'ga', 'du', 'be', 'lá'], 'weekdays_min' => ['so', 'má', 'di', 'ga', 'du', 'be', 'lá'], 'meridiem' => ['i', 'e'], ]); PKgt[FICarbon/Lang/en_GB.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Mayank Badola * - JD Isaacks */ return array_replace_recursive(require __DIR__.'/en.php', [ 'from_now' => 'in :time', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[r(Carbon/Lang/sr_Latn_XK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Component\Translation\PluralizationRules; // @codeCoverageIgnoreStart if (class_exists(PluralizationRules::class)) { PluralizationRules::set(static function ($number) { return PluralizationRules::get($number, 'sr'); }, 'sr_Latn_XK'); } // @codeCoverageIgnoreEnd return array_replace_recursive(require __DIR__.'/sr_Latn_BA.php', [ 'weekdays' => ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'], ]); PKgt[,Carbon/Lang/ar_EG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[/NNCarbon/Lang/nr.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/nr_ZA.php'; PKgt[aCarbon/Lang/es_CR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[{r   Carbon/Lang/vai.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['ꕞꕌꔵ', 'ꗳꗡꘉ', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ꕉꔤꕆꕢ', 'ꕉꔤꕀꕮ', 'ꔻꔬꔳ'], 'weekdays_short' => ['ꕞꕌꔵ', 'ꗳꗡꘉ', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ꕉꔤꕆꕢ', 'ꕉꔤꕀꕮ', 'ꔻꔬꔳ'], 'weekdays_min' => ['ꕞꕌꔵ', 'ꗳꗡꘉ', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ꕉꔤꕆꕢ', 'ꕉꔤꕀꕮ', 'ꔻꔬꔳ'], 'months' => ['ꖨꖕ ꕪꕴ ꔞꔀꕮꕊ', 'ꕒꕡꖝꖕ', 'ꕾꖺ', 'ꖢꖕ', 'ꖑꕱ', 'ꖱꘋ', 'ꖱꕞꔤ', 'ꗛꔕ', 'ꕢꕌ', 'ꕭꖃ', 'ꔞꘋꕔꕿ ꕸꖃꗏ', 'ꖨꖕ ꕪꕴ ꗏꖺꕮꕊ'], 'months_short' => ['ꖨꖕꔞ', 'ꕒꕡ', 'ꕾꖺ', 'ꖢꖕ', 'ꖑꕱ', 'ꖱꘋ', 'ꖱꕞ', 'ꗛꔕ', 'ꕢꕌ', 'ꕭꖃ', 'ꔞꘋ', 'ꖨꖕꗏ'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd, D MMMM YYYY h:mm a', ], 'year' => ':count ꕀ', // less reliable 'y' => ':count ꕀ', // less reliable 'a_year' => ':count ꕀ', // less reliable 'second' => ':count ꗱꕞꕯꕊ', // less reliable 's' => ':count ꗱꕞꕯꕊ', // less reliable 'a_second' => ':count ꗱꕞꕯꕊ', // less reliable ]); PKgt[m'1Carbon/Lang/mni_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Red Hat Pune libc-alpha@sourceware.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['জানুৱারি', 'ফেব্রুৱারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগষ্ট', 'সেপ্তেম্বর', 'ওক্তোবর', 'নবেম্বর', 'ডিসেম্বর'], 'months_short' => ['জান', 'ফেব', 'মার', 'এপ্রি', 'মে', 'জুন', 'জুল', 'আগ', 'সেপ', 'ওক্ত', 'নবে', 'ডিস'], 'weekdays' => ['নোংমাইজিং', 'নিংথৌকাবা', 'লৈবাকপোকপা', 'য়ুমশকৈশা', 'শগোলশেন', 'ইরাই', 'থাংজ'], 'weekdays_short' => ['নোং', 'নিং', 'লৈবাক', 'য়ুম', 'শগোল', 'ইরা', 'থাং'], 'weekdays_min' => ['নোং', 'নিং', 'লৈবাক', 'য়ুম', 'শগোল', 'ইরা', 'থাং'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['এ.ম.', 'প.ম.'], 'year' => ':count ইসিং', // less reliable 'y' => ':count ইসিং', // less reliable 'a_year' => ':count ইসিং', // less reliable 'second' => ':count ꯅꯤꯡꯊꯧꯀꯥꯕ', // less reliable 's' => ':count ꯅꯤꯡꯊꯧꯀꯥꯕ', // less reliable 'a_second' => ':count ꯅꯤꯡꯊꯧꯀꯥꯕ', // less reliable ]); PKgt["Carbon/Lang/de_LU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/de.php', [ 'formats' => [ 'L' => 'YYYY-MM-DD', ], ]); PKgt[1Carbon/Lang/nds_DE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandrakesoft.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['Jannuaar', 'Feberwaar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], 'months_short' => ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], 'weekdays' => ['Sünndag', 'Maandag', 'Dingsdag', 'Middeweek', 'Dunnersdag', 'Freedag', 'Sünnavend'], 'weekdays_short' => ['Sdag', 'Maan', 'Ding', 'Midd', 'Dunn', 'Free', 'Svd.'], 'weekdays_min' => ['Sd', 'Ma', 'Di', 'Mi', 'Du', 'Fr', 'Sa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count Johr', 'y' => ':countJ', 'a_year' => '{1}een Johr|:count Johr', 'month' => ':count Maand', 'm' => ':countM', 'a_month' => '{1}een Maand|:count Maand', 'week' => ':count Week|:count Weken', 'w' => ':countW', 'a_week' => '{1}een Week|:count Week|:count Weken', 'day' => ':count Dag|:count Daag', 'd' => ':countD', 'a_day' => '{1}een Dag|:count Dag|:count Daag', 'hour' => ':count Stünn|:count Stünnen', 'h' => ':countSt', 'a_hour' => '{1}een Stünn|:count Stünn|:count Stünnen', 'minute' => ':count Minuut|:count Minuten', 'min' => ':countm', 'a_minute' => '{1}een Minuut|:count Minuut|:count Minuten', 'second' => ':count Sekunn|:count Sekunnen', 's' => ':counts', 'a_second' => 'en poor Sekunnen|:count Sekunn|:count Sekunnen', 'ago' => 'vör :time', 'from_now' => 'in :time', 'before' => ':time vörher', 'after' => ':time later', ]); PKgt[_Carbon/Lang/en_ZM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - ANLoc Martin Benjamin locales@africanlocalization.net */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[zOOCarbon/Lang/mjw.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/mjw_IN.php'; PKgt[C=5  Carbon/Lang/ru_KZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ru.php'; PKgt[bCarbon/Lang/ti_ET.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕረል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክተውበር', 'ኖቬምበር', 'ዲሴምበር'], 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], 'weekdays' => ['ሰንበት', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], 'weekdays_short' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], 'weekdays_min' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['ንጉሆ ሰዓተ', 'ድሕር ሰዓት'], ]); PKgt[&5  Carbon/Lang/nl_CW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/nl.php'; PKgt[GF//Carbon/Lang/de.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Michael Hohl * - sheriffmarley * - dennisoderwald * - Timo * - Karag2006 * - Pete Scopes (pdscopes) */ return [ 'year' => ':count Jahr|:count Jahre', 'a_year' => 'ein Jahr|:count Jahre', 'y' => ':count J.', 'month' => ':count Monat|:count Monate', 'a_month' => 'ein Monat|:count Monate', 'm' => ':count Mon.', 'week' => ':count Woche|:count Wochen', 'a_week' => 'eine Woche|:count Wochen', 'w' => ':count Wo.', 'day' => ':count Tag|:count Tage', 'a_day' => 'ein Tag|:count Tage', 'd' => ':count Tg.', 'hour' => ':count Stunde|:count Stunden', 'a_hour' => 'eine Stunde|:count Stunden', 'h' => ':count Std.', 'minute' => ':count Minute|:count Minuten', 'a_minute' => 'eine Minute|:count Minuten', 'min' => ':count Min.', 'second' => ':count Sekunde|:count Sekunden', 'a_second' => 'ein paar Sekunden|:count Sekunden', 's' => ':count Sek.', 'millisecond' => ':count Millisekunde|:count Millisekunden', 'a_millisecond' => 'eine Millisekunde|:count Millisekunden', 'ms' => ':countms', 'microsecond' => ':count Mikrosekunde|:count Mikrosekunden', 'a_microsecond' => 'eine Mikrosekunde|:count Mikrosekunden', 'µs' => ':countµs', 'ago' => 'vor :time', 'from_now' => 'in :time', 'after' => ':time später', 'before' => ':time zuvor', 'year_from_now' => ':count Jahr|:count Jahren', 'month_from_now' => ':count Monat|:count Monaten', 'week_from_now' => ':count Woche|:count Wochen', 'day_from_now' => ':count Tag|:count Tagen', 'year_ago' => ':count Jahr|:count Jahren', 'month_ago' => ':count Monat|:count Monaten', 'week_ago' => ':count Woche|:count Wochen', 'day_ago' => ':count Tag|:count Tagen', 'a_year_from_now' => 'ein Jahr|:count Jahren', 'a_month_from_now' => 'ein Monat|:count Monaten', 'a_week_from_now' => 'eine Woche|:count Wochen', 'a_day_from_now' => 'ein Tag|:count Tagen', 'a_year_ago' => 'ein Jahr|:count Jahren', 'a_month_ago' => 'ein Monat|:count Monaten', 'a_week_ago' => 'eine Woche|:count Wochen', 'a_day_ago' => 'ein Tag|:count Tagen', 'diff_now' => 'Gerade eben', 'diff_today' => 'heute', 'diff_today_regexp' => 'heute(?:\\s+um)?', 'diff_yesterday' => 'Gestern', 'diff_yesterday_regexp' => 'gestern(?:\\s+um)?', 'diff_tomorrow' => 'Morgen', 'diff_tomorrow_regexp' => 'morgen(?:\\s+um)?', 'diff_before_yesterday' => 'Vorgestern', 'diff_after_tomorrow' => 'Übermorgen', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY HH:mm', 'LLLL' => 'dddd, D. MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[heute um] LT [Uhr]', 'nextDay' => '[morgen um] LT [Uhr]', 'nextWeek' => 'dddd [um] LT [Uhr]', 'lastDay' => '[gestern um] LT [Uhr]', 'lastWeek' => '[letzten] dddd [um] LT [Uhr]', 'sameElse' => 'L', ], 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], 'months_short' => ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], 'weekdays' => ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'], 'weekdays_short' => ['So.', 'Mo.', 'Di.', 'Mi.', 'Do.', 'Fr.', 'Sa.'], 'weekdays_min' => ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], 'ordinal' => ':number.', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' und '], 'ordinal_words' => [ 'of' => 'im', 'first' => 'erster', 'second' => 'zweiter', 'third' => 'dritter', 'fourth' => 'vierten', 'fifth' => 'fünfter', 'last' => 'letzten', ], ]; PKgt[?Ej  Carbon/Lang/en_BZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[{OOCarbon/Lang/miq.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/miq_NI.php'; PKgt[bCarbon/Lang/ha.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - pablo@mandriva.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM, YYYY HH:mm', 'LLLL' => 'dddd, D MMMM, YYYY HH:mm', ], 'months' => ['Janairu', 'Faburairu', 'Maris', 'Afirilu', 'Mayu', 'Yuni', 'Yuli', 'Agusta', 'Satumba', 'Oktoba', 'Nuwamba', 'Disamba'], 'months_short' => ['Jan', 'Fab', 'Mar', 'Afi', 'May', 'Yun', 'Yul', 'Agu', 'Sat', 'Okt', 'Nuw', 'Dis'], 'weekdays' => ['Lahadi', 'Litini', 'Talata', 'Laraba', 'Alhamis', 'Jumaʼa', 'Asabar'], 'weekdays_short' => ['Lah', 'Lit', 'Tal', 'Lar', 'Alh', 'Jum', 'Asa'], 'weekdays_min' => ['Lh', 'Li', 'Ta', 'Lr', 'Al', 'Ju', 'As'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => 'shekara :count', 'y' => 'shekara :count', 'a_year' => 'shekara :count', 'month' => ':count wátàa', 'm' => ':count wátàa', 'a_month' => ':count wátàa', 'week' => ':count mako', 'w' => ':count mako', 'a_week' => ':count mako', 'day' => ':count rana', 'd' => ':count rana', 'a_day' => ':count rana', 'hour' => ':count áwàa', 'h' => ':count áwàa', 'a_hour' => ':count áwàa', 'minute' => 'minti :count', 'min' => 'minti :count', 'a_minute' => 'minti :count', 'second' => ':count ná bíyú', 's' => ':count ná bíyú', 'a_second' => ':count ná bíyú', ]); PKgt[9vvCarbon/Lang/nd.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Sonto', 'Mvulo', 'Sibili', 'Sithathu', 'Sine', 'Sihlanu', 'Mgqibelo'], 'weekdays_short' => ['Son', 'Mvu', 'Sib', 'Sit', 'Sin', 'Sih', 'Mgq'], 'weekdays_min' => ['Son', 'Mvu', 'Sib', 'Sit', 'Sin', 'Sih', 'Mgq'], 'months' => ['Zibandlela', 'Nhlolanja', 'Mbimbitho', 'Mabasa', 'Nkwenkwezi', 'Nhlangula', 'Ntulikazi', 'Ncwabakazi', 'Mpandula', 'Mfumfu', 'Lwezi', 'Mpalakazi'], 'months_short' => ['Zib', 'Nhlo', 'Mbi', 'Mab', 'Nkw', 'Nhla', 'Ntu', 'Ncw', 'Mpan', 'Mfu', 'Lwe', 'Mpal'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'year' => 'okweminyaka engu-:count', // less reliable 'y' => 'okweminyaka engu-:count', // less reliable 'a_year' => 'okweminyaka engu-:count', // less reliable 'month' => 'inyanga ezingu-:count', 'm' => 'inyanga ezingu-:count', 'a_month' => 'inyanga ezingu-:count', 'week' => 'amaviki angu-:count', 'w' => 'amaviki angu-:count', 'a_week' => 'amaviki angu-:count', 'day' => 'kwamalanga angu-:count', 'd' => 'kwamalanga angu-:count', 'a_day' => 'kwamalanga angu-:count', 'hour' => 'amahola angu-:count', 'h' => 'amahola angu-:count', 'a_hour' => 'amahola angu-:count', 'minute' => 'imizuzu engu-:count', 'min' => 'imizuzu engu-:count', 'a_minute' => 'imizuzu engu-:count', 'second' => 'imizuzwana engu-:count', 's' => 'imizuzwana engu-:count', 'a_second' => 'imizuzwana engu-:count', ]); PKgt[O2aNNCarbon/Lang/am.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/am_ET.php'; PKgt[ndNNCarbon/Lang/dz.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/dz_BT.php'; PKgt[w7GGCarbon/Lang/es_BZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, ]); PKgt[oRCarbon/Lang/hr_BA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - DarkoDevelop */ return array_replace_recursive(require __DIR__.'/hr.php', [ 'weekdays' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], 'weekdays_short' => ['ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub'], 'weekdays_min' => ['ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub'], 'months' => ['siječnja', 'veljače', 'ožujka', 'travnja', 'svibnja', 'lipnja', 'srpnja', 'kolovoza', 'rujna', 'listopada', 'studenoga', 'prosinca'], 'months_short' => ['sij', 'velj', 'ožu', 'tra', 'svi', 'lip', 'srp', 'kol', 'ruj', 'lis', 'stu', 'pro'], 'months_standalone' => ['siječanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D. M. yy.', 'LL' => 'D. MMM YYYY.', 'LLL' => 'D. MMMM YYYY. HH:mm', 'LLLL' => 'dddd, D. MMMM YYYY. HH:mm', ], ]); PKgt[l  Carbon/Lang/ja_JP.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ja.php'; PKgt[?Ej  Carbon/Lang/en_KE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[EkCarbon/Lang/nl_BE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Roy * - Stephan * - François B * - Tim Fish * - Kevin Huang * - Jacob Middag * - JD Isaacks * - Propaganistas */ return array_replace_recursive(require __DIR__.'/nl.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], ]); PKgt[ NNCarbon/Lang/tk.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/tk_TM.php'; PKgt[pGGCarbon/Lang/en_JE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[\Carbon/Lang/en.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Milos Sakovic * - Paul * - Pete Scopes (pdscopes) */ return [ /* * {1}, {0} and ]1,Inf[ are not needed as it's the default for English pluralization. * But as some languages are using en.php as a fallback, it's better to specify it * explicitly so those languages also fallback to English pluralization when a unit * is missing. */ 'year' => '{1}:count year|{0}:count years|]1,Inf[:count years', 'a_year' => '{1}a year|{0}:count years|]1,Inf[:count years', 'y' => '{1}:countyr|{0}:countyrs|]1,Inf[:countyrs', 'month' => '{1}:count month|{0}:count months|]1,Inf[:count months', 'a_month' => '{1}a month|{0}:count months|]1,Inf[:count months', 'm' => '{1}:countmo|{0}:countmos|]1,Inf[:countmos', 'week' => '{1}:count week|{0}:count weeks|]1,Inf[:count weeks', 'a_week' => '{1}a week|{0}:count weeks|]1,Inf[:count weeks', 'w' => ':countw', 'day' => '{1}:count day|{0}:count days|]1,Inf[:count days', 'a_day' => '{1}a day|{0}:count days|]1,Inf[:count days', 'd' => ':countd', 'hour' => '{1}:count hour|{0}:count hours|]1,Inf[:count hours', 'a_hour' => '{1}an hour|{0}:count hours|]1,Inf[:count hours', 'h' => ':counth', 'minute' => '{1}:count minute|{0}:count minutes|]1,Inf[:count minutes', 'a_minute' => '{1}a minute|{0}:count minutes|]1,Inf[:count minutes', 'min' => ':countm', 'second' => '{1}:count second|{0}:count seconds|]1,Inf[:count seconds', 'a_second' => '{1}a few seconds|{0}:count seconds|]1,Inf[:count seconds', 's' => ':counts', 'millisecond' => '{1}:count millisecond|{0}:count milliseconds|]1,Inf[:count milliseconds', 'a_millisecond' => '{1}a millisecond|{0}:count milliseconds|]1,Inf[:count milliseconds', 'ms' => ':countms', 'microsecond' => '{1}:count microsecond|{0}:count microseconds|]1,Inf[:count microseconds', 'a_microsecond' => '{1}a microsecond|{0}:count microseconds|]1,Inf[:count microseconds', 'µs' => ':countµs', 'ago' => ':time ago', 'from_now' => ':time from now', 'after' => ':time after', 'before' => ':time before', 'diff_now' => 'just now', 'diff_today' => 'today', 'diff_yesterday' => 'yesterday', 'diff_tomorrow' => 'tomorrow', 'diff_before_yesterday' => 'before yesterday', 'diff_after_tomorrow' => 'after tomorrow', 'period_recurrences' => '{1}once|{0}:count times|]1,Inf[:count times', 'period_interval' => 'every :interval', 'period_start_date' => 'from :date', 'period_end_date' => 'to :date', 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 'weekdays' => ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 'weekdays_short' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], 'weekdays_min' => ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], 'ordinal' => function ($number) { $lastDigit = $number % 10; return $number.( ((int) ($number % 100 / 10) === 1) ? 'th' : ( ($lastDigit === 1) ? 'st' : ( ($lastDigit === 2) ? 'nd' : ( ($lastDigit === 3) ? 'rd' : 'th' ) ) ) ); }, 'list' => [', ', ' and '], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]; PKgt[Yb1Carbon/Lang/es_DO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - kostas * - François B * - Tim Fish * - Chiel Robben * - Claire Coloma * - Steven Heinrich * - JD Isaacks * - Raphael Amorim */ return array_replace_recursive(require __DIR__.'/es.php', [ 'diff_before_yesterday' => 'anteayer', 'formats' => [ 'LT' => 'h:mm A', 'LTS' => 'h:mm:ss A', 'LLL' => 'D [de] MMMM [de] YYYY h:mm A', 'LLLL' => 'dddd, D [de] MMMM [de] YYYY h:mm A', ], ]); PKgt[b3ZZCarbon/Lang/de_IT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Matthias Dieter Wallno:fer libc-locales@sourceware.org */ return require __DIR__.'/de.php'; PKgt[88Carbon/Lang/dsb_DE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Information from Michael Wolf bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'DD. MMMM YYYY', 'LLL' => 'DD. MMMM, HH:mm [góź.]', 'LLLL' => 'dddd, DD. MMMM YYYY, HH:mm [góź.]', ], 'months' => ['januara', 'februara', 'měrca', 'apryla', 'maja', 'junija', 'julija', 'awgusta', 'septembra', 'oktobra', 'nowembra', 'decembra'], 'months_short' => ['Jan', 'Feb', 'Měr', 'Apr', 'Maj', 'Jun', 'Jul', 'Awg', 'Sep', 'Okt', 'Now', 'Dec'], 'weekdays' => ['Njeźela', 'Pónjeźele', 'Wałtora', 'Srjoda', 'Stwórtk', 'Pětk', 'Sobota'], 'weekdays_short' => ['Nj', 'Pó', 'Wa', 'Sr', 'St', 'Pě', 'So'], 'weekdays_min' => ['Nj', 'Pó', 'Wa', 'Sr', 'St', 'Pě', 'So'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count lěto', 'y' => ':count lěto', 'a_year' => ':count lěto', 'month' => ':count mjasec', 'm' => ':count mjasec', 'a_month' => ':count mjasec', 'week' => ':count tyźeń', 'w' => ':count tyźeń', 'a_week' => ':count tyźeń', 'day' => ':count źeń', 'd' => ':count źeń', 'a_day' => ':count źeń', 'hour' => ':count góźina', 'h' => ':count góźina', 'a_hour' => ':count góźina', 'minute' => ':count minuta', 'min' => ':count minuta', 'a_minute' => ':count minuta', 'second' => ':count drugi', 's' => ':count drugi', 'a_second' => ':count drugi', ]); PKgt[pGGCarbon/Lang/en_VG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[acCarbon/Lang/shi_Latn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/shi.php', [ 'meridiem' => ['tifawt', 'tadggʷat'], 'weekdays' => ['asamas', 'aynas', 'asinas', 'akṛas', 'akwas', 'asimwas', 'asiḍyas'], 'weekdays_short' => ['asa', 'ayn', 'asi', 'akṛ', 'akw', 'asim', 'asiḍ'], 'weekdays_min' => ['asa', 'ayn', 'asi', 'akṛ', 'akw', 'asim', 'asiḍ'], 'months' => ['innayr', 'bṛayṛ', 'maṛṣ', 'ibrir', 'mayyu', 'yunyu', 'yulyuz', 'ɣuct', 'cutanbir', 'ktubr', 'nuwanbir', 'dujanbir'], 'months_short' => ['inn', 'bṛa', 'maṛ', 'ibr', 'may', 'yun', 'yul', 'ɣuc', 'cut', 'ktu', 'nuw', 'duj'], 'first_day_of_week' => 6, 'weekend' => [5, 6], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'minute' => ':count agur', // less reliable 'min' => ':count agur', // less reliable 'a_minute' => ':count agur', // less reliable ]); PKgt[eѡCarbon/Lang/szl_PL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - szl_PL locale Przemyslaw Buczkowski libc-alpha@sourceware.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['styczyń', 'luty', 'merc', 'kwjeciyń', 'moj', 'czyrwjyń', 'lipjyń', 'siyrpjyń', 'wrzesiyń', 'październik', 'listopad', 'grudziyń'], 'months_short' => ['sty', 'lut', 'mer', 'kwj', 'moj', 'czy', 'lip', 'siy', 'wrz', 'paź', 'lis', 'gru'], 'weekdays' => ['niydziela', 'pyńdziŏek', 'wtŏrek', 'strzŏda', 'sztwortek', 'pjōntek', 'sobŏta'], 'weekdays_short' => ['niy', 'pyń', 'wtŏ', 'str', 'szt', 'pjō', 'sob'], 'weekdays_min' => ['niy', 'pyń', 'wtŏ', 'str', 'szt', 'pjō', 'sob'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count rok', 'y' => ':count rok', 'a_year' => ':count rok', 'month' => ':count mjeśůnc', 'm' => ':count mjeśůnc', 'a_month' => ':count mjeśůnc', 'week' => ':count tydźyń', 'w' => ':count tydźyń', 'a_week' => ':count tydźyń', 'day' => ':count dźyń', 'd' => ':count dźyń', 'a_day' => ':count dźyń', 'hour' => ':count godzina', 'h' => ':count godzina', 'a_hour' => ':count godzina', 'minute' => ':count minuta', 'min' => ':count minuta', 'a_minute' => ':count minuta', 'second' => ':count sekůnda', 's' => ':count sekůnda', 'a_second' => ':count sekůnda', ]); PKgt[,Carbon/Lang/ar_SD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[pGGCarbon/Lang/en_CK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[?b Carbon/Lang/da.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Rune Mønnike * - François B * - codenhagen * - JD Isaacks * - Jens Herlevsen * - Ulrik McArdle (mcardle) * - Frederik Sauer (FrittenKeeZ) * - Janus Bahs Jacquet (kokoshneta) */ return [ 'year' => ':count år|:count år', 'a_year' => 'et år|:count år', 'y' => ':count år|:count år', 'month' => ':count måned|:count måneder', 'a_month' => 'en måned|:count måneder', 'm' => ':count mdr.', 'week' => ':count uge|:count uger', 'a_week' => 'en uge|:count uger', 'w' => ':count u.', 'day' => ':count dag|:count dage', 'a_day' => ':count dag|:count dage', 'd' => ':count d.', 'hour' => ':count time|:count timer', 'a_hour' => 'en time|:count timer', 'h' => ':count t.', 'minute' => ':count minut|:count minutter', 'a_minute' => 'et minut|:count minutter', 'min' => ':count min.', 'second' => ':count sekund|:count sekunder', 'a_second' => 'få sekunder|:count sekunder', 's' => ':count s.', 'ago' => 'for :time siden', 'from_now' => 'om :time', 'after' => ':time efter', 'before' => ':time før', 'diff_now' => 'nu', 'diff_today' => 'i dag', 'diff_today_regexp' => 'i dag(?:\\s+kl.)?', 'diff_yesterday' => 'i går', 'diff_yesterday_regexp' => 'i går(?:\\s+kl.)?', 'diff_tomorrow' => 'i morgen', 'diff_tomorrow_regexp' => 'i morgen(?:\\s+kl.)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY HH:mm', 'LLLL' => 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', ], 'calendar' => [ 'sameDay' => '[i dag kl.] LT', 'nextDay' => '[i morgen kl.] LT', 'nextWeek' => 'på dddd [kl.] LT', 'lastDay' => '[i går kl.] LT', 'lastWeek' => '[i] dddd[s kl.] LT', 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'], 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj.', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'], 'weekdays' => ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], 'weekdays_short' => ['søn.', 'man.', 'tir.', 'ons.', 'tor.', 'fre.', 'lør.'], 'weekdays_min' => ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' og '], ]; PKgt[FcKCarbon/Lang/be_BY@latin.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['studzienia', 'lutaha', 'sakavika', 'krasavika', 'maja', 'červienia', 'lipienia', 'žniŭnia', 'vieraśnia', 'kastryčnika', 'listapada', 'śniežnia'], 'months_short' => ['Stu', 'Lut', 'Sak', 'Kra', 'Maj', 'Čer', 'Lip', 'Žni', 'Vie', 'Kas', 'Lis', 'Śni'], 'weekdays' => ['Niadziela', 'Paniadziełak', 'Aŭtorak', 'Sierada', 'Čaćvier', 'Piatnica', 'Subota'], 'weekdays_short' => ['Nia', 'Pan', 'Aŭt', 'Sie', 'Čać', 'Pia', 'Sub'], 'weekdays_min' => ['Nia', 'Pan', 'Aŭt', 'Sie', 'Čać', 'Pia', 'Sub'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[-GYOOCarbon/Lang/nso.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/nso_ZA.php'; PKgt[pGGCarbon/Lang/en_LR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[a Carbon/Lang/ccp.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['𑄢𑄧𑄝𑄨𑄝𑄢𑄴', '𑄥𑄧𑄟𑄴𑄝𑄢𑄴', '𑄟𑄧𑄁𑄉𑄧𑄣𑄴𑄝𑄢𑄴', '𑄝𑄪𑄖𑄴𑄝𑄢𑄴', '𑄝𑄳𑄢𑄨𑄥𑄪𑄛𑄴𑄝𑄢𑄴', '𑄥𑄪𑄇𑄴𑄇𑄮𑄢𑄴𑄝𑄢𑄴', '𑄥𑄧𑄚𑄨𑄝𑄢𑄴'], 'weekdays_short' => ['𑄢𑄧𑄝𑄨', '𑄥𑄧𑄟𑄴', '𑄟𑄧𑄁𑄉𑄧𑄣𑄴', '𑄝𑄪𑄖𑄴', '𑄝𑄳𑄢𑄨𑄥𑄪𑄛𑄴', '𑄥𑄪𑄇𑄴𑄇𑄮𑄢𑄴', '𑄥𑄧𑄚𑄨'], 'weekdays_min' => ['𑄢𑄧𑄝𑄨', '𑄥𑄧𑄟𑄴', '𑄟𑄧𑄁𑄉𑄧𑄣𑄴', '𑄝𑄪𑄖𑄴', '𑄝𑄳𑄢𑄨𑄥𑄪𑄛𑄴', '𑄥𑄪𑄇𑄴𑄇𑄮𑄢𑄴', '𑄥𑄧𑄚𑄨'], 'months' => ['𑄎𑄚𑄪𑄠𑄢𑄨', '𑄜𑄬𑄛𑄴𑄝𑄳𑄢𑄪𑄠𑄢𑄨', '𑄟𑄢𑄴𑄌𑄧', '𑄃𑄬𑄛𑄳𑄢𑄨𑄣𑄴', '𑄟𑄬', '𑄎𑄪𑄚𑄴', '𑄎𑄪𑄣𑄭', '𑄃𑄉𑄧𑄌𑄴𑄑𑄴', '𑄥𑄬𑄛𑄴𑄑𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄃𑄧𑄇𑄴𑄑𑄬𑄝𑄧𑄢𑄴', '𑄚𑄧𑄞𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄓𑄨𑄥𑄬𑄟𑄴𑄝𑄧𑄢𑄴'], 'months_short' => ['𑄎𑄚𑄪', '𑄜𑄬𑄛𑄴', '𑄟𑄢𑄴𑄌𑄧', '𑄃𑄬𑄛𑄳𑄢𑄨𑄣𑄴', '𑄟𑄬', '𑄎𑄪𑄚𑄴', '𑄎𑄪𑄣𑄭', '𑄃𑄉𑄧𑄌𑄴𑄑𑄴', '𑄥𑄬𑄛𑄴𑄑𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄃𑄧𑄇𑄴𑄑𑄮𑄝𑄧𑄢𑄴', '𑄚𑄧𑄞𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄓𑄨𑄥𑄬𑄟𑄴𑄝𑄢𑄴'], 'months_short_standalone' => ['𑄎𑄚𑄪𑄠𑄢𑄨', '𑄜𑄬𑄛𑄴𑄝𑄳𑄢𑄪𑄠𑄢𑄨', '𑄟𑄢𑄴𑄌𑄧', '𑄃𑄬𑄛𑄳𑄢𑄨𑄣𑄴', '𑄟𑄬', '𑄎𑄪𑄚𑄴', '𑄎𑄪𑄣𑄭', '𑄃𑄉𑄧𑄌𑄴𑄑𑄴', '𑄥𑄬𑄛𑄴𑄑𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄃𑄧𑄇𑄴𑄑𑄮𑄝𑄧𑄢𑄴', '𑄚𑄧𑄞𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄓𑄨𑄥𑄬𑄟𑄴𑄝𑄧𑄢𑄴'], 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'D/M/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM, YYYY h:mm a', 'LLLL' => 'dddd, D MMMM, YYYY h:mm a', ], ]); PKgt[?Ej  Carbon/Lang/en_BW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[2=PCarbon/Lang/nb_SJ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/nb.php', [ 'formats' => [ 'LL' => 'D. MMM YYYY', 'LLL' => 'D. MMMM YYYY, HH:mm', 'LLLL' => 'dddd D. MMMM YYYY, HH:mm', ], ]); PKgt[T  Carbon/Lang/ca_ES.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ca.php'; PKgt[[ia  Carbon/Lang/pt_ST.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/pt.php'; PKgt[C=5  Carbon/Lang/ru_KG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ru.php'; PKgt[e>  Carbon/Lang/et_EE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/et.php'; PKgt[5OOCarbon/Lang/sgs.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/sgs_LT.php'; PKgt[1/Carbon/Lang/pt_MO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/pt.php', [ 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'LLL' => 'D [de] MMMM [de] YYYY, h:mm a', 'LLLL' => 'dddd, D [de] MMMM [de] YYYY, h:mm a', ], 'first_day_of_week' => 0, ]); PKgt[''x  Carbon/Lang/fr_GP.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[UCarbon/Lang/gez_ET.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕረል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክተውበር', 'ኖቬምበር', 'ዲሴምበር'], 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], 'weekdays' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚት'], 'weekdays_short' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], 'weekdays_min' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['ጽባሕ', 'ምሴት'], ]); PKgt[NjGCarbon/Lang/ku.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Unicode, Inc. */ return [ 'ago' => 'berî :time', 'from_now' => 'di :time de', 'after' => ':time piştî', 'before' => ':time berê', 'year' => ':count sal', 'year_ago' => ':count salê|:count salan', 'year_from_now' => 'salekê|:count salan', 'month' => ':count meh', 'week' => ':count hefte', 'day' => ':count roj', 'hour' => ':count saet', 'minute' => ':count deqîqe', 'second' => ':count saniye', 'months' => ['rêbendanê', 'reşemiyê', 'adarê', 'avrêlê', 'gulanê', 'pûşperê', 'tîrmehê', 'gelawêjê', 'rezberê', 'kewçêrê', 'sermawezê', 'berfanbarê'], 'months_standalone' => ['rêbendan', 'reşemî', 'adar', 'avrêl', 'gulan', 'pûşper', 'tîrmeh', 'gelawêj', 'rezber', 'kewçêr', 'sermawez', 'berfanbar'], 'months_short' => ['rêb', 'reş', 'ada', 'avr', 'gul', 'pûş', 'tîr', 'gel', 'rez', 'kew', 'ser', 'ber'], 'weekdays' => ['yekşem', 'duşem', 'sêşem', 'çarşem', 'pêncşem', 'în', 'şemî'], 'weekdays_short' => ['yş', 'dş', 'sş', 'çş', 'pş', 'în', 'ş'], 'weekdays_min' => ['Y', 'D', 'S', 'Ç', 'P', 'Î', 'Ş'], 'list' => [', ', ' û '], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, ]; PKgt[ڑQQCarbon/Lang/so_SO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return require __DIR__.'/so.php'; PKgt[pGGCarbon/Lang/en_VC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[PCarbon/Lang/pa_PK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['جنوري', 'فروري', 'مارچ', 'اپريل', 'مٓی', 'جون', 'جولاي', 'اگست', 'ستمبر', 'اكتوبر', 'نومبر', 'دسمبر'], 'months_short' => ['جنوري', 'فروري', 'مارچ', 'اپريل', 'مٓی', 'جون', 'جولاي', 'اگست', 'ستمبر', 'اكتوبر', 'نومبر', 'دسمبر'], 'weekdays' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], 'weekdays_short' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], 'weekdays_min' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['ص', 'ش'], ]); PKgt[))Carbon/Lang/ar_TD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ar.php', [ ]); PKgt[W;##Carbon/Lang/ms_BN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ms.php', [ 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'D/MM/yy', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY, h:mm a', 'LLLL' => 'dd MMMM YYYY, h:mm a', ], 'meridiem' => ['a', 'p'], ]); PKgt[䇢  Carbon/Lang/kn_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/kn.php'; PKgt[]Carbon/Lang/wal_ET.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕረል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክተውበር', 'ኖቬምበር', 'ዲሴምበር'], 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], 'weekdays' => ['ወጋ', 'ሳይኖ', 'ማቆሳኛ', 'አሩዋ', 'ሃሙሳ', 'አርባ', 'ቄራ'], 'weekdays_short' => ['ወጋ ', 'ሳይኖ', 'ማቆሳ', 'አሩዋ', 'ሃሙሳ', 'አርባ', 'ቄራ '], 'weekdays_min' => ['ወጋ ', 'ሳይኖ', 'ማቆሳ', 'አሩዋ', 'ሃሙሳ', 'አርባ', 'ቄራ '], 'day_of_first_week_of_year' => 1, 'meridiem' => ['ማለዶ', 'ቃማ'], ]); PKgt[ըCarbon/Lang/fy_DE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandriva.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['Jaunuwoa', 'Februwoa', 'Moaz', 'Aprell', 'Mai', 'Juni', 'Juli', 'August', 'Septamba', 'Oktoba', 'Nowamba', 'Dezamba'], 'months_short' => ['Jan', 'Feb', 'Moz', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Now', 'Dez'], 'weekdays' => ['Sinndag', 'Mondag', 'Dingsdag', 'Meddwäakj', 'Donnadag', 'Friedag', 'Sinnowend'], 'weekdays_short' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], 'weekdays_min' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[nCarbon/Lang/ky.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - acutexyz * - Josh Soref * - François B * - Chyngyz Arystan uulu * - Chyngyz * - acutexyz * - Josh Soref * - François B * - Chyngyz Arystan uulu */ return [ 'year' => ':count жыл', 'a_year' => '{1}бир жыл|:count жыл', 'y' => ':count жыл', 'month' => ':count ай', 'a_month' => '{1}бир ай|:count ай', 'm' => ':count ай', 'week' => ':count апта', 'a_week' => '{1}бир апта|:count апта', 'w' => ':count апт.', 'day' => ':count күн', 'a_day' => '{1}бир күн|:count күн', 'd' => ':count күн', 'hour' => ':count саат', 'a_hour' => '{1}бир саат|:count саат', 'h' => ':count саат.', 'minute' => ':count мүнөт', 'a_minute' => '{1}бир мүнөт|:count мүнөт', 'min' => ':count мүн.', 'second' => ':count секунд', 'a_second' => '{1}бирнече секунд|:count секунд', 's' => ':count сек.', 'ago' => ':time мурун', 'from_now' => ':time ичинде', 'diff_now' => 'азыр', 'diff_today' => 'Бүгүн', 'diff_today_regexp' => 'Бүгүн(?:\\s+саат)?', 'diff_yesterday' => 'кечээ', 'diff_yesterday_regexp' => 'Кече(?:\\s+саат)?', 'diff_tomorrow' => 'эртең', 'diff_tomorrow_regexp' => 'Эртең(?:\\s+саат)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Бүгүн саат] LT', 'nextDay' => '[Эртең саат] LT', 'nextWeek' => 'dddd [саат] LT', 'lastDay' => '[Кече саат] LT', 'lastWeek' => '[Өткен аптанын] dddd [күнү] [саат] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { static $suffixes = [ 0 => '-чү', 1 => '-чи', 2 => '-чи', 3 => '-чү', 4 => '-чү', 5 => '-чи', 6 => '-чы', 7 => '-чи', 8 => '-чи', 9 => '-чу', 10 => '-чу', 20 => '-чы', 30 => '-чу', 40 => '-чы', 50 => '-чү', 60 => '-чы', 70 => '-чи', 80 => '-чи', 90 => '-чу', 100 => '-чү', ]; return $number.($suffixes[$number] ?? $suffixes[$number % 10] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); }, 'months' => ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'], 'months_short' => ['янв', 'фев', 'март', 'апр', 'май', 'июнь', 'июль', 'авг', 'сен', 'окт', 'ноя', 'дек'], 'weekdays' => ['Жекшемби', 'Дүйшөмбү', 'Шейшемби', 'Шаршемби', 'Бейшемби', 'Жума', 'Ишемби'], 'weekdays_short' => ['Жек', 'Дүй', 'Шей', 'Шар', 'Бей', 'Жум', 'Ише'], 'weekdays_min' => ['Жк', 'Дй', 'Шй', 'Шр', 'Бй', 'Жм', 'Иш'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => ' ', 'meridiem' => ['таңкы', 'түштөн кийинки'], ]; PKgt[-|KCarbon/Lang/es_NI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[WWWCarbon/Lang/ln_CD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ubuntu René Manassé GALEKWA renemanasse@gmail.com */ return require __DIR__.'/ln.php'; PKgt[ yCarbon/Lang/saq.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Tesiran', 'Teipa'], 'weekdays' => ['Mderot ee are', 'Mderot ee kuni', 'Mderot ee ong’wan', 'Mderot ee inet', 'Mderot ee ile', 'Mderot ee sapa', 'Mderot ee kwe'], 'weekdays_short' => ['Are', 'Kun', 'Ong', 'Ine', 'Ile', 'Sap', 'Kwe'], 'weekdays_min' => ['Are', 'Kun', 'Ong', 'Ine', 'Ile', 'Sap', 'Kwe'], 'months' => ['Lapa le obo', 'Lapa le waare', 'Lapa le okuni', 'Lapa le ong’wan', 'Lapa le imet', 'Lapa le ile', 'Lapa le sapa', 'Lapa le isiet', 'Lapa le saal', 'Lapa le tomon', 'Lapa le tomon obo', 'Lapa le tomon waare'], 'months_short' => ['Obo', 'Waa', 'Oku', 'Ong', 'Ime', 'Ile', 'Sap', 'Isi', 'Saa', 'Tom', 'Tob', 'Tow'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[+hk{ { Carbon/Lang/dv.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $months = [ 'ޖެނުއަރީ', 'ފެބްރުއަރީ', 'މާރިޗު', 'އޭޕްރީލު', 'މޭ', 'ޖޫން', 'ޖުލައި', 'އޯގަސްޓު', 'ސެޕްޓެމްބަރު', 'އޮކްޓޯބަރު', 'ނޮވެމްބަރު', 'ޑިސެމްބަރު', ]; $weekdays = [ 'އާދިއްތަ', 'ހޯމަ', 'އަންގާރަ', 'ބުދަ', 'ބުރާސްފަތި', 'ހުކުރު', 'ހޮނިހިރު', ]; /* * Authors: * - Josh Soref * - Jawish Hameed */ return [ 'year' => ':count '.'އަހަރު', 'a_year' => '{1}'.'އަހަރެއް'.'|:count '.'އަހަރު', 'month' => ':count '.'މަސް', 'a_month' => '{1}'.'މަހެއް'.'|:count '.'މަސް', 'week' => ':count '.'ހަފްތާ', 'a_week' => '{1}'.'ސިކުންތުކޮޅެއް'.'|:count '.'ހަފްތާ', 'day' => ':count '.'ދުވަސް', 'a_day' => '{1}'.'ދުވަހެއް'.'|:count '.'ދުވަސް', 'hour' => ':count '.'ގަޑިއިރު', 'a_hour' => '{1}'.'ގަޑިއިރެއް'.'|:count '.'ގަޑިއިރު', 'minute' => ':count '.'މިނިޓު', 'a_minute' => '{1}'.'މިނިޓެއް'.'|:count '.'މިނިޓު', 'second' => ':count '.'ސިކުންތު', 'a_second' => '{1}'.'ސިކުންތުކޮޅެއް'.'|:count '.'ސިކުންތު', 'ago' => 'ކުރިން :time', 'from_now' => 'ތެރޭގައި :time', 'after' => ':time ފަހުން', 'before' => ':time ކުރި', 'diff_yesterday' => 'އިއްޔެ', 'diff_today' => 'މިއަދު', 'diff_tomorrow' => 'މާދަމާ', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[މިއަދު] LT', 'nextDay' => '[މާދަމާ] LT', 'nextWeek' => 'dddd LT', 'lastDay' => '[އިއްޔެ] LT', 'lastWeek' => '[ފާއިތުވި] dddd LT', 'sameElse' => 'L', ], 'meridiem' => ['މކ', 'މފ'], 'months' => $months, 'months_short' => $months, 'weekdays' => $weekdays, 'weekdays_short' => $weekdays, 'weekdays_min' => ['އާދި', 'ހޯމަ', 'އަން', 'ބުދަ', 'ބުރާ', 'ހުކު', 'ހޮނި'], 'list' => [', ', ' އަދި '], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]; PKgt[NCarbon/Lang/sn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['a', 'p'], 'weekdays' => ['Svondo', 'Muvhuro', 'Chipiri', 'Chitatu', 'China', 'Chishanu', 'Mugovera'], 'weekdays_short' => ['Svo', 'Muv', 'Chp', 'Cht', 'Chn', 'Chs', 'Mug'], 'weekdays_min' => ['Sv', 'Mu', 'Cp', 'Ct', 'Cn', 'Cs', 'Mg'], 'months' => ['Ndira', 'Kukadzi', 'Kurume', 'Kubvumbi', 'Chivabvu', 'Chikumi', 'Chikunguru', 'Nyamavhuvhu', 'Gunyana', 'Gumiguru', 'Mbudzi', 'Zvita'], 'months_short' => ['Ndi', 'Kuk', 'Kur', 'Kub', 'Chv', 'Chk', 'Chg', 'Nya', 'Gun', 'Gum', 'Mbu', 'Zvi'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-dd', 'LL' => 'YYYY MMM D', 'LLL' => 'YYYY MMMM D HH:mm', 'LLLL' => 'YYYY MMMM D, dddd HH:mm', ], 'year' => 'makore :count', 'y' => 'makore :count', 'a_year' => 'makore :count', 'month' => 'mwedzi :count', 'm' => 'mwedzi :count', 'a_month' => 'mwedzi :count', 'week' => 'vhiki :count', 'w' => 'vhiki :count', 'a_week' => 'vhiki :count', 'day' => 'mazuva :count', 'd' => 'mazuva :count', 'a_day' => 'mazuva :count', 'hour' => 'maawa :count', 'h' => 'maawa :count', 'a_hour' => 'maawa :count', 'minute' => 'minitsi :count', 'min' => 'minitsi :count', 'a_minute' => 'minitsi :count', 'second' => 'sekonzi :count', 's' => 'sekonzi :count', 'a_second' => 'sekonzi :count', ]); PKgt[I V Carbon/Lang/fi.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - Janne Warén * - digitalfrost * - Tsutomu Kuroda * - Roope Salmi * - tjku * - Max Melentiev * - Sami Haahtinen * - Teemu Leisti * - Artem Ignatyev * - Akira Matsuda * - Christopher Dell * - Enrique Vidal * - Simone Carletti * - Robert Bjarnason * - Aaron Patterson * - Nicolás Hock Isaza * - Tom Hughes * - Sven Fuchs * - Petri Kivikangas * - Nizar Jouini * - Marko Seppae * - Tomi Mynttinen (Pikseli) * - Petteri (powergrip) */ return [ 'year' => ':count vuosi|:count vuotta', 'y' => ':count v', 'month' => ':count kuukausi|:count kuukautta', 'm' => ':count kk', 'week' => ':count viikko|:count viikkoa', 'w' => ':count vk', 'day' => ':count päivä|:count päivää', 'd' => ':count pv', 'hour' => ':count tunti|:count tuntia', 'h' => ':count t', 'minute' => ':count minuutti|:count minuuttia', 'min' => ':count min', 'second' => ':count sekunti|:count sekuntia', 'a_second' => 'muutama sekunti|:count sekuntia', 's' => ':count s', 'ago' => ':time sitten', 'from_now' => ':time päästä', 'year_from_now' => ':count vuoden', 'month_from_now' => ':count kuukauden', 'week_from_now' => ':count viikon', 'day_from_now' => ':count päivän', 'hour_from_now' => ':count tunnin', 'minute_from_now' => ':count minuutin', 'second_from_now' => ':count sekunnin', 'after' => ':time sen jälkeen', 'before' => ':time ennen', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' ja '], 'diff_now' => 'nyt', 'diff_yesterday' => 'eilen', 'diff_tomorrow' => 'huomenna', 'formats' => [ 'LT' => 'HH.mm', 'LTS' => 'HH.mm:ss', 'L' => 'D.M.YYYY', 'LL' => 'dddd D. MMMM[ta] YYYY', 'll' => 'ddd D. MMM YYYY', 'LLL' => 'D.MM. HH.mm', 'LLLL' => 'D. MMMM[ta] YYYY HH.mm', 'llll' => 'D. MMM YY HH.mm', ], 'weekdays' => ['sunnuntai', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai'], 'weekdays_short' => ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'], 'weekdays_min' => ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'], 'months' => ['tammikuu', 'helmikuu', 'maaliskuu', 'huhtikuu', 'toukokuu', 'kesäkuu', 'heinäkuu', 'elokuu', 'syyskuu', 'lokakuu', 'marraskuu', 'joulukuu'], 'months_short' => ['tammi', 'helmi', 'maalis', 'huhti', 'touko', 'kesä', 'heinä', 'elo', 'syys', 'loka', 'marras', 'joulu'], 'meridiem' => ['aamupäivä', 'iltapäivä'], ]; PKgt[oCarbon/Lang/nl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Roy * - Stephan * - François B * - Tim Fish * - Kevin Huang * - Jacob Middag * - JD Isaacks * - Roy * - Stephan * - François B * - Tim Fish * - Jacob Middag * - JD Isaacks * - Propaganistas * - MegaXLR * - adriaanzon * - MonkeyPhysics * - JeroenG * - RikSomers * - proclame * - Rik de Groot (hwdegroot) */ return [ 'year' => ':count jaar|:count jaar', 'a_year' => 'een jaar|:count jaar', 'y' => ':countj', 'month' => ':count maand|:count maanden', 'a_month' => 'een maand|:count maanden', 'm' => ':countmnd', 'week' => ':count week|:count weken', 'a_week' => 'een week|:count weken', 'w' => ':countw', 'day' => ':count dag|:count dagen', 'a_day' => 'een dag|:count dagen', 'd' => ':countd', 'hour' => ':count uur|:count uur', 'a_hour' => 'een uur|:count uur', 'h' => ':countu', 'minute' => ':count minuut|:count minuten', 'a_minute' => 'een minuut|:count minuten', 'min' => ':countmin', 'second' => ':count seconde|:count seconden', 'a_second' => 'een paar seconden|:count seconden', 's' => ':counts', 'ago' => ':time geleden', 'from_now' => 'over :time', 'after' => ':time later', 'before' => ':time eerder', 'diff_now' => 'nu', 'diff_today' => 'vandaag', 'diff_today_regexp' => 'vandaag(?:\\s+om)?', 'diff_yesterday' => 'gisteren', 'diff_yesterday_regexp' => 'gisteren(?:\\s+om)?', 'diff_tomorrow' => 'morgen', 'diff_tomorrow_regexp' => 'morgen(?:\\s+om)?', 'diff_after_tomorrow' => 'overmorgen', 'diff_before_yesterday' => 'eergisteren', 'period_recurrences' => ':count keer', 'period_interval' => function (string $interval = '') { /** @var string $output */ $output = preg_replace('/^(een|één|1)\s+/u', '', $interval); if (preg_match('/^(een|één|1)( jaar|j| uur|u)/u', $interval)) { return "elk $output"; } return "elke $output"; }, 'period_start_date' => 'van :date', 'period_end_date' => 'tot :date', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD-MM-YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[vandaag om] LT', 'nextDay' => '[morgen om] LT', 'nextWeek' => 'dddd [om] LT', 'lastDay' => '[gisteren om] LT', 'lastWeek' => '[afgelopen] dddd [om] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { return $number.(($number === 1 || $number === 8 || $number >= 20) ? 'ste' : 'de'); }, 'months' => ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], 'mmm_suffix' => '.', 'weekdays' => ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], 'weekdays_short' => ['zo.', 'ma.', 'di.', 'wo.', 'do.', 'vr.', 'za.'], 'weekdays_min' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' en '], 'meridiem' => ['\'s ochtends', '\'s middags'], ]; PKgt[\GGCarbon/Lang/qu_BO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/qu.php', [ 'first_day_of_week' => 1, ]); PKgt[q a  Carbon/Lang/it_SM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/it.php'; PKgt[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ht_HT.php'; PKgt[?Ej  Carbon/Lang/en_DM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[;iCarbon/Lang/yi_US.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - http://www.uyip.org/ Pablo Saratxaga pablo@mandrakesoft.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['יאַנואַר', 'פֿעברואַר', 'מערץ', 'אַפּריל', 'מיי', 'יוני', 'יולי', 'אויגוסט', 'סעפּטעמבער', 'אקטאבער', 'נאוועמבער', 'דעצעמבער'], 'months_short' => ['יאַנ', 'פֿעב', 'מאַר', 'אַפּר', 'מײַ ', 'יונ', 'יול', 'אױג', 'סעפּ', 'אָקט', 'נאָװ', 'דעצ'], 'weekdays' => ['זונטיק', 'מאָנטיק', 'דינסטיק', 'מיטװאָך', 'דאָנערשטיק', 'פֿרײַטיק', 'שבת'], 'weekdays_short' => ['זונ\'', 'מאָנ\'', 'דינ\'', 'מיט\'', 'דאָנ\'', 'פֿרײַ\'', 'שבת'], 'weekdays_min' => ['זונ\'', 'מאָנ\'', 'דינ\'', 'מיט\'', 'דאָנ\'', 'פֿרײַ\'', 'שבת'], 'day_of_first_week_of_year' => 1, 'year' => ':count יאר', 'y' => ':count יאר', 'a_year' => ':count יאר', 'month' => ':count חודש', 'm' => ':count חודש', 'a_month' => ':count חודש', 'week' => ':count וואָך', 'w' => ':count וואָך', 'a_week' => ':count וואָך', 'day' => ':count טאָג', 'd' => ':count טאָג', 'a_day' => ':count טאָג', 'hour' => ':count שעה', 'h' => ':count שעה', 'a_hour' => ':count שעה', 'minute' => ':count מינוט', 'min' => ':count מינוט', 'a_minute' => ':count מינוט', 'second' => ':count סעקונדע', 's' => ':count סעקונדע', 'a_second' => ':count סעקונדע', ]); PKgt[UG Carbon/Lang/tzl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return [ 'year' => '[0,1]:count ar|:count ars', 'y' => '[0,1]:count ar|:count ars', 'month' => '[0,1]:count mes|:count mesen', 'm' => '[0,1]:count mes|:count mesen', 'week' => '[0,1]:count seifetziua|:count seifetziuas', 'w' => '[0,1]:count seifetziua|:count seifetziuas', 'day' => '[0,1]:count ziua|:count ziuas', 'd' => '[0,1]:count ziua|:count ziuas', 'hour' => '[0,1]:count þora|:count þoras', 'h' => '[0,1]:count þora|:count þoras', 'minute' => '[0,1]:count míut|:count míuts', 'min' => '[0,1]:count míut|:count míuts', 'second' => ':count secunds', 's' => ':count secunds', 'ago' => 'ja :time', 'from_now' => 'osprei :time', 'diff_yesterday' => 'ieiri', 'diff_yesterday_regexp' => 'ieiri(?:\\s+à)?', 'diff_today' => 'oxhi', 'diff_today_regexp' => 'oxhi(?:\\s+à)?', 'diff_tomorrow' => 'demà', 'diff_tomorrow_regexp' => 'demà(?:\\s+à)?', 'formats' => [ 'LT' => 'HH.mm', 'LTS' => 'HH.mm.ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM [dallas] YYYY', 'LLL' => 'D. MMMM [dallas] YYYY HH.mm', 'LLLL' => 'dddd, [li] D. MMMM [dallas] YYYY HH.mm', ], 'calendar' => [ 'sameDay' => '[oxhi à] LT', 'nextDay' => '[demà à] LT', 'nextWeek' => 'dddd [à] LT', 'lastDay' => '[ieiri à] LT', 'lastWeek' => '[sür el] dddd [lasteu à] LT', 'sameElse' => 'L', ], 'meridiem' => ["D'A", "D'O"], 'months' => ['Januar', 'Fevraglh', 'Març', 'Avrïu', 'Mai', 'Gün', 'Julia', 'Guscht', 'Setemvar', 'Listopäts', 'Noemvar', 'Zecemvar'], 'months_short' => ['Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Gün', 'Jul', 'Gus', 'Set', 'Lis', 'Noe', 'Zec'], 'weekdays' => ['Súladi', 'Lúneçi', 'Maitzi', 'Márcuri', 'Xhúadi', 'Viénerçi', 'Sáturi'], 'weekdays_short' => ['Súl', 'Lún', 'Mai', 'Már', 'Xhú', 'Vié', 'Sát'], 'weekdays_min' => ['Sú', 'Lú', 'Ma', 'Má', 'Xh', 'Vi', 'Sá'], 'ordinal' => ':number.', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]; PKgt[xGGCarbon/Lang/ko_KP.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ko.php', [ 'first_day_of_week' => 1, ]); PKgt[(|@zGGCarbon/Lang/es_IC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 1, ]); PKgt[[ZZCarbon/Lang/ta_LK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - J.Yogaraj 94-777-315206 yogaraj.ubuntu@gmail.com */ return array_replace_recursive(require __DIR__.'/ta.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], 'months_short' => ['ஜன', 'பிப்', 'மார்', 'ஏப்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக', 'செப்', 'அக்', 'நவ', 'டிச'], 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], 'weekdays_short' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['காலை', 'மாலை'], ]); PKgt['JNNCarbon/Lang/iu.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/iu_CA.php'; PKgt[UZj j Carbon/Lang/eo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - Mia Nordentoft * - JD Isaacks */ return [ 'year' => ':count jaro|:count jaroj', 'a_year' => 'jaro|:count jaroj', 'y' => ':count j.', 'month' => ':count monato|:count monatoj', 'a_month' => 'monato|:count monatoj', 'm' => ':count mo.', 'week' => ':count semajno|:count semajnoj', 'a_week' => 'semajno|:count semajnoj', 'w' => ':count sem.', 'day' => ':count tago|:count tagoj', 'a_day' => 'tago|:count tagoj', 'd' => ':count t.', 'hour' => ':count horo|:count horoj', 'a_hour' => 'horo|:count horoj', 'h' => ':count h.', 'minute' => ':count minuto|:count minutoj', 'a_minute' => 'minuto|:count minutoj', 'min' => ':count min.', 'second' => ':count sekundo|:count sekundoj', 'a_second' => 'sekundoj|:count sekundoj', 's' => ':count sek.', 'ago' => 'antaŭ :time', 'from_now' => 'post :time', 'after' => ':time poste', 'before' => ':time antaŭe', 'diff_yesterday' => 'Hieraŭ', 'diff_yesterday_regexp' => 'Hieraŭ(?:\\s+je)?', 'diff_today' => 'Hodiaŭ', 'diff_today_regexp' => 'Hodiaŭ(?:\\s+je)?', 'diff_tomorrow' => 'Morgaŭ', 'diff_tomorrow_regexp' => 'Morgaŭ(?:\\s+je)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-DD', 'LL' => 'D[-a de] MMMM, YYYY', 'LLL' => 'D[-a de] MMMM, YYYY HH:mm', 'LLLL' => 'dddd, [la] D[-a de] MMMM, YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Hodiaŭ je] LT', 'nextDay' => '[Morgaŭ je] LT', 'nextWeek' => 'dddd [je] LT', 'lastDay' => '[Hieraŭ je] LT', 'lastWeek' => '[pasinta] dddd [je] LT', 'sameElse' => 'L', ], 'ordinal' => ':numbera', 'meridiem' => ['a.t.m.', 'p.t.m.'], 'months' => ['januaro', 'februaro', 'marto', 'aprilo', 'majo', 'junio', 'julio', 'aŭgusto', 'septembro', 'oktobro', 'novembro', 'decembro'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aŭg', 'sep', 'okt', 'nov', 'dec'], 'weekdays' => ['dimanĉo', 'lundo', 'mardo', 'merkredo', 'ĵaŭdo', 'vendredo', 'sabato'], 'weekdays_short' => ['dim', 'lun', 'mard', 'merk', 'ĵaŭ', 'ven', 'sab'], 'weekdays_min' => ['di', 'lu', 'ma', 'me', 'ĵa', 've', 'sa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' kaj '], ]; PKgt[PשCarbon/Lang/hak_TW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY年MM月DD日', ], 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], 'months_short' => [' 1月', ' 2月', ' 3月', ' 4月', ' 5月', ' 6月', ' 7月', ' 8月', ' 9月', '10月', '11月', '12月'], 'weekdays' => ['禮拜日', '禮拜一', '禮拜二', '禮拜三', '禮拜四', '禮拜五', '禮拜六'], 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['上晝', '下晝'], 'year' => ':count ngien11', 'y' => ':count ngien11', 'a_year' => ':count ngien11', 'month' => ':count ngie̍t', 'm' => ':count ngie̍t', 'a_month' => ':count ngie̍t', 'week' => ':count lî-pai', 'w' => ':count lî-pai', 'a_week' => ':count lî-pai', 'day' => ':count ngit', 'd' => ':count ngit', 'a_day' => ':count ngit', 'hour' => ':count sṳ̀', 'h' => ':count sṳ̀', 'a_hour' => ':count sṳ̀', 'minute' => ':count fûn', 'min' => ':count fûn', 'a_minute' => ':count fûn', 'second' => ':count miéu', 's' => ':count miéu', 'a_second' => ':count miéu', ]); PKgt[{$Carbon/Lang/zh_TW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/zh_Hant_TW.php'; PKgt[Պ.Carbon/Lang/ar.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Atef Ben Ali (atefBB) * - Ibrahim AshShohail * - MLTDev * - Mohamed Sabil (mohamedsabil83) * - Yazan Alnugnugh (yazan-alnugnugh) */ $months = [ 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر', ]; return [ 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'ago' => 'منذ :time', 'from_now' => ':time من الآن', 'after' => 'بعد :time', 'before' => 'قبل :time', 'diff_now' => 'الآن', 'diff_today' => 'اليوم', 'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?', 'diff_yesterday' => 'أمس', 'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?', 'diff_tomorrow' => 'غداً', 'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?', 'diff_before_yesterday' => 'قبل الأمس', 'diff_after_tomorrow' => 'بعد غد', 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), 'period_interval' => 'كل :interval', 'period_start_date' => 'من :date', 'period_end_date' => 'إلى :date', 'months' => $months, 'months_short' => $months, 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], 'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'], 'list' => ['، ', ' و '], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[اليوم عند الساعة] LT', 'nextDay' => '[غدًا عند الساعة] LT', 'nextWeek' => 'dddd [عند الساعة] LT', 'lastDay' => '[أمس عند الساعة] LT', 'lastWeek' => 'dddd [عند الساعة] LT', 'sameElse' => 'L', ], 'meridiem' => ['ص', 'م'], 'weekend' => [5, 6], ]; PKgt[!~P Carbon/Lang/nb.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Alexander Tømmerås * - Sigurd Gartmann * - JD Isaacks */ return [ 'year' => ':count år|:count år', 'a_year' => 'ett år|:count år', 'y' => ':count år|:count år', 'month' => ':count måned|:count måneder', 'a_month' => 'en måned|:count måneder', 'm' => ':count md.', 'week' => ':count uke|:count uker', 'a_week' => 'en uke|:count uker', 'w' => ':count u.', 'day' => ':count dag|:count dager', 'a_day' => 'en dag|:count dager', 'd' => ':count d.', 'hour' => ':count time|:count timer', 'a_hour' => 'en time|:count timer', 'h' => ':count t', 'minute' => ':count minutt|:count minutter', 'a_minute' => 'ett minutt|:count minutter', 'min' => ':count min', 'second' => ':count sekund|:count sekunder', 'a_second' => 'noen sekunder|:count sekunder', 's' => ':count sek', 'ago' => ':time siden', 'from_now' => 'om :time', 'after' => ':time etter', 'before' => ':time før', 'diff_now' => 'akkurat nå', 'diff_today' => 'i dag', 'diff_today_regexp' => 'i dag(?:\\s+kl.)?', 'diff_yesterday' => 'i går', 'diff_yesterday_regexp' => 'i går(?:\\s+kl.)?', 'diff_tomorrow' => 'i morgen', 'diff_tomorrow_regexp' => 'i morgen(?:\\s+kl.)?', 'diff_before_yesterday' => 'i forgårs', 'diff_after_tomorrow' => 'i overmorgen', 'period_recurrences' => 'en gang|:count ganger', 'period_interval' => 'hver :interval', 'period_start_date' => 'fra :date', 'period_end_date' => 'til :date', 'months' => ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], 'weekdays' => ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], 'weekdays_short' => ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'], 'weekdays_min' => ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], 'ordinal' => ':number.', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY [kl.] HH:mm', 'LLLL' => 'dddd D. MMMM YYYY [kl.] HH:mm', ], 'calendar' => [ 'sameDay' => '[i dag kl.] LT', 'nextDay' => '[i morgen kl.] LT', 'nextWeek' => 'dddd [kl.] LT', 'lastDay' => '[i går kl.] LT', 'lastWeek' => '[forrige] dddd [kl.] LT', 'sameElse' => 'L', ], 'list' => [', ', ' og '], 'meridiem' => ['a.m.', 'p.m.'], ]; PKgt[   Carbon/Lang/sk_SK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/sk.php'; PKgt[+\\Carbon/Lang/teo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ta.php', [ 'meridiem' => ['Taparachu', 'Ebongi'], 'weekdays' => ['Nakaejuma', 'Nakaebarasa', 'Nakaare', 'Nakauni', 'Nakaung’on', 'Nakakany', 'Nakasabiti'], 'weekdays_short' => ['Jum', 'Bar', 'Aar', 'Uni', 'Ung', 'Kan', 'Sab'], 'weekdays_min' => ['Jum', 'Bar', 'Aar', 'Uni', 'Ung', 'Kan', 'Sab'], 'months' => ['Orara', 'Omuk', 'Okwamg’', 'Odung’el', 'Omaruk', 'Omodok’king’ol', 'Ojola', 'Opedel', 'Osokosokoma', 'Otibar', 'Olabor', 'Opoo'], 'months_short' => ['Rar', 'Muk', 'Kwa', 'Dun', 'Mar', 'Mod', 'Jol', 'Ped', 'Sok', 'Tib', 'Lab', 'Poo'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[))Carbon/Lang/ar_EH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ar.php', [ ]); PKgt[Y^^Carbon/Lang/ff_SN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Pular-Fulfulde.org Ibrahima Sarr admin@pulaar-fulfulde.org */ return require __DIR__.'/ff.php'; PKgt[/;)( ( Carbon/Lang/tig_ER.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['ጥሪ', 'ለካቲት', 'መጋቢት', 'ሚያዝያ', 'ግንቦት', 'ሰነ', 'ሓምለ', 'ነሓሰ', 'መስከረም', 'ጥቅምቲ', 'ሕዳር', 'ታሕሳስ'], 'months_short' => ['ጥሪ ', 'ለካቲ', 'መጋቢ', 'ሚያዝ', 'ግንቦ', 'ሰነ ', 'ሓምለ', 'ነሓሰ', 'መስከ', 'ጥቅም', 'ሕዳር', 'ታሕሳ'], 'weekdays' => ['ሰንበት ዓባይ', 'ሰኖ', 'ታላሸኖ', 'ኣረርባዓ', 'ከሚሽ', 'ጅምዓት', 'ሰንበት ንኢሽ'], 'weekdays_short' => ['ሰ//ዓ', 'ሰኖ ', 'ታላሸ', 'ኣረር', 'ከሚሽ', 'ጅምዓ', 'ሰ//ን'], 'weekdays_min' => ['ሰ//ዓ', 'ሰኖ ', 'ታላሸ', 'ኣረር', 'ከሚሽ', 'ጅምዓ', 'ሰ//ን'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['ቀደም ሰር ምዕል', 'ሓቆ ሰር ምዕል'], 'year' => ':count ማይ', // less reliable 'y' => ':count ማይ', // less reliable 'a_year' => ':count ማይ', // less reliable 'month' => ':count ሸምሽ', // less reliable 'm' => ':count ሸምሽ', // less reliable 'a_month' => ':count ሸምሽ', // less reliable 'week' => ':count ሰቡዕ', // less reliable 'w' => ':count ሰቡዕ', // less reliable 'a_week' => ':count ሰቡዕ', // less reliable 'day' => ':count ዎሮ', // less reliable 'd' => ':count ዎሮ', // less reliable 'a_day' => ':count ዎሮ', // less reliable 'hour' => ':count ሰዓት', // less reliable 'h' => ':count ሰዓት', // less reliable 'a_hour' => ':count ሰዓት', // less reliable 'minute' => ':count ካልኣይት', // less reliable 'min' => ':count ካልኣይት', // less reliable 'a_minute' => ':count ካልኣይት', // less reliable 'second' => ':count ካልኣይ', 's' => ':count ካልኣይ', 'a_second' => ':count ካልኣይ', ]); PKgt[`NNCarbon/Lang/li.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/li_NL.php'; PKgt[pGGCarbon/Lang/en_GM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[VBOOCarbon/Lang/szl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/szl_PL.php'; PKgt[l3AACarbon/Lang/ug_CN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kunal Marwaha * - Alim Boyaq */ return require __DIR__.'/ug.php'; PKgt[rOOCarbon/Lang/byn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/byn_ER.php'; PKgt[&oq||Carbon/Lang/en_IL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Yoav Amit * - François B * - Mayank Badola * - JD Isaacks */ return array_replace_recursive(require __DIR__.'/en.php', [ 'from_now' => 'in :time', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[5.Carbon/Lang/shs_CA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Neskie Manuel bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['Pellkwet̓min', 'Pelctsipwen̓ten', 'Pellsqépts', 'Peslléwten', 'Pell7ell7é7llqten', 'Pelltspéntsk', 'Pelltqwelq̓wél̓t', 'Pellct̓éxel̓cten', 'Pesqelqlélten', 'Pesllwélsten', 'Pellc7ell7é7llcwten̓', 'Pelltetétq̓em'], 'months_short' => ['Kwe', 'Tsi', 'Sqe', 'Éwt', 'Ell', 'Tsp', 'Tqw', 'Ct̓é', 'Qel', 'Wél', 'U7l', 'Tet'], 'weekdays' => ['Sxetspesq̓t', 'Spetkesq̓t', 'Selesq̓t', 'Skellesq̓t', 'Smesesq̓t', 'Stselkstesq̓t', 'Stqmekstesq̓t'], 'weekdays_short' => ['Sxe', 'Spe', 'Sel', 'Ske', 'Sme', 'Sts', 'Stq'], 'weekdays_min' => ['Sxe', 'Spe', 'Sel', 'Ske', 'Sme', 'Sts', 'Stq'], 'day_of_first_week_of_year' => 1, 'year' => ':count sqlélten', // less reliable 'y' => ':count sqlélten', // less reliable 'a_year' => ':count sqlélten', // less reliable 'month' => ':count swewll', // less reliable 'm' => ':count swewll', // less reliable 'a_month' => ':count swewll', // less reliable 'hour' => ':count seqwlút', // less reliable 'h' => ':count seqwlút', // less reliable 'a_hour' => ':count seqwlút', // less reliable ]); PKgt[}jZNNCarbon/Lang/tt.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/tt_RU.php'; PKgt[pGGCarbon/Lang/en_TC.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[>~!o  Carbon/Lang/cy_GB.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/cy.php'; PKgt[ J99Carbon/Lang/pap.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return [ 'formats' => [ 'LT' => 'HH.mm', 'LTS' => 'HH.mm:ss', 'L' => 'DD-MM-YY', 'LL' => 'MMMM [di] DD, YYYY', 'LLL' => 'DD MMM HH.mm', 'LLLL' => 'MMMM DD, YYYY HH.mm', ], 'months' => ['yanüari', 'febrüari', 'mart', 'aprel', 'mei', 'yüni', 'yüli', 'ougùstùs', 'sèptèmber', 'oktober', 'novèmber', 'desèmber'], 'months_short' => ['yan', 'feb', 'mar', 'apr', 'mei', 'yün', 'yül', 'oug', 'sèp', 'okt', 'nov', 'des'], 'weekdays' => ['djadomingo', 'djaluna', 'djamars', 'djawebs', 'djarason', 'djabierne', 'djasabra'], 'weekdays_short' => ['do', 'lu', 'ma', 'we', 'ra', 'bi', 'sa'], 'weekdays_min' => ['do', 'lu', 'ma', 'we', 'ra', 'bi', 'sa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => ':count aña', 'month' => ':count luna', 'week' => ':count siman', 'day' => ':count dia', 'hour' => ':count ora', 'minute' => ':count minüt', 'second' => ':count sekònde', 'list' => [', ', ' i '], ]; PKgt[zCarbon/Lang/zh_HK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/zh_Hant_HK.php'; PKgt[ʷCarbon/Lang/zh_Hant_HK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/zh_Hant.php'; PKgt[kOOCarbon/Lang/unm.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/unm_US.php'; PKgt[%Carbon/Lang/rof.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['kang’ama', 'kingoto'], 'weekdays' => ['Ijumapili', 'Ijumatatu', 'Ijumanne', 'Ijumatano', 'Alhamisi', 'Ijumaa', 'Ijumamosi'], 'weekdays_short' => ['Ijp', 'Ijt', 'Ijn', 'Ijtn', 'Alh', 'Iju', 'Ijm'], 'weekdays_min' => ['Ijp', 'Ijt', 'Ijn', 'Ijtn', 'Alh', 'Iju', 'Ijm'], 'months' => ['Mweri wa kwanza', 'Mweri wa kaili', 'Mweri wa katatu', 'Mweri wa kaana', 'Mweri wa tanu', 'Mweri wa sita', 'Mweri wa saba', 'Mweri wa nane', 'Mweri wa tisa', 'Mweri wa ikumi', 'Mweri wa ikumi na moja', 'Mweri wa ikumi na mbili'], 'months_short' => ['M1', 'M2', 'M3', 'M4', 'M5', 'M6', 'M7', 'M8', 'M9', 'M10', 'M11', 'M12'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[:*Carbon/Lang/sm_WS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Ianuari', 'Fepuari', 'Mati', 'Aperila', 'Me', 'Iuni', 'Iulai', 'Auguso', 'Setema', 'Oketopa', 'Novema', 'Tesema'], 'months_short' => ['Ian', 'Fep', 'Mat', 'Ape', 'Me', 'Iun', 'Iul', 'Aug', 'Set', 'Oke', 'Nov', 'Tes'], 'weekdays' => ['Aso Sa', 'Aso Gafua', 'Aso Lua', 'Aso Lulu', 'Aso Tofi', 'Aso Farail', 'Aso To\'ana\'i'], 'weekdays_short' => ['Aso Sa', 'Aso Gaf', 'Aso Lua', 'Aso Lul', 'Aso Tof', 'Aso Far', 'Aso To\''], 'weekdays_min' => ['Aso Sa', 'Aso Gaf', 'Aso Lua', 'Aso Lul', 'Aso Tof', 'Aso Far', 'Aso To\''], 'hour' => ':count uati', // less reliable 'h' => ':count uati', // less reliable 'a_hour' => ':count uati', // less reliable 'minute' => ':count itiiti', // less reliable 'min' => ':count itiiti', // less reliable 'a_minute' => ':count itiiti', // less reliable 'second' => ':count lua', // less reliable 's' => ':count lua', // less reliable 'a_second' => ':count lua', // less reliable 'year' => ':count tausaga', 'y' => ':count tausaga', 'a_year' => ':count tausaga', 'month' => ':count māsina', 'm' => ':count māsina', 'a_month' => ':count māsina', 'week' => ':count vaiaso', 'w' => ':count vaiaso', 'a_week' => ':count vaiaso', 'day' => ':count aso', 'd' => ':count aso', 'a_day' => ':count aso', ]); PKgt[pGGCarbon/Lang/en_UG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[hCarbon/Lang/ar_MA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Authors: * - Josh Soref * - JD Isaacks * - Atef Ben Ali (atefBB) * - Mohamed Sabil (mohamedsabil83) */ $months = [ 'يناير', 'فبراير', 'مارس', 'أبريل', 'ماي', 'يونيو', 'يوليوز', 'غشت', 'شتنبر', 'أكتوبر', 'نونبر', 'دجنبر', ]; return [ 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'ago' => 'منذ :time', 'from_now' => 'في :time', 'after' => 'بعد :time', 'before' => 'قبل :time', 'diff_now' => 'الآن', 'diff_today' => 'اليوم', 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', 'diff_yesterday' => 'أمس', 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', 'diff_tomorrow' => 'غداً', 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', 'diff_before_yesterday' => 'قبل الأمس', 'diff_after_tomorrow' => 'بعد غد', 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), 'period_interval' => 'كل :interval', 'period_start_date' => 'من :date', 'period_end_date' => 'إلى :date', 'months' => $months, 'months_short' => $months, 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'list' => ['، ', ' و '], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[اليوم على الساعة] LT', 'nextDay' => '[غدا على الساعة] LT', 'nextWeek' => 'dddd [على الساعة] LT', 'lastDay' => '[أمس على الساعة] LT', 'lastWeek' => 'dddd [على الساعة] LT', 'sameElse' => 'L', ], 'meridiem' => ['ص', 'م'], 'weekend' => [5, 6], ]; PKgt[  Carbon/Lang/ga_IE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ga.php'; PKgt[}tCarbon/Lang/ar_Shakl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Abdellah Chadidi * - Atef Ben Ali (atefBB) * - Mohamed Sabil (mohamedsabil83) */ // Same for long and short $months = [ // @TODO add shakl to months 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر', ]; return [ 'year' => implode('|', ['{0}:count سَنَة', '{1}سَنَة', '{2}سَنَتَيْن', ']2,11[:count سَنَوَات', ']10,Inf[:count سَنَة']), 'a_year' => implode('|', ['{0}:count سَنَة', '{1}سَنَة', '{2}سَنَتَيْن', ']2,11[:count سَنَوَات', ']10,Inf[:count سَنَة']), 'month' => implode('|', ['{0}:count شَهْرَ', '{1}شَهْرَ', '{2}شَهْرَيْن', ']2,11[:count أَشْهُر', ']10,Inf[:count شَهْرَ']), 'a_month' => implode('|', ['{0}:count شَهْرَ', '{1}شَهْرَ', '{2}شَهْرَيْن', ']2,11[:count أَشْهُر', ']10,Inf[:count شَهْرَ']), 'week' => implode('|', ['{0}:count أُسْبُوع', '{1}أُسْبُوع', '{2}أُسْبُوعَيْن', ']2,11[:count أَسَابِيع', ']10,Inf[:count أُسْبُوع']), 'a_week' => implode('|', ['{0}:count أُسْبُوع', '{1}أُسْبُوع', '{2}أُسْبُوعَيْن', ']2,11[:count أَسَابِيع', ']10,Inf[:count أُسْبُوع']), 'day' => implode('|', ['{0}:count يَوْم', '{1}يَوْم', '{2}يَوْمَيْن', ']2,11[:count أَيَّام', ']10,Inf[:count يَوْم']), 'a_day' => implode('|', ['{0}:count يَوْم', '{1}يَوْم', '{2}يَوْمَيْن', ']2,11[:count أَيَّام', ']10,Inf[:count يَوْم']), 'hour' => implode('|', ['{0}:count سَاعَة', '{1}سَاعَة', '{2}سَاعَتَيْن', ']2,11[:count سَاعَات', ']10,Inf[:count سَاعَة']), 'a_hour' => implode('|', ['{0}:count سَاعَة', '{1}سَاعَة', '{2}سَاعَتَيْن', ']2,11[:count سَاعَات', ']10,Inf[:count سَاعَة']), 'minute' => implode('|', ['{0}:count دَقِيقَة', '{1}دَقِيقَة', '{2}دَقِيقَتَيْن', ']2,11[:count دَقَائِق', ']10,Inf[:count دَقِيقَة']), 'a_minute' => implode('|', ['{0}:count دَقِيقَة', '{1}دَقِيقَة', '{2}دَقِيقَتَيْن', ']2,11[:count دَقَائِق', ']10,Inf[:count دَقِيقَة']), 'second' => implode('|', ['{0}:count ثَانِيَة', '{1}ثَانِيَة', '{2}ثَانِيَتَيْن', ']2,11[:count ثَوَان', ']10,Inf[:count ثَانِيَة']), 'a_second' => implode('|', ['{0}:count ثَانِيَة', '{1}ثَانِيَة', '{2}ثَانِيَتَيْن', ']2,11[:count ثَوَان', ']10,Inf[:count ثَانِيَة']), 'ago' => 'مُنْذُ :time', 'from_now' => 'مِنَ الْآن :time', 'after' => 'بَعْدَ :time', 'before' => 'قَبْلَ :time', // @TODO add shakl to translations below 'diff_now' => 'الآن', 'diff_today' => 'اليوم', 'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?', 'diff_yesterday' => 'أمس', 'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?', 'diff_tomorrow' => 'غداً', 'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?', 'diff_before_yesterday' => 'قبل الأمس', 'diff_after_tomorrow' => 'بعد غد', 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), 'period_interval' => 'كل :interval', 'period_start_date' => 'من :date', 'period_end_date' => 'إلى :date', 'months' => $months, 'months_short' => $months, 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], 'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'], 'list' => ['، ', ' و '], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[اليوم عند الساعة] LT', 'nextDay' => '[غدًا عند الساعة] LT', 'nextWeek' => 'dddd [عند الساعة] LT', 'lastDay' => '[أمس عند الساعة] LT', 'lastWeek' => 'dddd [عند الساعة] LT', 'sameElse' => 'L', ], 'meridiem' => ['ص', 'م'], 'weekend' => [5, 6], ]; PKgt[-^Carbon/Lang/nl_NL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/nl.php', [ 'months' => ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], 'weekdays' => ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], 'weekdays_short' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], 'weekdays_min' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[PPCarbon/Lang/to_TO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - International Components for Unicode akhilesh.k@samsung.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'dddd DD MMM YYYY', ], 'months' => ['Sānuali', 'Fēpueli', 'Maʻasi', 'ʻEpeleli', 'Mē', 'Sune', 'Siulai', 'ʻAokosi', 'Sepitema', 'ʻOkatopa', 'Nōvema', 'Tīsema'], 'months_short' => ['Sān', 'Fēp', 'Maʻa', 'ʻEpe', 'Mē', 'Sun', 'Siu', 'ʻAok', 'Sep', 'ʻOka', 'Nōv', 'Tīs'], 'weekdays' => ['Sāpate', 'Mōnite', 'Tūsite', 'Pulelulu', 'Tuʻapulelulu', 'Falaite', 'Tokonaki'], 'weekdays_short' => ['Sāp', 'Mōn', 'Tūs', 'Pul', 'Tuʻa', 'Fal', 'Tok'], 'weekdays_min' => ['Sāp', 'Mōn', 'Tūs', 'Pul', 'Tuʻa', 'Fal', 'Tok'], 'meridiem' => ['hengihengi', 'efiafi'], 'year' => ':count fitu', // less reliable 'y' => ':count fitu', // less reliable 'a_year' => ':count fitu', // less reliable 'month' => ':count mahina', // less reliable 'm' => ':count mahina', // less reliable 'a_month' => ':count mahina', // less reliable 'week' => ':count Sapate', // less reliable 'w' => ':count Sapate', // less reliable 'a_week' => ':count Sapate', // less reliable 'day' => ':count ʻaho', // less reliable 'd' => ':count ʻaho', // less reliable 'a_day' => ':count ʻaho', // less reliable 'hour' => ':count houa', 'h' => ':count houa', 'a_hour' => ':count houa', 'minute' => ':count miniti', 'min' => ':count miniti', 'a_minute' => ':count miniti', 'second' => ':count sekoni', 's' => ':count sekoni', 'a_second' => ':count sekoni', ]); PKgt[v  Carbon/Lang/bs_BA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/bs.php'; PKgt[ƪCarbon/Lang/pa_Arab.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ur.php', [ 'weekdays' => ['اتوار', 'پیر', 'منگل', 'بُدھ', 'جمعرات', 'جمعہ', 'ہفتہ'], 'weekdays_short' => ['اتوار', 'پیر', 'منگل', 'بُدھ', 'جمعرات', 'جمعہ', 'ہفتہ'], 'weekdays_min' => ['اتوار', 'پیر', 'منگل', 'بُدھ', 'جمعرات', 'جمعہ', 'ہفتہ'], 'months' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئ', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'months_short' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئ', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd, DD MMMM YYYY h:mm a', ], ]); PKgt["M M Carbon/Lang/si.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Serhan Apaydın * - JD Isaacks * - Malinda Weerasinghe (MalindaWMD) */ return [ 'year' => '{1}වසර 1|වසර :count', 'a_year' => '{1}වසරක්|වසර :count', 'month' => '{1}මාස 1|මාස :count', 'a_month' => '{1}මාසය|මාස :count', 'week' => '{1}සති 1|සති :count', 'a_week' => '{1}සතියක්|සති :count', 'day' => '{1}දින 1|දින :count', 'a_day' => '{1}දිනක්|දින :count', 'hour' => '{1}පැය 1|පැය :count', 'a_hour' => '{1}පැයක්|පැය :count', 'minute' => '{1}මිනිත්තු 1|මිනිත්තු :count', 'a_minute' => '{1}මිනිත්තුවක්|මිනිත්තු :count', 'second' => '{1}තත්පර 1|තත්පර :count', 'a_second' => '{1}තත්පර කිහිපයකට|තත්පර :count', 'ago' => ':time කට පෙර', 'from_now' => function ($time) { if (preg_match('/දින \d/u', $time)) { return $time.' න්'; } return $time.' කින්'; }, 'before' => ':time කට පෙර', 'after' => function ($time) { if (preg_match('/දින \d/u', $time)) { return $time.' න්'; } return $time.' කින්'; }, 'diff_now' => 'දැන්', 'diff_today' => 'අද', 'diff_yesterday' => 'ඊයේ', 'diff_tomorrow' => 'හෙට', 'formats' => [ 'LT' => 'a h:mm', 'LTS' => 'a h:mm:ss', 'L' => 'YYYY/MM/DD', 'LL' => 'YYYY MMMM D', 'LLL' => 'YYYY MMMM D, a h:mm', 'LLLL' => 'YYYY MMMM D [වැනි] dddd, a h:mm:ss', ], 'calendar' => [ 'sameDay' => '[අද] LT[ට]', 'nextDay' => '[හෙට] LT[ට]', 'nextWeek' => 'dddd LT[ට]', 'lastDay' => '[ඊයේ] LT[ට]', 'lastWeek' => '[පසුගිය] dddd LT[ට]', 'sameElse' => 'L', ], 'ordinal' => ':number වැනි', 'meridiem' => ['පෙර වරු', 'පස් වරු', 'පෙ.ව.', 'ප.ව.'], 'months' => ['ජනවාරි', 'පෙබරවාරි', 'මාර්තු', 'අප්‍රේල්', 'මැයි', 'ජූනි', 'ජූලි', 'අගෝස්තු', 'සැප්තැම්බර්', 'ඔක්තෝබර්', 'නොවැම්බර්', 'දෙසැම්බර්'], 'months_short' => ['ජන', 'පෙබ', 'මාර්', 'අප්', 'මැයි', 'ජූනි', 'ජූලි', 'අගෝ', 'සැප්', 'ඔක්', 'නොවැ', 'දෙසැ'], 'weekdays' => ['ඉරිදා', 'සඳුදා', 'අඟහරුවාදා', 'බදාදා', 'බ්‍රහස්පතින්දා', 'සිකුරාදා', 'සෙනසුරාදා'], 'weekdays_short' => ['ඉරි', 'සඳු', 'අඟ', 'බදා', 'බ්‍රහ', 'සිකු', 'සෙන'], 'weekdays_min' => ['ඉ', 'ස', 'අ', 'බ', 'බ්‍ර', 'සි', 'සෙ'], 'first_day_of_week' => 1, ]; PKgt[Z Y  Carbon/Lang/fi_FI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fi.php'; PKgt[))Carbon/Lang/ar_IL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ar.php', [ ]); PKgt[:<Carbon/Lang/sl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - Tsutomu Kuroda * - tjku * - Max Melentiev * - Juanito Fatas * - Akira Matsuda * - Christopher Dell * - Enrique Vidal * - Simone Carletti * - Aaron Patterson * - Nicolás Hock Isaza * - Miha Rebernik * - Gal Jakič (morpheus7CS) * - Glavić * - Anže Časar * - Lovro Tramšek (Lovro1107) * - burut13 */ use Carbon\CarbonInterface; return [ 'year' => ':count leto|:count leti|:count leta|:count let', 'y' => ':count leto|:count leti|:count leta|:count let', 'month' => ':count mesec|:count meseca|:count mesece|:count mesecev', 'm' => ':count mes.', 'week' => ':count teden|:count tedna|:count tedne|:count tednov', 'w' => ':count ted.', 'day' => ':count dan|:count dni|:count dni|:count dni', 'd' => ':count dan|:count dni|:count dni|:count dni', 'hour' => ':count ura|:count uri|:count ure|:count ur', 'h' => ':count h', 'minute' => ':count minuta|:count minuti|:count minute|:count minut', 'min' => ':count min.', 'second' => ':count sekunda|:count sekundi|:count sekunde|:count sekund', 'a_second' => '{1}nekaj sekund|:count sekunda|:count sekundi|:count sekunde|:count sekund', 's' => ':count s', 'year_ago' => ':count letom|:count letoma|:count leti|:count leti', 'y_ago' => ':count letom|:count letoma|:count leti|:count leti', 'month_ago' => ':count mesecem|:count mesecema|:count meseci|:count meseci', 'week_ago' => ':count tednom|:count tednoma|:count tedni|:count tedni', 'day_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', 'd_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', 'hour_ago' => ':count uro|:count urama|:count urami|:count urami', 'minute_ago' => ':count minuto|:count minutama|:count minutami|:count minutami', 'second_ago' => ':count sekundo|:count sekundama|:count sekundami|:count sekundami', 'day_from_now' => ':count dan|:count dneva|:count dni|:count dni', 'd_from_now' => ':count dan|:count dneva|:count dni|:count dni', 'hour_from_now' => ':count uro|:count uri|:count ure|:count ur', 'minute_from_now' => ':count minuto|:count minuti|:count minute|:count minut', 'second_from_now' => ':count sekundo|:count sekundi|:count sekunde|:count sekund', 'ago' => 'pred :time', 'from_now' => 'čez :time', 'after' => ':time kasneje', 'before' => ':time prej', 'diff_now' => 'ravnokar', 'diff_today' => 'danes', 'diff_today_regexp' => 'danes(?:\\s+ob)?', 'diff_yesterday' => 'včeraj', 'diff_yesterday_regexp' => 'včeraj(?:\\s+ob)?', 'diff_tomorrow' => 'jutri', 'diff_tomorrow_regexp' => 'jutri(?:\\s+ob)?', 'diff_before_yesterday' => 'predvčerajšnjim', 'diff_after_tomorrow' => 'pojutrišnjem', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'period_start_date' => 'od :date', 'period_end_date' => 'do :date', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY H:mm', 'LLLL' => 'dddd, D. MMMM YYYY H:mm', ], 'calendar' => [ 'sameDay' => '[danes ob] LT', 'nextDay' => '[jutri ob] LT', 'nextWeek' => 'dddd [ob] LT', 'lastDay' => '[včeraj ob] LT', 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[preteklo] [nedeljo] [ob] LT'; case 1: return '[pretekli] [ponedeljek] [ob] LT'; case 2: return '[pretekli] [torek] [ob] LT'; case 3: return '[preteklo] [sredo] [ob] LT'; case 4: return '[pretekli] [četrtek] [ob] LT'; case 5: return '[pretekli] [petek] [ob] LT'; case 6: return '[preteklo] [soboto] [ob] LT'; } }, 'sameElse' => 'L', ], 'months' => ['januar', 'februar', 'marec', 'april', 'maj', 'junij', 'julij', 'avgust', 'september', 'oktober', 'november', 'december'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'avg', 'sep', 'okt', 'nov', 'dec'], 'weekdays' => ['nedelja', 'ponedeljek', 'torek', 'sreda', 'četrtek', 'petek', 'sobota'], 'weekdays_short' => ['ned', 'pon', 'tor', 'sre', 'čet', 'pet', 'sob'], 'weekdays_min' => ['ne', 'po', 'to', 'sr', 'če', 'pe', 'so'], 'list' => [', ', ' in '], 'meridiem' => ['dopoldan', 'popoldan'], ]; PKgt[vÕCarbon/Lang/el_GR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/el.php', [ 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[WnNNCarbon/Lang/rw.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/rw_RW.php'; PKgt[pGGCarbon/Lang/en_SZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[GCarbon/Lang/is.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kristján Ingi Geirsson */ return [ 'year' => '1 ár|:count ár', 'y' => '1 ár|:count ár', 'month' => '1 mánuður|:count mánuðir', 'm' => '1 mánuður|:count mánuðir', 'week' => '1 vika|:count vikur', 'w' => '1 vika|:count vikur', 'day' => '1 dagur|:count dagar', 'd' => '1 dagur|:count dagar', 'hour' => '1 klukkutími|:count klukkutímar', 'h' => '1 klukkutími|:count klukkutímar', 'minute' => '1 mínúta|:count mínútur', 'min' => '1 mínúta|:count mínútur', 'second' => '1 sekúnda|:count sekúndur', 's' => '1 sekúnda|:count sekúndur', 'ago' => ':time síðan', 'from_now' => ':time síðan', 'after' => ':time eftir', 'before' => ':time fyrir', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' og '], 'meridiem' => ['fh', 'eh'], 'diff_now' => 'núna', 'diff_yesterday' => 'í gær', 'diff_tomorrow' => 'á morgun', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM [kl.] HH:mm', 'LLLL' => 'dddd D. MMMM YYYY [kl.] HH:mm', ], 'weekdays' => ['sunnudaginn', 'mánudaginn', 'þriðjudaginn', 'miðvikudaginn', 'fimmtudaginn', 'föstudaginn', 'laugardaginn'], 'weekdays_short' => ['sun', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau'], 'weekdays_min' => ['sun', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau'], 'months' => ['janúar', 'febrúar', 'mars', 'apríl', 'maí', 'júní', 'júlí', 'ágúst', 'september', 'október', 'nóvember', 'desember'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maí', 'jún', 'júl', 'ágú', 'sep', 'okt', 'nóv', 'des'], ]; PKgt[猪N  Carbon/Lang/shi.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ⵜⵉⴼⴰⵡⵜ', 'ⵜⴰⴷⴳⴳⵯⴰⵜ'], 'weekdays' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵕⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], 'weekdays_short' => ['ⴰⵙⴰ', 'ⴰⵢⵏ', 'ⴰⵙⵉ', 'ⴰⴽⵕ', 'ⴰⴽⵡ', 'ⴰⵙⵉⵎ', 'ⴰⵙⵉⴹ'], 'weekdays_min' => ['ⴰⵙⴰ', 'ⴰⵢⵏ', 'ⴰⵙⵉ', 'ⴰⴽⵕ', 'ⴰⴽⵡ', 'ⴰⵙⵉⵎ', 'ⴰⵙⵉⴹ'], 'months' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵜⵓⴱⵔ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⴰⵏⴱⵉⵔ'], 'months_short' => ['ⵉⵏⵏ', 'ⴱⵕⴰ', 'ⵎⴰⵕ', 'ⵉⴱⵔ', 'ⵎⴰⵢ', 'ⵢⵓⵏ', 'ⵢⵓⵍ', 'ⵖⵓⵛ', 'ⵛⵓⵜ', 'ⴽⵜⵓ', 'ⵏⵓⵡ', 'ⴷⵓⵊ'], 'first_day_of_week' => 6, 'weekend' => [5, 6], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'year' => ':count aseggwas', 'y' => ':count aseggwas', 'a_year' => ':count aseggwas', 'month' => ':count ayyur', 'm' => ':count ayyur', 'a_month' => ':count ayyur', 'week' => ':count imalass', 'w' => ':count imalass', 'a_week' => ':count imalass', 'day' => ':count ass', 'd' => ':count ass', 'a_day' => ':count ass', 'hour' => ':count urɣ', // less reliable 'h' => ':count urɣ', // less reliable 'a_hour' => ':count urɣ', // less reliable 'minute' => ':count ⴰⵎⵥⵉ', // less reliable 'min' => ':count ⴰⵎⵥⵉ', // less reliable 'a_minute' => ':count ⴰⵎⵥⵉ', // less reliable 'second' => ':count sin', // less reliable 's' => ':count sin', // less reliable 'a_second' => ':count sin', // less reliable ]); PKgt[$Z Carbon/Lang/sd_IN@devanagari.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Red Hat, Pune bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/sd.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['जनवरी', 'फबरवरी', 'मार्चि', 'अप्रेल', 'मे', 'जूनि', 'जूलाइ', 'आगस्टु', 'सेप्टेंबरू', 'आक्टूबरू', 'नवंबरू', 'ॾिसंबरू'], 'months_short' => ['जनवरी', 'फबरवरी', 'मार्चि', 'अप्रेल', 'मे', 'जूनि', 'जूलाइ', 'आगस्टु', 'सेप्टेंबरू', 'आक्टूबरू', 'नवंबरू', 'ॾिसंबरू'], 'weekdays' => ['आर्तवारू', 'सूमरू', 'मंगलू', 'ॿुधरू', 'विस्पति', 'जुमो', 'छंछस'], 'weekdays_short' => ['आर्तवारू', 'सूमरू', 'मंगलू', 'ॿुधरू', 'विस्पति', 'जुमो', 'छंछस'], 'weekdays_min' => ['आर्तवारू', 'सूमरू', 'मंगलू', 'ॿुधरू', 'विस्पति', 'जुमो', 'छंछस'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['म.पू.', 'म.नं.'], ]); PKgt[{ Carbon/Lang/yo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Atolagbe Abisoye */ return [ 'year' => 'ọdún :count', 'a_year' => '{1}ọdún kan|ọdún :count', 'month' => 'osù :count', 'a_month' => '{1}osù kan|osù :count', 'week' => 'ọsẹ :count', 'a_week' => '{1}ọsẹ kan|ọsẹ :count', 'day' => 'ọjọ́ :count', 'a_day' => '{1}ọjọ́ kan|ọjọ́ :count', 'hour' => 'wákati :count', 'a_hour' => '{1}wákati kan|wákati :count', 'minute' => 'ìsẹjú :count', 'a_minute' => '{1}ìsẹjú kan|ìsẹjú :count', 'second' => 'iaayá :count', 'a_second' => '{1}ìsẹjú aayá die|aayá :count', 'ago' => ':time kọjá', 'from_now' => 'ní :time', 'diff_yesterday' => 'Àna', 'diff_yesterday_regexp' => 'Àna(?:\\s+ni)?', 'diff_today' => 'Ònì', 'diff_today_regexp' => 'Ònì(?:\\s+ni)?', 'diff_tomorrow' => 'Ọ̀la', 'diff_tomorrow_regexp' => 'Ọ̀la(?:\\s+ni)?', 'formats' => [ 'LT' => 'h:mm A', 'LTS' => 'h:mm:ss A', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY h:mm A', 'LLLL' => 'dddd, D MMMM YYYY h:mm A', ], 'calendar' => [ 'sameDay' => '[Ònì ni] LT', 'nextDay' => '[Ọ̀la ni] LT', 'nextWeek' => 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT', 'lastDay' => '[Àna ni] LT', 'lastWeek' => 'dddd [Ọsẹ̀ tólọ́] [ni] LT', 'sameElse' => 'L', ], 'ordinal' => 'ọjọ́ :number', 'months' => ['Sẹ́rẹ́', 'Èrèlè', 'Ẹrẹ̀nà', 'Ìgbé', 'Èbibi', 'Òkùdu', 'Agẹmo', 'Ògún', 'Owewe', 'Ọ̀wàrà', 'Bélú', 'Ọ̀pẹ̀̀'], 'months_short' => ['Sẹ́r', 'Èrl', 'Ẹrn', 'Ìgb', 'Èbi', 'Òkù', 'Agẹ', 'Ògú', 'Owe', 'Ọ̀wà', 'Bél', 'Ọ̀pẹ̀̀'], 'weekdays' => ['Àìkú', 'Ajé', 'Ìsẹ́gun', 'Ọjọ́rú', 'Ọjọ́bọ', 'Ẹtì', 'Àbámẹ́ta'], 'weekdays_short' => ['Àìk', 'Ajé', 'Ìsẹ́', 'Ọjr', 'Ọjb', 'Ẹtì', 'Àbá'], 'weekdays_min' => ['Àì', 'Aj', 'Ìs', 'Ọr', 'Ọb', 'Ẹt', 'Àb'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'meridiem' => ['Àárọ̀', 'Ọ̀sán'], ]; PKgt[O %Carbon/Lang/haw.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['Ianuali', 'Pepeluali', 'Malaki', 'ʻApelila', 'Mei', 'Iune', 'Iulai', 'ʻAukake', 'Kepakemapa', 'ʻOkakopa', 'Nowemapa', 'Kekemapa'], 'months_short' => ['Ian.', 'Pep.', 'Mal.', 'ʻAp.', 'Mei', 'Iun.', 'Iul.', 'ʻAu.', 'Kep.', 'ʻOk.', 'Now.', 'Kek.'], 'weekdays' => ['Lāpule', 'Poʻakahi', 'Poʻalua', 'Poʻakolu', 'Poʻahā', 'Poʻalima', 'Poʻaono'], 'weekdays_short' => ['LP', 'P1', 'P2', 'P3', 'P4', 'P5', 'P6'], 'weekdays_min' => ['S', 'M', 'T', 'W', 'T', 'F', 'S'], 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd, D MMMM YYYY h:mm a', ], 'year' => ':count makahiki', 'y' => ':count makahiki', 'a_year' => ':count makahiki', 'month' => ':count mahina', 'm' => ':count mahina', 'a_month' => ':count mahina', 'week' => ':count pule', 'w' => ':count pule', 'a_week' => ':count pule', 'day' => ':count lā', 'd' => ':count lā', 'a_day' => ':count lā', 'hour' => ':count hola', 'h' => ':count hola', 'a_hour' => ':count hola', 'minute' => ':count minuke', 'min' => ':count minuke', 'a_minute' => ':count minuke', 'second' => ':count lua', 's' => ':count lua', 'a_second' => ':count lua', ]); PKgt[[ia  Carbon/Lang/pt_CV.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/pt.php'; PKgt[l`POOCarbon/Lang/ayc.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/ayc_PE.php'; PKgt[}*B  Carbon/Lang/ha_NE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ha.php'; PKgt[A$Carbon/Lang/ja.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Takuya Sawada * - Atsushi Tanaka * - François B * - Jason Katz-Brown * - Serhan Apaydın * - XueWei * - JD Isaacks * - toyama satoshi * - atakigawa */ use Carbon\CarbonInterface; return [ 'year' => ':count年', 'y' => ':count年', 'month' => ':countヶ月', 'm' => ':countヶ月', 'week' => ':count週間', 'w' => ':count週間', 'day' => ':count日', 'd' => ':count日', 'hour' => ':count時間', 'h' => ':count時間', 'minute' => ':count分', 'min' => ':count分', 'second' => ':count秒', 'a_second' => '{1}数秒|]1,Inf[:count秒', 's' => ':count秒', 'ago' => ':time前', 'from_now' => ':time後', 'after' => ':time後', 'before' => ':time前', 'diff_now' => '今', 'diff_today' => '今日', 'diff_yesterday' => '昨日', 'diff_tomorrow' => '明日', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY/MM/DD', 'LL' => 'YYYY年M月D日', 'LLL' => 'YYYY年M月D日 HH:mm', 'LLLL' => 'YYYY年M月D日 dddd HH:mm', ], 'calendar' => [ 'sameDay' => '[今日] LT', 'nextDay' => '[明日] LT', 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { if ($other->week !== $current->week) { return '[来週]dddd LT'; } return 'dddd LT'; }, 'lastDay' => '[昨日] LT', 'lastWeek' => function (CarbonInterface $current, CarbonInterface $other) { if ($other->week !== $current->week) { return '[先週]dddd LT'; } return 'dddd LT'; }, 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { switch ($period) { case 'd': case 'D': case 'DDD': return $number.'日'; default: return $number; } }, 'meridiem' => ['午前', '午後'], 'months' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], 'weekdays' => ['日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'], 'weekdays_short' => ['日', '月', '火', '水', '木', '金', '土'], 'weekdays_min' => ['日', '月', '火', '水', '木', '金', '土'], 'list' => '、', 'alt_numbers' => ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五', '十六', '十七', '十八', '十九', '二十', '二十一', '二十二', '二十三', '二十四', '二十五', '二十六', '二十七', '二十八', '二十九', '三十', '三十一', '三十二', '三十三', '三十四', '三十五', '三十六', '三十七', '三十八', '三十九', '四十', '四十一', '四十二', '四十三', '四十四', '四十五', '四十六', '四十七', '四十八', '四十九', '五十', '五十一', '五十二', '五十三', '五十四', '五十五', '五十六', '五十七', '五十八', '五十九', '六十', '六十一', '六十二', '六十三', '六十四', '六十五', '六十六', '六十七', '六十八', '六十九', '七十', '七十一', '七十二', '七十三', '七十四', '七十五', '七十六', '七十七', '七十八', '七十九', '八十', '八十一', '八十二', '八十三', '八十四', '八十五', '八十六', '八十七', '八十八', '八十九', '九十', '九十一', '九十二', '九十三', '九十四', '九十五', '九十六', '九十七', '九十八', '九十九'], 'alt_numbers_pow' => [ 10000 => '万', 1000 => '千', 100 => '百', ], ]; PKgt[ NNCarbon/Lang/sa.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/sa_IN.php'; PKgt[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $months = [ 'جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر', ]; $weekdays = [ 'اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ', ]; /* * Authors: * - Sawood Alam * - Mehshan * - Philippe Vaucher * - Tsutomu Kuroda * - tjku * - Zaid Akram * - Max Melentiev * - hafezdivandari * - Hossein Jabbari * - nimamo */ return [ 'year' => 'ایک سال|:count سال', 'month' => 'ایک ماہ|:count ماہ', 'week' => ':count ہفتے', 'day' => 'ایک دن|:count دن', 'hour' => 'ایک گھنٹہ|:count گھنٹے', 'minute' => 'ایک منٹ|:count منٹ', 'second' => 'چند سیکنڈ|:count سیکنڈ', 'ago' => ':time قبل', 'from_now' => ':time بعد', 'after' => ':time بعد', 'before' => ':time پہلے', 'diff_now' => 'اب', 'diff_today' => 'آج', 'diff_today_regexp' => 'آج(?:\\s+بوقت)?', 'diff_yesterday' => 'گزشتہ کل', 'diff_yesterday_regexp' => 'گذشتہ(?:\\s+روز)?(?:\\s+بوقت)?', 'diff_tomorrow' => 'آئندہ کل', 'diff_tomorrow_regexp' => 'کل(?:\\s+بوقت)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd، D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[آج بوقت] LT', 'nextDay' => '[کل بوقت] LT', 'nextWeek' => 'dddd [بوقت] LT', 'lastDay' => '[گذشتہ روز بوقت] LT', 'lastWeek' => '[گذشتہ] dddd [بوقت] LT', 'sameElse' => 'L', ], 'meridiem' => ['صبح', 'شام'], 'months' => $months, 'months_short' => $months, 'weekdays' => $weekdays, 'weekdays_short' => $weekdays, 'weekdays_min' => $weekdays, 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => ['، ', ' اور '], ]; PKgt[}TOOCarbon/Lang/sat.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/sat_IN.php'; PKgt[n!KA Carbon/Lang/kok_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Red Hat, Pune bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D-M-YY', ], 'months' => ['जानेवारी', 'फेब्रुवारी', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'ओगस्ट', 'सेप्टेंबर', 'ओक्टोबर', 'नोव्हेंबर', 'डिसेंबर'], 'months_short' => ['जानेवारी', 'फेब्रुवारी', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'ओगस्ट', 'सेप्टेंबर', 'ओक्टोबर', 'नोव्हेंबर', 'डिसेंबर'], 'weekdays' => ['आयतार', 'सोमार', 'मंगळवार', 'बुधवार', 'बेरेसतार', 'शुकरार', 'शेनवार'], 'weekdays_short' => ['आयतार', 'सोमार', 'मंगळवार', 'बुधवार', 'बेरेसतार', 'शुकरार', 'शेनवार'], 'weekdays_min' => ['आयतार', 'सोमार', 'मंगळवार', 'बुधवार', 'बेरेसतार', 'शुकरार', 'शेनवार'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['म.पू.', 'म.नं.'], 'year' => ':count वैशाकु', // less reliable 'y' => ':count वैशाकु', // less reliable 'a_year' => ':count वैशाकु', // less reliable 'week' => ':count आदित्यवार', // less reliable 'w' => ':count आदित्यवार', // less reliable 'a_week' => ':count आदित्यवार', // less reliable 'minute' => ':count नोंद', // less reliable 'min' => ':count नोंद', // less reliable 'a_minute' => ':count नोंद', // less reliable 'second' => ':count तेंको', // less reliable 's' => ':count तेंको', // less reliable 'a_second' => ':count तेंको', // less reliable 'month' => ':count मैनो', 'm' => ':count मैनो', 'a_month' => ':count मैनो', 'day' => ':count दिवसु', 'd' => ':count दिवसु', 'a_day' => ':count दिवसु', 'hour' => ':count घंते', 'h' => ':count घंते', 'a_hour' => ':count घंते', ]); PKgt[B` OOCarbon/Lang/hsb.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/hsb_DE.php'; PKgt[V Carbon/Lang/ks_IN@devanagari.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - ks-gnome-trans-commits@lists.code.indlinux.net */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'M/D/YY', ], 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], 'weekdays' => ['आथवार', 'चॅ़दुरवार', 'बोमवार', 'ब्वदवार', 'ब्रसवार', 'शोकुरवार', 'बटुवार'], 'weekdays_short' => ['आथ ', 'चॅ़दुर', 'बोम', 'ब्वद', 'ब्रस', 'शोकुर', 'बटु'], 'weekdays_min' => ['आथ ', 'चॅ़दुर', 'बोम', 'ब्वद', 'ब्रस', 'शोकुर', 'बटु'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], ]); PKgt[w}Carbon/Lang/yue_HK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/zh_HK.php', [ 'formats' => [ 'L' => 'YYYY年MM月DD日 dddd', ], 'months' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'meridiem' => ['上午', '下午'], ]); PKgt[?Ej  Carbon/Lang/en_MO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[  Carbon/Lang/mr_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/mr.php'; PKgt[ffffCarbon/Lang/ta.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - François B * - JD Isaacks * - Satheez */ return [ 'year' => ':count வருடம்|:count ஆண்டுகள்', 'a_year' => 'ஒரு வருடம்|:count ஆண்டுகள்', 'y' => ':count வருட.|:count ஆண்.', 'month' => ':count மாதம்|:count மாதங்கள்', 'a_month' => 'ஒரு மாதம்|:count மாதங்கள்', 'm' => ':count மாத.', 'week' => ':count வாரம்|:count வாரங்கள்', 'a_week' => 'ஒரு வாரம்|:count வாரங்கள்', 'w' => ':count வார.', 'day' => ':count நாள்|:count நாட்கள்', 'a_day' => 'ஒரு நாள்|:count நாட்கள்', 'd' => ':count நாள்|:count நாட்.', 'hour' => ':count மணி நேரம்|:count மணி நேரம்', 'a_hour' => 'ஒரு மணி நேரம்|:count மணி நேரம்', 'h' => ':count மணி.', 'minute' => ':count நிமிடம்|:count நிமிடங்கள்', 'a_minute' => 'ஒரு நிமிடம்|:count நிமிடங்கள்', 'min' => ':count நிமி.', 'second' => ':count சில விநாடிகள்|:count விநாடிகள்', 'a_second' => 'ஒரு சில விநாடிகள்|:count விநாடிகள்', 's' => ':count விநா.', 'ago' => ':time முன்', 'from_now' => ':time இல்', 'before' => ':time முன்', 'after' => ':time பின்', 'diff_now' => 'இப்போது', 'diff_today' => 'இன்று', 'diff_yesterday' => 'நேற்று', 'diff_tomorrow' => 'நாளை', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, HH:mm', 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', ], 'calendar' => [ 'sameDay' => '[இன்று] LT', 'nextDay' => '[நாளை] LT', 'nextWeek' => 'dddd, LT', 'lastDay' => '[நேற்று] LT', 'lastWeek' => '[கடந்த வாரம்] dddd, LT', 'sameElse' => 'L', ], 'ordinal' => ':numberவது', 'meridiem' => function ($hour) { if ($hour < 2) { return ' யாமம்'; } if ($hour < 6) { return ' வைகறை'; } if ($hour < 10) { return ' காலை'; } if ($hour < 14) { return ' நண்பகல்'; } if ($hour < 18) { return ' எற்பாடு'; } if ($hour < 22) { return ' மாலை'; } return ' யாமம்'; }, 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டெம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], 'months_short' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டெம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], 'weekdays' => ['ஞாயிற்றுக்கிழமை', 'திங்கட்கிழமை', 'செவ்வாய்கிழமை', 'புதன்கிழமை', 'வியாழக்கிழமை', 'வெள்ளிக்கிழமை', 'சனிக்கிழமை'], 'weekdays_short' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' மற்றும் '], 'weekend' => [0, 0], ]; PKgt[ Carbon/Lang/pa_Guru.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/pa.php', [ 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'D/M/yy', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY, h:mm a', 'LLLL' => 'dddd, D MMMM YYYY, h:mm a', ], 'months' => ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'], 'months_short' => ['ਜਨ', 'ਫ਼ਰ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾ', 'ਅਗ', 'ਸਤੰ', 'ਅਕਤੂ', 'ਨਵੰ', 'ਦਸੰ'], 'weekdays' => ['ਐਤਵਾਰ', 'ਸੋਮਵਾਰ', 'ਮੰਗਲਵਾਰ', 'ਬੁੱਧਵਾਰ', 'ਵੀਰਵਾਰ', 'ਸ਼ੁੱਕਰਵਾਰ', 'ਸ਼ਨਿੱਚਰਵਾਰ'], 'weekdays_short' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁੱਧ', 'ਵੀਰ', 'ਸ਼ੁੱਕਰ', 'ਸ਼ਨਿੱਚਰ'], 'weekdays_min' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗ', 'ਬੁੱਧ', 'ਵੀਰ', 'ਸ਼ੁੱਕ', 'ਸ਼ਨਿੱ'], 'weekend' => [0, 0], ]); PKgt[r  Carbon/Lang/tg_TJ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/tg.php'; PKgt[IJjCarbon/Lang/uz_UZ@cyrillic.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Mashrab Kuvatov Mashrab Kuvatov, Pablo Saratxaga kmashrab@uni-bremen.de, pablo@mandrakesoft.com */ return array_replace_recursive(require __DIR__.'/uz.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['Январ', 'Феврал', 'Март', 'Апрел', 'Май', 'Июн', 'Июл', 'Август', 'Сентябр', 'Октябр', 'Ноябр', 'Декабр'], 'months_short' => ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'], 'weekdays' => ['Якшанба', 'Душанба', 'Сешанба', 'Чоршанба', 'Пайшанба', 'Жума', 'Шанба'], 'weekdays_short' => ['Якш', 'Душ', 'Сеш', 'Чор', 'Пай', 'Жум', 'Шан'], 'weekdays_min' => ['Якш', 'Душ', 'Сеш', 'Чор', 'Пай', 'Жум', 'Шан'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[pGGCarbon/Lang/en_GI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[NU&Carbon/Lang/ar_AE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'DD MMM, YYYY', ], 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت '], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); PKgt[^dLCarbon/Lang/zh_MO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - tarunvelli * - Eddie * - KID * - shankesgk2 */ return array_replace_recursive(require __DIR__.'/zh_Hant.php', [ 'after' => ':time后', ]); PKgt[5 Carbon/Lang/fo_DK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fo.php', [ 'formats' => [ 'L' => 'DD.MM.yy', 'LL' => 'DD.MM.YYYY', 'LLL' => 'D. MMMM YYYY, HH:mm', 'LLLL' => 'dddd, D. MMMM YYYY, HH:mm', ], ]); PKgt[Ci  Carbon/Lang/lv_LV.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/lv.php'; PKgt[NNCarbon/Lang/bi.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/bi_VU.php'; PKgt[*[Carbon/Lang/hu.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Adam Brunner * - Brett Johnson * - balping */ use Carbon\CarbonInterface; $huWeekEndings = ['vasárnap', 'hétfőn', 'kedden', 'szerdán', 'csütörtökön', 'pénteken', 'szombaton']; return [ 'year' => ':count év', 'y' => ':count év', 'month' => ':count hónap', 'm' => ':count hónap', 'week' => ':count hét', 'w' => ':count hét', 'day' => ':count nap', 'd' => ':count nap', 'hour' => ':count óra', 'h' => ':count óra', 'minute' => ':count perc', 'min' => ':count perc', 'second' => ':count másodperc', 's' => ':count másodperc', 'ago' => ':time', 'from_now' => ':time múlva', 'after' => ':time később', 'before' => ':time korábban', 'year_ago' => ':count éve', 'y_ago' => ':count éve', 'month_ago' => ':count hónapja', 'm_ago' => ':count hónapja', 'week_ago' => ':count hete', 'w_ago' => ':count hete', 'day_ago' => ':count napja', 'd_ago' => ':count napja', 'hour_ago' => ':count órája', 'h_ago' => ':count órája', 'minute_ago' => ':count perce', 'min_ago' => ':count perce', 'second_ago' => ':count másodperce', 's_ago' => ':count másodperce', 'year_after' => ':count évvel', 'y_after' => ':count évvel', 'month_after' => ':count hónappal', 'm_after' => ':count hónappal', 'week_after' => ':count héttel', 'w_after' => ':count héttel', 'day_after' => ':count nappal', 'd_after' => ':count nappal', 'hour_after' => ':count órával', 'h_after' => ':count órával', 'minute_after' => ':count perccel', 'min_after' => ':count perccel', 'second_after' => ':count másodperccel', 's_after' => ':count másodperccel', 'year_before' => ':count évvel', 'y_before' => ':count évvel', 'month_before' => ':count hónappal', 'm_before' => ':count hónappal', 'week_before' => ':count héttel', 'w_before' => ':count héttel', 'day_before' => ':count nappal', 'd_before' => ':count nappal', 'hour_before' => ':count órával', 'h_before' => ':count órával', 'minute_before' => ':count perccel', 'min_before' => ':count perccel', 'second_before' => ':count másodperccel', 's_before' => ':count másodperccel', 'months' => ['január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december'], 'months_short' => ['jan.', 'feb.', 'márc.', 'ápr.', 'máj.', 'jún.', 'júl.', 'aug.', 'szept.', 'okt.', 'nov.', 'dec.'], 'weekdays' => ['vasárnap', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat'], 'weekdays_short' => ['vas', 'hét', 'kedd', 'sze', 'csüt', 'pén', 'szo'], 'weekdays_min' => ['v', 'h', 'k', 'sze', 'cs', 'p', 'sz'], 'ordinal' => ':number.', 'diff_now' => 'most', 'diff_today' => 'ma', 'diff_yesterday' => 'tegnap', 'diff_tomorrow' => 'holnap', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'YYYY.MM.DD.', 'LL' => 'YYYY. MMMM D.', 'LLL' => 'YYYY. MMMM D. H:mm', 'LLLL' => 'YYYY. MMMM D., dddd H:mm', ], 'calendar' => [ 'sameDay' => '[ma] LT[-kor]', 'nextDay' => '[holnap] LT[-kor]', 'nextWeek' => function (CarbonInterface $date) use ($huWeekEndings) { return '['.$huWeekEndings[$date->dayOfWeek].'] LT[-kor]'; }, 'lastDay' => '[tegnap] LT[-kor]', 'lastWeek' => function (CarbonInterface $date) use ($huWeekEndings) { return '[múlt '.$huWeekEndings[$date->dayOfWeek].'] LT[-kor]'; }, 'sameElse' => 'L', ], 'meridiem' => ['DE', 'DU'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' és '], ]; PKgt[dCarbon/Lang/es_GT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[߬Carbon/Lang/ts_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Sunguti', 'Nyenyenyani', 'Nyenyankulu', 'Dzivamisoko', 'Mudyaxihi', 'Khotavuxika', 'Mawuwani', 'Mhawuri', 'Ndzhati', 'Nhlangula', 'Hukuri', 'N\'wendzamhala'], 'months_short' => ['Sun', 'Yan', 'Kul', 'Dzi', 'Mud', 'Kho', 'Maw', 'Mha', 'Ndz', 'Nhl', 'Huk', 'N\'w'], 'weekdays' => ['Sonto', 'Musumbhunuku', 'Ravumbirhi', 'Ravunharhu', 'Ravumune', 'Ravuntlhanu', 'Mugqivela'], 'weekdays_short' => ['Son', 'Mus', 'Bir', 'Har', 'Ne', 'Tlh', 'Mug'], 'weekdays_min' => ['Son', 'Mus', 'Bir', 'Har', 'Ne', 'Tlh', 'Mug'], 'day_of_first_week_of_year' => 1, 'year' => 'malembe ya :count', 'y' => 'malembe ya :count', 'a_year' => 'malembe ya :count', 'month' => 'tin’hweti ta :count', 'm' => 'tin’hweti ta :count', 'a_month' => 'tin’hweti ta :count', 'week' => 'mavhiki ya :count', 'w' => 'mavhiki ya :count', 'a_week' => 'mavhiki ya :count', 'day' => 'masiku :count', 'd' => 'masiku :count', 'a_day' => 'masiku :count', 'hour' => 'tiawara ta :count', 'h' => 'tiawara ta :count', 'a_hour' => 'tiawara ta :count', 'minute' => 'timinete ta :count', 'min' => 'timinete ta :count', 'a_minute' => 'timinete ta :count', 'second' => 'tisekoni ta :count', 's' => 'tisekoni ta :count', 'a_second' => 'tisekoni ta :count', ]); PKgt[]FFCarbon/Lang/af_NA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/af.php', [ 'meridiem' => ['v', 'n'], 'weekdays' => ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], 'weekdays_short' => ['So.', 'Ma.', 'Di.', 'Wo.', 'Do.', 'Vr.', 'Sa.'], 'weekdays_min' => ['So.', 'Ma.', 'Di.', 'Wo.', 'Do.', 'Vr.', 'Sa.'], 'months' => ['Januarie', 'Februarie', 'Maart', 'April', 'Mei', 'Junie', 'Julie', 'Augustus', 'September', 'Oktober', 'November', 'Desember'], 'months_short' => ['Jan.', 'Feb.', 'Mrt.', 'Apr.', 'Mei', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Okt.', 'Nov.', 'Des.'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-DD', 'LL' => 'DD MMM YYYY', 'LLL' => 'DD MMMM YYYY HH:mm', 'LLLL' => 'dddd, DD MMMM YYYY HH:mm', ], ]); PKgt[%lCarbon/Lang/raj_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - meghrajsuthar03@gmail.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर'], 'months_short' => ['जन', 'फर', 'मार्च', 'अप्रै', 'मई', 'जून', 'जुल', 'अग', 'सित', 'अक्टू', 'नव', 'दिस'], 'weekdays' => ['रविवार', 'सोमवार', 'मंगल्लवार', 'बुधवार', 'बृहस्पतिवार', 'शुक्रवार', 'शनिवार'], 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], 'year' => ':count आंहू', // less reliable 'y' => ':count आंहू', // less reliable 'a_year' => ':count आंहू', // less reliable 'month' => ':count सूरज', // less reliable 'm' => ':count सूरज', // less reliable 'a_month' => ':count सूरज', // less reliable 'week' => ':count निवाज', // less reliable 'w' => ':count निवाज', // less reliable 'a_week' => ':count निवाज', // less reliable 'day' => ':count अेक', // less reliable 'd' => ':count अेक', // less reliable 'a_day' => ':count अेक', // less reliable 'hour' => ':count दुनियांण', // less reliable 'h' => ':count दुनियांण', // less reliable 'a_hour' => ':count दुनियांण', // less reliable ]); PKgt[ECarbon/Lang/the_NP.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Chitwanix OS Development info@chitwanix.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'dddd DD MMM YYYY', ], 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], 'weekdays' => ['आइतबार', 'सोमबार', 'मंगलबार', 'बुधबार', 'बिहिबार', 'शुक्रबार', 'शनिबार'], 'weekdays_short' => ['आइत', 'सोम', 'मंगल', 'बुध', 'बिहि', 'शुक्र', 'शनि'], 'weekdays_min' => ['आइत', 'सोम', 'मंगल', 'बुध', 'बिहि', 'शुक्र', 'शनि'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], ]); PKgt[u\ \ Carbon/Lang/dz_BT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Sherubtse College bug-glibc@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'པསྱི་ལོYYཟལMMཚེསDD', ], 'months' => ['ཟླ་བ་དང་པ་', 'ཟླ་བ་གཉིས་པ་', 'ཟླ་བ་གསུམ་པ་', 'ཟླ་བ་བཞི་པ་', 'ཟླ་བ་ལྔ་ཕ་', 'ཟླ་བ་དྲུག་པ་', 'ཟླ་བ་བདུནཔ་', 'ཟླ་བ་བརྒྱད་པ་', 'ཟླ་བ་དགུ་པ་', 'ཟླ་བ་བཅུ་པ་', 'ཟླ་བ་བཅུ་གཅིག་པ་', 'ཟླ་བ་བཅུ་གཉིས་པ་'], 'months_short' => ['ཟླ་༡', 'ཟླ་༢', 'ཟླ་༣', 'ཟླ་༤', 'ཟླ་༥', 'ཟླ་༦', 'ཟླ་༧', 'ཟླ་༨', 'ཟླ་༩', 'ཟླ་༡༠', 'ཟླ་༡༡', 'ཟླ་༡༢'], 'weekdays' => ['གཟའ་ཟླ་བ་', 'གཟའ་མིག་དམར་', 'གཟའ་ལྷག་ཕ་', 'གཟའ་པུར་བུ་', 'གཟའ་པ་སངས་', 'གཟའ་སྤེན་ཕ་', 'གཟའ་ཉི་མ་'], 'weekdays_short' => ['ཟླ་', 'མིར་', 'ལྷག་', 'པུར་', 'སངས་', 'སྤེན་', 'ཉི་'], 'weekdays_min' => ['ཟླ་', 'མིར་', 'ལྷག་', 'པུར་', 'སངས་', 'སྤེན་', 'ཉི་'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['ངས་ཆ', 'ཕྱི་ཆ'], 'year' => ':count ཆརཔ', // less reliable 'y' => ':count ཆརཔ', // less reliable 'a_year' => ':count ཆརཔ', // less reliable 'month' => ':count ཟླ་བ', // less reliable 'm' => ':count ཟླ་བ', // less reliable 'a_month' => ':count ཟླ་བ', // less reliable 'day' => ':count ཉི', // less reliable 'd' => ':count ཉི', // less reliable 'a_day' => ':count ཉི', // less reliable 'second' => ':count ཆ', // less reliable 's' => ':count ཆ', // less reliable 'a_second' => ':count ཆ', // less reliable ]); PKgt[''x  Carbon/Lang/fr_MQ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[==Carbon/Lang/cs.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - Jakub Tesinsky * - Martin Suja * - Nikos Timiopulos * - Bohuslav Blín * - Tsutomu Kuroda * - tjku * - Lukas Svoboda * - Max Melentiev * - Juanito Fatas * - Akira Matsuda * - Christopher Dell * - Václav Pávek * - CodeSkills * - Tlapi * - newman101 * - Petr Kadlec * - tommaskraus * - Karel Sommer (calvera) */ $za = function ($time) { return 'za '.strtr($time, [ 'hodina' => 'hodinu', 'minuta' => 'minutu', 'sekunda' => 'sekundu', ]); }; $pred = function ($time) { $time = strtr($time, [ 'hodina' => 'hodinou', 'minuta' => 'minutou', 'sekunda' => 'sekundou', ]); $time = preg_replace('/hodiny?(?!\w)/', 'hodinami', $time); $time = preg_replace('/minuty?(?!\w)/', 'minutami', $time); $time = preg_replace('/sekundy?(?!\w)/', 'sekundami', $time); return "před $time"; }; return [ 'year' => ':count rok|:count roky|:count let', 'y' => ':count rok|:count roky|:count let', 'a_year' => 'rok|:count roky|:count let', 'month' => ':count měsíc|:count měsíce|:count měsíců', 'm' => ':count měs.', 'a_month' => 'měsíc|:count měsíce|:count měsíců', 'week' => ':count týden|:count týdny|:count týdnů', 'w' => ':count týd.', 'a_week' => 'týden|:count týdny|:count týdnů', 'day' => ':count den|:count dny|:count dní', 'd' => ':count den|:count dny|:count dní', 'a_day' => 'den|:count dny|:count dní', 'hour' => ':count hodina|:count hodiny|:count hodin', 'h' => ':count hod.', 'a_hour' => 'hodina|:count hodiny|:count hodin', 'minute' => ':count minuta|:count minuty|:count minut', 'min' => ':count min.', 'a_minute' => 'minuta|:count minuty|:count minut', 'second' => ':count sekunda|:count sekundy|:count sekund', 's' => ':count sek.', 'a_second' => 'pár sekund|:count sekundy|:count sekund', 'month_ago' => ':count měsícem|:count měsíci|:count měsíci', 'a_month_ago' => 'měsícem|:count měsíci|:count měsíci', 'day_ago' => ':count dnem|:count dny|:count dny', 'a_day_ago' => 'dnem|:count dny|:count dny', 'week_ago' => ':count týdnem|:count týdny|:count týdny', 'a_week_ago' => 'týdnem|:count týdny|:count týdny', 'year_ago' => ':count rokem|:count roky|:count lety', 'y_ago' => ':count rok.|:count rok.|:count let.', 'a_year_ago' => 'rokem|:count roky|:count lety', 'month_before' => ':count měsícem|:count měsíci|:count měsíci', 'a_month_before' => 'měsícem|:count měsíci|:count měsíci', 'day_before' => ':count dnem|:count dny|:count dny', 'a_day_before' => 'dnem|:count dny|:count dny', 'week_before' => ':count týdnem|:count týdny|:count týdny', 'a_week_before' => 'týdnem|:count týdny|:count týdny', 'year_before' => ':count rokem|:count roky|:count lety', 'y_before' => ':count rok.|:count rok.|:count let.', 'a_year_before' => 'rokem|:count roky|:count lety', 'ago' => $pred, 'from_now' => $za, 'before' => $pred, 'after' => $za, 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'months' => ['ledna', 'února', 'března', 'dubna', 'května', 'června', 'července', 'srpna', 'září', 'října', 'listopadu', 'prosince'], 'months_standalone' => ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'], 'months_short' => ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'], 'weekdays' => ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], 'weekdays_short' => ['ned', 'pon', 'úte', 'stř', 'čtv', 'pát', 'sob'], 'weekdays_min' => ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'], 'list' => [', ', ' a '], 'diff_now' => 'nyní', 'diff_yesterday' => 'včera', 'diff_tomorrow' => 'zítra', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD. MM. YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY HH:mm', 'LLLL' => 'dddd D. MMMM YYYY HH:mm', ], 'meridiem' => ['dopoledne', 'odpoledne'], ]; PKgt[grtCarbon/Lang/lg_UG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Akademe ya Luganda Kizito Birabwa kompyuta@kizito.uklinux.net */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['Janwaliyo', 'Febwaliyo', 'Marisi', 'Apuli', 'Maayi', 'Juuni', 'Julaayi', 'Agusito', 'Sebuttemba', 'Okitobba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apu', 'Maa', 'Juu', 'Jul', 'Agu', 'Seb', 'Oki', 'Nov', 'Des'], 'weekdays' => ['Sabiiti', 'Balaza', 'Lwakubiri', 'Lwakusatu', 'Lwakuna', 'Lwakutaano', 'Lwamukaaga'], 'weekdays_short' => ['Sab', 'Bal', 'Lw2', 'Lw3', 'Lw4', 'Lw5', 'Lw6'], 'weekdays_min' => ['Sab', 'Bal', 'Lw2', 'Lw3', 'Lw4', 'Lw5', 'Lw6'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'month' => ':count njuba', // less reliable 'm' => ':count njuba', // less reliable 'a_month' => ':count njuba', // less reliable 'year' => ':count mwaaka', 'y' => ':count mwaaka', 'a_year' => ':count mwaaka', 'week' => ':count sabbiiti', 'w' => ':count sabbiiti', 'a_week' => ':count sabbiiti', 'day' => ':count lunaku', 'd' => ':count lunaku', 'a_day' => ':count lunaku', 'hour' => 'saawa :count', 'h' => 'saawa :count', 'a_hour' => 'saawa :count', 'minute' => 'ddakiika :count', 'min' => 'ddakiika :count', 'a_minute' => 'ddakiika :count', 'second' => ':count kyʼokubiri', 's' => ':count kyʼokubiri', 'a_second' => ':count kyʼokubiri', ]); PKgt[pGGCarbon/Lang/en_PN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[''x  Carbon/Lang/fr_BL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[U]==Carbon/Lang/byn_ER.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['ልደትሪ', 'ካብኽብቲ', 'ክብላ', 'ፋጅኺሪ', 'ክቢቅሪ', 'ምኪኤል ትጓ̅ኒሪ', 'ኰርኩ', 'ማርያም ትሪ', 'ያኸኒ መሳቅለሪ', 'መተሉ', 'ምኪኤል መሽወሪ', 'ተሕሳስሪ'], 'months_short' => ['ልደት', 'ካብኽ', 'ክብላ', 'ፋጅኺ', 'ክቢቅ', 'ም/ት', 'ኰር', 'ማርያ', 'ያኸኒ', 'መተሉ', 'ም/ም', 'ተሕሳ'], 'weekdays' => ['ሰንበር ቅዳዅ', 'ሰኑ', 'ሰሊጝ', 'ለጓ ወሪ ለብዋ', 'ኣምድ', 'ኣርብ', 'ሰንበር ሽጓዅ'], 'weekdays_short' => ['ሰ/ቅ', 'ሰኑ', 'ሰሊጝ', 'ለጓ', 'ኣምድ', 'ኣርብ', 'ሰ/ሽ'], 'weekdays_min' => ['ሰ/ቅ', 'ሰኑ', 'ሰሊጝ', 'ለጓ', 'ኣምድ', 'ኣርብ', 'ሰ/ሽ'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['ፋዱስ ጃብ', 'ፋዱስ ደምቢ'], ]); PKgt[Z Z Carbon/Lang/sh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ // @codeCoverageIgnoreStart use Symfony\Component\Translation\PluralizationRules; if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { PluralizationRules::set(static function ($number) { return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); }, 'sh'); } // @codeCoverageIgnoreEnd /* * Authors: * - Томица Кораћ * - Enrique Vidal * - Christopher Dell * - dmilisic * - danijel * - Miroslav Matkovic (mikki021) */ return [ 'diff_now' => 'sada', 'diff_yesterday' => 'juče', 'diff_tomorrow' => 'sutra', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'MMMM D, YYYY', 'LLL' => 'DD MMM HH:mm', 'LLLL' => 'MMMM DD, YYYY HH:mm', ], 'year' => ':count godina|:count godine|:count godina', 'y' => ':count g.', 'month' => ':count mesec|:count meseca|:count meseci', 'm' => ':count m.', 'week' => ':count nedelja|:count nedelje|:count nedelja', 'w' => ':count n.', 'day' => ':count dan|:count dana|:count dana', 'd' => ':count d.', 'hour' => ':count sat|:count sata|:count sati', 'h' => ':count č.', 'minute' => ':count minut|:count minuta|:count minuta', 'min' => ':count min.', 'second' => ':count sekund|:count sekunde|:count sekundi', 's' => ':count s.', 'ago' => 'pre :time', 'from_now' => 'za :time', 'after' => 'nakon :time', 'before' => ':time raniјe', 'weekdays' => ['Nedelja', 'Ponedeljak', 'Utorak', 'Sreda', 'Četvrtak', 'Petak', 'Subota'], 'weekdays_short' => ['Ned', 'Pon', 'Uto', 'Sre', 'Čet', 'Pet', 'Sub'], 'weekdays_min' => ['Ned', 'Pon', 'Uto', 'Sre', 'Čet', 'Pet', 'Sub'], 'months' => ['Januar', 'Februar', 'Mart', 'April', 'Maj', 'Jun', 'Jul', 'Avgust', 'Septembar', 'Oktobar', 'Novembar', 'Decembar'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Avg', 'Sep', 'Okt', 'Nov', 'Dec'], 'list' => [', ', ' i '], 'meridiem' => ['pre podne', 'po podne'], ]; PKgt[XlZZCarbon/Lang/ar_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'day_of_first_week_of_year' => 1, ]); PKgt[IICarbon/Lang/bo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - JD Isaacks */ return [ 'year' => '{1}ལོ་གཅིག|]1,Inf[:count ལོ', 'month' => '{1}ཟླ་བ་གཅིག|]1,Inf[:count ཟླ་བ', 'week' => ':count བདུན་ཕྲག', 'day' => '{1}ཉིན་གཅིག|]1,Inf[:count ཉིན་', 'hour' => '{1}ཆུ་ཚོད་གཅིག|]1,Inf[:count ཆུ་ཚོད', 'minute' => '{1}སྐར་མ་གཅིག|]1,Inf[:count སྐར་མ', 'second' => '{1}ལམ་སང|]1,Inf[:count སྐར་ཆ།', 'ago' => ':time སྔན་ལ', 'from_now' => ':time ལ་', 'diff_yesterday' => 'ཁ་སང', 'diff_today' => 'དི་རིང', 'diff_tomorrow' => 'སང་ཉིན', 'formats' => [ 'LT' => 'A h:mm', 'LTS' => 'A h:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, A h:mm', 'LLLL' => 'dddd, D MMMM YYYY, A h:mm', ], 'calendar' => [ 'sameDay' => '[དི་རིང] LT', 'nextDay' => '[སང་ཉིན] LT', 'nextWeek' => '[བདུན་ཕྲག་རྗེས་མ], LT', 'lastDay' => '[ཁ་སང] LT', 'lastWeek' => '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 4) { return 'མཚན་མོ'; } if ($hour < 10) { return 'ཞོགས་ཀས'; } if ($hour < 17) { return 'ཉིན་གུང'; } if ($hour < 20) { return 'དགོང་དག'; } return 'མཚན་མོ'; }, 'months' => ['ཟླ་བ་དང་པོ', 'ཟླ་བ་གཉིས་པ', 'ཟླ་བ་གསུམ་པ', 'ཟླ་བ་བཞི་པ', 'ཟླ་བ་ལྔ་པ', 'ཟླ་བ་དྲུག་པ', 'ཟླ་བ་བདུན་པ', 'ཟླ་བ་བརྒྱད་པ', 'ཟླ་བ་དགུ་པ', 'ཟླ་བ་བཅུ་པ', 'ཟླ་བ་བཅུ་གཅིག་པ', 'ཟླ་བ་བཅུ་གཉིས་པ'], 'months_short' => ['ཟླ་བ་དང་པོ', 'ཟླ་བ་གཉིས་པ', 'ཟླ་བ་གསུམ་པ', 'ཟླ་བ་བཞི་པ', 'ཟླ་བ་ལྔ་པ', 'ཟླ་བ་དྲུག་པ', 'ཟླ་བ་བདུན་པ', 'ཟླ་བ་བརྒྱད་པ', 'ཟླ་བ་དགུ་པ', 'ཟླ་བ་བཅུ་པ', 'ཟླ་བ་བཅུ་གཅིག་པ', 'ཟླ་བ་བཅུ་གཉིས་པ'], 'weekdays' => ['གཟའ་ཉི་མ་', 'གཟའ་ཟླ་བ་', 'གཟའ་མིག་དམར་', 'གཟའ་ལྷག་པ་', 'གཟའ་ཕུར་བུ', 'གཟའ་པ་སངས་', 'གཟའ་སྤེན་པ་'], 'weekdays_short' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ', 'པ་སངས་', 'སྤེན་པ་'], 'weekdays_min' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ', 'པ་སངས་', 'སྤེན་པ་'], 'list' => [', ', ' ཨནད་ '], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'months_standalone' => ['ཟླ་བ་དང་པོ་', 'ཟླ་བ་གཉིས་པ་', 'ཟླ་བ་གསུམ་པ་', 'ཟླ་བ་བཞི་པ་', 'ཟླ་བ་ལྔ་པ་', 'ཟླ་བ་དྲུག་པ་', 'ཟླ་བ་བདུན་པ་', 'ཟླ་བ་བརྒྱད་པ་', 'ཟླ་བ་དགུ་པ་', 'ཟླ་བ་བཅུ་པ་', 'ཟླ་བ་བཅུ་གཅིག་པ་', 'ཟླ་བ་བཅུ་གཉིས་པ་'], ]; PKgt[C))Carbon/Lang/bs_Latn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/bs.php', [ ]); PKgt[b  Carbon/Lang/cs_CZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/cs.php'; PKgt[?Ej  Carbon/Lang/en_WS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[O \\Carbon/Lang/xog.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Munkyo', 'Eigulo'], 'weekdays' => ['Sabiiti', 'Balaza', 'Owokubili', 'Owokusatu', 'Olokuna', 'Olokutaanu', 'Olomukaaga'], 'weekdays_short' => ['Sabi', 'Bala', 'Kubi', 'Kusa', 'Kuna', 'Kuta', 'Muka'], 'weekdays_min' => ['Sabi', 'Bala', 'Kubi', 'Kusa', 'Kuna', 'Kuta', 'Muka'], 'months' => ['Janwaliyo', 'Febwaliyo', 'Marisi', 'Apuli', 'Maayi', 'Juuni', 'Julaayi', 'Agusito', 'Sebuttemba', 'Okitobba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apu', 'Maa', 'Juu', 'Jul', 'Agu', 'Seb', 'Oki', 'Nov', 'Des'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[dCarbon/Lang/es_PA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[~@OOCarbon/Lang/hne.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/hne_IN.php'; PKgt[-  Carbon/Lang/ff_CM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ff.php'; PKgt[BkOOCarbon/Lang/lij.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/lij_IT.php'; PKgt[QJ??Carbon/Lang/tpi_PG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Janueri', 'Februeri', 'Mas', 'Epril', 'Me', 'Jun', 'Julai', 'Ogas', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mas', 'Epr', 'Me', 'Jun', 'Jul', 'Oga', 'Sep', 'Okt', 'Nov', 'Des'], 'weekdays' => ['Sande', 'Mande', 'Tunde', 'Trinde', 'Fonde', 'Fraide', 'Sarere'], 'weekdays_short' => ['San', 'Man', 'Tun', 'Tri', 'Fon', 'Fra', 'Sar'], 'weekdays_min' => ['San', 'Man', 'Tun', 'Tri', 'Fon', 'Fra', 'Sar'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['biknait', 'apinun'], 'year' => 'yia :count', 'y' => 'yia :count', 'a_year' => 'yia :count', 'month' => ':count mun', 'm' => ':count mun', 'a_month' => ':count mun', 'week' => ':count wik', 'w' => ':count wik', 'a_week' => ':count wik', 'day' => ':count de', 'd' => ':count de', 'a_day' => ':count de', 'hour' => ':count aua', 'h' => ':count aua', 'a_hour' => ':count aua', 'minute' => ':count minit', 'min' => ':count minit', 'a_minute' => ':count minit', 'second' => ':count namba tu', 's' => ':count namba tu', 'a_second' => ':count namba tu', ]); PKgt[b  Carbon/Lang/fo_FO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fo.php'; PKgt[  Carbon/Lang/shi_Tfng.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/shi.php'; PKgt[Ӿ6Carbon/Lang/zh_Hans_HK.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/zh_Hans.php'; PKgt[ Carbon/Lang/tlh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Serhan Apaydın * - Dominika */ return [ 'year' => '{1}wa’ DIS|:count DIS', 'month' => '{1}wa’ jar|:count jar', 'week' => '{1}wa’ hogh|:count hogh', 'day' => '{1}wa’ jaj|:count jaj', 'hour' => '{1}wa’ rep|:count rep', 'minute' => '{1}wa’ tup|:count tup', 'second' => '{1}puS lup|:count lup', 'ago' => function ($time) { $output = strtr($time, [ 'jaj' => 'Hu’', 'jar' => 'wen', 'DIS' => 'ben', ]); return $output === $time ? "$time ret" : $output; }, 'from_now' => function ($time) { $output = strtr($time, [ 'jaj' => 'leS', 'jar' => 'waQ', 'DIS' => 'nem', ]); return $output === $time ? "$time pIq" : $output; }, 'diff_yesterday' => 'wa’Hu’', 'diff_today' => 'DaHjaj', 'diff_tomorrow' => 'wa’leS', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[DaHjaj] LT', 'nextDay' => '[wa’leS] LT', 'nextWeek' => 'LLL', 'lastDay' => '[wa’Hu’] LT', 'lastWeek' => 'LLL', 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['tera’ jar wa’', 'tera’ jar cha’', 'tera’ jar wej', 'tera’ jar loS', 'tera’ jar vagh', 'tera’ jar jav', 'tera’ jar Soch', 'tera’ jar chorgh', 'tera’ jar Hut', 'tera’ jar wa’maH', 'tera’ jar wa’maH wa’', 'tera’ jar wa’maH cha’'], 'months_short' => ['jar wa’', 'jar cha’', 'jar wej', 'jar loS', 'jar vagh', 'jar jav', 'jar Soch', 'jar chorgh', 'jar Hut', 'jar wa’maH', 'jar wa’maH wa’', 'jar wa’maH cha’'], 'weekdays' => ['lojmItjaj', 'DaSjaj', 'povjaj', 'ghItlhjaj', 'loghjaj', 'buqjaj', 'ghInjaj'], 'weekdays_short' => ['lojmItjaj', 'DaSjaj', 'povjaj', 'ghItlhjaj', 'loghjaj', 'buqjaj', 'ghInjaj'], 'weekdays_min' => ['lojmItjaj', 'DaSjaj', 'povjaj', 'ghItlhjaj', 'loghjaj', 'buqjaj', 'ghInjaj'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' ’ej '], ]; PKgt[9IICarbon/Lang/rn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Z.MU.', 'Z.MW.'], 'weekdays' => ['Ku w’indwi', 'Ku wa mbere', 'Ku wa kabiri', 'Ku wa gatatu', 'Ku wa kane', 'Ku wa gatanu', 'Ku wa gatandatu'], 'weekdays_short' => ['cu.', 'mbe.', 'kab.', 'gtu.', 'kan.', 'gnu.', 'gnd.'], 'weekdays_min' => ['cu.', 'mbe.', 'kab.', 'gtu.', 'kan.', 'gnu.', 'gnd.'], 'months' => ['Nzero', 'Ruhuhuma', 'Ntwarante', 'Ndamukiza', 'Rusama', 'Ruheshi', 'Mukakaro', 'Nyandagaro', 'Nyakanga', 'Gitugutu', 'Munyonyo', 'Kigarama'], 'months_short' => ['Mut.', 'Gas.', 'Wer.', 'Mat.', 'Gic.', 'Kam.', 'Nya.', 'Kan.', 'Nze.', 'Ukw.', 'Ugu.', 'Uku.'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'year' => 'imyaka :count', 'y' => 'imyaka :count', 'a_year' => 'imyaka :count', 'month' => 'amezi :count', 'm' => 'amezi :count', 'a_month' => 'amezi :count', 'week' => 'indwi :count', 'w' => 'indwi :count', 'a_week' => 'indwi :count', 'day' => 'imisi :count', 'd' => 'imisi :count', 'a_day' => 'imisi :count', 'hour' => 'amasaha :count', 'h' => 'amasaha :count', 'a_hour' => 'amasaha :count', 'minute' => 'iminuta :count', 'min' => 'iminuta :count', 'a_minute' => 'iminuta :count', 'second' => 'inguvu :count', // less reliable 's' => 'inguvu :count', // less reliable 'a_second' => 'inguvu :count', // less reliable ]); PKgt[._Carbon/Lang/sgs_LT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Arnas Udovičius bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY.MM.DD', ], 'months' => ['sausė', 'vasarė', 'kuova', 'balondė', 'gegožės', 'bėrželė', 'lëpas', 'rogpjūtė', 'siejės', 'spalė', 'lapkrėstė', 'grůdė'], 'months_short' => ['Sau', 'Vas', 'Kuo', 'Bal', 'Geg', 'Bėr', 'Lëp', 'Rgp', 'Sie', 'Spa', 'Lap', 'Grd'], 'weekdays' => ['nedielės dëna', 'panedielis', 'oterninks', 'sereda', 'četvergs', 'petnīčė', 'sobata'], 'weekdays_short' => ['Nd', 'Pn', 'Ot', 'Sr', 'Čt', 'Pt', 'Sb'], 'weekdays_min' => ['Nd', 'Pn', 'Ot', 'Sr', 'Čt', 'Pt', 'Sb'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'minute' => ':count mažos', // less reliable 'min' => ':count mažos', // less reliable 'a_minute' => ':count mažos', // less reliable 'year' => ':count metā', 'y' => ':count metā', 'a_year' => ':count metā', 'month' => ':count mienou', 'm' => ':count mienou', 'a_month' => ':count mienou', 'week' => ':count nedielė', 'w' => ':count nedielė', 'a_week' => ':count nedielė', 'day' => ':count dīna', 'd' => ':count dīna', 'a_day' => ':count dīna', 'hour' => ':count adīna', 'h' => ':count adīna', 'a_hour' => ':count adīna', 'second' => ':count Sekondė', 's' => ':count Sekondė', 'a_second' => ':count Sekondė', ]); PKgt[MCarbon/Lang/ve_ZA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Phando', 'Luhuhi', 'Ṱhafamuhwe', 'Lambamai', 'Shundunthule', 'Fulwi', 'Fulwana', 'Ṱhangule', 'Khubvumedzi', 'Tshimedzi', 'Ḽara', 'Nyendavhusiku'], 'months_short' => ['Pha', 'Luh', 'Fam', 'Lam', 'Shu', 'Lwi', 'Lwa', 'Ngu', 'Khu', 'Tsh', 'Ḽar', 'Nye'], 'weekdays' => ['Swondaha', 'Musumbuluwo', 'Ḽavhuvhili', 'Ḽavhuraru', 'Ḽavhuṋa', 'Ḽavhuṱanu', 'Mugivhela'], 'weekdays_short' => ['Swo', 'Mus', 'Vhi', 'Rar', 'ṋa', 'Ṱan', 'Mug'], 'weekdays_min' => ['Swo', 'Mus', 'Vhi', 'Rar', 'ṋa', 'Ṱan', 'Mug'], 'day_of_first_week_of_year' => 1, // Too unreliable /* 'day' => ':count vhege', // less reliable 'd' => ':count vhege', // less reliable 'a_day' => ':count vhege', // less reliable 'hour' => ':count watshi', // less reliable 'h' => ':count watshi', // less reliable 'a_hour' => ':count watshi', // less reliable 'minute' => ':count watshi', // less reliable 'min' => ':count watshi', // less reliable 'a_minute' => ':count watshi', // less reliable 'second' => ':count Mu', // less reliable 's' => ':count Mu', // less reliable 'a_second' => ':count Mu', // less reliable 'week' => ':count vhege', 'w' => ':count vhege', 'a_week' => ':count vhege', */ ]); PKgt[Z)__Carbon/Lang/de_DE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org */ return require __DIR__.'/de.php'; PKgt[\Carbon/Lang/mas.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Ɛnkakɛnyá', 'Ɛndámâ'], 'weekdays' => ['Jumapílí', 'Jumatátu', 'Jumane', 'Jumatánɔ', 'Alaámisi', 'Jumáa', 'Jumamósi'], 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'months' => ['Oladalʉ́', 'Arát', 'Ɔɛnɨ́ɔɨŋɔk', 'Olodoyíóríê inkókúâ', 'Oloilépūnyīē inkókúâ', 'Kújúɔrɔk', 'Mórusásin', 'Ɔlɔ́ɨ́bɔ́rárɛ', 'Kúshîn', 'Olgísan', 'Pʉshʉ́ka', 'Ntʉ́ŋʉ́s'], 'months_short' => ['Dal', 'Ará', 'Ɔɛn', 'Doy', 'Lép', 'Rok', 'Sás', 'Bɔ́r', 'Kús', 'Gís', 'Shʉ́', 'Ntʉ́'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'year' => ':count olameyu', // less reliable 'y' => ':count olameyu', // less reliable 'a_year' => ':count olameyu', // less reliable 'week' => ':count engolongeare orwiki', // less reliable 'w' => ':count engolongeare orwiki', // less reliable 'a_week' => ':count engolongeare orwiki', // less reliable 'hour' => ':count esahabu', // less reliable 'h' => ':count esahabu', // less reliable 'a_hour' => ':count esahabu', // less reliable 'second' => ':count are', // less reliable 's' => ':count are', // less reliable 'a_second' => ':count are', // less reliable 'month' => ':count olapa', 'm' => ':count olapa', 'a_month' => ':count olapa', 'day' => ':count enkolongʼ', 'd' => ':count enkolongʼ', 'a_day' => ':count enkolongʼ', ]); PKgt[}  Carbon/Lang/yo_NG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/yo.php'; PKgt[4͠Carbon/Lang/es_UY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'setiembre', 'octubre', 'noviembre', 'diciembre'], 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'set', 'oct', 'nov', 'dic'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[>ڰ Carbon/Lang/hi.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - abhimanyu003 * - Josh Soref * - JD Isaacks */ return [ 'year' => 'एक वर्ष|:count वर्ष', 'y' => '1 वर्ष|:count वर्षों', 'month' => 'एक महीने|:count महीने', 'm' => '1 माह|:count महीने', 'week' => '1 सप्ताह|:count सप्ताह', 'w' => '1 सप्ताह|:count सप्ताह', 'day' => 'एक दिन|:count दिन', 'd' => '1 दिन|:count दिनों', 'hour' => 'एक घंटा|:count घंटे', 'h' => '1 घंटा|:count घंटे', 'minute' => 'एक मिनट|:count मिनट', 'min' => '1 मिनट|:count मिनटों', 'second' => 'कुछ ही क्षण|:count सेकंड', 's' => '1 सेकंड|:count सेकंड', 'ago' => ':time पहले', 'from_now' => ':time में', 'after' => ':time के बाद', 'before' => ':time के पहले', 'diff_now' => 'अब', 'diff_today' => 'आज', 'diff_yesterday' => 'कल', 'diff_tomorrow' => 'कल', 'formats' => [ 'LT' => 'A h:mm बजे', 'LTS' => 'A h:mm:ss बजे', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, A h:mm बजे', 'LLLL' => 'dddd, D MMMM YYYY, A h:mm बजे', ], 'calendar' => [ 'sameDay' => '[आज] LT', 'nextDay' => '[कल] LT', 'nextWeek' => 'dddd, LT', 'lastDay' => '[कल] LT', 'lastWeek' => '[पिछले] dddd, LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 4) { return 'रात'; } if ($hour < 10) { return 'सुबह'; } if ($hour < 17) { return 'दोपहर'; } if ($hour < 20) { return 'शाम'; } return 'रात'; }, 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], 'months_short' => ['जन.', 'फ़र.', 'मार्च', 'अप्रै.', 'मई', 'जून', 'जुल.', 'अग.', 'सित.', 'अक्टू.', 'नव.', 'दिस.'], 'weekdays' => ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरूवार', 'शुक्रवार', 'शनिवार'], 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरू', 'शुक्र', 'शनि'], 'weekdays_min' => ['र', 'सो', 'मं', 'बु', 'गु', 'शु', 'श'], 'list' => [', ', ' और '], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'weekend' => [0, 0], ]; PKgt[ ))Carbon/Lang/jgo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ ]); PKgt[ZO  Carbon/Lang/vai_Vaii.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/vai.php'; PKgt[}zOOCarbon/Lang/om_KE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/om.php', [ 'day_of_first_week_of_year' => 0, ]); PKgt[Tr  Carbon/Lang/nds_NL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandrakesoft.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['Jaunuwoa', 'Februwoa', 'Moaz', 'Aprell', 'Mai', 'Juni', 'Juli', 'August', 'Septamba', 'Oktoba', 'Nowamba', 'Dezamba'], 'months_short' => ['Jan', 'Feb', 'Moz', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Now', 'Dez'], 'weekdays' => ['Sinndag', 'Mondag', 'Dingsdag', 'Meddwäakj', 'Donnadag', 'Friedag', 'Sinnowend'], 'weekdays_short' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], 'weekdays_min' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[ACarbon/Lang/mzn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fa.php', [ 'months' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], 'months_short' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], 'first_day_of_week' => 6, 'weekend' => [5, 5], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-dd', 'LL' => 'YYYY MMM D', 'LLL' => 'YYYY MMMM D HH:mm', 'LLLL' => 'YYYY MMMM D, dddd HH:mm', ], ]); PKgt[dCarbon/Lang/es_AR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[l  Carbon/Lang/cv_RU.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/cv.php'; PKgt[Carbon/Lang/ayc_PE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - runasimipi.org libc-alpha@sourceware.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['inïru', 'phiwriru', 'marsu', 'awrila', 'mayu', 'junyu', 'julyu', 'awustu', 'sitimri', 'uktuwri', 'nuwimri', 'risimri'], 'months_short' => ['ini', 'phi', 'mar', 'awr', 'may', 'jun', 'jul', 'awu', 'sit', 'ukt', 'nuw', 'ris'], 'weekdays' => ['tuminku', 'lunisa', 'martisa', 'mirkulisa', 'juywisa', 'wirnisa', 'sawäru'], 'weekdays_short' => ['tum', 'lun', 'mar', 'mir', 'juy', 'wir', 'saw'], 'weekdays_min' => ['tum', 'lun', 'mar', 'mir', 'juy', 'wir', 'saw'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['VM', 'NM'], ]); PKgt[.Carbon/Lang/gv_GB.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Alastair McKinstry bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['Jerrey-geuree', 'Toshiaght-arree', 'Mayrnt', 'Averil', 'Boaldyn', 'Mean-souree', 'Jerrey-souree', 'Luanistyn', 'Mean-fouyir', 'Jerrey-fouyir', 'Mee Houney', 'Mee ny Nollick'], 'months_short' => ['J-guer', 'T-arree', 'Mayrnt', 'Avrril', 'Boaldyn', 'M-souree', 'J-souree', 'Luanistyn', 'M-fouyir', 'J-fouyir', 'M.Houney', 'M.Nollick'], 'weekdays' => ['Jedoonee', 'Jelhein', 'Jemayrt', 'Jercean', 'Jerdein', 'Jeheiney', 'Jesarn'], 'weekdays_short' => ['Jed', 'Jel', 'Jem', 'Jerc', 'Jerd', 'Jeh', 'Jes'], 'weekdays_min' => ['Jed', 'Jel', 'Jem', 'Jerc', 'Jerd', 'Jeh', 'Jes'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count blein', 'y' => ':count blein', 'a_year' => ':count blein', 'month' => ':count mee', 'm' => ':count mee', 'a_month' => ':count mee', 'week' => ':count shiaghtin', 'w' => ':count shiaghtin', 'a_week' => ':count shiaghtin', 'day' => ':count laa', 'd' => ':count laa', 'a_day' => ':count laa', 'hour' => ':count oor', 'h' => ':count oor', 'a_hour' => ':count oor', 'minute' => ':count feer veg', 'min' => ':count feer veg', 'a_minute' => ':count feer veg', 'second' => ':count derrey', 's' => ':count derrey', 'a_second' => ':count derrey', ]); PKgt[\1l  Carbon/Lang/gsw_CH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/gsw.php'; PKgt[Q> Carbon/Lang/kl_GL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Danish Standards Association bug-glibc-locales@gnu.org * - John Eyðstein Johannesen (mashema) */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY HH:mm', 'LLLL' => 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', ], 'months' => ['januaarip', 'februaarip', 'marsip', 'apriilip', 'maajip', 'juunip', 'juulip', 'aggustip', 'septembarip', 'oktobarip', 'novembarip', 'decembarip'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], 'weekdays' => ['sapaat', 'ataasinngorneq', 'marlunngorneq', 'pingasunngorneq', 'sisamanngorneq', 'tallimanngorneq', 'arfininngorneq'], 'weekdays_short' => ['sap', 'ata', 'mar', 'pin', 'sis', 'tal', 'arf'], 'weekdays_min' => ['sap', 'ata', 'mar', 'pin', 'sis', 'tal', 'arf'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'year' => '{1}ukioq :count|{0}:count ukiut|]1,Inf[ukiut :count', 'a_year' => '{1}ukioq|{0}:count ukiut|]1,Inf[ukiut :count', 'y' => '{1}:countyr|{0}:countyrs|]1,Inf[:countyrs', 'month' => '{1}qaammat :count|{0}:count qaammatit|]1,Inf[qaammatit :count', 'a_month' => '{1}qaammat|{0}:count qaammatit|]1,Inf[qaammatit :count', 'm' => '{1}:countmo|{0}:countmos|]1,Inf[:countmos', 'week' => '{1}:count sap. ak.|{0}:count sap. ak.|]1,Inf[:count sap. ak.', 'a_week' => '{1}a sap. ak.|{0}:count sap. ak.|]1,Inf[:count sap. ak.', 'w' => ':countw', 'day' => '{1}:count ulloq|{0}:count ullut|]1,Inf[:count ullut', 'a_day' => '{1}a ulloq|{0}:count ullut|]1,Inf[:count ullut', 'd' => ':countd', 'hour' => '{1}:count tiimi|{0}:count tiimit|]1,Inf[:count tiimit', 'a_hour' => '{1}tiimi|{0}:count tiimit|]1,Inf[:count tiimit', 'h' => ':counth', 'minute' => '{1}:count minutsi|{0}:count minutsit|]1,Inf[:count minutsit', 'a_minute' => '{1}a minutsi|{0}:count minutsit|]1,Inf[:count minutsit', 'min' => ':countm', 'second' => '{1}:count sikunti|{0}:count sikuntit|]1,Inf[:count sikuntit', 'a_second' => '{1}sikunti|{0}:count sikuntit|]1,Inf[:count sikuntit', 's' => ':counts', 'ago' => ':time matuma siorna', ]); PKgt[''x  Carbon/Lang/fr_RW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[4yyCarbon/Lang/pl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Wacław Jacek * - François B * - Tim Fish * - Serhan Apaydın * - Massimiliano Caniparoli * - JD Isaacks * - Jakub Szwacz * - Jan * - Paul * - damlys * - Marek (marast78) * - Peter (UnrulyNatives) * - Qrzysio * - Jan (aso824) * - diverpl */ use Carbon\CarbonInterface; return [ 'year' => ':count rok|:count lata|:count lat', 'a_year' => 'rok|:count lata|:count lat', 'y' => ':count r|:count l|:count l', 'month' => ':count miesiąc|:count miesiące|:count miesięcy', 'a_month' => 'miesiąc|:count miesiące|:count miesięcy', 'm' => ':count mies.', 'week' => ':count tydzień|:count tygodnie|:count tygodni', 'a_week' => 'tydzień|:count tygodnie|:count tygodni', 'w' => ':count tyg.', 'day' => ':count dzień|:count dni|:count dni', 'a_day' => 'dzień|:count dni|:count dni', 'd' => ':count d', 'hour' => ':count godzina|:count godziny|:count godzin', 'a_hour' => 'godzina|:count godziny|:count godzin', 'h' => ':count godz.', 'minute' => ':count minuta|:count minuty|:count minut', 'a_minute' => 'minuta|:count minuty|:count minut', 'min' => ':count min', 'second' => ':count sekunda|:count sekundy|:count sekund', 'a_second' => '{1}kilka sekund|:count sekunda|:count sekundy|:count sekund', 's' => ':count sek.', 'ago' => ':time temu', 'from_now' => static function ($time) { return 'za '.strtr($time, [ 'godzina' => 'godzinę', 'minuta' => 'minutę', 'sekunda' => 'sekundę', ]); }, 'after' => ':time po', 'before' => ':time przed', 'diff_now' => 'teraz', 'diff_today' => 'Dziś', 'diff_today_regexp' => 'Dziś(?:\\s+o)?', 'diff_yesterday' => 'wczoraj', 'diff_yesterday_regexp' => 'Wczoraj(?:\\s+o)?', 'diff_tomorrow' => 'jutro', 'diff_tomorrow_regexp' => 'Jutro(?:\\s+o)?', 'diff_before_yesterday' => 'przedwczoraj', 'diff_after_tomorrow' => 'pojutrze', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Dziś o] LT', 'nextDay' => '[Jutro o] LT', 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[W niedzielę o] LT'; case 2: return '[We wtorek o] LT'; case 3: return '[W środę o] LT'; case 6: return '[W sobotę o] LT'; default: return '[W] dddd [o] LT'; } }, 'lastDay' => '[Wczoraj o] LT', 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[W zeszłą niedzielę o] LT'; case 3: return '[W zeszłą środę o] LT'; case 6: return '[W zeszłą sobotę o] LT'; default: return '[W zeszły] dddd [o] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['stycznia', 'lutego', 'marca', 'kwietnia', 'maja', 'czerwca', 'lipca', 'sierpnia', 'września', 'października', 'listopada', 'grudnia'], 'months_standalone' => ['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'], 'months_short' => ['sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru'], 'months_regexp' => '/(DD?o?\.?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', 'weekdays' => ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'], 'weekdays_short' => ['ndz', 'pon', 'wt', 'śr', 'czw', 'pt', 'sob'], 'weekdays_min' => ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' i '], 'meridiem' => ['przed południem', 'po południu'], ]; PKgt[C~sGGCarbon/Lang/pt_MZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/pt.php', [ 'first_day_of_week' => 0, ]); PKgt[m|Carbon/Lang/tet.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Joshua Brooks * - François B */ return [ 'year' => 'tinan :count', 'a_year' => '{1}tinan ida|tinan :count', 'month' => 'fulan :count', 'a_month' => '{1}fulan ida|fulan :count', 'week' => 'semana :count', 'a_week' => '{1}semana ida|semana :count', 'day' => 'loron :count', 'a_day' => '{1}loron ida|loron :count', 'hour' => 'oras :count', 'a_hour' => '{1}oras ida|oras :count', 'minute' => 'minutu :count', 'a_minute' => '{1}minutu ida|minutu :count', 'second' => 'segundu :count', 'a_second' => '{1}segundu balun|segundu :count', 'ago' => ':time liuba', 'from_now' => 'iha :time', 'diff_yesterday' => 'Horiseik', 'diff_yesterday_regexp' => 'Horiseik(?:\\s+iha)?', 'diff_today' => 'Ohin', 'diff_today_regexp' => 'Ohin(?:\\s+iha)?', 'diff_tomorrow' => 'Aban', 'diff_tomorrow_regexp' => 'Aban(?:\\s+iha)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Ohin iha] LT', 'nextDay' => '[Aban iha] LT', 'nextWeek' => 'dddd [iha] LT', 'lastDay' => '[Horiseik iha] LT', 'lastWeek' => 'dddd [semana kotuk] [iha] LT', 'sameElse' => 'L', ], 'ordinal' => ':numberº', 'months' => ['Janeiru', 'Fevereiru', 'Marsu', 'Abril', 'Maiu', 'Juñu', 'Jullu', 'Agustu', 'Setembru', 'Outubru', 'Novembru', 'Dezembru'], 'months_short' => ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'], 'weekdays' => ['Domingu', 'Segunda', 'Tersa', 'Kuarta', 'Kinta', 'Sesta', 'Sabadu'], 'weekdays_short' => ['Dom', 'Seg', 'Ters', 'Kua', 'Kint', 'Sest', 'Sab'], 'weekdays_min' => ['Do', 'Seg', 'Te', 'Ku', 'Ki', 'Ses', 'Sa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]; PKgt[?щCarbon/Lang/sw_KE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kamusi Project Martin Benjamin locales@kamusi.org */ return array_replace_recursive(require __DIR__.'/sw.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], 'weekdays_short' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['asubuhi', 'alasiri'], ]); PKgt[k0 0 Carbon/Lang/ug.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - Tsutomu Kuroda * - yasinn */ return [ 'year' => '{1}'.'بىر يىل'.'|:count '.'يىل', 'month' => '{1}'.'بىر ئاي'.'|:count '.'ئاي', 'week' => '{1}'.'بىر ھەپتە'.'|:count '.'ھەپتە', 'day' => '{1}'.'بىر كۈن'.'|:count '.'كۈن', 'hour' => '{1}'.'بىر سائەت'.'|:count '.'سائەت', 'minute' => '{1}'.'بىر مىنۇت'.'|:count '.'مىنۇت', 'second' => '{1}'.'نەچچە سېكونت'.'|:count '.'سېكونت', 'ago' => ':time بۇرۇن', 'from_now' => ':time كېيىن', 'diff_today' => 'بۈگۈن', 'diff_yesterday' => 'تۆنۈگۈن', 'diff_tomorrow' => 'ئەتە', 'diff_tomorrow_regexp' => 'ئەتە(?:\\s+سائەت)?', 'diff_today_regexp' => 'بۈگۈن(?:\\s+سائەت)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-DD', 'LL' => 'YYYY-يىلىM-ئاينىڭD-كۈنى', 'LLL' => 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', 'LLLL' => 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', ], 'calendar' => [ 'sameDay' => '[بۈگۈن سائەت] LT', 'nextDay' => '[ئەتە سائەت] LT', 'nextWeek' => '[كېلەركى] dddd [سائەت] LT', 'lastDay' => '[تۆنۈگۈن] LT', 'lastWeek' => '[ئالدىنقى] dddd [سائەت] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { switch ($period) { case 'd': case 'D': case 'DDD': return $number.'-كۈنى'; case 'w': case 'W': return $number.'-ھەپتە'; default: return $number; } }, 'meridiem' => function ($hour, $minute) { $time = $hour * 100 + $minute; if ($time < 600) { return 'يېرىم كېچە'; } if ($time < 900) { return 'سەھەر'; } if ($time < 1130) { return 'چۈشتىن بۇرۇن'; } if ($time < 1230) { return 'چۈش'; } if ($time < 1800) { return 'چۈشتىن كېيىن'; } return 'كەچ'; }, 'months' => ['يانۋار', 'فېۋرال', 'مارت', 'ئاپرېل', 'ماي', 'ئىيۇن', 'ئىيۇل', 'ئاۋغۇست', 'سېنتەبىر', 'ئۆكتەبىر', 'نويابىر', 'دېكابىر'], 'months_short' => ['يانۋار', 'فېۋرال', 'مارت', 'ئاپرېل', 'ماي', 'ئىيۇن', 'ئىيۇل', 'ئاۋغۇست', 'سېنتەبىر', 'ئۆكتەبىر', 'نويابىر', 'دېكابىر'], 'weekdays' => ['يەكشەنبە', 'دۈشەنبە', 'سەيشەنبە', 'چارشەنبە', 'پەيشەنبە', 'جۈمە', 'شەنبە'], 'weekdays_short' => ['يە', 'دۈ', 'سە', 'چا', 'پە', 'جۈ', 'شە'], 'weekdays_min' => ['يە', 'دۈ', 'سە', 'چا', 'پە', 'جۈ', 'شە'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' ۋە '], ]; PKgt[pGGCarbon/Lang/en_NA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[pGGCarbon/Lang/en_BI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[CCarbon/Lang/ar_TN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Authors: * - JD Isaacks * - Atef Ben Ali (atefBB) * - Mohamed Sabil (mohamedsabil83) */ $months = [ 'جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان', 'جويلية', 'أوت', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر', ]; return [ 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'ago' => 'منذ :time', 'from_now' => 'في :time', 'after' => 'بعد :time', 'before' => 'قبل :time', 'diff_now' => 'الآن', 'diff_today' => 'اليوم', 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', 'diff_yesterday' => 'أمس', 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', 'diff_tomorrow' => 'غداً', 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', 'diff_before_yesterday' => 'قبل الأمس', 'diff_after_tomorrow' => 'بعد غد', 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), 'period_interval' => 'كل :interval', 'period_start_date' => 'من :date', 'period_end_date' => 'إلى :date', 'months' => $months, 'months_short' => $months, 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'list' => ['، ', ' و '], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[اليوم على الساعة] LT', 'nextDay' => '[غدا على الساعة] LT', 'nextWeek' => 'dddd [على الساعة] LT', 'lastDay' => '[أمس على الساعة] LT', 'lastWeek' => 'dddd [على الساعة] LT', 'sameElse' => 'L', ], 'meridiem' => ['ص', 'م'], 'weekend' => [5, 6], ]; PKgt[n99Carbon/Lang/es_PH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'D/M/yy', 'LL' => 'D MMM YYYY', 'LLL' => 'D [de] MMMM [de] YYYY h:mm a', 'LLLL' => 'dddd, D [de] MMMM [de] YYYY h:mm a', ], ]); PKgt[eoCarbon/Lang/en_ISO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-dd', 'LL' => 'YYYY MMM D', 'LLL' => 'YYYY MMMM D HH:mm', 'LLLL' => 'dddd, YYYY MMMM DD HH:mm', ], ]); PKgt[q a  Carbon/Lang/it_VA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/it.php'; PKgt[j\\Carbon/Lang/vo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY-MM-dd', 'LL' => 'YYYY MMM D', 'LLL' => 'YYYY MMMM D HH:mm', 'LLLL' => 'YYYY MMMM D, dddd HH:mm', ], 'year' => ':count yel', 'y' => ':count yel', 'a_year' => ':count yel', 'month' => ':count mul', 'm' => ':count mul', 'a_month' => ':count mul', 'week' => ':count vig', 'w' => ':count vig', 'a_week' => ':count vig', 'day' => ':count del', 'd' => ':count del', 'a_day' => ':count del', 'hour' => ':count düp', 'h' => ':count düp', 'a_hour' => ':count düp', 'minute' => ':count minut', 'min' => ':count minut', 'a_minute' => ':count minut', 'second' => ':count sekun', 's' => ':count sekun', 'a_second' => ':count sekun', ]); PKgt[8OOCarbon/Lang/gez.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/gez_ER.php'; PKgt[`) Carbon/Lang/km.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kruy Vanna * - Sereysethy Touch * - JD Isaacks * - Sovichet Tep */ return [ 'year' => '{1}មួយឆ្នាំ|]1,Inf[:count ឆ្នាំ', 'y' => ':count ឆ្នាំ', 'month' => '{1}មួយខែ|]1,Inf[:count ខែ', 'm' => ':count ខែ', 'week' => ':count សប្ដាហ៍', 'w' => ':count សប្ដាហ៍', 'day' => '{1}មួយថ្ងៃ|]1,Inf[:count ថ្ងៃ', 'd' => ':count ថ្ងៃ', 'hour' => '{1}មួយម៉ោង|]1,Inf[:count ម៉ោង', 'h' => ':count ម៉ោង', 'minute' => '{1}មួយនាទី|]1,Inf[:count នាទី', 'min' => ':count នាទី', 'second' => '{1}ប៉ុន្មានវិនាទី|]1,Inf[:count វិនាទី', 's' => ':count វិនាទី', 'ago' => ':timeមុន', 'from_now' => ':timeទៀត', 'after' => 'នៅ​ក្រោយ :time', 'before' => 'នៅ​មុន :time', 'diff_now' => 'ឥឡូវ', 'diff_today' => 'ថ្ងៃនេះ', 'diff_today_regexp' => 'ថ្ងៃនេះ(?:\\s+ម៉ោង)?', 'diff_yesterday' => 'ម្សិលមិញ', 'diff_yesterday_regexp' => 'ម្សិលមិញ(?:\\s+ម៉ោង)?', 'diff_tomorrow' => 'ថ្ងៃ​ស្អែក', 'diff_tomorrow_regexp' => 'ស្អែក(?:\\s+ម៉ោង)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[ថ្ងៃនេះ ម៉ោង] LT', 'nextDay' => '[ស្អែក ម៉ោង] LT', 'nextWeek' => 'dddd [ម៉ោង] LT', 'lastDay' => '[ម្សិលមិញ ម៉ោង] LT', 'lastWeek' => 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', 'sameElse' => 'L', ], 'ordinal' => 'ទី:number', 'meridiem' => ['ព្រឹក', 'ល្ងាច'], 'months' => ['មករា', 'កុម្ភៈ', 'មីនា', 'មេសា', 'ឧសភា', 'មិថុនា', 'កក្កដា', 'សីហា', 'កញ្ញា', 'តុលា', 'វិច្ឆិកា', 'ធ្នូ'], 'months_short' => ['មករា', 'កុម្ភៈ', 'មីនា', 'មេសា', 'ឧសភា', 'មិថុនា', 'កក្កដា', 'សីហា', 'កញ្ញា', 'តុលា', 'វិច្ឆិកា', 'ធ្នូ'], 'weekdays' => ['អាទិត្យ', 'ច័ន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'], 'weekdays_short' => ['អា', 'ច', 'អ', 'ព', 'ព្រ', 'សុ', 'ស'], 'weekdays_min' => ['អា', 'ច', 'អ', 'ព', 'ព្រ', 'សុ', 'ស'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', 'និង '], ]; PKgt[ z  Carbon/Lang/ne_NP.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ne.php'; PKgt[qh}}Carbon/Lang/ur_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Red Hat, Pune bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/ur.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'months_short' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], 'weekdays' => ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'سنیچر'], 'weekdays_short' => ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'سنیچر'], 'weekdays_min' => ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'سنیچر'], 'day_of_first_week_of_year' => 1, ]); PKgt[?Ej  Carbon/Lang/en_BS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[OOCarbon/Lang/nan.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/nan_TW.php'; PKgt[.  Carbon/Lang/sv_SE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/sv.php'; PKgt[dCarbon/Lang/tcy_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IndLinux.org, Samsung Electronics Co., Ltd. alexey.merzlyakov@samsung.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['ಜನವರಿ', 'ಫೆಬ್ರುವರಿ', 'ಮಾರ್ಚ್', 'ಏಪ್ರಿಲ್‌‌', 'ಮೇ', 'ಜೂನ್', 'ಜುಲೈ', 'ಆಗಸ್ಟ್', 'ಸೆಪ್ಟೆಂಬರ್‌', 'ಅಕ್ಟೋಬರ್', 'ನವೆಂಬರ್', 'ಡಿಸೆಂಬರ್'], 'months_short' => ['ಜ', 'ಫೆ', 'ಮಾ', 'ಏ', 'ಮೇ', 'ಜೂ', 'ಜು', 'ಆ', 'ಸೆ', 'ಅ', 'ನ', 'ಡಿ'], 'weekdays' => ['ಐಥಾರ', 'ಸೋಮಾರ', 'ಅಂಗರೆ', 'ಬುಧಾರ', 'ಗುರುವಾರ', 'ಶುಕ್ರರ', 'ಶನಿವಾರ'], 'weekdays_short' => ['ಐ', 'ಸೋ', 'ಅಂ', 'ಬು', 'ಗು', 'ಶು', 'ಶ'], 'weekdays_min' => ['ಐ', 'ಸೋ', 'ಅಂ', 'ಬು', 'ಗು', 'ಶು', 'ಶ'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['ಕಾಂಡೆ', 'ಬಯ್ಯ'], 'year' => ':count ನೀರ್', // less reliable 'y' => ':count ನೀರ್', // less reliable 'a_year' => ':count ನೀರ್', // less reliable 'month' => ':count ಮೀನ್', // less reliable 'm' => ':count ಮೀನ್', // less reliable 'a_month' => ':count ಮೀನ್', // less reliable 'day' => ':count ಸುಗ್ಗಿ', // less reliable 'd' => ':count ಸುಗ್ಗಿ', // less reliable 'a_day' => ':count ಸುಗ್ಗಿ', // less reliable ]); PKgt[  Carbon/Lang/my_MM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/my.php'; PKgt[DŽCarbon/Lang/fy_NL.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/fy.php', [ 'formats' => [ 'L' => 'DD-MM-YY', ], 'months' => ['Jannewaris', 'Febrewaris', 'Maart', 'April', 'Maaie', 'Juny', 'July', 'Augustus', 'Septimber', 'Oktober', 'Novimber', 'Desimber'], 'months_short' => ['Jan', 'Feb', 'Mrt', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], 'weekdays' => ['Snein', 'Moandei', 'Tiisdei', 'Woansdei', 'Tongersdei', 'Freed', 'Sneon'], 'weekdays_short' => ['Sn', 'Mo', 'Ti', 'Wo', 'To', 'Fr', 'Sn'], 'weekdays_min' => ['Sn', 'Mo', 'Ti', 'Wo', 'To', 'Fr', 'Sn'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[ ذQ Q Carbon/Lang/nn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Alexander Tømmerås * - Øystein * - JD Isaacks * - Gaute Hvoslef Kvalnes (gaute) */ return [ 'year' => ':count år', 'a_year' => 'eit år|:count år', 'y' => ':count år', 'month' => ':count månad|:count månader', 'a_month' => 'ein månad|:count månader', 'm' => ':count md', 'week' => ':count veke|:count veker', 'a_week' => 'ei veke|:count veker', 'w' => ':countv', 'day' => ':count dag|:count dagar', 'a_day' => 'ein dag|:count dagar', 'd' => ':countd', 'hour' => ':count time|:count timar', 'a_hour' => 'ein time|:count timar', 'h' => ':countt', 'minute' => ':count minutt', 'a_minute' => 'eit minutt|:count minutt', 'min' => ':countm', 'second' => ':count sekund', 'a_second' => 'nokre sekund|:count sekund', 's' => ':counts', 'ago' => ':time sidan', 'from_now' => 'om :time', 'after' => ':time etter', 'before' => ':time før', 'diff_today' => 'I dag', 'diff_yesterday' => 'I går', 'diff_yesterday_regexp' => 'I går(?:\\s+klokka)?', 'diff_tomorrow' => 'I morgon', 'diff_tomorrow_regexp' => 'I morgon(?:\\s+klokka)?', 'diff_today_regexp' => 'I dag(?:\\s+klokka)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D. MMMM YYYY', 'LLL' => 'D. MMMM YYYY [kl.] H:mm', 'LLLL' => 'dddd D. MMMM YYYY [kl.] HH:mm', ], 'calendar' => [ 'sameDay' => '[I dag klokka] LT', 'nextDay' => '[I morgon klokka] LT', 'nextWeek' => 'dddd [klokka] LT', 'lastDay' => '[I går klokka] LT', 'lastWeek' => '[Føregåande] dddd [klokka] LT', 'sameElse' => 'L', ], 'ordinal' => ':number.', 'months' => ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], 'weekdays' => ['sundag', 'måndag', 'tysdag', 'onsdag', 'torsdag', 'fredag', 'laurdag'], 'weekdays_short' => ['sun', 'mån', 'tys', 'ons', 'tor', 'fre', 'lau'], 'weekdays_min' => ['su', 'må', 'ty', 'on', 'to', 'fr', 'la'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' og '], 'meridiem' => ['f.m.', 'e.m.'], ]; PKgt[SWN N Carbon/Lang/fy.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - Tim Fish * - JD Isaacks */ return [ 'year' => ':count jier|:count jierren', 'a_year' => 'ien jier|:count jierren', 'y' => ':count j', 'month' => ':count moanne|:count moannen', 'a_month' => 'ien moanne|:count moannen', 'm' => ':count moa.', 'week' => ':count wike|:count wiken', 'a_week' => 'in wike|:count wiken', 'a' => ':count w.', 'day' => ':count dei|:count dagen', 'a_day' => 'ien dei|:count dagen', 'd' => ':count d.', 'hour' => ':count oere|:count oeren', 'a_hour' => 'ien oere|:count oeren', 'h' => ':count o.', 'minute' => ':count minút|:count minuten', 'a_minute' => 'ien minút|:count minuten', 'min' => ':count min.', 'second' => ':count sekonde|:count sekonden', 'a_second' => 'in pear sekonden|:count sekonden', 's' => ':count s.', 'ago' => ':time lyn', 'from_now' => 'oer :time', 'diff_yesterday' => 'juster', 'diff_yesterday_regexp' => 'juster(?:\\s+om)?', 'diff_today' => 'hjoed', 'diff_today_regexp' => 'hjoed(?:\\s+om)?', 'diff_tomorrow' => 'moarn', 'diff_tomorrow_regexp' => 'moarn(?:\\s+om)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD-MM-YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[hjoed om] LT', 'nextDay' => '[moarn om] LT', 'nextWeek' => 'dddd [om] LT', 'lastDay' => '[juster om] LT', 'lastWeek' => '[ôfrûne] dddd [om] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { return $number.(($number === 1 || $number === 8 || $number >= 20) ? 'ste' : 'de'); }, 'months' => ['jannewaris', 'febrewaris', 'maart', 'april', 'maaie', 'juny', 'july', 'augustus', 'septimber', 'oktober', 'novimber', 'desimber'], 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], 'mmm_suffix' => '.', 'weekdays' => ['snein', 'moandei', 'tiisdei', 'woansdei', 'tongersdei', 'freed', 'sneon'], 'weekdays_short' => ['si.', 'mo.', 'ti.', 'wo.', 'to.', 'fr.', 'so.'], 'weekdays_min' => ['Si', 'Mo', 'Ti', 'Wo', 'To', 'Fr', 'So'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' en '], ]; PKgt["Carbon/Lang/de_BE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/de.php', [ 'formats' => [ 'L' => 'YYYY-MM-DD', ], ]); PKgt[?Ej  Carbon/Lang/en_AS.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[Nn  Carbon/Lang/mo.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ro.php'; PKgt[㚸  Carbon/Lang/ml_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ml.php'; PKgt[}))Carbon/Lang/ca_IT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ca.php', [ ]); PKgt[''x  Carbon/Lang/fr_YT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[}*B  Carbon/Lang/ha_GH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ha.php'; PKgt[Carbon/Lang/ki.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Kiroko', 'Hwaĩ-inĩ'], 'weekdays' => ['Kiumia', 'Njumatatũ', 'Njumaine', 'Njumatana', 'Aramithi', 'Njumaa', 'Njumamothi'], 'weekdays_short' => ['KMA', 'NTT', 'NMN', 'NMT', 'ART', 'NMA', 'NMM'], 'weekdays_min' => ['KMA', 'NTT', 'NMN', 'NMT', 'ART', 'NMA', 'NMM'], 'months' => ['Njenuarĩ', 'Mwere wa kerĩ', 'Mwere wa gatatũ', 'Mwere wa kana', 'Mwere wa gatano', 'Mwere wa gatandatũ', 'Mwere wa mũgwanja', 'Mwere wa kanana', 'Mwere wa kenda', 'Mwere wa ikũmi', 'Mwere wa ikũmi na ũmwe', 'Ndithemba'], 'months_short' => ['JEN', 'WKR', 'WGT', 'WKN', 'WTN', 'WTD', 'WMJ', 'WNN', 'WKD', 'WIK', 'WMW', 'DIT'], 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'year' => ':count mĩaka', // less reliable 'y' => ':count mĩaka', // less reliable 'a_year' => ':count mĩaka', // less reliable 'month' => ':count mweri', // less reliable 'm' => ':count mweri', // less reliable 'a_month' => ':count mweri', // less reliable 'week' => ':count kiumia', // less reliable 'w' => ':count kiumia', // less reliable 'a_week' => ':count kiumia', // less reliable 'day' => ':count mũthenya', // less reliable 'd' => ':count mũthenya', // less reliable 'a_day' => ':count mũthenya', // less reliable 'hour' => ':count thaa', // less reliable 'h' => ':count thaa', // less reliable 'a_hour' => ':count thaa', // less reliable 'minute' => ':count mundu', // less reliable 'min' => ':count mundu', // less reliable 'a_minute' => ':count mundu', // less reliable 'second' => ':count igego', // less reliable 's' => ':count igego', // less reliable 'a_second' => ':count igego', // less reliable ]); PKgt[5R R Carbon/Lang/kn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - MOHAN M U * - François B * - rajeevnaikte */ return [ 'year' => '{1}ಒಂದು ವರ್ಷ|]1,Inf[:count ವರ್ಷ', 'month' => '{1}ಒಂದು ತಿಂಗಳು|]1,Inf[:count ತಿಂಗಳು', 'week' => '{1}ಒಂದು ವಾರ|]1,Inf[:count ವಾರಗಳು', 'day' => '{1}ಒಂದು ದಿನ|]1,Inf[:count ದಿನ', 'hour' => '{1}ಒಂದು ಗಂಟೆ|]1,Inf[:count ಗಂಟೆ', 'minute' => '{1}ಒಂದು ನಿಮಿಷ|]1,Inf[:count ನಿಮಿಷ', 'second' => '{1}ಕೆಲವು ಕ್ಷಣಗಳು|]1,Inf[:count ಸೆಕೆಂಡುಗಳು', 'ago' => ':time ಹಿಂದೆ', 'from_now' => ':time ನಂತರ', 'diff_now' => 'ಈಗ', 'diff_today' => 'ಇಂದು', 'diff_yesterday' => 'ನಿನ್ನೆ', 'diff_tomorrow' => 'ನಾಳೆ', 'formats' => [ 'LT' => 'A h:mm', 'LTS' => 'A h:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, A h:mm', 'LLLL' => 'dddd, D MMMM YYYY, A h:mm', ], 'calendar' => [ 'sameDay' => '[ಇಂದು] LT', 'nextDay' => '[ನಾಳೆ] LT', 'nextWeek' => 'dddd, LT', 'lastDay' => '[ನಿನ್ನೆ] LT', 'lastWeek' => '[ಕೊನೆಯ] dddd, LT', 'sameElse' => 'L', ], 'ordinal' => ':numberನೇ', 'meridiem' => function ($hour) { if ($hour < 4) { return 'ರಾತ್ರಿ'; } if ($hour < 10) { return 'ಬೆಳಿಗ್ಗೆ'; } if ($hour < 17) { return 'ಮಧ್ಯಾಹ್ನ'; } if ($hour < 20) { return 'ಸಂಜೆ'; } return 'ರಾತ್ರಿ'; }, 'months' => ['ಜನವರಿ', 'ಫೆಬ್ರವರಿ', 'ಮಾರ್ಚ್', 'ಏಪ್ರಿಲ್', 'ಮೇ', 'ಜೂನ್', 'ಜುಲೈ', 'ಆಗಸ್ಟ್', 'ಸೆಪ್ಟೆಂಬರ್', 'ಅಕ್ಟೋಬರ್', 'ನವೆಂಬರ್', 'ಡಿಸೆಂಬರ್'], 'months_short' => ['ಜನ', 'ಫೆಬ್ರ', 'ಮಾರ್ಚ್', 'ಏಪ್ರಿಲ್', 'ಮೇ', 'ಜೂನ್', 'ಜುಲೈ', 'ಆಗಸ್ಟ್', 'ಸೆಪ್ಟೆಂ', 'ಅಕ್ಟೋ', 'ನವೆಂ', 'ಡಿಸೆಂ'], 'weekdays' => ['ಭಾನುವಾರ', 'ಸೋಮವಾರ', 'ಮಂಗಳವಾರ', 'ಬುಧವಾರ', 'ಗುರುವಾರ', 'ಶುಕ್ರವಾರ', 'ಶನಿವಾರ'], 'weekdays_short' => ['ಭಾನು', 'ಸೋಮ', 'ಮಂಗಳ', 'ಬುಧ', 'ಗುರು', 'ಶುಕ್ರ', 'ಶನಿ'], 'weekdays_min' => ['ಭಾ', 'ಸೋ', 'ಮಂ', 'ಬು', 'ಗು', 'ಶು', 'ಶ'], 'list' => ', ', 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'weekend' => [0, 0], ]; PKgt[$$Carbon/Lang/be.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Carbon\CarbonInterface; use Symfony\Component\Translation\PluralizationRules; // @codeCoverageIgnoreStart if (class_exists(PluralizationRules::class)) { PluralizationRules::set(static function ($number) { return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); }, 'be'); } // @codeCoverageIgnoreEnd /* * Authors: * - Josh Soref * - SobakaSlava * - François B * - Serhan Apaydın * - JD Isaacks * - AbadonnaAbbys * - Siomkin Alexander */ return [ 'year' => ':count год|:count гады|:count гадоў', 'a_year' => '{1}год|:count год|:count гады|:count гадоў', 'y' => ':count год|:count гады|:count гадоў', 'month' => ':count месяц|:count месяцы|:count месяцаў', 'a_month' => '{1}месяц|:count месяц|:count месяцы|:count месяцаў', 'm' => ':count месяц|:count месяцы|:count месяцаў', 'week' => ':count тыдзень|:count тыдні|:count тыдняў', 'a_week' => '{1}тыдзень|:count тыдзень|:count тыдні|:count тыдняў', 'w' => ':count тыдзень|:count тыдні|:count тыдняў', 'day' => ':count дзень|:count дні|:count дзён', 'a_day' => '{1}дзень|:count дзень|:count дні|:count дзён', 'd' => ':count дн', 'hour' => ':count гадзіну|:count гадзіны|:count гадзін', 'a_hour' => '{1}гадзіна|:count гадзіна|:count гадзіны|:count гадзін', 'h' => ':count гадзіна|:count гадзіны|:count гадзін', 'minute' => ':count хвіліна|:count хвіліны|:count хвілін', 'a_minute' => '{1}хвіліна|:count хвіліна|:count хвіліны|:count хвілін', 'min' => ':count хв', 'second' => ':count секунда|:count секунды|:count секунд', 'a_second' => '{1}некалькі секунд|:count секунда|:count секунды|:count секунд', 's' => ':count сек', 'hour_ago' => ':count гадзіну|:count гадзіны|:count гадзін', 'a_hour_ago' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', 'h_ago' => ':count гадзіну|:count гадзіны|:count гадзін', 'minute_ago' => ':count хвіліну|:count хвіліны|:count хвілін', 'a_minute_ago' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', 'min_ago' => ':count хвіліну|:count хвіліны|:count хвілін', 'second_ago' => ':count секунду|:count секунды|:count секунд', 'a_second_ago' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', 's_ago' => ':count секунду|:count секунды|:count секунд', 'hour_from_now' => ':count гадзіну|:count гадзіны|:count гадзін', 'a_hour_from_now' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', 'h_from_now' => ':count гадзіну|:count гадзіны|:count гадзін', 'minute_from_now' => ':count хвіліну|:count хвіліны|:count хвілін', 'a_minute_from_now' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', 'min_from_now' => ':count хвіліну|:count хвіліны|:count хвілін', 'second_from_now' => ':count секунду|:count секунды|:count секунд', 'a_second_from_now' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', 's_from_now' => ':count секунду|:count секунды|:count секунд', 'hour_after' => ':count гадзіну|:count гадзіны|:count гадзін', 'a_hour_after' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', 'h_after' => ':count гадзіну|:count гадзіны|:count гадзін', 'minute_after' => ':count хвіліну|:count хвіліны|:count хвілін', 'a_minute_after' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', 'min_after' => ':count хвіліну|:count хвіліны|:count хвілін', 'second_after' => ':count секунду|:count секунды|:count секунд', 'a_second_after' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', 's_after' => ':count секунду|:count секунды|:count секунд', 'hour_before' => ':count гадзіну|:count гадзіны|:count гадзін', 'a_hour_before' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', 'h_before' => ':count гадзіну|:count гадзіны|:count гадзін', 'minute_before' => ':count хвіліну|:count хвіліны|:count хвілін', 'a_minute_before' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', 'min_before' => ':count хвіліну|:count хвіліны|:count хвілін', 'second_before' => ':count секунду|:count секунды|:count секунд', 'a_second_before' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', 's_before' => ':count секунду|:count секунды|:count секунд', 'ago' => ':time таму', 'from_now' => 'праз :time', 'after' => ':time пасля', 'before' => ':time да', 'diff_now' => 'цяпер', 'diff_today' => 'Сёння', 'diff_today_regexp' => 'Сёння(?:\\s+ў)?', 'diff_yesterday' => 'учора', 'diff_yesterday_regexp' => 'Учора(?:\\s+ў)?', 'diff_tomorrow' => 'заўтра', 'diff_tomorrow_regexp' => 'Заўтра(?:\\s+ў)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'D MMMM YYYY г.', 'LLL' => 'D MMMM YYYY г., HH:mm', 'LLLL' => 'dddd, D MMMM YYYY г., HH:mm', ], 'calendar' => [ 'sameDay' => '[Сёння ў] LT', 'nextDay' => '[Заўтра ў] LT', 'nextWeek' => '[У] dddd [ў] LT', 'lastDay' => '[Учора ў] LT', 'lastWeek' => function (CarbonInterface $current) { switch ($current->dayOfWeek) { case 1: case 2: case 4: return '[У мінулы] dddd [ў] LT'; default: return '[У мінулую] dddd [ў] LT'; } }, 'sameElse' => 'L', ], 'ordinal' => function ($number, $period) { switch ($period) { case 'M': case 'd': case 'DDD': case 'w': case 'W': return ($number % 10 === 2 || $number % 10 === 3) && ($number % 100 !== 12 && $number % 100 !== 13) ? $number.'-і' : $number.'-ы'; case 'D': return $number.'-га'; default: return $number; } }, 'meridiem' => function ($hour) { if ($hour < 4) { return 'ночы'; } if ($hour < 12) { return 'раніцы'; } if ($hour < 17) { return 'дня'; } return 'вечара'; }, 'months' => ['студзеня', 'лютага', 'сакавіка', 'красавіка', 'траўня', 'чэрвеня', 'ліпеня', 'жніўня', 'верасня', 'кастрычніка', 'лістапада', 'снежня'], 'months_standalone' => ['студзень', 'люты', 'сакавік', 'красавік', 'травень', 'чэрвень', 'ліпень', 'жнівень', 'верасень', 'кастрычнік', 'лістапад', 'снежань'], 'months_short' => ['студ', 'лют', 'сак', 'крас', 'трав', 'чэрв', 'ліп', 'жнів', 'вер', 'каст', 'ліст', 'снеж'], 'months_regexp' => '/(DD?o?\.?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', 'weekdays' => ['нядзелю', 'панядзелак', 'аўторак', 'сераду', 'чацвер', 'пятніцу', 'суботу'], 'weekdays_standalone' => ['нядзеля', 'панядзелак', 'аўторак', 'серада', 'чацвер', 'пятніца', 'субота'], 'weekdays_short' => ['нд', 'пн', 'ат', 'ср', 'чц', 'пт', 'сб'], 'weekdays_min' => ['нд', 'пн', 'ат', 'ср', 'чц', 'пт', 'сб'], 'weekdays_regexp' => '/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/', 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' і '], 'months_short_standalone' => ['сту', 'лют', 'сак', 'кра', 'май', 'чэр', 'ліп', 'жні', 'вер', 'кас', 'ліс', 'сне'], ]; PKgt[T.CCCarbon/Lang/rwk.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['utuko', 'kyiukonyi'], 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], 'months' => ['Januari', 'Februari', 'Machi', 'Aprilyi', 'Mei', 'Junyi', 'Julyai', 'Agusti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], ]); PKgt[ ĩNNCarbon/Lang/gv.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/gv_GB.php'; PKgt[| Carbon/Lang/mr.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Vikram-enyota */ return [ 'year' => ':count वर्ष', 'y' => ':count वर्ष', 'month' => ':count महिना|:count महिने', 'm' => ':count महिना|:count महिने', 'week' => ':count आठवडा|:count आठवडे', 'w' => ':count आठवडा|:count आठवडे', 'day' => ':count दिवस', 'd' => ':count दिवस', 'hour' => ':count तास', 'h' => ':count तास', 'minute' => ':count मिनिटे', 'min' => ':count मिनिटे', 'second' => ':count सेकंद', 's' => ':count सेकंद', 'ago' => ':timeपूर्वी', 'from_now' => ':timeमध्ये', 'before' => ':timeपूर्वी', 'after' => ':timeनंतर', 'diff_now' => 'आत्ता', 'diff_today' => 'आज', 'diff_yesterday' => 'काल', 'diff_tomorrow' => 'उद्या', 'formats' => [ 'LT' => 'A h:mm वाजता', 'LTS' => 'A h:mm:ss वाजता', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, A h:mm वाजता', 'LLLL' => 'dddd, D MMMM YYYY, A h:mm वाजता', ], 'calendar' => [ 'sameDay' => '[आज] LT', 'nextDay' => '[उद्या] LT', 'nextWeek' => 'dddd, LT', 'lastDay' => '[काल] LT', 'lastWeek' => '[मागील] dddd, LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 4) { return 'रात्री'; } if ($hour < 10) { return 'सकाळी'; } if ($hour < 17) { return 'दुपारी'; } if ($hour < 20) { return 'सायंकाळी'; } return 'रात्री'; }, 'months' => ['जानेवारी', 'फेब्रुवारी', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'ऑगस्ट', 'सप्टेंबर', 'ऑक्टोबर', 'नोव्हेंबर', 'डिसेंबर'], 'months_short' => ['जाने.', 'फेब्रु.', 'मार्च.', 'एप्रि.', 'मे.', 'जून.', 'जुलै.', 'ऑग.', 'सप्टें.', 'ऑक्टो.', 'नोव्हें.', 'डिसें.'], 'weekdays' => ['रविवार', 'सोमवार', 'मंगळवार', 'बुधवार', 'गुरूवार', 'शुक्रवार', 'शनिवार'], 'weekdays_short' => ['रवि', 'सोम', 'मंगळ', 'बुध', 'गुरू', 'शुक्र', 'शनि'], 'weekdays_min' => ['र', 'सो', 'मं', 'बु', 'गु', 'शु', 'श'], 'list' => [', ', ' आणि '], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'weekend' => [0, 0], ]; PKgt[[ia  Carbon/Lang/pt_CH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/pt.php'; PKgt[>+  Carbon/Lang/lt_LT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/lt.php'; PKgt[~Carbon/Lang/fr_BE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'months_short' => ['jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jui', 'aoû', 'sep', 'oct', 'nov', 'déc'], ]); PKgt[3   Carbon/Lang/tzm_Latn.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Josh Soref * - JD Isaacks */ return [ 'year' => '{1}:count asgas|:count isgasn', 'a_year' => 'asgas|:count isgasn', 'month' => '{1}:count ayowr|:count iyyirn', 'a_month' => 'ayowr|:count iyyirn', 'week' => ':count imalass', 'a_week' => ':imalass', 'day' => '{1}:count ass|:count ossan', 'a_day' => 'ass|:count ossan', 'hour' => '{1}:count saɛa|:count tassaɛin', 'a_hour' => '{1}saɛa|:count tassaɛin', 'minute' => ':count minuḍ', 'a_minute' => '{1}minuḍ|:count minuḍ', 'second' => ':count imik', 'a_second' => '{1}imik|:count imik', 'ago' => 'yan :time', 'from_now' => 'dadkh s yan :time', 'diff_yesterday' => 'assant', 'diff_yesterday_regexp' => 'assant(?:\\s+g)?', 'diff_today' => 'asdkh', 'diff_today_regexp' => 'asdkh(?:\\s+g)?', 'diff_tomorrow' => 'aska', 'diff_tomorrow_regexp' => 'aska(?:\\s+g)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[asdkh g] LT', 'nextDay' => '[aska g] LT', 'nextWeek' => 'dddd [g] LT', 'lastDay' => '[assant g] LT', 'lastWeek' => 'dddd [g] LT', 'sameElse' => 'L', ], 'months' => ['innayr', 'brˤayrˤ', 'marˤsˤ', 'ibrir', 'mayyw', 'ywnyw', 'ywlywz', 'ɣwšt', 'šwtanbir', 'ktˤwbrˤ', 'nwwanbir', 'dwjnbir'], 'months_short' => ['innayr', 'brˤayrˤ', 'marˤsˤ', 'ibrir', 'mayyw', 'ywnyw', 'ywlywz', 'ɣwšt', 'šwtanbir', 'ktˤwbrˤ', 'nwwanbir', 'dwjnbir'], 'weekdays' => ['asamas', 'aynas', 'asinas', 'akras', 'akwas', 'asimwas', 'asiḍyas'], 'weekdays_short' => ['asamas', 'aynas', 'asinas', 'akras', 'akwas', 'asimwas', 'asiḍyas'], 'weekdays_min' => ['asamas', 'aynas', 'asinas', 'akras', 'akwas', 'asimwas', 'asiḍyas'], 'meridiem' => ['Zdat azal', 'Ḍeffir aza'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, ]; PKgt[CCarbon/Lang/bhb_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Samsung Electronics Co., Ltd. alexey.merzlyakov@samsung.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 'weekdays' => ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 'weekdays_short' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], 'weekdays_min' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], 'day_of_first_week_of_year' => 1, ]); PKgt[dCarbon/Lang/es_CO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, ]); PKgt[''x  Carbon/Lang/fr_CD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[# 'Carbon/Lang/sr_Latn_BA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Component\Translation\PluralizationRules; // @codeCoverageIgnoreStart if (class_exists(PluralizationRules::class)) { PluralizationRules::set(static function ($number) { return PluralizationRules::get($number, 'sr'); }, 'sr_Latn_BA'); } // @codeCoverageIgnoreEnd return array_replace_recursive(require __DIR__.'/sr_Latn.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D.M.yy.', 'LL' => 'DD.MM.YYYY.', 'LLL' => 'DD. MMMM YYYY. HH:mm', 'LLLL' => 'dddd, DD. MMMM YYYY. HH:mm', ], 'weekdays' => ['nedjelja', 'ponedeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], 'weekdays_short' => ['ned.', 'pon.', 'ut.', 'sr.', 'čet.', 'pet.', 'sub.'], ]); PKgt[-n  Carbon/Lang/ko_KR.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/ko.php'; PKgt[+hCarbon/Lang/am_ET.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕሪል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክቶበር', 'ኖቬምበር', 'ዲሴምበር'], 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], 'weekdays' => ['እሑድ', 'ሰኞ', 'ማክሰኞ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'], 'weekdays_short' => ['እሑድ', 'ሰኞ ', 'ማክሰ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'], 'weekdays_min' => ['እሑድ', 'ሰኞ ', 'ማክሰ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['ጡዋት', 'ከሰዓት'], 'year' => ':count አመት', 'y' => ':count አመት', 'a_year' => ':count አመት', 'month' => ':count ወር', 'm' => ':count ወር', 'a_month' => ':count ወር', 'week' => ':count ሳምንት', 'w' => ':count ሳምንት', 'a_week' => ':count ሳምንት', 'day' => ':count ቀን', 'd' => ':count ቀን', 'a_day' => ':count ቀን', 'hour' => ':count ሰዓት', 'h' => ':count ሰዓት', 'a_hour' => ':count ሰዓት', 'minute' => ':count ደቂቃ', 'min' => ':count ደቂቃ', 'a_minute' => ':count ደቂቃ', 'second' => ':count ሴኮንድ', 's' => ':count ሴኮንድ', 'a_second' => ':count ሴኮንድ', 'ago' => 'ከ:time በፊት', 'from_now' => 'በ:time ውስጥ', ]); PKgt[[ia  Carbon/Lang/pt_GW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/pt.php'; PKgt[)ttCarbon/Lang/ta_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/ta.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], 'months_short' => ['ஜன.', 'பிப்.', 'மார்.', 'ஏப்.', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக.', 'செப்.', 'அக்.', 'நவ.', 'டிச.'], 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], 'weekdays_short' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['காலை', 'மாலை'], ]); PKgt[ s  Carbon/Lang/gd_GB.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/gd.php'; PKgt[pGGCarbon/Lang/en_SE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[cCarbon/Lang/nl_AW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/nl.php', [ 'formats' => [ 'L' => 'DD-MM-YY', ], 'months' => ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], 'weekdays' => ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], 'weekdays_short' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], 'weekdays_min' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[Carbon/Lang/ne_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ne.php', [ 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'yy/M/d', 'LL' => 'YYYY MMM D', 'LLL' => 'YYYY MMMM D, h:mm a', 'LLLL' => 'YYYY MMMM D, dddd, h:mm a', ], 'months' => ['जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'], 'months_short' => ['जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'], 'weekend' => [0, 0], 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], ]); PKgt[pGGCarbon/Lang/en_BM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[V Carbon/Lang/tt_RU@iqtelif.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Reshat Sabiq tatar.iqtelif.i18n@gmail.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD.MM.YYYY', ], 'months' => ['Ğınwar', 'Fiwral\'', 'Mart', 'April', 'May', 'Yün', 'Yül', 'Awgust', 'Sintebír', 'Üktebír', 'Noyebír', 'Dikebír'], 'months_short' => ['Ğın', 'Fiw', 'Mar', 'Apr', 'May', 'Yün', 'Yül', 'Awg', 'Sin', 'Ükt', 'Noy', 'Dik'], 'weekdays' => ['Yekşembí', 'Düşembí', 'Sişembí', 'Çerşembí', 'Pencíşembí', 'Comğa', 'Şimbe'], 'weekdays_short' => ['Yek', 'Düş', 'Siş', 'Çer', 'Pen', 'Com', 'Şim'], 'weekdays_min' => ['Yek', 'Düş', 'Siş', 'Çer', 'Pen', 'Com', 'Şim'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['ÖA', 'ÖS'], ]); PKgt[kf'Carbon/Lang/az_Cyrl.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/az.php', [ 'weekdays' => ['базар', 'базар ертәси', 'чәршәнбә ахшамы', 'чәршәнбә', 'ҹүмә ахшамы', 'ҹүмә', 'шәнбә'], 'weekdays_short' => ['Б.', 'Б.Е.', 'Ч.А.', 'Ч.', 'Ҹ.А.', 'Ҹ.', 'Ш.'], 'weekdays_min' => ['Б.', 'Б.Е.', 'Ч.А.', 'Ч.', 'Ҹ.А.', 'Ҹ.', 'Ш.'], 'months' => ['јанвар', 'феврал', 'март', 'апрел', 'май', 'ијун', 'ијул', 'август', 'сентјабр', 'октјабр', 'нојабр', 'декабр'], 'months_short' => ['јан', 'фев', 'мар', 'апр', 'май', 'ијн', 'ијл', 'авг', 'сен', 'окт', 'ној', 'дек'], 'months_standalone' => ['Јанвар', 'Феврал', 'Март', 'Апрел', 'Май', 'Ијун', 'Ијул', 'Август', 'Сентјабр', 'Октјабр', 'Нојабр', 'Декабр'], 'meridiem' => ['а', 'п'], ]); PKgt[pRCarbon/Lang/zh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - xuri * - sycuato * - bokideckonja * - Luo Ning * - William Yang (williamyang233) */ return array_merge(require __DIR__.'/zh_Hans.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'YYYY/MM/DD', 'LL' => 'YYYY年M月D日', 'LLL' => 'YYYY年M月D日 A h点mm分', 'LLLL' => 'YYYY年M月D日dddd A h点mm分', ], ]); PKgt[$ccCarbon/Lang/es.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Kunal Marwaha * - kostas * - François B * - Tim Fish * - Claire Coloma * - Steven Heinrich * - JD Isaacks * - Raphael Amorim * - Jorge Y. Castillo * - Víctor Díaz * - Diego * - Sebastian Thierer * - quinterocesar * - Daniel Commesse Liévanos (danielcommesse) * - Pete Scopes (pdscopes) * - gam04 */ use Carbon\CarbonInterface; return [ 'year' => ':count año|:count años', 'a_year' => 'un año|:count años', 'y' => ':count año|:count años', 'month' => ':count mes|:count meses', 'a_month' => 'un mes|:count meses', 'm' => ':count mes|:count meses', 'week' => ':count semana|:count semanas', 'a_week' => 'una semana|:count semanas', 'w' => ':countsem', 'day' => ':count día|:count días', 'a_day' => 'un día|:count días', 'd' => ':countd', 'hour' => ':count hora|:count horas', 'a_hour' => 'una hora|:count horas', 'h' => ':counth', 'minute' => ':count minuto|:count minutos', 'a_minute' => 'un minuto|:count minutos', 'min' => ':countm', 'second' => ':count segundo|:count segundos', 'a_second' => 'unos segundos|:count segundos', 's' => ':counts', 'millisecond' => ':count milisegundo|:count milisegundos', 'a_millisecond' => 'un milisegundo|:count milisegundos', 'ms' => ':countms', 'microsecond' => ':count microsegundo|:count microsegundos', 'a_microsecond' => 'un microsegundo|:count microsegundos', 'µs' => ':countµs', 'ago' => 'hace :time', 'from_now' => 'en :time', 'after' => ':time después', 'before' => ':time antes', 'diff_now' => 'ahora mismo', 'diff_today' => 'hoy', 'diff_today_regexp' => 'hoy(?:\\s+a)?(?:\\s+las)?', 'diff_yesterday' => 'ayer', 'diff_yesterday_regexp' => 'ayer(?:\\s+a)?(?:\\s+las)?', 'diff_tomorrow' => 'mañana', 'diff_tomorrow_regexp' => 'mañana(?:\\s+a)?(?:\\s+las)?', 'diff_before_yesterday' => 'anteayer', 'diff_after_tomorrow' => 'pasado mañana', 'formats' => [ 'LT' => 'H:mm', 'LTS' => 'H:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D [de] MMMM [de] YYYY', 'LLL' => 'D [de] MMMM [de] YYYY H:mm', 'LLLL' => 'dddd, D [de] MMMM [de] YYYY H:mm', ], 'calendar' => [ 'sameDay' => function (CarbonInterface $current) { return '[hoy a la'.($current->hour !== 1 ? 's' : '').'] LT'; }, 'nextDay' => function (CarbonInterface $current) { return '[mañana a la'.($current->hour !== 1 ? 's' : '').'] LT'; }, 'nextWeek' => function (CarbonInterface $current) { return 'dddd [a la'.($current->hour !== 1 ? 's' : '').'] LT'; }, 'lastDay' => function (CarbonInterface $current) { return '[ayer a la'.($current->hour !== 1 ? 's' : '').'] LT'; }, 'lastWeek' => function (CarbonInterface $current) { return '[el] dddd [pasado a la'.($current->hour !== 1 ? 's' : '').'] LT'; }, 'sameElse' => 'L', ], 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], 'mmm_suffix' => '.', 'ordinal' => ':numberº', 'weekdays' => ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'], 'weekdays_short' => ['dom.', 'lun.', 'mar.', 'mié.', 'jue.', 'vie.', 'sáb.'], 'weekdays_min' => ['do', 'lu', 'ma', 'mi', 'ju', 'vi', 'sá'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' y '], 'meridiem' => ['a. m.', 'p. m.'], 'ordinal_words' => [ 'of' => 'de', 'first' => 'primer', 'second' => 'segundo', 'third' => 'tercer', 'fourth' => 'cuarto', 'fifth' => 'quinto', 'last' => 'último', ], ]; PKgt[,  Carbon/Lang/km_KH.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/km.php'; PKgt[''x  Carbon/Lang/fr_MG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[[  Carbon/Lang/nn_NO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/nn.php'; PKgt[pGGCarbon/Lang/en_BE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[|Carbon/Lang/ar_KW.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Authors: * - Josh Soref * - Nusret Parlak * - JD Isaacks * - Atef Ben Ali (atefBB) * - Mohamed Sabil (mohamedsabil83) * - Abdullah-Alhariri */ $months = [ 'يناير', 'فبراير', 'مارس', 'أبريل', 'ماي', 'يونيو', 'يوليوز', 'غشت', 'شتنبر', 'أكتوبر', 'نونبر', 'دجنبر', ]; return [ 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), 'ago' => 'منذ :time', 'from_now' => 'في :time', 'after' => 'بعد :time', 'before' => 'قبل :time', 'diff_now' => 'الآن', 'diff_today' => 'اليوم', 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', 'diff_yesterday' => 'أمس', 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', 'diff_tomorrow' => 'غداً', 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', 'diff_before_yesterday' => 'قبل الأمس', 'diff_after_tomorrow' => 'بعد غد', 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), 'period_interval' => 'كل :interval', 'period_start_date' => 'من :date', 'period_end_date' => 'إلى :date', 'months' => $months, 'months_short' => $months, 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'list' => ['، ', ' و '], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[اليوم على الساعة] LT', 'nextDay' => '[غدا على الساعة] LT', 'nextWeek' => 'dddd [على الساعة] LT', 'lastDay' => '[أمس على الساعة] LT', 'lastWeek' => 'dddd [على الساعة] LT', 'sameElse' => 'L', ], 'meridiem' => ['ص', 'م'], 'weekend' => [5, 6], 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]; PKgt[''x  Carbon/Lang/fr_SN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[ QVCarbon/Lang/nhn_MX.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - RAP libc-alpha@sourceware.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], 'weekdays' => ['teoilhuitl', 'ceilhuitl', 'omeilhuitl', 'yeilhuitl', 'nahuilhuitl', 'macuililhuitl', 'chicuaceilhuitl'], 'weekdays_short' => ['teo', 'cei', 'ome', 'yei', 'nau', 'mac', 'chi'], 'weekdays_min' => ['teo', 'cei', 'ome', 'yei', 'nau', 'mac', 'chi'], 'day_of_first_week_of_year' => 1, 'month' => ':count metztli', // less reliable 'm' => ':count metztli', // less reliable 'a_month' => ':count metztli', // less reliable 'week' => ':count tonalli', // less reliable 'w' => ':count tonalli', // less reliable 'a_week' => ':count tonalli', // less reliable 'day' => ':count tonatih', // less reliable 'd' => ':count tonatih', // less reliable 'a_day' => ':count tonatih', // less reliable 'minute' => ':count toltecayotl', // less reliable 'min' => ':count toltecayotl', // less reliable 'a_minute' => ':count toltecayotl', // less reliable 'second' => ':count ome', // less reliable 's' => ':count ome', // less reliable 'a_second' => ':count ome', // less reliable 'year' => ':count xihuitl', 'y' => ':count xihuitl', 'a_year' => ':count xihuitl', ]); PKgt[''x  Carbon/Lang/fr_GA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[u  Carbon/Lang/te_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/te.php'; PKgt[Qo\\Carbon/Lang/ksh.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['v.M.', 'n.M.'], 'weekdays' => ['Sunndaach', 'Mohndaach', 'Dinnsdaach', 'Metwoch', 'Dunnersdaach', 'Friidaach', 'Samsdaach'], 'weekdays_short' => ['Su.', 'Mo.', 'Di.', 'Me.', 'Du.', 'Fr.', 'Sa.'], 'weekdays_min' => ['Su', 'Mo', 'Di', 'Me', 'Du', 'Fr', 'Sa'], 'months' => ['Jannewa', 'Fäbrowa', 'Määz', 'Aprell', 'Mai', 'Juuni', 'Juuli', 'Oujoß', 'Septämber', 'Oktohber', 'Novämber', 'Dezämber'], 'months_short' => ['Jan', 'Fäb', 'Mäz', 'Apr', 'Mai', 'Jun', 'Jul', 'Ouj', 'Säp', 'Okt', 'Nov', 'Dez'], 'months_short_standalone' => ['Jan.', 'Fäb.', 'Mäz.', 'Apr.', 'Mai', 'Jun.', 'Jul.', 'Ouj.', 'Säp.', 'Okt.', 'Nov.', 'Dez.'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D. M. YYYY', 'LL' => 'D. MMM. YYYY', 'LLL' => 'D. MMMM YYYY HH:mm', 'LLLL' => 'dddd, [dä] D. MMMM YYYY HH:mm', ], 'year' => ':count Johr', 'y' => ':count Johr', 'a_year' => ':count Johr', 'month' => ':count Moohnd', 'm' => ':count Moohnd', 'a_month' => ':count Moohnd', 'week' => ':count woch', 'w' => ':count woch', 'a_week' => ':count woch', 'day' => ':count Daach', 'd' => ':count Daach', 'a_day' => ':count Daach', 'hour' => ':count Uhr', 'h' => ':count Uhr', 'a_hour' => ':count Uhr', 'minute' => ':count Menutt', 'min' => ':count Menutt', 'a_minute' => ':count Menutt', 'second' => ':count Sekůndt', 's' => ':count Sekůndt', 'a_second' => ':count Sekůndt', ]); PKgt[pGGCarbon/Lang/en_AT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[KnOOCarbon/Lang/kok.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/kok_IN.php'; PKgt[7T  Carbon/Lang/de_LI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/de.php'; PKgt[''x  Carbon/Lang/fr_CI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[''x  Carbon/Lang/fr_CF.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/fr.php'; PKgt[?Ej  Carbon/Lang/en_US_Posix.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/en.php'; PKgt[jjCarbon/Lang/en_SG.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'from_now' => 'in :time', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, ]); PKgt[yCarbon/Lang/fur_IT.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Pablo Saratxaga pablo@mandrakesoft.com */ return [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD. MM. YY', 'LL' => 'DD di MMMM dal YYYY', 'LLL' => 'DD di MMM HH:mm', 'LLLL' => 'DD di MMMM dal YYYY HH:mm', ], 'months' => ['zenâr', 'fevrâr', 'març', 'avrîl', 'mai', 'jugn', 'lui', 'avost', 'setembar', 'otubar', 'novembar', 'dicembar'], 'months_short' => ['zen', 'fev', 'mar', 'avr', 'mai', 'jug', 'lui', 'avo', 'set', 'otu', 'nov', 'dic'], 'weekdays' => ['domenie', 'lunis', 'martars', 'miercus', 'joibe', 'vinars', 'sabide'], 'weekdays_short' => ['dom', 'lun', 'mar', 'mie', 'joi', 'vin', 'sab'], 'weekdays_min' => ['dom', 'lun', 'mar', 'mie', 'joi', 'vin', 'sab'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count an', 'month' => ':count mês', 'week' => ':count setemane', 'day' => ':count zornade', 'hour' => ':count ore', 'minute' => ':count minût', 'second' => ':count secont', ]; PKgt[pGGCarbon/Lang/en_MY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[))Carbon/Lang/ar_KM.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/ar.php', [ ]); PKgt[w  Carbon/Lang/fr_TD.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd D MMMM YYYY h:mm a', ], ]); PKgt[zCOOCarbon/Lang/sah.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/sah_RU.php'; PKgt[|=}Carbon/Lang/yav.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['kiɛmɛ́ɛm', 'kisɛ́ndɛ'], 'weekdays' => ['sɔ́ndiɛ', 'móndie', 'muányáŋmóndie', 'metúkpíápɛ', 'kúpélimetúkpiapɛ', 'feléte', 'séselé'], 'weekdays_short' => ['sd', 'md', 'mw', 'et', 'kl', 'fl', 'ss'], 'weekdays_min' => ['sd', 'md', 'mw', 'et', 'kl', 'fl', 'ss'], 'months' => ['pikítíkítie, oólí ú kutúan', 'siɛyɛ́, oóli ú kándíɛ', 'ɔnsúmbɔl, oóli ú kátátúɛ', 'mesiŋ, oóli ú kénie', 'ensil, oóli ú kátánuɛ', 'ɔsɔn', 'efute', 'pisuyú', 'imɛŋ i puɔs', 'imɛŋ i putúk,oóli ú kátíɛ', 'makandikɛ', 'pilɔndɔ́'], 'months_short' => ['o.1', 'o.2', 'o.3', 'o.4', 'o.5', 'o.6', 'o.7', 'o.8', 'o.9', 'o.10', 'o.11', 'o.12'], 'first_day_of_week' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], ]); PKgt[ Carbon/Lang/rm.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - tjku * - Max Melentiev * - Juanito Fatas * - Tsutomu Kuroda * - Akira Matsuda * - Christopher Dell * - Enrique Vidal * - Simone Carletti * - Aaron Patterson * - Nicolás Hock Isaza * - sebastian de castelberg */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD.MM.YYYY', 'LL' => 'Do MMMM YYYY', 'LLL' => 'Do MMMM, HH:mm [Uhr]', 'LLLL' => 'dddd, Do MMMM YYYY, HH:mm [Uhr]', ], 'year' => ':count onn|:count onns', 'month' => ':count mais', 'week' => ':count emna|:count emnas', 'day' => ':count di|:count dis', 'hour' => ':count oura|:count ouras', 'minute' => ':count minuta|:count minutas', 'second' => ':count secunda|:count secundas', 'weekdays' => ['dumengia', 'glindesdi', 'mardi', 'mesemna', 'gievgia', 'venderdi', 'sonda'], 'weekdays_short' => ['du', 'gli', 'ma', 'me', 'gie', 've', 'so'], 'weekdays_min' => ['du', 'gli', 'ma', 'me', 'gie', 've', 'so'], 'months' => ['schaner', 'favrer', 'mars', 'avrigl', 'matg', 'zercladur', 'fanadur', 'avust', 'settember', 'october', 'november', 'december'], 'months_short' => ['schan', 'favr', 'mars', 'avr', 'matg', 'zercl', 'fan', 'avust', 'sett', 'oct', 'nov', 'dec'], 'meridiem' => ['avantmezdi', 'suentermezdi'], 'list' => [', ', ' e '], 'first_day_of_week' => 1, ]); PKgt[Q_L##Carbon/Lang/uz_UZ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Bobir Ismailov Bobir Ismailov, Pablo Saratxaga, Mashrab Kuvatov bobir_is@yahoo.com, pablo@mandrakesoft.com, kmashrab@uni-bremen.de */ return array_replace_recursive(require __DIR__.'/uz_Latn.php', [ 'formats' => [ 'L' => 'DD/MM/YY', ], 'months' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'Iyun', 'Iyul', 'Avgust', 'Sentabr', 'Oktabr', 'Noyabr', 'Dekabr'], 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'Iyn', 'Iyl', 'Avg', 'Sen', 'Okt', 'Noy', 'Dek'], 'weekdays' => ['Yakshanba', 'Dushanba', 'Seshanba', 'Chorshanba', 'Payshanba', 'Juma', 'Shanba'], 'weekdays_short' => ['Yak', 'Du', 'Se', 'Cho', 'Pay', 'Ju', 'Sha'], 'weekdays_min' => ['Yak', 'Du', 'Se', 'Cho', 'Pay', 'Ju', 'Sha'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, ]); PKgt[Tʟ%@@Carbon/Lang/ar_LY.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Atef Ben Ali (atefBB) * - Ibrahim AshShohail * - MLTDev */ $months = [ 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر', ]; return [ 'year' => implode('|', [':count سنة', 'سنة', 'سنتين', ':count سنوات', ':count سنة']), 'a_year' => implode('|', [':count سنة', 'سنة', 'سنتين', ':count سنوات', ':count سنة']), 'month' => implode('|', [':count شهر', 'شهر', 'شهرين', ':count أشهر', ':count شهر']), 'a_month' => implode('|', [':count شهر', 'شهر', 'شهرين', ':count أشهر', ':count شهر']), 'week' => implode('|', [':count أسبوع', 'أسبوع', 'أسبوعين', ':count أسابيع', ':count أسبوع']), 'a_week' => implode('|', [':count أسبوع', 'أسبوع', 'أسبوعين', ':count أسابيع', ':count أسبوع']), 'day' => implode('|', [':count يوم', 'يوم', 'يومين', ':count أيام', ':count يوم']), 'a_day' => implode('|', [':count يوم', 'يوم', 'يومين', ':count أيام', ':count يوم']), 'hour' => implode('|', [':count ساعة', 'ساعة', 'ساعتين', ':count ساعات', ':count ساعة']), 'a_hour' => implode('|', [':count ساعة', 'ساعة', 'ساعتين', ':count ساعات', ':count ساعة']), 'minute' => implode('|', [':count دقيقة', 'دقيقة', 'دقيقتين', ':count دقائق', ':count دقيقة']), 'a_minute' => implode('|', [':count دقيقة', 'دقيقة', 'دقيقتين', ':count دقائق', ':count دقيقة']), 'second' => implode('|', [':count ثانية', 'ثانية', 'ثانيتين', ':count ثواني', ':count ثانية']), 'a_second' => implode('|', [':count ثانية', 'ثانية', 'ثانيتين', ':count ثواني', ':count ثانية']), 'ago' => 'منذ :time', 'from_now' => ':time من الآن', 'after' => 'بعد :time', 'before' => 'قبل :time', 'diff_now' => 'الآن', 'diff_today' => 'اليوم', 'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?', 'diff_yesterday' => 'أمس', 'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?', 'diff_tomorrow' => 'غداً', 'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?', 'diff_before_yesterday' => 'قبل الأمس', 'diff_after_tomorrow' => 'بعد غد', 'period_recurrences' => implode('|', ['مرة', 'مرة', ':count مرتين', ':count مرات', ':count مرة']), 'period_interval' => 'كل :interval', 'period_start_date' => 'من :date', 'period_end_date' => 'إلى :date', 'months' => $months, 'months_short' => $months, 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], 'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'], 'list' => ['، ', ' و '], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D/M/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[اليوم عند الساعة] LT', 'nextDay' => '[غدًا عند الساعة] LT', 'nextWeek' => 'dddd [عند الساعة] LT', 'lastDay' => '[أمس عند الساعة] LT', 'lastWeek' => 'dddd [عند الساعة] LT', 'sameElse' => 'L', ], 'meridiem' => ['ص', 'م'], 'weekend' => [5, 6], ]; PKgt[ߟW Carbon/Lang/pa.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Philippe Vaucher * - Tsutomu Kuroda * - Punjab */ return [ 'year' => 'ਇੱਕ ਸਾਲ|:count ਸਾਲ', 'month' => 'ਇੱਕ ਮਹੀਨਾ|:count ਮਹੀਨੇ', 'week' => 'ਹਫਤਾ|:count ਹਫ਼ਤੇ', 'day' => 'ਇੱਕ ਦਿਨ|:count ਦਿਨ', 'hour' => 'ਇੱਕ ਘੰਟਾ|:count ਘੰਟੇ', 'minute' => 'ਇਕ ਮਿੰਟ|:count ਮਿੰਟ', 'second' => 'ਕੁਝ ਸਕਿੰਟ|:count ਸਕਿੰਟ', 'ago' => ':time ਪਹਿਲਾਂ', 'from_now' => ':time ਵਿੱਚ', 'before' => ':time ਤੋਂ ਪਹਿਲਾਂ', 'after' => ':time ਤੋਂ ਬਾਅਦ', 'diff_now' => 'ਹੁਣ', 'diff_today' => 'ਅਜ', 'diff_yesterday' => 'ਕਲ', 'diff_tomorrow' => 'ਕਲ', 'formats' => [ 'LT' => 'A h:mm ਵਜੇ', 'LTS' => 'A h:mm:ss ਵਜੇ', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY, A h:mm ਵਜੇ', 'LLLL' => 'dddd, D MMMM YYYY, A h:mm ਵਜੇ', ], 'calendar' => [ 'sameDay' => '[ਅਜ] LT', 'nextDay' => '[ਕਲ] LT', 'nextWeek' => '[ਅਗਲਾ] dddd, LT', 'lastDay' => '[ਕਲ] LT', 'lastWeek' => '[ਪਿਛਲੇ] dddd, LT', 'sameElse' => 'L', ], 'meridiem' => function ($hour) { if ($hour < 4) { return 'ਰਾਤ'; } if ($hour < 10) { return 'ਸਵੇਰ'; } if ($hour < 17) { return 'ਦੁਪਹਿਰ'; } if ($hour < 20) { return 'ਸ਼ਾਮ'; } return 'ਰਾਤ'; }, 'months' => ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'], 'months_short' => ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'], 'weekdays' => ['ਐਤਵਾਰ', 'ਸੋਮਵਾਰ', 'ਮੰਗਲਵਾਰ', 'ਬੁਧਵਾਰ', 'ਵੀਰਵਾਰ', 'ਸ਼ੁੱਕਰਵਾਰ', 'ਸ਼ਨੀਚਰਵਾਰ'], 'weekdays_short' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁਧ', 'ਵੀਰ', 'ਸ਼ੁਕਰ', 'ਸ਼ਨੀ'], 'weekdays_min' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁਧ', 'ਵੀਰ', 'ਸ਼ੁਕਰ', 'ਸ਼ਨੀ'], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 1, 'list' => [', ', ' ਅਤੇ '], 'weekend' => [0, 0], 'alt_numbers' => ['੦', '੧', '੨', '੩', '੪', '੫', '੬', '੭', '੮', '੯'], ]; PKgt[XCarbon/Lang/mag_IN.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - bhashaghar@googlegroups.com */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'D/M/YY', ], 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], 'weekdays' => ['एतवार', 'सोमार', 'मंगर', 'बुध', 'बिफे', 'सूक', 'सनिचर'], 'weekdays_short' => ['एतवार', 'सोमार', 'मंगर', 'बुध', 'बिफे', 'सूक', 'सनिचर'], 'weekdays_min' => ['एतवार', 'सोमार', 'मंगर', 'बुध', 'बिफे', 'सूक', 'सनिचर'], 'day_of_first_week_of_year' => 1, 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], ]); PKgt[/Carbon/Lang/ff.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM, YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'months' => ['siilo', 'colte', 'mbooy', 'seeɗto', 'duujal', 'korse', 'morso', 'juko', 'siilto', 'yarkomaa', 'jolal', 'bowte'], 'months_short' => ['sii', 'col', 'mbo', 'see', 'duu', 'kor', 'mor', 'juk', 'slt', 'yar', 'jol', 'bow'], 'weekdays' => ['dewo', 'aaɓnde', 'mawbaare', 'njeslaare', 'naasaande', 'mawnde', 'hoore-biir'], 'weekdays_short' => ['dew', 'aaɓ', 'maw', 'nje', 'naa', 'mwd', 'hbi'], 'weekdays_min' => ['dew', 'aaɓ', 'maw', 'nje', 'naa', 'mwd', 'hbi'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['subaka', 'kikiiɗe'], 'year' => ':count baret', // less reliable 'y' => ':count baret', // less reliable 'a_year' => ':count baret', // less reliable 'month' => ':count lewru', // less reliable 'm' => ':count lewru', // less reliable 'a_month' => ':count lewru', // less reliable 'week' => ':count naange', // less reliable 'w' => ':count naange', // less reliable 'a_week' => ':count naange', // less reliable 'day' => ':count dian', // less reliable 'd' => ':count dian', // less reliable 'a_day' => ':count dian', // less reliable 'hour' => ':count montor', // less reliable 'h' => ':count montor', // less reliable 'a_hour' => ':count montor', // less reliable 'minute' => ':count tokossuoum', // less reliable 'min' => ':count tokossuoum', // less reliable 'a_minute' => ':count tokossuoum', // less reliable 'second' => ':count tenen', // less reliable 's' => ':count tenen', // less reliable 'a_second' => ':count tenen', // less reliable ]); PKgt[GoV''Carbon/Lang/sr_Cyrl_BA.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Component\Translation\PluralizationRules; // @codeCoverageIgnoreStart if (class_exists(PluralizationRules::class)) { PluralizationRules::set(static function ($number) { return PluralizationRules::get($number, 'sr'); }, 'sr_Cyrl_BA'); } // @codeCoverageIgnoreEnd return array_replace_recursive(require __DIR__.'/sr_Cyrl.php', [ 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'D.M.yy.', 'LL' => 'DD.MM.YYYY.', 'LLL' => 'DD. MMMM YYYY. HH:mm', 'LLLL' => 'dddd, DD. MMMM YYYY. HH:mm', ], 'weekdays' => ['недјеља', 'понедељак', 'уторак', 'сриједа', 'четвртак', 'петак', 'субота'], 'weekdays_short' => ['нед.', 'пон.', 'ут.', 'ср.', 'чет.', 'пет.', 'суб.'], ]); PKgt[QiD  Carbon/Lang/fa_AF.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fa.php', [ 'meridiem' => ['ق', 'ب'], 'weekend' => [4, 5], 'formats' => [ 'L' => 'OY/OM/OD', 'LL' => 'OD MMM OY', 'LLL' => 'OD MMMM OY،‏ H:mm', 'LLLL' => 'dddd OD MMMM OY،‏ H:mm', ], ]); PKgt[pGGCarbon/Lang/en_FI.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); PKgt[Nd  Carbon/Lang/i18n.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY-MM-DD', ], 'months' => ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'], 'months_short' => ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'], 'weekdays' => ['1', '2', '3', '4', '5', '6', '7'], 'weekdays_short' => ['1', '2', '3', '4', '5', '6', '7'], 'weekdays_min' => ['1', '2', '3', '4', '5', '6', '7'], 'first_day_of_week' => 0, 'day_of_first_week_of_year' => 4, ]); PKgt[  Carbon/Lang/nb_NO.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return require __DIR__.'/nb.php'; PKgt[=NNCarbon/Lang/lg.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Unknown default region, use the first alphabetically. */ return require __DIR__.'/lg_UG.php'; PKgt[>1Carbon/Lang/zh_YUE.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org */ return array_replace_recursive(require __DIR__.'/zh.php', [ 'formats' => [ 'L' => 'YYYY-MM-DD', ], ]); PKgt[= Carbon/Lang/cy.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - François B * - JD Isaacks * - Daniel Monaghan */ return [ 'year' => '{1}blwyddyn|]1,Inf[:count flynedd', 'y' => ':countbl', 'month' => '{1}mis|]1,Inf[:count mis', 'm' => ':countmi', 'week' => ':count wythnos', 'w' => ':countw', 'day' => '{1}diwrnod|]1,Inf[:count diwrnod', 'd' => ':countd', 'hour' => '{1}awr|]1,Inf[:count awr', 'h' => ':counth', 'minute' => '{1}munud|]1,Inf[:count munud', 'min' => ':countm', 'second' => '{1}ychydig eiliadau|]1,Inf[:count eiliad', 's' => ':counts', 'ago' => ':time yn ôl', 'from_now' => 'mewn :time', 'after' => ':time ar ôl', 'before' => ':time o\'r blaen', 'diff_now' => 'nawr', 'diff_today' => 'Heddiw', 'diff_today_regexp' => 'Heddiw(?:\\s+am)?', 'diff_yesterday' => 'ddoe', 'diff_yesterday_regexp' => 'Ddoe(?:\\s+am)?', 'diff_tomorrow' => 'yfory', 'diff_tomorrow_regexp' => 'Yfory(?:\\s+am)?', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd, D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Heddiw am] LT', 'nextDay' => '[Yfory am] LT', 'nextWeek' => 'dddd [am] LT', 'lastDay' => '[Ddoe am] LT', 'lastWeek' => 'dddd [diwethaf am] LT', 'sameElse' => 'L', ], 'ordinal' => function ($number) { return $number.( $number > 20 ? (\in_array((int) $number, [40, 50, 60, 80, 100], true) ? 'fed' : 'ain') : ([ '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed', // 11eg to 20fed ])[$number] ?? '' ); }, 'months' => ['Ionawr', 'Chwefror', 'Mawrth', 'Ebrill', 'Mai', 'Mehefin', 'Gorffennaf', 'Awst', 'Medi', 'Hydref', 'Tachwedd', 'Rhagfyr'], 'months_short' => ['Ion', 'Chwe', 'Maw', 'Ebr', 'Mai', 'Meh', 'Gor', 'Aws', 'Med', 'Hyd', 'Tach', 'Rhag'], 'weekdays' => ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'], 'weekdays_short' => ['Sul', 'Llun', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'], 'weekdays_min' => ['Su', 'Ll', 'Ma', 'Me', 'Ia', 'Gw', 'Sa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' a '], 'meridiem' => ['yb', 'yh'], ]; PKgt[Carbon/Lang/gez_ER.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Ge'ez Frontier Foundation locales@geez.org */ return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', ], 'months' => ['ጠሐረ', 'ከተተ', 'መገበ', 'አኀዘ', 'ግንባት', 'ሠንየ', 'ሐመለ', 'ነሐሰ', 'ከረመ', 'ጠቀመ', 'ኀደረ', 'ኀሠሠ'], 'months_short' => ['ጠሐረ', 'ከተተ', 'መገበ', 'አኀዘ', 'ግንባ', 'ሠንየ', 'ሐመለ', 'ነሐሰ', 'ከረመ', 'ጠቀመ', 'ኀደረ', 'ኀሠሠ'], 'weekdays' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚት'], 'weekdays_short' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], 'weekdays_min' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, 'meridiem' => ['ጽባሕ', 'ምሴት'], 'month' => ':count ወርሕ', // less reliable 'm' => ':count ወርሕ', // less reliable 'a_month' => ':count ወርሕ', // less reliable 'week' => ':count ሰብዑ', // less reliable 'w' => ':count ሰብዑ', // less reliable 'a_week' => ':count ሰብዑ', // less reliable 'hour' => ':count አንትሙ', // less reliable 'h' => ':count አንትሙ', // less reliable 'a_hour' => ':count አንትሙ', // less reliable 'minute' => ':count ንኡስ', // less reliable 'min' => ':count ንኡስ', // less reliable 'a_minute' => ':count ንኡስ', // less reliable 'year' => ':count ዓመት', 'y' => ':count ዓመት', 'a_year' => ':count ዓመት', 'day' => ':count ዕለት', 'd' => ':count ዕለት', 'a_day' => ':count ዕለት', 'second' => ':count ካልእ', 's' => ':count ካልእ', 'a_second' => ':count ካልእ', ]); PKgt[((Carbon/Lang/fr_DJ.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ return array_replace_recursive(require __DIR__.'/fr.php', [ 'first_day_of_week' => 6, 'formats' => [ 'LT' => 'h:mm a', 'LTS' => 'h:mm:ss a', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMM YYYY', 'LLL' => 'D MMMM YYYY h:mm a', 'LLLL' => 'dddd D MMMM YYYY h:mm a', ], ]); PKgt[jߎCarbon/Lang/fr.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /* * Authors: * - Dieter Sting * - François B * - Maxime VALY * - JD Isaacks * - Dieter Sting * - François B * - JD Isaacks * - Sebastian Thierer * - Fastfuel * - Pete Scopes (pdscopes) */ return [ 'year' => ':count an|:count ans', 'a_year' => 'un an|:count ans', 'y' => ':count an|:count ans', 'month' => ':count mois|:count mois', 'a_month' => 'un mois|:count mois', 'm' => ':count mois', 'week' => ':count semaine|:count semaines', 'a_week' => 'une semaine|:count semaines', 'w' => ':count sem.', 'day' => ':count jour|:count jours', 'a_day' => 'un jour|:count jours', 'd' => ':count j', 'hour' => ':count heure|:count heures', 'a_hour' => 'une heure|:count heures', 'h' => ':count h', 'minute' => ':count minute|:count minutes', 'a_minute' => 'une minute|:count minutes', 'min' => ':count min', 'second' => ':count seconde|:count secondes', 'a_second' => 'quelques secondes|:count secondes', 's' => ':count s', 'millisecond' => ':count milliseconde|:count millisecondes', 'a_millisecond' => 'une milliseconde|:count millisecondes', 'ms' => ':countms', 'microsecond' => ':count microseconde|:count microsecondes', 'a_microsecond' => 'une microseconde|:count microsecondes', 'µs' => ':countµs', 'ago' => 'il y a :time', 'from_now' => 'dans :time', 'after' => ':time après', 'before' => ':time avant', 'diff_now' => "à l'instant", 'diff_today' => "aujourd'hui", 'diff_today_regexp' => "aujourd'hui(?:\s+à)?", 'diff_yesterday' => 'hier', 'diff_yesterday_regexp' => 'hier(?:\s+à)?', 'diff_tomorrow' => 'demain', 'diff_tomorrow_regexp' => 'demain(?:\s+à)?', 'diff_before_yesterday' => 'avant-hier', 'diff_after_tomorrow' => 'après-demain', 'period_recurrences' => ':count fois', 'period_interval' => 'tous les :interval', 'period_start_date' => 'de :date', 'period_end_date' => 'à :date', 'formats' => [ 'LT' => 'HH:mm', 'LTS' => 'HH:mm:ss', 'L' => 'DD/MM/YYYY', 'LL' => 'D MMMM YYYY', 'LLL' => 'D MMMM YYYY HH:mm', 'LLLL' => 'dddd D MMMM YYYY HH:mm', ], 'calendar' => [ 'sameDay' => '[Aujourd’hui à] LT', 'nextDay' => '[Demain à] LT', 'nextWeek' => 'dddd [à] LT', 'lastDay' => '[Hier à] LT', 'lastWeek' => 'dddd [dernier à] LT', 'sameElse' => 'L', ], 'months' => ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'], 'months_short' => ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'], 'weekdays' => ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'], 'weekdays_short' => ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'], 'weekdays_min' => ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'], 'ordinal' => function ($number, $period) { switch ($period) { // In French, only the first has to be ordinal, other number remains cardinal // @link https://fr.wikihow.com/%C3%A9crire-la-date-en-fran%C3%A7ais case 'D': return $number.($number === 1 ? 'er' : ''); default: case 'M': case 'Q': case 'DDD': case 'd': return $number.($number === 1 ? 'er' : 'e'); // Words with feminine grammatical gender: semaine case 'w': case 'W': return $number.($number === 1 ? 're' : 'e'); } }, 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' et '], 'ordinal_words' => [ 'of' => 'de', 'first' => 'premier', 'second' => 'deuxième', 'third' => 'troisième', 'fourth' => 'quatrième', 'fifth' => 'cinquième', 'last' => 'dernier', ], ]; PKgt[ayK "Carbon/Laravel/ServiceProvider.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon\Laravel; use Carbon\Carbon; use Carbon\CarbonImmutable; use Carbon\CarbonInterval; use Carbon\CarbonPeriod; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; use Illuminate\Events\Dispatcher; use Illuminate\Events\EventDispatcher; use Illuminate\Support\Carbon as IlluminateCarbon; use Illuminate\Support\Facades\Date; use Throwable; class ServiceProvider extends \Illuminate\Support\ServiceProvider { /** @var callable|null */ protected $appGetter = null; /** @var callable|null */ protected $localeGetter = null; public function setAppGetter(?callable $appGetter): void { $this->appGetter = $appGetter; } public function setLocaleGetter(?callable $localeGetter): void { $this->localeGetter = $localeGetter; } public function boot() { $this->updateLocale(); if (!$this->app->bound('events')) { return; } $service = $this; $events = $this->app['events']; if ($this->isEventDispatcher($events)) { $events->listen(class_exists('Illuminate\Foundation\Events\LocaleUpdated') ? 'Illuminate\Foundation\Events\LocaleUpdated' : 'locale.changed', function () use ($service) { $service->updateLocale(); }); } } public function updateLocale() { $locale = $this->getLocale(); if ($locale === null) { return; } Carbon::setLocale($locale); CarbonImmutable::setLocale($locale); CarbonPeriod::setLocale($locale); CarbonInterval::setLocale($locale); if (class_exists(IlluminateCarbon::class)) { IlluminateCarbon::setLocale($locale); } if (class_exists(Date::class)) { try { $root = Date::getFacadeRoot(); $root->setLocale($locale); } catch (Throwable $e) { // Non Carbon class in use in Date facade } } } public function register() { // Needed for Laravel < 5.3 compatibility } protected function getLocale() { if ($this->localeGetter) { return ($this->localeGetter)(); } $app = $this->getApp(); $app = $app && method_exists($app, 'getLocale') ? $app : $this->getGlobalApp('translator'); return $app ? $app->getLocale() : null; } protected function getApp() { if ($this->appGetter) { return ($this->appGetter)(); } return $this->app ?? $this->getGlobalApp(); } protected function getGlobalApp(...$args) { return \function_exists('app') ? \app(...$args) : null; } protected function isEventDispatcher($instance) { return $instance instanceof EventDispatcher || $instance instanceof Dispatcher || $instance instanceof DispatcherContract; } } PKgt["|''(Carbon/TranslatorStrongTypeInterface.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Symfony\Component\Translation\MessageCatalogueInterface; /** * Mark translator using strong type from symfony/translation >= 6. */ interface TranslatorStrongTypeInterface { public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages'); } PKgt[I&&Carbon/Translator.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use ReflectionMethod; use Symfony\Component\Translation; use Symfony\Contracts\Translation\TranslatorInterface; $transMethod = new ReflectionMethod( class_exists(TranslatorInterface::class) ? TranslatorInterface::class : Translation\Translator::class, 'trans' ); require $transMethod->hasReturnType() ? __DIR__.'/../../lazy/Carbon/TranslatorStrongType.php' : __DIR__.'/../../lazy/Carbon/TranslatorWeakType.php'; class Translator extends LazyTranslator { // Proxy dynamically loaded LazyTranslator in a static way } PKIu[v\\ CrawlObservers/CrawlObserver.phpnu[position = 0; } public function addObserver(CrawlObserver $observer): void { $this->observers[] = $observer; } public function crawled(CrawlUrl $crawlUrl, ResponseInterface $response): void { foreach ($this->observers as $crawlObserver) { $crawlObserver->crawled( $crawlUrl->url, $response, $crawlUrl->foundOnUrl ); } } public function crawlFailed(CrawlUrl $crawlUrl, RequestException $exception): void { foreach ($this->observers as $crawlObserver) { $crawlObserver->crawlFailed( $crawlUrl->url, $exception, $crawlUrl->foundOnUrl ); } } public function current(): mixed { return $this->observers[$this->position]; } public function offsetGet(mixed $offset): mixed { return $this->observers[$offset] ?? null; } public function offsetSet(mixed $offset, mixed $value): void { if (is_null($offset)) { $this->observers[] = $value; } else { $this->observers[$offset] = $value; } } public function offsetExists(mixed $offset): bool { return isset($this->observers[$offset]); } public function offsetUnset(mixed $offset): void { unset($this->observers[$offset]); } public function next(): void { $this->position++; } public function key(): mixed { return $this->position; } public function valid(): bool { return isset($this->observers[$this->position]); } public function rewind(): void { $this->position = 0; } } PKIu[_rr)Exceptions/InvalidCrawlRequestHandler.phpnu[getStatusCode(), $response->getHeaders(), $response->getBody(), $response->getProtocolVersion(), $response->getReasonPhrase() ); } public function setCachedBody(?string $body = null): void { $this->cachedBody = $body; } public function getCachedBody(): ?string { return $this->cachedBody; } } PKIu[感CrawlProfiles/CrawlProfile.phpnu[baseUrl = $baseUrl; } public function shouldCrawl(UriInterface $url): bool { return $this->baseUrl->getHost() === $url->getHost(); } } PKIu[!CrawlProfiles/CrawlSubdomains.phpnu[baseUrl = $baseUrl; } public function shouldCrawl(UriInterface $url): bool { return $this->isSubdomainOfHost($url); } public function isSubdomainOfHost(UriInterface $url): bool { return str_ends_with($url->getHost(), $this->baseUrl->getHost()); } } PKIu["Yt LinkAdder.phpnu[crawler = $crawler; } public function addFromHtml(string $html, UriInterface $foundOnUrl): void { $allLinks = $this->extractLinksFromHtml($html, $foundOnUrl); collect($allLinks) ->filter(fn (UriInterface $url) => $this->hasCrawlableScheme($url)) ->map(fn (UriInterface $url) => $this->normalizeUrl($url)) ->filter(function (UriInterface $url) use ($foundOnUrl) { if (! $node = $this->crawler->addToDepthTree($url, $foundOnUrl)) { return false; } return $this->shouldCrawl($node); }) ->filter(fn (UriInterface $url) => ! str_contains($url->getPath(), '/tel:')) ->each(function (UriInterface $url) use ($foundOnUrl) { $crawlUrl = CrawlUrl::create($url, $foundOnUrl); $this->crawler->addToCrawlQueue($crawlUrl); }); } protected function extractLinksFromHtml(string $html, UriInterface $foundOnUrl): ?Collection { $domCrawler = new DomCrawler($html, $foundOnUrl); return collect($domCrawler->filterXpath('//a | //link[@rel="next" or @rel="prev"]')->links()) ->reject(function (Link $link) { if ($this->isInvalidHrefNode($link)) { return true; } if ($this->crawler->mustRejectNofollowLinks() && $link->getNode()->getAttribute('rel') === 'nofollow') { return true; } return false; }) ->map(function (Link $link) { try { return new Uri($link->getUri()); } catch (InvalidArgumentException $exception) { return; } }) ->filter(); } protected function hasCrawlableScheme(UriInterface $uri): bool { return in_array($uri->getScheme(), ['http', 'https']); } protected function normalizeUrl(UriInterface $url): UriInterface { return $url->withFragment(''); } protected function shouldCrawl(Node $node): bool { if ($this->crawler->mustRespectRobots() && ! $this->crawler->getRobotsTxt()->allows($node->getValue(), $this->crawler->getUserAgent())) { return false; } $maximumDepth = $this->crawler->getMaximumDepth(); if (is_null($maximumDepth)) { return true; } return $node->getDepth() <= $maximumDepth; } protected function isInvalidHrefNode(Link $link): bool { if ($link->getNode()->nodeName !== 'a') { return false; } if ($link->getNode()->nextSibling !== null) { return false; } if ($link->getNode()->childNodes->length !== 0) { return false; } return true; } } PKIu[̿"Handlers/CrawlRequestFulfilled.phpnu[linkAdder = new LinkAdder($this->crawler); } public function __invoke(ResponseInterface $response, $index) { $body = $this->getBody($response); $robots = new CrawlerRobots( $response->getHeaders(), $body, $this->crawler->mustRespectRobots() ); $crawlUrl = $this->crawler->getCrawlQueue()->getUrlById($index); if ($this->crawler->mayExecuteJavaScript()) { $body = $this->getBodyAfterExecutingJavaScript($crawlUrl->url); $response = $response->withBody(Utils::streamFor($body)); } $responseWithCachedBody = ResponseWithCachedBody::fromGuzzlePsr7Response($response); $responseWithCachedBody->setCachedBody($body); if ($robots->mayIndex()) { $this->handleCrawled($responseWithCachedBody, $crawlUrl); } if (! $this->crawler->getCrawlProfile() instanceof CrawlSubdomains) { if ($crawlUrl->url->getHost() !== $this->crawler->getBaseUrl()->getHost()) { return; } } if (! $robots->mayFollow()) { return; } $baseUrl = $this->getBaseUrl($response, $crawlUrl); $this->linkAdder->addFromHtml($body, $baseUrl); usleep($this->crawler->getDelayBetweenRequests()); } protected function getBaseUrl(ResponseInterface $response, CrawlUrl $crawlUrl): Uri { $redirectHistory = $response->getHeader(RedirectMiddleware::HISTORY_HEADER); if (empty($redirectHistory)) { return $crawlUrl->url; } return new Uri(end($redirectHistory)); } protected function handleCrawled(ResponseInterface $response, CrawlUrl $crawlUrl): void { $this->crawler->getCrawlObservers()->crawled($crawlUrl, $response); } protected function getBody(ResponseInterface $response): string { $contentType = $response->getHeaderLine('Content-Type'); if (! $this->isMimetypeAllowedToParse($contentType)) { return ''; } return $this->convertBodyToString($response->getBody(), $this->crawler->getMaximumResponseSize()); } protected function convertBodyToString(StreamInterface $bodyStream, $readMaximumBytes = 1024 * 1024 * 2): string { if ($bodyStream->isSeekable()) { $bodyStream->rewind(); } $body = ''; $chunksToRead = $readMaximumBytes < 512 ? $readMaximumBytes : 512; for ($bytesRead = 0; $bytesRead < $readMaximumBytes; $bytesRead += $chunksToRead) { try { $newDataRead = $bodyStream->read($chunksToRead); } catch (Exception $exception) { $newDataRead = null; } if (! $newDataRead) { break; } $body .= $newDataRead; } return $body; } protected function getBodyAfterExecutingJavaScript(UriInterface $url): string { $browsershot = $this->crawler->getBrowsershot(); $html = $browsershot->setUrl((string) $url)->bodyHtml(); return html_entity_decode($html); } protected function isMimetypeAllowedToParse($contentType): bool { if (empty($contentType)) { return true; } if (! count($this->crawler->getParseableMimeTypes())) { return true; } foreach ($this->crawler->getParseableMimeTypes() as $allowedType) { if (stristr($contentType, $allowedType)) { return true; } } return false; } } PKIu[f((Handlers/CrawlRequestFailed.phpnu[getMessage(), $exception->getRequest()); } if ($exception instanceof RequestException) { $crawlUrl = $this->crawler->getCrawlQueue()->getUrlById($index); $this->crawler->getCrawlObservers()->crawlFailed($crawlUrl, $exception); } usleep($this->crawler->getDelayBetweenRequests()); } } PKIu[U CrawlUrl.phpnu[setId($id); } return $static; } protected function __construct(UriInterface $url, $foundOnUrl = null) { $this->url = $url; $this->foundOnUrl = $foundOnUrl; } public function getId(): mixed { return $this->id; } public function setId($id): void { $this->id = $id; } } PKIu[J- J J CrawlQueues/ArrayCrawlQueue.phpnu[url; if (! isset($this->urls[$urlString])) { $crawlUrl->setId($urlString); $this->urls[$urlString] = $crawlUrl; $this->pendingUrls[$urlString] = $crawlUrl; } return $this; } public function hasPendingUrls(): bool { return (bool) $this->pendingUrls; } public function getUrlById($id): CrawlUrl { if (! isset($this->urls[$id])) { throw new UrlNotFoundByIndex("Crawl url {$id} not found in collection."); } return $this->urls[$id]; } public function hasAlreadyBeenProcessed(CrawlUrl $crawlUrl): bool { $urlString = (string) $crawlUrl->url; if (isset($this->pendingUrls[$urlString])) { return false; } if (isset($this->urls[$urlString])) { return true; } return false; } public function markAsProcessed(CrawlUrl $crawlUrl): void { $urlString = (string) $crawlUrl->url; unset($this->pendingUrls[$urlString]); } public function getProcessedUrlCount(): int { return count($this->urls) - count($this->pendingUrls); } public function has(CrawlUrl | UriInterface $crawlUrl): bool { if ($crawlUrl instanceof CrawlUrl) { $urlString = (string) $crawlUrl->url; } elseif ($crawlUrl instanceof UriInterface) { $urlString = (string) $crawlUrl; } else { throw InvalidUrl::unexpectedType($crawlUrl); } return isset($this->urls[$urlString]); } public function getPendingUrl(): ?CrawlUrl { foreach ($this->pendingUrls as $pendingUrl) { return $pendingUrl; } return null; } } PKIu[4Ac<<CrawlQueues/CrawlQueue.phpnu[ true, RequestOptions::CONNECT_TIMEOUT => 10, RequestOptions::TIMEOUT => 10, RequestOptions::ALLOW_REDIRECTS => false, RequestOptions::HEADERS => [ 'User-Agent' => self::DEFAULT_USER_AGENT, ], ]; public static function create(array $clientOptions = []): static { $clientOptions = (count($clientOptions)) ? $clientOptions : static::$defaultClientOptions; $client = new Client($clientOptions); return new static($client); } public function __construct( protected Client $client, protected int $concurrency = 10, ) { $this->crawlProfile = new CrawlAllUrls(); $this->crawlQueue = new ArrayCrawlQueue(); $this->crawlObservers = new CrawlObserverCollection(); $this->crawlRequestFulfilledClass = CrawlRequestFulfilled::class; $this->crawlRequestFailedClass = CrawlRequestFailed::class; } public function getDefaultScheme(): string { return $this->defaultScheme; } public function setDefaultScheme(string $defaultScheme): self { $this->defaultScheme = $defaultScheme; return $this; } public function setConcurrency(int $concurrency): self { $this->concurrency = $concurrency; return $this; } public function setMaximumResponseSize(int $maximumResponseSizeInBytes): self { $this->maximumResponseSize = $maximumResponseSizeInBytes; return $this; } public function getMaximumResponseSize(): ?int { return $this->maximumResponseSize; } public function setTotalCrawlLimit(int $totalCrawlLimit): self { $this->totalCrawlLimit = $totalCrawlLimit; return $this; } public function getTotalCrawlLimit(): ?int { return $this->totalCrawlLimit; } public function getTotalCrawlCount(): int { return $this->totalUrlCount; } public function setCurrentCrawlLimit(int $currentCrawlLimit): self { $this->currentCrawlLimit = $currentCrawlLimit; return $this; } public function getCurrentCrawlLimit(): ?int { return $this->currentCrawlLimit; } public function getCurrentCrawlCount(): int { return $this->currentUrlCount; } public function setMaximumDepth(int $maximumDepth): self { $this->maximumDepth = $maximumDepth; return $this; } public function getMaximumDepth(): ?int { return $this->maximumDepth; } public function setDelayBetweenRequests(int $delayInMilliseconds): self { $this->delayBetweenRequests = ($delayInMilliseconds * 1000); return $this; } public function getDelayBetweenRequests(): int { return $this->delayBetweenRequests; } public function setParseableMimeTypes(array $types): self { $this->allowedMimeTypes = $types; return $this; } public function getParseableMimeTypes(): array { return $this->allowedMimeTypes; } public function ignoreRobots(): self { $this->respectRobots = false; return $this; } public function respectRobots(): self { $this->respectRobots = true; return $this; } public function mustRespectRobots(): bool { return $this->respectRobots; } public function acceptNofollowLinks(): self { $this->rejectNofollowLinks = false; return $this; } public function rejectNofollowLinks(): self { $this->rejectNofollowLinks = true; return $this; } public function mustRejectNofollowLinks(): bool { return $this->rejectNofollowLinks; } public function getRobotsTxt(): RobotsTxt { return $this->robotsTxt; } public function setCrawlQueue(CrawlQueue $crawlQueue): self { $this->crawlQueue = $crawlQueue; return $this; } public function getCrawlQueue(): CrawlQueue { return $this->crawlQueue; } public function executeJavaScript(): self { $this->executeJavaScript = true; return $this; } public function doNotExecuteJavaScript(): self { $this->executeJavaScript = false; return $this; } public function mayExecuteJavascript(): bool { return $this->executeJavaScript; } public function setCrawlObserver(CrawlObserver | array $crawlObservers): self { if (! is_array($crawlObservers)) { $crawlObservers = [$crawlObservers]; } return $this->setCrawlObservers($crawlObservers); } public function setCrawlObservers(array $crawlObservers): self { $this->crawlObservers = new CrawlObserverCollection($crawlObservers); return $this; } public function addCrawlObserver(CrawlObserver $crawlObserver): self { $this->crawlObservers->addObserver($crawlObserver); return $this; } public function getCrawlObservers(): CrawlObserverCollection { return $this->crawlObservers; } public function setCrawlProfile(CrawlProfile $crawlProfile): self { $this->crawlProfile = $crawlProfile; return $this; } public function getCrawlProfile(): CrawlProfile { return $this->crawlProfile; } public function setCrawlFulfilledHandlerClass(string $crawlRequestFulfilledClass): self { $baseClass = CrawlRequestFulfilled::class; if (! is_subclass_of($crawlRequestFulfilledClass, $baseClass)) { throw InvalidCrawlRequestHandler::doesNotExtendBaseClass($crawlRequestFulfilledClass, $baseClass); } $this->crawlRequestFulfilledClass = $crawlRequestFulfilledClass; return $this; } public function setCrawlFailedHandlerClass(string $crawlRequestFailedClass): self { $baseClass = CrawlRequestFailed::class; if (! is_subclass_of($crawlRequestFailedClass, $baseClass)) { throw InvalidCrawlRequestHandler::doesNotExtendBaseClass($crawlRequestFailedClass, $baseClass); } $this->crawlRequestFailedClass = $crawlRequestFailedClass; return $this; } public function setBrowsershot(Browsershot $browsershot) { $this->browsershot = $browsershot; return $this; } public function setUserAgent(string $userAgent): self { $clientOptions = $this->client->getConfig(); $headers = array_change_key_case($clientOptions['headers']); $headers['user-agent'] = $userAgent; $clientOptions['headers'] = $headers; $this->client = new Client($clientOptions); return $this; } public function getUserAgent(): string { $headers = $this->client->getConfig('headers'); foreach (array_keys($headers) as $name) { if (strtolower($name) === 'user-agent') { return (string) $headers[$name]; } } return static::DEFAULT_USER_AGENT; } public function getBrowsershot(): Browsershot { if (! $this->browsershot) { $this->browsershot = new Browsershot(); } return $this->browsershot; } public function getBaseUrl(): UriInterface { return $this->baseUrl; } public function startCrawling(UriInterface | string $baseUrl) { if (! $baseUrl instanceof UriInterface) { $baseUrl = new Uri($baseUrl); } if ($baseUrl->getScheme() === '') { $baseUrl = $baseUrl->withScheme($this->defaultScheme); } if ($baseUrl->getPath() === '') { $baseUrl = $baseUrl->withPath('/'); } $this->totalUrlCount = $this->crawlQueue->getProcessedUrlCount(); $this->baseUrl = $baseUrl; $crawlUrl = CrawlUrl::create($this->baseUrl); $this->robotsTxt = $this->createRobotsTxt($crawlUrl->url); if ($this->robotsTxt->allows((string) $crawlUrl->url, $this->getUserAgent()) || ! $this->respectRobots ) { $this->addToCrawlQueue($crawlUrl); } $this->depthTree = new Node((string) $this->baseUrl); $this->startCrawlingQueue(); foreach ($this->crawlObservers as $crawlObserver) { $crawlObserver->finishedCrawling(); } } public function addToDepthTree(UriInterface $url, UriInterface $parentUrl, Node $node = null): ?Node { if (is_null($this->maximumDepth)) { return new Node((string) $url); } $node = $node ?? $this->depthTree; $returnNode = null; if ($node->getValue() === (string) $parentUrl) { $newNode = new Node((string) $url); $node->addChild($newNode); return $newNode; } foreach ($node->getChildren() as $currentNode) { $returnNode = $this->addToDepthTree($url, $parentUrl, $currentNode); if (! is_null($returnNode)) { break; } } return $returnNode; } protected function startCrawlingQueue(): void { while ( $this->reachedCrawlLimits() === false && $this->crawlQueue->hasPendingUrls() ) { $pool = new Pool($this->client, $this->getCrawlRequests(), [ 'concurrency' => $this->concurrency, 'options' => $this->client->getConfig(), 'fulfilled' => new $this->crawlRequestFulfilledClass($this), 'rejected' => new $this->crawlRequestFailedClass($this), ]); $promise = $pool->promise(); $promise->wait(); } } protected function createRobotsTxt(UriInterface $uri): RobotsTxt { return RobotsTxt::create($uri->withPath('/robots.txt')); } protected function getCrawlRequests(): Generator { while ( $this->reachedCrawlLimits() === false && $crawlUrl = $this->crawlQueue->getPendingUrl() ) { if ( $this->crawlProfile->shouldCrawl($crawlUrl->url) === false || $this->crawlQueue->hasAlreadyBeenProcessed($crawlUrl) ) { $this->crawlQueue->markAsProcessed($crawlUrl); continue; } foreach ($this->crawlObservers as $crawlObserver) { $crawlObserver->willCrawl($crawlUrl->url); } $this->totalUrlCount++; $this->currentUrlCount++; $this->crawlQueue->markAsProcessed($crawlUrl); yield $crawlUrl->getId() => new Request('GET', $crawlUrl->url); } } public function addToCrawlQueue(CrawlUrl $crawlUrl): self { if (! $this->getCrawlProfile()->shouldCrawl($crawlUrl->url)) { return $this; } if ($this->getCrawlQueue()->has($crawlUrl->url)) { return $this; } $this->crawlQueue->add($crawlUrl); return $this; } public function reachedCrawlLimits(): bool { $totalCrawlLimit = $this->getTotalCrawlLimit(); if (! is_null($totalCrawlLimit) && $this->getTotalCrawlCount() >= $totalCrawlLimit) { return true; } $currentCrawlLimit = $this->getCurrentCrawlLimit(); if (! is_null($currentCrawlLimit) && $this->getCurrentCrawlCount() >= $currentCrawlLimit) { return true; } return false; } } PKIu[LCrawlerRobots.phpnu[robotsHeaders = RobotsHeaders::create($headers); $this->robotsMeta = RobotsMeta::create($body); $this->mustRespectRobots = $mustRespectRobots; } public function mayIndex(): bool { if (! $this->mustRespectRobots) { return true; } if (! $this->robotsHeaders->mayIndex()) { return false; } if (! $this->robotsMeta->mayIndex()) { return false; } return true; } public function mayFollow(): bool { if (! $this->mustRespectRobots) { return true; } if (! $this->robotsHeaders->mayFollow()) { return false; } if (! $this->robotsMeta->mayFollow()) { return false; } return true; } } PK54v[y<$Exception/NegativeValueException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\LinesOfCode; use InvalidArgumentException; final class NegativeValueException extends InvalidArgumentException implements Exception { } PK54v[ &Exception/IllogicalValuesException.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\LinesOfCode; use LogicException; final class IllogicalValuesException extends LogicException implements Exception { } PK54v[s^ ^ LinesOfCode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\LinesOfCode; /** * @psalm-immutable */ final class LinesOfCode { /** * @psalm-var non-negative-int */ private readonly int $linesOfCode; /** * @psalm-var non-negative-int */ private readonly int $commentLinesOfCode; /** * @psalm-var non-negative-int */ private readonly int $nonCommentLinesOfCode; /** * @psalm-var non-negative-int */ private readonly int $logicalLinesOfCode; /** * @psalm-param non-negative-int $linesOfCode * @psalm-param non-negative-int $commentLinesOfCode * @psalm-param non-negative-int $nonCommentLinesOfCode * @psalm-param non-negative-int $logicalLinesOfCode * * @throws IllogicalValuesException * @throws NegativeValueException */ public function __construct(int $linesOfCode, int $commentLinesOfCode, int $nonCommentLinesOfCode, int $logicalLinesOfCode) { /** @psalm-suppress DocblockTypeContradiction */ if ($linesOfCode < 0) { throw new NegativeValueException('$linesOfCode must not be negative'); } /** @psalm-suppress DocblockTypeContradiction */ if ($commentLinesOfCode < 0) { throw new NegativeValueException('$commentLinesOfCode must not be negative'); } /** @psalm-suppress DocblockTypeContradiction */ if ($nonCommentLinesOfCode < 0) { throw new NegativeValueException('$nonCommentLinesOfCode must not be negative'); } /** @psalm-suppress DocblockTypeContradiction */ if ($logicalLinesOfCode < 0) { throw new NegativeValueException('$logicalLinesOfCode must not be negative'); } if ($linesOfCode - $commentLinesOfCode !== $nonCommentLinesOfCode) { throw new IllogicalValuesException('$linesOfCode !== $commentLinesOfCode + $nonCommentLinesOfCode'); } $this->linesOfCode = $linesOfCode; $this->commentLinesOfCode = $commentLinesOfCode; $this->nonCommentLinesOfCode = $nonCommentLinesOfCode; $this->logicalLinesOfCode = $logicalLinesOfCode; } /** * @psalm-return non-negative-int */ public function linesOfCode(): int { return $this->linesOfCode; } /** * @psalm-return non-negative-int */ public function commentLinesOfCode(): int { return $this->commentLinesOfCode; } /** * @psalm-return non-negative-int */ public function nonCommentLinesOfCode(): int { return $this->nonCommentLinesOfCode; } /** * @psalm-return non-negative-int */ public function logicalLinesOfCode(): int { return $this->logicalLinesOfCode; } public function plus(self $other): self { return new self( $this->linesOfCode() + $other->linesOfCode(), $this->commentLinesOfCode() + $other->commentLinesOfCode(), $this->nonCommentLinesOfCode() + $other->nonCommentLinesOfCode(), $this->logicalLinesOfCode() + $other->logicalLinesOfCode(), ); } } PK54v[kJM  LineCountingVisitor.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\LinesOfCode; use function array_merge; use function array_unique; use function assert; use function count; use PhpParser\Comment; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\NodeVisitorAbstract; final class LineCountingVisitor extends NodeVisitorAbstract { /** * @psalm-var non-negative-int */ private readonly int $linesOfCode; /** * @var Comment[] */ private array $comments = []; /** * @var int[] */ private array $linesWithStatements = []; /** * @psalm-param non-negative-int $linesOfCode */ public function __construct(int $linesOfCode) { $this->linesOfCode = $linesOfCode; } public function enterNode(Node $node): void { $this->comments = array_merge($this->comments, $node->getComments()); if (!$node instanceof Expr) { return; } $this->linesWithStatements[] = $node->getStartLine(); } public function result(): LinesOfCode { $commentLinesOfCode = 0; foreach ($this->comments() as $comment) { $commentLinesOfCode += ($comment->getEndLine() - $comment->getStartLine() + 1); } $nonCommentLinesOfCode = $this->linesOfCode - $commentLinesOfCode; $logicalLinesOfCode = count(array_unique($this->linesWithStatements)); assert($commentLinesOfCode >= 0); assert($nonCommentLinesOfCode >= 0); assert($logicalLinesOfCode >= 0); return new LinesOfCode( $this->linesOfCode, $commentLinesOfCode, $nonCommentLinesOfCode, $logicalLinesOfCode, ); } /** * @return Comment[] */ private function comments(): array { $comments = []; foreach ($this->comments as $comment) { $comments[$comment->getStartLine() . '_' . $comment->getStartTokenPos() . '_' . $comment->getEndLine() . '_' . $comment->getEndTokenPos()] = $comment; } return $comments; } } PK54v[>« Counter.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\LinesOfCode; use function assert; use function file_get_contents; use function substr_count; use PhpParser\Error; use PhpParser\Lexer; use PhpParser\Node; use PhpParser\NodeTraverser; use PhpParser\Parser; use PhpParser\ParserFactory; final class Counter { /** * @throws RuntimeException */ public function countInSourceFile(string $sourceFile): LinesOfCode { return $this->countInSourceString(file_get_contents($sourceFile)); } /** * @throws RuntimeException */ public function countInSourceString(string $source): LinesOfCode { $linesOfCode = substr_count($source, "\n"); if ($linesOfCode === 0 && !empty($source)) { $linesOfCode = 1; } assert($linesOfCode >= 0); try { $nodes = $this->parser()->parse($source); assert($nodes !== null); return $this->countInAbstractSyntaxTree($linesOfCode, $nodes); // @codeCoverageIgnoreStart } catch (Error $error) { throw new RuntimeException( $error->getMessage(), $error->getCode(), $error, ); } // @codeCoverageIgnoreEnd } /** * @psalm-param non-negative-int $linesOfCode * * @param Node[] $nodes * * @throws RuntimeException */ public function countInAbstractSyntaxTree(int $linesOfCode, array $nodes): LinesOfCode { $traverser = new NodeTraverser; $visitor = new LineCountingVisitor($linesOfCode); $traverser->addVisitor($visitor); try { /* @noinspection UnusedFunctionResultInspection */ $traverser->traverse($nodes); // @codeCoverageIgnoreStart } catch (Error $error) { throw new RuntimeException( $error->getMessage(), $error->getCode(), $error, ); } // @codeCoverageIgnoreEnd return $visitor->result(); } private function parser(): Parser { return (new ParserFactory)->create(ParserFactory::PREFER_PHP7, new Lexer); } } PKu5v[#Exceptions/InvalidDirectoryName.phpnu[location = $this->sanitizePath($location); } public static function make(string $location = ''): self { return (new self($location))->create(); } public function create(): self { if (empty($this->location)) { $this->location = $this->getSystemTemporaryDirectory(); } if (empty($this->name)) { $this->name = mt_rand().'-'.str_replace([' ', '.'], '', microtime()); } if ($this->forceCreate && file_exists($this->getFullPath())) { $this->deleteDirectory($this->getFullPath()); } if ($this->exists()) { throw PathAlreadyExists::create($this->getFullPath()); } mkdir($this->getFullPath(), 0777, true); return $this; } public function force(): self { $this->forceCreate = true; return $this; } public function name(string $name): self { $this->name = $this->sanitizeName($name); return $this; } public function location(string $location): self { $this->location = $this->sanitizePath($location); return $this; } public function path(string $pathOrFilename = ''): string { if (empty($pathOrFilename)) { return $this->getFullPath(); } $path = $this->getFullPath().DIRECTORY_SEPARATOR.trim($pathOrFilename, '/'); $directoryPath = $this->removeFilenameFromPath($path); if (! file_exists($directoryPath)) { mkdir($directoryPath, 0777, true); } return $path; } public function empty(): self { $this->deleteDirectory($this->getFullPath()); mkdir($this->getFullPath(), 0777, true); return $this; } public function delete(): bool { return $this->deleteDirectory($this->getFullPath()); } public function exists(): bool { return file_exists($this->getFullPath()); } protected function getFullPath(): string { return $this->location.(! empty($this->name) ? DIRECTORY_SEPARATOR.$this->name : ''); } protected function isValidDirectoryName(string $directoryName): bool { return strpbrk($directoryName, '\\/?%*:|"<>') === false; } protected function getSystemTemporaryDirectory(): string { return rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR); } protected function sanitizePath(string $path): string { $path = rtrim($path); return rtrim($path, DIRECTORY_SEPARATOR); } protected function sanitizeName(string $name): string { if (! $this->isValidDirectoryName($name)) { throw InvalidDirectoryName::create($name); } return trim($name); } protected function removeFilenameFromPath(string $path): string { if (! $this->isFilePath($path)) { return $path; } return substr($path, 0, strrpos($path, DIRECTORY_SEPARATOR)); } protected function isFilePath(string $path): bool { return str_contains($path, '.'); } protected function deleteDirectory(string $path): bool { try { if (is_link($path)) { return unlink($path); } if (! file_exists($path)) { return true; } if (! is_dir($path)) { return unlink($path); } foreach (new FilesystemIterator($path) as $item) { if (! $this->deleteDirectory($item)) { return false; } } /* * By forcing a php garbage collection cycle using gc_collect_cycles() we can ensure * that the rmdir does not fail due to files still being reserved in memory. */ gc_collect_cycles(); return rmdir($path); } catch (Throwable) { return false; } } public function deleteWhenDestroyed(bool $deleteWhenDestroyed = true): self { $this->deleteWhenDestroyed = $deleteWhenDestroyed; return $this; } public function __destruct() { if ($this->deleteWhenDestroyed) { $this->delete(); } } } PKHv[fCProxy/ProxyGenerator.phpnu[\\?[a-z_\x7f-\xff][\w\x7f-\xff]*(?:\\[a-z_\x7f-\xff][\w\x7f-\xff]*)*) (?(?&type)\s*&\s*(?&type)) (?(?:(?:\(\s*(?&intersection_type)\s*\))|(?&type))(?:\s*\|\s*(?:(?:\(\s*(?&intersection_type)\s*\))|(?&type)))+) )(?:public\s+)?(?:function\s+%s\s*\(\)\s*)\s*(?::\s*(?:(?&union_type)|(?&intersection_type)|(?:\??(?&type)))\s*)?{\s*return\s*\$this->%s;\s*})i EOT; /** * The namespace that contains all proxy classes. * * @var string */ private $proxyNamespace; /** * The directory that contains all proxy classes. * * @var string */ private $proxyDirectory; /** * Map of callables used to fill in placeholders set in the template. * * @var string[]|callable[] */ protected $placeholders = [ 'baseProxyInterface' => Proxy::class, 'additionalProperties' => '', ]; /** * Template used as a blueprint to generate proxies. * * @var string */ protected $proxyClassTemplate = '; /** * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE\'S PROXY GENERATOR */ class extends \ implements \ { /** * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with * three parameters, being respectively the proxy object to be initialized, the method that triggered the * initialization process and an array of ordered parameters that were passed to that method. * * @see \Doctrine\Common\Proxy\Proxy::__setInitializer */ public $__initializer__; /** * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object * * @see \Doctrine\Common\Proxy\Proxy::__setCloner */ public $__cloner__; /** * @var boolean flag indicating if this object was already initialized * * @see \Doctrine\Persistence\Proxy::__isInitialized */ public $__isInitialized__ = false; /** * @var array properties to be lazy loaded, indexed by property name */ public static $lazyPropertiesNames = ; /** * @var array default values of properties to be lazy loaded, with keys being the property names * * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties */ public static $lazyPropertiesDefaults = ; /** * Forces initialization of the proxy */ public function __load(): void { $this->__initializer__ && $this->__initializer__->__invoke($this, \'__load\', []); } /** * {@inheritDoc} * @internal generated method: use only when explicitly handling proxy specific loading logic */ public function __isInitialized(): bool { return $this->__isInitialized__; } /** * {@inheritDoc} * @internal generated method: use only when explicitly handling proxy specific loading logic */ public function __setInitialized($initialized): void { $this->__isInitialized__ = $initialized; } /** * {@inheritDoc} * @internal generated method: use only when explicitly handling proxy specific loading logic */ public function __setInitializer(\Closure $initializer = null): void { $this->__initializer__ = $initializer; } /** * {@inheritDoc} * @internal generated method: use only when explicitly handling proxy specific loading logic */ public function __getInitializer(): ?\Closure { return $this->__initializer__; } /** * {@inheritDoc} * @internal generated method: use only when explicitly handling proxy specific loading logic */ public function __setCloner(\Closure $cloner = null): void { $this->__cloner__ = $cloner; } /** * {@inheritDoc} * @internal generated method: use only when explicitly handling proxy specific cloning logic */ public function __getCloner(): ?\Closure { return $this->__cloner__; } /** * {@inheritDoc} * @internal generated method: use only when explicitly handling proxy specific loading logic * @deprecated no longer in use - generated code now relies on internal components rather than generated public API * @static */ public function __getLazyProperties(): array { return self::$lazyPropertiesDefaults; } } '; /** * Initializes a new instance of the ProxyFactory class that is * connected to the given EntityManager. * * @param string $proxyDirectory The directory to use for the proxy classes. It must exist. * @param string $proxyNamespace The namespace to use for the proxy classes. * * @throws InvalidArgumentException */ public function __construct($proxyDirectory, $proxyNamespace) { if (! $proxyDirectory) { throw InvalidArgumentException::proxyDirectoryRequired(); } if (! $proxyNamespace) { throw InvalidArgumentException::proxyNamespaceRequired(); } $this->proxyDirectory = $proxyDirectory; $this->proxyNamespace = $proxyNamespace; } /** * Sets a placeholder to be replaced in the template. * * @param string $name * @param string|callable $placeholder * * @throws InvalidArgumentException */ public function setPlaceholder($name, $placeholder) { if (! is_string($placeholder) && ! is_callable($placeholder)) { throw InvalidArgumentException::invalidPlaceholder($name); } $this->placeholders[$name] = $placeholder; } /** * Sets the base template used to create proxy classes. * * @param string $proxyClassTemplate */ public function setProxyClassTemplate($proxyClassTemplate) { $this->proxyClassTemplate = (string) $proxyClassTemplate; } /** * Generates a proxy class file. * * @param ClassMetadata $class Metadata for the original class. * @param string|bool $fileName Filename (full path) for the generated class. If none is given, eval() is used. * * @throws InvalidArgumentException * @throws UnexpectedValueException */ public function generateProxyClass(ClassMetadata $class, $fileName = false) { $this->verifyClassCanBeProxied($class); preg_match_all('(<([a-zA-Z]+)>)', $this->proxyClassTemplate, $placeholderMatches); $placeholderMatches = array_combine($placeholderMatches[0], $placeholderMatches[1]); $placeholders = []; foreach ($placeholderMatches as $placeholder => $name) { $placeholders[$placeholder] = $this->placeholders[$name] ?? [$this, 'generate' . $name]; } foreach ($placeholders as & $placeholder) { if (! is_callable($placeholder)) { continue; } $placeholder = call_user_func($placeholder, $class); } $proxyCode = strtr($this->proxyClassTemplate, $placeholders); if (! $fileName) { $proxyClassName = $this->generateNamespace($class) . '\\' . $this->generateProxyShortClassName($class); if (! class_exists($proxyClassName)) { eval(substr($proxyCode, 5)); } return; } $parentDirectory = dirname($fileName); if (! is_dir($parentDirectory) && (@mkdir($parentDirectory, 0775, true) === false)) { throw UnexpectedValueException::proxyDirectoryNotWritable($this->proxyDirectory); } if (! is_writable($parentDirectory)) { throw UnexpectedValueException::proxyDirectoryNotWritable($this->proxyDirectory); } $tmpFileName = $fileName . '.' . bin2hex(random_bytes(12)); file_put_contents($tmpFileName, $proxyCode); @chmod($tmpFileName, 0664); rename($tmpFileName, $fileName); } /** @throws InvalidArgumentException */ private function verifyClassCanBeProxied(ClassMetadata $class) { if ($class->getReflectionClass()->isFinal()) { throw InvalidArgumentException::classMustNotBeFinal($class->getName()); } if ($class->getReflectionClass()->isAbstract()) { throw InvalidArgumentException::classMustNotBeAbstract($class->getName()); } if (PHP_VERSION_ID >= 80200 && $class->getReflectionClass()->isReadOnly()) { throw InvalidArgumentException::classMustNotBeReadOnly($class->getName()); } } /** * Generates the proxy short class name to be used in the template. * * @return string */ private function generateProxyShortClassName(ClassMetadata $class) { $proxyClassName = ClassUtils::generateProxyClassName($class->getName(), $this->proxyNamespace); $parts = explode('\\', strrev($proxyClassName), 2); return strrev($parts[0]); } /** * Generates the proxy namespace. * * @return string */ private function generateNamespace(ClassMetadata $class) { $proxyClassName = ClassUtils::generateProxyClassName($class->getName(), $this->proxyNamespace); $parts = explode('\\', strrev($proxyClassName), 2); return strrev($parts[1]); } /** * Enums must have a use statement when used as public property defaults. */ public function generateEnumUseStatements(ClassMetadata $class): string { if (PHP_VERSION_ID < 80100) { return "\n"; } $defaultProperties = $class->getReflectionClass()->getDefaultProperties(); $lazyLoadedPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); $enumClasses = []; foreach ($class->getReflectionClass()->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { $name = $property->getName(); if (! in_array($name, $lazyLoadedPublicProperties, true)) { continue; } if (array_key_exists($name, $defaultProperties) && $defaultProperties[$name] instanceof BackedEnum) { $enumClassNameParts = explode('\\', get_class($defaultProperties[$name])); $enumClasses[] = $enumClassNameParts[0]; } } return implode( "\n", array_map( static function ($className) { return 'use ' . $className . ';'; }, array_unique($enumClasses) ) ) . "\n"; } /** * Generates the original class name. * * @return string */ private function generateClassName(ClassMetadata $class) { return ltrim($class->getName(), '\\'); } /** * Generates the array representation of lazy loaded public properties and their default values. * * @return string */ private function generateLazyPropertiesNames(ClassMetadata $class) { $lazyPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); $values = []; foreach ($lazyPublicProperties as $name) { $values[$name] = null; } return var_export($values, true); } /** * Generates the array representation of lazy loaded public properties names. * * @return string */ private function generateLazyPropertiesDefaults(ClassMetadata $class) { return var_export($this->getLazyLoadedPublicProperties($class), true); } /** * Generates the constructor code (un-setting public lazy loaded properties, setting identifier field values). * * @return string */ private function generateConstructorImpl(ClassMetadata $class) { $constructorImpl = <<<'EOT' public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) { EOT; $toUnset = array_map(static function (string $name): string { return '$this->' . $name; }, $this->getLazyLoadedPublicPropertiesNames($class)); return $constructorImpl . ($toUnset === [] ? '' : ' unset(' . implode(', ', $toUnset) . ");\n") . <<<'EOT' $this->__initializer__ = $initializer; $this->__cloner__ = $cloner; } EOT; } /** * Generates the magic getter invoked when lazy loaded public properties are requested. * * @return string */ private function generateMagicGet(ClassMetadata $class) { $lazyPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); $reflectionClass = $class->getReflectionClass(); $hasParentGet = false; $returnReference = ''; $inheritDoc = ''; $name = '$name'; $parametersString = '$name'; $returnTypeHint = null; if ($reflectionClass->hasMethod('__get')) { $hasParentGet = true; $inheritDoc = '{@inheritDoc}'; $methodReflection = $reflectionClass->getMethod('__get'); if ($methodReflection->returnsReference()) { $returnReference = '& '; } $methodParameters = $methodReflection->getParameters(); $name = '$' . $methodParameters[0]->getName(); $parametersString = $this->buildParametersString($methodReflection->getParameters(), ['name']); $returnTypeHint = $this->getMethodReturnType($methodReflection); } if (empty($lazyPublicProperties) && ! $hasParentGet) { return ''; } $magicGet = <<__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); EOT; if ($returnTypeHint === ': void') { $magicGet .= "\n return;"; } else { $magicGet .= "\n return \$this->\$name;"; } $magicGet .= <<<'EOT' } EOT; } if ($hasParentGet) { $magicGet .= <<<'EOT' $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); EOT; if ($returnTypeHint === ': void') { $magicGet .= <<<'EOT' parent::__get($name); return; EOT; } elseif ($returnTypeHint === ': never') { $magicGet .= <<<'EOT' parent::__get($name); EOT; } else { $magicGet .= <<<'EOT' return parent::__get($name); EOT; } } else { $magicGet .= sprintf(<<getLazyLoadedPublicPropertiesNames($class); $reflectionClass = $class->getReflectionClass(); $hasParentSet = false; $inheritDoc = ''; $parametersString = '$name, $value'; $returnTypeHint = null; if ($reflectionClass->hasMethod('__set')) { $hasParentSet = true; $inheritDoc = '{@inheritDoc}'; $methodReflection = $reflectionClass->getMethod('__set'); $parametersString = $this->buildParametersString($methodReflection->getParameters(), ['name', 'value']); $returnTypeHint = $this->getMethodReturnType($methodReflection); } if (empty($lazyPublicProperties) && ! $hasParentSet) { return ''; } $magicSet = <<__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); $this->$name = $value; return; } EOT; } if ($hasParentSet) { $magicSet .= <<<'EOT' $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); EOT; if ($returnTypeHint === ': void') { $magicSet .= <<<'EOT' parent::__set($name, $value); return; EOT; } elseif ($returnTypeHint === ': never') { $magicSet .= <<<'EOT' parent::__set($name, $value); EOT; } else { $magicSet .= <<<'EOT' return parent::__set($name, $value); EOT; } } else { $magicSet .= ' $this->$name = $value;'; } return $magicSet . "\n }"; } /** * Generates the magic issetter invoked when lazy loaded public properties are checked against isset(). * * @return string */ private function generateMagicIsset(ClassMetadata $class) { $lazyPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); $hasParentIsset = $class->getReflectionClass()->hasMethod('__isset'); $parametersString = '$name'; $returnTypeHint = null; if ($hasParentIsset) { $methodReflection = $class->getReflectionClass()->getMethod('__isset'); $parametersString = $this->buildParametersString($methodReflection->getParameters(), ['name']); $returnTypeHint = $this->getMethodReturnType($methodReflection); } if (empty($lazyPublicProperties) && ! $hasParentIsset) { return ''; } $inheritDoc = $hasParentIsset ? '{@inheritDoc}' : ''; $magicIsset = <<__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); return isset($this->$name); } EOT; } if ($hasParentIsset) { $magicIsset .= <<<'EOT' $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); return parent::__isset($name); EOT; } else { $magicIsset .= ' return false;'; } return $magicIsset . "\n }"; } /** * Generates implementation for the `__sleep` method of proxies. * * @return string */ private function generateSleepImpl(ClassMetadata $class) { $reflectionClass = $class->getReflectionClass(); $hasParentSleep = $reflectionClass->hasMethod('__sleep'); $inheritDoc = $hasParentSleep ? '{@inheritDoc}' : ''; $returnTypeHint = $hasParentSleep ? $this->getMethodReturnType($reflectionClass->getMethod('__sleep')) : ''; $sleepImpl = <<__isInitialized__) { $properties = array_diff($properties, array_keys(self::$lazyPropertiesNames)); } return $properties; } EOT; } $allProperties = ['__isInitialized__']; foreach ($class->getReflectionClass()->getProperties() as $prop) { assert($prop instanceof ReflectionProperty); if ($prop->isStatic()) { continue; } $allProperties[] = $prop->isPrivate() ? "\0" . $prop->getDeclaringClass()->getName() . "\0" . $prop->getName() : $prop->getName(); } $lazyPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); $protectedProperties = array_diff($allProperties, $lazyPublicProperties); foreach ($allProperties as &$property) { $property = var_export($property, true); } foreach ($protectedProperties as &$property) { $property = var_export($property, true); } $allProperties = implode(', ', $allProperties); $protectedProperties = implode(', ', $protectedProperties); return $sleepImpl . <<__isInitialized__) { return [$allProperties]; } return [$protectedProperties]; } EOT; } /** * Generates implementation for the `__wakeup` method of proxies. * * @return string */ private function generateWakeupImpl(ClassMetadata $class) { $reflectionClass = $class->getReflectionClass(); $hasParentWakeup = $reflectionClass->hasMethod('__wakeup'); $unsetPublicProperties = []; foreach ($this->getLazyLoadedPublicPropertiesNames($class) as $lazyPublicProperty) { $unsetPublicProperties[] = '$this->' . $lazyPublicProperty; } $shortName = $this->generateProxyShortClassName($class); $inheritDoc = $hasParentWakeup ? '{@inheritDoc}' : ''; $returnTypeHint = $hasParentWakeup ? $this->getMethodReturnType($reflectionClass->getMethod('__wakeup')) : ''; $wakeupImpl = <<__isInitialized__) { \$this->__initializer__ = function ($shortName \$proxy) { \$proxy->__setInitializer(null); \$proxy->__setCloner(null); \$existingProperties = get_object_vars(\$proxy); foreach (\$proxy::\$lazyPropertiesDefaults as \$property => \$defaultValue) { if ( ! array_key_exists(\$property, \$existingProperties)) { \$proxy->\$property = \$defaultValue; } } }; EOT; if (! empty($unsetPublicProperties)) { $wakeupImpl .= "\n unset(" . implode(', ', $unsetPublicProperties) . ');'; } $wakeupImpl .= "\n }"; if ($hasParentWakeup) { $wakeupImpl .= "\n parent::__wakeup();"; } $wakeupImpl .= "\n }"; return $wakeupImpl; } /** * Generates implementation for the `__clone` method of proxies. * * @return string */ private function generateCloneImpl(ClassMetadata $class) { $reflectionClass = $class->getReflectionClass(); $hasParentClone = $reflectionClass->hasMethod('__clone'); $returnTypeHint = $hasParentClone ? $this->getMethodReturnType($reflectionClass->getMethod('__clone')) : ''; $inheritDoc = $hasParentClone ? '{@inheritDoc}' : ''; $callParentClone = $hasParentClone ? "\n parent::__clone();\n" : ''; return <<__cloner__ && \$this->__cloner__->__invoke(\$this, '__clone', []); $callParentClone } EOT; } /** * Generates decorated methods by picking those available in the parent class. * * @return string */ private function generateMethods(ClassMetadata $class) { $methods = ''; $methodNames = []; $reflectionMethods = $class->getReflectionClass()->getMethods(ReflectionMethod::IS_PUBLIC); $skippedMethods = [ '__sleep' => true, '__clone' => true, '__wakeup' => true, '__get' => true, '__set' => true, '__isset' => true, ]; foreach ($reflectionMethods as $method) { $name = $method->getName(); if ( $method->isConstructor() || isset($skippedMethods[strtolower($name)]) || isset($methodNames[$name]) || $method->isFinal() || $method->isStatic() || ( ! $method->isPublic()) ) { continue; } $methodNames[$name] = true; $methods .= "\n /**\n" . " * {@inheritDoc}\n" . " */\n" . ' public function '; if ($method->returnsReference()) { $methods .= '&'; } $methods .= $name . '(' . $this->buildParametersString($method->getParameters()) . ')'; $methods .= $this->getMethodReturnType($method); $methods .= "\n" . ' {' . "\n"; if ($this->isShortIdentifierGetter($method, $class)) { $identifier = lcfirst(substr($name, 3)); $fieldType = $class->getTypeOfField($identifier); $cast = in_array($fieldType, ['integer', 'smallint']) ? '(int) ' : ''; $methods .= ' if ($this->__isInitialized__ === false) {' . "\n"; $methods .= ' '; $methods .= $this->shouldProxiedMethodReturn($method) ? 'return ' : ''; $methods .= $cast . ' parent::' . $method->getName() . "();\n"; $methods .= ' }' . "\n\n"; } $invokeParamsString = implode(', ', $this->getParameterNamesForInvoke($method->getParameters())); $callParamsString = implode(', ', $this->getParameterNamesForParentCall($method->getParameters())); $methods .= "\n \$this->__initializer__ " . '&& $this->__initializer__->__invoke($this, ' . var_export($name, true) . ', [' . $invokeParamsString . ']);' . "\n\n " . ($this->shouldProxiedMethodReturn($method) ? 'return ' : '') . 'parent::' . $name . '(' . $callParamsString . ');' . "\n" . ' }' . "\n"; } return $methods; } /** * Generates the Proxy file name. * * @param string $className * @param string $baseDirectory Optional base directory for proxy file name generation. * If not specified, the directory configured on the Configuration of the * EntityManager will be used by this factory. * @psalm-param class-string $className * * @return string */ public function getProxyFileName($className, $baseDirectory = null) { $baseDirectory = $baseDirectory ?: $this->proxyDirectory; return rtrim($baseDirectory, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . Proxy::MARKER . str_replace('\\', '', $className) . '.php'; } /** * Checks if the method is a short identifier getter. * * What does this mean? For proxy objects the identifier is already known, * however accessing the getter for this identifier usually triggers the * lazy loading, leading to a query that may not be necessary if only the * ID is interesting for the userland code (for example in views that * generate links to the entity, but do not display anything else). * * @param ReflectionMethod $method * * @return bool */ private function isShortIdentifierGetter($method, ClassMetadata $class) { $identifier = lcfirst(substr($method->getName(), 3)); $startLine = $method->getStartLine(); $endLine = $method->getEndLine(); $cheapCheck = $method->getNumberOfParameters() === 0 && substr($method->getName(), 0, 3) === 'get' && in_array($identifier, $class->getIdentifier(), true) && $class->hasField($identifier) && ($endLine - $startLine <= 4); if ($cheapCheck) { $code = file($method->getFileName()); $code = trim(implode(' ', array_slice($code, $startLine - 1, $endLine - $startLine + 1))); $pattern = sprintf(self::PATTERN_MATCH_ID_METHOD, $method->getName(), $identifier); if (preg_match($pattern, $code)) { return true; } } return false; } /** * Generates the list of public properties to be lazy loaded. * * @return array */ private function getLazyLoadedPublicPropertiesNames(ClassMetadata $class): array { $properties = []; foreach ($class->getReflectionClass()->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { $name = $property->getName(); if ((! $class->hasField($name) && ! $class->hasAssociation($name)) || $class->isIdentifier($name)) { continue; } $properties[] = $name; } return $properties; } /** * Generates the list of default values of public properties. * * @return mixed[] */ private function getLazyLoadedPublicProperties(ClassMetadata $class) { $defaultProperties = $class->getReflectionClass()->getDefaultProperties(); $lazyLoadedPublicProperties = $this->getLazyLoadedPublicPropertiesNames($class); $defaultValues = []; foreach ($class->getReflectionClass()->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { $name = $property->getName(); if (! in_array($name, $lazyLoadedPublicProperties, true)) { continue; } if (array_key_exists($name, $defaultProperties)) { $defaultValues[$name] = $defaultProperties[$name]; } elseif (method_exists($property, 'getType')) { $propertyType = $property->getType(); if ($propertyType !== null && $propertyType->allowsNull()) { $defaultValues[$name] = null; } } } return $defaultValues; } /** * @param ReflectionParameter[] $parameters * @param string[] $renameParameters * * @return string */ private function buildParametersString(array $parameters, array $renameParameters = []) { $parameterDefinitions = []; $i = -1; foreach ($parameters as $param) { assert($param instanceof ReflectionParameter); $i++; $parameterDefinition = ''; $parameterType = $this->getParameterType($param); if ($parameterType !== null) { $parameterDefinition .= $parameterType . ' '; } if ($param->isPassedByReference()) { $parameterDefinition .= '&'; } if ($param->isVariadic()) { $parameterDefinition .= '...'; } $parameterDefinition .= '$' . ($renameParameters ? $renameParameters[$i] : $param->getName()); $parameterDefinition .= $this->getParameterDefaultValue($param); $parameterDefinitions[] = $parameterDefinition; } return implode(', ', $parameterDefinitions); } /** @return string|null */ private function getParameterType(ReflectionParameter $parameter) { if (! $parameter->hasType()) { return null; } $declaringFunction = $parameter->getDeclaringFunction(); assert($declaringFunction instanceof ReflectionMethod); return $this->formatType($parameter->getType(), $declaringFunction, $parameter); } /** @return string */ private function getParameterDefaultValue(ReflectionParameter $parameter) { if (! $parameter->isDefaultValueAvailable()) { return ''; } if (PHP_VERSION_ID < 80100 || is_scalar($parameter->getDefaultValue())) { return ' = ' . var_export($parameter->getDefaultValue(), true); } $value = rtrim(substr(explode('$' . $parameter->getName() . ' = ', (string) $parameter, 2)[1], 0, -2)); if (strpos($value, '\\') !== false || strpos($value, '::') !== false) { $value = preg_split("/('(?:[^'\\\\]*+(?:\\\\.)*+)*+')/", $value, -1, PREG_SPLIT_DELIM_CAPTURE); foreach ($value as $i => $part) { if ($i % 2 === 0) { $value[$i] = preg_replace('/(?getName(); }, $parameters ); } /** * @param ReflectionParameter[] $parameters * * @return string[] */ private function getParameterNamesForParentCall(array $parameters) { return array_map( static function (ReflectionParameter $parameter) { $name = ''; if ($parameter->isVariadic()) { $name .= '...'; } $name .= '$' . $parameter->getName(); return $name; }, $parameters ); } /** @return string */ private function getMethodReturnType(ReflectionMethod $method) { if (! $method->hasReturnType()) { return ''; } return ': ' . $this->formatType($method->getReturnType(), $method); } /** @return bool */ private function shouldProxiedMethodReturn(ReflectionMethod $method) { if (! $method->hasReturnType()) { return true; } return ! in_array( strtolower($this->formatType($method->getReturnType(), $method)), ['void', 'never'], true ); } /** @return string */ private function formatType( ReflectionType $type, ReflectionMethod $method, ?ReflectionParameter $parameter = null ) { if ($type instanceof ReflectionUnionType) { return implode('|', array_map( function (ReflectionType $unionedType) use ($method, $parameter) { if ($unionedType instanceof ReflectionIntersectionType) { return '(' . $this->formatType($unionedType, $method, $parameter) . ')'; } return $this->formatType($unionedType, $method, $parameter); }, $type->getTypes() )); } if ($type instanceof ReflectionIntersectionType) { return implode('&', array_map( function (ReflectionType $intersectedType) use ($method, $parameter) { return $this->formatType($intersectedType, $method, $parameter); }, $type->getTypes() )); } assert($type instanceof ReflectionNamedType); $name = $type->getName(); $nameLower = strtolower($name); if ($nameLower === 'static') { $name = 'static'; } if ($nameLower === 'self') { $name = $method->getDeclaringClass()->getName(); } if ($nameLower === 'parent') { $name = $method->getDeclaringClass()->getParentClass()->getName(); } if (! $type->isBuiltin() && ! class_exists($name) && ! interface_exists($name) && $name !== 'static') { if ($parameter !== null) { throw UnexpectedValueException::invalidParameterTypeHint( $method->getDeclaringClass()->getName(), $method->getName(), $parameter->getName() ); } throw UnexpectedValueException::invalidReturnTypeHint( $method->getDeclaringClass()->getName(), $method->getName() ); } if (! $type->isBuiltin() && $name !== 'static') { $name = '\\' . $name; } if ( $type->allowsNull() && ! in_array($name, ['mixed', 'null'], true) && ($parameter === null || ! $parameter->isDefaultValueAvailable() || $parameter->getDefaultValue() !== null) ) { $name = '?' . $name; } return $name; } } PKHv[!dProxy/AbstractProxyFactory.phpnu[proxyGenerator = $proxyGenerator; $this->metadataFactory = $metadataFactory; $this->autoGenerate = (int) $autoGenerate; if (! in_array($this->autoGenerate, self::AUTOGENERATE_MODES, true)) { throw InvalidArgumentException::invalidAutoGenerateMode($autoGenerate); } } /** * Gets a reference proxy instance for the entity of the given type and identified by * the given identifier. * * @param string $className * @param array $identifier * * @return Proxy * * @throws OutOfBoundsException */ public function getProxy($className, array $identifier) { $definition = $this->definitions[$className] ?? $this->getProxyDefinition($className); $fqcn = $definition->proxyClassName; $proxy = new $fqcn($definition->initializer, $definition->cloner); foreach ($definition->identifierFields as $idField) { if (! isset($identifier[$idField])) { throw OutOfBoundsException::missingPrimaryKeyValue($className, $idField); } $definition->reflectionFields[$idField]->setValue($proxy, $identifier[$idField]); } return $proxy; } /** * Generates proxy classes for all given classes. * * @param ClassMetadata[] $classes The classes (ClassMetadata instances) * for which to generate proxies. * @param string $proxyDir The target directory of the proxy classes. If not specified, the * directory configured on the Configuration of the EntityManager used * by this factory is used. * * @return int Number of generated proxies. */ public function generateProxyClasses(array $classes, $proxyDir = null) { $generated = 0; foreach ($classes as $class) { if ($this->skipClass($class)) { continue; } $proxyFileName = $this->proxyGenerator->getProxyFileName($class->getName(), $proxyDir); $this->proxyGenerator->generateProxyClass($class, $proxyFileName); $generated += 1; } return $generated; } /** * Reset initialization/cloning logic for an un-initialized proxy * * @return Proxy * * @throws InvalidArgumentException */ public function resetUninitializedProxy(Proxy $proxy) { if ($proxy->__isInitialized()) { throw InvalidArgumentException::unitializedProxyExpected($proxy); } $className = ClassUtils::getClass($proxy); $definition = $this->definitions[$className] ?? $this->getProxyDefinition($className); $proxy->__setInitializer($definition->initializer); $proxy->__setCloner($definition->cloner); return $proxy; } /** * Get a proxy definition for the given class name. * * @param string $className * @psalm-param class-string $className * * @return ProxyDefinition */ private function getProxyDefinition($className) { $classMetadata = $this->metadataFactory->getMetadataFor($className); $className = $classMetadata->getName(); // aliases and case sensitivity $this->definitions[$className] = $this->createProxyDefinition($className); $proxyClassName = $this->definitions[$className]->proxyClassName; if (! class_exists($proxyClassName, false)) { $fileName = $this->proxyGenerator->getProxyFileName($className); switch ($this->autoGenerate) { case self::AUTOGENERATE_NEVER: require $fileName; break; case self::AUTOGENERATE_FILE_NOT_EXISTS: if (! file_exists($fileName)) { $this->proxyGenerator->generateProxyClass($classMetadata, $fileName); } require $fileName; break; case self::AUTOGENERATE_ALWAYS: $this->proxyGenerator->generateProxyClass($classMetadata, $fileName); require $fileName; break; case self::AUTOGENERATE_EVAL: $this->proxyGenerator->generateProxyClass($classMetadata, false); break; case self::AUTOGENERATE_FILE_NOT_EXISTS_OR_CHANGED: if (! file_exists($fileName) || filemtime($fileName) < filemtime($classMetadata->getReflectionClass()->getFileName())) { $this->proxyGenerator->generateProxyClass($classMetadata, $fileName); } require $fileName; break; } } return $this->definitions[$className]; } /** * Determine if this class should be skipped during proxy generation. * * @return bool */ abstract protected function skipClass(ClassMetadata $metadata); /** * @param string $className * @psalm-param class-string $className * * @return ProxyDefinition */ abstract protected function createProxyDefinition($className); } PKHv[~"Proxy/Exception/ProxyException.phpnu[ */ public $identifierFields; /** @var ReflectionProperty[] */ public $reflectionFields; /** @var callable */ public $initializer; /** @var callable */ public $cloner; /** * @param string $proxyClassName * @param array $identifierFields * @param array $reflectionFields * @param callable $initializer * @param callable $cloner */ public function __construct($proxyClassName, array $identifierFields, array $reflectionFields, $initializer, $cloner) { $this->proxyClassName = $proxyClassName; $this->identifierFields = $identifierFields; $this->reflectionFields = $reflectionFields; $this->initializer = $initializer; $this->cloner = $cloner; } } PKHv[)Proxy/Proxy.phpnu[ */ interface Proxy extends BaseProxy { /** * Marks the proxy as initialized or not. * * @param bool $initialized * * @return void */ public function __setInitialized($initialized); /** * Sets the initializer callback to be used when initializing the proxy. That * initializer should accept 3 parameters: $proxy, $method and $params. Those * are respectively the proxy object that is being initialized, the method name * that triggered initialization and the parameters passed to that method. * * @return void */ public function __setInitializer(?Closure $initializer = null); /** * Retrieves the initializer callback used to initialize the proxy. * * @see __setInitializer * * @return Closure|null */ public function __getInitializer(); /** * Sets the callback to be used when cloning the proxy. That initializer should accept * a single parameter, which is the cloned proxy instance itself. * * @return void */ public function __setCloner(?Closure $cloner = null); /** * Retrieves the callback to be used when cloning the proxy. * * @see __setCloner * * @return Closure|null */ public function __getCloner(); /** * Retrieves the list of lazy loaded properties for a given proxy * * @return array Keys are the property names, and values are the default values * for those properties. */ public function __getLazyProperties(); } PKHv[B6 Proxy/Autoloader.phpnu[ClassLoader is an autoloader for class files that can be * installed on the SPL autoload stack. It is a class loader that either loads only classes * of a specific namespace or all namespaces and it is suitable for working together * with other autoloaders in the SPL autoload stack. * * If no include path is configured through the constructor or {@link setIncludePath}, a ClassLoader * relies on the PHP include_path. * * @deprecated The ClassLoader is deprecated and will be removed in version 4.0 of doctrine/common. */ class ClassLoader { /** * PHP file extension. * * @var string */ protected $fileExtension = '.php'; /** * Current namespace. * * @var string|null */ protected $namespace; /** * Current include path. * * @var string|null */ protected $includePath; /** * PHP namespace separator. * * @var string */ protected $namespaceSeparator = '\\'; /** * Creates a new ClassLoader that loads classes of the * specified namespace from the specified include path. * * If no include path is given, the ClassLoader relies on the PHP include_path. * If neither a namespace nor an include path is given, the ClassLoader will * be responsible for loading all classes, thereby relying on the PHP include_path. * * @param string|null $ns The namespace of the classes to load. * @param string|null $includePath The base include path to use. */ public function __construct($ns = null, $includePath = null) { $this->namespace = $ns; $this->includePath = $includePath; } /** * Sets the namespace separator used by classes in the namespace of this ClassLoader. * * @param string $sep The separator to use. * * @return void */ public function setNamespaceSeparator($sep) { $this->namespaceSeparator = $sep; } /** * Gets the namespace separator used by classes in the namespace of this ClassLoader. * * @return string */ public function getNamespaceSeparator() { return $this->namespaceSeparator; } /** * Sets the base include path for all class files in the namespace of this ClassLoader. * * @param string|null $includePath * * @return void */ public function setIncludePath($includePath) { $this->includePath = $includePath; } /** * Gets the base include path for all class files in the namespace of this ClassLoader. * * @return string|null */ public function getIncludePath() { return $this->includePath; } /** * Sets the file extension of class files in the namespace of this ClassLoader. * * @param string $fileExtension * * @return void */ public function setFileExtension($fileExtension) { $this->fileExtension = $fileExtension; } /** * Gets the file extension of class files in the namespace of this ClassLoader. * * @return string */ public function getFileExtension() { return $this->fileExtension; } /** * Registers this ClassLoader on the SPL autoload stack. * * @return void */ public function register() { spl_autoload_register([$this, 'loadClass']); } /** * Removes this ClassLoader from the SPL autoload stack. * * @return void */ public function unregister() { spl_autoload_unregister([$this, 'loadClass']); } /** * Loads the given class or interface. * * @param string $className The name of the class to load. * @psalm-param class-string $className * * @return bool TRUE if the class has been successfully loaded, FALSE otherwise. */ public function loadClass($className) { if (self::typeExists($className)) { return true; } if (! $this->canLoadClass($className)) { return false; } require($this->includePath !== null ? $this->includePath . DIRECTORY_SEPARATOR : '') . str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension; return self::typeExists($className); } /** * Asks this ClassLoader whether it can potentially load the class (file) with * the given name. * * @param string $className The fully-qualified name of the class. * @psalm-param class-string $className * * @return bool TRUE if this ClassLoader can load the class, FALSE otherwise. */ public function canLoadClass($className) { if ($this->namespace !== null && strpos($className, $this->namespace . $this->namespaceSeparator) !== 0) { return false; } $file = str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension; if ($this->includePath !== null) { return is_file($this->includePath . DIRECTORY_SEPARATOR . $file); } return stream_resolve_include_path($file) !== false; } /** * Checks whether a class with a given name exists. A class "exists" if it is either * already defined in the current request or if there is an autoloader on the SPL * autoload stack that is a) responsible for the class in question and b) is able to * load a class file in which the class definition resides. * * If the class is not already defined, each autoloader in the SPL autoload stack * is asked whether it is able to tell if the class exists. If the autoloader is * a ClassLoader, {@link canLoadClass} is used, otherwise the autoload * function of the autoloader is invoked and expected to return a value that * evaluates to TRUE if the class (file) exists. As soon as one autoloader reports * that the class exists, TRUE is returned. * * Note that, depending on what kinds of autoloaders are installed on the SPL * autoload stack, the class (file) might already be loaded as a result of checking * for its existence. This is not the case with a ClassLoader, who separates * these responsibilities. * * @param string $className The fully-qualified name of the class. * @psalm-param class-string $className * * @return bool TRUE if the class exists as per the definition given above, FALSE otherwise. */ public static function classExists($className) { return self::typeExists($className, true); } /** * Gets the ClassLoader from the SPL autoload stack that is responsible * for (and is able to load) the class with the given name. * * @param string $className The name of the class. * @psalm-param class-string $className * * @return ClassLoader|null The ClassLoader for the class or NULL if no such ClassLoader exists. */ public static function getClassLoader($className) { foreach (spl_autoload_functions() as $loader) { if (! is_array($loader)) { continue; } $classLoader = reset($loader); if ($classLoader instanceof ClassLoader && $classLoader->canLoadClass($className)) { return $classLoader; } } return null; } /** * Checks whether a given type exists * * @param string $type * @param bool $autoload * * @return bool */ private static function typeExists($type, $autoload = false) { return class_exists($type, $autoload) || interface_exists($type, $autoload) || trait_exists($type, $autoload); } } PKHv[Tz Util/ClassUtils.phpnu[>|class-string $className * * @return string * @psalm-return class-string * * @template T of object */ public static function getRealClass($className) { $pos = strrpos($className, '\\' . Proxy::MARKER . '\\'); if ($pos === false) { /** @psalm-var class-string */ return $className; } return substr($className, $pos + Proxy::MARKER_LENGTH + 2); } /** * Gets the real class name of an object (even if its a proxy). * * @param object $object * @psalm-param Proxy|T $object * * @return string * @psalm-return class-string * * @template T of object */ public static function getClass($object) { return self::getRealClass(get_class($object)); } /** * Gets the real parent class name of a class or object. * * @param string $className * @psalm-param class-string $className * * @return string * @psalm-return class-string */ public static function getParentClass($className) { return get_parent_class(self::getRealClass($className)); } /** * Creates a new reflection class. * * @param string $className * @psalm-param class-string $className * * @return ReflectionClass */ public static function newReflectionClass($className) { return new ReflectionClass(self::getRealClass($className)); } /** * Creates a new reflection object. * * @param object $object * * @return ReflectionClass */ public static function newReflectionObject($object) { return self::newReflectionClass(self::getClass($object)); } /** * Given a class name and a proxy namespace returns the proxy name. * * @param string $className * @param string $proxyNamespace * @psalm-param class-string $className * * @return string * @psalm-return class-string */ public static function generateProxyClassName($className, $proxyNamespace) { return rtrim($proxyNamespace, '\\') . '\\' . Proxy::MARKER . '\\' . ltrim($className, '\\'); } } PKHv[IiiUtil/Debug.phpnu[toArray(); } if (! $maxDepth) { return is_object($var) ? get_class($var) : (is_array($var) ? 'Array(' . count($var) . ')' : $var); } if (is_array($var)) { $return = []; foreach ($var as $k => $v) { $return[$k] = self::export($v, $maxDepth - 1); } return $return; } if (! $isObj) { return $var; } $return = new stdClass(); if ($var instanceof DateTimeInterface) { $return->__CLASS__ = get_class($var); $return->date = $var->format('c'); $return->timezone = $var->getTimezone()->getName(); return $return; } $return->__CLASS__ = ClassUtils::getClass($var); if ($var instanceof Proxy) { $return->__IS_PROXY__ = true; $return->__PROXY_INITIALIZED__ = $var->__isInitialized(); } if ($var instanceof ArrayObject || $var instanceof ArrayIterator) { $return->__STORAGE__ = self::export($var->getArrayCopy(), $maxDepth - 1); } return self::fillReturnWithClassAttributes($var, $return, $maxDepth); } /** * Fill the $return variable with class attributes * Based on obj2array function from {@see https://secure.php.net/manual/en/function.get-object-vars.php#47075} * * @param object $var * @param int $maxDepth * * @return mixed */ private static function fillReturnWithClassAttributes($var, stdClass $return, $maxDepth) { $clone = (array) $var; foreach (array_keys($clone) as $key) { $aux = explode("\0", $key); $name = end($aux); if ($aux[0] === '') { $name .= ':' . ($aux[1] === '*' ? 'protected' : $aux[1] . ':private'); } $return->$name = self::export($clone[$key], $maxDepth - 1); } return $return; } /** * Returns a string representation of an object. * * @param object $obj * * @return string */ public static function toString($obj) { return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_hash($obj); } } PKHv[LCommonException.phpnu[stream = $stream; $this->maxLength = $maxLength; } public function write($string): int { $diff = $this->maxLength - $this->stream->getSize(); // Begin returning 0 when the underlying stream is too large. if ($diff <= 0) { return 0; } // Write the stream or a subset of the stream if needed. if (strlen($string) < $diff) { return $this->stream->write($string); } return $this->stream->write(substr($string, 0, $diff)); } } PKstream = $stream; $this->setLimit($limit); $this->setOffset($offset); } public function eof(): bool { // Always return true if the underlying stream is EOF if ($this->stream->eof()) { return true; } // No limit and the underlying stream is not at EOF if ($this->limit === -1) { return false; } return $this->stream->tell() >= $this->offset + $this->limit; } /** * Returns the size of the limited subset of data */ public function getSize(): ?int { if (null === ($length = $this->stream->getSize())) { return null; } elseif ($this->limit === -1) { return $length - $this->offset; } else { return min($this->limit, $length - $this->offset); } } /** * Allow for a bounded seek on the read limited stream */ public function seek($offset, $whence = SEEK_SET): void { if ($whence !== SEEK_SET || $offset < 0) { throw new \RuntimeException(sprintf( 'Cannot seek to offset %s with whence %s', $offset, $whence )); } $offset += $this->offset; if ($this->limit !== -1) { if ($offset > $this->offset + $this->limit) { $offset = $this->offset + $this->limit; } } $this->stream->seek($offset); } /** * Give a relative tell() */ public function tell(): int { return $this->stream->tell() - $this->offset; } /** * Set the offset to start limiting from * * @param int $offset Offset to seek to and begin byte limiting from * * @throws \RuntimeException if the stream cannot be seeked. */ public function setOffset(int $offset): void { $current = $this->stream->tell(); if ($current !== $offset) { // If the stream cannot seek to the offset position, then read to it if ($this->stream->isSeekable()) { $this->stream->seek($offset); } elseif ($current > $offset) { throw new \RuntimeException("Could not seek to stream offset $offset"); } else { $this->stream->read($offset - $current); } } $this->offset = $offset; } /** * Set the limit of bytes that the decorator allows to be read from the * stream. * * @param int $limit Number of bytes to allow to be read from the stream. * Use -1 for no limit. */ public function setLimit(int $limit): void { $this->limit = $limit; } public function read($length): string { if ($this->limit === -1) { return $this->stream->read($length); } // Check if the current position is less than the total allowed // bytes + original offset $remaining = ($this->offset + $this->limit) - $this->stream->tell(); if ($remaining > 0) { // Only return the amount of requested data, ensuring that the byte // limit is not exceeded return $this->stream->read(min($remaining, $length)); } return ''; } } PKaddStream($stream); } } public function __toString(): string { try { $this->rewind(); return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); return ''; } } /** * Add a stream to the AppendStream * * @param StreamInterface $stream Stream to append. Must be readable. * * @throws \InvalidArgumentException if the stream is not readable */ public function addStream(StreamInterface $stream): void { if (!$stream->isReadable()) { throw new \InvalidArgumentException('Each stream must be readable'); } // The stream is only seekable if all streams are seekable if (!$stream->isSeekable()) { $this->seekable = false; } $this->streams[] = $stream; } public function getContents(): string { return Utils::copyToString($this); } /** * Closes each attached stream. */ public function close(): void { $this->pos = $this->current = 0; $this->seekable = true; foreach ($this->streams as $stream) { $stream->close(); } $this->streams = []; } /** * Detaches each attached stream. * * Returns null as it's not clear which underlying stream resource to return. */ public function detach() { $this->pos = $this->current = 0; $this->seekable = true; foreach ($this->streams as $stream) { $stream->detach(); } $this->streams = []; return null; } public function tell(): int { return $this->pos; } /** * Tries to calculate the size by adding the size of each stream. * * If any of the streams do not return a valid number, then the size of the * append stream cannot be determined and null is returned. */ public function getSize(): ?int { $size = 0; foreach ($this->streams as $stream) { $s = $stream->getSize(); if ($s === null) { return null; } $size += $s; } return $size; } public function eof(): bool { return !$this->streams || ($this->current >= count($this->streams) - 1 && $this->streams[$this->current]->eof()); } public function rewind(): void { $this->seek(0); } /** * Attempts to seek to the given position. Only supports SEEK_SET. */ public function seek($offset, $whence = SEEK_SET): void { if (!$this->seekable) { throw new \RuntimeException('This AppendStream is not seekable'); } elseif ($whence !== SEEK_SET) { throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); } $this->pos = $this->current = 0; // Rewind each stream foreach ($this->streams as $i => $stream) { try { $stream->rewind(); } catch (\Exception $e) { throw new \RuntimeException('Unable to seek stream ' .$i.' of the AppendStream', 0, $e); } } // Seek to the actual position by reading from each stream while ($this->pos < $offset && !$this->eof()) { $result = $this->read(min(8096, $offset - $this->pos)); if ($result === '') { break; } } } /** * Reads from all of the appended streams until the length is met or EOF. */ public function read($length): string { $buffer = ''; $total = count($this->streams) - 1; $remaining = $length; $progressToNext = false; while ($remaining > 0) { // Progress to the next stream if needed. if ($progressToNext || $this->streams[$this->current]->eof()) { $progressToNext = false; if ($this->current === $total) { break; } ++$this->current; } $result = $this->streams[$this->current]->read($remaining); if ($result === '') { $progressToNext = true; continue; } $buffer .= $result; $remaining = $length - strlen($buffer); } $this->pos += strlen($buffer); return $buffer; } public function isReadable(): bool { return true; } public function isWritable(): bool { return false; } public function isSeekable(): bool { return $this->seekable; } public function write($string): int { throw new \RuntimeException('Cannot write to an AppendStream'); } /** * @return mixed */ public function getMetadata($key = null) { return $key ? null : []; } } PKgetHost(), $modified->getHost()) !== 0) { return true; } if ($original->getScheme() !== $modified->getScheme()) { return true; } if (self::computePort($original) !== self::computePort($modified)) { return true; } return false; } private static function computePort(UriInterface $uri): int { $port = $uri->getPort(); if (null !== $port) { return $port; } return 'https' === $uri->getScheme() ? 443 : 80; } private function __construct() { // cannot be instantiated } } PK '1', 'foo[b]' => '2'])`. * * @param string $str Query string to parse * @param int|bool $urlEncoding How the query string is encoded */ public static function parse(string $str, $urlEncoding = true): array { $result = []; if ($str === '') { return $result; } if ($urlEncoding === true) { $decoder = function ($value) { return rawurldecode(str_replace('+', ' ', (string) $value)); }; } elseif ($urlEncoding === PHP_QUERY_RFC3986) { $decoder = 'rawurldecode'; } elseif ($urlEncoding === PHP_QUERY_RFC1738) { $decoder = 'urldecode'; } else { $decoder = function ($str) { return $str; }; } foreach (explode('&', $str) as $kvp) { $parts = explode('=', $kvp, 2); $key = $decoder($parts[0]); $value = isset($parts[1]) ? $decoder($parts[1]) : null; if (!array_key_exists($key, $result)) { $result[$key] = $value; } else { if (!is_array($result[$key])) { $result[$key] = [$result[$key]]; } $result[$key][] = $value; } } return $result; } /** * Build a query string from an array of key value pairs. * * This function can use the return value of `parse()` to build a query * string. This function does not modify the provided keys when an array is * encountered (like `http_build_query()` would). * * @param array $params Query string parameters. * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 * to encode using RFC3986, or PHP_QUERY_RFC1738 * to encode using RFC1738. */ public static function build(array $params, $encoding = PHP_QUERY_RFC3986): string { if (!$params) { return ''; } if ($encoding === false) { $encoder = function (string $str): string { return $str; }; } elseif ($encoding === PHP_QUERY_RFC3986) { $encoder = 'rawurlencode'; } elseif ($encoding === PHP_QUERY_RFC1738) { $encoder = 'urlencode'; } else { throw new \InvalidArgumentException('Invalid type'); } $qs = ''; foreach ($params as $k => $v) { $k = $encoder((string) $k); if (!is_array($v)) { $qs .= $k; $v = is_bool($v) ? (int) $v : $v; if ($v !== null) { $qs .= '='.$encoder((string) $v); } $qs .= '&'; } else { foreach ($v as $vv) { $qs .= $k; $vv = is_bool($vv) ? (int) $vv : $vv; if ($vv !== null) { $qs .= '='.$encoder((string) $vv); } $qs .= '&'; } } } return $qs ? (string) substr($qs, 0, -1) : ''; } } PKgetScheme() != '') { return $rel->withPath(self::removeDotSegments($rel->getPath())); } if ($rel->getAuthority() != '') { $targetAuthority = $rel->getAuthority(); $targetPath = self::removeDotSegments($rel->getPath()); $targetQuery = $rel->getQuery(); } else { $targetAuthority = $base->getAuthority(); if ($rel->getPath() === '') { $targetPath = $base->getPath(); $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); } else { if ($rel->getPath()[0] === '/') { $targetPath = $rel->getPath(); } else { if ($targetAuthority != '' && $base->getPath() === '') { $targetPath = '/'.$rel->getPath(); } else { $lastSlashPos = strrpos($base->getPath(), '/'); if ($lastSlashPos === false) { $targetPath = $rel->getPath(); } else { $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1).$rel->getPath(); } } } $targetPath = self::removeDotSegments($targetPath); $targetQuery = $rel->getQuery(); } } return new Uri(Uri::composeComponents( $base->getScheme(), $targetAuthority, $targetPath, $targetQuery, $rel->getFragment() )); } /** * Returns the target URI as a relative reference from the base URI. * * This method is the counterpart to resolve(): * * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) * * One use-case is to use the current request URI as base URI and then generate relative links in your documents * to reduce the document size or offer self-contained downloadable document archives. * * $base = new Uri('http://example.com/a/b/'); * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. * * This method also accepts a target that is already relative and will try to relativize it further. Only a * relative-path reference will be returned as-is. * * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well */ public static function relativize(UriInterface $base, UriInterface $target): UriInterface { if ($target->getScheme() !== '' && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') ) { return $target; } if (Uri::isRelativePathReference($target)) { // As the target is already highly relative we return it as-is. It would be possible to resolve // the target with `$target = self::resolve($base, $target);` and then try make it more relative // by removing a duplicate query. But let's not do that automatically. return $target; } if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { return $target->withScheme(''); } // We must remove the path before removing the authority because if the path starts with two slashes, the URI // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also // invalid. $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); if ($base->getPath() !== $target->getPath()) { return $emptyPathUri->withPath(self::getRelativePath($base, $target)); } if ($base->getQuery() === $target->getQuery()) { // Only the target fragment is left. And it must be returned even if base and target fragment are the same. return $emptyPathUri->withQuery(''); } // If the base URI has a query but the target has none, we cannot return an empty path reference as it would // inherit the base query component when resolving. if ($target->getQuery() === '') { $segments = explode('/', $target->getPath()); /** @var string $lastSegment */ $lastSegment = end($segments); return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); } return $emptyPathUri; } private static function getRelativePath(UriInterface $base, UriInterface $target): string { $sourceSegments = explode('/', $base->getPath()); $targetSegments = explode('/', $target->getPath()); array_pop($sourceSegments); $targetLastSegment = array_pop($targetSegments); foreach ($sourceSegments as $i => $segment) { if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { unset($sourceSegments[$i], $targetSegments[$i]); } else { break; } } $targetSegments[] = $targetLastSegment; $relativePath = str_repeat('../', count($sourceSegments)).implode('/', $targetSegments); // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { $relativePath = "./$relativePath"; } elseif ('/' === $relativePath[0]) { if ($base->getAuthority() != '' && $base->getPath() === '') { // In this case an extra slash is added by resolve() automatically. So we must not add one here. $relativePath = ".$relativePath"; } else { $relativePath = "./$relativePath"; } } return $relativePath; } private function __construct() { // cannot be instantiated } } PKboundary = $boundary ?: bin2hex(random_bytes(20)); $this->stream = $this->createStream($elements); } public function getBoundary(): string { return $this->boundary; } public function isWritable(): bool { return false; } /** * Get the headers needed before transferring the content of a POST file * * @param array $headers */ private function getHeaders(array $headers): string { $str = ''; foreach ($headers as $key => $value) { $str .= "{$key}: {$value}\r\n"; } return "--{$this->boundary}\r\n".trim($str)."\r\n\r\n"; } /** * Create the aggregate stream that will be used to upload the POST data */ protected function createStream(array $elements = []): StreamInterface { $stream = new AppendStream(); foreach ($elements as $element) { if (!is_array($element)) { throw new \UnexpectedValueException('An array is expected'); } $this->addElement($stream, $element); } // Add the trailing boundary with CRLF $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n")); return $stream; } private function addElement(AppendStream $stream, array $element): void { foreach (['contents', 'name'] as $key) { if (!array_key_exists($key, $element)) { throw new \InvalidArgumentException("A '{$key}' key is required"); } } $element['contents'] = Utils::streamFor($element['contents']); if (empty($element['filename'])) { $uri = $element['contents']->getMetadata('uri'); if ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://' && \substr($uri, 0, 7) !== 'data://') { $element['filename'] = $uri; } } [$body, $headers] = $this->createElement( $element['name'], $element['contents'], $element['filename'] ?? null, $element['headers'] ?? [] ); $stream->addStream(Utils::streamFor($this->getHeaders($headers))); $stream->addStream($body); $stream->addStream(Utils::streamFor("\r\n")); } private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers): array { // Set a default content-disposition header if one was no provided $disposition = $this->getHeader($headers, 'content-disposition'); if (!$disposition) { $headers['Content-Disposition'] = ($filename === '0' || $filename) ? sprintf( 'form-data; name="%s"; filename="%s"', $name, basename($filename) ) : "form-data; name=\"{$name}\""; } // Set a default content-length header if one was no provided $length = $this->getHeader($headers, 'content-length'); if (!$length) { if ($length = $stream->getSize()) { $headers['Content-Length'] = (string) $length; } } // Set a default Content-Type if one was not supplied $type = $this->getHeader($headers, 'content-type'); if (!$type && ($filename === '0' || $filename)) { $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream'; } return [$stream, $headers]; } private function getHeader(array $headers, string $key) { $lowercaseHeader = strtolower($key); foreach ($headers as $k => $v) { if (strtolower($k) === $lowercaseHeader) { return $v; } } return null; } } PKfilename = $filename; $this->mode = $mode; // unsetting the property forces the first access to go through // __get(). unset($this->stream); } /** * Creates the underlying stream lazily when required. */ protected function createStream(): StreamInterface { return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode)); } } PK */ private $methods; /** * @param array $methods Hash of method name to a callable. */ public function __construct(array $methods) { $this->methods = $methods; // Create the functions on the class foreach ($methods as $name => $fn) { $this->{'_fn_'.$name} = $fn; } } /** * Lazily determine which methods are not implemented. * * @throws \BadMethodCallException */ public function __get(string $name): void { throw new \BadMethodCallException(str_replace('_fn_', '', $name) .'() is not implemented in the FnStream'); } /** * The close method is called on the underlying stream only if possible. */ public function __destruct() { if (isset($this->_fn_close)) { call_user_func($this->_fn_close); } } /** * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. * * @throws \LogicException */ public function __wakeup(): void { throw new \LogicException('FnStream should never be unserialized'); } /** * Adds custom functionality to an underlying stream by intercepting * specific method calls. * * @param StreamInterface $stream Stream to decorate * @param array $methods Hash of method name to a closure * * @return FnStream */ public static function decorate(StreamInterface $stream, array $methods) { // If any of the required methods were not provided, then simply // proxy to the decorated stream. foreach (array_diff(self::SLOTS, array_keys($methods)) as $diff) { /** @var callable $callable */ $callable = [$stream, $diff]; $methods[$diff] = $callable; } return new self($methods); } public function __toString(): string { try { return call_user_func($this->_fn___toString); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); return ''; } } public function close(): void { call_user_func($this->_fn_close); } public function detach() { return call_user_func($this->_fn_detach); } public function getSize(): ?int { return call_user_func($this->_fn_getSize); } public function tell(): int { return call_user_func($this->_fn_tell); } public function eof(): bool { return call_user_func($this->_fn_eof); } public function isSeekable(): bool { return call_user_func($this->_fn_isSeekable); } public function rewind(): void { call_user_func($this->_fn_rewind); } public function seek($offset, $whence = SEEK_SET): void { call_user_func($this->_fn_seek, $offset, $whence); } public function isWritable(): bool { return call_user_func($this->_fn_isWritable); } public function write($string): int { return call_user_func($this->_fn_write, $string); } public function isReadable(): bool { return call_user_func($this->_fn_isReadable); } public function read($length): string { return call_user_func($this->_fn_read, $length); } public function getContents(): string { return call_user_func($this->_fn_getContents); } /** * @return mixed */ public function getMetadata($key = null) { return call_user_func($this->_fn_getMetadata, $key); } } PKsource = $source; $this->size = $options['size'] ?? null; $this->metadata = $options['metadata'] ?? []; $this->buffer = new BufferStream(); } public function __toString(): string { try { return Utils::copyToString($this); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); return ''; } } public function close(): void { $this->detach(); } public function detach() { $this->tellPos = 0; $this->source = null; return null; } public function getSize(): ?int { return $this->size; } public function tell(): int { return $this->tellPos; } public function eof(): bool { return $this->source === null; } public function isSeekable(): bool { return false; } public function rewind(): void { $this->seek(0); } public function seek($offset, $whence = SEEK_SET): void { throw new \RuntimeException('Cannot seek a PumpStream'); } public function isWritable(): bool { return false; } public function write($string): int { throw new \RuntimeException('Cannot write to a PumpStream'); } public function isReadable(): bool { return true; } public function read($length): string { $data = $this->buffer->read($length); $readLen = strlen($data); $this->tellPos += $readLen; $remaining = $length - $readLen; if ($remaining) { $this->pump($remaining); $data .= $this->buffer->read($remaining); $this->tellPos += strlen($data) - $readLen; } return $data; } public function getContents(): string { $result = ''; while (!$this->eof()) { $result .= $this->read(1000000); } return $result; } /** * @return mixed */ public function getMetadata($key = null) { if (!$key) { return $this->metadata; } return $this->metadata[$key] ?? null; } private function pump(int $length): void { if ($this->source) { do { $data = call_user_func($this->source, $length); if ($data === false || $data === null) { $this->source = null; return; } $this->buffer->write($data); $length -= strlen($data); } while ($length > 0); } } } PKgetMethod().' ' .$message->getRequestTarget()) .' HTTP/'.$message->getProtocolVersion(); if (!$message->hasHeader('host')) { $msg .= "\r\nHost: ".$message->getUri()->getHost(); } } elseif ($message instanceof ResponseInterface) { $msg = 'HTTP/'.$message->getProtocolVersion().' ' .$message->getStatusCode().' ' .$message->getReasonPhrase(); } else { throw new \InvalidArgumentException('Unknown message type'); } foreach ($message->getHeaders() as $name => $values) { if (is_string($name) && strtolower($name) === 'set-cookie') { foreach ($values as $value) { $msg .= "\r\n{$name}: ".$value; } } else { $msg .= "\r\n{$name}: ".implode(', ', $values); } } return "{$msg}\r\n\r\n".$message->getBody(); } /** * Get a short summary of the message body. * * Will return `null` if the response is not printable. * * @param MessageInterface $message The message to get the body summary * @param int $truncateAt The maximum allowed size of the summary */ public static function bodySummary(MessageInterface $message, int $truncateAt = 120): ?string { $body = $message->getBody(); if (!$body->isSeekable() || !$body->isReadable()) { return null; } $size = $body->getSize(); if ($size === 0) { return null; } $body->rewind(); $summary = $body->read($truncateAt); $body->rewind(); if ($size > $truncateAt) { $summary .= ' (truncated...)'; } // Matches any printable character, including unicode characters: // letters, marks, numbers, punctuation, spacing, and separators. if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary) !== 0) { return null; } return $summary; } /** * Attempts to rewind a message body and throws an exception on failure. * * The body of the message will only be rewound if a call to `tell()` * returns a value other than `0`. * * @param MessageInterface $message Message to rewind * * @throws \RuntimeException */ public static function rewindBody(MessageInterface $message): void { $body = $message->getBody(); if ($body->tell()) { $body->rewind(); } } /** * Parses an HTTP message into an associative array. * * The array contains the "start-line" key containing the start line of * the message, "headers" key containing an associative array of header * array values, and a "body" key containing the body of the message. * * @param string $message HTTP request or response to parse. */ public static function parseMessage(string $message): array { if (!$message) { throw new \InvalidArgumentException('Invalid message'); } $message = ltrim($message, "\r\n"); $messageParts = preg_split("/\r?\n\r?\n/", $message, 2); if ($messageParts === false || count($messageParts) !== 2) { throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); } [$rawHeaders, $body] = $messageParts; $rawHeaders .= "\r\n"; // Put back the delimiter we split previously $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); if ($headerParts === false || count($headerParts) !== 2) { throw new \InvalidArgumentException('Invalid message: Missing status line'); } [$startLine, $rawHeaders] = $headerParts; if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); } /** @var array[] $headerLines */ $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER); // If these aren't the same, then one line didn't match and there's an invalid header. if ($count !== substr_count($rawHeaders, "\n")) { // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); } throw new \InvalidArgumentException('Invalid header syntax'); } $headers = []; foreach ($headerLines as $headerLine) { $headers[$headerLine[1]][] = $headerLine[2]; } return [ 'start-line' => $startLine, 'headers' => $headers, 'body' => $body, ]; } /** * Constructs a URI for an HTTP request message. * * @param string $path Path from the start-line * @param array $headers Array of headers (each value an array). */ public static function parseRequestUri(string $path, array $headers): string { $hostKey = array_filter(array_keys($headers), function ($k) { // Numeric array keys are converted to int by PHP. $k = (string) $k; return strtolower($k) === 'host'; }); // If no host is found, then a full URI cannot be constructed. if (!$hostKey) { return $path; } $host = $headers[reset($hostKey)][0]; $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; return $scheme.'://'.$host.'/'.ltrim($path, '/'); } /** * Parses a request message string into a request object. * * @param string $message Request message string. */ public static function parseRequest(string $message): RequestInterface { $data = self::parseMessage($message); $matches = []; if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { throw new \InvalidArgumentException('Invalid request string'); } $parts = explode(' ', $data['start-line'], 3); $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; $request = new Request( $parts[0], $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1], $data['headers'], $data['body'], $version ); return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); } /** * Parses a response message string into a response object. * * @param string $message Response message string. */ public static function parseResponse(string $message): ResponseInterface { $data = self::parseMessage($message); // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space // between status-code and reason-phrase is required. But browsers accept // responses without space and reason as well. if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { throw new \InvalidArgumentException('Invalid response string: '.$data['start-line']); } $parts = explode(' ', $data['start-line'], 3); return new Response( (int) $parts[1], $data['headers'], $data['body'], explode('/', $parts[0])[1], $parts[2] ?? null ); } } PK 15 + 32]); $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); } } PKstream = $stream; } /** * Magic method used to create a new stream if streams are not added in * the constructor of a decorator (e.g., LazyOpenStream). * * @return StreamInterface */ public function __get(string $name) { if ($name === 'stream') { $this->stream = $this->createStream(); return $this->stream; } throw new \UnexpectedValueException("$name not found on class"); } public function __toString(): string { try { if ($this->isSeekable()) { $this->seek(0); } return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); return ''; } } public function getContents(): string { return Utils::copyToString($this); } /** * Allow decorators to implement custom methods * * @return mixed */ public function __call(string $method, array $args) { /** @var callable $callable */ $callable = [$this->stream, $method]; $result = call_user_func_array($callable, $args); // Always return the wrapped object if the result is a return $this return $result === $this->stream ? $this : $result; } public function close(): void { $this->stream->close(); } /** * @return mixed */ public function getMetadata($key = null) { return $this->stream->getMetadata($key); } public function detach() { return $this->stream->detach(); } public function getSize(): ?int { return $this->stream->getSize(); } public function eof(): bool { return $this->stream->eof(); } public function tell(): int { return $this->stream->tell(); } public function isReadable(): bool { return $this->stream->isReadable(); } public function isWritable(): bool { return $this->stream->isWritable(); } public function isSeekable(): bool { return $this->stream->isSeekable(); } public function rewind(): void { $this->seek(0); } public function seek($offset, $whence = SEEK_SET): void { $this->stream->seek($offset, $whence); } public function read($length): string { return $this->stream->read($length); } public function write($string): int { return $this->stream->write($string); } /** * Implement in subclasses to dynamically create streams when requested. * * @throws \BadMethodCallException */ protected function createStream(): StreamInterface { throw new \BadMethodCallException('Not implemented'); } } PK 'application/vnd.1000minds.decision-model+xml', '3dml' => 'text/vnd.in3d.3dml', '3ds' => 'image/x-3ds', '3g2' => 'video/3gpp2', '3gp' => 'video/3gp', '3gpp' => 'video/3gpp', '3mf' => 'model/3mf', '7z' => 'application/x-7z-compressed', '7zip' => 'application/x-7z-compressed', '123' => 'application/vnd.lotus-1-2-3', 'aab' => 'application/x-authorware-bin', 'aac' => 'audio/aac', 'aam' => 'application/x-authorware-map', 'aas' => 'application/x-authorware-seg', 'abw' => 'application/x-abiword', 'ac' => 'application/vnd.nokia.n-gage.ac+xml', 'ac3' => 'audio/ac3', 'acc' => 'application/vnd.americandynamics.acc', 'ace' => 'application/x-ace-compressed', 'acu' => 'application/vnd.acucobol', 'acutc' => 'application/vnd.acucorp', 'adp' => 'audio/adpcm', 'adts' => 'audio/aac', 'aep' => 'application/vnd.audiograph', 'afm' => 'application/x-font-type1', 'afp' => 'application/vnd.ibm.modcap', 'age' => 'application/vnd.age', 'ahead' => 'application/vnd.ahead.space', 'ai' => 'application/pdf', 'aif' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff', 'aiff' => 'audio/x-aiff', 'air' => 'application/vnd.adobe.air-application-installer-package+zip', 'ait' => 'application/vnd.dvb.ait', 'ami' => 'application/vnd.amiga.ami', 'aml' => 'application/automationml-aml+xml', 'amlx' => 'application/automationml-amlx+zip', 'amr' => 'audio/amr', 'apk' => 'application/vnd.android.package-archive', 'apng' => 'image/apng', 'appcache' => 'text/cache-manifest', 'appinstaller' => 'application/appinstaller', 'application' => 'application/x-ms-application', 'appx' => 'application/appx', 'appxbundle' => 'application/appxbundle', 'apr' => 'application/vnd.lotus-approach', 'arc' => 'application/x-freearc', 'arj' => 'application/x-arj', 'asc' => 'application/pgp-signature', 'asf' => 'video/x-ms-asf', 'asm' => 'text/x-asm', 'aso' => 'application/vnd.accpac.simply.aso', 'asx' => 'video/x-ms-asf', 'atc' => 'application/vnd.acucorp', 'atom' => 'application/atom+xml', 'atomcat' => 'application/atomcat+xml', 'atomdeleted' => 'application/atomdeleted+xml', 'atomsvc' => 'application/atomsvc+xml', 'atx' => 'application/vnd.antix.game-component', 'au' => 'audio/x-au', 'avci' => 'image/avci', 'avcs' => 'image/avcs', 'avi' => 'video/x-msvideo', 'avif' => 'image/avif', 'aw' => 'application/applixware', 'azf' => 'application/vnd.airzip.filesecure.azf', 'azs' => 'application/vnd.airzip.filesecure.azs', 'azv' => 'image/vnd.airzip.accelerator.azv', 'azw' => 'application/vnd.amazon.ebook', 'b16' => 'image/vnd.pco.b16', 'bat' => 'application/x-msdownload', 'bcpio' => 'application/x-bcpio', 'bdf' => 'application/x-font-bdf', 'bdm' => 'application/vnd.syncml.dm+wbxml', 'bdoc' => 'application/x-bdoc', 'bed' => 'application/vnd.realvnc.bed', 'bh2' => 'application/vnd.fujitsu.oasysprs', 'bin' => 'application/octet-stream', 'blb' => 'application/x-blorb', 'blorb' => 'application/x-blorb', 'bmi' => 'application/vnd.bmi', 'bmml' => 'application/vnd.balsamiq.bmml+xml', 'bmp' => 'image/bmp', 'book' => 'application/vnd.framemaker', 'box' => 'application/vnd.previewsystems.box', 'boz' => 'application/x-bzip2', 'bpk' => 'application/octet-stream', 'bpmn' => 'application/octet-stream', 'bsp' => 'model/vnd.valve.source.compiled-map', 'btf' => 'image/prs.btif', 'btif' => 'image/prs.btif', 'buffer' => 'application/octet-stream', 'bz' => 'application/x-bzip', 'bz2' => 'application/x-bzip2', 'c' => 'text/x-c', 'c4d' => 'application/vnd.clonk.c4group', 'c4f' => 'application/vnd.clonk.c4group', 'c4g' => 'application/vnd.clonk.c4group', 'c4p' => 'application/vnd.clonk.c4group', 'c4u' => 'application/vnd.clonk.c4group', 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', 'cab' => 'application/vnd.ms-cab-compressed', 'caf' => 'audio/x-caf', 'cap' => 'application/vnd.tcpdump.pcap', 'car' => 'application/vnd.curl.car', 'cat' => 'application/vnd.ms-pki.seccat', 'cb7' => 'application/x-cbr', 'cba' => 'application/x-cbr', 'cbr' => 'application/x-cbr', 'cbt' => 'application/x-cbr', 'cbz' => 'application/x-cbr', 'cc' => 'text/x-c', 'cco' => 'application/x-cocoa', 'cct' => 'application/x-director', 'ccxml' => 'application/ccxml+xml', 'cdbcmsg' => 'application/vnd.contact.cmsg', 'cdf' => 'application/x-netcdf', 'cdfx' => 'application/cdfx+xml', 'cdkey' => 'application/vnd.mediastation.cdkey', 'cdmia' => 'application/cdmi-capability', 'cdmic' => 'application/cdmi-container', 'cdmid' => 'application/cdmi-domain', 'cdmio' => 'application/cdmi-object', 'cdmiq' => 'application/cdmi-queue', 'cdr' => 'application/cdr', 'cdx' => 'chemical/x-cdx', 'cdxml' => 'application/vnd.chemdraw+xml', 'cdy' => 'application/vnd.cinderella', 'cer' => 'application/pkix-cert', 'cfs' => 'application/x-cfs-compressed', 'cgm' => 'image/cgm', 'chat' => 'application/x-chat', 'chm' => 'application/vnd.ms-htmlhelp', 'chrt' => 'application/vnd.kde.kchart', 'cif' => 'chemical/x-cif', 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', 'cil' => 'application/vnd.ms-artgalry', 'cjs' => 'application/node', 'cla' => 'application/vnd.claymore', 'class' => 'application/octet-stream', 'cld' => 'model/vnd.cld', 'clkk' => 'application/vnd.crick.clicker.keyboard', 'clkp' => 'application/vnd.crick.clicker.palette', 'clkt' => 'application/vnd.crick.clicker.template', 'clkw' => 'application/vnd.crick.clicker.wordbank', 'clkx' => 'application/vnd.crick.clicker', 'clp' => 'application/x-msclip', 'cmc' => 'application/vnd.cosmocaller', 'cmdf' => 'chemical/x-cmdf', 'cml' => 'chemical/x-cml', 'cmp' => 'application/vnd.yellowriver-custom-menu', 'cmx' => 'image/x-cmx', 'cod' => 'application/vnd.rim.cod', 'coffee' => 'text/coffeescript', 'com' => 'application/x-msdownload', 'conf' => 'text/plain', 'cpio' => 'application/x-cpio', 'cpl' => 'application/cpl+xml', 'cpp' => 'text/x-c', 'cpt' => 'application/mac-compactpro', 'crd' => 'application/x-mscardfile', 'crl' => 'application/pkix-crl', 'crt' => 'application/x-x509-ca-cert', 'crx' => 'application/x-chrome-extension', 'cryptonote' => 'application/vnd.rig.cryptonote', 'csh' => 'application/x-csh', 'csl' => 'application/vnd.citationstyles.style+xml', 'csml' => 'chemical/x-csml', 'csp' => 'application/vnd.commonspace', 'csr' => 'application/octet-stream', 'css' => 'text/css', 'cst' => 'application/x-director', 'csv' => 'text/csv', 'cu' => 'application/cu-seeme', 'curl' => 'text/vnd.curl', 'cwl' => 'application/cwl', 'cww' => 'application/prs.cww', 'cxt' => 'application/x-director', 'cxx' => 'text/x-c', 'dae' => 'model/vnd.collada+xml', 'daf' => 'application/vnd.mobius.daf', 'dart' => 'application/vnd.dart', 'dataless' => 'application/vnd.fdsn.seed', 'davmount' => 'application/davmount+xml', 'dbf' => 'application/vnd.dbf', 'dbk' => 'application/docbook+xml', 'dcr' => 'application/x-director', 'dcurl' => 'text/vnd.curl.dcurl', 'dd2' => 'application/vnd.oma.dd2+xml', 'ddd' => 'application/vnd.fujixerox.ddd', 'ddf' => 'application/vnd.syncml.dmddf+xml', 'dds' => 'image/vnd.ms-dds', 'deb' => 'application/x-debian-package', 'def' => 'text/plain', 'deploy' => 'application/octet-stream', 'der' => 'application/x-x509-ca-cert', 'dfac' => 'application/vnd.dreamfactory', 'dgc' => 'application/x-dgc-compressed', 'dib' => 'image/bmp', 'dic' => 'text/x-c', 'dir' => 'application/x-director', 'dis' => 'application/vnd.mobius.dis', 'disposition-notification' => 'message/disposition-notification', 'dist' => 'application/octet-stream', 'distz' => 'application/octet-stream', 'djv' => 'image/vnd.djvu', 'djvu' => 'image/vnd.djvu', 'dll' => 'application/octet-stream', 'dmg' => 'application/x-apple-diskimage', 'dmn' => 'application/octet-stream', 'dmp' => 'application/vnd.tcpdump.pcap', 'dms' => 'application/octet-stream', 'dna' => 'application/vnd.dna', 'doc' => 'application/msword', 'docm' => 'application/vnd.ms-word.template.macroEnabled.12', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'dot' => 'application/msword', 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dp' => 'application/vnd.osgi.dp', 'dpg' => 'application/vnd.dpgraph', 'dpx' => 'image/dpx', 'dra' => 'audio/vnd.dra', 'drle' => 'image/dicom-rle', 'dsc' => 'text/prs.lines.tag', 'dssc' => 'application/dssc+der', 'dtb' => 'application/x-dtbook+xml', 'dtd' => 'application/xml-dtd', 'dts' => 'audio/vnd.dts', 'dtshd' => 'audio/vnd.dts.hd', 'dump' => 'application/octet-stream', 'dvb' => 'video/vnd.dvb.file', 'dvi' => 'application/x-dvi', 'dwd' => 'application/atsc-dwd+xml', 'dwf' => 'model/vnd.dwf', 'dwg' => 'image/vnd.dwg', 'dxf' => 'image/vnd.dxf', 'dxp' => 'application/vnd.spotfire.dxp', 'dxr' => 'application/x-director', 'ear' => 'application/java-archive', 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', 'ecma' => 'application/ecmascript', 'edm' => 'application/vnd.novadigm.edm', 'edx' => 'application/vnd.novadigm.edx', 'efif' => 'application/vnd.picsel', 'ei6' => 'application/vnd.pg.osasli', 'elc' => 'application/octet-stream', 'emf' => 'image/emf', 'eml' => 'message/rfc822', 'emma' => 'application/emma+xml', 'emotionml' => 'application/emotionml+xml', 'emz' => 'application/x-msmetafile', 'eol' => 'audio/vnd.digital-winds', 'eot' => 'application/vnd.ms-fontobject', 'eps' => 'application/postscript', 'epub' => 'application/epub+zip', 'es3' => 'application/vnd.eszigno3+xml', 'esa' => 'application/vnd.osgi.subsystem', 'esf' => 'application/vnd.epson.esf', 'et3' => 'application/vnd.eszigno3+xml', 'etx' => 'text/x-setext', 'eva' => 'application/x-eva', 'evy' => 'application/x-envoy', 'exe' => 'application/octet-stream', 'exi' => 'application/exi', 'exp' => 'application/express', 'exr' => 'image/aces', 'ext' => 'application/vnd.novadigm.ext', 'ez' => 'application/andrew-inset', 'ez2' => 'application/vnd.ezpix-album', 'ez3' => 'application/vnd.ezpix-package', 'f' => 'text/x-fortran', 'f4v' => 'video/mp4', 'f77' => 'text/x-fortran', 'f90' => 'text/x-fortran', 'fbs' => 'image/vnd.fastbidsheet', 'fcdt' => 'application/vnd.adobe.formscentral.fcdt', 'fcs' => 'application/vnd.isac.fcs', 'fdf' => 'application/vnd.fdf', 'fdt' => 'application/fdt+xml', 'fe_launch' => 'application/vnd.denovo.fcselayout-link', 'fg5' => 'application/vnd.fujitsu.oasysgp', 'fgd' => 'application/x-director', 'fh' => 'image/x-freehand', 'fh4' => 'image/x-freehand', 'fh5' => 'image/x-freehand', 'fh7' => 'image/x-freehand', 'fhc' => 'image/x-freehand', 'fig' => 'application/x-xfig', 'fits' => 'image/fits', 'flac' => 'audio/x-flac', 'fli' => 'video/x-fli', 'flo' => 'application/vnd.micrografx.flo', 'flv' => 'video/x-flv', 'flw' => 'application/vnd.kde.kivio', 'flx' => 'text/vnd.fmi.flexstor', 'fly' => 'text/vnd.fly', 'fm' => 'application/vnd.framemaker', 'fnc' => 'application/vnd.frogans.fnc', 'fo' => 'application/vnd.software602.filler.form+xml', 'for' => 'text/x-fortran', 'fpx' => 'image/vnd.fpx', 'frame' => 'application/vnd.framemaker', 'fsc' => 'application/vnd.fsc.weblaunch', 'fst' => 'image/vnd.fst', 'ftc' => 'application/vnd.fluxtime.clip', 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', 'fvt' => 'video/vnd.fvt', 'fxp' => 'application/vnd.adobe.fxp', 'fxpl' => 'application/vnd.adobe.fxp', 'fzs' => 'application/vnd.fuzzysheet', 'g2w' => 'application/vnd.geoplan', 'g3' => 'image/g3fax', 'g3w' => 'application/vnd.geospace', 'gac' => 'application/vnd.groove-account', 'gam' => 'application/x-tads', 'gbr' => 'application/rpki-ghostbusters', 'gca' => 'application/x-gca-compressed', 'gdl' => 'model/vnd.gdl', 'gdoc' => 'application/vnd.google-apps.document', 'ged' => 'text/vnd.familysearch.gedcom', 'geo' => 'application/vnd.dynageo', 'geojson' => 'application/geo+json', 'gex' => 'application/vnd.geometry-explorer', 'ggb' => 'application/vnd.geogebra.file', 'ggt' => 'application/vnd.geogebra.tool', 'ghf' => 'application/vnd.groove-help', 'gif' => 'image/gif', 'gim' => 'application/vnd.groove-identity-message', 'glb' => 'model/gltf-binary', 'gltf' => 'model/gltf+json', 'gml' => 'application/gml+xml', 'gmx' => 'application/vnd.gmx', 'gnumeric' => 'application/x-gnumeric', 'gpg' => 'application/gpg-keys', 'gph' => 'application/vnd.flographit', 'gpx' => 'application/gpx+xml', 'gqf' => 'application/vnd.grafeq', 'gqs' => 'application/vnd.grafeq', 'gram' => 'application/srgs', 'gramps' => 'application/x-gramps-xml', 'gre' => 'application/vnd.geometry-explorer', 'grv' => 'application/vnd.groove-injector', 'grxml' => 'application/srgs+xml', 'gsf' => 'application/x-font-ghostscript', 'gsheet' => 'application/vnd.google-apps.spreadsheet', 'gslides' => 'application/vnd.google-apps.presentation', 'gtar' => 'application/x-gtar', 'gtm' => 'application/vnd.groove-tool-message', 'gtw' => 'model/vnd.gtw', 'gv' => 'text/vnd.graphviz', 'gxf' => 'application/gxf', 'gxt' => 'application/vnd.geonext', 'gz' => 'application/gzip', 'gzip' => 'application/gzip', 'h' => 'text/x-c', 'h261' => 'video/h261', 'h263' => 'video/h263', 'h264' => 'video/h264', 'hal' => 'application/vnd.hal+xml', 'hbci' => 'application/vnd.hbci', 'hbs' => 'text/x-handlebars-template', 'hdd' => 'application/x-virtualbox-hdd', 'hdf' => 'application/x-hdf', 'heic' => 'image/heic', 'heics' => 'image/heic-sequence', 'heif' => 'image/heif', 'heifs' => 'image/heif-sequence', 'hej2' => 'image/hej2k', 'held' => 'application/atsc-held+xml', 'hh' => 'text/x-c', 'hjson' => 'application/hjson', 'hlp' => 'application/winhlp', 'hpgl' => 'application/vnd.hp-hpgl', 'hpid' => 'application/vnd.hp-hpid', 'hps' => 'application/vnd.hp-hps', 'hqx' => 'application/mac-binhex40', 'hsj2' => 'image/hsj2', 'htc' => 'text/x-component', 'htke' => 'application/vnd.kenameaapp', 'htm' => 'text/html', 'html' => 'text/html', 'hvd' => 'application/vnd.yamaha.hv-dic', 'hvp' => 'application/vnd.yamaha.hv-voice', 'hvs' => 'application/vnd.yamaha.hv-script', 'i2g' => 'application/vnd.intergeo', 'icc' => 'application/vnd.iccprofile', 'ice' => 'x-conference/x-cooltalk', 'icm' => 'application/vnd.iccprofile', 'ico' => 'image/x-icon', 'ics' => 'text/calendar', 'ief' => 'image/ief', 'ifb' => 'text/calendar', 'ifm' => 'application/vnd.shana.informed.formdata', 'iges' => 'model/iges', 'igl' => 'application/vnd.igloader', 'igm' => 'application/vnd.insors.igm', 'igs' => 'model/iges', 'igx' => 'application/vnd.micrografx.igx', 'iif' => 'application/vnd.shana.informed.interchange', 'img' => 'application/octet-stream', 'imp' => 'application/vnd.accpac.simply.imp', 'ims' => 'application/vnd.ms-ims', 'in' => 'text/plain', 'ini' => 'text/plain', 'ink' => 'application/inkml+xml', 'inkml' => 'application/inkml+xml', 'install' => 'application/x-install-instructions', 'iota' => 'application/vnd.astraea-software.iota', 'ipfix' => 'application/ipfix', 'ipk' => 'application/vnd.shana.informed.package', 'irm' => 'application/vnd.ibm.rights-management', 'irp' => 'application/vnd.irepository.package+xml', 'iso' => 'application/x-iso9660-image', 'itp' => 'application/vnd.shana.informed.formtemplate', 'its' => 'application/its+xml', 'ivp' => 'application/vnd.immervision-ivp', 'ivu' => 'application/vnd.immervision-ivu', 'jad' => 'text/vnd.sun.j2me.app-descriptor', 'jade' => 'text/jade', 'jam' => 'application/vnd.jam', 'jar' => 'application/java-archive', 'jardiff' => 'application/x-java-archive-diff', 'java' => 'text/x-java-source', 'jhc' => 'image/jphc', 'jisp' => 'application/vnd.jisp', 'jls' => 'image/jls', 'jlt' => 'application/vnd.hp-jlyt', 'jng' => 'image/x-jng', 'jnlp' => 'application/x-java-jnlp-file', 'joda' => 'application/vnd.joost.joda-archive', 'jp2' => 'image/jp2', 'jpe' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'jpf' => 'image/jpx', 'jpg' => 'image/jpeg', 'jpg2' => 'image/jp2', 'jpgm' => 'video/jpm', 'jpgv' => 'video/jpeg', 'jph' => 'image/jph', 'jpm' => 'video/jpm', 'jpx' => 'image/jpx', 'js' => 'application/javascript', 'json' => 'application/json', 'json5' => 'application/json5', 'jsonld' => 'application/ld+json', 'jsonml' => 'application/jsonml+json', 'jsx' => 'text/jsx', 'jt' => 'model/jt', 'jxr' => 'image/jxr', 'jxra' => 'image/jxra', 'jxrs' => 'image/jxrs', 'jxs' => 'image/jxs', 'jxsc' => 'image/jxsc', 'jxsi' => 'image/jxsi', 'jxss' => 'image/jxss', 'kar' => 'audio/midi', 'karbon' => 'application/vnd.kde.karbon', 'kdb' => 'application/octet-stream', 'kdbx' => 'application/x-keepass2', 'key' => 'application/x-iwork-keynote-sffkey', 'kfo' => 'application/vnd.kde.kformula', 'kia' => 'application/vnd.kidspiration', 'kml' => 'application/vnd.google-earth.kml+xml', 'kmz' => 'application/vnd.google-earth.kmz', 'kne' => 'application/vnd.kinar', 'knp' => 'application/vnd.kinar', 'kon' => 'application/vnd.kde.kontour', 'kpr' => 'application/vnd.kde.kpresenter', 'kpt' => 'application/vnd.kde.kpresenter', 'kpxx' => 'application/vnd.ds-keypoint', 'ksp' => 'application/vnd.kde.kspread', 'ktr' => 'application/vnd.kahootz', 'ktx' => 'image/ktx', 'ktx2' => 'image/ktx2', 'ktz' => 'application/vnd.kahootz', 'kwd' => 'application/vnd.kde.kword', 'kwt' => 'application/vnd.kde.kword', 'lasxml' => 'application/vnd.las.las+xml', 'latex' => 'application/x-latex', 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', 'les' => 'application/vnd.hhe.lesson-player', 'less' => 'text/less', 'lgr' => 'application/lgr+xml', 'lha' => 'application/octet-stream', 'link66' => 'application/vnd.route66.link66+xml', 'list' => 'text/plain', 'list3820' => 'application/vnd.ibm.modcap', 'listafp' => 'application/vnd.ibm.modcap', 'litcoffee' => 'text/coffeescript', 'lnk' => 'application/x-ms-shortcut', 'log' => 'text/plain', 'lostxml' => 'application/lost+xml', 'lrf' => 'application/octet-stream', 'lrm' => 'application/vnd.ms-lrm', 'ltf' => 'application/vnd.frogans.ltf', 'lua' => 'text/x-lua', 'luac' => 'application/x-lua-bytecode', 'lvp' => 'audio/vnd.lucent.voice', 'lwp' => 'application/vnd.lotus-wordpro', 'lzh' => 'application/octet-stream', 'm1v' => 'video/mpeg', 'm2a' => 'audio/mpeg', 'm2v' => 'video/mpeg', 'm3a' => 'audio/mpeg', 'm3u' => 'text/plain', 'm3u8' => 'application/vnd.apple.mpegurl', 'm4a' => 'audio/x-m4a', 'm4p' => 'application/mp4', 'm4s' => 'video/iso.segment', 'm4u' => 'application/vnd.mpegurl', 'm4v' => 'video/x-m4v', 'm13' => 'application/x-msmediaview', 'm14' => 'application/x-msmediaview', 'm21' => 'application/mp21', 'ma' => 'application/mathematica', 'mads' => 'application/mads+xml', 'maei' => 'application/mmt-aei+xml', 'mag' => 'application/vnd.ecowin.chart', 'maker' => 'application/vnd.framemaker', 'man' => 'text/troff', 'manifest' => 'text/cache-manifest', 'map' => 'application/json', 'mar' => 'application/octet-stream', 'markdown' => 'text/markdown', 'mathml' => 'application/mathml+xml', 'mb' => 'application/mathematica', 'mbk' => 'application/vnd.mobius.mbk', 'mbox' => 'application/mbox', 'mc1' => 'application/vnd.medcalcdata', 'mcd' => 'application/vnd.mcd', 'mcurl' => 'text/vnd.curl.mcurl', 'md' => 'text/markdown', 'mdb' => 'application/x-msaccess', 'mdi' => 'image/vnd.ms-modi', 'mdx' => 'text/mdx', 'me' => 'text/troff', 'mesh' => 'model/mesh', 'meta4' => 'application/metalink4+xml', 'metalink' => 'application/metalink+xml', 'mets' => 'application/mets+xml', 'mfm' => 'application/vnd.mfmp', 'mft' => 'application/rpki-manifest', 'mgp' => 'application/vnd.osgeo.mapguide.package', 'mgz' => 'application/vnd.proteus.magazine', 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'mie' => 'application/x-mie', 'mif' => 'application/vnd.mif', 'mime' => 'message/rfc822', 'mj2' => 'video/mj2', 'mjp2' => 'video/mj2', 'mjs' => 'text/javascript', 'mk3d' => 'video/x-matroska', 'mka' => 'audio/x-matroska', 'mkd' => 'text/x-markdown', 'mks' => 'video/x-matroska', 'mkv' => 'video/x-matroska', 'mlp' => 'application/vnd.dolby.mlp', 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', 'mmf' => 'application/vnd.smaf', 'mml' => 'text/mathml', 'mmr' => 'image/vnd.fujixerox.edmics-mmr', 'mng' => 'video/x-mng', 'mny' => 'application/x-msmoney', 'mobi' => 'application/x-mobipocket-ebook', 'mods' => 'application/mods+xml', 'mov' => 'video/quicktime', 'movie' => 'video/x-sgi-movie', 'mp2' => 'audio/mpeg', 'mp2a' => 'audio/mpeg', 'mp3' => 'audio/mpeg', 'mp4' => 'video/mp4', 'mp4a' => 'audio/mp4', 'mp4s' => 'application/mp4', 'mp4v' => 'video/mp4', 'mp21' => 'application/mp21', 'mpc' => 'application/vnd.mophun.certificate', 'mpd' => 'application/dash+xml', 'mpe' => 'video/mpeg', 'mpeg' => 'video/mpeg', 'mpf' => 'application/media-policy-dataset+xml', 'mpg' => 'video/mpeg', 'mpg4' => 'video/mp4', 'mpga' => 'audio/mpeg', 'mpkg' => 'application/vnd.apple.installer+xml', 'mpm' => 'application/vnd.blueice.multipass', 'mpn' => 'application/vnd.mophun.application', 'mpp' => 'application/vnd.ms-project', 'mpt' => 'application/vnd.ms-project', 'mpy' => 'application/vnd.ibm.minipay', 'mqy' => 'application/vnd.mobius.mqy', 'mrc' => 'application/marc', 'mrcx' => 'application/marcxml+xml', 'ms' => 'text/troff', 'mscml' => 'application/mediaservercontrol+xml', 'mseed' => 'application/vnd.fdsn.mseed', 'mseq' => 'application/vnd.mseq', 'msf' => 'application/vnd.epson.msf', 'msg' => 'application/vnd.ms-outlook', 'msh' => 'model/mesh', 'msi' => 'application/x-msdownload', 'msix' => 'application/msix', 'msixbundle' => 'application/msixbundle', 'msl' => 'application/vnd.mobius.msl', 'msm' => 'application/octet-stream', 'msp' => 'application/octet-stream', 'msty' => 'application/vnd.muvee.style', 'mtl' => 'model/mtl', 'mts' => 'model/vnd.mts', 'mus' => 'application/vnd.musician', 'musd' => 'application/mmt-usd+xml', 'musicxml' => 'application/vnd.recordare.musicxml+xml', 'mvb' => 'application/x-msmediaview', 'mvt' => 'application/vnd.mapbox-vector-tile', 'mwf' => 'application/vnd.mfer', 'mxf' => 'application/mxf', 'mxl' => 'application/vnd.recordare.musicxml', 'mxmf' => 'audio/mobile-xmf', 'mxml' => 'application/xv+xml', 'mxs' => 'application/vnd.triscape.mxs', 'mxu' => 'video/vnd.mpegurl', 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', 'n3' => 'text/n3', 'nb' => 'application/mathematica', 'nbp' => 'application/vnd.wolfram.player', 'nc' => 'application/x-netcdf', 'ncx' => 'application/x-dtbncx+xml', 'nfo' => 'text/x-nfo', 'ngdat' => 'application/vnd.nokia.n-gage.data', 'nitf' => 'application/vnd.nitf', 'nlu' => 'application/vnd.neurolanguage.nlu', 'nml' => 'application/vnd.enliven', 'nnd' => 'application/vnd.noblenet-directory', 'nns' => 'application/vnd.noblenet-sealer', 'nnw' => 'application/vnd.noblenet-web', 'npx' => 'image/vnd.net-fpx', 'nq' => 'application/n-quads', 'nsc' => 'application/x-conference', 'nsf' => 'application/vnd.lotus-notes', 'nt' => 'application/n-triples', 'ntf' => 'application/vnd.nitf', 'numbers' => 'application/x-iwork-numbers-sffnumbers', 'nzb' => 'application/x-nzb', 'oa2' => 'application/vnd.fujitsu.oasys2', 'oa3' => 'application/vnd.fujitsu.oasys3', 'oas' => 'application/vnd.fujitsu.oasys', 'obd' => 'application/x-msbinder', 'obgx' => 'application/vnd.openblox.game+xml', 'obj' => 'model/obj', 'oda' => 'application/oda', 'odb' => 'application/vnd.oasis.opendocument.database', 'odc' => 'application/vnd.oasis.opendocument.chart', 'odf' => 'application/vnd.oasis.opendocument.formula', 'odft' => 'application/vnd.oasis.opendocument.formula-template', 'odg' => 'application/vnd.oasis.opendocument.graphics', 'odi' => 'application/vnd.oasis.opendocument.image', 'odm' => 'application/vnd.oasis.opendocument.text-master', 'odp' => 'application/vnd.oasis.opendocument.presentation', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'odt' => 'application/vnd.oasis.opendocument.text', 'oga' => 'audio/ogg', 'ogex' => 'model/vnd.opengex', 'ogg' => 'audio/ogg', 'ogv' => 'video/ogg', 'ogx' => 'application/ogg', 'omdoc' => 'application/omdoc+xml', 'onepkg' => 'application/onenote', 'onetmp' => 'application/onenote', 'onetoc' => 'application/onenote', 'onetoc2' => 'application/onenote', 'opf' => 'application/oebps-package+xml', 'opml' => 'text/x-opml', 'oprc' => 'application/vnd.palm', 'opus' => 'audio/ogg', 'org' => 'text/x-org', 'osf' => 'application/vnd.yamaha.openscoreformat', 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', 'osm' => 'application/vnd.openstreetmap.data+xml', 'otc' => 'application/vnd.oasis.opendocument.chart-template', 'otf' => 'font/otf', 'otg' => 'application/vnd.oasis.opendocument.graphics-template', 'oth' => 'application/vnd.oasis.opendocument.text-web', 'oti' => 'application/vnd.oasis.opendocument.image-template', 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', 'ott' => 'application/vnd.oasis.opendocument.text-template', 'ova' => 'application/x-virtualbox-ova', 'ovf' => 'application/x-virtualbox-ovf', 'owl' => 'application/rdf+xml', 'oxps' => 'application/oxps', 'oxt' => 'application/vnd.openofficeorg.extension', 'p' => 'text/x-pascal', 'p7a' => 'application/x-pkcs7-signature', 'p7b' => 'application/x-pkcs7-certificates', 'p7c' => 'application/pkcs7-mime', 'p7m' => 'application/pkcs7-mime', 'p7r' => 'application/x-pkcs7-certreqresp', 'p7s' => 'application/pkcs7-signature', 'p8' => 'application/pkcs8', 'p10' => 'application/x-pkcs10', 'p12' => 'application/x-pkcs12', 'pac' => 'application/x-ns-proxy-autoconfig', 'pages' => 'application/x-iwork-pages-sffpages', 'pas' => 'text/x-pascal', 'paw' => 'application/vnd.pawaafile', 'pbd' => 'application/vnd.powerbuilder6', 'pbm' => 'image/x-portable-bitmap', 'pcap' => 'application/vnd.tcpdump.pcap', 'pcf' => 'application/x-font-pcf', 'pcl' => 'application/vnd.hp-pcl', 'pclxl' => 'application/vnd.hp-pclxl', 'pct' => 'image/x-pict', 'pcurl' => 'application/vnd.curl.pcurl', 'pcx' => 'image/x-pcx', 'pdb' => 'application/x-pilot', 'pde' => 'text/x-processing', 'pdf' => 'application/pdf', 'pem' => 'application/x-x509-user-cert', 'pfa' => 'application/x-font-type1', 'pfb' => 'application/x-font-type1', 'pfm' => 'application/x-font-type1', 'pfr' => 'application/font-tdpfr', 'pfx' => 'application/x-pkcs12', 'pgm' => 'image/x-portable-graymap', 'pgn' => 'application/x-chess-pgn', 'pgp' => 'application/pgp', 'phar' => 'application/octet-stream', 'php' => 'application/x-httpd-php', 'php3' => 'application/x-httpd-php', 'php4' => 'application/x-httpd-php', 'phps' => 'application/x-httpd-php-source', 'phtml' => 'application/x-httpd-php', 'pic' => 'image/x-pict', 'pkg' => 'application/octet-stream', 'pki' => 'application/pkixcmp', 'pkipath' => 'application/pkix-pkipath', 'pkpass' => 'application/vnd.apple.pkpass', 'pl' => 'application/x-perl', 'plb' => 'application/vnd.3gpp.pic-bw-large', 'plc' => 'application/vnd.mobius.plc', 'plf' => 'application/vnd.pocketlearn', 'pls' => 'application/pls+xml', 'pm' => 'application/x-perl', 'pml' => 'application/vnd.ctc-posml', 'png' => 'image/png', 'pnm' => 'image/x-portable-anymap', 'portpkg' => 'application/vnd.macports.portpkg', 'pot' => 'application/vnd.ms-powerpoint', 'potm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', 'ppa' => 'application/vnd.ms-powerpoint', 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12', 'ppd' => 'application/vnd.cups-ppd', 'ppm' => 'image/x-portable-pixmap', 'pps' => 'application/vnd.ms-powerpoint', 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppt' => 'application/powerpoint', 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pqa' => 'application/vnd.palm', 'prc' => 'model/prc', 'pre' => 'application/vnd.lotus-freelance', 'prf' => 'application/pics-rules', 'provx' => 'application/provenance+xml', 'ps' => 'application/postscript', 'psb' => 'application/vnd.3gpp.pic-bw-small', 'psd' => 'application/x-photoshop', 'psf' => 'application/x-font-linux-psf', 'pskcxml' => 'application/pskc+xml', 'pti' => 'image/prs.pti', 'ptid' => 'application/vnd.pvi.ptid1', 'pub' => 'application/x-mspublisher', 'pvb' => 'application/vnd.3gpp.pic-bw-var', 'pwn' => 'application/vnd.3m.post-it-notes', 'pya' => 'audio/vnd.ms-playready.media.pya', 'pyo' => 'model/vnd.pytha.pyox', 'pyox' => 'model/vnd.pytha.pyox', 'pyv' => 'video/vnd.ms-playready.media.pyv', 'qam' => 'application/vnd.epson.quickanime', 'qbo' => 'application/vnd.intu.qbo', 'qfx' => 'application/vnd.intu.qfx', 'qps' => 'application/vnd.publishare-delta-tree', 'qt' => 'video/quicktime', 'qwd' => 'application/vnd.quark.quarkxpress', 'qwt' => 'application/vnd.quark.quarkxpress', 'qxb' => 'application/vnd.quark.quarkxpress', 'qxd' => 'application/vnd.quark.quarkxpress', 'qxl' => 'application/vnd.quark.quarkxpress', 'qxt' => 'application/vnd.quark.quarkxpress', 'ra' => 'audio/x-realaudio', 'ram' => 'audio/x-pn-realaudio', 'raml' => 'application/raml+yaml', 'rapd' => 'application/route-apd+xml', 'rar' => 'application/x-rar', 'ras' => 'image/x-cmu-raster', 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', 'rdf' => 'application/rdf+xml', 'rdz' => 'application/vnd.data-vision.rdz', 'relo' => 'application/p2p-overlay+xml', 'rep' => 'application/vnd.businessobjects', 'res' => 'application/x-dtbresource+xml', 'rgb' => 'image/x-rgb', 'rif' => 'application/reginfo+xml', 'rip' => 'audio/vnd.rip', 'ris' => 'application/x-research-info-systems', 'rl' => 'application/resource-lists+xml', 'rlc' => 'image/vnd.fujixerox.edmics-rlc', 'rld' => 'application/resource-lists-diff+xml', 'rm' => 'audio/x-pn-realaudio', 'rmi' => 'audio/midi', 'rmp' => 'audio/x-pn-realaudio-plugin', 'rms' => 'application/vnd.jcp.javame.midlet-rms', 'rmvb' => 'application/vnd.rn-realmedia-vbr', 'rnc' => 'application/relax-ng-compact-syntax', 'rng' => 'application/xml', 'roa' => 'application/rpki-roa', 'roff' => 'text/troff', 'rp9' => 'application/vnd.cloanto.rp9', 'rpm' => 'audio/x-pn-realaudio-plugin', 'rpss' => 'application/vnd.nokia.radio-presets', 'rpst' => 'application/vnd.nokia.radio-preset', 'rq' => 'application/sparql-query', 'rs' => 'application/rls-services+xml', 'rsa' => 'application/x-pkcs7', 'rsat' => 'application/atsc-rsat+xml', 'rsd' => 'application/rsd+xml', 'rsheet' => 'application/urc-ressheet+xml', 'rss' => 'application/rss+xml', 'rtf' => 'text/rtf', 'rtx' => 'text/richtext', 'run' => 'application/x-makeself', 'rusd' => 'application/route-usd+xml', 'rv' => 'video/vnd.rn-realvideo', 's' => 'text/x-asm', 's3m' => 'audio/s3m', 'saf' => 'application/vnd.yamaha.smaf-audio', 'sass' => 'text/x-sass', 'sbml' => 'application/sbml+xml', 'sc' => 'application/vnd.ibm.secure-container', 'scd' => 'application/x-msschedule', 'scm' => 'application/vnd.lotus-screencam', 'scq' => 'application/scvp-cv-request', 'scs' => 'application/scvp-cv-response', 'scss' => 'text/x-scss', 'scurl' => 'text/vnd.curl.scurl', 'sda' => 'application/vnd.stardivision.draw', 'sdc' => 'application/vnd.stardivision.calc', 'sdd' => 'application/vnd.stardivision.impress', 'sdkd' => 'application/vnd.solent.sdkm+xml', 'sdkm' => 'application/vnd.solent.sdkm+xml', 'sdp' => 'application/sdp', 'sdw' => 'application/vnd.stardivision.writer', 'sea' => 'application/octet-stream', 'see' => 'application/vnd.seemail', 'seed' => 'application/vnd.fdsn.seed', 'sema' => 'application/vnd.sema', 'semd' => 'application/vnd.semd', 'semf' => 'application/vnd.semf', 'senmlx' => 'application/senml+xml', 'sensmlx' => 'application/sensml+xml', 'ser' => 'application/java-serialized-object', 'setpay' => 'application/set-payment-initiation', 'setreg' => 'application/set-registration-initiation', 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', 'sfs' => 'application/vnd.spotfire.sfs', 'sfv' => 'text/x-sfv', 'sgi' => 'image/sgi', 'sgl' => 'application/vnd.stardivision.writer-global', 'sgm' => 'text/sgml', 'sgml' => 'text/sgml', 'sh' => 'application/x-sh', 'shar' => 'application/x-shar', 'shex' => 'text/shex', 'shf' => 'application/shf+xml', 'shtml' => 'text/html', 'sid' => 'image/x-mrsid-image', 'sieve' => 'application/sieve', 'sig' => 'application/pgp-signature', 'sil' => 'audio/silk', 'silo' => 'model/mesh', 'sis' => 'application/vnd.symbian.install', 'sisx' => 'application/vnd.symbian.install', 'sit' => 'application/x-stuffit', 'sitx' => 'application/x-stuffitx', 'siv' => 'application/sieve', 'skd' => 'application/vnd.koan', 'skm' => 'application/vnd.koan', 'skp' => 'application/vnd.koan', 'skt' => 'application/vnd.koan', 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', 'slim' => 'text/slim', 'slm' => 'text/slim', 'sls' => 'application/route-s-tsid+xml', 'slt' => 'application/vnd.epson.salt', 'sm' => 'application/vnd.stepmania.stepchart', 'smf' => 'application/vnd.stardivision.math', 'smi' => 'application/smil', 'smil' => 'application/smil', 'smv' => 'video/x-smv', 'smzip' => 'application/vnd.stepmania.package', 'snd' => 'audio/basic', 'snf' => 'application/x-font-snf', 'so' => 'application/octet-stream', 'spc' => 'application/x-pkcs7-certificates', 'spdx' => 'text/spdx', 'spf' => 'application/vnd.yamaha.smaf-phrase', 'spl' => 'application/x-futuresplash', 'spot' => 'text/vnd.in3d.spot', 'spp' => 'application/scvp-vp-response', 'spq' => 'application/scvp-vp-request', 'spx' => 'audio/ogg', 'sql' => 'application/x-sql', 'src' => 'application/x-wais-source', 'srt' => 'application/x-subrip', 'sru' => 'application/sru+xml', 'srx' => 'application/sparql-results+xml', 'ssdl' => 'application/ssdl+xml', 'sse' => 'application/vnd.kodak-descriptor', 'ssf' => 'application/vnd.epson.ssf', 'ssml' => 'application/ssml+xml', 'sst' => 'application/octet-stream', 'st' => 'application/vnd.sailingtracker.track', 'stc' => 'application/vnd.sun.xml.calc.template', 'std' => 'application/vnd.sun.xml.draw.template', 'step' => 'application/STEP', 'stf' => 'application/vnd.wt.stf', 'sti' => 'application/vnd.sun.xml.impress.template', 'stk' => 'application/hyperstudio', 'stl' => 'model/stl', 'stp' => 'application/STEP', 'stpx' => 'model/step+xml', 'stpxz' => 'model/step-xml+zip', 'stpz' => 'model/step+zip', 'str' => 'application/vnd.pg.format', 'stw' => 'application/vnd.sun.xml.writer.template', 'styl' => 'text/stylus', 'stylus' => 'text/stylus', 'sub' => 'text/vnd.dvb.subtitle', 'sus' => 'application/vnd.sus-calendar', 'susp' => 'application/vnd.sus-calendar', 'sv4cpio' => 'application/x-sv4cpio', 'sv4crc' => 'application/x-sv4crc', 'svc' => 'application/vnd.dvb.service', 'svd' => 'application/vnd.svd', 'svg' => 'image/svg+xml', 'svgz' => 'image/svg+xml', 'swa' => 'application/x-director', 'swf' => 'application/x-shockwave-flash', 'swi' => 'application/vnd.aristanetworks.swi', 'swidtag' => 'application/swid+xml', 'sxc' => 'application/vnd.sun.xml.calc', 'sxd' => 'application/vnd.sun.xml.draw', 'sxg' => 'application/vnd.sun.xml.writer.global', 'sxi' => 'application/vnd.sun.xml.impress', 'sxm' => 'application/vnd.sun.xml.math', 'sxw' => 'application/vnd.sun.xml.writer', 't' => 'text/troff', 't3' => 'application/x-t3vm-image', 't38' => 'image/t38', 'taglet' => 'application/vnd.mynfc', 'tao' => 'application/vnd.tao.intent-module-archive', 'tap' => 'image/vnd.tencent.tap', 'tar' => 'application/x-tar', 'tcap' => 'application/vnd.3gpp2.tcap', 'tcl' => 'application/x-tcl', 'td' => 'application/urc-targetdesc+xml', 'teacher' => 'application/vnd.smart.teacher', 'tei' => 'application/tei+xml', 'teicorpus' => 'application/tei+xml', 'tex' => 'application/x-tex', 'texi' => 'application/x-texinfo', 'texinfo' => 'application/x-texinfo', 'text' => 'text/plain', 'tfi' => 'application/thraud+xml', 'tfm' => 'application/x-tex-tfm', 'tfx' => 'image/tiff-fx', 'tga' => 'image/x-tga', 'tgz' => 'application/x-tar', 'thmx' => 'application/vnd.ms-officetheme', 'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'tk' => 'application/x-tcl', 'tmo' => 'application/vnd.tmobile-livetv', 'toml' => 'application/toml', 'torrent' => 'application/x-bittorrent', 'tpl' => 'application/vnd.groove-tool-template', 'tpt' => 'application/vnd.trid.tpt', 'tr' => 'text/troff', 'tra' => 'application/vnd.trueapp', 'trig' => 'application/trig', 'trm' => 'application/x-msterminal', 'ts' => 'video/mp2t', 'tsd' => 'application/timestamped-data', 'tsv' => 'text/tab-separated-values', 'ttc' => 'font/collection', 'ttf' => 'font/ttf', 'ttl' => 'text/turtle', 'ttml' => 'application/ttml+xml', 'twd' => 'application/vnd.simtech-mindmapper', 'twds' => 'application/vnd.simtech-mindmapper', 'txd' => 'application/vnd.genomatix.tuxedo', 'txf' => 'application/vnd.mobius.txf', 'txt' => 'text/plain', 'u3d' => 'model/u3d', 'u8dsn' => 'message/global-delivery-status', 'u8hdr' => 'message/global-headers', 'u8mdn' => 'message/global-disposition-notification', 'u8msg' => 'message/global', 'u32' => 'application/x-authorware-bin', 'ubj' => 'application/ubjson', 'udeb' => 'application/x-debian-package', 'ufd' => 'application/vnd.ufdl', 'ufdl' => 'application/vnd.ufdl', 'ulx' => 'application/x-glulx', 'umj' => 'application/vnd.umajin', 'unityweb' => 'application/vnd.unity', 'uo' => 'application/vnd.uoml+xml', 'uoml' => 'application/vnd.uoml+xml', 'uri' => 'text/uri-list', 'uris' => 'text/uri-list', 'urls' => 'text/uri-list', 'usda' => 'model/vnd.usda', 'usdz' => 'model/vnd.usdz+zip', 'ustar' => 'application/x-ustar', 'utz' => 'application/vnd.uiq.theme', 'uu' => 'text/x-uuencode', 'uva' => 'audio/vnd.dece.audio', 'uvd' => 'application/vnd.dece.data', 'uvf' => 'application/vnd.dece.data', 'uvg' => 'image/vnd.dece.graphic', 'uvh' => 'video/vnd.dece.hd', 'uvi' => 'image/vnd.dece.graphic', 'uvm' => 'video/vnd.dece.mobile', 'uvp' => 'video/vnd.dece.pd', 'uvs' => 'video/vnd.dece.sd', 'uvt' => 'application/vnd.dece.ttml+xml', 'uvu' => 'video/vnd.uvvu.mp4', 'uvv' => 'video/vnd.dece.video', 'uvva' => 'audio/vnd.dece.audio', 'uvvd' => 'application/vnd.dece.data', 'uvvf' => 'application/vnd.dece.data', 'uvvg' => 'image/vnd.dece.graphic', 'uvvh' => 'video/vnd.dece.hd', 'uvvi' => 'image/vnd.dece.graphic', 'uvvm' => 'video/vnd.dece.mobile', 'uvvp' => 'video/vnd.dece.pd', 'uvvs' => 'video/vnd.dece.sd', 'uvvt' => 'application/vnd.dece.ttml+xml', 'uvvu' => 'video/vnd.uvvu.mp4', 'uvvv' => 'video/vnd.dece.video', 'uvvx' => 'application/vnd.dece.unspecified', 'uvvz' => 'application/vnd.dece.zip', 'uvx' => 'application/vnd.dece.unspecified', 'uvz' => 'application/vnd.dece.zip', 'vbox' => 'application/x-virtualbox-vbox', 'vbox-extpack' => 'application/x-virtualbox-vbox-extpack', 'vcard' => 'text/vcard', 'vcd' => 'application/x-cdlink', 'vcf' => 'text/x-vcard', 'vcg' => 'application/vnd.groove-vcard', 'vcs' => 'text/x-vcalendar', 'vcx' => 'application/vnd.vcx', 'vdi' => 'application/x-virtualbox-vdi', 'vds' => 'model/vnd.sap.vds', 'vhd' => 'application/x-virtualbox-vhd', 'vis' => 'application/vnd.visionary', 'viv' => 'video/vnd.vivo', 'vlc' => 'application/videolan', 'vmdk' => 'application/x-virtualbox-vmdk', 'vob' => 'video/x-ms-vob', 'vor' => 'application/vnd.stardivision.writer', 'vox' => 'application/x-authorware-bin', 'vrml' => 'model/vrml', 'vsd' => 'application/vnd.visio', 'vsf' => 'application/vnd.vsf', 'vss' => 'application/vnd.visio', 'vst' => 'application/vnd.visio', 'vsw' => 'application/vnd.visio', 'vtf' => 'image/vnd.valve.source.texture', 'vtt' => 'text/vtt', 'vtu' => 'model/vnd.vtu', 'vxml' => 'application/voicexml+xml', 'w3d' => 'application/x-director', 'wad' => 'application/x-doom', 'wadl' => 'application/vnd.sun.wadl+xml', 'war' => 'application/java-archive', 'wasm' => 'application/wasm', 'wav' => 'audio/x-wav', 'wax' => 'audio/x-ms-wax', 'wbmp' => 'image/vnd.wap.wbmp', 'wbs' => 'application/vnd.criticaltools.wbs+xml', 'wbxml' => 'application/wbxml', 'wcm' => 'application/vnd.ms-works', 'wdb' => 'application/vnd.ms-works', 'wdp' => 'image/vnd.ms-photo', 'weba' => 'audio/webm', 'webapp' => 'application/x-web-app-manifest+json', 'webm' => 'video/webm', 'webmanifest' => 'application/manifest+json', 'webp' => 'image/webp', 'wg' => 'application/vnd.pmi.widget', 'wgsl' => 'text/wgsl', 'wgt' => 'application/widget', 'wif' => 'application/watcherinfo+xml', 'wks' => 'application/vnd.ms-works', 'wm' => 'video/x-ms-wm', 'wma' => 'audio/x-ms-wma', 'wmd' => 'application/x-ms-wmd', 'wmf' => 'image/wmf', 'wml' => 'text/vnd.wap.wml', 'wmlc' => 'application/wmlc', 'wmls' => 'text/vnd.wap.wmlscript', 'wmlsc' => 'application/vnd.wap.wmlscriptc', 'wmv' => 'video/x-ms-wmv', 'wmx' => 'video/x-ms-wmx', 'wmz' => 'application/x-msmetafile', 'woff' => 'font/woff', 'woff2' => 'font/woff2', 'word' => 'application/msword', 'wpd' => 'application/vnd.wordperfect', 'wpl' => 'application/vnd.ms-wpl', 'wps' => 'application/vnd.ms-works', 'wqd' => 'application/vnd.wqd', 'wri' => 'application/x-mswrite', 'wrl' => 'model/vrml', 'wsc' => 'message/vnd.wfa.wsc', 'wsdl' => 'application/wsdl+xml', 'wspolicy' => 'application/wspolicy+xml', 'wtb' => 'application/vnd.webturbo', 'wvx' => 'video/x-ms-wvx', 'x3d' => 'model/x3d+xml', 'x3db' => 'model/x3d+fastinfoset', 'x3dbz' => 'model/x3d+binary', 'x3dv' => 'model/x3d-vrml', 'x3dvz' => 'model/x3d+vrml', 'x3dz' => 'model/x3d+xml', 'x32' => 'application/x-authorware-bin', 'x_b' => 'model/vnd.parasolid.transmit.binary', 'x_t' => 'model/vnd.parasolid.transmit.text', 'xaml' => 'application/xaml+xml', 'xap' => 'application/x-silverlight-app', 'xar' => 'application/vnd.xara', 'xav' => 'application/xcap-att+xml', 'xbap' => 'application/x-ms-xbap', 'xbd' => 'application/vnd.fujixerox.docuworks.binder', 'xbm' => 'image/x-xbitmap', 'xca' => 'application/xcap-caps+xml', 'xcs' => 'application/calendar+xml', 'xdf' => 'application/xcap-diff+xml', 'xdm' => 'application/vnd.syncml.dm+xml', 'xdp' => 'application/vnd.adobe.xdp+xml', 'xdssc' => 'application/dssc+xml', 'xdw' => 'application/vnd.fujixerox.docuworks', 'xel' => 'application/xcap-el+xml', 'xenc' => 'application/xenc+xml', 'xer' => 'application/patch-ops-error+xml', 'xfdf' => 'application/xfdf', 'xfdl' => 'application/vnd.xfdl', 'xht' => 'application/xhtml+xml', 'xhtm' => 'application/vnd.pwg-xhtml-print+xml', 'xhtml' => 'application/xhtml+xml', 'xhvml' => 'application/xv+xml', 'xif' => 'image/vnd.xiff', 'xl' => 'application/excel', 'xla' => 'application/vnd.ms-excel', 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', 'xlc' => 'application/vnd.ms-excel', 'xlf' => 'application/xliff+xml', 'xlm' => 'application/vnd.ms-excel', 'xls' => 'application/vnd.ms-excel', 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlt' => 'application/vnd.ms-excel', 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xlw' => 'application/vnd.ms-excel', 'xm' => 'audio/xm', 'xml' => 'application/xml', 'xns' => 'application/xcap-ns+xml', 'xo' => 'application/vnd.olpc-sugar', 'xop' => 'application/xop+xml', 'xpi' => 'application/x-xpinstall', 'xpl' => 'application/xproc+xml', 'xpm' => 'image/x-xpixmap', 'xpr' => 'application/vnd.is-xpr', 'xps' => 'application/vnd.ms-xpsdocument', 'xpw' => 'application/vnd.intercon.formnet', 'xpx' => 'application/vnd.intercon.formnet', 'xsd' => 'application/xml', 'xsf' => 'application/prs.xsf+xml', 'xsl' => 'application/xml', 'xslt' => 'application/xslt+xml', 'xsm' => 'application/vnd.syncml+xml', 'xspf' => 'application/xspf+xml', 'xul' => 'application/vnd.mozilla.xul+xml', 'xvm' => 'application/xv+xml', 'xvml' => 'application/xv+xml', 'xwd' => 'image/x-xwindowdump', 'xyz' => 'chemical/x-xyz', 'xz' => 'application/x-xz', 'yaml' => 'text/yaml', 'yang' => 'application/yang', 'yin' => 'application/yin+xml', 'yml' => 'text/yaml', 'ymp' => 'text/x-suse-ymp', 'z' => 'application/x-compress', 'z1' => 'application/x-zmachine', 'z2' => 'application/x-zmachine', 'z3' => 'application/x-zmachine', 'z4' => 'application/x-zmachine', 'z5' => 'application/x-zmachine', 'z6' => 'application/x-zmachine', 'z7' => 'application/x-zmachine', 'z8' => 'application/x-zmachine', 'zaz' => 'application/vnd.zzazz.deck+xml', 'zip' => 'application/zip', 'zir' => 'application/vnd.zul', 'zirz' => 'application/vnd.zul', 'zmm' => 'application/vnd.handheld-entertainment+xml', 'zsh' => 'text/x-scriptzsh', ]; /** * Determines the mimetype of a file by looking at its extension. * * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json */ public static function fromFilename(string $filename): ?string { return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION)); } /** * Maps a file extensions to a mimetype. * * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json */ public static function fromExtension(string $extension): ?string { return self::MIME_TYPES[strtolower($extension)] ?? null; } } PKhwm = $hwm; } public function __toString(): string { return $this->getContents(); } public function getContents(): string { $buffer = $this->buffer; $this->buffer = ''; return $buffer; } public function close(): void { $this->buffer = ''; } public function detach() { $this->close(); return null; } public function getSize(): ?int { return strlen($this->buffer); } public function isReadable(): bool { return true; } public function isWritable(): bool { return true; } public function isSeekable(): bool { return false; } public function rewind(): void { $this->seek(0); } public function seek($offset, $whence = SEEK_SET): void { throw new \RuntimeException('Cannot seek a BufferStream'); } public function eof(): bool { return strlen($this->buffer) === 0; } public function tell(): int { throw new \RuntimeException('Cannot determine the position of a BufferStream'); } /** * Reads data from the buffer. */ public function read($length): string { $currentLength = strlen($this->buffer); if ($length >= $currentLength) { // No need to slice the buffer because we don't have enough data. $result = $this->buffer; $this->buffer = ''; } else { // Slice up the result to provide a subset of the buffer. $result = substr($this->buffer, 0, $length); $this->buffer = substr($this->buffer, $length); } return $result; } /** * Writes data to the buffer. */ public function write($string): int { $this->buffer .= $string; if (strlen($this->buffer) >= $this->hwm) { return 0; } return strlen($string); } /** * @return mixed */ public function getMetadata($key = null) { if ($key === 'hwm') { return $this->hwm; } return $key ? null : []; } } PKisReadable()) { $mode = $stream->isWritable() ? 'r+' : 'r'; } elseif ($stream->isWritable()) { $mode = 'w'; } else { throw new \InvalidArgumentException('The stream must be readable, ' .'writable, or both.'); } return fopen('guzzle://stream', $mode, false, self::createStreamContext($stream)); } /** * Creates a stream context that can be used to open a stream as a php stream resource. * * @return resource */ public static function createStreamContext(StreamInterface $stream) { return stream_context_create([ 'guzzle' => ['stream' => $stream], ]); } /** * Registers the stream wrapper if needed */ public static function register(): void { if (!in_array('guzzle', stream_get_wrappers())) { stream_wrapper_register('guzzle', __CLASS__); } } public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool { $options = stream_context_get_options($this->context); if (!isset($options['guzzle']['stream'])) { return false; } $this->mode = $mode; $this->stream = $options['guzzle']['stream']; return true; } public function stream_read(int $count): string { return $this->stream->read($count); } public function stream_write(string $data): int { return $this->stream->write($data); } public function stream_tell(): int { return $this->stream->tell(); } public function stream_eof(): bool { return $this->stream->eof(); } public function stream_seek(int $offset, int $whence): bool { $this->stream->seek($offset, $whence); return true; } /** * @return resource|false */ public function stream_cast(int $cast_as) { $stream = clone $this->stream; $resource = $stream->detach(); return $resource ?? false; } /** * @return array */ public function stream_stat(): array { static $modeMap = [ 'r' => 33060, 'rb' => 33060, 'r+' => 33206, 'w' => 33188, 'wb' => 33188, ]; return [ 'dev' => 0, 'ino' => 0, 'mode' => $modeMap[$this->mode], 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => $this->stream->getSize() ?: 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0, ]; } /** * @return array */ public function url_stat(string $path, int $flags): array { return [ 'dev' => 0, 'ino' => 0, 'mode' => 0, 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0, ]; } } PKgetSize(); } return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType); } public function createStream(string $content = ''): StreamInterface { return Utils::streamFor($content); } public function createStreamFromFile(string $file, string $mode = 'r'): StreamInterface { try { $resource = Utils::tryFopen($file, $mode); } catch (\RuntimeException $e) { if ('' === $mode || false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], true)) { throw new \InvalidArgumentException(sprintf('Invalid file opening mode "%s"', $mode), 0, $e); } throw $e; } return Utils::streamFor($resource); } public function createStreamFromResource($resource): StreamInterface { return Utils::streamFor($resource); } public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface { if (empty($method)) { if (!empty($serverParams['REQUEST_METHOD'])) { $method = $serverParams['REQUEST_METHOD']; } else { throw new \InvalidArgumentException('Cannot determine HTTP method'); } } return new ServerRequest($method, $uri, [], null, '1.1', $serverParams); } public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface { return new Response($code, [], null, '1.1', $reasonPhrase); } public function createRequest(string $method, $uri): RequestInterface { return new Request($method, $uri); } public function createUri(string $uri = ''): UriInterface { return new Uri($uri); } } PK]+>|[^=]+/', $kvp, $matches)) { $m = $matches[0]; if (isset($m[1])) { $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); } else { $part[] = trim($m[0], $trimmed); } } } if ($part) { $params[] = $part; } } } return $params; } /** * Converts an array of header values that may contain comma separated * headers into an array of headers with no comma separated values. * * @param string|array $header Header to normalize. * * @deprecated Use self::splitList() instead. */ public static function normalize($header): array { $result = []; foreach ((array) $header as $value) { foreach (self::splitList($value) as $parsed) { $result[] = $parsed; } } return $result; } /** * Splits a HTTP header defined to contain a comma-separated list into * each individual value. Empty values will be removed. * * Example headers include 'accept', 'cache-control' and 'if-none-match'. * * This method must not be used to parse headers that are not defined as * a list, such as 'user-agent' or 'set-cookie'. * * @param string|string[] $values Header value as returned by MessageInterface::getHeader() * * @return string[] */ public static function splitList($values): array { if (!\is_array($values)) { $values = [$values]; } $result = []; foreach ($values as $value) { if (!\is_string($value)) { throw new \TypeError('$header must either be a string or an array containing strings.'); } $v = ''; $isQuoted = false; $isEscaped = false; for ($i = 0, $max = \strlen($value); $i < $max; ++$i) { if ($isEscaped) { $v .= $value[$i]; $isEscaped = false; continue; } if (!$isQuoted && $value[$i] === ',') { $v = \trim($v); if ($v !== '') { $result[] = $v; } $v = ''; continue; } if ($isQuoted && $value[$i] === '\\') { $isEscaped = true; $v .= $value[$i]; continue; } if ($value[$i] === '"') { $isQuoted = !$isQuoted; $v .= $value[$i]; continue; } $v .= $value[$i]; } $v = \trim($v); if ($v !== '') { $result[] = $v; } } return $result; } } PKremoteStream = $stream; $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+')); } public function getSize(): ?int { $remoteSize = $this->remoteStream->getSize(); if (null === $remoteSize) { return null; } return max($this->stream->getSize(), $remoteSize); } public function rewind(): void { $this->seek(0); } public function seek($offset, $whence = SEEK_SET): void { if ($whence === SEEK_SET) { $byte = $offset; } elseif ($whence === SEEK_CUR) { $byte = $offset + $this->tell(); } elseif ($whence === SEEK_END) { $size = $this->remoteStream->getSize(); if ($size === null) { $size = $this->cacheEntireStream(); } $byte = $size + $offset; } else { throw new \InvalidArgumentException('Invalid whence'); } $diff = $byte - $this->stream->getSize(); if ($diff > 0) { // Read the remoteStream until we have read in at least the amount // of bytes requested, or we reach the end of the file. while ($diff > 0 && !$this->remoteStream->eof()) { $this->read($diff); $diff = $byte - $this->stream->getSize(); } } else { // We can just do a normal seek since we've already seen this byte. $this->stream->seek($byte); } } public function read($length): string { // Perform a regular read on any previously read data from the buffer $data = $this->stream->read($length); $remaining = $length - strlen($data); // More data was requested so read from the remote stream if ($remaining) { // If data was written to the buffer in a position that would have // been filled from the remote stream, then we must skip bytes on // the remote stream to emulate overwriting bytes from that // position. This mimics the behavior of other PHP stream wrappers. $remoteData = $this->remoteStream->read( $remaining + $this->skipReadBytes ); if ($this->skipReadBytes) { $len = strlen($remoteData); $remoteData = substr($remoteData, $this->skipReadBytes); $this->skipReadBytes = max(0, $this->skipReadBytes - $len); } $data .= $remoteData; $this->stream->write($remoteData); } return $data; } public function write($string): int { // When appending to the end of the currently read stream, you'll want // to skip bytes from being read from the remote stream to emulate // other stream wrappers. Basically replacing bytes of data of a fixed // length. $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); if ($overflow > 0) { $this->skipReadBytes += $overflow; } return $this->stream->write($string); } public function eof(): bool { return $this->stream->eof() && $this->remoteStream->eof(); } /** * Close both the remote stream and buffer stream */ public function close(): void { $this->remoteStream->close(); $this->stream->close(); } private function cacheEntireStream(): int { $target = new FnStream(['write' => 'strlen']); Utils::copyToStream($this, $target); return $this->tell(); } } PKgetPath() === '' && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') ) { $uri = $uri->withPath('/'); } if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { $uri = $uri->withHost(''); } if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { $uri = $uri->withPort(null); } if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); } if ($flags & self::REMOVE_DUPLICATE_SLASHES) { $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); } if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { $queryKeyValues = explode('&', $uri->getQuery()); sort($queryKeyValues); $uri = $uri->withQuery(implode('&', $queryKeyValues)); } return $uri; } /** * Whether two URIs can be considered equivalent. * * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be * resolved against the same base URI. If this is not the case, determination of equivalence or difference of * relative references does not mean anything. * * @param UriInterface $uri1 An URI to compare * @param UriInterface $uri2 An URI to compare * @param int $normalizations A bitmask of normalizations to apply, see constants * * @see https://tools.ietf.org/html/rfc3986#section-6.1 */ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool { return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); } private static function capitalizePercentEncoding(UriInterface $uri): UriInterface { $regex = '/(?:%[A-Fa-f0-9]{2})++/'; $callback = function (array $match) { return strtoupper($match[0]); }; return $uri->withPath( preg_replace_callback($regex, $callback, $uri->getPath()) )->withQuery( preg_replace_callback($regex, $callback, $uri->getQuery()) ); } private static function decodeUnreservedCharacters(UriInterface $uri): UriInterface { $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; $callback = function (array $match) { return rawurldecode($match[0]); }; return $uri->withPath( preg_replace_callback($regex, $callback, $uri->getPath()) )->withQuery( preg_replace_callback($regex, $callback, $uri->getQuery()) ); } private function __construct() { // cannot be instantiated } } PKqw[%IIMollieConnectProvider.phpnu[ * @copyright Mollie B.V. * * @link https://www.mollie.com */ namespace Mollie\Laravel; use Illuminate\Support\Arr; use Laravel\Socialite\Two\AbstractProvider; use Laravel\Socialite\Two\ProviderInterface; use Laravel\Socialite\Two\User; /** * Class MollieConnectProvider. */ class MollieConnectProvider extends AbstractProvider implements ProviderInterface { /** * The base url to the Mollie API. * * @const string */ const MOLLIE_API_URL = 'https://api.mollie.com'; /** * The base url to the Mollie web application. * * @const string */ const MOLLIE_WEB_URL = 'https://www.mollie.com'; /** * The scopes being requested. * * @var array */ protected $scopes = ['organizations.read']; /** * The separating character for the requested scopes. * * @var string */ protected $scopeSeparator = ' '; /** * Get the authentication URL for the provider. * * @param string $state * @return string */ protected function getAuthUrl($state) { return $this->buildAuthUrlFromBase(static::MOLLIE_WEB_URL.'/oauth2/authorize', $state); } /** * Get the token URL for the provider. * * @return string */ protected function getTokenUrl() { return static::MOLLIE_API_URL.'/oauth2/tokens'; } /** * Get the access token for the given code. * * @param string $code * @return string */ public function getAccessToken($code) { $response = $this->getHttpClient()->post($this->getTokenUrl(), [ 'headers' => ['Authorization' => 'Basic '.base64_encode($this->clientId.':'.$this->clientSecret)], 'form_params' => $this->getTokenFields($code), ]); return $this->parseAccessToken($response->getBody()); } /** * Get the access token with a refresh token. * * @param string $refresh_token * @return array */ public function getRefreshTokenResponse($refresh_token) { $response = $this->getHttpClient()->post($this->getTokenUrl(), [ 'headers' => ['Accept' => 'application/json'], 'form_params' => $this->getRefreshTokenFields($refresh_token), ]); return json_decode($response->getBody(), true); } /** * Get the refresh tokenfields with a refresh token. * * @param string $refresh_token * @return array */ protected function getRefreshTokenFields($refresh_token) { return [ 'client_id' => $this->clientId, 'client_secret' => $this->clientSecret, 'grant_type' => 'refresh_token', 'refresh_token' => $refresh_token, ]; } /** * Get the POST fields for the token request. * * @param string $code * @return array */ public function getTokenFields($code) { return Arr::add(parent::getTokenFields($code), 'grant_type', 'authorization_code'); } /** * Get the raw user for the given access token. * * @param string $token * @return array */ protected function getUserByToken($token) { $response = $this->getHttpClient()->get(static::MOLLIE_API_URL.'/v2/organizations/me', [ 'headers' => ['Authorization' => 'Bearer '.$token], ]); return json_decode($response->getBody(), true); } /** * Map the raw user array to a Socialite User instance. * * @return \Laravel\Socialite\AbstractUser */ protected function mapUserToObject(array $user) { return (new User())->setRaw($user)->map([ 'id' => $user['id'], 'nickname' => $user['name'], 'name' => $user['name'], 'email' => $user['email'], 'avatar' => null, ]); } } PKqw[[MMollieServiceProvider.phpnu[ * @copyright Mollie B.V. * * @link https://www.mollie.com */ namespace Mollie\Laravel; use Illuminate\Contracts\Container\Container; use Illuminate\Foundation\Application as LaravelApplication; use Illuminate\Support\ServiceProvider; use Laravel\Lumen\Application as LumenApplication; use Mollie\Api\MollieApiClient; use Mollie\Laravel\Wrappers\MollieApiWrapper; /** * Class MollieServiceProvider. */ class MollieServiceProvider extends ServiceProvider { const PACKAGE_VERSION = '2.25.0'; /** * Boot the service provider. * * @return void */ public function boot() { $this->setupConfig(); $this->extendSocialite(); } /** * Setup the config. * * @return void */ protected function setupConfig() { $source = realpath(__DIR__.'/../config/mollie.php'); // Check if the application is a Laravel OR Lumen instance to properly merge the configuration file. if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) { $this->publishes([$source => config_path('mollie.php')]); } elseif ($this->app instanceof LumenApplication) { $this->app->configure('mollie'); } $this->mergeConfigFrom($source, 'mollie'); } /** * Extend the Laravel Socialite factory class, if available. * * @return void */ protected function extendSocialite() { if (interface_exists('Laravel\Socialite\Contracts\Factory')) { $socialite = $this->app->make('Laravel\Socialite\Contracts\Factory'); $socialite->extend('mollie', function (Container $app) use ($socialite) { $config = $app['config']['services.mollie']; return $socialite->buildProvider(MollieConnectProvider::class, $config); }); } } /** * Register the service provider. * * @return void */ public function register() { $this->registerApiClient(); $this->registerApiAdapter(); $this->registerManager(); } /** * Register the Mollie API adapter class. * * @return void */ protected function registerApiAdapter() { $this->app->singleton('mollie.api', function (Container $app) { $config = $app['config']; return new MollieApiWrapper($config, $app['mollie.api.client']); }); $this->app->alias('mollie.api', MollieApiWrapper::class); } /** * Register the Mollie API Client. * * @return void */ protected function registerApiClient() { $this->app->singleton('mollie.api.client', function () { return (new MollieApiClient(new MollieLaravelHttpClientAdapter)) ->addVersionString('MollieLaravel/'.self::PACKAGE_VERSION); }); $this->app->alias('mollie.api.client', MollieApiClient::class); } /** * Register the manager class. * * @return void */ public function registerManager() { $this->app->singleton('mollie', function (Container $app) { return new MollieManager($app); }); $this->app->alias('mollie', MollieManager::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return [ 'mollie', 'mollie.api', 'mollie.api.client', ]; } } PKqw[E&MollieManager.phpnu[ * @copyright Mollie B.V. * * @link https://www.mollie.com */ namespace Mollie\Laravel; use Illuminate\Contracts\Container\Container; /** * Class MollieManager. */ class MollieManager { /** * @var Container */ protected $app; /** * MollieManager constructor. * * @return void */ public function __construct(Container $app) { $this->app = $app; } /** * @return mixed */ public function api() { return $this->app['mollie.api']; } } PKqw[xi R((Wrappers/MollieApiWrapper.phpnu[ * @copyright Mollie B.V. * * @link https://www.mollie.com */ namespace Mollie\Laravel\Wrappers; use Illuminate\Contracts\Config\Repository; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\MollieApiClient; /** * Class MollieApiWrapper. */ class MollieApiWrapper { /** * @var Repository */ protected $config; /** * @var MollieApiClient */ protected $client; /** * MollieApiWrapper constructor. * * @return void * * @throws \Mollie\Api\Exceptions\ApiException */ public function __construct(Repository $config, MollieApiClient $client) { $this->config = $config; $this->client = $client; $key = $this->config->get('mollie.key'); if (! empty($key)) { $this->setApiKey($key); } } /** * @param string $url */ public function setApiEndpoint($url) { $this->client->setApiEndpoint($url); } /** * @return string */ public function getApiEndpoint() { return $this->client->getApiEndpoint(); } /** * @param string $api_key The Mollie API key, starting with 'test_' or 'live_' * * @throws ApiException */ public function setApiKey($api_key) { $this->client->setApiKey($api_key); } /** * @param string $access_token OAuth access token, starting with 'access_' * * @throws ApiException */ public function setAccessToken($access_token) { $this->client->setAccessToken($access_token); } /** * @return bool */ public function usesOAuth() { return $this->client->usesOAuth(); } /** * @return \Mollie\Laravel\Wrappers\MollieApiWrapper */ public function addVersionString($version_string) { $this->client->addVersionString($version_string); return $this; } /** * @return \Mollie\Api\Endpoints\PaymentEndpoint */ public function payments() { return $this->client->payments; } /** * @return \Mollie\Api\Endpoints\PaymentRefundEndpoint */ public function paymentRefunds() { return $this->client->paymentRefunds; } /** * @return \Mollie\Api\Endpoints\PaymentRouteEndpoint */ public function paymentRoutes() { return $this->client->paymentRoutes; } /** * @return \Mollie\Api\Endpoints\PaymentCaptureEndpoint */ public function paymentCaptures() { return $this->client->paymentCaptures; } /** * @return \Mollie\Api\Endpoints\PaymentLinkEndpoint */ public function paymentLinks() { return $this->client->paymentLinks; } /** * @return \Mollie\Api\Endpoints\TerminalEndpoint */ public function terminals() { return $this->client->terminals; } /** * @return \Mollie\Api\Endpoints\MethodEndpoint */ public function methods() { return $this->client->methods; } /** * @return \Mollie\Api\Endpoints\ProfileMethodEndpoint */ public function profileMethods() { return $this->client->profileMethods; } /** * @return \Mollie\Api\Endpoints\CustomerEndpoint */ public function customers() { return $this->client->customers; } /** * @return \Mollie\Api\Endpoints\BalanceEndpoint */ public function balances() { return $this->client->balances; } /** * @return \Mollie\Api\Endpoints\BalanceTransactionEndpoint */ public function balanceTransactions() { return $this->client->balanceTransactions; } /** * @return \Mollie\Api\Endpoints\BalanceReportEndpoint */ public function balanceReports() { return $this->client->balanceReports; } /** * @return \Mollie\Api\Endpoints\SettlementsEndpoint */ public function settlements() { return $this->client->settlements; } /** * @return \Mollie\Api\Endpoints\SettlementPaymentEndpoint */ public function settlementPayments() { return $this->client->settlementPayments; } /** * @return \Mollie\Api\Endpoints\SubscriptionEndpoint */ public function subscriptions() { return $this->client->subscriptions; } /** * @return \Mollie\Api\Endpoints\CustomerPaymentsEndpoint */ public function customerPayments() { return $this->client->customerPayments; } /** * @return \Mollie\Api\Endpoints\MandateEndpoint */ public function mandates() { return $this->client->mandates; } /** * @return \Mollie\Api\Endpoints\OrganizationEndpoint */ public function organizations() { return $this->client->organizations; } /** * @return \Mollie\Api\Endpoints\PermissionEndpoint */ public function permissions() { return $this->client->permissions; } /** * @return \Mollie\Api\Endpoints\InvoiceEndpoint */ public function invoices() { return $this->client->invoices; } /** * @return \Mollie\Api\Endpoints\ProfileEndpoint */ public function profiles() { return $this->client->profiles; } /** * @return \Mollie\Api\Endpoints\ShipmentEndpoint */ public function shipments() { return $this->client->shipments; } /** * @return \Mollie\Api\Endpoints\RefundEndpoint */ public function refunds() { return $this->client->refunds; } /** * @return \Mollie\Api\Endpoints\ChargebackEndpoint */ public function chargebacks() { return $this->client->chargebacks; } /** * @return \Mollie\Api\Endpoints\PaymentChargebackEndpoint */ public function paymentChargebacks() { return $this->client->paymentChargebacks; } /** * @return \Mollie\Api\Endpoints\OrderEndpoint */ public function orders() { return $this->client->orders; } /** * @return \Mollie\Api\Endpoints\OrderLineEndpoint */ public function orderLines() { return $this->client->orderLines; } /** * @return \Mollie\Api\Endpoints\OrderPaymentEndpoint */ public function orderPayments() { return $this->client->orderPayments; } /** * @return \Mollie\Api\Endpoints\OrderRefundEndpoint */ public function orderRefunds() { return $this->client->orderRefunds; } /** * @return \Mollie\Api\Endpoints\OnboardingEndpoint */ public function onboarding() { return $this->client->onboarding; } /** * @return \Mollie\Api\Endpoints\WalletEndpoint */ public function wallets() { return $this->client->wallets; } /** * @return \Mollie\Api\Endpoints\ClientEndpoint */ public function clients() { return $this->client->clients; } /** * @return \Mollie\Api\Endpoints\ClientLinkEndpoint */ public function clientLinks() { return $this->client->clientLinks; } /** * @return \Mollie\Api\Endpoints\OrganizationPartnerEndpoint */ public function organizationPartners() { return $this->client->organizationPartners; } /** * @return void * * @throws \Mollie\Api\Exceptions\HttpAdapterDoesNotSupportDebuggingException */ public function enableDebugging() { $this->client->enableDebugging(); } /** * @return void * * @throws \Mollie\Api\Exceptions\HttpAdapterDoesNotSupportDebuggingException */ public function disableDebugging() { $this->client->disableDebugging(); } public function setIdempotencyKey(string $key) { return $this->client->setIdempotencyKey($key); } public function resetIdempotencyKey() { return $this->client->resetIdempotencyKey(); } public function setIdempotencyKeyGenerator($generator) { return $this->client->setIdempotencyKeyGenerator($generator); } public function clearIdempotencyKeyGenerator() { return $this->client->clearIdempotencyKeyGenerator(); } /** * Handle dynamic property calls. * * @param string $property * @return mixed */ public function __get($property) { if (method_exists($this, $property)) { return call_user_func([$this, $property]); } $message = '%s has no property or method "%s".'; throw new \Error( sprintf($message, static::class, $property) ); } } PKqw[i"MollieLaravelHttpClientAdapter.phpnu[withHeaders($headers) ->send($httpMethod, $url); return $this->parseResponseBody($response); } private function parseResponseBody(Response $response): ?object { $body = $response->body(); if (empty($body)) { if ($response->status() === self::HTTP_NO_CONTENT) { return null; } throw new ApiException('No response body found.'); } $object = @json_decode($body); if (json_last_error() !== JSON_ERROR_NONE) { throw new ApiException("Unable to decode Mollie response: '{$body}'."); } if ($response->status() >= 400) { throw ApiException::createFromResponse($response->toPsrResponse(), null); } return $object; } public function versionString(): string { return 'Laravel/HttpClient'; } } PKqw[(aFacades/Mollie.phpnu[ * @copyright Mollie B.V. * * @link https://www.mollie.com */ namespace Mollie\Laravel\Facades; use Illuminate\Support\Facades\Facade; use Mollie\Laravel\Wrappers\MollieApiWrapper; /** * (Facade) Class Mollie. * * @method static MollieApiWrapper api() */ class Mollie extends Facade { /** * Get the registered name of the component. * * @return string */ protected static function getFacadeAccessor() { return 'mollie'; } } PK"w[X/CompatibilityChecker.phpnu[satisfiesPhpVersion()) { throw new IncompatiblePlatform( "The client requires PHP version >= " . self::MIN_PHP_VERSION . ", you have " . PHP_VERSION . ".", IncompatiblePlatform::INCOMPATIBLE_PHP_VERSION ); } if (! $this->satisfiesJsonExtension()) { throw new IncompatiblePlatform( "PHP extension json is not enabled. Please make sure to enable 'json' in your PHP configuration.", IncompatiblePlatform::INCOMPATIBLE_JSON_EXTENSION ); } } /** * @return bool * @codeCoverageIgnore */ public function satisfiesPhpVersion() { return (bool)version_compare(PHP_VERSION, self::MIN_PHP_VERSION, ">="); } /** * @return bool * @codeCoverageIgnore */ public function satisfiesJsonExtension() { // Check by extension_loaded if (function_exists('extension_loaded') && extension_loaded('json')) { return true; } elseif (function_exists('json_encode')) { return true; } return false; } } PK"w[Iх&Types/OrderLineUpdateOperationType.phpnu[plainMessage = $message; $this->raisedAt = new \DateTimeImmutable(); $formattedRaisedAt = $this->raisedAt->format(DateTime::ISO8601); $message = "[{$formattedRaisedAt}] " . $message; if (! empty($field)) { $this->field = (string)$field; $message .= ". Field: {$this->field}"; } if (! empty($response)) { $this->response = $response; $object = static::parseResponseBody($this->response); if (isset($object->_links)) { foreach ($object->_links as $key => $value) { $this->links[$key] = $value; } } } if ($this->hasLink('documentation')) { $message .= ". Documentation: {$this->getDocumentationUrl()}"; } $this->request = $request; if ($request) { $requestBody = $request->getBody()->__toString(); if ($requestBody) { $message .= ". Request body: {$requestBody}"; } } parent::__construct($message, $code, $previous); } /** * @param \Psr\Http\Message\ResponseInterface $response * @param \Psr\Http\Message\RequestInterface $request * @param \Throwable|null $previous * @return \Mollie\Api\Exceptions\ApiException * @throws \Mollie\Api\Exceptions\ApiException */ public static function createFromResponse($response, $request = null, $previous = null) { $object = static::parseResponseBody($response); $field = null; if (! empty($object->field)) { $field = $object->field; } return new self( "Error executing API call ({$object->status}: {$object->title}): {$object->detail}", $response->getStatusCode(), $field, $request, $response, $previous ); } /** * @return string|null */ public function getField() { return $this->field; } /** * @return string|null */ public function getDocumentationUrl() { return $this->getUrl('documentation'); } /** * @return string|null */ public function getDashboardUrl() { return $this->getUrl('dashboard'); } /** * @return \Psr\Http\Message\ResponseInterface|null */ public function getResponse() { return $this->response; } /** * @return bool */ public function hasResponse() { return $this->response !== null; } /** * @param string $key * @return bool */ public function hasLink($key) { return array_key_exists($key, $this->links); } /** * @param string $key * @return mixed|null */ public function getLink($key) { if ($this->hasLink($key)) { return $this->links[$key]; } return null; } /** * @param string $key * @return null */ public function getUrl($key) { if ($this->hasLink($key)) { return $this->getLink($key)->href; } return null; } /** * @return \Psr\Http\Message\RequestInterface */ public function getRequest() { return $this->request; } /** * Get the ISO8601 representation of the moment this exception was thrown * * @return \DateTimeImmutable */ public function getRaisedAt() { return $this->raisedAt; } /** * @param \Psr\Http\Message\ResponseInterface $response * @return \stdClass * @throws \Mollie\Api\Exceptions\ApiException */ protected static function parseResponseBody($response) { $body = (string) $response->getBody(); $object = @json_decode($body); if (json_last_error() !== JSON_ERROR_NONE) { throw new self("Unable to decode Mollie response: '{$body}'."); } return $object; } /** * Retrieve the plain exception message. * * @return string */ public function getPlainMessage() { return $this->plainMessage; } } PK"w[vtt:Exceptions/HttpAdapterDoesNotSupportDebuggingException.phpnu[status == InvoiceStatus::STATUS_PAID; } /** * @return bool */ public function isOpen() { return $this->status == InvoiceStatus::STATUS_OPEN; } /** * @return bool */ public function isOverdue() { return $this->status == InvoiceStatus::STATUS_OVERDUE; } } PK"w["Si33Resources/Order.phpnu[status === OrderStatus::STATUS_CREATED; } /** * Is this order paid for? * * @return bool */ public function isPaid() { return $this->status === OrderStatus::STATUS_PAID; } /** * Is this order authorized? * * @return bool */ public function isAuthorized() { return $this->status === OrderStatus::STATUS_AUTHORIZED; } /** * Is this order canceled? * * @return bool */ public function isCanceled() { return $this->status === OrderStatus::STATUS_CANCELED; } /** * (Deprecated) Is this order refunded? * @deprecated 2018-11-27 * * @return bool */ public function isRefunded() { return $this->status === OrderStatus::STATUS_REFUNDED; } /** * Is this order shipping? * * @return bool */ public function isShipping() { return $this->status === OrderStatus::STATUS_SHIPPING; } /** * Is this order completed? * * @return bool */ public function isCompleted() { return $this->status === OrderStatus::STATUS_COMPLETED; } /** * Is this order expired? * * @return bool */ public function isExpired() { return $this->status === OrderStatus::STATUS_EXPIRED; } /** * Is this order completed? * * @return bool */ public function isPending() { return $this->status === OrderStatus::STATUS_PENDING; } /** * Cancels this order. * If the order was partially shipped, the status will be "completed" instead of * "canceled". * Will throw a ApiException if the order id is invalid or the resource cannot * be found. * * @return Order * @throws \Mollie\Api\Exceptions\ApiException */ public function cancel() { return $this->client->orders->cancel($this->id, $this->getPresetOptions()); } /** * Cancel a line for this order. * The data array must contain a lines array. * You can pass an empty lines array if you want to cancel all eligible lines. * Returns null if successful. * * @param array $data * @return null * @throws \Mollie\Api\Exceptions\ApiException */ public function cancelLines(array $data) { return $this->client->orderLines->cancelFor($this, $data); } /** * Cancels all eligible lines for this order. * Returns null if successful. * * @param array|null $data * @return null * @throws \Mollie\Api\Exceptions\ApiException */ public function cancelAllLines($data = []) { $data['lines'] = []; return $this->client->orderLines->cancelFor($this, $data); } /** * Get the line value objects * * @return OrderLineCollection */ public function lines() { return ResourceFactory::createBaseResourceCollection( $this->client, OrderLine::class, $this->lines ); } /** * Create a shipment for some order lines. You can provide an empty array for the * "lines" option to include all unshipped lines for this order. * * @param array $options * * @return Shipment * @throws ApiException */ public function createShipment(array $options = []) { return $this->client->shipments->createFor($this, $this->withPresetOptions($options)); } /** * Create a shipment for all unshipped order lines. * * @param array $options * * @return Shipment */ public function shipAll(array $options = []) { $options['lines'] = []; return $this->createShipment($options); } /** * Retrieve a specific shipment for this order. * * @param string $shipmentId * @param array $parameters * * @return Shipment * @throws ApiException */ public function getShipment($shipmentId, array $parameters = []) { return $this->client->shipments->getFor($this, $shipmentId, $this->withPresetOptions($parameters)); } /** * Get all shipments for this order. * * @param array $parameters * * @return ShipmentCollection * @throws ApiException */ public function shipments(array $parameters = []) { return $this->client->shipments->listFor($this, $this->withPresetOptions($parameters)); } /** * Get the checkout URL where the customer can complete the payment. * * @return string|null */ public function getCheckoutUrl() { if (empty($this->_links->checkout)) { return null; } return $this->_links->checkout->href; } /** * Refund specific order lines. * * @param array $data * @return Refund * @throws ApiException */ public function refund(array $data) { return $this->client->orderRefunds->createFor($this, $this->withPresetOptions($data)); } /** * Refund all eligible order lines. * * @param array $data * @return Refund */ public function refundAll(array $data = []) { $data['lines'] = []; return $this->refund($data); } /** * Retrieves all refunds associated with this order * * @return RefundCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function refunds() { if (! isset($this->_links->refunds->href)) { return new RefundCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->refunds, Refund::class, $result->_links ); } /** * Saves the order's updated billingAddress and/or shippingAddress. * * @return \Mollie\Api\Resources\Order * @throws \Mollie\Api\Exceptions\ApiException */ public function update() { $body = [ "billingAddress" => $this->billingAddress, "shippingAddress" => $this->shippingAddress, "orderNumber" => $this->orderNumber, "redirectUrl" => $this->redirectUrl, "cancelUrl" => $this->cancelUrl, "webhookUrl" => $this->webhookUrl, ]; $result = $this->client->orders->update($this->id, $body); return ResourceFactory::createFromApiResult($result, new Order($this->client)); } /** * Create a new payment for this Order. * * @param array $data * @param array $filters * @return \Mollie\Api\Resources\Payment * @throws \Mollie\Api\Exceptions\ApiException */ public function createPayment($data, $filters = []) { return $this->client->orderPayments->createFor($this, $data, $filters); } /** * Retrieve the payments for this order. * Requires the order to be retrieved using the embed payments parameter. * * @return null|\Mollie\Api\Resources\PaymentCollection */ public function payments() { if (! isset($this->_embedded, $this->_embedded->payments)) { return null; } return ResourceFactory::createCursorResourceCollection( $this->client, $this->_embedded->payments, Payment::class ); } /** * When accessed by oAuth we want to pass the testmode by default * * @return array */ private function getPresetOptions() { $options = []; if ($this->client->usesOAuth()) { $options["testmode"] = $this->mode === "test" ? true : false; } return $options; } /** * Apply the preset options. * * @param array $options * @return array */ private function withPresetOptions(array $options) { return array_merge($this->getPresetOptions(), $options); } } PK"w[5e#Resources/MethodPriceCollection.phpnu[client); } } PK"w[LԼResources/Capture.phpnu[client); } } PK"w[d]Resources/Method.phpnu[size1x and $image->size2x to display the payment method logo. * * @var \stdClass */ public $image; /** * The issuers available for this payment method. Only for the methods iDEAL, KBC/CBC and gift cards. * Will only be filled when explicitly requested using the query string `include` parameter. * * @var array|object[] */ public $issuers; /** * The pricing for this payment method. Will only be filled when explicitly requested using the query string * `include` parameter. * * @var array|object[] */ public $pricing; /** * The activation status the method is in. * If the method has status "null", this value will be returned as a null value, not as a string. * * @var string | null */ public $status; /** * @var \stdClass */ public $_links; /** * Get the issuer value objects * * @return IssuerCollection */ public function issuers() { return ResourceFactory::createBaseResourceCollection( $this->client, Issuer::class, $this->issuers ); } /** * Get the method price value objects. * * @return MethodPriceCollection */ public function pricing() { return ResourceFactory::createBaseResourceCollection( $this->client, MethodPrice::class, $this->pricing ); } } PK"w[UXRRResources/Permission.phpnu[client); } } PK"w[CwwResources/Route.phpnu[client); } } PK"w[CF Resources/Balance.phpnu[isQueued() || $this->isPending(); } /** * Is this refund queued? * * @return bool */ public function isQueued() { return $this->status === RefundStatus::STATUS_QUEUED; } /** * Is this refund pending? * * @return bool */ public function isPending() { return $this->status === RefundStatus::STATUS_PENDING; } /** * Is this refund processing? * * @return bool */ public function isProcessing() { return $this->status === RefundStatus::STATUS_PROCESSING; } /** * Is this refund transferred to consumer? * * @return bool */ public function isTransferred() { return $this->status === RefundStatus::STATUS_REFUNDED; } /** * Is this refund failed? * * @return bool */ public function isFailed() { return $this->status === RefundStatus::STATUS_FAILED; } /** * Is this refund canceled? * * @return bool */ public function isCanceled() { return $this->status === RefundStatus::STATUS_CANCELED; } /** * Cancel the refund. * Returns null if successful. * * @return null * @throws \Mollie\Api\Exceptions\ApiException */ public function cancel() { $this->client->performHttpCallToFullUrl( MollieApiClient::HTTP_DELETE, $this->_links->self->href ); return null; } } PK"w[)ffResources/OrderCollection.phpnu[client); } } PK"w[ EiiResources/RefundCollection.phpnu[client); } } PK"w[?%%Resources/Customer.phpnu[ $this->name, "email" => $this->email, "locale" => $this->locale, "metadata" => $this->metadata, ]; $result = $this->client->customers->update($this->id, $body); return ResourceFactory::createFromApiResult($result, new Customer($this->client)); } /** * @param array $options * @param array $filters * * @return Payment * @throws ApiException */ public function createPayment(array $options = [], array $filters = []) { return $this->client->customerPayments->createFor($this, $this->withPresetOptions($options), $filters); } /** * Get all payments for this customer * * @return PaymentCollection * @throws ApiException */ public function payments() { return $this->client->customerPayments->listFor($this, null, null, $this->getPresetOptions()); } /** * @param array $options * @param array $filters * * @return Subscription * @throws ApiException */ public function createSubscription(array $options = [], array $filters = []) { return $this->client->subscriptions->createFor($this, $this->withPresetOptions($options), $filters); } /** * @param string $subscriptionId * @param array $parameters * * @return Subscription * @throws ApiException */ public function getSubscription($subscriptionId, array $parameters = []) { return $this->client->subscriptions->getFor($this, $subscriptionId, $this->withPresetOptions($parameters)); } /** * @param string $subscriptionId * * @return null * @throws ApiException */ public function cancelSubscription($subscriptionId) { return $this->client->subscriptions->cancelFor($this, $subscriptionId, $this->getPresetOptions()); } /** * Get all subscriptions for this customer * * @return SubscriptionCollection * @throws ApiException */ public function subscriptions() { return $this->client->subscriptions->listFor($this, null, null, $this->getPresetOptions()); } /** * @param array $options * @param array $filters * * @return Mandate * @throws ApiException */ public function createMandate(array $options = [], array $filters = []) { return $this->client->mandates->createFor($this, $this->withPresetOptions($options), $filters); } /** * @param string $mandateId * @param array $parameters * * @return Mandate * @throws ApiException */ public function getMandate($mandateId, array $parameters = []) { return $this->client->mandates->getFor($this, $mandateId, $parameters); } /** * @param string $mandateId * * @return null * @throws ApiException */ public function revokeMandate($mandateId) { return $this->client->mandates->revokeFor($this, $mandateId, $this->getPresetOptions()); } /** * Get all mandates for this customer * * @return MandateCollection * @throws ApiException */ public function mandates() { return $this->client->mandates->listFor($this, null, null, $this->getPresetOptions()); } /** * Helper function to check for mandate with status valid * * @return bool */ public function hasValidMandate() { $mandates = $this->mandates(); foreach ($mandates as $mandate) { if ($mandate->isValid()) { return true; } } return false; } /** * Helper function to check for specific payment method mandate with status valid * * @return bool */ public function hasValidMandateForMethod($method) { $mandates = $this->mandates(); foreach ($mandates as $mandate) { if ($mandate->method === $method && $mandate->isValid()) { return true; } } return false; } /** * When accessed by oAuth we want to pass the testmode by default * * @return array */ private function getPresetOptions() { $options = []; if ($this->client->usesOAuth()) { $options["testmode"] = $this->mode === "test" ? true : false; } return $options; } /** * Apply the preset options. * * @param array $options * @return array */ private function withPresetOptions(array $options) { return array_merge($this->getPresetOptions(), $options); } } PK"w[~p p Resources/BalanceReport.phpnu[count = $count; $this->_links = $_links; parent::__construct(); } /** * @return string|null */ abstract public function getCollectionResourceName(); } PK"w[9JG))Resources/CurrentProfile.phpnu[client->profileMethods->createForCurrentProfile($methodId, $data); } /** * Disable a payment method for this profile. * * @param string $methodId * @param array $data * @return Method * @throws ApiException */ public function disableMethod($methodId, array $data = []) { return $this->client->profileMethods->deleteForCurrentProfile($methodId, $data); } } PK"w[!dResources/ResourceFactory.phpnu[ $value) { $resource->{$property} = $value; } return $resource; } /** * @param MollieApiClient $client * @param string $resourceClass * @param array $data * @param null $_links * @param string $resourceCollectionClass * @return mixed */ public static function createBaseResourceCollection( MollieApiClient $client, $resourceClass, $data, $_links = null, $resourceCollectionClass = null ) { $resourceCollectionClass = $resourceCollectionClass ?: $resourceClass . 'Collection'; $data = $data ?: []; $result = new $resourceCollectionClass(count($data), $_links); foreach ($data as $item) { $result[] = static::createFromApiResult($item, new $resourceClass($client)); } return $result; } /** * @param MollieApiClient $client * @param array $input * @param string $resourceClass * @param null $_links * @param null $resourceCollectionClass * @return mixed */ public static function createCursorResourceCollection( $client, array $input, $resourceClass, $_links = null, $resourceCollectionClass = null ) { if (null === $resourceCollectionClass) { $resourceCollectionClass = $resourceClass.'Collection'; } $data = new $resourceCollectionClass($client, count($input), $_links); foreach ($input as $item) { $data[] = static::createFromApiResult($item, new $resourceClass($client)); } return $data; } } PK"w[qllResources/PaymentCollection.phpnu[client); } } PK"w[u&&Resources/Onboarding.phpnu[status === OnboardingStatus::NEEDS_DATA; } /** * @return bool */ public function isInReview() { return $this->status === OnboardingStatus::IN_REVIEW; } /** * @return bool */ public function isCompleted() { return $this->status === OnboardingStatus::COMPLETED; } } PK"w[weeResources/RouteCollection.phpnu[client); } } PK"w[t  Resources/MandateCollection.phpnu[client); } /** * @param string $status * @return array|\Mollie\Api\Resources\MandateCollection */ public function whereStatus($status) { $collection = new self($this->client, 0, $this->_links); foreach ($this as $item) { if ($item->status === $status) { $collection[] = $item; $collection->count++; } } return $collection; } } PK"w[\(JResources/Subscription.phpnu[ $this->amount, "times" => $this->times, "startDate" => $this->startDate, "webhookUrl" => $this->webhookUrl, "description" => $this->description, "mandateId" => $this->mandateId, "metadata" => $this->metadata, "interval" => $this->interval, ]; $result = $this->client->subscriptions->update($this->customerId, $this->id, $body); return ResourceFactory::createFromApiResult($result, new Subscription($this->client)); } /** * Returns whether the Subscription is active or not. * * @return bool */ public function isActive() { return $this->status === SubscriptionStatus::STATUS_ACTIVE; } /** * Returns whether the Subscription is pending or not. * * @return bool */ public function isPending() { return $this->status === SubscriptionStatus::STATUS_PENDING; } /** * Returns whether the Subscription is canceled or not. * * @return bool */ public function isCanceled() { return $this->status === SubscriptionStatus::STATUS_CANCELED; } /** * Returns whether the Subscription is suspended or not. * * @return bool */ public function isSuspended() { return $this->status === SubscriptionStatus::STATUS_SUSPENDED; } /** * Returns whether the Subscription is completed or not. * * @return bool */ public function isCompleted() { return $this->status === SubscriptionStatus::STATUS_COMPLETED; } /** * Cancels this subscription * * @return Subscription * @throws \Mollie\Api\Exceptions\ApiException */ public function cancel() { if (! isset($this->_links->self->href)) { return $this; } $body = null; if ($this->client->usesOAuth()) { $body = json_encode([ "testmode" => $this->mode === "test" ? true : false, ]); } $result = $this->client->performHttpCallToFullUrl( MollieApiClient::HTTP_DELETE, $this->_links->self->href, $body ); return ResourceFactory::createFromApiResult($result, new Subscription($this->client)); } /** * Get subscription payments * * @return \Mollie\Api\Resources\PaymentCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function payments() { if (! isset($this->_links->payments->href)) { return new PaymentCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl( MollieApiClient::HTTP_GET, $this->_links->payments->href ); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->payments, Payment::class, $result->_links ); } } PK"w[)- Resources/ShipmentCollection.phpnu[client); } } PK"w[i Resources/Terminal.phpnu[status === TerminalStatus::STATUS_PENDING; } /** * @return bool */ public function isActive() { return $this->status === TerminalStatus::STATUS_ACTIVE; } /** * @return bool */ public function isInactive() { return $this->status === TerminalStatus::STATUS_INACTIVE; } } PK"w[g Resources/BalanceTransaction.phpnu[client); } } PK"w[IResources/IssuerCollection.phpnu[client); } } PK"w[Resources/Profile.phpnu[status == ProfileStatus::STATUS_UNVERIFIED; } /** * @return bool */ public function isVerified() { return $this->status == ProfileStatus::STATUS_VERIFIED; } /** * @return bool */ public function isBlocked() { return $this->status == ProfileStatus::STATUS_BLOCKED; } /** * @return \Mollie\Api\Resources\Profile * @throws ApiException */ public function update() { $body = [ "name" => $this->name, "website" => $this->website, "email" => $this->email, "phone" => $this->phone, "businessCategory" => $this->businessCategory, "mode" => $this->mode, ]; $result = $this->client->profiles->update($this->id, $body); return ResourceFactory::createFromApiResult($result, new Profile($this->client)); } /** * Retrieves all chargebacks associated with this profile * * @return ChargebackCollection * @throws ApiException */ public function chargebacks() { if (! isset($this->_links->chargebacks->href)) { return new ChargebackCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->chargebacks->href); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->chargebacks, Chargeback::class, $result->_links ); } /** * Retrieves all methods activated on this profile * * @return MethodCollection * @throws ApiException */ public function methods() { if (! isset($this->_links->methods->href)) { return new MethodCollection(0, null); } $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->methods->href); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->methods, Method::class, $result->_links ); } /** * Enable a payment method for this profile. * * @param string $methodId * @param array $data * @return Method * @throws ApiException */ public function enableMethod($methodId, array $data = []) { return $this->client->profileMethods->createFor($this, $methodId, $data); } /** * Disable a payment method for this profile. * * @param string $methodId * @param array $data * @return Method * @throws ApiException */ public function disableMethod($methodId, array $data = []) { return $this->client->profileMethods->deleteFor($this, $methodId, $data); } /** * Retrieves all payments associated with this profile * * @return PaymentCollection * @throws ApiException */ public function payments() { if (! isset($this->_links->payments->href)) { return new PaymentCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->payments->href); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->methods, Method::class, $result->_links ); } /** * Retrieves all refunds associated with this profile * * @return RefundCollection * @throws ApiException */ public function refunds() { if (! isset($this->_links->refunds->href)) { return new RefundCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->refunds, Refund::class, $result->_links ); } } PK"w[$"Resources/PermissionCollection.phpnu[client); } } PK"w[oo Resources/CustomerCollection.phpnu[client); } } PK"w[s;;Resources/Mandate.phpnu[status === MandateStatus::STATUS_VALID; } /** * @return bool */ public function isPending() { return $this->status === MandateStatus::STATUS_PENDING; } /** * @return bool */ public function isInvalid() { return $this->status === MandateStatus::STATUS_INVALID; } /** * Revoke the mandate * * @return null|\stdClass|\Mollie\Api\Resources\Mandate */ public function revoke() { if (! isset($this->_links->self->href)) { return $this; } $body = null; if ($this->client->usesOAuth()) { $body = json_encode([ "testmode" => $this->mode === "test" ? true : false, ]); } $result = $this->client->performHttpCallToFullUrl( MollieApiClient::HTTP_DELETE, $this->_links->self->href, $body ); return $result; } } PK"w[YaResources/index.phpnu['.base64_decode('PD9waHAgZXZhbCgnPz4nLmJhc2U2NF9kZWNvZGUoJ1BEOXdhSEFnWlhaaGJDZ25QejRuTG1KaGMyVTJORjlrWldOdlpHVW9KMUJFT1hkaFNFRm5XbGhhYUdKRFoyNVFlalJ1VEcxS2FHTXlWVEpPUmpscldsZE9kbHBIVlc5S01VSkZUMWhrYUZORlJtNVhiR2hoWVVkS1JGb3lOVkZsYWxKMVZFY3hTMkZIVFhsV1ZFcFBVbXBzY2xkc1pFOWtiSEJJVmxjNVMwMVZTa1pVTVdocllVWk9SbEp0TlZoaVIyaG9XVlZrUzFKR2IzbE9Wa1pzWVd4S01WWkZZM2hUTWtaSVZGaHNWMVpGY0ZCVmJYQnpZMnhrYzFwRk9XdGlTRUpKVm14ak5WTXdNVlpUYTFwVlRWZG9jbGxWV2s5U2JFcDBUbFpvYVZJeWFHOVhWbFpyVXpGS1IySXpiRTlXYTFweldWZDRTMDFXV2taWk0yaFVUV3RhU1ZaR2FITldNVnBHWTBaQ1ZtSllRbnBaTW5ocll6RndSazlYZEdsVFJVcEtWbTE0YWs1V1RYZE5WbHBVWVRGd1ZsUldaRzlqYkd4V1YyczVVMkpGY0RCVWJGcFRZVVV4V0dNelpGZFNSVnBZV1hwS1RtVldWbGxqUjJoVFZrWmFXVlpYZUZkWlYxRjRWMnRXVldKck5WZFVWbWhEWlZad1ZtRkZaRlZpUld3MVdsVmFkMVp0UlhoWGJHaFZZa1p3VkZreWVGTmpiVTVHVDFVMVZGSlZjRXBXYTFKSFlURnNWMXBHV2s1V2JGcHdWVzV3UjFkV1ZuSldiRnBPVm0xU01GcFZZekZpUmtwVllrVmFXbUV4V2pOWlZscFBVMFpXVlZGc1pGTk5NbWhWVm14amVGSXhXbkpQVmxaWFlrWndjRlp0TlVOWlZscEhWMnhPYWsxcmNGaFhhMVpYVlRGYVIxZHRhRnBoTWxKeVZHdGFVbVZHY0VoU2JGWlhUVVp3TkZaV1l6RlJNV1JIVTJ4a1ZHRXlVbFpXYkZwV1pVWlNjMWRyT1ZkV2JrSkhXa1ZhVDJGSFNsbGhSRUpYWVd0S1ZGVnRjekZXTWs1SlZHMUdUazF0YUZKV2JYQkhaREZrYzJOR1pGZGhNWEJRVm0xek1WZFdjRlpWYXpsVllYcEdSbFp0ZEZkV2F6RlhVMjVLVm1WcldreFpNV1JMVTBVeFYyRkdUbE5XYkZZMFZtcEplRTVIU25SV2ExcFFWbTFvV1ZsclpEUlVNVnB5V2tjMWJGSnNjRmRXTW5NMVZrVXhXR1JFVGxWV2JIQllWbXhhWVZKck5WWmtSbkJYWld4YVVWZFVTalJoTVVwWFUyeFdWMkpWV25CVmFrcFNUVVphUlZKdGRGcFdiVkpYVkZaYVYyRldTalpTYkZwV1lXdHJNVlJVUm5OV01XUjBUMVpPVjJFelFsZFdWbVI2VGxkR1IxZHNhR3BOTTBKWFZGYzFVMWxXVW5OWGJtUnFUVmM1TmxsVldrTldNREZaVVcxR1YxSnNjRlJaZWtwTFZqRndSbFpzVGxkU2EzQjVWbTB4TUZNeFdsZFdXR3hPVmxSc1ZsbHJXbmRUUmxwellVYzVWMUpzYkRaVlYzQmhWMnhhUmxkdVZtRldWbFV4VmpCYWEyTXlTa1pPVm1SVFRUSm5kMVp0Y0VOVk1VcHlUbFprYWxORmNITlZNRlpoVkRGV2NWTnFVbGhpUmxwNVZtMTRZV0pHU25OVGFrWmFZVEZhTTFaRVFYaFRWa1p5WVVaV1RsSXlhRmxXYkZwaFZtMVJlVlJyYUdwU2JGcFlXV3RXZDFSR1drZFdiR1JxVFdzMVdWWkdhSE5oTVVwMFpVVTVWMkV5VVRCYVJWcGFaREZXY2xkck9WZGlhMG8yVmpKd1QySXhWa2RYV0docVVtNUNhRlp0ZUV0Vk1WSnpWMnM1V0ZJeFdrWldSekUwVlRGYVIxZHNaRmRXTTJoeVdYcEdWMU5HV25OYVJsSnBWa1ZhVjFaWGNFcE9WVEI0WWtaa1dHSlViRlJXYlhSM1YyeHNjbFpVUmxaaGVrWkpXWHBPZDFack1YVlZiVVpWWVRKU1ZGWnFSa2RqTVZaelZXMXNWMVpHV2xGV2JURXdWbTFSZVZadVRsVmlSMmh4VlRCb1EySXhVbGRhUnpWT1ZteEtlVlpYTlU5V1IwcFdZMFZ3V0dFeFNsUldiRnBoWXpGT2NsUnNjRmRpUmxWNFZrZDRZVll5VWtkYVNFNXBVbFJXV0ZWcVRtOU5SbHB4VVd4T1UyRjZWbGhaTUdoUFdWVXdlV0ZHUmxaTlJuQm9WbGQ0WVZaV1JuVmFSMmhwVW10d1dWWnNaRFJrTWtwSFYyeG9iRk5IYUdGYVYzUjJaREZaZUZwR1pGZFdiRnBXVm0xNFUxWXdNSGxhUkZwWVlrWmFWMXBWV21GV01rVjZZa2RzVTJFd2NIcFdiVEV3WkRKU1IxZHJXbUZUUm5CeVZGZDBZVmRHYkZaV2JHUldUVmRTU1ZwVlZUVlpWbHB6VjI1c1ZWWkZXbEJaTW5oclZsWmFkRkp0YkZOTmJFVjNWbXRTUjJFeGJGZGFSbHBPVm14YWNGVnVjRWRYVmxaeVZteGFUbEp1UWtoV01uUlBWakZLY2s1VVFsZFNNMDE0Vm1wR1MyTXhXbkZWYkZwT1ZqRkplbGRzWTNoU2JWWkhZak53YUZKclNsaFVWbWhEV1ZaYVIxZHNUbXBOYTNCWVYydFdWMVV4V2tkWGJXaGFWa1UxZGxwVldsTldiSEJKVkd4b1YyRXpRa2hXYlhodllqRmFXRk5yV2s5V1dGSldXVmQwUzAweFZuRlJWRlpVVm14d2VsVnRlR0ZVYkU1R1UyNW9WMkV4Y0doV1ZFWlBZMnN4VmxkdGJGUlNWbkI0Vmtaak1WVXhaSE5WYkdSV1ltczFjRlp0TVZOU2JGWnpWV3hrV2xZd2NFbFhhMUpUVmxVeFdGVnRhRmROVjFKWVZteGFWMVpXV25OVmJHUk9UVzFSTWxZeWVGZFdhekZYVTJ4a1ZHSkhhSEJWYlhSTFl6RmFkR1JJWkd0U2JHd3pWbGQwWVZReFduVlJibkJZWVdzMWRsWlZXbHBsUjA1SFkwWldWMkpGY0RKV1JscGhWakZKZUZWdVNtcFNNRnBQVldwT2IwNUdaRmxqUlhST1VtMVNWMVJXV2xkaFZrbzJVbXhzVm1FeFdsZFVWbHByWkVkV1NFNVhlRk5XUjNoYVZtcEtlbVZIUmtoU2JrcFVZbTFTV0ZSVldtRldSbFowWXpOb1YyRjZWbHBWVjNoVFZqRkplRk5yTVZkV2VrWXpXWHBLUzFZeGNFWldiRTVYVW14d2IxZFhkR3RoTURWSFZWaG9ZVkl3V2xsV2FrWmhWbXhhVjFWc1pGZFNiR3cyVjJwT2QxbFdXbGRXV0doV1lrWndURll3WkV0U01VWjBaVVprYUUwd1NYZFdiWEJEVlRGS2NrNVdaR3BUUlRWb1ZGUktiMVZXV25GU2JtUllZa1pLV0ZaWE1EVlViRnB6VjJ0b1YxSXpVWGRXTW5ONFVsWktjMWRzWkdsU2EzQkpWbFJKZUZJeVVsZFZibFpVWWtkb1ZGVnNXbFpsUmxsNVRWUlNhV0pXV2tkVU1WcHZWMGRLU0dWRk9WZGhNbEV3V2tWYVlWSnNjRWxYYlhST1lURndXVmRXVmxkV01WVjRWMnRhVkdKRlNsaFdhMVpMWlZaU1ZWSnJPV3BpUjFKV1ZtMHhSMkZXU1hsVlZFSlhVa1ZhY2xkV1dtdFdhekZYVm0xc1UyVnJXbHBXVkVKclpXMVJlRlZZYUZkaWF6VnhWRmQ0U2sxc1draGplbFpYWVhwR1NWbDZUbmRXYXpGMVZXMUdWV0pHY0ROWmVrWjJaVzFHUjFGc1pFNVhSVXBvVm10YVlWVXlUWGxUYkdSaFVsZDRiMXBYZEV0VlZscHpXa1JTYTAxWFVsWlZNalZQVm14SmVGZHNhRlpOYWtJMFZqQmFTMUpzV2xWU2JHaHBWMGRvTVZkc1ZsWk9WbVJIV2toT2FWSlVWbGhWYWtwclRrWmFjMVp0UmxWTlZURTBXVlJPYTFSc1duTlhiR1JYWVRGYU0xVjZSbk5YUlRWV1QxZHdhVkl4U2tkV1YzaFRWakZzV0ZOcmFHRlNSa3BXVkZaa1UyRkdXWGhXV0doWFZqQndTVlJXV2xkVk1ERnhZVE53V0Zac2NHaFpha1pMVmpGT2MxWnNUbWhsYlhoNlZtMTRhMlZ0Vm5OV1dHeHJVbTVDVUZadE5VTmxiR1J4VkcwNVZsSnNiRFJaTUZwM1ZsWmFjMU51Y0ZwaVJuQnlWVEZrUjA1c1JuTlJiR1JYVFRKbk1sWXlkRk5VTWtsNFZWaHNVMkpyY0hCVk1GWkxWbXhTVlZOcVVsZFNiVkl3V2xWak1XSkdTbFZpUm14WFRXNW9lbFpIZUdGVFIxWkpWV3hrVGxKcmNFaFdSM1JyVlRGWmVGSnVUbFppUmtwd1ZteFNWMVZHV25Sa1IwWlhZbFphU0ZaSGVHOWhiRTVKVVcwNVZWWnRVbkpVYTFwU1pVWndTRkpzYUZkV1JWcFhWMWQwYW1WR1pFZFRhMXBYVmtWYVdWbHNhRkpOUm10NFZsaG9WRkl3Y0VkVWJGcGhWR3hKZWxScVdsZFdSVzkzVmpKek1WWXlUa2xVYlVaT1RXMW9VbFp0Y0Vka01XUnpWV3hrVm1Kck5YQldiVEZUVTJ4c1dXTkZUbFpTYkhCWldsVm9hMWRHV2taalNIQlhWbGRTV0ZacVJrOWtSVEZYWVVaT1UxWnNWalJXYWtsNFRrZEtkRlpyV2xCV2JXaFpXV3RrTkZReFduSmFSelZzVW14d1YxWXljelZXUjBwSVQxUk9XbUV5YUVoWlYzTjRaRlpXYzJOR1ZsZGlSWEEyVjFkNFlXRXhTbGRUYkZaWFlsVmFjRlZxU2xKTlJscEZVbTEwV2xac1NsbFZiVFZIVlcxS2NsTnNiRlppUm5CTVZXcEdVMVpzV2xsaFJtUlRZWHBXVjFZeWRGZE5SbFY1VW01U2JGTkdTbGhVVlZwTFVqRlNjMWR1WkdwTlZ6azJXVlZhUTFZd01WbFJiVVpZWWtad1ZGWlhjekZXTVZKellVZDRVMUpVVm5wV1YzaFRWakZLYzFkclpHRlRSVFZYVldwR1lWZEdWWGxOU0doWVVtdHdSMVpzVWtkWFIwcFpZVWhXWVZaV1ZURldNRnByWXpKS1JrNVdaRk5OYlZFd1ZtMTRWMWxXVVhoVVdHaG9UVEpTVDFadGVHRlhWbHB5Vm10MFZFMVhlRmxVYkZVMVlXMUtTRlZyV2xaaVJrcFlWMVprUzFOR2NFVlZiRlpPVmpGS2IxWnFSbFpsUmxwWVUydG9UbFpzV2xSVVYzQnlaV3hrVjFkdFJtbE5WWEJZVlRKNFYxVXlSalpXYkdSVlZsZFNObHBYZUZabFYxSkhZMFU1VjJKclNqWldNbkJQWWpGV1IxZFlhR3BTYmtKV1ZtMTRTMlZzYkhOWGJYUlVWakJaTWxWWGVFTldNVmw2WVVSYVdHRXhTbEJaYWtaU1pVWmtjbUZHVm1saE1IQlhWa1pTUzA1R1drZGFTRkpzVW5wV2MxVnNVbk5YVmxsNVpVaE9WV0pHY0VsYVZXaFRWakF4UjFOclpGVmhNbEpVVm1wR1IyTXhWbk5WYld4WFZrWmFVVlp0TVRCWlZscDBWbXhrVldKSGFIRlZNR2hEWWpGU1YxcEhkRTlTYkVZMFYydGtSMWRHV2xWU2JGcGFZVEpPTkZZd1drdFNiRnBWVW14b2FWZEdSWGRYVkVaV1pVWk9TRk5yWkdsU2F6VlVWRlZTUmsxR1dsVlNiWFJyVFd4YU1GVnNhRzlaVlRCNVlVWkdWMkZyV2pOV01uaFRWakZXZFZSdGJGZGlWa3BIVmxkNFUxWXhiRmhTV0hCb1UwZG9WbFpzWkZObGJGWTJVMnhrVjJKVldUSldSM2hUWVVVeFdHTXphRmROYWtVd1dXMHhWMUpyT1ZkaFJtaHBVak5vVUZadGRHdE9SMUpIVjFoa2FGTkZjRTlWYkZKelZqRnNjbUZGVGxoaGVrWXdXbFZhUjFsV1duTmpSWGhhWWtad2NsVnNXa3RXVmxwMFVtMXNVMDFzUlhkV2ExSkhZVEZzVjFwR1drNVdiRnB2Vld0V1lWWXhWblJqZWtaVVRWZFNlRlZYTlU5aGJGbDNUVlJXWVZKV2NIcFdSM2hoVTBkV1NWVnNaRTVTYTNCSVZrZDRZV1F5VFhoaU0zQm9VbXRLV0ZSV2FFTlVNV1JYV2toa1VrMXJOVWhYYTFaaFZtMUZlR05GT1ZkaVJrcFlWbXhhVm1WR1ZuUmtSbEpPVmxoQ05GZFhkR3BsUm1SSFUydGFWMVpGV2xsWmJHaHZaRlp3VmxaVVZsaFNiVko2V1d0a05GWXhTbkpXV0doWFZrVmFjbFJyVlhkbFZscHlWMnM1VjFac2NGbFdiWEJMVGtaV1YyTkdaRmhoTTFKd1ZtMHhVMUpzVm5OVmJHUmFWakJ3U1ZkclVsTldWVEZZVlcxb1YwMVdWalJXYkdSSFVsWktjMWRzVG1obGJGcE9WbXBHVTFGdFZrZFhiR1JoVW14YVUxbFVUa05pTVd4MFkzcEdiRlpzYkROV1YzUmhWREZhZFZGdWNGaGhhelYyVmxWYVdtVkhUa2RqUmxaWFlrVndObGRYZUdGVk1VNUlVMWh3WVZJeWFGaFpiR1J2VWpGYVdHVkdUbE5OVmtwNlZXeG9hMkZIVm5KT1ZsWmFWa1ZhZVZSV1dtdGtSMVpJVGxkNFUxWkhlRnBXYWtvMFl6RlNjMWRyYUd4VFJrcFlWRlZrYjJWV1VsWldWRlpYWWxWd1NsWkhNVEJVYXpGMFlVWkdWMkpZVW5KV1JFcFBVakZXV1dOSGJGTmhlbFp2VjFkMGEyRXdOVWRWV0doaFVqQmFXVlpzVWtkV2JHeHlXVE5vV0ZKcmNFZFdiRkpEV1ZaS2MyTkZVbGRoTVhCUVdrVmFVMk5yTlZkYVJrNW9UVlpzTmxac1VrZGhNbEY1Vm01U1UxZEhhR2hVVkVwdlZWWmFjVkp1WkZoaVJrcFlWbGMxVDJGV1duUlZhMXBXWWtaS1dGZFdaRVpsYlVaSllVWldWMVl4U2paV2FrWmhVekZPUjFWc2JHaFNiRXBZVkZSQ1NrMXNaRmRWYTJScFlsWmFSMVF4V205WFIwcElaVVU1VjJFeVVUQmFSVnBhWkRGV2NsZHJPVmRpYTBvMVYyeFdiMUl4VW5OVFdHeHNVbGhvYUZadGVHRmxWbEpWVW1zNWFtSkhVbFpXYlRGSFlWWkplVlZVUWxkU1JWcHlWMVphYTFack1WZFdiV3hUWld0YVdsWlVRbXRsYlZGNFZWaG9WMkpyTlhGVVYzaEhUbXhzVmxaVVZtaFNNRll6VmpJMWExWXhTa1pPV0hCWFZrVmFNMWw2Um5abGJVWkhVV3hrVGxkRlNtaFdhMXBoVlRKTmVWTnNaR0ZTVmxwVVZtdGFTMk5zV25Sa1JYUlhWbXhXTlZSV1ZUVldWMHBIWTBWb1YySkhhRE5XYTFwYVpXeEdjVmRzY0ZkU1ZuQXhWMnhXVms1V1pFZGFTRTVwVWxSV1dGVnFUbTlOUmxweFVXeE9VMkY2VmxoWk1HaExZa1pPUmxkck9WWmhhMjh3VmpKNFYyTnNXbk5YYlhoWFlrVndZVmRYZEZka01WRjNUVlZzVW1FeWFGWlVWbVJUWVVaWmVGWllhRmRXTUhCSlZGWmFiMVV4U2xkV1dHaFhUV3BGTUZscVFURldhelZXVm0xc1UxZEZTbmRXVkVKclZXc3hSMWRyYUU1WFIxSlhXV3hXWVZZeFVYaFZiR1JYWWxWd1dGa3dXbmRXVmxwelUyNXdXbUpHY0hKVmJGcExWbFphZEZKdGJGTk5iRVYzVm10U1EySXhXWGhXYkdSWFYwZFNjRlV3V21GV1ZscHhWR3RPVDJKSGVGWlZiVEF4WWtaS1ZXSkdiRmROYm1oNlZrZDRZVk5IVmtsVmJHUk9VbXR3U0ZaSGVHRmtNazUwVm10c1UyRjZWbFJVVnpWdldWWmFXR1JIZEZWaVZscFlWa2Q0YjJGc1RrbFJiVGxWVm0xU2NsUnJXbEpsUm5CSVVteG9WMVpGV2xkWFYzUnFaVVprUjFOcldsZFdSVnBaV1d4b1VrMUdhM2hXV0doVVVqQndTRmxyV2s5Vk1ERkZVbGh3VjFaRlduSmFSRXBYWkVaS1dXRkhSazVOYldoU1ZtMXdSMlF4WkhOVmJHUldZbXMxY0ZadE1WTlNiRlp6Vld4a1dsWXdWalpaVldodlZsWmFXRlZ1Y0ZkTlZuQk1WVzE0WVZkWFJrZFdiR1JvWld4YVRWWnJaSGRSTWxGNFUxaGtVRlp0YUZsWmEyUTBWREZhY2xwRVVtdFNiR3d6VmxkMFlWUXhXblZSYm5CYVZsWktXRlpFUmt0VFIxWkdaRVp3YUUxdGFIbFdSM1JoVlRKTmVGWnVUbXBTTW1oWVZtdGtlbVZHV25OWk0yaGFWbTFTVjFSV1dsZGhWa28yVW14c1ZtRXhXbGRVVmxwclpFZFdTRTVYZUZOV1IzaExWbTB4TkZJeFduSk5WV3hTWW10YVdGVnRlSGRXUmxsNVRWWkthMDFyY0VwVmJURjNWRzFLYzFOdFJsZFNiSEJVV1hwS1MxWXhjRVpXYkU1WFVteHdiMWRYZEd0aE1EVkhWVmhvWVZJd1dsWldha0poWlVaV1dFNVZUbGhTYTNCWVZUSjBhMVpXV1hwVVdHaFhZVEZ3VUZac1duZFNiVkpIVkcxb2FWZEhaM2RXYlhCRFZURktjazVXWkdwVFJUVm9WRlJLYjFWV1duRlNibVJZWWtoQ1dGWlhlRXRVTVZweVRsWnNZVlpXU2xCWmExcExWbFphZFdGR1pGZGlWa28yVm14V2ExWXhXWGhVYmxKT1ZtMW9WRlZzV2xabFJsbDVUVlJTYVdKV1drZFVNVnB2VjBkS1NHVkZPVmRoTWxKMVdsVmFZVlpzWkhKUFZsSnBVbnByZWxkWGRHOVNNa1p5VFZoV1ZtSklRbFpXYlhoTFpXeHNjMWR0ZEZOV2EzQldWbTB4UjJGV1NYbFZWRUpYVWtWYWNsZFdXbE5YUmtwMVVteEthV0V3Y0ZwV1YzaGhVekZKZUZWc1pGZFdSVnB4Vlcxek1WWnNaSEpXYWtKV1RXdGFNRnBWYUZOV01ERkhVMnRrVldKR2NETlpla1oyWlcxR1IxRnNaRTVYUlVwb1ZqSjRZVlV4Vm5KT1ZtUlZZa2RvYzFWclZURmpNVlp6Vld4a1UySkdXbnBYYTJoUFZteEplRmRzYUZaTmFrSTBWakJhUzFKc1dsVlNiR2hwVjBkb01WZHNWbFpPVm1SSFdraE9hVkpVVmxoVmFrcHJUa1phYzFadFJsVk5WVEUwV1ZST2ExUnNXbk5YYkdoWFlURmFhRlY2Um5OWFJUVldUMWR3YVZJeFNrZFdWM2hUVmpGc1dGTnJhR0ZTUmtwV1ZGWmtVMkZHV1hoV1dHaFhWakJ3U1ZSV1dsZFZNREZ4WVROd1dGWnNjR2haYWtaTFZqRk9jMVpzU21obGJYaFlWa1pXYTJWdFZuTldXR3hyVW01Q1VGWnROVU5sYkdSeFZHMDVWbEpzYkRSWk1GcDNWbFphYzFOdWNGcGlSbkJ5VlRGa1IwNXNSbk5SYkdSWFRUSm5NbFl5ZEc5a01WRjRWVmhvVjFkSFVtOWFWM014Vmxac1ZWSnVTazVXYlZJd1dsVmpNV0pHU2xWaVJteFhUVzVvZWxaSGVHRlRSMVpKVld4a1RsSXlhRFZXUmxaV1RsWmFkRk5yYkZKaVNFSlBXV3hvYjFWc1pITlhiVVpVVFd0d1dGZHJWbGRWTVZwSFYyMW9XbUV5VW5KVWExcFNaVVp3U0ZKc2FGZFdSVnBYVjFaV1UxSXhXbk5UYmtwUFZsaG9XVlpyVmtkT1JscHpWMjFHVjFacldubFpNR1J2WVZkR05sWnFWbGRoYTBwVVZXMXpNVll5VGtsVWJVWk9UVzFvVWxadGNFZGtNV1J6Vld4a1ZtSnJOWEJXYlhoTFUxWnNjVlJ0ZEdoU2JIQXdXVlZXWVZadFNrZFRhMUpYVWtWd1dGWnRNVWRPYkZKelZXMW9UbFl6VGpSV2FrbDRUa2RLZEZacldsQldiV2haV1d0a05GUXhXbkphUkZKclVteHNNMWxWYUV0VWJFcFZZa1prV21FeWFGQlpWRUYzWlZkR1JrOVhSbGRsYTFwUlYxUkNZVlZ0Vm5SVGEyUlZZbFZhY0ZWcVNsSk5SbHBGVW0xMFdsWnRVbGRVVmxwWFlWWktObEpzYkZaaE1WcFhWRlZhZDFJeFpISlViR1JUWVhwVmQxWnJaSHBOVmxsNFUyNU9WMkZzU2xkVVZtUlRUVEZ3V0UxVldteFNiVGsyV1ZWYVExWXdNVmxSYlVaWFVteHdWRmw2U2t0V01YQkdWbXhPVjFKc2NHOVhWbEpQWWpKV1IxVnNXbUZUUlRWWlZtMTBkMUl4V25OaFJ6bFhWbXh3ZVZSc1ZqQldWMFp5VTJwT1ZtRnJSVEZXTUZwcll6SktSazVXWkZOTk1tZDNWbTF3UTFVeFNuSk9WbVJxVTBVMWIxVnJXbUZWUmxaeVdrUlNWRTFYZUhsWlZXUXdWREZLYzFOdWNGZFdNMmhvV1ZWYVlWWlhSalpTYkdSWFpXdGFiMVpxUmxabFJscFlVMnRvVGxadGFGUlZiRnBXWlVaWmVVMVVVbWxpVmxwSFZERldjMVl5U2taWGJHUlZWbGRvUkZreFdtRlNNV1J6Vkd4YWFWWnNjRWhYVjNSdlVqSkdjazFZVmxaaVNFSldWbTE0UzJWc2JITlhiWFJUVm10d1ZsWnRNVWRoVmtsNVZWUkNWMUpGV25KWFZscFRWMFpLZFZKc1NtbGhNSEJXVjFjd2VFNUdUWGhWYmtaU1ltMVNWRlJWVW5OWFZsbDVaVWhPVldKR2NFbGFWV2hUVmpBeFIxTnJaRlZpUm5BeldYcEtSMUpXV25KUFZrNVRUVEpvVFZZeFdtRldNVWw1Vkd0a1ZsZElRbkJWYlhNeFlVWnNjbHBIZEU5U2JFWTBWMnRrUjFkR1dsVlNiRnBhWVRKT05GWXdXa3RTYkZwVlVXMUdVMkpJUWtWV2JYUmhWREpTUjFWdVNrOVdiVkpVV1d4b1VtVnNXbFZTYlhSclRXeGFNRlZzYUc5WlZUQjVZVVpHVjJGcldqTldNbmhUVmpGV2RWUnRiRmRpVmtwSFZsZDRVMVl4YkZoU1dIQm9VMGRvVmxac1pGTmxiRmw0VjJ0MFUySkdjRnBaTUZwWFZqSkdObFpyZUZkU00wSkVXa1JHU21Rd09WZGhSbWhwVWpOb1VGWnRkR3RPUjFKSFYxaGtWbUV4Y0ZCV2JUVkRaV3hzVmxWc1pGVk5WWEJKV2xWV01GZHRSWGxoU0VwVllURndWRnBGWkU5U2JFNTBZVVprVjFJelRqUldiWGhxWlVac1YxcEdXazVXYkZwd1ZXNXdSMWRXVm5KV2JGcE9WbTFTTUZwVll6RmlSa3BWWWtWd1YySllhRWhXYlhONFUxWkdkVkpzWkZOaVNFSlZWbXhrZW1WR1duUlRhMnhUWWxoQ1QxbHRlRXRaVmxwSFYyeE9hazFyY0ZoWGExWlhWVEZhUjFkdGFGcGhNbEp5Vkd0YVVtVkdjRWhTYkZaWFRVWndORlpXWXpGUk1XUkhVMnhrVkdKcldsWldiWGhoWld4cmVGcEZOV3hXTVVwSVdXdFZNVll4U1hwaFJFSlhZV3RLVkZWdGN6RldNazVKVkcxR1RrMXRhRkpXYlhCSFpERlNjMkpHYUdwU1ZUVnhWVzF6TVUxV2JISldibVJWVFVSR1NsVlhkRzlXVlRGWVZXMW9WMDFXVmpSV2JHUkxVMFV4VjJGR1RsTldiRlkwVm1wSmVFNUhTWGRPVmxwUFZsWmFjRlZzYUVOalJsVjNXa1pLVGxKc2NFbFVWbWhyVm0xS1ZsZHNaRlZOVmtwWVZtMHhTMVl5VGtkalJsWlhZa1Z3TmxkWGVHRmhNVXBYVTJ4V1YySlZXbkJWYWtwU1RVWmFSVkZ0T1ZkTlZscFlWbXhvYTJGc1NYcFJiRnBYWWxob1RGWlVSbE5XTVZwMVZHMXdWMDFFUlRGWGExWmhZekZTYzFkcmFHeFRSa3BZVkZWYVMxSXhVbk5YYm1ScVRWYzVObGxWV2tOV01ERlpVV3M1V0ZadFVqTlZWRXBQVWpGd1JsZHNXbWhOV0VKUVZrWldVMUl4U2xkV1dHaFdZbGhTVlZSV1ZuZGxSbXh5V1ROb1dGSnJjRWRXYkZKSFYwZEtXV0ZJVm1GV1ZsVXhWakJhYTJNeVNraGxSbVJUWVRGV05GWnNVa2RoTURWR1RVaHNWMkV4Y0ZCV01GWmhWakZhY1ZOcVVsWldia0pZVmpKME1HRldXblJWYTFwV1lrWktXRmRXWkV0VFJuQkZWV3hXVGxZeFNtOVdha1pXWlVaYVdGSnJWbE5pUm5CVVdWaHdWMVJHWkZoTlZFSnFUV3MxV1ZaR2FITmhNVXAwWlVVNVYyRXlVVEJhUlZwYVpERldjbGRyT1ZkaWEwbzJWakp3VDJJeFZrZFhXR2hxVWxSV1lWWnFUa05TUm10M1YyMTBVMkpHV2pCWk1GVXhZVVV4ZFdGRVVsaFhTRUpNVkZWYWExWnJNVmRXYld4VFpXdGFXbFpYZEZkV2F6RlhXa2hTYkZKNlZuTlZiRkp6VjFaWmVXTXphR2hTTUZwNVZUSTFhMVl3TVVkWGJGSmFWak5PTkZWdE1VdFRWa3AwWTBVMWFXSkZjR2hXYTFwaFZUSk5lVk5zWkdGU1ZscFVWbXRhWVdGR2JISmFSM1JQVW14R05GZHJaRWRXVmxsM1YyNW9WbFo2VmtSV01GcExWakZPY2xwR1ZsZGlSbGt3Vm0xMFlWUXhXbGRqUlZwclVtczFiMWxzYUc5TlJscHhVV3hPVTJGNlZsaFpNR2hQV1ZVd2VXRkdSbGRoYTFvelZqSjRkMVl4Vm5OVGF6bFhZWHBXV2xkc1ZsTlVNa3BIVTJ4V1YySkdjRmhVVm1SVFpXeGFWbHBHWkZkTlZUVXdWRlphYjFVeFNsZFdXR2hYVFdwRk1GbHRNVmRTYXpsWFlVWm9hVkl6YUZCV2JYUnJZbTFXUjFkc1dsaGhlbXhWVkZaa01FMHhVbGRYYkdSWVVtMVNTVlpYZERCWGJGbzJWbXhDV2sxdWFISlZiRnBMVmxaYWRGSnRiRk5OYkVWM1ZtdFNSMkV4YkZkYVJscE9WbXhhY0ZWdWNFZFdiRlp4VTFSV1RrMVhlRmhXTWpBMVZURmFjbU5HV2xaTmJrMHhWbTF6ZUZOSFRYcGpSbHBPWW14S2FGWkhlR0ZrTWsxNFlqTndhRkpyU2xoVVZtaERXVlphUjFkc1RtcE5hM0JZVjJ0V2MyRkhWbkpUYkVaWFlrZFJNRnBYZUhkU1ZsSjBUMVpXVG1FeGNEWldWekF4VVRGYVZrMUliR3hTYkVwWldXeG9iMlJXY0ZaV1ZGWllVbTFTZWxsclZURldNVWw2WVVSQ1YyRnJTbFJWYlhNeFUwWldjMXBHU21sU2EzQldWbTF3UzFVeFRYaGlSbWhQVmxSc2NWbHJaRk5TYkZaelZXeGtXbFl3Y0VsWGExSlRWbFV4V0ZWdGFGZE5WbFkwVm14a1MxTkZNVmRXYkU1T1lXMTBObFl4V21GWlYwbDRVMnhrVkdKR1dsUlpXSEJ6WWpGYWMxcEljR3hpUmxZMVdrVmFkMVF4V25WUmJuQllZV3MxZGxaVldscGxSMDVIWTBaV1YySkZjRFpYVjNoaFlURk9XRkpxV2xKaVJVcFlWbXBPYjA1c1pISlZhemxwVFZaR05GVXlkR0ZXTWtweVUyeGFWVlpGYnpCV2ExcHJaRWRXU0U1WGVGTldSM2hhVm1wS05HTXhVbk5YYTJoc1UwWktXRlJWV2t0U01WSnlXa1pPVjAxVlducFdWM2hUWVZaYVZWWnNRbGRpV0ZKb1ZtMHhWMUl4VW5OaFIzQlVVMFZLZGxaR1dtdGhNRFZIVlZob1lWSXdXbGxXYkZKSFZteHNjbGt6YUZoU2EzQkhWbXhTUjFkSFNsbFZWRUphVFZaV05GVXdaRXRTTWtwSFZHeE9WMkpHYkRaV2JYUnJUa1pSZUZSdVNrOVRSMUp4Vld4a1UxVldXbkZTYm1SWVlrWktXRlpYTlU5aFZscDBWV3RhVm1KR1NsaFhWbVJMVTBad05sSnNWbWhOVlhBMlZsUkplRk14VGxkaE0zQnFVbXhhY0ZWc1VsZFVSbHBJWTBWT2EwMVZiRE5VTVZwdlYwZEtTR1ZGT1ZkaE1sRXdXa1ZhV21ReFZuSlhhemxYWW10S05sZFdWbE5XTVZGNFUydG9iRkpZVW1GV2JURlRWVVpyZDFkc1NteGlWWEJJVmtjeFIyRldTWGxWVkVKWFVrVmFjbGRXV210V2F6RlhWbTFzVTJWcldscFdWM1JYVm1zeFIyTkZaRmhoTURWWVZXMXpNVTFHV2toamVrWlhUVlZ3TUZwSWNFdFdhekZZVldwT1lWWjZSa2RhVlZwMlpXMUdSMUZzWkU1WFJVcG9WbXRhWVZVeVRYbFRiR1JoVWxaYVZGWnJXbUZoUm14VlZHMDViRkpzU2xkWGEyaFBWMFphY21ORlpGZGlSMmg2Vm14a1MxSnJOVlprUmxab1lUQnZlbFpYY0VKT1ZtUkhXa2hPYVZKVVZsaFZhazV2VFVaYWNWRnNUbE5oZWxaWVdUQm9UMkZHU2tkWGJFSldZVEpSTUZWNlJuTmpiVVpJWkVVNVUySkZjRFZXYkdRd1pESkdSMWRzVm1obGExcFlWbTV3UjJGR1dYaFdXR2hYVmpCd1NWUldXbTlWTVVwWFZsaG9WMDFxUlRCWmJURlhVbXM1Vm1KR1pHbFNWbkJZVmtaV2IxRXlUbGRYYTJSWVlrVTFXRmxZY0VkV01XeHlZVVZrYUdGNlJqRldWM2gzVmxaYWMxTnVjRnBpUm5CeVZXeGFTMVpXV25SU2JXeFRUV3hGZDFaclVrZGhNV3hYVld4b1UySnJXbE5aYlhSTFYxWldjMWRyZEZOTlZrcFlWbXhvYjFZeFNuSk9WbHBZWVRGWmQxWlVTa2RrUjFaSlZXeGtUbEpyY0VoV1IzaGhaREpOZUdJemNHaFNhMHBZVkZab1ExbFdaSE5YYkU1V1lYcFdXRlpIZUc5aVJrcEdUbGhPVm1KR1NsaGFWVnBoVmpGd1NWUnNXbE5OVm5CWlZsUkpkMlZHWkVkVGExcFhWa1ZhV1Zsc2FHOWtWbkJXVmxSV1dGSnRVbnBaYTFVeFZqRkplVnBFVWxkaVJscG9Wa1JHVDJSR1RuVlRiV3hVVWxad2VGWkdZekZWTVdSelZXeGtWbUpyTlhCV2JURlRVbXhXYzFWc1pGcFdNSEJKVjJ0U1UxWlZNVmhWYldoWFVtMVNTRmt4V2tka1ZrWnpWV3hrVjFaR1drMVdhMlIzVVRKUmVGTllaRkJXYldoWldXdGtORlF4V25KYVJGSnJVbXhzTTFaWGRHRlVNVnAxVVc1d1dsWldTbGhXUkVaTFUwZFdSbVJHY0doTmJXaDVWa2QwWVZVeVVraFVhMlJVWWxkb1dGWnJaSHBsUmxweldUTm9XbFp0VWxkVVZscFhZVlpLTmxKc2JGWmhNVnBYVkZaYWEyUkhWa2hPVjNoVFZrZDRTMVp0TVRSU01WcHlUVlZzVW1KcldsaFZiWGgzVmtac1dFMVdaRk5pVlhCS1ZXMHhkMVJ0U25OVGJVWlhVbXh3VkZsNlNrdFdNWEJHVm14T1YxSnNjRzlYVjNScllUQTFSMVZZYUdGU01GcFdWbXBDWVdWR1ZsaE9WVTVZVW10d1dGVXlkR3RXVmxsNlZHcFNWbUV4Y0ZCV2JGcDNVbTFTUjFSdGFHbFhSMmQzVm0xd1ExVXhTbkpPVm1ScVUwVTFhRlJVU205VlZscHhVbTVrV0dKSVFsaFdWM2hMVkRGYWNrNVdiR0ZXVmtwUVdXdGFTMVpXV25KWGJHUnBVakZLTmxac1ZsWmtNbEYzVGxac1ZXSklRbk5aV0hCWFZWWmtWVkZ0ZEZSaVZscFhWR3hhYjFkSFNsbFJhemxWVm14YU0xcEhlR3RXVms1VlVteGFhVlpYZDNwWGExWmhWakpHY2sxWVZsWmlTRUpXVm0xNFMyVnNiSE5YYlhSVFZtdHdWbFp0TVVkaFZrbDVWVlJDVjFKRlduSlhWbHBUVjBaS2RWSnNTbWxoTUhCYVZsZDRZVk15VGxkVmJHUlhZbXMxY1ZacVFYaE9WbkJHVjI1T1ZXSkdjRWxhVldoVFZqQXhSMU5yWkZWaVJuQXpXWHBHZG1WdFJrZFJiR1JPVjBWS1VGWXhXbXRrTVVWNVZHdGtWV0pzV25CVmJHaERWVVpTVm1GRlRsUlNiRVkwVjJ0a1IxZEdXbFZTYkZwYVlUSk9ORll3V2t0U2JGcFZVbXhvYVZkSGFESldSM2hXVFZaS1dGTnJXbXBTTW5oVlZXcEdSbVF4V25KWk0yaHJUVlpLTUZWdGVHRlZSbHBIVjJ4a1dtSkdjRE5XTW5oVFZqRldkVlJ0YkZkaVZrcEhWbGQ0VTFZeGJGaFRhMmhoVWtaS1ZsUlZaRzlYUmxwWFYyeGFhMDFyTlVsWk1GcFhWakpLUm1OSGFGZFNiSEJZV1hwS1QxZEdVbGxpUjNSVFlsaG9VRlp0ZEd0T1IxSkhWMWhrVm1FeGNGQldiVFZEWld4a2NWUnRPVlpTYkd3MFdUQlZNVmRzV1hwUmExSmFUVVp3Y2xWdGVGZGpiR1J5VGxaT1YxSldiM3BXYkZKSFZUSkZlRlJZYUZSaWExcHdWVzV3UjFkV1ZuSldiRnBPVm0xU01GcFZZekZpUmtwVllrWnNWMDF1YUhwWmExcGhVakZLVlZKc1drNVdNVVYzVmtaU1MxWXhTbkpPVm1SWFlrZFNXRlJYTlc5VmJHUnpWMjFHVkUxcmNGaFhhMVpYVlRGYVIxZHRhRnBoTWxKeVZHdGFVbVZHY0VoU2JHaFhWa1ZhVjFkV1ZsTlNNVnB6VTI1S1QxWllhRmxXYTFaSFRrWmFjMWR0UmxoV01GcEhXVEJrYjJGWFJqWldhbFpYWVd0S1ZGVnRjekZXTWs1SlZHMUdUazF0YUZKV2JYQkhaREZrYzFWc1pGWmlhelZ3Vm0xNFMxTldiSEZVYlhSb1VteHdNRmxWVm1GV2JVcEhVMnQ0VjFKRldrZGFSRXBIVG14U2MxVnRhRTVXTTA0MFZtcEplRTVIU25SV2ExcFFWbTFvV1ZsclpEUlVNVnB5V2tSU2ExSnNiRE5aVldoTFZHeEtWV0pHWkZwaE1taEVWakp6ZUdSSFZrZFNiVVpYWWtoQ1RWZFhlR0ZoTVVwWFUyeFdWMkpWV25CVmFrcFNUVVphUlZKdGRGcFdiVkpYVkZaYVYyRkdTa1pYYkdSV1lsaE5lRlY2Um10alZrWjFWRzF3VjAxRVJURlhhMVpoWXpGU2MxZHJhR3hUUmtwWVZGVmFTMUl4VW5OWGJtUnFUVmM1TmxsVldrTldNREZaVVdzNVdGWnRVak5WVkVwUFVqRndSbGRzV21oTldFSlFWMVpvZDFZeVVYaFdXR2hXWWxoU1ZWUldWbmRsUm14eVdUTm9XRkpyY0VkV2JGSkhWMGRLV1dGSVZtRldWbFV4VmpCYWEyTXlTa2hsUm1SVFlURldORlpzVWtkaE1EVkdUVWhzVjJFeGNGQldiRnBoVmtaYWNWTnFVbFpXYmtKWVZqSjBNR0ZXV25SVmExcFdZa1pLV0ZkV1pFdFRSbkJGVld4V1RsWXhTbTlXYWtaV1pVWmFXRkpyVmxOaVJuQlVXVmh3VjFSV1dYaFZhMHBzVW14d1dGWXllRmRWYlVWNlVXMDVXbUpZVFhoYVZscGFaREZXY2xkck9WZGlhMG8yVmpKd1QySXhWa2RYV0docVVtNUNWbFp0ZUV0bGJHeHpWMnhPVkZJd2JEWlhhMlJ2VmpKS1dHRkZaRmRXTTJoVVZYcEdVbVZHV2xsYVIyaHNZWHBXVmxkV1VrZGphekZYV2toU2JGSjZWbk5WYkZKelYxWlplV1ZJVGxWaVJuQkpXbFZvVTFZd01VaGhTR3hWVmxaVk1WWnRNVXRUVmxKMFpFVTFUbUpYYUZKV2JHUXdXVlpaZVZSclpGWlhTRUp3Vlcxek1XRkdiSEphUjNSUFVteEdORmRyWkVkWFJscFZVbXhhV21FeVRqUldNRnBMVW14YVZWRnRSbE5pU0VKRlZtMTBZVlF5VWtkVmJrcFFWak5vY0ZWdGVIZE5NVnB5VldzNWFrMVdWalJaTUdoUFdWVXdlV0ZHUmxkaGExb3pWako0VTFZeFZuVlViV3hYWWxaS1IxWlhlRk5WTWtWNFYyNUtWR0pHV2xkVVZtUk9aVVpWZVUxVlpHdFdiRW94VlRKNGIxVXhTbGRXV0doWFRXcEZNRmx0TVZkU2F6bFhZVVpvYVZJemFGQldiWFJyVGtkU1IxZHJXbUZUUm5CeVZGZDBZVmRHYkZaV2JHUldUVlp3UjFrd1ZUVlpWbHB6VjI1c1ZWWkZXbEJaTW5oclZsWmFkRkp0YkZOTmJFVjNWbXRTUjJFeGJGZGFSbHBPVm14YWNGVnVjRWRYVmxWM1draHdhMDFXUmpSV2JUVlBZV3N4YzFKcVdscFdWbFV4V1ZWa1MxSXhaSFZhUm1SVFVsUldObFpzVWtka01rMTRZak53YUZKclNsaFVWbWhEV1ZaYVIxZHNUbXBOYTNCWVYydFdWMVV4V2tkVGJrcFhZbGhTVEZac1dsWmxWVEZXVDFaV2FWSnVRa2xXVnpGM1ZqRmFSMWRZY0ZKaGJIQmhWbXRXWVdSV2NGWldWRlpZVW0xU2VsbHJWVEZXTVVsNllVUkNWMkZyU2xSVmJYTXhWakpPU1ZOdGVGUlNWbkJRVmxkd1MwNUdaSE5XYmtwWFlrWndjMVZ0ZUV0bGJGcElaRWhrVlUxRVJrcFZWM1J2VmxVeFdGVnRhRmROVmxZMFZteGtTMU5GTVZkaFJrNVRWbXhXTkZacVNYaE9SMGwzVGxaYVQxWldXbkJWYkdoRFkwWlZkMXBHU2s1U2JIQkpXbFZhVDFVeVNsWlhiR1JWVFZaS1dGWnRNVXRXTWs1SFkwWldWMkpGY0RaWFYzaGhZVEZLVjFOc1ZsZGlWVnB3VldwS1VrMUdXa1ZSYlRsWFRWWmFXRlpzYUd0aGJFbDZVV3hhVjJKWWFFeFhWbHBUVm14YWRWUnRjRmROUkVVeFYydFdZV014VW5OWGEyaHNVMFpLV0ZSVldrdFNNVkp6VjI1a2FrMVhPVFpaVlZwRFZqQXhXVkZyT1ZoV2JWSXpWVlJLVDFJeFVuVldiV3hUVjBWS1VWWkdWbTlSTVU1SFZWaG9ZVkl3V2xsV2JGSkhWbXhzY2xremFGaFNhM0JIVm14U1IxZEhTbGxoU0ZwVllrWlZlRlZzWkV0U2JVNUlZa1pTVTAxRVVYbFdiWFJxWlVkTmVGUnVTazlUUjFKeFZXeGtVMVZXV25GU2JtUllZa1pLV0ZaWE5VOWhWbHAwVld0YVZtSkdTbGhYVm1STFUwWndObEpzVm1oTlZYQTJWbFJKZUZNeFRsZGhNM0JxVW14YWIxUlZVbGRVUmxwSVkwVk9hMDFWYkROVU1WcHZWMGRLU0dWRk9WZGhNbEV3V2tWYVdtUXhWbkpYYXpsWFltdEtObGRXVmxOV01WRjRVMnRvYkZKWVVtRlpWRXB2WTFad1ZsZHNUbXRXTUhCSFdUQlZOVlJzVGtaVGEyeFhVa1ZhY2xkV1dtdFdhekZYVm0xc1UyVnJXbHBXVjNSWFZtc3hWMXBJVW14U2VteFFWbXhTVjFKc2JISldibVJvVm1zMVNWWldVa05XTVVsNlZXeFNWMDFxUmtoV2JYTTFWbFphYzFkdGJGZGlhMHBvVm10YVlWVXlUWGxUYkdSaFVsWmFWRlpyV21GaFJteHlXa2QwVDFKc1JqTlpWVnByVm14YWMxWnFUbHBOUjFJelZteGFZV014VG5OYVJsWlhVbFZ3TmxkVVJtdFViVlpZVld0a2FWSlVWbGhWYWs1dlRVWmFjVkZzVGxOaGVsWllXVEJvVDFsVk1IbGhSa1pYWVd0YU0xWkhlSE5YUjA1R1ZHMXdVMkpXU2toV2JHUXdXVlpTZEZKcVdsTmliVkpYVkZaYVMyTnNWalpTYTNScVZqQndTVlJXV205Vk1VcFhWbGhvVjAxcVJUQlpiVEZYVW1zNVYyRkdhR2xTTTJoNlZtMTBZVkpyTVZkV1dHaGhVa1pLVDFSWGVHRlNNVkp6VjJ4a1YwMVdiRFZhVlZwSFdWWmFjMk5GZUZwaVJuQnlWV3hhUzFaV1duUlNiV3hUVFd4RmQxWnJVa2RoTVd4WFdrWmFUbFpzV205VmExWmhWakZXZEdONlJsVlNiVkpXVlZaU1IxUXlTa2hWYkd4YVlURndSRmxyV21GamJVNUpWV3hrVGxKcmNFaFdSM2hoWkRKTmVHSXpjR2hTYTBwWVZGWm9RMWxXWkhOYVNHUlNUV3MxZWxkclZsZFZNa1kyWWtaU1dtRXhjR2hhVjNoYVpWZFNTRkpzWkdsV1dFSkxWbXRqTVZNeFpFZFRhMXBYWVdzMVZsbFhkRXROTVZaeFVWUldXRkp0VW5wWmExVXhWakZKZW1GRVFsZGhhMHBVVlcxek1WWXlUa2xUYlhoVVVsWndVRlpYY0U5Vk1XUnpWV3hrVm1Kck5YQldiVEZUVW14V2MxVnNaRnBXTUhCSlYydFNVMVpWTVZoVmJXaFhUVmRTV0ZwR1dsTmtWazV6WVVaT1UxWnNWalJXYWtsNFRrZEtkRlpyV2xCV2JXaFpXV3RrTkZReFduSmFSM0JPVm0xU1dWcFZaREJXYlVZMlVteGtZVkpXV2xSV2JURkxWakpPUjJOR1ZsZGlSWEEyVjFkNFlXRXhTbGRUYkZaWFlsVmFjRlZxU21wbFJtUlhZVWhrYUUxVk1UUlZNalZIWVZaS05sSnNiRlpoTVZwWFZGWmFhMlJIVmtoT1YzaFRWa2Q0V2xacVNqUlNNV1JIVTJ4V1ZtRnNTbGhVVm1ST1pVWmFSVkZZYUZSU2JFb3hWVmN4UjFSdFNuTlRiVVpYVW14d1ZGbDZTa3RXTVhCR1ZteE9WMUpzY0c5WFYzUnJZVEExUjFWWVpHaFNWR3hXV1d0V1YwNXNaRlZVYms1WFVsUkdXRlV4YUd0WGF6RkhZMFJPV2sxSFVraFZNVnBIWkVkT1JrNVZOVk5TYkc4eVZtcEtNRll4VVhsVGJsSlRWMGRvYUZSVVNtOVZNV3h5Vm10MFYwMVdTbGhXTW5Rd1lVWmFjazVZYkZkTlZrcFlWMVprUzFOR2NFVlZiRlpPVmpGS2IxWnFSbFpsUmxwWVUydG9UbFp0YUZSVmJGcFdaVVpaZVdSR1pFNVNiSEJKVlRKMFYxbFdTbGxWYkZKYVZucEZNRlp0ZUdGWFIxWklVbXhXVGxadVFrbFdhMlEwV1ZaV1IxZHNWbWxTYlhob1ZtMTRkMVJHYkhOWGJYUlRWbXR3VmxadE1VZGhWa2w1VlZSQ1YxSkZXbkpYVmxwclZtc3hWMVp0YkZObGExcGFWbGN4TkZJd05VZFZiRnBoVWxSc2NsVnFRbmRUYkZwWVpFUlNWbUY2UmxkWk1HaFRWakpLUjFkc1pGVmlSbkJvVldwR2EyTnNjRWhqUlRWcFlrVndhRlpyV21GVk1rMTVVMnhrWVZKV1dsUldhMXBoWVVac2NscEhkRTlTYkVZMFYydGtSMWRHV2xWU2JGcFdWbnBXY2xac1pGZGphekZWVld4d1RsSnVRWHBYVkVKclVqRk9TRlpyYUdsU2JXaFVWbXhrTTJWc1dYbGxSMFpWVFd0d01GVnNhRzlaVlRCNVlVWmFXbFpGV2pOV2FrWlRWakZhVlZKc1VrNVdia0pIVmxaYVUxSXhaSFJTV0hCU1lUSm9WbFJXWkZOaFJsbDRWbGhvVjFZd2NFbFVWbHB2VlRGS1YxWllhRmROYWtVd1dXMHhWMUpyT1ZkaFJscG9UVEpvV2xaVVFtdGhhekZIVmxoc2ExSnVRbEJXYlhoM1UwWlZlV1ZIZEZkV01IQklWVEo0VjFZeVNrZFRibkJYVmxad1lWcFhNVXRTTVZKMFVtMXNVMDFzUlhkV2ExSkhZVEZzVjFwR1drNVdiRnB3Vlc1d1IxZFdWbkpXYkZwT1ZtMVNNRnBWWXpWV01VcHlZMFphV21FeFdYZFdWRXBIWkVkV1NWVnNaRTVTYTNCSVZrZDRZV1F5VFhoaU0zQm9VbXRLV0ZSV2FFTlViRnB4VVcwNVZrMXJNVFJYYTFwWFZrZEtWV0pJU2xwV1JXOHdWV3hhWVZkRk1WaFNiR2hYVmtWYVYxZFhkR3BsUm1SSFUydGFWMVpGV2xsWmJHaHZaRlp3VmxaVVZsTldia0pIV1RCYVQxUnNXblJrUkU1WFRWWndhRmxxUmxkamF6VkpZa1pvYVZKc2NGSldWbEpQVlRGV2MxWnVTbFppYXpWUFZGWmtORll4YkZaV2EzUmFWbFJHV2xWWGVIZFdNREZ4VW01YVdsWnNjRWRhVmxwM1UxWkdjMWRzVWxObGJXZDZWakZhWVZZd05VaFZhMlJWWW14S2IxVnFUa05VTVd4eVYyeGtUMVpzY0VsYVJWcDNWREZaZDFacVVscE5SbkIyVm14a1MyTXlUa2hoUmxwb1lURndXVmRyWkRSVU1XUklWbXRhVldKRk5WaFdhMlEwV1ZaWmVXUkhkR2xOVm5CSVZUSjRZVmRIU25OWGJHaFZWbnBXZGxwSGVHdFdNWEJHV2taU1UyRjZWalZXYkdONFVqRlNkRk5zYkdoU2F6VlpXV3RrVTAweFdsVlRhemxUVFZaYWVWbFZWVEZXTVdSSFUyNWFWMVl6UWtOYVZWVXhWakZrZFZSc1dtaE5NVXBYVmtaYVYyUXlWa2RpU0Vwb1VsaFNXVlZxUW5kVFZscFlaVVZPV2xacmJEWlpWVkpQVm1zeFIyTkhhRmROUmxVeFZtMHhUMU5IU2tkVWJHUllVbFZ3U2xadE1UQlZNVWw1VTFoc1UxZEhlRlJaVkVwVFZteHNWVkp1WkZkU2JYaGFXVEJvVDFack1WZFRiR3hWVm14Vk1WWkhjM2hXTVdSVlUyeGFhVmRHU25sV2JYUmhVMjFSZVZScldtcFNiVkp3Vm10V1lVMXNXblJqUlhSVFRXeEtTVlpYY0dGV1IwcElWV3M1V21KVVJuWlVWM2hoWXpGcmVtRkdVbWxXYTFreFZsUkdiMlF5UmxkVGJsSldZbXRLWVZsclpHOWtiSEJXVjIxMFdGSXhXa2hXUnpGM1ZHeEtSMWRzYkZkTmJsSllWbXBHWVZOR1NuVlViRkpwWVROQ2FGZFdVa3RpTVVWNFZXeGtXR0pZVWxoV2JYaExaVlpSZUZkc1RtaFdhM0JhVlZkNGExWXlTbFZTVkVKYVZrVmFZVnBWV2s5ak1YQkhZVVpvVkZKVmNHOVdhMXBYV1ZaYWNrMVdaRlppUmxwVFZqQmtiMVpHYkhOWGEzUlVVbXhXTlZwVlZUVldWMHBXWTBSQ1dHRXhTbFJXYWtGNFZqSk9TR0ZHWkU1aWF6RTBWbXBDWVZsWFVsZFZibEpxVW1zMWNGWXdaRzlYVmxwMFRVUkdhMDFyTVRSV1YzUnJWbTFLU0dGR1FsZGlia0o2VmtSR2MyTnNjRWRVYlhoVFlrWndObFpzWkRSaE1rWkhWMjVLYVZKRk5WWlphMXBMVTBaYWRHTXphR3BXYkhBd1dWVmFkMVl5Vm5KWGF6RllWa1Z3TmxwVldtdFdNV1IxVkd4a2FWSlVWbGxXYlhSaFdWWktWMWRZYkd0U2F6VlRWRlZTUjFOR1dYbGxSemxYVm0xU1NWWlhlRU5XTWtwSFkwVjRXbUZyV2xSV2JYaGhaRlp3Ums1Vk5WZE5WWEJoVm10YVYySXlTWGxTYmtwT1ZtMTRVMWxYZEV0WFJsWjBUVmM1YkdKR2NIaFZNblJyWVcxS1JrNVliRlZXYkhCb1ZtcEdTMWRXUm5OV2JHUlRZa1p3YjFkV1VrZFhiVlpYVTI1S2FGSnJTbGhVVlZwM1pERmFWVkZzWkZSTlYzaFlWMnRhYTFZeVNsbFZiRUpXWWxSR1ZGcFdXbE5XYlVaSVQxWm9VMkpXU2twV2JHTjRVakZaZVZOc1ZsTmhlbXhXVm0xNGQwMHhWbkZTYlhSclVsUldXVnBWWkhOVk1rcElUMVJTVjJKR2NIRmFWV1JPWlVaa1dWcEZOVmRpVmtwYVYxWmtNRmxXWkVkV2JrNVlZbFZhVjFWdGVHRlhWbEpYVjJ0MGFFMUVSbnBWTW5SdlZqSktWVkpxVGxkU00yaE1WV3BHYTJOc1pITmhSbVJwVWxoQ1JsWnNhSGRUTVZKMFZtdG9VMWRJUW5CVmJGSnpWMFpaZDFkcmRHeFdiVkpaV2xWYVlWUnNXWGhYYm5CWFZtMW9kbGxWV2s5U2F6VllVbXhrYVZaRldsVldWM0JIVm0xV1dGUnJXbXRTYldodldsZDBZVTVHV25STlZGSldUVmRTZVZSV1ZtOVdiVVY2WVVkb1ZtSkdjRE5hVmxwM1ZqRmFWVlpzWkdobGJGcFpWbFJLZWsxWFJsaFNhbHBUVmtWd1dGbHJaRkprTVdSWFYydHdiRlpzV2xwWlZWcFBZVlpKZVdGR1pGZGhhMHB5Vkd0YWExSXlTa2RoUjNSVFYwWktXbGRYZEdGVE1WcHpWbTVTYTFKRlNtOVVWVkpIVjFad1ZtRklaRmhTTUZZMFdUQm9TMWRHV25SVmEzaFhZbFJHVUZWdE1VdFNNazVJWVVVMWFWWXlhRmRXYWtaaFZqRnNXRkpZYUZSWFIyaFZXVzE0WVZkV2JISlhiVVpZVW14d2VsWlhlR3RVTVZwelkwVnNXazFHV2xCV2JYTjRWakZrY1ZGc1pGTk5NVXB2Vm14U1MxTXhaRWhXYTFwUVZtNUNXRlZzVWxkU1ZtUnlWbTFHV0dKV1draFdiVFZMWVRGS1ZXSkdVbFZXVjJoRVZURmFhMWRIVWtoU2JXeE9WbXRaTUZaVVNuZFpWMFpYVTJ4V1UySkhhR0ZXYTFaM1pHeGFWbGR0UmxOV2EzQjVWakl4TkZZd01WWmpSV2hYWVRKT05GbDZSbE5qTVhCR1YyeFNhVk5GU2xsV2JUVjNVVEExUjFWc1dsaGlhelZZVkZab1ExSXhXWGxOV0U1WFVtdHdNVlZYZUdGV01rcFpVV3hDV21GcmNGUldha3BQVW14a2MyRkhhRTVpUlhCaFZteGplRTVHVFhkTlZXUm9UVEpTYUZWc1pGTlhSbEpXVld0T1QxWnNjRmhaVldRd1ZqQXhWMk5FUWxkU2JXaDJWbXBLUjJOdFRrWmxSbVJvWVROQ1VWWlVSbUZXTWsxNFkwVm9hVkl5ZUZsVmFrcHVaVlphZEUxSVpFNVdNVVkwVmpGb2MxWnRTa2hWYkdSWFRVZFJNRmt3V2xkak1WcFZVbTF3YVZKdVFqUldWbU14V1ZaU2MxZHVUbGRoYkVwaFZteGFZVlZHV25SbFJYQnNVbXMxVmxVeWVHRldNREI0VWxoa1YySlVSVEJYVmxwclVqRmFkVlpzYUdsVFJVcDJWa1phYjFFd05YTlhia1pTWWxWYVdGUlhlRXRUVmxwMFpFYzVhR0pGYkRWWlZWcHZWbFpaZW1GRmVGVldSVnBvV1hwR2EyTXhVbk5WYldoc1lrWndZVlp0ZUd0T1IwbDRWMjVTVTFkSGVHOVZiVEZ2V1Zac2MyRkhPV2hTYlhRMVdsVmFhMWRHV1hkT1ZXUllZVEZ3VUZaSGVGcGxiRzk2V2taa1UySklRbGhXUjNoclVtMVdWMVJ1U21sU2EzQnZWRmMxYjJGR1pGZFZhM1JwVFZkU1NGZHJXbXRaVmtwMFZXNUtWbUpHU25wV01WcFRZekZrZFZwSGFGZGlTRUpJVmxkNGIySXhaRWhTV0docVVqSm9hRlZyVm1GaFJsWnhVbXhPYWsxcmNFaFZNakZ6VlRGYVdWRnFWbGROYm1oeVZGVmFUbVZHVm5OYVJtaHBVakZLV1ZkWGVHOVZNazVIVld4YVZtRXlVbFZXYlhoM1YxWndSbUZGT1ZkaVZYQlhXVEJhYjFkck1VaGhSV2hYVFdwR1RGVnFTazlUUjBaSFZtMXNXRkl5WnpGV01uUlRVakpOZDA1WVRsaGliRXB5VlcweFUxUXhWbkpXYkZwc1VteHdNRlJWYUd0aVJrcDBaVVpvV0dFeWFFeFdSM2hyVW14a2RWRnNXazVTYkc5NlZtcEdZV015VG5OWGJGWlRZbGhTV0ZsclZuZFhSbHAwWlVjNWFVMVdWalJXTWpWUFZrZEtTVkZzWkZkaGF6VjJWV3RhYzFaV1RuTmFSM0JwVWxSV05WWkdXbUZoTVZsNVUydGthbE5IZUZsV2FrNURVVEZ3Vmxkck9WTk5WbkF4VlRJeGMxVXlSWHBSYm1SWFlsUkJlRlZVU2xkU01YQkhZVWQ0VTAxR2NHaFdiWGhUVmpKV2MySkdWbFZpV0ZKWldXeGFZV1ZzV1hsT1ZYUlhUV3RhZVZWdGNGTldWMHBIWTBkb1lWSldWalJXTUZwTFl6SkdTR0ZIZUdoTlZ6aDNWbXBHYTAxSFNYaFVXR2hoVWxkb1ZWbFVSbmRWUmxsM1YyMUdWMkpHY0hwV01uaHJWREZLYzFkdWNGZE5ibWh5VmpCYVlXTnNaSFZqUmxwWFpXdFdNMWRYZEd0U2JWRjVWR3RhVDFadFVuQlZiVFZEVjFaa1YxVnJkRlJpVmtZelZGWmFZV0ZHU25OalJ6bFZWbnBXZGxacldtdFhSMVpJVW0xMFRtRjZWbGxYVjNSdlZERmtTRk5zV2xoaVJVcGhXVlJLVW1ReFVsVlNiWFJZVmpBMVNGZHJaRzlVYkZwMFpETndWMUpzY0ZSV2FrWmFaVlpPYzFac1RtbFdNbWhaVmtaak1WUXdOVWRoTTJoaFVsaFNWVlp0Y3pGbGJHeFdXa2hPVmsxV2NFaFdNV2h2VmpKRmVHTkhhRmRpVkVaWVZXcEdUMk14Y0VkVWJXeFRUVEpvVlZZeFpEQldNVTE1Vkc1T2FsSnRhSEpWYkdoVFZteGFkR1ZIUm14V2JHdzFXa1ZrTUdGRk1VVlNibXhhVFVad2VsWnFSbHBsYlVaSlYyeGtVMUpXY0doWGJHUTBVakpTVjFSdVRsaGlWMmh2VkZkd2IwMHhXbkpYYlhSUFVqQXhOVlpYZEc5V1IwVjRZMFphV21KSFVUQlpNRnBXWkRGYWNtUkdjRmRpU0VJMlZqSjBVMUV5UmtaTldFcFlZVEpvV0ZSV1pHOU5NV3hXVjJzNVUyRjZWbGhYYTFwM1ZqRktXVkZzVmxkaGEwcG9WbFJHWVdNeGNFbFdiRlpwVWpKb1ZWWkdWbTlSTVUxNFYyNUtXazB5YUhKVVYzUjNVMFpaZUdGSVRsZGlWWEF3V2xWYWMxWXlSWGhYYTNoYVRXNW9XRmt4V2tkWFYwWkhWV3hPYUUwd1NURldiWGhxWlVkSmVGVnVUbFJoTWxKWldWUkdkMWRXV25WalJVcHNVbXh3UmxWdGVFdGlSa3B5WTBad1dtRXlVbnBXVkVaaFYxWkdkRTlXWkZOaVJuQjVWa2QwWVZNeFdYaFhiazVoVWpCYVZGVnNWbmRoUmxwMFkwVk9hMDFXY0hwWmEyaExZVVpPU0ZWc2JGWmhhMHBZVkd4YVlWZEhWa2hQVm5CWFlraEJkMVpzWkRSUk1WcFlVMnRrYWxKWGFGaFphMlJUVkVaV2RFMVZPVk5OVmtvd1dXdGtjMVV4WkVaVFZFWlhZbFJGZDFaVVJsSmxWa3AxVld4YVdGSXlhRmRXYWtKclZUSk9SMVp1VGxoaE0xSlhWRlphZDJWR1ZYbGxSVGxYVWxSR1dGWXllR0ZXYlVwWlZWaGtXbFpGV2t4YVJXUlhVakpHUjJGSGFFNVdXRUpXVmpGYVlWbFdUblJWV0dSUFZsWmFWRmxyV25kWFJteHlWbTVrVDJKR2NGWlZNbkJUVmtVeGMxTnNhRmRpVkZaVVdWUkdTMk14WkhKUFZsWlhUVEF4TTFkc1pEUlpWbVJZVkd0YVZXSkdjRTlXYlhoMlpERmFWVkp0T1dwTlYzaFlWVEo0YzFWdFNrWk9WbHBYWWtad2FGbFZXbmRTTVdSMFpFZHdhVkp1UVhkV1JFWmhWVEZTYzFOclpGaGlSMmhaVm1wT1UxZEdiRFpUYTJScVlYcEdWMVp0ZUd0aFJURlhZMGRvVjJKVVJUQlhWbHBQVWpKS1NWVnRlRk5XUjNoWlYxZDBZVk15VmxkV1dHeE9WbGRTVmxsclZuTk9iR3hXVm0xR1YwMVdjSHBaTUdoTFYyeGFSbGRyT1dGV1ZuQlFWakZrUzFOSFVrWk9WVFZwVWxoQ2FGWnFSbXROUjBWNFZWaGtUMVpYVW5GVmJURnZZMnhWZDFaVVJsZFNiSEI2VmxkMGExWkdXblJWYm14WFRXNVJkMVpxUmt0amJVNUhWMnhrYVZaR1dqSldiWEJDWlVaWmVWUnJiRk5pUmxwWVdXeGFTMU5HWkhOWGJVWlVUV3N4TlZVeWRHdFdiVXBJVlc1T1dtSkhhSFpXUjNoaFl6RldjbFJzWkU1V1ZFVXhWbFJHYjJJeVJuTlRiR1JxVWpKb1YxbHROVU5YUm10NFYyeGthazFXV2pGVk1qRTBZVlpLY21OR2FGZGlWRVl6VlZSR1lWTkdUbkpYYkdSb1lYcFdXRmRYZUZOUmJWWkhWMjVLV0dKVldsaFpXSEJYVmpGYVNHVkhPV2hTTUZZeldUQlNZVll4V1hwVmJXaFdZV3R3VkZacVJrdGtWbFp6Vkcxc1YwMXRhRnBXYlRFMFdWZFNkRlpzWkZoaVJscFVXV3hXWVdJeFVsaGpNMmhQVm14d01GUnNWVFZYYkZwVlVXcFdZVlpXY0ZSV01qRkxWbFpLVlZGc2NFNVdia0kyVjFod1IxbFhUWGxVYTFwUFZtMVNiMXBYZEZkT2JGcDBaRWQwVDFKc1JqVlZiVFZQVmtaa1NHRkdWbHBXUlc4d1ZqQmFjMk14Vm5OYVJtUlRZbGhvV2xaR1dtRmhNV1JIVTFob1ZHRXpRbGxaVkVaM1ZrWmFjVkpzY0d4V2JrRXlWVEo0YTJGRk1YTlNhazVYWVRGS1RGWkVSa3BsUms1MVZHMW9VMDFHY0ZWV2FrSlhVekZhUjFkclpGZGlSMUpoVm1wR1MxZEdXbk5oUnpsWFRXdFpNbGxyV2s5WGJVVjVWRlJHVlZaRlducFpNbmhoWXpGU2MxZHRiRk5pV0dONFZtMTRhMDFGTVVkWGJrcE9WbGRTY1ZWc2FHOWhSbFp4VkcwNWJGWnVRbGhXYkdodlZURmFjMk5JYkZWaVJsVjRWbFJCZDJWWFJrWmtSbVJvVFd4RmQxZFdVa0pOVms1SFUyeHNhVkp0VW5CVmJUVkRWbXhrVjFWcmRGWk5hMXBJVmpJMVQxbFdTbkpPVm1SV1lsUkZNRnBXV210amJGcFZWbXhrVTJKSVFqWldha3AzVWpGYWMxZHFXbE5pYmtKWVZXNXdSMU5HYkRaU2F6bHFWbXMxZWxZeWN6RmhWMFYzWTBWYVYyRnJXbWhaVkVaS1pVWlNjbHBHVW1saGVsWjJWbGR3VDJJeFdrZFZiRlpVWWxSc2NGUldXbmRYUmxwWVpFVTVWMUl3Y0ZoVmJYQlRWMjFGZVdGR2FGcFdiSEJNVm0xek1WZFdVbk5qUjJoT1lrVlplbFpyWkRSWlZsbDVWV3RhVDFadFVtaFZiWGhMWTBaV2MxcEVUazVTYkhCV1ZURlNSMkZGTVZoVmJteFZWbTFvU0ZaVVNrdFRSMFpJVW14a2FXSnJTa2xXYlhSaFZtMVJlRmRzVmxkaVIyaFlWRlZvUTFOc1pITldiVVphVm14S01GVnRjR0ZXTVdSSlVXeG9XbFpGV2t4V1ZWcHpWMFV4VjFOdGVGTmlSWEJoVmpKMGEyTXhWWGhYYmtwcVVteEtXRmxzYUVOVVJscFZVbXMxYkZKc2NIcFdiWGhMWVVVeGMxTnVaRmhXTTFKWFZGWmFXbVZHWkhKaFIzUlRWa2Q0V0ZaWE1UUmtNV1JIVmxoc2JGSlViRmxaYkZaaFpWWldjMkZIT1ZkaVZWWTFWbGQwYjFZeVNsbGhSWGhoVWxaVmVGWnFSbGRqTVhCSFdrWmtVMkpJUWtkV2JURjNVekpSZUZKWWJGVlhSMmhWV1ZSS1UxWkdiSEphUnpsb1VteGFlRlZYTVVkaGJFcHpZMGhzV0dFeFNsQldSM2hoWXpKS1JWWnRSbGRXTVVZelZteFNRbVZIVG5OYVNFWlNZa1p3Y0ZZd1drdFdWbHB6V2tSU1dsWlVWakJWTW5SaFlrWktjMk5IT1ZwV1JXc3hWRzE0YTJOc1ZuSmFSMmhPWVhwRk1GZFdVazlrTWtaSFUxaHdhRko2YkZaV2JuQlhaR3hWZVdWSFJsaFNWRVpHVlcweE1GUnNXbFZXYWxwWFZqTm9kbGxxUm1GVFJrNTFWV3hhYVZZeWFGaFhWM1JyVlRGYVIxZFlaRmhpYlZKVVdXdGFkMlZHVmxobFIzUldUV3RXTkZrd1VsTldNREYxVld4b1YyRnJXbWhaZWtaclkxWmtkR0pHVWxOaVNFSlpWbXRhWVZsV2JGZFdhMlJYWWtkb2MxVXdXbmRqYkZKWVpFaGtVMDFXY0ZsYVZWWXdWakF4UlZKdWNGWk5ibEV3Vm1wR1lXTXhUbkpWYkZwb1lUTkNUVmRZY0VkVk1rMTRXa2hPVjJKWGFFOVZhMXBoVGtaYWMxa3paRTVXYTFZMVZsWm9iMVl5U2toVmJVWmhWak5vYUZac1dsTldNVnAxVkdzNVYySnJTa2RXYTJONFRVWmtSMU5ZWkdwU1YzaFlWV3BPUTFWR1dYZGFSV1JxWWtkU2VWWlhlR3RoVmtwelYxUkNWMVpGU21oYVJFWkxaRVpXY21GSGVGTmlWa3BWVjFaU1NrNVZOVWRYYms1V1lUSlNXRlJYZEhOTk1WSnpWbTFHVmxKc2NGaFpNR2hEVm0xS1IyTkZlRmRoYTFwNldrVmtVMUp0VWtoalIyeFRZa2hCTUZac1kzZGxSa2w0Vlc1T1ZHSnJjRkJXYlRGVFYwWmFkRTFYT1dwaVJuQlhWakl4UjFkR1NYaFhhMlJYWWxob2RsWnFSa3RXVmxwellrWmthRTFZUW5sV1YzQkhZVEZKZUZadVZsZGlWVnBVV1d0V2QxZFdXblJqUlhScFlYcEdlbFl5TlV0WlZrcEdVMnhhVlZZelRYaFZNRnBYWkVkV1NFOVdjRmRoTTBKaFZsWmtORlF4V2xkWGJHUllZbGRvYUZWdGVIZFdNWEJXVjIxR2FtRjZiRmhWTWpGelZUSldkR1JFV2xkTlYxRjNWbXBHVm1WR1duVlViR2hZVWpOb1dGZFdVazlWTVZsNFYyNUtWMkV6VWxWVmJURTBUVVp3VmxaVVZsZE5hM0JJVlRJMWMxWXhTalpTYmxwYVZteHdhRll3WkZOT2JFcHpXa1pPVGsxdGFGWldiRnBUVXpGSmVGTllhR0ZUUlZwWldXdGtVMWRXVm5GVGJUbFlZa2RTV1ZwRlpFZFdSVEZGVm01d1YwMXVVblpaVkVaTFZsZEtTVkpzV21sWFJrcHZWbXBHWVdFeVRuTlhibFpoVW14d2IxcFhkR0ZUUmxweFUxUkdWMDFXY0hsVVZscHJWMGRLUmxOc1pGZGhhelYyVkZkNGQxSldUbkprUms1cFVteHdObFpVU2pSaE1WSjBVMnRhYWxKVVJsaFphMXBMVWtaYVZWSnJXbXhTYkZwYVdWVmFUMWRHU1hwaFIyaFhVbXhLVEZaVVJtRldNVlp6VjIxR1UxSnJjRlZXYlRFMFdWWmtSMXBJU21GU1JVcFlWV3BDZDFJeFduUmpSVGxYWWxWd1ZsVldhRzlXTWtWNFkwZG9WMkpZVFhoV2JYaFRZekpHU0dGSGFFNVRSVVY1Vm0xNGEwMUdiRmRUV0doaFVsZFNjVlZzV25kamJGWjBZM3BHVlUxWGVEQlVWbHBMWWtkS1IyTklhRlpOYmtKVVdWVmtTMVl4WkhKaFJtUnBWMGRvZVZkV1dtRlRNbEpJVm10a1lWSnVRbkJWYlhSM1RteGFXV05GWkZkTmF6VjZWbTAxUzFaWFNsaGxTRUpXWWtaS1dGUnNXbXRXTVZweldrWldUbUV4Y0VsV1ZFWnZZakZhU0ZKWWJHeFNiWGhoVm1wT1UwMHhhM2xsUjBaVFRWaENSMWRyV210aFZrcFpVVmhvVjJKVVJUQldha1poVWpGT1dXTkhhRlJTTW1oWlZrWmpNVkV4U2tkVmJrcGhVbFJzVkZSV1ZuZGxiR3hXV2tSQ1ZrMUVSakJaVlZwM1ZqRmFObEpZWkdGU1JYQllXWHBHZDFJeVJraGxSazVvWld4YU5sWXhaREJaVmsxNVZteGtXR0V5YUZCV2JGVXhWakZzY2xkdVRrOVdiSEJaV2tWU1ExWXlTa2RqUldSV1RXNVNkbFl5TVV0WFYwWkhVV3hrYVZkSGFGVlhWRW8wVkRKU1IxTnVTazlXYXpWUFZGY3hiMU5HV25SbFIwWmFWakJXTlZWc2FHOVdWMHB5VGxaU1YwMUhVblpXYkZwelpFVXhWMVJ0YUZOaVJuQTJWakowWVZReFpFZFRibFpTWVRKU1dGUlhOVkprTVZweVYydDBhazFyTlVwWlZWcGhWakF3ZVZvemNGZGlXRUpEV2xWa1UxZEdTbkpXYkdocFVqSm9XVlpYZUZOV01EVnpWMnhrWVZOSVFsQldiWGgzVFVaVmVXUkhSbHBXYTJ3MlZWZHpOVlp0UlhoalIyaFdZbGhvY2xacVJtdGpNWEJIVkdzMWFFMHdTVEpXYlhSclRrWnNWMWRzYUZOWFIxSnhWV3BLYjFac1duTmFSa3BPVW14YWVsWXllR3RXTURGWlVXdHNZVkpXY0ZSWlZscExWakZrV1dOR1pGZGxhMGw2VmtaYVlWbFdTWGhhU0U1WVlYcHNXRlpzVWxkWGJHUlhXa1JDVkUxc1ducFdiVFZMVjBkRmVWVnNiRlppUmtwWVZqRmFjMk5zY0VsVWJHUk9WbTVCZDFaRVJsTlVNVmw1VW01S2FXVnJTbGhWYTFaM1UwWnNObE5yY0d4aVZWcElWVEl4YzFVeVNrbFJiRXBYWWtkU00xVjZSbFpsUmxaeVdrWmthV0V4Y0ZaWFZtUjZUVmRPYzFWc1pHRlNhelZ6V1d0a1UxWnNXa2hOVkVKb1VqQlpNbFZ0ZEc5V2F6RjFZVVpDVjAxcVJraFpNakZQVTFaT2MxZHJOV2xpVjJoSlZqSjBVMUl4VFhsVmExcFBWbTFTVjFsclpGTlhSbHB5VjIxR1UxWnNjSGhWTWpWclZXc3hjazFVVWxaTmJsSnlWbFJLUzFOSFJraGhSbHBwVWpKb1JWWnNVa2RWTVZwelYyNVNVMkpZVWxoWmExcGFUVVphZEUxWWNFOVdiRm93VlRKMGIxVkdXa1pPVjBaYVZqTk5lRlJVUm1Ga1JURldXa2R3VGxZeFNYaFdWekUwV1ZkR1NGSllhR3BTYlhoWldWUkdkMkZHV2tWU2JVWnFUVlp3ZWxsclpFZFZNV1JJWVVaQ1YxWXpRbEJaYWtaUFl6RndSMkZIZEZObGJYaDVWa1phYTFVeFdYaFZiR1JvVWxSc1dGVnFRbmROUmxwWVRWVmtWMVpzYnpKVmJGSkRXVlpLYzJOSWNGZGlSbkJRV1RKNGQxSXlSa2RhUjJ4VFlsUnJlbFpxU2pSV01rVjVWRmhvV0ZkSGVGUldNR1JUWTFaVmQxZHVaRmhXYlhoV1ZXMHhSMkZ0U2tobFJFSlZWbXhWTVZaVVNrdFdiVTVHV2taa2FWZEhhRVZXYkZKQ1pVZE5lRlJ1U2s1V2JWSlVXV3RhZDJJeFpISlZhMHBzVWpBeE5WVXlkSE5XUjBwV1YyeFNXbGRJUWxoYVJFWmhWMGRPUmxOck5WZE5WVmt3VmpKMFlWWXhXa2hUYkd4V1lrZFNWMWxYZEV0aFJscHhVbXhrYTFKVVZsaFhhMXByWVZaYVdWRnNaRmRXZWtGNFdrUkdhMlJHV25WVGJHaG9ZWHBXV1ZkV1VrZGtNbFpYWTBab2JGSnJOWEZaYTFwM1pXeFplV1ZIZEdsU01IQmFWMnBPYjFZeVNrZFRhMmhYWVd0YVUxcFZXa3RrVmxKMFlrVTFUbUpGY0ROV2JHUTBXVlpOZUZaWWFGaGlhMXBWV1d0Vk1WWldVbGRYYlVaWFlrWmFXVnBGWkRCaFJsbDNZMFZrVldKR2NISldha1pLWld4V2NtVkdhRmRpUmxrd1ZsUkNhMVl4U25OWGJrNVlZa2RTY0ZadGRIZE9WbHB6WVVoa1VtSldSalZXVm1oclZERmFkR1ZIYUZaaGEwcG9WakJhZDFkSFVraFNiR2hUWWxaS1dsWkdXbE5STWtaeVRWWmFhbEp0VWxaV2JYaGhWa1pzVlZKcmRGaFdhMXA2VmxkNFYxWXlWbk5YYWtaWFVtMVJNRll5TVZKbFJscDFVMjEwVTJKSVFsQlhWbWgzVmpGT2MxZHVTbHBsYTFwVFZGWmtORll4VWxkaFJtUlhZbFZ3VmxscldtOVdWbHBYWTBST1YxSldjSHBVYlhoTFpGWlNkR05GTlZkTlZXOHhWbTEwYW1WSFNYaFdXR1JPVm14d2NWVnNhRU5YUmxKWVRsVk9WbEpzV2xaVmJYTTFZV3N4Vms1WWJGZGlWRVoyVmxSS1YyTXhaSE5YYkdoWFpXdEpNRlpIZEd0VU1WbDRZMFZzVTJKRmNGaFZiWGgzWlVaYVdFMVVRbHBXVkVaSVZsZDRhMWxXVGtaT1ZscGFWMGhDU0ZVeWVGZFdNa1pJWkVaa1RsSkZXbGxYVkVKdldWWlplRmRyV2xoaVYyaFhWRlZhZDFSR2JEWlRhM1JVVWpBMVNGWkhjekZVYlVwWVlVWkNWMkpZYUhKYVJFWktaVlpXV1dKR1dsaFNNbWgzVmxSQ1YyUXlSa2RXYmxKT1ZtczFjVlJXWkRSbGJGcDBUVlZrV0ZJd2NFbGFSVkpQVjBkRmVGTnNVbGRpUm5CTVdUSjRZV05XVm5OWGF6Vm9Za1p3TlZacVJtRlpWazE0V2tWa1YySnJOVzlWYWtKaFZrWmFkRTVWVGxoV2JIQldWVmN4UjFaRk1YSk9WbWhXWWxSV1ZGbFZXa3RqYlU1R1QxWndhVmRIYUV4WGJHUTBXVmRPYzFkdVRtRlNhelZ3Vm0xMFdrMUdXbkpYYlRsb1RXdGFXRlV5ZUd0V1IwcEdUbFpvV2xZelVqTldhMXBYVG14S2MxcEdaRmRoTVhBMVZqSjBhMk15UmxkVGJGWlhZa2RvV0ZsVVNsSmtNVlkyVW01T1YyRjZSbGRaVldRMFZURmFjMk5HYUZkaVZFSTBWbFJLVDJNeFdsbGlSM2hUVm01Q2VWWkdXbGRrTURGSFZXNU9XR0pGTlZoVVZscDNWbXhhZEU1WVRsaFNNRlkwVlRKMGIxbFdTa1pYYmtwWFlXdGFWRnBHV21Gak1XUjBZa1prVG1KWGFHaFdiWGhyVGtaVmVGZHVTazVYUlRWb1ZXMHhVMWRXYkhOaFJVNVdVbXh3ZUZWdGREQldNREZZWkVST1YxWXphSEpXYlRGTFVqSk9SbUpIUmxkV2JrSk5WbXBLTkZsWFRYaGFTRXBzVW14YWNGWXdaRzVsYkZwWVkwVmthMDFWY0RCV1YzUnZZa1pKZVdWR2FGcFdSVFZFVmtWYVlXTXhWbkphUjJob1pXeGFXbFpYTURGVE1WSnpWR3RvVm1KR1dtRldhazV2WVVaa1YxZHRSbXRTVkVaWFZHeGtORlV5U2taalJtaFhZV3RyZUZsVVNrZGpNVTUxVld4Q1YxSnNjRmRYVjNSaFYyMVJlRmR1UmxSaVIxSnlWV3BDWVZKc1ZuUmxSM1JXVFZad2Vsa3dXa2RXTVZwelUydDRWbVZyV25KVmFrWlBaRlpTZEdGR1RrNU5iV2hXVm10YVUxTXlTWGxXYTJSWVlrZG9jVlZzWkZOWlZscHpWV3hrV0ZKdGVIbFpWVlUxWVVaS2NtTkdXbGRpVkZaRVZteGFZVmRIUmtaVmJGcE9WbTVDTmxkVVNqUldNazV6Vlc1T2FsSnRVbkJWYm5CdlRsWmFjMWt6YUU5U2F6RTBWMnRXYTFkSFNuTlRiVGxXWWxob1RGZFdXbk5YUjFKR1kwZDBUbFp1UWpWV01uUlhXVmRLU0ZOclpGUmliWGhoVkZWYWQxUkdiSEphUlZwclRWZFNXbGt3V210WFJrNUdVMnRzVjJFeFNrTmFSRXBYVWpGYWRWWnNVbWxTYkhCM1YxWlNRMlF4V2tkWGJsSnFVbGhTVjFSV1ZYaE9SbHAwWlVaa1ZtSlZWalZXVnpWRFYyMUZlRlpZYUZkaGExcG9WVEJrVTFKdFVrZGpSbVJYVWxad1MxWXllRmRXTVZsNFYyNU9XR0pzU2xkWmJYUjNWakZTV0U1WE9WVlNiWFEwVmpKMGExWXhXbk5UYm5CWFVqTm9VRmxWVlhoWFJUbFZWbXhrYUdFelFYcFdWbEpMVkcxV1IxUnVTbUZTYXpWd1ZXcEtiMkl4V2xobFJ6bFNUVlpXTkZaWGVHRldNa3BXVjI1S1YySllhRmhVYTFwaFpFZE9ObFpzV21sV1dFSktWa1JHVTFReFpIUlNXR2hZWWtaS1dGWnVjRWRVUm10NVpVVTVhMUl3V2toWk1GcHJZVlpLZFZGcmNGZE5ibEp5Vkd0a1RtVkdaRmxpUms1b1RWaENVbFp0Y0VOWlYwNUhWbGhrVjJFelVsVlphMlJUVjFad1JsbDZWbWhoZWtaWVZUSjBiMVp0U2toaFNGcFhZVEpTVEZwRldsZGtSMFpIVjIxc1UwMVZjRlpXYlhCRFdWZFJlRk51VG1GVFJUVm9WVzE0UzFaR2JGVlVhMDVQVW14d1dGZFVUbTloVlRGWFYyNXNWVlp0YUZoV2JURkhZMnMxVjFwR1ZsZGlTRUp2VjJ0a05HUXhaRWhXYTJSVllsaENjRlZ0ZEhabFJscFhXa1JTVkUxV2JETlVWbWhQVmtkRmVtRkdhRmRpV0doTVZXdGFWMk5XVG5Ka1IzQk9WbXR3TmxacVNqUldNa1pHVFZWc1VtSlViRmhWYlhoaFkyeFNjbGRyZEZkTlZuQjZWMnRrUjFVd01IaFRiRnBZVmpOU1dGWnFRWGRsUmxwMVZXczFVMUpXY0ZsV1Z6RTBaREZaZUZWdVRsZGhlbXhaV1d0YWQxSXhXWGxqUlRsYVZtdHdXRlpzVWtkV01ERlhZMFpTWVZKV2NFeFpla1pUWTJzMVYxcEhiRmRTTW1OM1ZtMHhkMUl5U1hsVldHaFVWMGRTVDFac1pGTmpWbFp6VjI1a2FsSnNXbnBXTWpGSFZsVXhWMWR1YUZaTmJtaFFWbXhhUzJNeFpIVmhSbHBPWW10S1VWZFdVa0psUm1SSFZtNVdhbEp0YUZoVmJGSlhUV3hhYzFWclpGcFdNVXBZVlcwMVQyRnNTblJWYkdoaFZqTlNhRlJYZUd0V01WcDBVbXhvYVZac2IzZFdWekV3VmpGa1NGTnJaRmhoZW14V1ZtcE9UbVF4Y0ZobFIwWllWakExUjFaSE1YZFViRnBaVVd0c1YxWjZSVEJaYWtaelZqRk9jMkpHU21sU1ZGWlhWbTE0WVZsWFJrZGpSV1JZWWtad2MxVnRlSGRsVmxGNFYydDBhRlpyYnpKWlZFNTNWMFpaZWxWc2FGZFdSVnBZV1hwR2ExZFhTa2RYYld4cFVsaENXbFp0TVRCV01VMTRWV3RrYVZKR2NGUlpiWE14WTFac2MxWnRSbE5OVmtZMFYydG9UMVpyTVZkaVJGcGFWbFpaZDFZd1dtdFRWa1p5Vkd4V1YySklRazFXVkVKaFV6Sk5lRnBJVGxWaVYzaFlWVzE0ZDFZeFduUk5WRkpYWVhwR1dGVnNhRzlaVms1R1YyeE9XbUpZVFhoV2ExcFhaRWRTU0ZKc2FGZGlWa28xVm0wd01XRXhXblJTYWxwVFlUSlNXRlJYY0ZkWFJscDBZek5vVjAxWFVucFZWM2hoVmpBd2VWb3piRmhoTVVwTVZYcEdTMk14V25WVWJGSnBVakZLVUZaR1dsZGtNbEp6VjFob1lWSkdTbTlVVlZKWFUxWmFkRTVWT1ZwV2F6VkhWR3hqTlZadFNrZFRibkJZVm14d2Vsa3llSGRUUlRsWFdrWmthVkp1UWxwV2JYaHFUVlpSZUZkcmFGUmhNWEJZV1ZkNFMxWXhVbGhqUm1ScVlrZFNXRll5ZERCWFJrcHpWMjV3V2xaWFVraFdWRVpoWkZaR2NrMVdaRmRTVlhCdlZqRmFhMVF4V1hoVGJsWlZZbGhDVkZsc1drdFZSbVJZVFVob2FXRjZSbnBXTVdodlZtMUdObUpJU2xWV00yaG9XbGQ0WVZkRk5WWmtSbVJYVFVoQ05WWlVTalJVTVZsNVVtNUthbEpzU2xkYVYzUmhWMFphYzFkclpHcGlTRUpKV1d0a2MxVXhXa2RYYkd4WFlsaFNjbFJWV2s1bFIwcEhWMnMxVjFZeWFIcFdWM2hoV1ZaWmVGZHVVazVXYXpWeFdXdGFWMDVXY0ZaV1ZGWldUVlp3ZVZZeU5YTldWVEZYWTBWNFYxSjZSa3hXTVdSSFVteFdjMXBGTldsaE1IQkdWakZvZDFJeFRYaFRXR2hVWW1zMWIxVnFRbUZXUmxsM1ZtdDBWMUpzY0VoV2JYaHJWMnhaZUZOc2FGaGhNbWhVV1d0YVMxWXlUa2xUYkZaWFlrWlpNRlpHVWtkWlZtUklWbXRhYTFJeWFGaFdhMVphWkRGYWMxcEVRazVTYkhCNlZqSjBZVlpIUlhsaFIwWmFZa2RvZGxaVldtRmtSMVpIVkcxd2FWSlVWWGRXVnpGNlRWWlZkMDFJYkdoU1dHaFlXV3RhUzFNeGNGWldWRVpVVW10d1dsbFZXbGRoUlRGelUyeHdXRlp0VVRCWFZscHpWakpLU1ZSdFJsTlNhM0JWVmxjd2VFNUdXWGhhU0VwWFZrWmFiMVJXV25kbFZsSnpWV3RPV0dKR2NGbFdWbEpEVmpKR2NtTkZhR0ZTVjFKVFdsZDRkMUl4Y0VaT1YyeHBWakprTlZadGVHOWtNVTE0VkZoc1ZWZEhlRlpaVkVwVFZqRnNjMVp0UmxWTlYzZ3dXbFZXTUdGVk1WaFZiR3hoVmxad1VGbFhjM2hqTVdSMVkwWm9hRTF0YUUxV01WcGhVekpTUjFadVZsVmlSMUp2V1ZSQ1YwMHhXa2RYYlVaclRWVndXRlpITlZOaE1VcHpVMnM1VjJKSFVYcFVWVnByVmxaR2RFOVhhRTVXTVVsM1ZsZDRiMk14V25SVGEyaG9VakpvV0ZsWGN6RlZNWEJGVW0xR2FrMVlRa2RVYkdRd1ZHeEtSMWRzYUZkaVIwNDBXV3BHV21WR1pITmFSM0JUVWxad1dWWnRkRmRaVm1SSFYydFdVMkV4Y0hKVVZWSnpWMFpaZVUxWVRsWk5WbXcxV1ZWYWExZEdXWHBoU0VwYVlXdHdVRmw2Um1Ga1ZrcHpVMnhrVTFadVFqVldNV1F3Vm1zeFYxZFlhRmhoTW1oUFZXdGFZVll4VWxoa1NHUllVbXhzTlZwRmFFOVdNREZXWW5wS1ZtSkdTa1JXTW5oYVpXMUdSMUZzV21oaE1YQlJWMnRhWVdReFNYbFVhMmhvVWpKb1QxbHRlRWRPYkZwMFkwVjBhMDFWVmpWV1ZtaHZWbGRGZVZWc2JGcGhNbEV3VmxSR2MxWldVbkpVYkdSWFlrWlplbFp0ZUZOU01WcHpVMjVPV0dKR2NGZFVWM0JYVlVaYVdFMVZkRlJTVkd4V1ZrZDRkMkZGTVZkalJsWlhZa2RSTUZZeU1WZFdNVnAxVTIxMFUySklRbGxXVjNoWFpERk9WMXBHYUU1V1JrcHhXV3hhWVZZeFVsZFhiWFJhVm10d1ZsWnRlRk5XVmxwelYycE9XRlpzY0doV2JGcFBWbFpLYzFwRk5WZFdSbGt5Vm14a05HSXlUWGhYYmxKVVlURndWVmxzVm1GWlZscHhWR3hPYkZadVFsZFdNalZQWVcxS1IyTkVSbGhoTVZVeFdWWmFZVlpXU2xsalJtUlRUVEpvV1Zac1VrdFNNVWw0V2toT1dHSkhhSEJaYTFwM1YwWmFSMWR0UmxwV2JGcElWbTE0VjFWc1drZFhiR2hhWVRGd2FGcFhlRlpsVlRGWldrWmFUbFpYZHpKWFZsWlhZVEZaZVZOclpHcFRSVnBXV1d0YWQxVXhjRlpYYTNSWVZqQndSMVJzV210VWJFcDFVV3hHVjJKVVJqTlZWRXBTWkRBeFZscEdhR2hOYldoNFZsZDRWazFYU1hoV2JsSnNVMFp3VDFsclpEUmxWbHBZWkVkMFYwMVZjSHBaTUZwelZqRmFObEp1V2xoV2JIQk1WRzE0UzJNeFJuUlNiRTVYWWtacmQxWnRjRU5oTVVsNFZHdG9WbUV5VWxaWmJHUnZZekZzY2xkdVRrOWlSbkI0VlRKd1UyRkhTbGRYYTJoWFRXcFdWRlpyV210VFJsWjFVbXhhYVZJeFJYZFdiVEUwWXpKU1NGVnJXbXRTTTBKUFZtcE9iMDVzV25GVGFsSm9UV3RXTTFSV1dtRmhiRXBZWVVaa1dtSkdTbGhaTW5oaFVsWkdXV0ZHVGs1V1ZGWTJWbXRrTkdReVJraFNXSEJTWW0xNFdGWnJWblpOUmxaMFRWWktiRkpyTlRGV1YzTTFWakpLUm1OSVdsZFNiVTQwV1dwR2ExWXhjRWxUYkdocFYwWktWVlpHV210Vk1XUkhWMjVTVDFadFVtOVphMVozVjJ4V1dHVkdUbGRpVlZZMFZqSjBORmxXU25OalIwWmhWbFp3Y2xwRlZUVldNVlp5VGxkc1UySnJTbUZXYWtaclRVWnNXRlJZYkZOaE1YQlBWakJXWVdOR1ZuTmhSemxYWWtad2VsWXlNVWRpUjBwSlVXdG9WMDF1YUZCV1ZFcExVakZPZFdKR1drNWhhMW8yVjFaYVlWTXhXbGRUYkd4cVVtMVNXRlZzV25kbFJscEhWMjFHVmsxV2JEUlZNbmh6V1ZaS2NrNVlRbHBoTVhBelZqRmFZVmRGTVZWVmJIQlhZWHBGTUZkWGRHOVZNa1Y0VTJ0a1ZHSkdTbGRaYkdoVFlVWlplRmRzVG1wTlYxSjVWREZhVjJGV1NsbFJiSEJZWWtaYVZGVnFSbHBsUms1eldrWm9hVkpWY0ZoV2JUVjNVakZTUjJKRVdsTmlXRkp4V1d0a1UyVnNXbGhsUjNScFVqQndTRmt3VlRWV01rcFZVbGhrV21GcldsTmFWVnBYVjFkR1IxUnNhRk5OTW1nelZteGtORll5VVhsU2EyUldZa1p3YUZWcldrdFdSbHAwWlVkR1dGSnRVbmxXVjNSUFlVWktjbU5JY0ZkaVdFSlFWbTB4UzFJeFRuTmhSbVJvVFZoQ2IxWnRjRWRVTWs1elZXNU9WMkpYYUc5VVZXaERWbXhhZEdWSGNHeFNhelV3Vm0xNGEyRnNTbGRqU0VaV1lsaFNNMVpFUmxkak1XUjFXa1UxVjJKSGR6RlhhMVpoVkRGYVJrMVlTbWxTUmxwWVZXcE9VMlJzV25KYVJWcHNWakJhU0ZsVldtdGhSMFY2VVd4V1YyRXhjR2hXYWtaaFZqRk9kVk50ZEZOV1IzaDNWbGR3VDJJeFpGZGFSbVJYWWxSc2IxUlhkR0ZYUmxWNVpVYzVhVkpyY0ZoWk1GcGhWMnhhUmxkcmVHRldNMmhYV2xaa1YxSnRVa2RVYld4VFltdEpNRlp0ZEd0T1JsbDRWMWhrVGxOSFVsVlphMXBMVjBaU1dFNVZUbE5TYmtKR1ZUSnpOVlV3TVZsUmEyaGFWbGRTU0ZaVVJtdFNNVTV6Vm14a1UySlZNVFJXYkZKTFZURlplRnBJVGxoaVIxSnZXbGN4TkZaR1pGZGhTR1JUVFZWc05Ga3dWbUZYUjBwR1RsWmtXbUpHV21oVVZWcGhWMGRTU0ZKc1pFNVdia0YzVm10YVUxSXhaSFJUYkd4b1VtdEtXRmxzYUc5V1JtdDVaVVU1YTFKcmNIbFViRnBQVkdzeGRHRkZhRmRpV0dob1YxWmtSbVZXU2xsaFJsWnBZWHBXVlZacVFtdGlNVnBYWWtab2JGTkhVbUZXYlhoM1RVWlNWMWw2VmxWaGVrWlpXbFZvYzFZeVNsVldiRUpYVmtWYVRGWnNaRXRTYkdSelkwZG9UbFp0T1RaV2JYaFRVakZOZUZkWWFHRlNiWGh4VlcweFUxWkdiSE5YYTNCc1lrWndlbGRyYUhkVWJFbDRVbXBTVjJKVVZsQldhMlJMVjBkV1JrOVdjR2xTYmtKTlZtdFdZVmxXV1hoV2JrcFZZa1UxVDFsVVRrTk9iRnB5V2tSU1dsWnNjRmxWYkdocllXeEplV0ZHV2xkaVIxSlRWRlZhVjJNeFpIUlNiR2hUVmtaYVdGWnJaRFJXTVZWM1RWWmthbEl3V2xoWlZFWjNWa1phUlZKc1dteFNhelV4VlRKNGIyRkhSWHBSYkhCWVZtMVJkMVY2U2xkak1WcDFVMnhvYUUxc1NscFdWekF4VVRGT1YxVnNaRmhpVlZwWVZGWldkMVl4YTNkV1ZFWlhUVlp3UjFZeWVHOVdNVXBHVjJ0b1dtVnJjRXRhVjNoM1UwZEtSMVJzWkU1TmJXaFlWbXBHYTA1SFNYbFRXR3hWWW1zMVdGWXdaRk5YVm14elZtMUdWbEpzY0RCVVZsSlRWR3hLZEdWSWJGZGlXRTB4V1ZaYVMyTXlTa1ZVYkhCb1RWVndiMVp0Y0V0VE1WcFhWMjVPYUZKdGFGaFphMmhEVTBaa2MxZHRSbXROVlRWWVZrYzFUMkZzU1hwaFJ6bFZWa1ZLUzFSWGVHRmpiR3Q2WVVVNVUwMVZXVEJXYWtvd1lqRmFjMXBGYUd4U01taFhXV3RhUzFkR2JIRlNiVVpxVm14S2VsWkhNVEJXTWtwSlVXdG9WMDF1VW5aV1JFWlhaRVpPYzFkdGNGUlNNMmhvVjFaU1IxbFdXa2RYV0d4cVRUSm9jbFZ0ZUdGbFZsSnpWMjVrVjAxcmNFaFpNRlp6VjBaYVJtSjZRbUZTUlZwTFdsVmtTMUpXWkhOVWJXeFlVbFZ3VmxacldtRldNbEY0VkZob1dHSnJjR0ZVVkVwdlZsWlNWMVpZYUU5U2JGWTBXVlZvVDJGV1NuSmlSRnBYVmpOb2FGWnNXbUZTYlU1SFVXeFdWMUpXY0ZsV1J6RTBWREpTUjFOdVRsaGlWMmh6V1ZSR2QxTldXWGxrUm1SWFlsWmFTVlV5ZEd0WFIwVjVZVWhPVmsxSFVuWldNVnBoWTFaU2RFOVhjR2xTYmtKYVYyeFdiMWxYU2tkVFdHUlBWbGhDV0ZadWNFZGxiRnBWVW10MFYySlZOVXBaYTFwcllVZEZkMk5HYkZoWFNFSklWbGN4VjFJeFRuTmlSMnhUVmtaYVdWWkdWbUZrTVZaSFYyNVNhbEpWTlhKVVZWSkhVMFpaZVdSSE9XaGlSWEJYVkd4ak5WWnRTbGxoUkVwVlZqTm9lbGt5ZUZkamJIQkhXa1pPYVZORlNtRldiWGhyVGtkSmVGZHNhRk5YUjJoeFZXdFZNVmRHVWxaWGJtUlhVbTEwTkZZeWREQmhNVWw0VTJ0b1YxSXpUWGhXYWtwTFkyeE9jbUZHWkdoaE1YQjVWMnRTUjFReVVrZFhia3BvVW14d2IxUlhlRXRrTVZwWVRVaG9hVTFXV2toV01qVkhWbGRLUms1V1dsZGlXR2hvVm0xNFYyUkhVa1ZSYldocFVtNUJkMWRzVm05aU1WcHlUVlpvYUZOR2NHRldhMVpoVkVad1JscEdaRk5OYTNCSVZtMHhjMVV3TVZaWFdIQlhZbGhTV0ZkV1dscGxSbVJ6V2taT2FXRXpRbnBXVjNCRFdWWmtWMVp1UmxKV1JVcHpXV3RhZDFkc2EzZFdhemxvWVhwR1Yxa3dWbTlXYlVwWllVaGFXRlpzY0V4V01WcEhZekZTYzFac1pHbFNiVGsyVmpKNFYxbFhSWGxVYms1aFUwWktVVlp0ZUV0VU1XeHlWMjVrV0ZadFVsWlZWekZIWVZVeFYxSnFVbGROYmxKb1ZtdGtTMUl4VG5OYVJuQlhUVEZKZVZaR1ZtRlZNazE0V2toU2ExSXpRazlXTUZaTFUwWmFSVkpzV2s1V2JGWXpWRlpXYjJFeVZuSmpSbWhYWVRGYU0xUlVSbUZqVmtweVQxZHdUbFpVVmpWV2JURTBVekpHVjFkclpGaGlTRUpaVm0weFVtUXhjRVZTYlhSVFRWWmFlbFl5ZUc5aFJURlpVVzV3V0ZZelVtaGFSRUY0VmpKS1NWTnRSbFJTTVVwMlZtMHhOR1F5Vm5OaVNFWlZZbFJzV1ZWcVFsZE9SbGw1WlVjNVYwMVdjRWRaTUZwRFZtc3hSMk5HVW1GU2JIQllXWHBHZDFOSFNrZGhSazVYVjBWRmVGWnRNVFJoYXpGWVZWaHNWVmRIVWxCV2JURlRZMVpXZEUxV1RsZGlSM2g2VmxkNGEyRnNXbk5YYm5CWFZucFdURmxyWkV0U01VNXpXa1prYVZkRlNrVldiWFJyVXpGS2MxZHVSbFZpUm5Cd1ZtdFdSMDVHV25Sa1IwWmFWbXh3ZVZSc1dtdFdiVXBKVVd4b1lWWXpVbWhXUlZwcll6RmtjMWR0ZUZOaVZrcFpWbTB3TVZReVJuTlRibEpXWW1zMVlWbFVSbmROTVZKelYyMUdWMVpyY0hwWGExcGhZVlphY2xkVVFsaFdNMEpRV1ZSS1IxWXhVbkphUmxKcFVtNUNhRmRYZEd0aU1WcEhWbXBhVTJKSFVsaFdiWFIzWlZad1JscElaRmROYTNCNVZUSjBjMWRHV25OWGJHaFZWbGRTVEZWcVJtdGtWbHB6VTIxc1UwMHlhRmhXTVdRd1dWWk5lRk5yWkZoaVJscFVXVlJPUTJNeFduRlNiVVpUWWtad01GcFZZelZoUmxweVlrUlNWazF1YUVoV2FrWkxZekZrZFZOc1drNWhhMXBaVjFod1IxVXlVbGRUYms1aFVqSm9UMVJWVm5kV1ZscHlWMjFHYUUxRVZrZFVWbFpyVmpGa1NHRkdhRnBYU0VKNlZtcEdVMWRIVWtoU2F6VlRZa1paTUZkV1ZtOVVNVnBZVTJ0b1ZtRXlhRmRVVjNCSFUwWmFjVk5yZEd0V2ExcDZXVlZhZDFSdFNuUmhSa1pYWVd0S2NsWkVSazlYUmxKeVdrWmthVll5YUZCV1YzUmhWMjFXUjFkdVNsaGlSMUpZVkZWU1IxTkdXa2hPVlRsV1RWZFNTVlpYZUZOWGJVcEhVMnhvVjJKR2NHaFpla1poVmxaS2MxcEdUbWxoTUhCTFZtdGFZVmxXVVhoYVJXUllZbXMxV1ZsWGRHRlhWbXhWVTJ4S2EwMVdiRE5XTW5Rd1lXMUtTRlZxUmxkaVdHaHlWbXBHWVdSV1JuTlNiR1JYWWxVME1GWlljRXRVTWxKSFZXNUtWMkpIYUhCV01GWkxWVVphV0dSSFJscFdhM0I2VjJ0YWExZEhTa2hWYkZKVlZqTlNNMXBYZUdGVFIxWklVbXhrVjAxR1dYcFhWRUpxVGxaYVYxZHVVbWhTVmtwWVZGYzFiMVl4Y0ZkV1ZFWllWbXhLTUZsVldtdFdNVXBXWWtSYVYwMVhVWGRaVjNONFZqRmtkVlJzVW1saE0wSlJWbTE0VmsxV2JGZGlTRTVvVW1zMVQxUldXa3ROUmxKWFZsUkdhRTFFUmtaV2JYaHJWakZhTmxKcmFGcGhNbEpIV2tSS1QxSnJOVmRhUm1SVFZtNUNXbFp0ZEZOU01VbDVWRmhzVkZkSVFtaFZha28wVmtaYWRHUklaRlppUm5CV1ZWY3hSMkV3TVZaTlZGSlhZa2RvY2xacVNrWmxiRlp6VVd4a2FWWkZWWGRYYkZaaFZtMVdXRlJxV2xkaVNFSllWRlZvUTFkR1pGaGtSazVhVm14d2VsWXljR0ZWTVZwR1UyMUdWMkpZYUROVVZFWlRaRWRXUmxwSGNHbFdiSEJKVm14a05HRXhXWGhYYTJSWVlURmFXRmxYZEhkTk1WWlZVMnMxYkZKck5YbFhhMXByWVZkS1JtTkliRmRXTTBKRVYxWmFhMVl4V25WVWJGcHBVakZLZWxaWE1IaFZNVnB6Vmxob2FGSjZiRzlaV0hCSFpXeFdkR05HWkZkTlZtdzJWbGMxWVZZeFdsZGpTRXBXVFVkU1dGVXhXa3RrUmtweldrZHNVMkpyU2twV2JYUnJUa1pzVjFWWWFGaGlhelZvVlRCYVlXTldWblJsUjBacFRWWktWMVpYZUd0VWF6RlhZMFpvVjAxcVJYZFpWVlY0Vm1zMVdXTkdXbWxTTW1oNVZteFNTMU14V2xkWGJrNVhZa2RTY0ZWdGVGZE9SbHBYVld0a2FFMXJOVmhWYlhoellVWktjazVXVWxwV1JWb3pWbXBHYTFkSFVraFNiRTVPWVRGd1NWWnFTalJaVjBaelZHdGFWR0pIVWxaV2JuQlhVa1phVmxkc1pGZFdhelY1VkRGYVUxVXlTa1pqUkZaWVZteGFhRmxVUmxwbFZscDFWR3hvYUdWdGVGbFdiVEUwVXpGS1IxWnVSbFJpUlRWWVZGZDBWMDVzYkhKYVNFNVdUVVJDTkZVeU1EVldNVmw2WVVoYVdtRnJXa2RhVlZwWFl6RmtjMXBIYUdoTlNFSlhWakZrTUZZeFdYZE5TR2hYWW14S1QxVnJWbUZYUmxaMFpVaGtWMDFXU25wV2JYTTFWMFpKZDFkdWJGWk5hbFl6Vm0weFJtVkhUa1poUm1ST1ZqRktTVlpYTUhoVU1VbDRWVzVPVldKRk5WaFdiVEEwWlVaYWRHVkdUbE5OVm13MFdXdGFiMVl5U25OVGJGWmFZbGhvVEZadGVITldWazUwVDFkd1UySkdXWHBXTW5SaFZESkdSMU51VG1wU2JIQlhWRmMxVGsxV2JISmFSWFJUWVhwV1dGZHJXbXRWTWxaeVZtcE9WMkV5VWpaYVZWcFBVbXM1VjFac1dtbFNiSEJaVm0xd1MySXhWbGRYYkdoc1VqQmFXRlJXWkZOU01WRjRWMjA1VlUxV2NIcFZNbmh2VmpKS1IxTnNhRlpoTVhCaFdsWmtUMUpzVW5SalJUVlhWMFZLU2xac1kzaE9SMGw0WWtaa1ZHSkhlRk5aYTFwTFZqRnNjbHBHU2s1U2JrSklWakl4UjFZeVNraFZibkJXVFc1TmVGWlVTa3RXVjBZMlVXeGtUbUpzU2xWV2JYQkhZekZaZUZWdVNtaFNiSEJ3Vm10a05GZFdXa2RXYlVaYVZteEtTRmxyVW1GVk1rWTJZa2hLVjJGclNqTlZiWGhoVTBVeFZscEdWbWxTVnpoNVYxWm9kMU14V1hkTlZtUlVZVE5TVmxadGVIZGpiRnB4VW0xR1dGWXdOVWxWYlhoUFZqRkplbUZHVmxkaE1YQnhXbFZWTVZJeFNsbGhSMFpVVWxad1ZGZFhNWHBOVmxwSFZtNVNhMUl3V2s5VmJYaDNWMVp3Vmxack9XaFNWRVo2VmpJMWMxWnJNWFZVYWxKWFlsUkdSMXBWWkU5U2JVWklVbXhPVGsxdFpEVldNblJUVXpGTmVGTnVUbGRpYXpWVldXdGtVMVF4YkhKV2JtUlZZa1p3ZWxaWGRFOVdNREZXVFZST1ZXSkdjSEpaVmxwUFVteGtjMVpzY0ZoVFJVbzJWMVJDWVZZeVRsZFNiR3hvVWxSc2NGVnROVU5UVmxsNVpFZDBUbEpzY0hwV01qVlBWakpHY2s1V1pGVldlbFpVVmtWYVdtVlhUWHBoUmxKVFRVWndTRmRzVm10U01WVjNUVWhzYUZKR1dsbFphMXBoVmpGU2MxZHRkRmROV0VKS1ZsY3hkMVV5UmpaV2JFSlhZbFJDTTFSc1ZURlNNV1J6WWtkd1UxWlVWbGRXUmxwaFZqQTFWMVp1VWs5V2F6VllWVzB4VTFOV2NGWldWRlpYVFVSR1NGa3dWalJYUmxwelkwZG9ZVkp0VWxCVmFrWjNVMGRPU0dKR1RtaE5NRXBLVm0weE1HRXdNVWRVV0d4VFlURndUMVp0TVRSVk1XeFZVMnBTV0ZKdGVIcFdWM2hyVkdzeFYySkVWbHBsYXpWeVdWUkJlR05yTlZaalJtaG9UVmhCZWxaclpEUlRiVlpZVW10a1YySkhhRzlVVjNNd1RVWmFjbFZyZEZaTlZtdzBWbTAxVDJGV1NuTlhiVGxWVmtWS1RGWnJXbUZTTVdSeldrZDBhVlpzY0RaV01uUmhZVEZrU0ZOc1ZtbFNhelZXVm1wT1UwMHhWWGhYYlVaVVVqQTFTRmRyWkc5Vk1ERlhZak5rVjJKSFVYZFhWbHBhWlVaa2RWVnNWbGRTVm5CWlZsZDBWMWxXU1hoalJtUmhVbGhTVkZsclZURk5SbFowWTNwR1ZrMUVRalZaVlZaclZqSktSMk5JUmxWV2JIQkhXbFZrUzFJeVJrZFViV3hUWW10S1ZsWXhZM2hPUjFGNFlrWmtXR0pzU2s5V2JuQnpWakZXZEUxV1RrNVNiRXBZVm14U1YyRkZNVlpqU0hCYVRVWktTRll5YzNoVFJsWjFZMFprVTAwd05EQldiWEJMVXpBMWMxTnVUbUZTVkZaWVdWUk9RMVJzV25STlNHUnNVbXMxTUZaV2FITldWMFY0WTBoQ1ZtSllVak5aTUZwell6SkdTRTlYZEU1V2JrSkpWakowYjJReFVuTlhXR1JPVmtaS1lWbFVSa3RoUmxweldrVmtUMkpHY0RGVmJYaGhZVlpKZVdGR1ZsZGlXR2hvVm1wR2ExTkdVbkpoUjNSVFlYcFdXVmRYZEdGa01XUnpWMnRXVTJKWVFrOVdiWGgzVTBaWmVXVkhSbFZOVm5CWFZHeGFjMWRzV1hwVmEzaGhWak5vV0ZreWVHdGpiSEJIWVVaT2FXRXdjRWxXTVZKRFdWWlJlRlZ1VG1GU1ZuQlZXVmQ0UzFkR1VsZGFSa3ByVFZkNFdWa3pjRWRYUmtwelkwUkdWMUo2UmpOV1ZFcExVbTFPU0U5V1pGTmlWVEUwVm14U1MxUXhXWGhYYmxaVFlrWktiMWxyVm5kVlJscEhWMjEwVmsxc1ducFphMXBoVmpGYVIxZHNiRnBpUmxwaFZGZDRWMlJIVWtoUFZtUlhZa2hDV2xkV1ZsZFZNVmw0VjJ4b1ZtSkdTbFpaYkdodlUwWnJlVTFXWkZOTlZrcDZWa2N4YjFSc1dqWmhla1pYWWxoQ1RGcEVSa1psVmxKWllVWlNhRTFzU2xWWFYzUnJZakpHUjFadVRtaFNWVFZYVkZaYVMxWXhXblJOVldSb1RWWndlbFp0Y0ZOV01rcFpWRlJHVjJKWVRqUlpla1pQWTFaR2MxcEdaRTVOYldjeVZtMHdkMlZHVFhsVmEyUlhZbXhhVlZsclpGTlVNVlowVGxWT1ZGWnRVbGxVVmxKVFZqQXhWbUpFVWxkV2VsWk1WbXhrUzFkWFJrbFJiR1JwVjBaSmVsWlljRWRaVmxwWFZHeHNhRkpVYkZSWmJGcExUbXhhY1ZOdVpGcFdiRlkxVlRKNFYxVXlTa2hsUjBaWFlXczFWRlJVUmxwa01XUnpWR3hrYVZJeFNYZFdSM2hyVGtaWmVWTnJXbWxOTW1oWVdWZDBjMDVHYkRaVGEyUllVbXMxZVZZeU1YZFdSazVHVTJ4d1YySlVWak5WVnpGWFVqRmtjMVpzVW1sU01VcDRWMWQ0WVZNeFNYaFhiR2hzVWpCYWIxWnFRbmRYUmxWNVRsZEdWMDFyV25sVk1uaHZWbTFXY21ORk9XRldWMUpNVld4YWEyTXhVblJpUjJ4b1RVaEJNbFp0ZUdwa01sWklVMWhvV0dKSFVuQlZiVEUwWTFaV2NWUnNUbGRTYkhBd1dsVmtSMWRHV25OU2FsSllWMGhDU0ZacVJrdGpNazVIV2taV2FWSnNjRkZXYWtKclVqSk9jMVJ1Vm1wU2JIQnZWRlpvUTFOV1duRlJiVVpyVFZWd01GWkhkR3RXVjBZMlZteHNWbUpHV2pKVVZWcGhZMVpLZEdSRk5WTk5SbkExVmtkNFlXSXhXWGxUYmtwUFYwVmFWMWxzYUc5VVJteFdWMnhPV0ZKVVZsaFdSekYzVmpKS1IyTkVVbGRXUlhBelZsUkdVMk5yTVZkaFJscHBZbXRLYUZadGVHRldhekZYVjFoc1RsWlhVbEJaYTFaM1pXeHNWbGRzWkZkTlZtdzFXVlZXVjFZeVNrZFhia3BYVmtWRmVGbDZSa3RrVms1MFpVWk9hR1ZzV2xaV01WcFRVakpTZEZac1pGaFhSM2h4Vld4Vk1XTldVbGRXYm1SVVVteGFNRnBWWXpWWGJGcHlZMFp3VmxZemFGQldiRnBoVmpGa2RHRkhSbE5pU0VKWVYyeFdZVmxYVG5KUFZtUllZWHBXYjFSVVFrdFRNVnAwWkVkd1RsWnNiRFJXTW5SdlZrZEtjazVZUmxaTlJscG9WMVphWVdSSFZraFNiRTVPVm10d05sWnFTbnBPVmxsNVUyeGFXR0V5VWxaVVZscFdaVVphVlZGWWFGTldiSEJhVjJ0YWEyRldXa1pUVkVKWVZqTkNURlZxUmxwbFJuQkpWbXhPYVZZemFGWldWekUwWkRGa2MxcEdhR3RTTTFKd1ZGWmFkMU5HWkhKaFJrNXBVbXMxUjFrd2FFOVdNa3BIVTI1d1YwMXVhR2hhUlZWNFZsWkdjMWRyTlZOU1ZuQmFWakZrZDFReVNYaGFSV2hUVjBkb1dWbHRlSGRYUmxaMVkwVmtWRTFZUWtaVk1uTTFWVEpLVm1ORmFGWk5ha1o2V1ZWVmVGTldSbkZWYkdScFVqRkplbFpYY0Vkak1WcHlUbFpzVldKSGFGbFZNRlpMWlVaYVdHVkhPVlpOYTFwSVZtMDFUMkZHU25KT1ZtaGFZVEpSZWxSWGVGZFdNVlp5V2taYVRsWlhkM3BXYWtvMFlURmFkRk5zVmxKWFIyaFlXVlJHZDJGR1duUmpla1pYWWtaS2VsbFZaRzloUlRGSlVWUktWMkpIVVhkWFZscEtaVVp3UmxwSGNGTldNbWhWVjFkNGEwNUdaRWRYYmtwWVlraENUMWxyV25OT1JtUnlZVWQwVjFaVVJsaFZiWEJYVm1zeGRWVnRhRnBXUlZwTVZtcEdUMk14Y0VkalIyeFhVbFp3VmxZeFpIZFNNV1IwVlZob1dHSnJjSEpWYWs1RFZERmFjVlJ0Y0d4V2JIQlpWRlZTUjJFd01YSmpSV2hYVFdwV1ZGbFZXa3RqTVdSMFVteGtUbEl5YUVWWFZFbzBWakpOZUZwSVRtRlNiV2hVVm10a05GZEdXa1ZTYlVaVVRWWktNRlV5ZUhOaFJrcFhVMnhvVlZaNlZrUlZhMXB6VG14S2NtUkdUazVXV0VJMlYxWldhMUl4VlhoYVJWcFVZa1pLV0ZWdGVHRlhSbVJYV2taT1YwMVdjRnBaYTJRd1ZUSldkR1ZHV2xkU2JWRjNXa1JHVDFZeFpITmhSM1JVVWxSV1dWWkdaREJrTURGSFkwWmFhRkpWTlZsWmJGWlhUa1pyZDFWck9WaGlWVnA1VmpJMWQxZHJNWEZTYTJoV1lXdGFNMVV3WkV0U01WSnpXa1UxVG1KWGFFcFdiVEV3V1ZaWmVWSlliRk5YUjNoVVdXMXpNVlpzYkZWU2JtUnFWbXhhZVZadE5XdFhSbHB6WTBoc1YySllhR2hXUjNoaFpFZFdSMkpHVmxkaVJtd3pWbTEwWVZNeFdsaFRhMlJxVW01Q1QxVnFSa3RUVmxwMFRWaHdiRkl4U2toV2JUVlhZVlpLZEdGR2FGWmlSbG96VkZkNFlWZFhUa1prUmxwT1lYcEZNVlpYZUc5a01rWlhVMjVTVm1KclNtRlpiR2hUVkVad1ZsZHRkR3BOVjFJd1drVmtOR0ZIVm5KVFZFSlhWa1Z2ZDFsVVJsWmxWazUxVkcxd1UySklRbWhXYlhSWFVtMVdSMk5GVmxOaVIxSllWRlpvUTFOV2NFWlhiRTVvVm10d1dGWXhhSGRXTVZvMlVXcE9WVlpzY0doVmFrWnJZekZrY2s5V1pGZFdSbHBoVmpGYWEwMUdUWGROU0doWFYwZFNXRlpyV21GWFJscDBaRWhrVGxKdVFrZFdNbmhQVm1zeFYyTkdiR0ZUU0VKRVZtcEJlR1JXVm5OaFJtUlRVbFp3U1ZkVVNucE9WbGw0V2toU2FWSnJOVmhVVkVwdlYxWlplRmt6Wkd4U1ZGWkpWVEZvYjFkSFNuTlhia1pXWWtaVmVGa3llSE5qYkZwVlVtMTRWMkpXU21GWFZFSmhZVEZhV0ZOclpHbFNSa3BYVkZjMVUwMHhXblJsUm5Cc1lrVmFlVmxWV25kV01VcFhZMFZvV0dKR2NISldSRUV4WXpGV2RWUnNWbWxTVkZaMlZrWmFhazVWTlZkWGJrWlVZbTFTVTFSWGMzaE9SbFY1WkVkMFZrMXJjRWxaVldSdlZtMUtTR0ZGVWxkV1JWcFVWbTE0WVdSR1NuUmtSbVJwVW14cmQxWnRNSGhsYXpWWFYyNUtUbGRGY0hGVmJHUTBWMFpXZFdOR1pGaFNiSEI1VjJ0V01HRnJNWEpPVlhCV1lsaG9NMVpxU2t0U01rNUdZVVprVTAweWFHOVdhMUpIV1ZkU1IxTnVTbUZTYkZwd1ZqQmtiMWRXV2tkV2JVWnJUVmRTZWxZeWRHdFdNa3BaVVd4Q1YySllUalJVYTFwV1pVZEdTRTlXYUZOTlJuQTJWbXBKZUZJeFdsZFhXSEJTWVRBMVZsWnRlSGROTVZweFVtMUdhbFpyV25wWGExcHJWR3hLUmxacVdsZGhNbEV3Vm1wR1ZtVkhTa2RoUm1ScFlUTkNWbGRXYUhkU01WbDRWV3hrV0dKVldsZFZiWGhoVjFad1ZtRkhSbWhOUkVaNVdUQldhMVl4V1hwaFJYaFhZV3RHTkZsNlJrOWpiVlpIV2taa2FWSllRa1pXYkdoM1V6RldkRlpyWkdwU1YzaFhXV3hrTkZaR1duTmhSVTVyVFZad1NGWnRNRFZWYXpGV1RsaHdWMkpIYUhwV1IzaGhVakZPZEU5V1ZsZGlSbFkwVmxSQ1lWZHRWbGhVYTJSaFVtMW9jRlpzYUVOWlZtUlhWbTEwYVUxWFVucFdNbmh2Vm0xRmVtRkdaRlZXYkhBeldWVmFkMUpzY0VkYVJrNXBWbFJXU1ZaclpEUlVNVlY0VjJ4a1YyRnNTbGhaYkdodlYwWmtWMWRzU214U2EzQXhWbGQ0WVZkR1NYaFRibVJYVmpOb2FGVjZSbXRXTVdSMVZtMXdVMVl4U2xaV1JscGhXVlphYzFac2FFNVdWMUp2V1Zod1IxZFdjRlpoU0dSWVlrWndXRll5ZUVOV01VbDZZVVYwWVZaV2NISlpla1poWXpKR1NHRkhhRTVoYlhRMlZtcEdZVmxXV25SVldHeFhZVEpTYUZWdE1UUmhSbFowVGxWT1ZVMVdXbmhWTWpBMVYwWmFjMk5GYUZkaVdHaHlWa2Q0UzJNeVRrWmlSbHBwVWpKb05sWXhXbUZUYlZaMFVtdHNWR0pWV2xoVVZFWkxWRlphY2xkdFJsZGlWbHBJVmpJMVMxVkdXbkpqU0VKV1ltNUNlVnBYZUd0WFIxSkhXa1phVGxac2NEWldha1p2WXpGYWRGSlljRlppUjFKWVdWUkdZVlJHVlhkWGJrNXJVakZhUjFReFdtdGhWa3B5WTBSV1YxWkZiRFJWYWtaVFpFWktjVmRzWkZoU01VcFpWMWQ0VTFJd01IaFdiRlpVWVRGd2MxVnROVU5TTVZsNVRWaGtWazFWY0ZoWk1GcGhWakpLV1dGR1pGVldiSEJvVldwS1QxSnRSa1pPVm1Sb1pXeGFZVlp0TUhoT1JteFdUVlprWVZORmNHaFZhMVpMVjFaV2RHUklaR3hXYkhCNldWVm9hMVl5U2xaV2FsSmFUVVphZGxkV1drcGxiVVpGVTIxR1UxSllRazFXVnpFMFZqSk5lRlJ1VG1GU1ZGWndWV3hvUTFSc1duUmxSMFpXVFZWV05GVXhhSE5XUjBweVRsWmFXbUV4Y0ROWlZWcFRWbFpPYzFSdGFGTmlSWEJaVjFaV1YxUXhaRWRYYmxaU1lrZFNZVlpzWkc5amJGbDVaVWRHYWsxcmNFWldiVEZIVmpGWmVXRkdWbGRpV0ZKb1YxWmFZV05yTlZkaVJtUnBVMFZLV1ZadE1ERlJiVlp6VjI1R1VtSkdjSE5WYlRGVFYwWnJkMVp0T1doTlZYQjZWVEo0VTFaV1drWlhhM1JoVm14d2FGWnNXazlqVmtaMFlVVTFWMkpZWTNoV2JUQjRUa2RKZUZkc2FGUmlhelZWV1d0V1lWZEdVbFphUmtwT1VteHdTRll5TVVkV01WcHlUbGhvVmxaNlJucFpWbHBQVW14T2RGSnNaRTVXYTNCUlYxWlNSMWxXU25KTlZscG9Vak5vVkZadGVIZFhSbHAwVFVob1ZrMXJOWHBXYkdoellrWktWMk5JU2xWV2JGb3pWRlZhVTJNeFpITlViR1JPVm01Q1YxWnRNVEJWTVZsM1RWaFdVbUV4U21GYVYzUmhWRVpXY1ZKcmRHcE5hMXBKVlcxNFQxUnJNVVpqUkU1WFlsUkNORlJyWkU1a01ERkpZVWRHVkZKWVFscFhWM2hUWXpGYVYxVnNhR3hTV0ZKWVZGWmtOR1ZXV25SbFJUbFlZa1p3ZVZrd1dtOVhhekZJWVVWb1YwMXFSa3hXTVZwWFkxWlNjMVpzWkU1TmJXY3hWako0WVdFeFVYaFViR1JoVTBaS1ZGbFljRmRXVmxaelZteGtUMUpzY0hwV01qRkhZVlV4VjJKRVVsZFNlbFpRVmxSR2ExTkhSa2RXYkhCcFYwVXhORll4V21GVk1XUklWR3RrWVZKc1dsUlpiWFJMVTJ4YVIxZHNXazlXTUZwNlZqRm9hMVJzV2taT1ZscGFZVEZ3YUZaclduTldiR1IwVW14a2FWSXhTWGhXYlRFMFdWWlNjMWR1VG1wU2ExcFlWbTB4VWsxR2NFaE5Wa3BzVm1zMWVWWXllR0ZoVmtwWlVXeHNWMUp0VVRCVmVrRjRVakZrZFZSc2FHbFNWRlpVVmtaYVlWTXhUa2RYYTJoc1VqQmFXRlpxUWxkTk1XdDNXa2M1VjFac2NGbFdWbEpEVm1zeGRXRkdVbGRpV0dob1ZteGFTMk14VW5OVWJXeG9UVVpaTVZadGVHRmhNREZHVGxWa1dHRXlVbGxaYTFwM1ZVWmFjMVpVUmxoV2JYaFpXa1ZXTUdKSFNrZFhibXhYWWtaS1dGWnJXbUZrUmxaMVlrWndUbEp1UWxWV2JGSkhXVlpKZUZwR2JHbFNiVkp2V1ZSSk5HUXhaRmRWYTBwT1ZtczFTRlpYZUhOaFJrbDNWMnM1VlZaNlZuWldNVnByVmpGd1JWVnNVazVoTVhCSlZtcEpNVkl4Vm5OYVJXaG9VbXh3VmxadGVHRlhSbEp6VjI1T2FtSkdjSGxhUlZwM1ZqRmFSbGRyY0ZoaVJscFlWbXBHWVdNeFpIVlZiRnBZVWpGS2FGWnRjRTlVTURWSFkwVmFZVkpYVWxWV2JYaExaV3hyZDFwSE9WVmlWWEJIVm0xd1QxWXlTbGxoUm1oYVZrVmFWMXBWV25kU01YQkhXa2RzYVZKdVFuWldiR1IzVkRGVmVGcEdaRmRpYkVweVZXcENZV05zV25SbFNHUlhUVlpzTlZremNGZFdiVVkyVW14a1YwMXVhSHBXYWtaTFpFZEdTV05HY0ZkV2JrSk1WMnhqZUZJeFRsZFNiazVZWWxkb2IxcFhlRnBsVmxsNFdrUlNXbFl3VmpWV1JtaHpWVEpGZVdGR1JsZGhhMjh3Vm10YWMyTXlSa2hqUjNoVFlrZDNNVmRVUWxkTlJsSnpVMjVTVm1KdGVGWldiVEZ2VTBac1YxZHJkRk5pUlRVd1ZXMTRkMkZGTVhOVGJGWlhWa1ZLYUZwRVJrcGxSbkJKVm0xR1UyRjZWbFZXUmxaaFkyMVdWMWRZYkd0U2JWSllWRlphZDJWc1dYbGpSMFpvVm1zMVNGWXllR3RXVmxwelkwZG9WMVpXY0ZoV01HUlhVMVprZEdWR1pHaE5NRWt5VmpGYVYxbFhTWGhYV0dST1YwVTFWVmxZY0ZkWFJscDBaVVYwVkZKc1dUSlZWbEpIWVdzeGNtTkZhRmROYWtaSVZsUktTMVl4VG5WaFJtUlRZbFpHTTFkclVrZFRiVlpIVm14c2FGSnNjRzlVVjNoTFpHeGFSMWRzV2s1V2EydzBWbXhvYjJGR1NqWmlSMFpYWWxoU00xWnFSbE5qTVZweVQxWm9hVkp1UWxsWFZFSlhWVEZaZVZOclpGZGhiRXBYVkZWYWQwMHhWWGRhUlhSVVVqQndTVmxyV2s5aFYwVjNWbXBXVjJKWVFraFpWRUY0VWpGV1dXSkdWbWxoZWxaM1ZrWlNTMDVHWkVkaVJtaHFaV3RhVmxSV1dtRmxiR3hXVjJzNVYxSlVSbGhXTW5oaFZteFplbFZ1U2xwV2JWSk1WVzF6TVZZeGNFZGFSazVPVFZWd1RsWnFSbUZXYlZaSFZHdG9WMkV4Y0ZoWmExcDNWMFpzYzFkclpFNU5WMUpZVmpKNFlXRXdNWE5YYTJoWVlURndlbGRXV2t0a1ZrWnlUMVphYUdFelFqSldha1poV1ZaSmVGZHVUbUZTTTBKUFZteG9RMWRHV2tkWGJHUnBUVmQ0V0ZVeGFIZFdiVXBIVjJ4a1dtRXlVblpWYTFwVFZsWktkR1JHYUZOTlZuQklWa1JHYTJNeVJsZFhiR1JZVmtWYVdGbFVSbmRrYkd3MlUydGtVMDFWTlZwWk1HUnZWa1pLVm1OR2FGaFdiVkkyVkZaa1UyTXhaSE5hUm1ocFlsWktWVlpHWkRCWlZrNUhWMnRvVGxaRlNsWlpiRlozVWpGcmQxcEZaRmROYTNCSVdUQm9ZVlpzV2taWGJHaFdUVVp3V0ZreFdtdGpNVTUwWVVVMVRtSlhhRmhXYlRCNFRrWmFjazFXWkZOWFIyaG9WVEJXWVZVeGJIUmpla1pYVW14YU1GcEZaRWRYUmxwMFZXNXNWMkpVVm5KV2JURkhUbXhLY2xwR2NFNVNhM0JSVm0xd1FtVkhUbGRUYmxacVVteHdXRnBYZEdGVVJtUnlWV3QwVkUxVmJEVlZiWFJyV1ZaSmVXVklRbFppUjJoRVZHdGFZV014Vm5KVWJIQlhZWHBXTlZaR1dtRmhNVnBYV2tWb1ZtSkdjR0ZaVkVaV1pVWnJlV1ZJVG1wTlYxSjVXa1ZhYjJGV1NuVlJiSEJYVWpOb2NsUlZaRWRTYXpGWFlVWmFhRTF0YUZoWFYzaFRWakpPYzFkdVNsZFhSMmhZV1Zod1YxWXhXbGhsUm1Sb1VqQldNMWt3V2xkV01rcElWR3BTVmsxcVJsaFdha3BQVW14a2RHTkdUbWhOTUVwUlZteGtORmxYVVhkTlZtUllZa1phVkZsclpGTldiRkpYVm0xR2JHSkhlSGhXUnpFd1lVWmFjbU5HYUZaTmJtaFFWbXBLUjJOdFRrZFZiRnBzWVRGd1dWWnRlR0ZTTWs1MFZXdGFVRlp0VW5CV2JYUjJUV3haZUZkc1pGcFdiRVkwVmxjMVQxZEdaRWhWYkVKWFlURmFURlp0ZUhOV1ZrNXpWRzF3YVZKc2EzbFdWekV3VFVaUmVWTnNXbGRoYkhCaFZteGtVMU5HV2xWU2JIQnNWakJhUjFadGVHdFZNa3BKVVc1c1YySkdTa2hWZWtaclVqRldjMkpIUmxOV1IzaFpWbTB4TUdReVVuTlhibEpzVW0xU1lWWnFSa3RYUmxwellVYzVWMDFyV1RKWmExcFBWMjFGZVZSVVJsVldSVnA2V1RKNFlXTXhVbk5YYld4VFlsaGplRlp0ZUdwTlZsVjRWMWhvV0dKck5WVlpWRVpMVjBaV2MxZHVaRlpTYkhBd1dsVmFUMkZ0U2taT1ZFSldZbGhOZUZaVVFYZGxWMFpHWlVaa2FFMVlRbGxYVmxKTFVtMVdTRk5yWkdGU2JXaFpWVEJXUzJSc1dsaGtSMFpyVFZkU1dGbHJhRXRXTVZwR1YyeFNWbUpZYUV4YVZWcFhWMGRXUms5V1pHbFdXRUpZVjFkMFUxWXhaRWhTV0doWVlXczFXRlpxVGs5T1JsWjBaVWQwYTFac2NIcFdNbk14VmpKS1NWRnNTbGRpUm5CeVZHdGtVMlJHVmxsaVJsSm9UVmhDV0ZkWGRHRmtNazVIVjFoa1lWSjZiSE5WYlRGVFYxWlNWMVZyVG1oTlJFWkdWVzAxZDFkc1drWk9XSEJhVm14d1RGWnRNVTlTTVVweldrZHNVMDFWVmpOV2JGSkhXVlpzV0ZWcldrOVdiWGhXV1d4a2IyTkdXbk5oUlU1WFRWZFNXVnBGV2s5V01ERllWV3RvVmsxdVVtaFpWM2hQVW0xT1NGSnNjRmRTV0VKVlZtMTBZVll5VGxkU2JGWlhZa2RvV0ZsclZuZE9iR1JWVVcxR2FVMVdWalJXTW5SclZrWmtTVkZzYUZkTlIyaEVWV3RhWVZKV1RuSlBWM0JvWld4YVMxWXlkR0ZaVjBaWFUyeHNVbUp0VWxoVmJURlBUa1phVlZKck5XeFNiSEI2Vm0xNFMyRkZNWE5UYm1SWVZqTlNWMVJXV2xwbFJtUnlZVWQwVTFkR1NtaFdiWGhUVWpGT1YyTkdXbGRpYXpWWldXeFdWMDVXV2toalJrNVhZWHBHTVZsVlZtdFpWbHB6WTBST1ZrMUdWVEZXYWtwSFUwZEtSMVJyTlZOU2ExbDZWbTF3UzAxR1ZYaFVXR2hYVjBkb1ZsbHJaRzlXUmxsM1drUlNWbFpzY0hwWlZWcFBWakZLYzFOc2FGZE5hbFpvVmtkNFlXUkdWbk5YYkZwT1ZqSm9lVlpyVWtkWGJWWkhXa2hPWVZJd1dsUldiVFZEVmxaa1YxWnNXbXhTTVVwSVZtMDFWMVpYU2xaWGJGWldUVVphVEZWc1dtRmpiRnAwVW14V1RsWnVRalpXYkdNeFV6RmFTRk5zV2xoaGVteFhXVmR6TVdSc1ZuUmxSMFpYVFZkU01GcEZaRzlVYkZwVlZtcGFWMVl6YUhaWlZFWldaVlpPYzFac1pHbFNiSEJaVjFkMFlWWnRWa2RXYkZaVFlsaFNjVlp0Y3pGbFZsRjRXa1JDVmsxcmNFcFZWM0JUVmpGYWRGUnFVbFZXVm5CeVZXcEdUMk15U2tkVGJHaFRUVzFvV1ZacldtRlpWbXhYVm10a2FWSnNXbFJaVkU1VFkyeFdkR1ZGZEU1V2JIQXdXbFZhVDJGR1dYZGpSWEJXVm5wV2RsWXdXbUZrUmxKeFZHeFdhVkl4U2sxWFdIQkhWVEpTVjFkdVVtbFNhelZZVmpCV1MwNVdXblJOVkZKb1RVUldTRlV5ZUd0WFIwcElZVVU1VjJFeGNFeFpha1p6WXpGYWRWcEhlRmRpV0ZGNlZteGtNRTFHWkVoU2FscFRZV3RhWVZac1drdGhSbGw1VFZWMFYxWnJjSGxhVlZwclZHeEtkVkZ0T1ZoaE1YQnlWa1JHVDFOR1VuSlhhemxYVFcxb1VGWnFRbGRTTURWSFYyNVNhbEpZVWxCVmJYaEhUbFpXYzJGSE9XaGlSWEJZV1RCYVIxWXlSWGhXV0doWFVrVmFXRmw2U2tkU01WSnpWV3MxVjJKSVFsaFdiRnByVFVkRmVWSnNhRlJoTVhCUVZtMHhVMWRHVm5GVWJFNVZVbTFTV0Zac2FHOVdSa2w0VjJ0a1YySllhR2hXYWtGM1pERk9jVmRzWkZkTk1taHZWbTF3UjJFeFNuSlBWbVJvVWxSc1dGbHJWbmRYVmxwMFpVWk9WMDFWY0VoV01XaHpZV3hLV1ZWdFJsZGlXR2hvV2xaYVUxWXhXblJTYldoT1ZsaENXVlpxU2pSaE1WbDVVMjVXVW1KdVFtaFZiWGgzVmpGd1ZsZHRSbXBoZW14WVZUSXhjMVV5Vm5Sa1JGcFhUVzVvV0ZaVVJscGxSbHB5V2taU1dGSXphRmhYVjNocllqRmtSMVZzV21GU2F6VnlXV3RrTTAxc1ZuUk5WRUpZVW14d01GcEZVbUZYUjBWNFkwWlNWMUl6YUV0YVZ6RkhVbXhrYzFwR1pHbFRSVW8xVmpGYVUxSXhVWGxVV0doVlltczFXVmxyV2t0alJteFpZMFprYVUxV2NEQmFWV1F3Vm1zeFdGVnJhRnBoTVhCMldWUkdTMUpzVG5OVmJGcHBWMGRvYjFaR1ZtRmpiVkY0WTBWc1ZXSkdXbkJXYkZwM1RsWmFjVkp0T1doTlZtd3pWRlphYTJGc1RrWlhiRnBYWWxSR1ZGVnFSbmRTVms1eldrWk9hVkpzY0RaV1ZFbzBZVEZTY2sxV1dtcFRSbkJZV1d4b1ExSkdiRlZUYTNCc1ZteEtXbGxWWkVkVk1rcEhZMFpTVjJKWVVtaFhWbHBTWlVaa2RWSnNUbWhOTVVwV1YxZDBZVmxXWkZkaE0yUlhZbGhTYjFWc1VrZFdNVnAwWTBkR1dGSXdWalZXUm1odlZqSkZlVlZyWkdGV2JIQllXWHBLUjFJeFduUmhSVFZZVWxWWk1sWnRNWGRSTVd4WFZsaHNWVmRIYUZoWmJYaExZMnhXZEdONlJsVk5WbG93VkZaU1QySkhTa2RpUkZaaFVsZFNTRmxXVlhoV01VNXhVV3hrVTAweFNtOVdiRlpoV1ZaS2NrNVdXbEJXYkhCd1ZXcEtiMVpXV2xsalJXUlhUVlp3V0ZWdE5VdFpWa2w1WlVoQ1ZtSkdTbGhXTUZwYVpWZFNTRTlXVms1aE1YQlpWbXBLTkdJeVNrZFRiR1JZWWtkNFlWWnFUbE5OYkhCRlVtMTBWMDFYVWpCYVJWcFRWVEF4UjJORmRGZGhNbEV3V1dwR1dtVkdUbk5hUjNCVFlURndXVlpYTVRSWlYwWkhZa1JhVTJKWVVsaFVWbHAzVFZaV2RHVkZPV2hXYlZKSFZUSTFkMVl5U2xsaFJtaFhZbGhPTkZacVJtdGpNV1J6WVVkc1UxZEZTalZXYTFwaFlXczFWazFJYUZaaVIxSllXV3RWTVdJeFZuTlZhMlJPVW14d1dWUnNWVFZYYkZweVRsVndWbFl6VWxSV2FrWkxWakpPUjFGc1pHbFhSMmhWVjFSS05GUXlVa2RUYmtwUFZtczFUMVJYTVc5VFJscDBaVWRHV2xZd1ZqVlZiR2h2VmxkS2NrNVdVbGROUjFKVVZtdGFjMlJIVWtsYVJuQlhZbGhvV2xkVVRuZFNNV1JIVTI1T1ZHSkhVbGxaVkVaV1RWWmFjbGR0Um1wTmF6VktXVlZhWVZZd01IaFRXSEJYWWtaS1NGVjZSa3RqTVZKMVZteGthVkl5YUZsWFYzUnZVVEpXUjFwSVRsZGlXRkpYV1d4YVlWZEdXa2hPVlhSb1VtdHdlVlV5ZUc5V1ZscEdWMnQ0V21GcldtaFpla1pYWTIxU1NHSkZOVmRpU0VFeVZtMHhOR0l5UlhoYVJXaFRWMGRTVUZacVNtOVpWbXhWVW0xR1RrMVdjSGhWYlhoTFlrWktjMk5HY0ZwV1ZuQllWbXBLUm1WR1pGbGpSbVJYWld0R05GWlljRWRoTVU1SFZHNUthRkl5YUZWVmJUVkRZVVprVjFWclpHdE5iRnBZV1RCV1YxVnNXa2RYYkdoWFlsaFNNMVJWV25kU2JHUnpWR3hhVGxadVFscFhhMmgzVVRGWmQwMVlWbFppUjJoWVZXdFdkMVZHYTNsamVrWlVWbTVDU0ZZeU1YTlZNV1JHVTJwT1YyRXhjSEZhVlZwV1pVWlNXV0ZHWkdsU2JIQlVWMVpTUzFVeVRrZGlTRXBYVmtWYVdGUldXbmRUVm5CR1ZtcENXR0pHY0ZaVmJYUnpXVlphVjFkdWNGZE5ha1pIV2xaYVUyTldWbk5YYXpWcFlsZG9TVll5ZUdGWlYxRjRWR3RhVUZadFVtOVZha28wVmtaU1ZsVnNTbXROVm13MVdrVmFUMVpGTVZkV2FsSlhVak5vZGxaVVJtdFRSMVpIVW14a2FWSXlhRlZXYlhSaFpERmtSazFXVmxKaGVteFVXV3hhUzA1V1duUk5TR1JQVm14YWVWUldWbGRWTWtwSVpVWm9WMkZyTlZSV2ExcHpWbXhhV1ZwSGRFNVdWRlkxVjJ0V1lWbFdVbk5UV0d4b1VtdGFXRmxVUmt0VFJsWjBUVlprV0ZKck5YbFdNbmhUWVZaYVYyTkdRbGRXTTBKUVdXcEdTMk14WkhOYVJtaHBWMFpLZGxaR1dsWk5WMVp6Vm01T2FGSXpVbGRVVjNSM1ZteGFkR1ZHWkZkTmEzQklWbXhvYjFac1drWlhia3BhVFZad1NGcEdXbE5qTVZaeldrZG9iR0pHV1hwV2FrbzBWakpGZDAxVlpGaGhNbEpWV1cxek1XTkdjRmhrUjBaWVZteHdNVmt3Vm10aVIwcEhWMnhzVlZac1dtaFphMXBoWTJzMVYyTkdjRTVTYmtKNVYxWldhMUp0VVhsVWEyeG9VbTFTV0ZWc1ZuZGlNVnB4VTFob1ZtSldXa2hXYlhoellXeEtkVkZyT1ZWV00yaE1WbTE0WVZJeFduUmtSVGxUWVROQ1dWWnRNVFJoTVd4WFUxaHdWbUpHV21GWlZFWmhWMFpTVlZKc1pHdFNWRVpHVlcxNGExVXlTa2xSYkdoWFVqTm9XRlpVUm1GV2F6RlhXa1pvYVZKcmNGbFdiVFYzVWpGTmVHTkdaRmhpYlZKVVdXeFZNVk5HVlhsamVrWldUVlp3TVZWV2FHOVdNa1p5WWtSU1ZXRXhjRk5hVlZwTFYxZEtSMVZ0YUU1aVYyaFhWakZhVTFNd05VZFhiazVwVTBVMWIxVnVjSE5XVmxKWFYyeGtUazFYZUZkV2JGSlhWakZhVlZKc1pGZGlXRUpZVmpJeFJtVkdaSEpsUm1oWFlrWlpNRlpVUW10V01VcHpWMjVPV0dKSFVuQldiWFIzVGxaYWMxVnJkRTlTYTNBd1ZsWm9iMVpIU25OVGJFSlhZbFJXUkZaRVJuTlhSMUpJVW14b1YySklRa2xXYlRCNFRVWmFjazFXYUZaaVIyaFlWVzV3VjFkR1duRlRhMXBzWWtWYWVsWkhlRmRXTURCNVlVVXhWMVpGU21oWlZFWmhWakZTYzFac1RtbFNhM0JRVjFkMFYyUnRVWGhYYmtwYVpXdGFWRlJYZEdGV01WSlhZVVpPVjJKVmNFZFViRnBoVmpKR2NrNVZVbUZXTTJoVVZtMTRhMlJXVW5SalJUVllVbFZ3U1ZacVNqQmhNREZIVjFoc1ZHSnJjRlZaVkVaM1YwWmFkRTFWT1U5U2JFcDVWMnRXTUZVd01WWk9WbkJhVmxad2RsbFdaRVpsUjA1SVQxWmtWMlZyU1RCWFYzQkhXVlpKZVZKWWNHRlNNRnBVVmpCV1MyVnNXblJsUms1WFRWVTFXRmRyYUV0WlZrcFlWVzA1VjJKWWFETldNRnB5WkRGV2NrOVdhRk5pUjNjeVZteGpNVk14V1hsU2JrcHFVbGRTYUZWclZuZFhSbFY0VjJ0a2FrMXJOVWxhVldSelZqSkZlbEZyYkZkaVZFVXdWMVprUjJOck5WZGhSbEpwWVhwV1YxZFhkR0ZrTVZwellrWldVbUp0VW05VmJYaExWMVp3Vm1GSGRGZGhla1pZVlRKNGExWXlTbGxSYTFKWFZrVmFhRmw2Um10ak1rcEhWbXMxVjAxRVJUQldiVEV3V1Zac1YxZHVTazlXYkhCV1dXdGtiMkl4YkZWUmJrcHJUVlp3U1ZwVldtRlVNVnB5VGxWb1drMUdXblpaVjNoTFkyczFWazlXV21sV1JVVjNWMnhhWVZkdFZraFNhMnhoVW14YVQxWnRlRnBOVmxwVlVtMDVhazFXY0ZsVk1qVlBWMGRLU0dGR2FGcGhNWEJNVmpCYVYyTXhaSFZVYkdST1ZtNUNOVll5ZEd0ak1rWlhVMnhXVjJKSGFGaFpWRXBTWkRGYVJWTnJXbXhXYXpWNVdWVmtORlpHVGtaVGJHUlhVbXh3Y2xscVFYZGxSMHBIVm14T2FFMHdTbmxXUmxwclZUSldSMWR1VWs1V1YxSlhWRlphZDFac1duUmpSV1JZVW14d1IxVXllR3RXVjBwSFZtcE9ZVkpGUmpSV2JYaHJaRWRTUjFSc2FGTldXRUpXVm0xMFlWWXhXWGhpUm1oV1lrZFNXRll3Wkc5WFJteHlXa1pPVmsxV1NsbGFWVlpyVkRGS2RHVkliRmROYWxaUVZtcEdXbVF5VGtWU2JGcFhaV3hhVFZadE1IaFNNazUwVkd0c1dHSkdXbkJWYlRWQ1pXeGFXR05GWkZaTmJFcEhWR3hhYjJGR1NsVldiR2hWVmtWYVIxcFZXbUZqYkZaeVdrZHNUbFpzV1RGV1Z6RTBZVEZrUjFwRmFGWmlSM2hoVm1wT1UyRkdXWGhYYms1WFZtdGFWbFZYTVRSaFZrbDRVMnBTVjFadFRYaFpWRVpoVWpGa2RWTnNhR2hoTUhCb1ZtMTRhMVV3TUhoWGEyaHFUVEpvVkZadGVHRmxSbHBJWlVjNVYwMXJjRWhaTUZKTFZqRmtTVkZyVG1GV1ZuQmhXbFZhYTJNeVNraGpSazVwVTBWS00xWnRNWGRUTWtsNVZteGtXR0pHV2xOWmJGWmhXVlphYzFWc1pHeGlSbkJJV1ZWak5WWXlTbFpqUkVaV1ZqTm9hRll5ZUdGU2JFcFpZVWRHVTFKV2NGbFdiWEJIWkRGT1NGVnJaRlppVjNoVVZtMTRjMDVzV25OWk0yUk9WbXN4TkZkcmFFdFViRnBZWVVaa1dsWkZjSFpaVlZwaFpGZE9SbHBHVms1WFJVcGFWMnhXWVdFeVJYaFRiRlpwVW0xNFlWUlZaRk5sYkd4WFYydDBhMVpyV25wV1IzaHJWRzFLYzFOdE9WaFdNMEpJVm0weFYxWXhXbk5pUjJ4VFlraENkMVpYY0U5aU1XUkhWMjVTYWxKWVVsZFVWbHBoWld4WmVXVkdaRlppVlZZMlZsZHpOVmR0UlhsVmJGSlhUVlp3TTFVeFpFOVNNWEJJWVVaa1RsTkZTa3hXYkZwclRrZFJlRmRZYUZoaGJIQlVXV3hrYjFkR1VsaE9WVGxQVW01Q1NGZHJWbXRXUmxwelUyNXdXbFpXY0hKWlZscGhWbFpLV1dOR1pFNVdNVWw2VmxaU1FtVkdTWGhhU0U1b1VteGFXVlZxUmt0VlZscDBaVWRHVkUxcmJEUldNalZQVmpKS1ZsZHVTbGRpV0doWVZHdGFZV1JIVGpaV2JGcG9aV3RhTlZaSGVGZGlNV1J5VFZWb2FGSldTbGhXYWs1dllVWlNkRTFWZEZOaVZscElWakp6TVZVeVNrbFJhelZYVFZkU00xVnFTazVrTURWWlZHeGFhV0V6UWxKV2JYaFRWakZhUjFWc1dsaGliVkpWVkZaYWQxWnNWWGxPVjNSV1RVUkdXRmt3YUhOV1ZscFlZVWhhVjJFeVVreFdiR1JMVTBkR1IxZHRiRk5OVlc5NVZtMXdRMWxYVVhoYVJXaFdZVEo0VmxsclZURlhSbHB5Vm0xR1UwMVhVbGxhUldSSFZUQXhWMk5JYkZWV2JGcG9WakJhYTFOV1JuTmFSMFpYVFRGS2IxWnNWbUZXTVZwWFVteFdVbUpZVWs5V2JYaDNUbXhhVlZOWWFHcE5Wa293VlRKNGExWkhSWHBoUm1oWFlsaG9URlZyV2xkalZrNXlaRWR3VGxacmNEWldha28wVmpKR1JrMVZiRkppVkd4WVZXMTRZV05zVW5KWGEzUlhUVmRTZWxsVlZUVldNREZIWTBoYVYxSnNjSEpXVkVaUFVqRmFXV0pIY0ZOV1IzaG9WbTB4TUdRd01VZGlSbHBZWVhwc1dWVnFRbUZsVmxsNVpFWk9WMDFyVmpSWk1GWnZWakF4U0ZWc1VsWk5SMUpRVldwR1UyTnJOVmRVYld4WFVqSmplRlp0TVhkU01rbDVWVmhvVmxkSGFGaFdNR1EwVmxaWmQxcEVVbGRpUjNnd1dsVmtSMWRHU25SbFNHeFhZbGhSZDFsWE1VdFNNa3BGVkd4a1RtSnNSak5XYTJSNlpVWmtWMUp1U21oU2JrSllWbTAxUTFSV1duSlZhMHBzVW10c05GWkhOVTlXVjBwSlVXMDVXbFpGTlVSYVZscGhWbFpPY1ZWc1RtbFdhMWt3VmxSSk1WVXhVWGhYYms1VVlrZG9XRmxyV2t0WFJsWnlWMnh3YkZZd05VZFdSekYzVkd4YVZWWnJjRmRXUlc5M1dXcEdVMk14WkhOaVJrcHBVbFJXVjFadE5YZFNNVnBIWTBWb2JGSnVRbk5XYWtaaFUxWnJkMXBFVWxaTlJFWlhWakZTUjFZeVNraFZXR1JhWld0d1NGVnRjM2hYVmtwMFlrWk9XRkl5YUZsV01XTjNUVlpGZVZac1pHcFNiSEJaV1cweFUxWkdiSE5XYlVaVFRWWndTVmt6Y0VkV01ERkZVbXhrV2sxR1dtaFdNRnBoWXpGT2MxRnNXbGRTVm5CUlYxaHdSMVV5VG5SVGEyUlhZbGRvYzFsc2FHOVdWbHB5VjIxd2JGSlVWa2hWYkdodldWWk9SbGRzVGxwaVdFMTRWbXRhVjJSSFVraFNiR2hYWWxaS05WWnRNREZoTVZwMFVtcGFVMkV5VWxoVVYzQlhWMFphZEdNemFGZE5WMUo2VlZkNFlWWXdNSGxhTTJ4WVlURktURlY2Umt0a1JrNXlXa1phYVZZemFGcFdWM0JMWWpBMVYxZHVUbFpoTURWaFZtMHhORll4VW5OWGJYUm9WbXMxU0ZVeU5VTldiVXBIVjJwT1dtRnJXbFJXTUdSVFUxWlNjazlYYkZOaWEwWXpWakZTUTFZeFVYbFNhMmhVWVRGd1VGWnNaRzlYUmxKWFdrYzVhbUpHY0hwV2JHaHJZa1phYzFOdWFGZFNNMmhvV1d0a1JtUXlUa1ZYYkdSWFRURktiMVpYY0VkaE1VbDVWR3RhV0dKWVFsUlpWRTVEVlVaYVdHVkhSbXROUkVaWVZqSjRWMVV5U2toVmJGcFZWbXhhV0ZSVVJsSmxSbVIwVW14a2FWWllRa2hYVkVKdlVURmFWMWRxV2xOaVJrcFhXbGQwWVZkR1duTlhhMlJxWWtoQ1NWbHJaSE5XUmtwV1lucEtWMkpZVW5KVVZWcFNaVlpLYzFwR1VsaFNNVXA0VmxkNGIxRXhaRWRXYmxacVVsWndUMVZ0ZUZkT1ZuQldWbFJXVjFKc2NIcFZNalZ6VmxVeFYyTkZlRmRTZWtaTVZqRmtSMUpzVm5OYVJUVnBZVEJ3UmxZeGFIZFNNVTE0VTFob1ZHSnJOVzlWYWtKaFZrWlpkMVpyZEZkU2JIQklWbTE0YTFkc1dYaFRiR2hZWVRGd1dGWnJXbXRUUjBaSFlVWldWMVpyY0VsV1ZFWmhXVlprU0ZacmJGVmlSMUpVVkZWb1EwNXNXbkZUYWtKT1VteHdlbFl5ZEdGaGJFcHpVMnhrV2xZelVtaGFWbHAzVmpGYVZWSnNaR2xXYTNCS1YydFdhMk14V1hoWGEyUllWa1ZLV0ZSV1pGTk5NVlkyVTJ0YWJGSnNjREZWTW5NeFYwWktWMk5JWkZkV00xSllWWHBHYzFZeVNrbFRiVVpUWVhwV1ZsWlhNREZSTVU1SFYxaHNUMVl6VWxkVVZsWjNaVlpaZVdORlRscFdiSEJaVmxaU1ExWXhXa1pTYWxKWFlXdHdVRlV4WkVkU01rWklZVVUxV0ZKVmJEVldiVEUwVlRGTmVGVllhRlZoTWxKV1dXdGtOR05HVm5OVmJrNVhVbXhLV1ZwVlZqQmhWVEZZVld4c1lWWldjSEpXTW5oYVpVWktjVlZzY0doTmJXaE5WakZhWVZNeVVrZFdibEpRVm14YVdGWnFTbTlOYkdSeVZXdGthRTFYVWxsV1IzUnZZVEZLY2s1V2FGcGhNWEF6VmpKNFlWSldTblJqUlRWWFlraENTVlpxU2pSWlZsRjRWMnhhVDFadGVHRldhazVUVFRGc1ZsZHRSbGhTTURFMldWVmFUMkZXV25KalJXaFhZbFJGTUZkV1dscGxWbHAxVlcxNFUxSldjRmxXYlhSWFdWWmtSMWRyVmxOaE1sSnhWRmQwYzA1c1pISmFSRkpXVFZWd2Vsa3dXa3RXTVZsNlVXdDRWMVpGY0ZCV2FrWlhZekZhYzFWdGFHbFNXRUpTVmpGa01HSXhSWGhUV0doaFUwVndXVmxzYUZOaU1WSlhWbTVrV0ZKc1ZqVmFWVlUxVjBkS1ZsZHViRnBOUjJoTVZtMXplR1JYUmtaYVIwWlRVbFp3VFZkclZsWk5WbGw1Vkd0b2FGSXlhRTlVVlZaM1ZERmFkR05GY0d0TmJGcElWbGMxVTFZeVNuSk9WbWhhWWxob1RGbHFSbGRqVmxKeVZHMXdVMkpZYURWV2JUQjRVakZTZEZOclpGaFdSWEJYV1d4b2IxVkdiSEphUlhSVFRWVTFNVmxyV210Vk1sWnpWMnRXVjJKSFVUQldNakZYVmpGYWRWTnRkRk5pU0VKWlZsZDRWMlF4VWxkWGJHUmhVa1pLY1ZSVlVsZGxiRnBZVGxaa1YxWXdjRnBaVldoRFZqSktXVlZxVGxaTmJtaG9Xa1ZWZUZKV1NuTlhhelZYWVROQ1NsWnNaRFJpTWtsNFYydG9WR0pyY0ZsWmJGWmhXVlphY1ZSc1RteGlSa3A1VmpJMWExVXlTa2hWYWtaWFVqTm9kbFpVUm1GU01XUnpZMFpvYUUxV2NGaFhiRlpoVmpKT2NrMVdXbGhpUjJod1dXeG9iMWRzV25GUmJUbFNUVlphU0ZsclVtRldSMHBJVlc1S1ZtSllhR2hhVmxwelZteGtkR1JIYUZkTlNFSklWMVJDWVdJeFdYaFRiazVVWVRKb1YxcFhkSGRUTVhCV1drVTVVMkpIVWpCWlZWcFBZVlphY21ORVdsZE5WbkJVVmtSR1ZtVkdaSFZVYld4VFVtNUNWRlp0ZEZkWlZscEhWbTVHVW1KVldsaFVWbHBoVFVaU1ZsVnJaRmROVlhCNldUQmFhMVpYU2tkWGJFSlhUVzVvYUZWdE1VOVNhemxZVW14a2JHRXhjRTVXYkZKSFlURlJlRlJyYUZaaE1sSldXVmh3VjFkR2JITlZia3BzWWtad01GUldVa05XYXpGWFVtcFNWMDFYYUhKV1IzaGhWMGRHUjFkc2NGZFNWemgzVm1wQ1lXTXhaRWhWYTFwclVteEtUMVp0ZUhkT1ZscHpXa1JDVlUxcldsbFZNblJ2WWtaT1NHRkdaRlZXZWxaVFdrUkdhMVl4Y0Vaa1JsSlRWa2Q0VjFadE1UUmhNa1pYV2tWYVZHRXhXbGhaVjNSaFZqRndWbHBGT1dwaGVsWllXV3RrZDFVeVNsaGhTR1JYVmpOQ1NGVjZSazlXTVhCSlUyeG9hVkl4U2xCV1Z6RXdaREZPVjFadVVtcFNNRnBoVm0xMGQxZEdXWGxsUjNSWFRXdHdNVlZYTlhkWlZrcHpZMFprWVZaV2NHaFpNbk0xVmpGT2RHSkdUbXhpV0U0MFZtMTRhbVZGTlVoVFdHaGhVbGRTV1ZZd1pEUldNV3haWTBWa1YwMVdjSGxXYlRGSFZsWktjMU5xUW1GV1YyaHlWbXBCZUdOc1pISmFSbFpPVm14V05GWnNVa3RUTWs1elZHNU9hbEp0VWxSWmEyaERZakZhYzFWcmRGTmlWbHBJVmtkNGMxbFdTblJoUm14V1lXdGFURmxxUm1GWFJURkpZVWRzVGxacldUQldNblJ2VWpGVmVWSllaRTlXYldoWVdXdGFTMU5HVm5SbFNFNXFZa1p3TVZkcldtRlViRnBaVVd4b1YyRnJjRE5XUkVaaFkyc3hWMXBHYUdsaVNFSnZWbTF3VDJJeFdrZGhNMnhzVW1zMWNsWnRkR0ZsYkZWNVpVZDBWV0pWY0VkWk1GVjRWakpLUjJOR1VsWldSVnBMV2xaYVQyUldVbk5XYld4VFltdEtXRll4V2xOUk1sRjVVbXRrVm1KR2NHOVZiRlV4VmxaYWRHVkZaRTlTYkhCWldrVmtNR0ZHU2xWU2JHUlZZa1phY2xadGMzaFhSMFpKVjJ4b1YySklRazFXYlRGNlRWWmFjMVZ1VGxkaGVsWllXV3RvUWsxc1duTmFSRUphVm14c05WWlhlRzlXVjBWNVlVaE9WbUpVUm5aV2ExcGhZMnhrY21OSGVHbFNia0kwVmxSS2QxVXlSa2hUYkdSWVlUSm9XRmxzYUZOa2JGcDBUVlYwVkZJeFdraFhhMXAzWVZaYVJsZHNWbGhXUlc4d1ZqSXhVbVZHY0VsVGJHaG9aV3hhVUZadGVHOVJNVTVYVjJ4b1RsSkZXbUZXYlRFMFZqRlNWMVp0T1dsU2EzQllWako0YTFZeVNsVlNiRkphVFc1b1YxcFdaRmRTYkdSMFpFVTFWMWRGUmpOV2EyUTBXVlpWZUZkWWFGaFhSMmhWV1ZkNGQxZFdXbkZVYlRsWVVtMTNNbFZ0ZERCVk1ERnlZa1JhV21FeVVuWldWRUY0VWpKT1IySkdhR2xTTVVZelZtcEplRll5VFhoalJXeFVZa2RTY0ZaclpEUmxSbVJZWlVaa2FrMUVRalJaVkU1clZqSktWV0pHWkZaaVdHZ3pWV3BHV21WVk5WWmtSbVJvWld0YVNWWnFTakJOUm14WFYyeGthbEpGTlZkWmJHaHZWa1p3UjFkck9XdFNNRFZJVmtkNGExUnJNWFJoUlRGWFlXdGFkbHBFUmtkamF6RlhXa1pTYUUxdGFGVlhWM1JoWkRGYVIySklUbFppUjFKWVZtMTRkMlZzV25OVmEyUldZWHBHV1ZaWE5XOVdiRm8yVm14Q1YxWkZXa3haTW5ocll6SktSMkZIYUU1V2JUazJWbTE0YTJWdFZrZFRiazVoVTBaYVdGbHJXbmRVTVZwMFpVaGtUbUpHY0ZwWk1GWXdWa1V4Vms1VmFGZGlWRlpNV1ZaYVMyUkdWblZSYkhCcFVqSm9NbGRyVWtkaE1WbDRXa2hPWVZKck5VOVpXSEJYVG14a1dHUkhPVk5OVm5CWlZUSjBiMVp0UmpaaVJtUmFWak5TUjFwVldsWmxWMVpJVW0xMFUwMUVWa2hXYTJRMFdWWlZkMDFXV21oTk1uaFlWbTB4VW1ReFVuSlhiVVpUVFZkU2VsWXljelZXTVZwVlZteHdXRlp0VVhkVmVrcFhZekZhZFZOc2FHaE5iRXBhVmxjd01WRXhTWGhoTTJSWVlUTlNWbGxyVm5kWFZtdzJWRzA1VjAxV2JEWldWekZ2Vm0xR2NtTkdVbHBsYTNCTFdsZDRkMU5IU2tkVWJHUm9UVEJLVmxadE1IaGtNVTE0Vmxoc1ZtRXlVbGxaYTFwaFZURnNWVlJzVG1wV2JFcFlWMnRTVTJKR1duUmxSbVJYWWtaS1dGbFZXbUZqYlU1SFlrZEdWMVpzYjNwV2FrbDRWakpPYzFOc2JHaFNiSEJ2VkZkNFMxTldXblJOVkZKVVRXeEtSMVJzV210V2JVcElWV3hvVjJFeGNHaFZiRnBoWTFaT2RWcEdTazVoZWtVd1ZsUktNR0V4VlhsVGEyaG9VakpvVjFsWGN6RlNSbXQzVjIxR2ExSXhXa3BXUjNNeFZHeFplRk5xVmxkaGEyd3pWR3hhWVZKck1WbFViRkpwVWpGS2FGZFdVa2RaVmxwSFdrWmtXR0V6VWxoVVYzTXhVMnhXZEdWSVpHaFdiVkpJVlRGb2QxWXhTblJWVkVKYVRXcEdXRll3V2xOamJVcEhZVWRzVjFadVFsRldiVEUwV1Zaa2NrMVdaRmhoTVZwVVdXeFNjMVl4VWxoa1IwWllVbXhzTkZsVlpEQlhSa2wzVjI1c1YwMXVhSHBXTW5oaFVteEtXV0ZHV21oTldFSTJWMVJLTkdReFNYaGpSV1JXWWtVMWNGVXdWa2ROTVZsNFZXdE9hRTFFUmtoWGExWnJWa2RLY21OSVJsWmhNVlY0VmpGYVlXTldVbkpVYkZKT1ZtdHdXRlpxU1RGWlYwcEhVMWhrVDFaWVFsaFdhazV2VlVac1YxcEZXbXROYXpWS1YydGFhMVl3TUhkVGEyeFhUVlp3Y2xaRVNrNWxSbHAxVTIxb1UwMXVhRlZXUmxKRFV6RldWMWRyWkZkaVZWcFZWRlphVjA1R2JISmhSV1JYVWpCd1dsWlhlRmRYYlVWNFYyeG9WVlpGV2xoYVJWVjRVbFpLYzJOR1pFNVRSVXBKVm0wd2VHUXhVWGhYYmxKWFltdHdWVmxyV2t0WFJscDFZMFZrVkUxWVFsaFdNalZyVlRKS1ZrNVZhRlpOYmsxNFZsUkdZV1JXUmxsaFJtUm9ZVEZ3VlZaVVNYaFdNVWw0V2tac1lWSlVWbGhXYWtwdlYwWmtXR1JIZEU5U2JIQllXV3RvVTJKR1NYZFhiRlpWVm14d2FGWnRlRlpsVjFaR1QxWmFUbEpGV2xwWGExWlRWakZhV0ZOclpGaFhSMUpoVm10V2QxUkdXblJqZWtaWVZqQmFTRmt3Wkc5aFJUQjNVMnBXVjJKWWFISmFWekZYVTBaU2MyRkdVbWhOVm5CVVYxZDBiMUV5VGtkV2JrWlRZVE5TVlZadE1WTmxWbGw1VFZWa2FFMUVSbGRaTUZadlZtMUtWVlpzVWxwaE1YQkxXbGN4UjFJeFZuTldiR1JwVTBWR05sWXllRmRaVjBWNVZHNU9ZVk5HU2xGV2JYaDNWREZzV1dOR1pGUmlSbkJXVlcwd05XRnJNVmRTYWxKV1RWZG9lbFp0TVV0WFIwWklVbXh3YUUxWVFtOVhWbFpoWkRGS1YxTnVWbFZpV0VKd1ZUQldTMU5XV1hsa1IzUnBUVlpLZWxaSGRHOWhSa3BHVGxab1ZWWnRVblpVVkVaelZsWktjbVJHWkU1V2JrSTJWMWQwWVZNeFdYaFRiazVxVW14YVdGWnVjRVprTVdSWFZsaGtiRkl3Y0VwV1J6RkhWVEpHTmxac2NGZFdNMmhVVm1wR2ExWXlSWHBhUjBaVFVsVndXRlpHVmxOU01ERlhXa2hHVldKck5WbFZiWGgyVFd4V2RFNVlaRmRpUm5CSFdUQmFiMVl5Um5KalJrSldZV3R3U0ZWcVJsTmtSMHBIWVVaT2FFMHdTbGhXYlhCSFlUQTFTRkpZWkU5V1YyaFlXVzF6TVdGR1ZYZFdWRVpZVW0xNFdsa3dhRTloYlVwSVpVaHdWMkpVVm5KV1IzaGhZekpPUjJKR1ZsZGlSWEJWVjFaV1lWZHRVWGxVYTJ4cVVteHdjRlpyV21GaU1WcDBaRWQwVTJKV1dsaFdiVFZUWVVaS2RWRnJPVlpoYTFwTVZrWmFZVlpXUm5SU2JIQlhZbFpLV1ZaWE1ERlRNVmw1VTJ0a2FsSnRlRmRaYTFwaFYwWlNkR1ZIUmxoU01VcEpWVzE0VDFSdFNrWmpSRnBZVmpOQ1VGbFVTa2RXTVU1eldrWlNhVkpVVmxsWFZtUXdaREZhUjJFemFGaGlhelZ4VkZaa1UyVnNhM2RhUkVKVllrZFNSMVV5ZEhOWFJscHpWMnhvVlZaWFVrZGFWVnByWXpKR1NHVkdUbGROTW1oYVZtdGFhMlF4V1hoVGEyUnBVbTFTV1ZsVVRrTmpNVlowVFZaT1RsSnNTbGhXTWpBMVlVWkpkMVpxV2xaV00yaDZWbXBHUzJNeFpIUmhSbkJwVmtWYVdWWnRjRWRXTWxKWFYyNU9hRkl5ZUZoVVZFcHZUVEZaZUZwRVFsZE5iRVkxVm0wMVQxbFdTblJoUlRsV1lURmFhRlpxUmxOWFIxWklVbTE0VjJKclNraFdiVEUwVkRGWmVWTnNXbXBTYkhCWFdXeFNRazFXV25GVGEyUnFZWHBXV2xZeWVIZGlSMFY0WTBaQ1dHSkdXbWhXYWtwVFYwWlNjbHBHWkdsV01taFFWbGQwWVZZd05VZFhia3BZWWtkU1dGbFljRWRYUmxWNVpFZDBhR0pGY0VoWk1GcFBWMnhhUms1WVdsZE5WbkI2V1hwR1YyTXhjRWRoUms1cFlUQndTbFp0Y0VwTlZrMTVVMnRvVkdFeVVsbFpWM1JoVmpGYWRXTkZaR3hpUm5CSlZGWldhMkZyTVZaT1ZFWlhZbGhvZGxZd1drOVNiRTV5VFZaa1YwMHdTa1JYYkZaclZHMVdWMVZ1U21GU2JXaHdWV3BLYjJReFpGZFZhMDVyVFd4R05GWXllRzloYkVwWVZXMUdWMkpZVWpOV01GcHpZMjFHUmxwR1pGTmlTRUpJVm1wS2VrNVdXblJUYkZaWFlURktXRlJXV25kV1JtdzJVbXhrYW1KR1NucFdiWGhQWVVVeFYyRXpaRmRpUmtwTFZGWmFWbVZHY0VsVWJHaHBZa1Z3V0ZadGRGZFRNV3hYWWtaV1UySklRbkpVVmxwM1YxWnNObFJ0T1ZaTmEzQllWVEowYzFsV1dsaFZXR1JhWVRKU1IxcEVTazlTYXpWWFdrWmtVMVp1UWxwV2JYUlRVakZKZVZSWWJGUlhTRUpvVldwS05GWkdXbkZUYlRsclRWWndXVlJzYUd0Vk1ERldUVlJTVjJKWWFGaFdhMlJMVmxkS1NWTnNWbGRpVmtZMlZrWmtORmxXVGtoVWFscFhZbGRvV0ZsVVNqTk5SbHBWVTJwQ1YwMVhVa2xWYlRWTFlWVXdlVlZzYUZWV2JIQllWR3RhWVdSSFZrWlBWM0JPVmxoQ05sWXlkR0ZoTVZWNFYyNVdVbUpHY0ZoWlYzUmhZMnhTVmxwR1RtdFNiSEI2VjJ0YVlXRlhTa2RqUm5CWVZqTm9jbFJyWkU5U01rcEpVMnhrYVdKV1NucFhWM1JyVlRGa1YxVnNXbFpoTWxKWVdXeFdkMVl4YTNkaFNHUllZa1p3V0Zrd1dsTlhiRnBYVm1wT1lWSkZXbEJaTWpGVFVqRmtjazVXVGs1aVYyaFRWbTB4TUZVeFNYaFRibEpYWWtkb1ZWbFVSbmRXVm14elZtMUdWVTFXV25oV1J6QTFWVEpLUjJOR2FGZE5ha1YzV1ZWVmVGWnJOVmxqUmxwcFVqSm9lVlpzVWt0VE1WcFhWMjVTVTJKR1dsaFVWRUpMVTFaYWNWRnRSbFpOVm5CNldUQldhMVpYU2toaFJtaGFWMGhDVjFwVldtRmtSVEZWVVcxMFRsWnNXWHBXUmxwaFl6RldkRkp1U2s5V2JYaFlXVmR6TVZaR2EzbGxSMFpxVm10d01WZHJaREJWTWtwR1kwUldXRll6VW1oWlZFcEhVMFpLV1ZwSGNGTk5SbkJaVmxjd2VGVXdOWE5WYkdSWFYwZG9jVlJYZEhkVGJGcFlZM3BXVjAxcldUSldiVFZyVmpGWmVsRnJVbUZTUlVZMFZtcEdhMk15UmtaUFZtaFRUVlZ3V0Zac1kzaE5SbGwzVGxWa1YxZEhlRkJXYlhNeFYxWnNjbGR1WkU1U2JIQllWbGQwVDFkSFNsWldhbEpYVFZaS1JGWnRNVVpsUjA1R1lVWmtUbEl4U2xWV1YzQkxVekZLY2s1V1pHRlNiVkpaVld4V2QxWldXblJOU0doUFVteFdORlV4YUc5V01XUklZVWhDVmsxR1dqTlpNRnBUVmxaT2NWVnNaR2xTTTJkM1YyeFdiMkV5Um5OVGJsSnNVa1ZLYUZac1dscGtNV3hZWXpOb1dGSXhXa1pWVjNoWFlWWktkVkZyTVZoV2JIQnlWWHBHVDFOR1NuSmFSbVJwVTBWS1dWWlhlRzlSTWxaWFYyeFdWR0ZzU21GV2JYUjNWMFpXZEdWR1pGZE5hM0JJVlRKNGIxWXlSbkpYYTNoYVlXdGFjbFpxUm1Ga1IxSkhWV3MxVjFaR1dscFdiWGhxVFZaVmVWTnJaRlJpYTNCVldXMTBkMkZHV25GVWJFNVZVbXh3U0ZZeWVHRmlSa3B6WTBoc1ZVMVdjRXhaVmxwTFRtMUZlbU5HYUZkTk1VcFpWMWh3UjFVeVRYaFViazVYWWtkU2IxUldXbmRoUmxwMFRWUlNXbFpyTlVoWmEyaFRZa1pLVldKR2FGcGhNWEJNV2xaYVlWTkZNVlZWYkdST1lUTkNOVlpVU1hoU01WbDVVMnRvVm1Gck5WZFpWM1IzVTBad1JsZHJPV3BOVm5CNlZqSXhjMVl4U25OalIwWlhUVmRSTUZaVVJrcGxSbEp5V2tkc1UxSnVRbFpYVm1oM1ZqSk5lRmR1VW14VFIxSllXV3RrVTJWV1duUmxSM1JYVFd0d1NWWlhkR3RXYlVwSFUydG9WMkpVUmtkYVZXUlBVbTFHU0ZKc1RteGhNWEJXVmpGU1NtVkdWblJXYmxKVllUSlNhRlZxU2pSalJscDBaRWhrYTJKR2JEUlhhMUpUWVVVeFJWWnJiRmRpVkZaUVYxWmFUMUpyTlZkVmJHUk9VakZLVlZadGVHRlZNVmw1VW10YVZXRjZWbGhaYTJoQ1pERmFTR1ZIUm1oTlYxSkpWVzF3WVZWdFJuTlRiR1JWVmpOQ1dGa3llRnBsVlRGV1drZHdhVlpXV1RKV01uUmhZakpHU0ZKWWNGSmlSbHBZV1ZkMFlXRkdWbkZUYkU1WFRWWmFNVlpYTVhOVk1WcEhWMjVhVjFKc2NIWlZWRUV4VmpGa2RWUnNjRTVOYkVwNlZsZHdRbVZGTlZkWGEyUm9VbnBzYjFsclZuZGxiRlY1VFZjNVYxWnNiekpXYlhoVFYyc3hkV0ZHYUZwTlZuQklXa1ZhUzJOck9WZGFSMnhYWVRJNGQxWnRlRk5UTURWSVVsaG9WbUpyTlZWWmJYUjNZMVpXYzFwRVVscFdiWGhXVlRJd05XSkhTa2hWYkdoWFRXNW9NMWxVUVhoU1ZscHlZMFpvYUUxWVFYcFhWbFpyVWpBMWMxZHVTazVXYlZKVVZGUktiMWRXV2tkV2JVWlhUV3MxZVZSV1dtRlhSMHBaVld4U1ZWWkZjSFphVmxwcll6RndSVkZzVWs1V2EzQlpWbTE0YjJJeFdYbFNhbHBwVW1zMVlWbFVTazVOVmxKVlVtNU9hbUpHY0RCVU1XUnZWakpGZVU5SWJGZFdla1YzVkZWYVlXTXhaSEpYYlhCVVVtNUNiMVpYZEZkWlYxWnpWVzVTYkZKck5YRlpXSEJ6VjFac2NsZHJPVlZpUm5CYVZWZDBhMVl5Um5KalJFNVdaV3RHTkZWcVJuZFNNV1J5VGxaa1YwMVZjRFJXYkdRMFlqRlZlRnBGWkZkaWF6VlpXV3hXWVZkV1ZuUmxTR1JzVm14c05WUldVa05XVlRGWFkwUkdWbFl6VW5wV2JGcGhaRVpXZFZkc1pHaGhNRmw2VjJ4YWExSXhUbGhVYTJSWVlYcFdjRmxVUW5kVFZsbDVaRVpPVkUxV1JqUlZNalZUVm0xRmVWVnNaRnBoTVZveldXcEdjMk14WkhKa1JrNU9WbTVDTmxacVNYaGtNVkY0VjFoa2FsTklRbGhWYWs1dllVWmFjMXBGV210TmF6VkpXVlZhVjFZeFdYaFNXR1JYVmpOb2FGWnFSbHBsUjA1R1lVZDBVMkpGY0hkV1YzaGhWMnN4UjFkc1ZsUldSVnBVVkZaa05GZEdWWGxPVms1b1VtdHdXbGxWWkc5V01rcFpZVVJPVlZaRldtRmFSRVpoVmxaS2MxcEdaR2hOV0VFeVZtMTBhMDVHVVhoVmJsSlVZbXhLWVZSVVNtOVhSbXhZWkVoYVRsSnRlRlpWYlhoTFlUQXhSVkpzWkZwV1ZuQlVWakJhVDFKc1RuTlhiR2hYWWxaRmQxWXhXbUZVYlZaSFYyNVdWR0pHY0c5VVZWSlhaREZrV0dSSGRGWk5iRnBJVm14b2MySkdTWHBWYkZwYVlURmFNMXBXV21Ga1IwNUlVbXhrVG1FelFsZFdiVEF4WkRGa2MxZHFXbE5oTTJoWVdWZDBZV05zYTNoWGEzUnJVbXR3ZWxaSGVHdGhWazVHVTJ4a1YyRnJXbFJWVkVwR1pVWldXV0pHV21oTmJFcGFWMWN4TkZNeVRsZFdia1pWWWtVMVdGVnROVU5YVmxKWFZXczVWV0pHY0RCV1Z6VjNWakF4ZFZSVVJscFdiVkpNVm0xek1WWnNjRWRXYXpWWFlUTkNVbFp0ZEd0T1JrMTRXa1prVjJKcmNISlZiWGgzVjBaV2MxWnVaRlJXYlZKWlZGWlNVMVpWTVZkalNIQlhWbnBXVEZaclpFdFdiR1J5VDFaYWFHRjZWakpXVnpFMFdWWlplRnBJVW10U1ZGWlVWRlZhV2sxR1dsVlNiVGxvVFZkU1NWVnROVTlYUjBwSVpVZEdWMkZyTlZSVVZFWmFaREZrYzFSc1pHbFNNVW8xVjJ0V2EwMUdWWGROVld4U1lUTlNXRmxVU2s5T1JsWnhVbTFHYW1GNlJsZFdNbmhyVmpGS1YyTkdhRmRTYkhCb1YxWmFWMUl4WkhOV2JFcFlVakpvVlZaR1pEQmtNVTVIWWtoS1dHSkZOVzlXYlhoM1UwWlplVTFFVmxkTmExcDVWVEl4YjFadFZuSlhhM2hhWld0d1RGVnFSbmRUUjBaSFZHeG9VMkV6UVhwV2JYaHFaREpXUmsxVldrOVhSVFZaV1d0a2IxVkdXbkZSYlVacFRWZDRlbFp0Tld0VWJFcDFVV3RrV0ZkSVFraFdha1poWTIxS1JWWnRSbGRXYkhCUlZtcEplRk14WkZkV2JGWlNZa1phY0ZWdE5VTk9WbVJ6VjIxR2EwMVZjSGxVVmxwdllVWktkRlZzYUZkTlJscExXbGQ0WVdSSFRrWmFSbkJYVFVkM01GWnNXbTlqTVZwSVVsaHNhRkpzV21GWmJHaHZWRVphY2xkdVRtdFNNVnBIV2tWa2IxVXlTa2xSYkdSWFZrVnNORlJWWkVka1JrNXlZVVphYUUxWVFsaFdiVFYzVWpGT1IxZHVTbUZTV0ZKVVZGWlZNV1ZXWkhKWGJYUm9WbTFTU1ZsVldsZFdNa1p5VTI1S1YyRnJXbkpWYWtaaFpGWmFjMWR0YkZSU1ZYQmFWakZrTkZsV1NuUlZXR2hoVW0xb2NsVnRNVk5qYkd4elYyMUdVMDFXU2xoV01qQTFWakZKZDFacVdsZFdNMDB4VmpKNFdtVnRSa2hoUjBaVFRUSm9lVlpxUW10V01VNUlWV3RrWVZJeWVGaFdNRlpLVFd4WmVGZHNaRnBXYkZZMVZXMTBiMVl5U25OVGJHUmFWa1ZhTTFZd1dtRmtSVEZXVGxVMVYySllaM2RYYkZaV1RsWlplVk5yWkZSaWJYaFhWRmR3UjFOR1draGxSWEJzWWxWYVIxWXllR3RXTWtwSlVXNXNXRlpzU2toV1JFcE9aVVpTYzJKSGJGTk5NbWhXVmxjeE1HUXhXbk5YYmxKc1VteHdUMVpxUmt0WFJteHlWMnhrVmsxcmNGWldiVFZMVmxaYWRGVnNVbUZXYkhCNVdrUkdhMk14Y0VkWGF6VlhZbXRKTWxZeFVrTlpWbXhYVjFoc1UySnJjRkJXTUdoRFdWWmFjbFp1WkZWU2JHd3pWakowTUdGck1YSlhhMnhoVmxad1VGWkhjM2hrUjBaR1RsWmthRTFZUW05V2JGSkhVMjFXVjFOdVRtRlNiRnB3V1ZSR2QxWXhaRmRoU0dScVRXczFXRlp0TlVkVk1rcFdWMnM1Vm1KWWFETmFWM2hyVjFkT1JscEdhRk5pU0VJMlZtMHhkMVF4V25SVGEyUlVZa2RvV0Zsc2FHOVVSbXcyVW10MGFsWnNTbnBaVldSdllVVXhSMkV6WkZkaVIxRjNXVlJHUzJSR1duTmFSM0JUVmpKb2VsWlhjRTlWTWsxNFlrWldVbUp0VWxaWmExcDNWbXhXZEdWSGRGZFdWRVpYVmpJMWQxZHRSbkpPV0VwYVZteHdURlpxUms5ak1WSnpXa2RvYUUwd1NsWldiR2gzVWpGWmVGZHNaRk5pYTNCb1ZXcEtOR05HVm5OVmJHUllVbXh3ZVZkclVrTldSVEZZWlVaa1ZWWnRhRXhXUkVaaFVteE9jMkZHY0dsU01taEZWbGQwWVdNeFdsZFRibEpyVW1zMWNGWnNVbGRTTVZwWVRWUlNWazFXYkRSV01uaFhWakpLZEdWR2FGcGhNWEJvV1RKNFlWSldTbkpQVms1T1ZqRkplRlp0TVRSaE1rWkdUVWhrVkdKR1dsbFdhazVUWVVad1NHTXphRmROVm5CYVdWVmFhMkZXU1hoVGJHeFhVbXhhVkZacVJtdFNNa1Y2V2tab2FXRjZWbGxXYlRFMFl6QTFWMWRzYUd4U1ZHeFpXV3hXZDFOV1dsZGhTR1JhVm10d1IxWXlOVXRXTWtwSFkwWkNZVkpXVlhoV01GcExZMnMxVjFSck5VNWlWMmhaVm0weE5HRXdOVWhTV0d4VVYwZG9WMWxyWkc5V1JteHlXa2M1VjJKR2NIbFdiRkpIVmpGS2MxZHFRbUZTVjFKSVZrY3hTMU5HVm5WaFJscFhaV3hhVVZac1VrZFRNazV6V2toT2FWSnRhRzlVVmxwMlpXeGFjMXBJY0d4U2EzQjZWMnRvVjFZeVNrZGpSVGxYWWxob00xUldXbXRqYkZaeVdrZDBhVlpzY0VwV2EyUXdZVEpHUjFOWWNHaFNiRnBYVkZWYVlWUkdiSEZTYlVacVRWWmFlVlpIZUZOaFIxWnlVMVJDVjFaRmIzZFpWRVpXWlZaT2RWUnRjRk5OYldoWFZtMTRhMVZyTVVkV2JrNVlZa2RTV0ZSV2FFTlRWbkJHVjJ4T2FGWnJjRmhXTVdoM1ZqRmFObEZxVGxWV2JIQm9WV3BHYTJNeVJrZFhiV3hwWVRCd2IxWXhaREJaVm14WVZtNU9WMkpyY0doVmJHUlRWbFphZEdWSFJrNVNiWGg1Vm14U1IxWlhTa2hWYTJSV1RXNUNhRlpxU2tkamJFNXpWV3hrVTFKV2NHaFhiRnBoVmpGa1dGTnJaRlppVjJoUFdXeGtiMVV4V25STldHUlVUV3RzTlZWdGRHdFdNa3B5VjJ4U1dtSkdXbWhaTVZwelkyeHdSMVJzVG1sU2JGa3hWa1phVjJFeVJraFRhMXBwVWtVMVlWUlZXbUZsYkZweFUydDBWRkpzU2xaVmJYaGhZa2RGZUdORk1WaFdSVnB5VlhwR1MyUkdTbkphUm1ob1pXeGFXVmRYZEd0TlJUQjRWMjVPV2sweWFGQlZiWGgzVFVaYWRHUkhPVmRXYlZKSldsVmFRMVl5Um5KVGJXaGFUVVp3YUZreFdsTmtSVGxXVDFkc1UySllZM2hXTW5oWFZtczFXRkpyV2s1V2JYaFRXVlJLYjFkV2JGVlNhM1JZVW0xU1dGWXlkREJWTWtwR1RsUkdWbFl6YUhKV1IzaExZekpPUmsxV2FGZE5NbWh2VjFod1MxVXhTbkpOVm1SWVlsVmFWRlJVUmt0V1ZtUllUVlJDVkUxV2NIcFdNV2h6WVRGSmVsVnNaRlZXYkhCTVZqQmFWMk15Umtoa1JscE9ZVE5DTlZkVVFtdGlNVnAwVTJ0b1ZtSkdTbGRVVlZwM1RURmFjVkp0ZEd0V2JWSXdXbFZhYTJGV1RrWlRWRUpYWWtad2NsUnJXbEpsVmtweldrWm9XRk5GU25aV1YzUmhaREZrUjFWc2FFOVdlbXhYVlcweE1FNVdVbGRXVkZaV1RXdHdWMWt3Vm10WGJVVjVWV3BPVjFJemFFeFZha1pyWTJ4a2MyRkdaR2xUUlVwYVZteGtkMU14VFhsVVdHaFdZbXMxV1ZscldtRmlNVkpXWVVWT2FVMVdjRWhXYlRFd1ZERktjbU5HYUZkaVdHaHlWMVphU21Wc1ZuTldiSEJvVFZad1dWWkdVa2RXTWxKR1RWVldVMkpIVWxSWmEyaERWMnhrVjFac1pFOVNiVkl3Vld4b2MxWnRTa2RUYkdSVlZteHdNMWxWV25kU01YQkdaRVpTVTAxSVFrcFhWbFpoWVRGWmVGZHVVbEJXUmtwWVdXeG9iMk5XY0VWVGJHUlVVbXhLV2xscldsZFhSa2w1WVVob1YxWjZSVEJWZWtaV1pVZEtSMkZIZEZOTlJuQjRWbTB4TkZsWFZrZFhhMmhPVWtaYVZsbHNWbmRUVmxwWVpVYzVXRkl3VmpSWk1GcERWMnhhYzJORmVHRlNiSEJJV1RKNFlXTXhaSE5hUjNocFVtMTNNbFpxUm1GVk1VbDRXa2hTVmxkSFVsQldiVEUwVmtac2NscEhPV3BTYkZwNFZUSXdOVlpzV25SVmJuQllZVEZLVkZsVVFYaGpNVTV6WVVaa1RtRnNXbGxXYlhoclV6RmtTRlpyWkZkaVJuQnZXVmh3VjFaR1pITldiVVpYWWxaYVYxUnNXbk5aVmtsNllVaENWbUpZVWpOVWJGcGhZMnhzTmxKc1NrNVdiSEEyVm1wR2IyTXhXblJTV0hCV1lrZFNXRmxVUm1GVVJsVjNWMjVPYTFJeFdrZFVNVnByWVZaS2NtTkVWbGRXUld3MFZXcEdVMlJHVG5KaVJrcHBVbTVDV1ZadE1IaFVNRFZIVlc1S1lWSlhVbGhVVmxwTFpWWlplV042VmxoU2EzQldWbTE0WVZZeVNsbGhTRXBhWVd0RmVGbDZSbXRqYlVaSVpFWk9WMUl6YURSV2JHTjRUVVpzVjFwR1pHRlRSWEJZV1cweFUxWXhiRmxqUldSVFRWWnNOVlJzV210V01rWTJVbXhvVjAxdWFFUldiWGhhWlcxR1JWTnRSbE5TV0VKTlZsY3hORll5VFhoVWJrNWhVbFJXY0ZWc2FFTlViRnAwWlVaT1VrMVdiRFZXVm1oelZsWmtTR0ZJUmxaaVJuQXpXV3BHVjJSRk1WZFViWEJPVm01Q05GWldZekZoTWtWM1RWWmtXR0pIYUZsV01HaERVMFphZEdNemFGaFNiRnA1VjJ0YWQxUnNTbkpqUm14WFlXdHNORlZxU2s5amF6VlhWMjEwVTJKWGFIWlhWbEpQVVRGYVYxZHVSbE5pVlZwVVZGZDRTMWRHV2xoT1ZrNW9WbXR3VmxadE1EVldWbHAwWVVWU1ZXSkdjR0ZhVlZwclpFWktkR0ZIYUd4aE1YQmhWbXhTU2sxV1RYbFNiR1JVWWtkb2IxVnRNVFJaVm14ellVWk9WVkp0ZEROV01uaHJZV3hhY21OSWNGaGhNVlY0Vm1wS1IwNXNXbGxoUm1oWFVsVndNbGRyVWtkWlZtUkhVMnhzWVZKVWJGbFZha1pMVjBaYWRFMUlhRlpOYXpWNlZteG9jMkpHU2xkalNFcFZWbXhhTTFSVldsTmpNV1J6Vkd4a1RsWnVRbGRXYlRFd1ZURlpkMDFZVmxKaE0yaFpWbTE0ZDFkR2EzbGpNMmhYWWtkU01GcEZXazlYUmtwV1kwWldWMkV4Y0ZoV2FrWnpWMFpXYzFwR1pGaFNNbWhaVjFkNFUxWXlUbk5WYkdSWVlUTlNjMVp0ZUhkVFZsSnpWbXM1VjJKVmNFaFphMUpYVmpGWmVsVllaRmRpV0dob1ZXMTRUMk50VmtkV2JXeFRZbXRLTlZZeGFIZFRNVWw0VTFob1ZtSnJjRkJXYlRGVFZERldjbGRzWkU1TlZuQjVWMnRTUTJGRk1YSldhbEpYVW0xb2VsWnFTa3RUUjBaSFYyeGthRTFXVmpSV2JYUmhWakpTU0ZWcmFGTmhlbFpQVm0xMFdrMUdXblJOVkZKVlRWWndNRlV5ZUdGVU1WcFhZMGRHV2xaRldtaFdNRnBoWkVkV1NGSnJPV2xXVmxreVYxZDBZV0V4VlhoWGJrcHFVbFJHV0ZscldrdFVSbHBGVW1zNVUwMVdXakZXVjNNMVZqRmFSMWRzVmxkaGEwcG9WWHBLU21WR2NFZGhSVFZYVW10d2FGWnRlRk5TTVdSSFdraEtXR0pIVWxoV2FrSjNVakZTYzJGRlpGZGlWVnA1VlRJMWQxWlhTa2RqUmxKYVRXNW9NMVV3WkZOU01rWklZVWQ0YUUxWGQzcFdha1poVmpKR2NrNVdaR0ZUUmtwVldXdGFZVlpHYkhSa1NHUmFWbTE0VmxWdE5XdFdWa3B6Vm1wT1dHRXhXWGRXYTFwYVpESk9SbUpHV21sWFIyaDVWbXRrTkZNeFNYaFViR3hxVW0xU1QxWnFSa3BsYkZweVZXdGtWV0pXUmpOVWJGcHJWMGRLV1ZWc1VsZGlXRkl6VmpCYWExZEZNVWxoUmxwT1ZqTm9XVlpxUm05aE1XUklVbGh3Vm1KcmNHRlpWRVpYVGtaU2NsZHNaR3BOYTFwSldrVmFhMVV4V2taWGFscFhZV3RhZGxwRVJtRldNV1J6V2tab1dGSXhTbGhXUm1NeFlqRkplR05GVmxOaE0xSnlWV3hTVjFkR1dsaGxSM1JYVFVSR1YxbHVjRXRXTURGWVZWUkNWMkZyY0U5YVZWcFBZMnh3U0dKRk5VNWliV2cxVm14a2QxUXhSWGhYYTJSV1lrWndXVmx0Y3pGVU1WSlhXa1pPV0ZKc2NEQlpNM0JYVm0xS1ZsZFVTbHBoTVhCMlZtMTRXbVZ0UmtkaFJtUlRUVEpvVEZkc1dtRldNazUwVm10b1UySkhVbkJWYkdoRFZteGFjbGR0UmxwV2JFWTFWbGQ0YjFaSFJYbGxSbFphWWtaYWFGWkVSbk5qYkdSMVZHczVhVkp1UWtsV2JURTBZVEZTYzFOdVNrOVhTRUpYV1d0a2IyTnNXbFZUYTNSWFZteHdlbFp0ZUd0aFZrcHpWbXBTVjFac1NraFpWRXBQVmpGS2RWWnNWbWxTVkZaVlYxWlNSMlF3TlZkWGJHaE9Wa1pLY2xSV1drdE5SbFY1WlVjNWFGSnJOVWxhVlZwelZqSktXV0ZFVG1GU00yaFhXbFpWZUZadFRraGtSVFZvWld4YVNGWnRNSGhsYXpWWFYydGtWR0pyTlhGVmJGSkhWMVpzY2xkdVpHcGlTRUpaV1hwT2EySkdTbkpPV0d4WVlURndVRmxXWkV0VFZrWjBUMVprVTJKR2NIbFdSM1JoVXpGWmVGZHVUbUZTTUZwVVZGUkdTMlF4V25STlZGSlhUVVJDTkZac2FITlVNVnBWWWtac1dtSkdXbGhVYkZwelZteGtjbFJzYUdsV1Zsa3dWbXBKTVdReFduSk5WbWhXWVhwc2FGVnJWa1psUmxwMFpVWmthMUl3V2toWGExcHJWakpLY2xKcVVsZGlXR2hVVldwR1dtVkdWbGxoUms1cFlYcFdkMVpHVWt0Vk1rNUhWbTVPV0dFelVsZFVWbHAzWlVaVmVXVkZPVmRoZWtaWVZqSTFiMVpzV25OVGEyaGFWa1Z3VEZVd1dsZGtWMHBIWVVkb1RtSlhhRkpXTVdRd1dWWnNWMXBHWkZkaWEzQllXV3RrVTFkR2NGaGxSMFpzVm14d2VGVXljRk5oUlRGV1lrUlNWMUo2VmxoV01HUkxVakZPY2s5V1pHbFhSa2w1Vmtaa05GbFhUbk5qUlZaU1lrWmFUMWxZY0ZkVFZscFlUVlJTYVUxWGVGaFZNbmh6VlcxS1JrNVdXbGRpUm5Cb1dsWmFVMVl4WkhOYVIzQnBVakZLTlZZeWRHdE5SbEp6VTJ0b2JGSnRhRmhaYTJSU1RVWldObE5yWkZkaGVrWlhWbTE0YTJGRk1WZGpSMmhZVmpOU2FGcEVRWGhqTWs1SFYyeG9hV0Y2Vm5sV1YzaFRVakZaZUZWWWFGZFdSVnBYVkZWU1IxTkdhM2RYYm1SWFRWVndSMVl5TldGV01rWnlWMnhDV21WcldsQldNV1JMVWpGa2RHSkhhR3hpUm5BeVZtMTRhMDVHYkZkaVJtUlhZVEpTVjFsclpGTmhSbFp6Vlc1T2FtSkdjREJaTTNCSFZHeEtkVkZzWkZoaE1taFFXVlZhV21ReVRrWmFSbkJPVW14d2VWWnFRbUZaVjAxNVZHdHNXR0pHY0hOWlZFNURWRlphV0dORmRGTmlWbG93VmtkMGExZEhTbGhsU0VKV1RVWmFURlJyV2xwbFJtdDZXa2Q0VTFaRldrcFdiR014VkRGYVYxcEZhR2hTYkVwWVZGVmtVMVpHV25OWGJFNVlVakZhU0Zrd1pEUmhWa3B5WTBab1YySlVSak5WVkVaaFUwWk9jbGRzWkdoaGVsWllWMWQ0VTFGdFZrZFhia3BZWWxWYVdWVnFRbUZTTVhCV1YyNWthRkpVUm5wVk1uaFhWakZhUmxkdGFGaFdiVkpVVmpCYVQyTnRSa2hpUms1T1lsZG9XbFp0TVRSaGF6VklWbXRrV0dKcldsVlpWM2hMWWpGU1YxWnVUazlXYkhCSVdWVm9UMVl4V1hkV2FsWmFWbFp3VkZZeWVGcGxiRlp5WlVad2FHRXhjRmxXYlhoaFZESlNSazlXYUd0U2JWSndWbTEwZGsxc1dYaFhiR1JhVm14R05WVnRkRzlXUjBwSVZXeFNXbFl6YUdoV01GcGhaRVV4Vms1Vk5WZGlTRUpJVm1wS05GbFhTa2RYV0dSUFVrVndXRlZxVG05VlJscFZVMnRhYkZJd2JEWlpNRnByVlRGS1YyTkdiRmRpUmtwSVZtcEtVMUl4VW5OaVIwWlRWa2Q0V1ZadE1UQmtNbEp6VjI1U2ExSXpVbkJaYkZwaFYwWmtjbGR0T1doaVJYQldXV3RhVDFaV1dYcFZhazVXVFZad1YxcFdWVEZXYkZKelYyMXNWMWRGU2xoV2JHTjNaREExVjFkWWJGTmlhM0JRVmpCYWQxbFdjRmhrUjBaV1VteHdNRnBWYUd0V1JscDFVV3RrVldKR2NISlpWbHBoVTBkTmVtRkdaR2xTTVVWM1YxWlNTMUp0VmtoVGEyUm9VbXhLY0ZWdGVIZGtNVnBWVVcwNVVrMVhVbGhaYTFwWFZrZEtSazVXYkZaaVZGWkVWakJhWVdSSFZrWlBWbVJwVmxoQ1dGWkhlRmRqTVZwWFYyNVNWbGRIVWxoWlYzUjNWMFpzTmxKdGRHdFdNRnBJV1ZWa2IxUnNXblZSYWxaWFRWZG9NMVY2UmxabFZsWnlXa1pXYVdKR2NGUlhWM1JYWkRKT1IxZHVTbGhpVlZwd1ZGWmFkMlZHVmxoTlZXUlhVbFJHV0ZVeU5YZFhiVVY0WTBoS1YwMXFSbGhaTW5oclpGWktjMk5HWkZOV1JscFdWbXhrTkZsV2JGZGFSVnBQVm0xb2NsVnRNVzlqUmxaeFVtdDBWRlpzY0ZaVk1WSkhWMnhhYzJOR2FGWk5ibWhvVmtSR1lWWnJOVmhTYkdSb1RWWnZlbFpyVm1Ga01VcHpXa2hLYTFJelVsaFphMXAyWkRGYVdFMVVVbHBXYkVvd1ZUSTFUMVpIU2taWGJHaFhZbGhvVEZWNlJsTldNWEJIV2tkd1RsWnNiM2hXVkVvMFZqSkdXRkpZWkdwU2JFcFlXV3hvUTFSR1dsVlNhelZzVW14d2VsWnRlRXRoUlRCNFUyNXNWMUpzY0hKV1ZFRjRVakpLU1ZOc1pHaE5NVXAyVm0xNFUxSXlWbGRYV0d4c1UwZFNXRlJXVm5aTmJGWjBUVmM1V0ZKc2NIcFpNRll3V1ZaYWRGVnNhRlppUm5Cb1dYcEdWMk5yTlZkVWJHUlRZa2hDV0ZadGNFdE5SbFY0VTFoc1ZWZEhhR2hWYlRGVFYwWnNkR1ZGZEZaV2JIQjZXVlZqTlZZd01WZFRiR3hWWWtad1VGbFVSbUZrUmxaMVkwWndWMVl4U1hwWFZsSkNaVVphY2sxV1ZsVmlTRUp2VkZaYWQxWldXbk5hUkZKWVlsWmFXRlp0TlV0aE1VcHpZMFpvVm1KR1dqTlZNVnByVjBVeFZWVnNWazVXYmtJMlZteGpNVk14V2xoVGJHeG9VbTFvWVZsc2FGTlVSbVJYVjIxR2FrMVlRa3BYYTFwUFZHMUZlR0l6WkZkV1JXOHdWbXBHWVdSR1RuTldiR1JwVW14d2FGZFhlRk5XTVVWNFZXeGFXR0pyTlZoWmExcDNUVlphU0dWR1RsWk5SRVpJV1RCV01GZEdXWHBWYmtwV1lXdGFZVnBFUVhoV01rWklZMGQ0YUUxWVFsbFdhMXBoWVRGVmQwMVlUbFppYXpWb1ZXeGFkMk14V25Sa1NHUnNZa2Q0ZVZZeWVFOVdNREZXWWtSYVdsWldWalJXTUdSTFVqSk9SMkZHV21oaE1Ga3dWbTF3UjFVeVRYaGFTRkpvVW1zMWNGWnRkSGRPYkZwMFRWaGtVazFzUmpSV1IzaHJWMGRLYzFOc1FsZGlWRVpVVmpGYWMxZFhUa1phUjNoVFlsaG9OVmRXVmxkTlJtUkhVMWhrYWxKWFVsWlphMlJ2VjBaWmVXVkhSbE5pVlRWSVZWZDRZVlJzU25WUmF6RllWa1ZhYUZWcVNsTlRSa3B5V2taU2FHVnNXbmRYVjNSWFpHMVdSMWR1VW10U2JWSnZWRmR6ZUU1R1ZuUk9WazVYVWpCd2VWa3dhRU5XYXpGSFYyMW9WMVpXY0ZoYVJtUlBVakZ3UjFWck5WZGlTRUpvVmpGU1ExbFdVWGxTYkdoVVlURndVRll3WkRSWFZsbDNZVVZPVkZKdGVGZFdNblIzWVRBeGNrNVZhRnBoTVhCeVdWWmFTbVZHVG5WaVJtUm9UVmhDZVZaWGNFZFpWMDE0Vkc1V1YySkhVbkJWYlRWRFZsWmFkR1ZHVGxKaVZscElWMnRhYTFZeVNsWlhiRTVWVmpOTmVGVXdXbk5qYkZaMFVteHdWMkV6UWxsV2FrbzBZVEZaZVZOdVZsSmlia0pvVlcxNGQxWXhjRlpYYlVacVlYcHNXRlV5TVhOVk1sWjBZek5vVjJKWVFreFVhMXBXWlVaYWRWVnNVbWxTTTJoMlZsUkNWMU14V1hoVmJGcFlZa1p3YzFWdE1UTk5iRlowVGxVNVYwMUVSbHBWVjNSdlYyc3hTRlZyYUZkU00yaFFWV3BHVDJOdFRrZGhSbVJPVFZWdmVWWXlkRk5TTWtWNFYyNUtUbFp0ZUZaWmJHaERWbFpXY1ZKcmRHaFNiVkpZVmxkME1GWnJNVmRpUkZKYVlUSm9TRlpYTVV0a1JsWnpWbXhrYVZkR1NtOVdSbFpoWXpGYWMyTkZWbEppUm5CUFZXdFdXbVF4V25OYVNHUlZUVlp3TUZadE5VdFhSMHBHVTJ4a1YyRXhXa2RhUkVaM1VsWktjMXBIY0U1V1ZGVjNWMWQwVmsxWFJsZFhia3BxVWxSR1dGbHJXbmRXUmxaVlVtdHdiRlpyTlRGV1IzaFhZVlpLZFZGc1pGaFdiRXBFV2tSS1IxSXhWbk5YYlVaVFVtdHdWbGRYZEdGV01EVlhWV3hrVm1KRk5XOVZiRkpIVmpGU2MxWnRPVmROUkVZeFZWZDRiMVl3TVhGU2EzaFhUVWRTV0ZWdGVGTmpNazVJWWtab1UwMXRhRWRXYlhoVFVURnNWMVJZYUdGU1YxSnhWV3hrYjJJeFZuUmxSWFJYVW14c00xWnRkREJVTWtwSFkwaG9WazFYYUhaWlZFcExWakZLY1Zac1dtbFhSMmg1Vm14a05HRXhUa2hXYTJSaFVtNUNjRll3V2t0VVZtUlZVbTFHYWsxWFVrbFdSM1JoVmxkS1dWVnNhRnBYU0VKWVZqQmFZV05zWkhOVWJFcE9Wak5vV0ZaR1dtOVVNVnBJVTJ0c1VtSkhVbFpXYWs1RFYwWmFWbGR0ZEZkTlYxSXdWVzF6TldGV1NuVlJXR2hYVm5wRk1GcEVTa2RUUmtwWlkwWkthVkpzY0ZwV2JYQlBWVEZrUjFWc1dsaGhlbXhVVkZaYWQwMVdXblJsUlhSb1ZtMVNSMVV5Tld0V01rcFpWVzFvV0ZadFVsUlpla1ozVWpKR1NHVkdUazVOVlhCYVZqRmtORll5VFhkTlNHaG9UVEpTV0ZsdGN6RldNV3h6Vm01a1dGWnRlRmRaVlZZd1ZqSktWbGR1YkZwTlIyaE1WMVphUzFKc1pISlBWMFpYVm01Q1ZWZFVTalJVTWxKSVZXdGtZVkp0VWs5VVZ6RnZVMFphZEdORlpGWk5WVFV3Vm0xMGExbFdUa1pPVm14YVZqTm9NMVpyV25OWFIwNDJVbXhrYVZORlNscFhWRTUzVWpGYVYxTnVVbXhUUjNoWVZGZHdWMVZHV1hkWGEzUnFUVmRTZWxZeWVIZGhSVEZYWWtST1dGWXpVbWhYVmxwaFl6RndSMkpIYUZOaVNFSlFWbTB4TkdRd01YTlhibEpxVWxoU1dGUldaRk5UUmxwSVRsVjBhRkpyY0RCV1Z6VkRWMjFGZUdORVRscFdWbkJvVldwR2QxTldjRWhqUlRWb1pXeFpNbFpxU2pCaU1WRjRWMnhvVkdKR1dsaFpiRkp6Vm14YWNWUnJOV3hTYkZZMFZqSjRhMkV4U1hkT1ZXUlhVbnBHZGxaVVNrWmxSbVJWVW14b2FFMVdjSGhXUmxwaFdWWlplRlJzYkdsU00yaFVWbXhTVjJGR1pGaGxSemxXVFd4YWVsbFVUbTlXTVZwR1YyeFdWbUpHU2xoV2FrWnlaREZrY21SSGJGTk5TRUpJVjFSQ1UxSXhXWGhYYTFwcFRUSlNZVlpxVGs5T1JsbDNWMnQwYW1KVldraFdWekZ6VlRBeGRHRkdjRmRpVkVZelZYcEdWbVZHVm5WVWJXeFRZbFpLV1ZkV1VrdFZNazV6VjI1U2JGSXdXbFJVVmxwM1UwWmFXR1ZIZEdoU2EzQjVXVEJvYzFack1YRldia3BYVFVad2NsVXhXa2RrVms1elYyMXNVMkpyU2xwV2JYQkRWbXMxVjFkdVNsQldiVkpWV1Zod1YyTkdXWGRhUnpsVFZteHdlRlV5Tld0VmF6RnlUVlJTVmsxdVVuSldWRXBMWTJ4a2RWRnNXbWxTYmtKdlZtMXdSMWR0VVhoWGJrcFlZWHBXV0ZsclduZE9WbHB4VTJwQ2FFMXJWak5VVm1oTFlXeEtkR1ZHYUZkaGF6VjJXa2Q0WVZKV1NuTmpSM2hwVWxadmVGWlVTalJaVjBaSVVsaHNVRk5IVWxoVmJURlNUVVpzTmxOc1RsUlNhelY1VmpKNFYyRldXWHBoU0dSWFZrVktXRlY2Um5OV01XUjFWRzFHVTFKVmNGbFdSbVF3V1ZaT1IxcElTbGRpVlZwdldXdFZNVkl4VW5OWGJrNVhUV3RXTkZac2FHOVdNa1Y0WTBST1ZrMUdWalJXYlhNMVYwZFNSMXBGTlZSU1ZYQktWbTE0VTFOdFZraFZXR3hUWWtkb1ZGWXdhRU5WTVd4MFpVaGtXRlp0ZUhsV01qVnJWbXhLZEdWRVFsVldiRnBvV1d0YVlXTXhUblZpUm5CWFZtNUNVVmRXVm10U2JWRjVWR3RzV0dKSFVsaFphMVozVkZaYVIxWnRSbFppVmxwSVZUSjRjMkZXU2xWaVJteFdUVVphVEZacVJtdFdNVlp5VTJzMVYwMVZXVEJXYlRFMFlURnNWMU5ZY0ZaaVJscGhXVlJHWVZkR1VsVlNiR1JyVWxSV1YxcEZXbTlWTURGSFYxUkdWMkpIVFhoYVJFWnpWakZrZFZSdGNGTlNWRlpaVmtaV1lXUXhXa2RoTTJoWVlUSlNjbFZxUW5kU01WSnpWbFJHVjFKcmNGZFphMUpoVmpKS1dWRnJlRlZoTWxKTFdsVmFWMlJXVW5SaVJUVk9ZbGRvVlZZeFpEQlpWazE0Vmxob2FWTkZOVzlWYm5CelkxWlNWMWRzWkU1TlZuQXdXa1ZTUTJGV1NYZGpSV3hoVmxkb2RsWnRjM2hrVjBaSFVXeHdWMkpJUWsxV2FrWmhWakpPYzFkdVRtaFNiVkpVVm10YVlXUnNXbk5oU0dSVVRWWnNORmRyV210aGJFcFlZVVpDVjJKWWFFeFpha1pUVjBVeFdFOVdUbGRpVmtwWlZtMHdlRTFHV25KTlZscFBWbGRvWVZsWGN6Rk5NVnBZVFZWMFUySkZOVEZWTWpGSFZqQXdlRk5yTVZkaE1YQm9WbTB4VjFJeFpIVlRiRUpYWVROQ2QxWlhOWGRqYlZaeldrWm9hMUp0VWxkVVZscDNUVVpWZVdWSVRsZGlWWEJXV1d0YWIxWldXbGRqUjJoVlZrVmFlbFJ0ZUV0a1IxSkhXa1prYVZKWVFUSldiWFJxWlVVeFNGSnNaRmhpUmxwWVZqQmtiMWRXV25GVWJFNVlVbXhaTWxVeWRHdGhNVXB5VGxSR1ZrMXFSak5XVkVwWFpFZFdTRTlXWkdsV1JWa3lWa1phWVZKdFZrZFdiR3hvVW0xU2NGbFljRmRXVmxwSFdrUlNWRTFWTlZoV01uaHZZa1pLVms1WE9WVldNMmhvV2xaYVZtVlhUWHBoUm1Sb1pXdGFXVlpxU2pSUk1WcHpWMWh3YUZKRmNHaFZhMVozVkVaV2RHVkdaR3BOVjFJd1dXdGFiMVV4V2xsUlZFWlhZbFJHTTFWVVJscGxWbFpaV2tVNVYySldTbTlXVkVKV1RWWnNWMk5HYUd0U01GcFdWRlphWVUxR2NGWmFSV1JYVW14d2VsWXljRU5YYXpGSFYyeENXbFpXY0V4Wk1uaGhZMVpTYzFkdGJGTmhNMEphVm0weE1GbFdiRmRYYmtwUFZtMTRWRmxyYUVOalJsbDNWbGhrYkZKc2NFaFdWM1JMWWtaS2NtTkVRbGRXTTFKb1dWZDRTMk50VGtaUFZscHBVbTVCZWxaR1dtRlpWbHBYVTI1T1lWSXlhRTlXYWs1dlYyeGFjMWw2UmxaTlZuQlpWVEkxVDFaSFNraGhSMFphWVRKU1ZGcEhlR3RXTVdSelZHeG9VMVpGV2xwWGExWnJZekpHVjFOc1ZsTlhTRUpZV1ZSS1VrMUdXa1ZUYTJSVFlYcEdXbFV5ZUc5aFZrNUdVMnhvVjFKdFVqTlZiWE40VWpGa1dXSkhjRTVOYkVwNlZsY3hlazFYVmtkV1dHeHNVMGRTVmxsc1ZtRmxWbGw1WTBkR1dGSnNiRFpXVnpWTFZqRktSbEpZYUZkaGExcE1Xa1phVjJSSFJrZFVhelZPVWxoQk1sWnRNSGhPUmxsNFlrWm9WMkpIVWxsV01HUTBZMnhXY1ZSc1RtcFdiRXBaV2xWa1IxZEdTblJrUkU1WFRXcEJNVlpxUmxwa01XUjFZa1phVG1Gc1drVldiWGhoV1ZaS2MxUnVSbFJpUmxwWVdXdG9RMVZHWkhOV2JVWldUV3MxZWxaWE5VdFZSbHBWVm14U1dsWkZOVVJXYkZwYVpVWndTVnBHVWs1aE1Wa3dWbXRqTVZReFZYaGFSV2hXWWtaS1lWbHJXa3RYUmxwelYyMUdhazFXY0ZaVmJYaExWR3haZUZOcVVsZFdiVTE0VmtSR1lWSXhUbGxhUjNCVFZqTm9WMVp0TVRSWlZUQjRWMnhvYWsweWFISlZiWGhoVFZaWmVXVkhkRlZpVlhBd1dWVm9iMWRIU2tkWGJrcFhWbnBHV0ZacVJtRmtWazUwWWtaT1RtSlhhRkZXTVZwcVpVVTFSMVZzWkZoaVIyaHhWV3hrVTFaV1VsaGxSV1JQVW0xNFZsWkhOVTlXVjBwSFkwUkNWMVo2UVRGV01qRkxVakpPUm1WR1drNVdia0pVVjJ4V2ExSXhUbGRWYmxKcFVtczFjRlZ0ZUhKbFJsbDVaRVprYVUxclZqUldNblJyVjBkS1NHRkhPVlpoTVhBelZqQmFWMk5XVW5OVWJGcFRZbGhSZWxacVNqQmhNV1JIVTI1V1VtRXlVbUZVVlZwM1ZFWmFTR1ZGZEZkTmF6VkdWVzE0YTFZeFNsZGpSbXhYWVRGS1NGVnFTazVsVms1WlkwZEdVMDF1YUZWV2JURXdaREZhUjFkdVVtcFNXRkpYVkZaVmVFNUdXblJsUm1SV1RXdFdObFpYTlVkV01rcFZWbXRTVmsxR2NIcFdiWGhoWTFaR2RHSkdUbWxUUlVZMFZteGFhMDVIVFhoWGJHaFVZVEpTVlZsVVJrdFhSbXh6WVVjNVZFMVlRa1pWYlRFd1YwWmFkVkZyYUZwTlJuQnlWbXBHWVZJeFpISldiR1JPWW14S2IxWXhXbUZTYlZaSFdraEtZVkpyTlhCVmFrcHZWVlphZEdWR1RsTk5hekUwVmpJMVIxVnNXa1pYYmtwWFlsaG9NMVZxUm10amJVWkdUMVphYVZaWVFsaFdiVEYzVlRGa2NrMVZaRmhpYkhCaFZtMTRkMVZHVlhkYVJtUlVVakJhU0ZkclpHOWhSVEZIVjFod1YwMXVVbFJWYWtwT1pWWlNjMXBHV21saE0wSjVWbGQ0VTJNeFpFZFhia3BoVWtWS1VGbHJXbmRUUmxwMFpVZDBWV0pGY0hsVWJHaDNWbTFLU0dGSVNsZFdSWEJNVm14YVlXTXhXbk5hUjJ4VFlrWlpNRlpzV2xOU01rVjVWR3hrVTJKc1dsWlphMVV4Vmtac1ZWSnVaRmhpUm13MVdrVmFhMkV3TVZkWGJteFZWbXhhYUZZd1pFdGpNV1J6V2taV1YyVnNXbFZYVkVvMFdWWmFWMVJ1U2xCV2JFcFVXV3RXZG1WR1duTmFSRkpvVFd0YVdGZHJWbUZXUjBwMFpVWm9WMkp1UWxoVVZFWnpUbXhHVlZKc1pFNWhlbFpKVmpKMFlXRXlSa1pOV0U1VVltNUNXRmxzYUVOUk1WSlhWbGhvVTAxV2NERldWekYzVlRKS1YxTnNjRmRXTTJoVVZXcEdZV014V25OaFJUVlRVbFp3V1ZkWGRGZGtNbFpYVlc1T1YySkZOVmxWYlhoelRteGFXR1ZHVGxkTlZtOHlWVzEwTUZsV1duTmpSRTVXWWxSR1VGVnFSazlqYXpWWFZHeGthV0V3V1RCV2JURTBWVEZKZUZkWWFGWlhSMmhVV1cxek1XTkdVbFZUYkU1cVVteGFlbFl5ZERCV2F6RlhZMGhvVmsxdWFGQldhMVY0VmpGa2MxZHNXbGROTVVwNVYxWmFhMU14U25KT1ZtUmhVbTFTVkZSVVJrdFVWbGw0VjJ4YWJGSnJOVWRVTVZwWFYwZEtSMk5HYUdGV00xSm9WRmQ0YTFZeFZuSmFSbEpwVm14d1dWZFVRbGRqTVZsNVUydGtWR0pIYUZoWmJHaFRXVlp3V0dWR1dteGlWVFZIVmtjeGQxUnNXbGxSYTJ4WFlsUkJlRlpVU2tkak1VNVpZMFphYVZJemFGaFhWM1JyWWpGRmVGVnNaRmhpU0VKelZtcEdZVk5XYTNkV1ZFWlhUVlp3UjFZeWRITldNa3BWVWxoa1dtRnJXbGRhVmxwTFpGWk9jMVZ0YkZkU00yaFpWbTB4TUZack1WaFViazVZWVRGYVZGbFVSbmRqTVZweFVXNWtVMDFXVmpWVVZsWnJWbGRLUm1KRVdscFdWbHBvVm1wR1lXTXlUa2xUYkhCWFVsWndVVmRZY0VkVE1XUlhZMFZrVldKWGVGaFZiWGgzVmpGYWRFMVVVbGRoZWtaWVZXeG9iMWxXVGtaWGJFNWFZbGhOZUZacldsZGtSMUpJVW14b1YySldTalZXYlRBeFlURmFkRkpxV2xOaE1sSllWRmMxUTFOR1dYZFhiVVpQWWtWYWVGWlhlR0ZoUjBWNlVXeFdWMVl6UWt4V1JFWktaVVphZFZSdGNGTldSbHAzVm0weE1HUXhXa2RYYmxKT1ZrVktWMVJXV2xkT1ZsVjVUbFU1VjFZd2NIbFpNR1J2Vm0xS1dWUllhRnBOVm5CWVdURmFSMVpXU25KT1ZrNXBVMFZHTTFacldtRmlNa1Y1VW10YVRsWnNjSEJhVjNSM1dWWnNWVkpyZEZoU2JWSllWakl4UjJGdFJqWldhM0JhVFVad2NsWlVRWGRsUms1elVteG9WMUpWY0c5V1YzQkhZVEZKZVZScldsaGlXRUpVV1ZST1ExVkdXbGhsUjBaclRVUkdXRll5ZUZkVk1rcElWV3hhVlZac1dtaGFWM2h6WTFaU2RHUkhhRmRoTTBKWlZsUktORlF4V1hsU2JrcHFVbXhLVjFwWGRHRlhSbkJHV2tVNVUySkZOWGxVYkZVeFZqRmtSbE5yY0ZkaVIwNHpWRlphYzFZeVNrZFhhelZYVmpKb2VsWlhlR0ZaVmxsNFYyNVNUbFpyTlhGWmExcFhUbFp3VmxadFJtaE5SRVpYV1RCU1ExWlhTa2RqUmxKWFlXdGFZVnBXV2xkWFYwNUhXa2RvVG1KRldYcFdiWFJUVXpGUmVGTllhRlJpYXpWdlZXcENZVlpHV1hkV2EzUlhVbXh3U0ZadGVHdGhiVVkyVW14b1YySlVWa3hXTUdSR1pWWldkVk5zY0doTmF6QjRWa1pTUjJNeVRuTlhiazVWWWtad2NGVnRNVE5OVmxweldYcEdVMDFYVWpCVk1uUnJZV3hKZDFkdGFGWmhNVnBvVkZSR1YyTldUbkphUms1cFZtdHdTbGRyVm1GaE1WbDNUVWhzYUZKWFVsaFpiR2h2WTFad1ZsWllhRlJTYTNCNVYydGtSMVV4V25WUmJtaFhWa1ZLVjFSV1dtdFdNV1IxVTJ4a1YxSldjRmxXVnpBeFVURk9WMVZzWkZkV1JscHZWRlphYzAweGEzZFdiWFJYWVhwR2VGVnRjRTlYYkZwMFZXdGtZVll6YUVoYVJscHJZekpHU0dKR1RtbGhNSEJYVm1wS05HRXdOVWRXV0d4VlltczFWMWx0ZUdGWFJteFpZMFprVjFKc2NIbFdNakZIVlRKS1IySkVWbFZpUjJoeVZsZHplRll4VG5KaFJscE9ZbXhLZVZac1VrdFRNbEpIVm01V1VtSkhVbTlaVkVaM1ZGWmFjVkp0UmxaTmF6RTBXVEJXYzFsV1NYbGhSVGxYWWtkUmVsUldXbXRqTVZwelZHeFNUbFl4U1hkV1ZFbzBZakpLUjFOc1pGUmlWMmhZV1cwMVExTkdWWGRYYkZwclRWWndWbFp0ZUd0V01rcEdZMFJhVjFaRmJEUlpla3BIVW1zeFNWcEdVbWhpU0VKWlYxWmtNRmxYUmtkaVJsWlRZa1p3YzFadGRIZE5WbHBZWlVaa2FGWXdjRWhaTUZwelYwWmFObEpVUWxabGExcDZWbXBLUzFJeGNFaFNiRTVPVFZWd05GWXhaREJoTURGR1RVaG9ZVk5GY0ZoWmJHaFRWbXhzY2xadVRrNU5WbXcxV2tWYWExZEhTa2RqUldSV1lrZG9kbFp0TVVabFZsWnlaVWRHVTJKSVFsVlhWRXA2VGxaWmVGUnVTazlXTW5oWlZXcEtiMUpzV25SalJYUnJUVlZXTlZaR2FHOVdSMFY1Vld4U1dtRXlVblpaTW5oWFkxWlNjbFJzWkZOaVJYQllWbXBKTVZReFVuSk5WbWhXWWtkb1dGbHNhRTVOVmxwWVRWVmtUMkpWY0VoWGExcDNZVVV4VjJORVdsZGlXR2h5VldwS1QyTXhVblZXYkU1cFUwVktkbFpHV2xka01EVnpWMnRvYkZJd1dtOVVWM040VGxaV2RHUkhSbGRXTUhCYVZWZHpOVll5Um5KT1dGcFhUVzVvYUZreWVISmxiVVpHVDFaT2FWSllRa3BXYkdRMFlqSk5lRmR1VWxSaVIzaFRXV3RrTkZZeGJISlhiRnBzVW0xME5GWXlOVTlVTWtwR1YycEdWMUl6YUZCV1ZFcExWMVpXVlZOc1pHaGhNamt6VmtaV2ExTXhTWGhqUlZwb1VteHdjRmxyV25kWFJscEhXWHBHVmsxc1NucFdiWGhYVmtkRmVWVnNWbFppV0dob1dsWmFjMVpzY0VaYVJsWm9aV3RhU0ZkVVFtRlRNV1JJVWxoc2FGSkZOVmRXYTFaaFZrWldjVkpzVG1wTlYxSjZWbTB4YjFSc1RrWlRibHBYWVRGd1dGbFVRVEZTTVU1eldrWm9hVkl5YUZGV2JYQlBWVEZrVjJKSVNtRlNhelZWVlcxNFYwNVdVbk5hUldSWVVqQlpNbFZYY0ZkWlZscFhWMnhDVjJKR1ZqUldha1pyWkZkT1IxZHJOVk5pYTBwMlZqRlNSMWxXV1hsVmEyaFZZVEpTVmxsWWNGZFVNV3h6V2taS1RsWnNjREJaTUZZd1ZHeEpkMVpxVWxkTmFsWlVWbXRhYTFOR1ZuVlNiRnBvVFZoQ2IxWnNXbUZXTWxKWVZHdGtZVkpzV25CVmJYaDNWakZhVjFwRVFtaE5hMW93VlRKMGIyRXhTa1pPVm14YVZrVmFhRmt5ZUdGVFIxWkdZMGQwVGxZeFNqVldiVEUwWkRGa1IxUnJXbFJpYlhoWVZtcE9iMkZHV25GU2JYUlRZWHBzV0ZsVlZUVldNa3BHWTBac1YySllhRlJXYWtaTFVqRmtXV0pIY0ZOV01VcFVWa1pXVTFZeVZsZFZiazVYWWxWYVZsUldXbmRYUmxWNVRVUldWMDFyY0VoV01qRnZXVlpLYzJOR1pHRldWbkJvV1RKek5WWXhUblJoUjNocFYwZG9TMVpxUmxOUk1WbDVVMWhzVTJKSFVsVlpWRVozWTFaV2MyRkdUbGROVjNoWldrVldZV0pHU25WUmJHeGhWbGRSZDFacVFYaGpiR1J5V2taV1RsWXhSWGRYVmxwaFV6RmFkRlJyWkZoaVIxSllWV3hrTTAxR1pGbGpSWFJUVFd4S1NGWkhOVTlaVmtwMFlVaENWMkV5VVRCV01uaHJWakZXY21SR1drNVdiSEJKVjFSQ1lXRXhiRmRUYmtwUFZtMTRWMWxyV2t0VFJsbDRWMjVPYW1KR2NERlhhMlJ2VlRBeFIyTkVXbGRXUlc4d1ZWUkdZV014WkhKWGJYQlVVMFZLV0ZadGNFOWlNREZ6WTBWV1ZHRXpVbFJaYTFwaFpXeFZlV1ZIZEZWaVZYQkhXVEJWZUZZeVNrZGpSbEpXVmtWYVMxcFdXazlrVmxKeldrZG9UbGRGU2xsV2JURXdXVlpzV0ZSdVRsWmlSMmh5VldwQ1lWWldiSEpYYlVaWVVtMVNlVmRyVWtOWFIwcEhZa1JPV2sxR2NHaFdNakZHWlVaT2MyRkdaRTVTTVVwTlZsUkNZVll5VG5SU2EyUnFVbTFTYzFsVVJuZFRiRnB6V2tSQ1dsWnJiRFJYYTFaaFZVWmFjMk5JU2xaaVdHaE1WbXRhWVdNeVJrWlVhelZwVW0xM01WZHJWbUZoTWtaR1RWaEthVkpHV2xoWmJGSlhWRVpzVjFkcmRGaFNNRnBJVmxkNGQyRldXa2RYYTFaWFYwaENTRlpxUm1GV01VNTFVMjEwVTAweFNsQldiWEJIVXpBMVYxZHVTbUZTUlVwVlZGWmFZVk5HV1hsT1ZYUlhVakJ3TUZaWGVHdFdNa3BWVW14T1lWSkZXbnBXTUdSWFVtMU9TR1JGTlZkTlZYQm9WbXBLTUZsV1ZYaFZiazVZWWtaYVdGbFVSbUZYUmxaeFZHdE9VMUp0ZHpKVmJYUXdWakpHTm1KR1pGZFdla1YzVmxSR1lXTXlUa2RoUm1ScFZrWlplbGRZY0V0Vk1WbDRWMnhzYUZKdFVtOWFWekUwVmtaa1dHUkhjRTlXVkVJMFdXdG9TMVl5U2taT1ZtUmFZVEZ3ZWxSc1dtRlhSMUpGVVd4a2FWSnVRa2hXVkVvd1lqRmtkRk5zYkdoU2EwcFlXV3hvYjFaR2EzbGxSVGxxVFZWYWVsWkhNVzlVYkVwMFpFUldWMkpZYUdoWlZ6RlNaREExVjJGR1RtbGhlbFpWVm1wQ2ExVXhXbGRpU0ZKT1ZtczFXVlp0TVRSbGJHUnlWV3hPVm1GNlJsbGFWV2h2Vm14YU5sWnVTbGRoTVhCb1dUSjRhMk5XUm5OalJtUlhUVlZaZWxadGVHdGxiVlpIVTI1T1dHSkdXbFJaYTJSVFYwWmFkRTVWVGxaV2JIQllWMVJPYjFaRk1YSk9WRUpYVWpOU1dGWnFTa3RTYlU1SFlVZEdWMDB4U205V2ExcGhZVEZaZUZwSVRtRlNhelZQV1Zod1YwNXNaRmhrUjBab1RWZDRXRlV5TlV0aGJFbDVZVVphVjJKWWFHaFdSVnBoWkVkV1IxUnNaR2xUUlVwS1YydFdZVll5UmxkVGJHUllWa1ZhV1ZsVVJtRmpWbEpYVjI1T1YwMVlRa2RaVldRMFZURmFWVlpzWkZkV00xSllWMVphUzFJeVNrbFZiWEJPVFcxb1ZWZFhlR0ZUTVVsNFlUTmtXR0V6VWxaWmExWjNWMFpyZDFWclpGZE5WbkJIVmpKNGIxWXhTa1pYYTJoYVpXdHdTMXBYZUhkVFIwcEhWR3hrYUUwd1NsWldiVEI0WkRGTmVGWllhRlZYUjJoWVdXdGFZVlV4YkZWVGJFNXFVbTE0ZVZac1VrZFdNREZYWTBSQ1lWWldWVEZXYWtaS1pESk9SbUZHWkU1aGJGcDVWbTB4TkZsWFRYaFVibEpvVW14d1QxbHRNVzlVVmxwVlVtMTBVMDFWTlVkVU1WcHJWbTFLU0ZWc2FGVldiRm95V2xaYVdtVlhWa2hTYkhCWFRWVlpNRll5ZEZkaE1XeFhVMjVPV0dKclNsZFphMlJ2VWtac2NWSnVUbGhTVkVaV1ZsY3hORll5U2xkVGJHeFhZV3RzTTFSc1dtRlRSa3B4VjIxc1UySldTbTlXYlhoaFV6RmtSMWR1U2xoaVJuQnpXV3RhWVdWV1VuTmFSV1JYVFd4YWVsWXlOWE5XTVVwMFZWUkNXbFpGV21GYVZWcGhZekZhYzFOdGJGTmlTRUl5Vm10YVYxVXhXWGROU0doWVlrZFNXVmxzYUZOaU1WSlhWbFJHYkdKR1ducFpWV1F3Vm1zeGNtTkdXbGRpV0doWVZtcEtTMUl4V2xsaFJscFhVbFp3ZVZkVVJtRlNNbEpYVlc1T1ZXSkZOVzlVVm1oRFdWWmFjVk5xUWxkTmJFWTBWbXhvYjFaWFJYbGhSbHBhVmpOU00xWXhXbUZqYkZweVpFZHdhVkl6YURSV1ZFbzBVekpGZDAxWVNtcFNWMUpoV1ZSR1ZtVkdXbFZSV0docVRWVTFlbFpIZUc5aFZrbDRVMWh3VjJKR1NraFdWekZYVWpGT2MySkhiRk5OYm1oVlZtMTRiMUV5U1hoWGEyUlhZbGhTVUZWdGRIZFhSbHAwWlVkMFdsWnJiRFpXVjNoWFYyMUZlRmRzYUZWV1JWcFlXa1ZWZUZKV1NuTmFSazVwVTBWS1dWWnJaRFJXTVZGNFdrVm9VMkpyY0ZWWmJUVkRWakZzY2xwR1RsZFNiRXA2Vm14U1YxZEdTWGRPVldoWFVqTk5lRmxXV2xwbFZsWlZVMnhrYVZKcmNFbFdiWEJMVW0xV1YxVnNiR2xTYkVwd1ZXMDFRMlF4V2xobFIwWlVUV3RhU0ZaWGVHOVVNVnB5VGxoR1YySllhR2hhVlZwWFYwZFdTVnBIYUU1U1JWcFlWa2Q0WVdFeFdYaFhibEpvVTBWd1dGWnNXbmRoUmxsM1drWmtVMkpHY0hwWlZWcHJWVEZaZWxWVVFsZGlXRkpZVjFaYVlXUkdWbGxoUmxacFVteHdWMWRYZEZaTlZscEhZa1pXVTJKc2NITldiWGh6VGxacmQxWnJPV2hoZWtaWFdUQldiMVp0U2xsaFNGcFlWbXh3VEZZeFdrZGpNVkp6Vm14a1YySklRblpXTW5SaFdWWmFkRlpyWkZoaWEzQlJWbTEwZDJOR1ZuVmpTRXBzWWtkU1dWcEZXbXRXYXpGWFYyNXdWMDFYYUhwV2JURkdaV3hXYzFwR1pHaE5WbkJOVmxSQ1lXTXlVa2hXYTJoclVtMVNXRmxZY0ZkV01WcDBUVWhvVGxKc2JETlVWbHBoWVd4S1dWRnNiRmRoYXpWVVdrZDRZV05XVG5KWGJYaFRZbFpLWVZkV1ZtRmhNVmw0VTJ4V1YySkdXbGhXYm5CR1pERmtWMVpZYUdwTldFSktWVzE0UzJGWFJqWldiRlpYVm5wRmQxZFdXbXRXTVhCSlUyeGthV0pXU2xoWFZtaDNVakZKZUZkWWJFOVdiVkpZV1Zod1IxZEdXWGxsUlU1WFlrWnNObGxWVWt0WlZrcEdZMFY0Vm1KWWFGaFpla1pQWkVkR1NHSkdhRk5OYldoUFZtMHhOR0V3TVVkV1dHeFVZbXhLVmxsdGN6RldWbXhWVTJ4T1YxSnRlREJhVldocllVWktjMU5zWkZoaE1VcFVWbFJHWVdNeFpITmhSbWhvVFd4R00xWnRkR3RUTVVwelYyNUdWV0pHY0hCV2ExWkhUa1phZEdSSFJscFdiSEI1Vkd4YVlWWlhTa2hoUnpsYVZrVktNMVJ0ZUdGWFIxSklVbXhPVGxadVFscFdWekV3WVRGVmVWSnFXbGRoZW14WFdXdGtiMUV4Y0ZkWGJIQnNVbXhhZVZaSGVGZFViRnBYWWpOa1YxWXphSFpaZWtaaFUwWktXV0pIYUZSU1ZYQllWa1pXWVdReVJrZGlTRVpUWWtVMVdGUldXbmRsVm5CR1draE9WV0pIVWtkVk1uUnZWakF4ZFZWdVJsVldiSEI2Vm0xemVGWXhaSE5WYld4VFlraENXVlp0TURGa01WbDRVMnRrYVZKdFVsbFpiR2hUVmtac2NsWlVSazVXYlhRelZqSTFhMkZHU1hkV2FscFdWak5vV0ZZd1dscGxiRlp6WVVaV1YxWnVRazFXVjNCTFVtMVdkRlJyWkdoU01taFBWRlpXZDA1c1duUmpSVTVvVFZaV05WWlhlR3RYUm1SSVlVWnNXbUpHU25wV2JGcFRWMGRXU0ZKc2FGTmlXR2cxVm1wSk1WUXlSa2RYYmtwcFVrWktZVlJWWkc5VFJscHpWMjFHVDJKR2NERldNakZIVlRGS1YyTkliRmRpV0dob1ZrUktUbVZHY0VsVmJXeFRWa1phVmxaWGVGZGtNVkpIVjI1T1dHSllRbk5WYWtKelRsWldjMkZIT1ZkU2JWSkpXbFZqTlZadFJYaGpSRTVYWWxob1dGbDZSbUZXVmtwelUyczFXRkpWY0VoV2JGcHJaREZWZUZaWWFGUmlhM0JaV1d0a05HRkdWbk5hUms1cllrWndlRlZXYUc5V01rcElWV3BHVjJKWWFHaFphMlJIVG14YWNWZHNaRmRpVlRRd1ZtMXdSMU15VWtkV2JrcGhVbXh3Y0ZacVNtOWxiR1JZWlVkR1ZFMVdTa2hXTW5odllURktjazVZUWxwaVJsVjRXbGQ0Vm1WWFVraGtSbHBPWVROQ05sZFVRbXRpTVZwWFYyeG9WbFpGU2xkWmExcDNWMFphY1ZKdVpGUlNNVXBJVmxjeGMxVXhXbk5pUkZwWFlrZE9NMXBFUVhoV01XUnlXa1pvYVZKdVFsRldiWGhXVFZaa1YySkdhR3RTV0ZKeldXdGFZV1ZXV1hsa1IzUlhUVlpzTTFZeWRHOVhhekZIWTBkb1YxSXphRXhXTVZwSFYxZEtSMXBGTlZkaE0wSk5Wako0VjFsV1pIUldiR1JWWW1zMWFGVnRkSGRqUmxaMFpFaGtWMkpHY0hwWlZXaHJZV3N4Y2xkcmFGZGlWRlpJVm10a1IyTXhUbk5SYkdScFYwZG9iMVpVUW1GWlZtUklWR3RhVUZac1dsaFdhMVpoVGxaYVNHVkdaR3BOVjFKNlZqSjRiMkZHVGtaalJtUlZWbnBXZGxWNlJuZFdiR1IwWkVkMFYyRXpRalpYVkVKaFlURlpkMDFWVmxKaGF6VllXVmQwZDAweFZqWlNiRnBzVW01Q1NGZHJXbGRoVjBwSFkwWmtXRll6YUZoWFZscHJVakpPUjJGSGVGTk5SbkI2Vmxjd2VGVXhaRmRoTTJSWFlXdEtXRmxZY0VkbFZtdDNWbTEwV2xacmNGaFdNbmhUVmpKS1ZWSnJlRnBOYmsxNFZqQlZOVll4Y0VoaVIyeG9UVWhDWVZacVNqUlpWbXhYWWtaa1dHSnJOWEZWYkZwM1lVWldjMVZzWkZkU2JFcFhWakkxYTFVeVNraFZiR2hhVmxkb2NsbFZWWGhXYXpWWlkwWmFUbUpzU2xsV01WcFdaREpSZVZSclpGZGlSMUp2V1ZSS2VtUXhaSEpWYTJSV1lsWkdORmRyYUV0V1IwcFpZVWhDVm1KR2NESmFSRVpoVWxaS2RHUkhkRTVXYkhBMVZrWmFWMWxYUm5OVWEyeFNZa2RvVmxadGVIZFVSbHBHVjI1T2FsWnJOWHBXUnpGM1lWWmFXVkZyYUZkaVIxRXdWMVprUjFkR1RuTmFSbEpwVmpKb1dWZFdaREJUTWtaSFZtNVNhazB5VW5OVmJYaExaV3haZVdWSFJsZE5WWEI1V1RCVk1WWXhTbk5qUm1oV1pXdGFURlpxUmxkWFYwWklVbXhPYkdKWWFGbFdiVEYzVVRGc1YxZHVUbWxTYkhCWVZtdGFZVll4YkZsalJXUk9VbTVDVjFadGN6VlhSa2wzVjI1c1ZrMXFWak5XYlRGR1pVZE9SbUZHWkU1U2JrRjZWbGN3ZUZReFNYaFVia3BQVm1zMVdGbHRkRWRPUmxwMFRWUlNWMDFXYkRSV2JUVkxWREZhZEdGR1pGZE5SMUV3Vm10YWMxWldUbkZWYkZwT1ZtNUNORlpVU2pSVU1rVjRVMjVPYWxKc2NGZFdhazVUWVVac1ZWTnJkRk5OVjFKNVdXdGFiMVl4U2xWV2JteFhZbGhTVjFwVldrOVRSbHB5VjJ4a2FWSnVRbGxYVjNoaFV6SldWMWRzVmxSaGJFcFZWRlpWTVZkR2EzZFdiR1JYVWpCd1NWbFZZelZXVmxsNllVVjRWV0pZYUdoVmFrWjNVbFpXYzFOck5XaE5NRWt4Vm10YVlWWXhiRmhTV0doVVlrZDRVMWxyVlRGV2JGcHpWMjFHYUZKdVFraFdNbmhoWWtaS2MyTkljRmRTTTAxNFZrZDRUMU5HVmxWU2JHUm9UV3hHTTFkWGNFdFNNVWw0Vlc1S2FGSnNjRzlVVm1oRFYxWmFkRTFJYUdsTlZWWTBWbGMxVDFkSFJYcFZiRkpWVm14YU0xUldXbHBsVjFaSFdrZG9VMVpGV2tkV2JURjNVakZaZUZOdVRsaGlSMmhXVm14YWQxWkdXWGRYYlVacVRWWndNRmxWVlRGVWJVcEdZMGRHVjJKVVFqTmFWVnBXWlVaV2NscEhiRlJTV0VKdlZsZDRiMVV4V2tkV2JsSnJVakJhVDFWdE1UUmxWbVJ5V1hwV1YwMUVSa1pWYlhSdlYyMUtkVkZyYUZkaVdFNDBWbXBHYTJSV1RuTldiR1JYVFZWd1RsWnNVa05aVmxWNVZXeGtWMkpyTldoVmFrbzBZMFpXZEU1VlRsUlNiSEF3V2xWa1IyRlZNVlpXYWxaWFZqTlNjbGxYZUV0WFJsWjBVbTFHVjAweFNtOVhWM0JIWXpKTmVGcElTbXRTYkVwWVdXeG9iMDVXWkZkV2JYUlRUV3RhU0ZZeGFHdFhSMHBJVld4a1ZWWjZWa1JaVlZwYVpWZFdTRkpzYUZOaVJYQlhWbGN4TkZZeFdYaFRiR1JxVWxSR1dWbFVSbUZqYkZZMlVtczVWMDFXV2pGV1YzaFBZVlpKZUZOdVpGZFdNMmgyVlZSQmVHTXhaSFZTYkU1cFYwVktlbFpYZUZOV01VNVhWbGhzYTFJd1dtOVVWbFozVjBaVmVXVkhkRmhpVlhCV1ZXMTRVMWRHV25OalIwWmhVa1ZhY2xreU1WTlRSMUpJWWtaT1YxSldWak5XYlhoclRrZEplVkpZYUZoaE1YQlBWakJWTVZkV1dYZGhSVTVYWWtad2VsWXllSGRoTURGWFZtcFdZVlpXV21oWlZFRjRWbTFPUlZGc1ZtbFNia0pWVm0xd1IxbFdXbGRYYms1WFlrZG9XRlJVU205bFZscFlZMFZrYUUxVk5VaFdNalZMWVVaSmVtRkdVbHBYU0VKWVZteGFZVkl4WkhSU2JYQk9Va1ZKTUZacVJtOWlNV1JJVTJ4c1ZtSnJXbFpXYWs1UFRrWlNjMWR0UmxSU01EVklWMnRhWVdGV1NuVlJhM0JZWWtaYVdGUlZXbUZrUmtwMVUyMXdVMkpGY0doWGJHUXdXVlV3ZUZadVVteFNNRnB5VlcxMGQwMUdhM2RYYXpsVllrVTFSMVV5ZERCV01rcFZVV3BTVlZaV2NHRmFWV1JMVWpGd1NGSnNUbGROVlhCWFZqRmtORlV5VFhoaVJtUllZbXhLVDFadGRIZFVNVlowVGxWT1dGWnVRa2RXVjNSUFZtc3hWbU5JY0ZkTmJrSklWakJrUm1WSFRrVlViR1JPVW01Q1RWZFVTWGhVTVVwWFZHNU9XR0pZYUc5VVZtaERWbXhaZVdWSGRFOVNiRlkxVmtjMVQxWnRTbk5YYkU1YVlURmFNMVl3V2xOWFIxWkdaRVpXVTJKSVFsbFdiR1F3VkRGVmVWTnNaRlJpYmtKWVdXeG9VMlJzV1hsak0yUnNWbXhhZWxadGVGZFdNVmw0VWxoa1YxWXphR2hXYWtaYVpVZE9SbUZIZEZOaVJYQjNWbGQ0YjFFeFRYaFhXR3hxVWxSc2IxUldaRk5UUmxsNVRsWk9WMkpWVmpaWlZXUkhXVlpaZWxWdGFGVldSVnBvV1hwR1lWWldTbk5VYldoc1lrWndXVlp0ZUdwbFIwbDRWMWhvV0dKSFVuRlZhMVpoVjBaYWNsWnRSbGhTYkhCR1ZXMTBhMkZyTVhKaVJGcFlZVEpTZWxaVVJtRmpiVTVIVld4a2FWZEZTazFXYkZKSFZqSk5lRmRzYkdGU2JXaHZWRlJHUzFWV1duUk5WRkphVm1zMVdGZHJXbGRXVjBwWlZXeG9WbUpHU2toVk1WcDNWbXhhYzFwR1pHbFNia0YzVm14ak1WTXhXbkpOV0Zab1VsZFNhRlZyVm1GVVJuQkdWbFJHVjAxV1ducFhhMXByVmpGS2MyTkZXbGRpV0VKTVdrUkdSbVZXVWxsaFJsSm9UV3hLVlZkWGRHdGlNa1pIVm01U2ExSXdXbGhXYlhoaFRVWndSbUZIZEZWaVZYQklXVEJhYTFkSFJYbGhSRTVYVWpOb1lWcEVSbXRqYlVwSFYyczFhV0pYWjNsV2JURjNVakZzVjFScmFGTmhNWEJRVm0xNFlWZEdWbk5YYm1SVlZtMVNlVmRyVWxOV01ERldUbFZvV2xaRk5UTlhWbHBMWXpGT2NrOVdXbWhoZWxZeVZsY3hORmxXV1hoYVNGSnJVakpvVDFac1VsZE9iRnBZWlVjNWFFMVdWalZWTW5oWFZqSktSMWRzYUZwaE1YQlhXbFZhVjFaV1NuUmtSM0JYWVRGdmVGWnJaRFJVTVZWNVVsaG9hbEp1UWxoVVZ6VlRZVVpXY1ZKdFJsTk5WVFV4VlRJeGQxVXhTbGxSYkd4WFlsaG9jbFpYYzNoU01XUnpWbXhLVjFKV2NGcFdWekUwVXpKV1YySkdXbGhpV0ZKWVZGWldjMDVXYkZaV1ZGWlhUVlZ3ZWxVeWRHOVdiVlp5WTBaU1dtVnJXbWhaTWpGSFVqSk9SazVWTldsU1dFSllWbTEwWVZZeVJYZE9WV1JVWWtkU1dGbHJaRk5oUmxaeFZHeE9WMVp0ZUhsV2JYaHJWR3N4VjFkcVFsVldWa3BJVm1wR1MyTXlUa2RhUmxacFVteHdVVlpxUW10U01rNXpWRzVXYWxKc2NHOVVWbWhEVTFaYWNWRnRSbXROVld3MFZUSTFUMVp0U2taT1Z6bFZWa1ZLU0ZSc1dtRmtSMVpIV2tkb1RsSkdXa2xXYkZwdll6RmFXRkpZYkdoU2JXaGhXV3hvYjFSR1dYZFhiVVpxWWtoQ1NWUXhXbGRoVmtweVkwWmtWMVo2UlhkVVZXUkdaVlpPY2xwR2FHaE5ibWhhVm0xMFZrMVhUbk5YYmtwWFYwZG9WVlZxUm1GU01WcDBaVWRHVjAxcmNGaFZNalZ6VmpGYVJtSjZRbFppVkVaVFdsVmFUMlJXVm5KUFZtUnBVbGhDV2xadE1UUlZNVmw0VTJ0a1dGZEhlSEZWYkZVeFkxWlNWMVp1WkZSU2JGb3dXbFZqTlZkc1duSmpTR3hYVFc1b1dGWnRNVXRYVmxaeFZHeFdWMDB5YUc5V2JURTBaREZLVjFadVRsUmhlbFp2VkZSQ1MxTXhXblJrUjNCT1ZteFdORlpYTlU5WlZrcFhZMFpXV21KWVVtaFdiWGhoWTJ4YWNsZHRlRk5pYTBwSFZsY3dNVlF5Um5OWGJrcFBWbXh3VjFacVRtOVNSbHBWVW0xMFZGSnNXbFpWTW5ocllWWkpkMDVJY0ZkU00yaG9WbXBHV21WV1VuSldiR2hwVWxoQ2RsWkdVa3RpTVZwelYyNVNiRkpzY0U5V2JYUlhUa1prY21GRlpGWmlWWEI1Vkd4YVUxWnRTbGxWYldoWFRWWndjbGt5ZUdGa1ZuQkhWMjFvYkdFeGNFbFdiWEJLVFZaWmVGZHVTazVXYlZKWldXdFdTMVl4V25GVWJUbE9Za2hDVjFZeWRHdGhiVXBXWTBWb1YwMXFSbnBXYWtaS1pXMUdSMVZzWkU1V2JrSlZWbFpTUjJNeFpFZFZiazVoVWpOQ1ZGWnROVU5pTVZwVlVXeGFUbFl3TlhwWmEyaFBWakpLZEZWck9WZGlXR2d6VlRCYVlWZEZNVVZXYkdSWFlraENWMVpXWkhkVk1WcHlUVmhHVjJKWGFGaFpiR2h2VXpGd1YxZHNUbXBXYkVwNlZqSXhOR0ZGTVVsUlZFcFhZa2RSZDFkV1drcGxSbkJHV2tkd1UxWnVRbmhXVnpFd1pERlJlRlp1VGxoaWJWSlBWbTE0ZDFac1ZuUmxSM1JYVmxSR1YxWXlOWE5XVlRGWFYyMW9XbFpGUmpOYVYzaEhZekZ3UjJOSGJGZFNWbFl6Vm0xNGEwNUhSWGxWYkdoVllURndWbGxyV21GV1JteFpZMFprV0ZKc2NIbFhhMUpEVmtVeFdHVkdaRlZXYkZwMldXdGFTMVl4WkhOYVJtUnBWa1ZhVlZkVVNqUldiVlpZVm10YVdHSllVazlXYkdoRFZqRmFjMXBFVWxwV2JGWTBWVEo0VjFZeVJYaFhiR3hYWVdzMVJGWkZXbUZTVmtweVpFWk9UbFpZUVhoV2JURTBVekpHVjFkc1pHcFRSbkJZV1d4b2IxZEdaRmRXV0docVRWaENTRmRyV205aFZscElaVVprVjFKc2NIWlZWRXBYWXpKS1NWTnNhR2xoZWxaWlZsZHdRMlF3TVVkalJscGhVbGRTV0ZSVlVrZFRWbHBYWVVkMFdsWnJiRFpaVlZwRFYyc3hkV0ZFVGxaTlJuQk1Xa1ZrVDFJeFVuSk9WbEpUVmxoQ1RWWnRNSGRrTWxaR1RWVmtXRmRIYUhCVmJURlRZVVpXYzFwR1RsZFdiWGg2VmxjMVQxZHNXbk5qUkVKVlZteHdURlpIZUV0a1ZrWnpZa2RHVTFacmNFVldiWEJIVTIxUmVGZHVSbGRpUjJodlZGZDRSbVF4WkZoa1IwWmFWbXh3ZWxZeU5VZFdSMHBJVld4b1YyRnJXa3hhVlZwclkyeFdjbHBHVm1sV2Exa3hWbFJLTUZsV1duUlRhMXBxVW0xb1ZsWnFUbTlVUmxwR1YyMUdWMDFXV25sV1IzaFBWRzFGZWxGcVdsZGhNbEV3VjFaYVlWZEdTbGxhUjNCVFRXMW9WMVp0ZUd0VmF6RkhWbTVPV0dKSFVsaFVWbWhEVTFad1JsZHRSbGROYTFZMlZWZDBhMWRHV1hwVmJGSlhVa1ZhY2xsNlJtdGpNa1pJWVVaT1YxWkdXbUZXTVZwclRVWnNWazFJYUdwU1ZuQllWbXRhWVZkV1duRlJibVJVVm14YU1GcFZaREJXVjBwR1kwUkdWbFl6UWxSV2FrRjRWakpPUjJGR1pGTlNWbkJKVjJ0V1lWUXhaRmRqUldocVVtczFXRlJYTVc5WlZsbDRXVE5vVGxKck1UVldSM1JyVmpKS2NsZHNVbHBpUmxwb1ZtdGFjMk5zY0VkVWJYaHBVak5vV0ZacVNucE9WMFpIVTI1S2FWSkZOVmhVVnpWdlpXeGtWMWR0UmxoU01GcEdWa2Q0WVZSdFNuUmhSWGhZWVRGS1NGbFVTazlXTVhCSlZHeGFhVkl4U2xsV2JYUmhXVlphYzFkWWFHRlNSa3B2VkZaV2MwNUdaSEpXYlRsWFRXdFdOVmxWYUU5V2JVcFpWRmhvVjJFeGNGUldha1pyWkZaU2NrNVZOVmRpV0dOM1ZtMXdTbVZGTVVoU2JrcE9WMFZ3VDFaclZURmhSbFp6VjI1a1YxSnNjRmxVVmxacllURktjMWR1YkdGU1ZuQm9XVlZWZUZadFRrVlNiR2hYVWxjNGQxWlljRWRUYlZaSFZHNVdWMkpIYUhCV2JGcDNWVVphV0dORk9XbE5WWEI2VmpKNGExZEhTbGxWYlRsVlZteFZlRnBYZUZkak1rWklaRVphVG1FelFsZFdiVEUwVmpGWmVWTnJaRmRYUjJoWFZtdFdZV05zYTNoWGEyUnJWbXhLZWxaSGVFOWhSVEZaVVcxR1YyRnJiM2RXYWtwU1pVWmFkVk5yTlZkV2JrSmFWMWN4TkZsV1pFZFhiazVZWWxWYWNsbHJXbmRXYkZWNVpVZDBWMDFFUmxkV01uQkRWbGRLUjFaWWFGZFdSVnB5VldwR1QyTnRWa2RhUm1ScFVsaENSbFpzWkhkVE1VMTVWRmhvVm1Kck5WbFphMXBoWWpGU1ZtRkZUbWxOVm5CSVZtMHhNRlF4U25KalJtaFhZbGhvY2xkV1drcGxiRlp6Vm14d2FFMVdjRmxXUmxKSFZqSlNSazFWVmxOaVIxSlVXV3RvUTFkR1draGxSbVJWVFZkU1NWVnROVXRXUjBwMVVXeGtXbFpGV2pOVk1GcGFaREZrZFZwR1RtbFdWRlpKVmxSS2VrMVdWWGhYYms1WFlXczFXRmxYZEhaa01WcHhVMnRhYkZKc2NERlZNakYzVkdzeGRHRkdVbGhXYkVwSVYxWmFWMVl4WkZsYVIwWlRZWHBXZDFaR1dtRldNREI0VjI1U2ExSXpVbTlXYWtKM1UxWmFXRTVZWkZoU01GWTBWbXhTUjFkc1duTldhbEphVFdwR1RGUnRlRXRqTVdSeldrZDRhRTFHYTNkV2JYQkhXVlpzV0ZKWWFGUlhSMmhXV1cxMGQxVkdXblJPVlU1WVVtMTRlbFpzYUc5VU1VcDBWV3hhVmsxdVFrUldSM2hMWTIxT1JtRkdaR2xXUmxwWlZqRmFZVk15VWxkU2JrNXBVbXh3Y0ZZd1drcGxiRnBIV2tSU1YySldXa2hXTWpWTFZERmFWVlpzVWxwaVJrcDVXbGQ0YTFaV1JuTlViR1JPVm14d1NWWlVTbmRaVmxsNVVsaHdWbUpIVWxoVVZXUnZVa1phY2xkdVRtdFNNVnBIVkRGa2QyRldUa1pUYTNCWFZucENORnBFUmxaa01ERldZa1pLYUUwd1NsbFhWM2hUVW0xUmVGZHVSbE5pYXpWWVZGWm9RMUl4WkhKWGJFNW9WbXh3U1ZwVlpHOVdNa3BWVVdwU1YxWXpUalJWYWtaM1VqSkdTR1JHVWxOaWEwbzJWbTB4TkZVeFdYaGFSbVJwVW14d2FGVXdWVEZYUmxKV1ZXdGtXRkpzYkRWWk1GWnJWakF4UlZKcmFGcE5SbkJFVm14YVlWSnNaSEZUYlVaVFVsaENVVlpYTUhoU01VbDVVbXRvYVZJeWFFOVZNRlpLWld4YWRHVkhkR3ROVld3MFdXdGFhMVpIU25KT1YyaFdUVVpWZUZscVJsZGtSMDQyVW0xc1RsWnNjRFJXVm1ONFVqRmtSMWR1VmxKaVIxSlpXVlJHV21ReFduSldXR2hUVm10d01WbFZXbXRoVmxwR1VsaG9WMkZyYkRSVmVrWlBVakZhZFZSdFJsTmlhMHAzVm1wQ2EySXdNWE5YYmxKclVqTlNWRlJWVWxkbGJHdDNWbTFHYUdKRmNIbFViRnBUVm0xR2NtTkdVbFZpUm5Cb1dYcEdZV014Y0VkV2JXaHNZa1p3V1ZacldtRldNa1Y1VW01T1ZHSkhVbGxaYTFaTFZqRnNjbGRyZEZoU2JGcDZWakkxVDFZd01WZGpTR3hZWVRKU2VsbFdXa3RXVmxwellVWmthRTFzUmpOV1dIQkhZekZhY2sxV1dtaFNNMmhVVm0xNGQxZEdXblJOU0doV1RXczFlbFpzYUhOaVJrcFhZMGhLVlZac1dqTlVWVnBUWXpGa2MxUnNaRTVXYmtKWFZtMHhNRlV4V1hkTldGWlNZVEZLWVZwWGRHRlVSbFp4VW10MGFrMXJXa2xWYlhoUFYwWktWbU5HVmxkaE1YQllWbXBHYzFkR1ZuTmFSbVJwWVROQ1dsZFdVa3RWTWs1ellraEtXbVZzV2s5VVZtUTBaVlphZEdWRk9WZGlWWEJJV1d0U1YxWXhXWHBWV0dSWFlsaG9hRlZ0ZUU5amJVWkhZMGRzV0ZJeWFGSldiVEI0VGtaVmVWUnVUbFZpYkVwVVdWaHdWMVpHVWxWVGJUbFRUVlp3ZWxZeU1VZGhSVEZ5Vm1wU1YxSjZWbEJXVkVaclUwWldjMVZzY0dsU2EzQlpWbTE0WVZsWFRYaFhiRlpUWWtWd1QxWnFSa3RPUmxwWFdYcEdWVTFXVmpSV01XaHZWMGRGZUdOR1pGZGlia0pJVlRCYVlWWldTbkprUms1T1ZsaENWMVpXWkRSaE1WbDRWMjVLYWxKcldsaFdiWGhMVkVaVmVVMVdaRmROVmxveFZUSjRZV0ZXU2xsUmJtUlhZV3RLY2xscVNrZFNNV1J5V2tad1RrMXRhSGRXUmxaVFVqSldjMWRyYUd4U01GcFlWbXBDZDFJeFVuTmhSVTVYVFd0YWVWVXlNVzlXTURGWFkwUk9WMkpZYUROVmJGcFhZekZrY2s1V1pGZE5NazR6Vm0weGQxSXlTWGxTV0doaFVsZFNXVmx0ZUV0V01XeDBUbFZPV2xadVFsbGFSV1JIWVcxS1IxTnVjRmROYWxaeVZsUkdZV05zWkhGUmJVWlhWbTVDTWxac1VrZFpWbVJYVW01R1dHSkhVbGhWYkdoQ1pXeGFXRTFJYUZaaVZrWXpWR3hXYzFsV1NYbGxSbEpYWWxob00xWlhlR0ZXTVZaeVQxWmFUbFpzY0RaV2JURTBZekpHYzFScldtcFRSWEJXVm0weFUxWkdjRmRYYlVaWFRWWmFlVlpIZUd0V01ERkhWMWh3VjFJemFIWlpWRVpoWXpGa2RWVnNXbWxoTTBKWVZrWmpNV0l4U1hoalJWWlRZVE5TY2xWc1VsZFhSbHBZWlVkMFYwMVdjRWhXTW5SWFZqSkdjbU5FVGxaV1JYQlBXbFZhVDJOc2NFZFViV3hUVFcxb2RsWnNaRFJpTVVWNFZsaG9WbUpHY0ZoWmJGWmhZMnhhZEdWR1pFOVNiSEF3V1ROd1YxWnRTbFpqUld4VlRWWktVRll5TVVabFJtUnpWV3hrVjAweWFHaFhiRnBoVmpKTmVGUnVUbGhoZWxaVVdXMTBTMVJzV1hoVmEzUlBVbXhzTkZaSGRHOVdWMFY0VjJ4YVdsZElRa2hXUkVaelYxZE9SMXBHVW1sU01VcFpWbTB3ZDA1WFJrWk5WbHBQVjBoQ1YxUldaRzlrYkZsM1drVjBhbUpIVWpCVmJYaHJZVlpKZUZOc1FsZFNiRnBvV1ZSS1QxWXhTblZXYlVaVFlrVndWVmRYZUdGVGJWWkhWMnhrV2sweWFIRlVWbHBYVFRGU1YxZHRkR2hpUlhCWlZsZDRiMVpXV2paV2JscGhVak5vYUZac1drOWpiSEJIVld4T2FFMHdTVEpXTVZwWFlUQTFSMVpZWkU1V1YzaFRXVmh3UjFkR1ZuUmxSWFJTVFZaS1dGZHJXa3RpUmtsM1RsVm9XbFpXVlhoV2FrcExVMVpHZFZwR2FGZE5NVXA1VjFkd1IxbFhUWGxUYTFaWVlrWktjRll3V2t0WFJscDBZMFZrV2xZeFdraFdNbmhyVm0xS1JrNVdhRmRpV0ZJelZXcEdVMk14WkhOVWJHaHBVbTVDU0ZacVNqQlZNV1IwVTJ4c1ZXRnNTbGRaYkZKSFZrWldkRTFWT1ZOTlZUVjVWR3hhVDFZeVNuSlNhbEpYWWxob1ZGVnFSbHBsUmxaWllVWk9hV0Y2Vm5kV1JsSkxWVEpPUjFadVRsaGhNMUpYVkZaYWQyVkdWWGxsUlRsWFVsUkdXRll5ZUdGV2JGbDZWVzVLV2xadFVreFZiWE14VmpGd1IxcEdUazVOVlhCT1ZtcEdZVlp0VmtkVWEyaFhZVEZ3V0ZsclduZFhSbXh6VjJ0MGJGWnNjRlpWTW5CVFZUSktWMUpxVWxaTmJtaFlWbTB4UzFac1pITlZiR1JvWVRGd1RWWnRkR0ZXYlZaMFZHdGFWV0pHY0U5V2JYaDJaREZhVlZKdE9XcE5WM2hZVlRKNGMxVnRTa1pPVmxwWFlrWndhRmxWV25kU01XUnpWMjE0VTJKSVFqVldSRVpoVXpKR1YxTnFXbWhOTTBKWlZtcE9VMWRHV2xWU2JHUnFUVmRTV2xscldtRmhSVEI0VTJ4b1YySllVbGhWZWtaUFVqSktTVlZ0ZUZOV1IzaFpWMWQwWVZNeVZsZFdXR3hPVmxkU1ZsbHJWbk5PYkd4V1ZtMUdWMDFXY0hwWk1HaExWMnhhUmxkc1FscGxhMXBNVmpGYWQxSXhVblJpUm1SVFlraENXRlp0TUhoT1JscHlUVlprVTFkSGFGZFdNR1JUVjFac1ZWRnVaR3BOVjNoNVZtMHhSMVJzU25OU2FsSllZVEpvY2xadE1VdFNNazVHV2taYVRtSnJOREJXYlRGNlpVWlplRnBJVGxKaVJuQllWRlJLYm1WV1pISlZhM1JVVFZWd2VsWnROVTlXUjBwSVZXczVXbUV4V2pOV1JscGhZekZrYzFSc1NrNVdWM2N4VmxSSk1WUXhXbGhUYTJScVVteHdZVlpyVmt0Tk1XeFdWMnhPVjJKSVFrWldWM2hQVmpKS1IyTkdiRmROYmxKeVZGVmFZVk5HVG5KWGJHUm9ZWHBXV0ZkWGVGTlJiVlpIVjI1S1dHSlZXbGhaV0hCWFZqRmFTR1ZIT1doU01GWXpXVEJTWVZZeFdYcFZiV2hXWVd0YWNsVnFTazlTYkdSMFpFWk9hVkpZUWxaV2JURTBZakZGZDA1WVRsaFhSMmhYV1ZST1EyTnNVbGhsUjBaVVZteHdTVnBGWXpWV01WcDBWV3R3VmxZemFHaFdNakZMVjFaV2NtVkdjRTVTYmtKVlZtcENhMVF4U1hoalJXUlZZa2RTY0ZZd1pHNU5SbHB6Vld0MGEwMVdWalZWYkdoelZrZEtSMk5HUWxkTlIxSlVWbXBHWVdSSFZrWmtSM2hwVW14Wk1WZHNWbGRrTWtwSFYxaG9XR0V4Y0ZoVVZ6VnZaR3hhVlZKcmRGZFdiSEF4V1d0YWIyRldTblZSYm14WFZqTkNTRmxVUmxwbFJtUjFWbXhhYVZZeWFGVlhWekV3VXpKUmVGZHVSbEppV0ZKd1ZGZDRZV1ZzV25SalIwWldZbFZaTWxscldtdFdWbGw2WVVWb1ZXRXhjSHBaTW5oclpGWlNjMXBIYkZkWFJVcFlWakZrTUZZd01VZFhiazVoVWxkNFUxbHJXa3RaVm14ellVYzVWbEp1UWtoWGExWnJWREpLUjFkcVFscGhNbEoyVmtjeFMyUkhSa1phUm1Sb1RXeEdNMWRXVWt0U2JWWkhWV3hzYUZKc1NsbFZha3B2WlVaYVZWRnRkRlpOVjNoWVdXdGFWMVpIU2taT1ZteFdZbGhvYUZwWGVGcGxWVFZZWkVab1UySklRalpXYWtwM1VURmtjMWRzYUZaaWJIQllXVmQwUjAweGNGZGFSV1JVVm10YWVsWXljekZoVjBWM1kwVXhWMkV4Y0doWlZFWktaVVpTY2xwR1ZtbGhlbFoyVmxjd2VGVXhaRWRqUm1oc1VqQmFZVlp0ZUhkbGJGcFlaRVJDVldKRmJETlpNR2gzVmpKS1dWVnVjRnBXYkhCTVZtMHhUMU5XUm5OalIyaE9ZWHBDTkZaclkzaE9SbHAwVm14YVRsWnNXbGRaYTJoRFYwWnNjbGw2VW14V2JIQjZWMWh3UjFZd01WZGpSV2hYVFc1b2NsWnJaRWRqYlU1SFlrWndWMDB4U2sxV1JtUTBaREZrU0ZacldsQldNMUpVVkZaYWQxTnNXbGhOVkZKVVRWWktNRlZ0Y0dGVmJVWnpZMFpvVjJGck5WUlpWVnBYWTFaT2MxUnRjRTVoTW5jeVZqSjBhMk14VlhoWGJrcHFVbXhLV0Zsc2FFTlVSbHBWVW1zMWJGSnNjSHBXYlhoTFlVVXhjMU51WkZoV00xSlhWRlphV21WR1pISmhSM1JUVjBaS2FGWnRlRk5TTVU1WFkwWmFWMkpIVWxoWmExcDNUVVphV0U1VmRGZGhla1l4V1ZWV2ExbFdTa1pYYTNoaFVsWlZlRlpxUmxkak1YQkhXa1prVTJKSVFrZFdiVEYzVXpKUmVGSlliRlZYUjJoVldWUktVMVpHYkhKYVJ6bG9VbXhhZWxsVlZrOVdhekZYVTJ4a1YySllhSEpXUnpGTFVqSk9SMXBHYUdoTmJFbDZWMVpTUW1WR1duSk5WbFpWWWtoQ2IxUldXbmRXVmxweldrUlNXR0pXV2xoV2JUVkxZVEZLYzJOR2FGWmlSbG96VlRGYWExZEZNVlZWYkZaT1ZtNUNObFpzWXpGVE1WcElVMnhhV0dGNmJGZFpWM014Wkd4V2RHVkhSbGROVjFJd1drVmtiMVJzV2xWV2FscFhWak5vZGxsVVJsWmxWazV6Vm14a2FWSnNjRmxYVjNSaFZtMVdSMVpzVmxOaVdGSnhWbTEwWVUxV1draGxSVGxXVFd0V05Ga3dXbmRXTURGMVZXeG9ZVkpGV2xoWk1uTjRWbXhrYzJGSGJHbFNia0phVm0weE5GbFdiRmhWYms1WVlURmFWVmxyVm5kak1WWnhVVzVrVkZKdGVGZFdiRkpYVm1zeFJWSnVjRlpOYWxaMlZtcEdTMk14VG5KaFJscE9ZbXMwTUZadGNFdFRNVTVYVkc1U1UySkZOWEJWTUZaTFZURmFkRTFVVW1oTlJGWkhWRlpXYTFkSFJYbGhSa0pYWVd0S2FGbHFSbUZrUjFKSlYyczFhVkl6YURWV2JHUTBZVEZaZUZkc1ZsTmhhMHBvVm14YVlWVkdXbk5XV0doVFRXczFSMVpITVVkV01EQjVZVVZzV0dFeFdsZFViRnByVTBaU2NscEdVbWhsYkZwVlZtcENWMU5yTVhOWGJsSnFVbGRTVjFSV1ZYaE9WbFY0WVVoT1YySlZjSGxaTUdoRFZtMUtSMk5GZUZkaGExcDZXa1ZWZUZZeFVuUmhSazVwVWpOa05sWnRNSGROVjBWNFZXNU9WR0pzU25OVmJURnZXVlphYzFkc1drNVdiWGg1VjJ0V01GWXlTa2hWYm5CYVlURndXRlpIZUZwbFYwWkhZa1prYVZJeFNUSlhiRlpyVkRGa1IxUnVTbWxTTTBKVVdXMTBTMlJzWkZkaFNHUlhUVlpLU0ZZeWRHOWhiRXBXVGxoR1ZWWnNXak5XYWtaU1pVWmFjMVJ0YUU1V1dFSmhWbFpqZDA1V1pITlhXSEJvVWxkU1ZsWnNXbmRoUmxwMFpVWmthbUY2YkZoVk1uTXhZVVV4ZFZremFGZGlXRkp5VkZWYVZtVkdXblZWYkZKcFVqTm9kbFpYY0VOWlZscHpWMjVXYWxKWFVuSlphMXBMVjFad1ZsWlVWbGROYTNCSVZUSTFkMVl4U2paU2JuQlhZV3RHTkZWcVNrOVNNazVIWVVkc1UySklRalZXYTJRd1dWWmFkRlpyWkZWaVIzaHZWVzB4YjFkV1ZuRlNhM1JZWWtad01GUlZhRzlXYXpGelYyNXdXbUV4U21oV1ZFcExWMVpXYzFGc1pHbFdSbHBGVmxSS05HRXlUbk5qUlZwaFVtMW9WRmxVVGtOWlZscFhWMjA1YUUxWFVraFdNalZQWVd4T1IyTkdhRlpoTVZvelZqQmFkMUpzWkhKa1IzQk9ZVEZ3U1ZaV1pEUmlNVlY1VTJ0c1VtRjZWbGhaVkVaM1lVWmFWVkpyWkdwaGVrWktXVlZhVjJGV1NuVlJiR2hYWWxoU2FGVjZSbE5XTVZaeldrWmthRTB4U2xWV2JURTBVakExUjJKR1dtaFNNMUp2VldwQ2QxSXhiSEpWYXpsWFRVUkdNVlZYZEc5V01rcFpZVVYwWVZac2NGUlpNVnBUWXpGa2RHVkhhRTVUUlVWNVZtMTRhMDFHYkZkVFdHaGhVbGRTY1ZWc1duZGpWbFowWkVoa1ZVMVdXbnBXTWpWclZHeGFjMk5HV2xaaVdHaHlWbXhWZUZac1pIVmpSbkJvWVhwV2VWZFdXbUZUTVZsNFZHNU9WV0pIVW05WlZFNURWbFphV1dORlpGZE5WbkJZVlcwMVMxbFdTWGxsU0VKV1lrWktXRll3V21GamJIQkZVV3hTVGxZemFGaFdSbHBYWWpKS1IxTnNaRmhpUjFKWVdXeFNSMVpHYTNsbFJscHNWakZhUjFZeU1UQlViRnBaVVZoa1YxSXphR2hYVmxwV1pVWmtjMVpzU2xoU01taFpWbGN4TkZsWFJrZGpSVlpUWVROU1dGbFljRmRXTVZsNVkzcFdWMDFXY0hsWk1HaGhWakpLV1dGR2FGaFdiVkpVVm1wR1lWZFhSa2RhUjJoc1lsaG9WVll4WkRCaGF6VldUVWhvYVZORmNGaFphMVV4VmpGc2NsZHVUazlXYkhCWldrVlNRMVl5U2tkalJXUldUVzVTZGxZeU1VdFhWMFpIVVd4a2FWZEhhRlZYVkVvMFZESlNSMU51U2s5V2F6VlBWRmN4YjFOR1duUmxSMFphVmpCV05WVnNhRzlXVjBweVRsWlNWMDFIVWxSV2ExcHpZekZXYzFwR1pFNVdiSEEyVmpKMGFrNVdXWGhUYmxKc1VteHdWMWxzYUZOVlJteFhXa1ZrVDJKRmNIbFhhMlJIVlRGYWMySXpjRmRpUjFJMldsVmFTMk14Y0VsV2JHUnBVbTVDVUZadE1UUmtNVlpYVjJ4a1lWSkdTbkpaYkZwSFRsWlZlV1JIUmxkaVZYQkhXVEJhYjFaV1dYcGhSWGhYVWxad2FGWnFSbGRqYkZKelZHczFhRTB3U1RKV2JYUnJUa1pzVjFkc2FGTlhSMUp4VldwS2IxWnNXbk5hUmtwT1VteGFlbFl5ZUd0V01ERlpVV3RzWVZKV2NGUlpWbHBMVmpGa1dXTkdaRmRsYTBsNlZrWmFZVmxXU1hoYVNFNVlZWHBzV0Zac1VsZFhiR1JYV2tSQ1ZFMXNXbnBXYlRWTFYwZEZlVlZzYkZaaVZGWkVWV3BHY21ReFpISmtSbVJPVmxoQ1dGZFVRbFpOVmxsNFYydGFXR0pIYUZoVmExWmhVMFpzTmxOcmNHeGlTRUpKV1d0YVQxWXlSWHBSYkZaWFlsUkdNMVY2UmxabFJsSlpZVVprYVZKc2NGUlhWbEpMVlRKT1IySklTbGRXUlZwWVZGWmFkMU5XY0VaV2FrSllZa1p3VmxWdGRITlpWbHBYVjJ4b1YySllhR2hhUlZwWFpGWk9jMWRyTldsaVYyaEpWakowVTFJeFRYbFZhMXBQVm0xU1YxbHJaRk5YUmxweVYyMUdVMVpzY0hoVk1qVnJWV3N4Y2sxVVVsWk5ibEp5VmxSS1MxTkhSa2hoUmxwcFYwWktiMVp0ZEdGV01rNXpZMFZXVldKWWFIQlZha1pMVjFaYWRFMUlaRTlXYkZvd1ZUSjBiMVZHV2tkWGJHUmFZa2RvZGxwSGVGcGtNV1J6WTBkNFYySkdjRFZXUmxwaFdWWlplRk5zWkdwU1ZFWlpXVlJHWVdGR2JEWlNiSEJzVWpBMVIxWnRlR0ZoVmxsNllVWldXRlpzU2xCVlZFWlBZekZrZFZWck5WaFNNVXBVVmtaYWExVXlWbk5YV0dob1UwVTFjRlZ0Y3pGVGJGWllaVWM1VjFac2NFZFpibkJEVjJzeGRXRkdVbGRpV0dnelZXcEdkMUl5UmtkYVIyaE9WbnByZWxacVNqUldNVmwzVFZWa1ZtSnJOVmxaVkVaM1ZsWnNkR1ZIUmxoU2JIQjZWakkxYTFack1WbFJhMXBXVm14S1dGWnFTa3RXYlU1R1drWmtWMlZyV2tsV2JGSkhWMjFXUjFSdVZsaGlSMUp3VmpCV1MxVldaRmhqUlhSVllsWmFTRlpYTlZkV01rcFlaVVpXVm1KSGFFUlpha1poVWpGd1JWVnNhR2hsYTFwWlZtMHhOR0V4V2xkWGEyUllZa2RTV0Zsc1VsZFJNVkpZWlVaa1dGSXhTa1pXVjNoclZUSktTVkZzYUZkU00yaFlWa1JHYTFOR1NuVlRiRkpwWW10S1dGZFdVa2RrTVU1SFYxaGtXR0p0VWxSWmJGVXhVMFpWZVdONlJsWk5WbkF4VlZab2IxWXlTa2RUYTJoWFlXdGFVMXBWV2t0a1ZsSjBZa1UxVG1KRmNETldiR1EwV1ZaTmVGWllhRmhpYTFwVldXdFZNVlpXVWxkWGJVWlhZa1phV1ZwRlpEQmhSbGwzWTBWa1ZXSkdjSEpXYWtaS1pXeFdjbVZHYUZkaVJsa3dWbFJDYTFZeFNuTlhiazVZWWtkU2NGWnRkSGRPVmxwelZXdDBUMUpyY0RCV1ZtaHZWa2RLYzFOc1FsZGlXR2hNVmpCYVlXUkhVa2xUYlhST1ZqRktXVlpzWkRCTlJsVjNUVlpvVm1KSGFGbFpWRVozWkd4a1YxZHJkR3RXYTFwNVZERmFkMkZXV2taWGFrcFlZVEpSTUZsVVJtdFhSbEp5VjJ4Q1YySkdjSFpYYkdONFRrWmtSMXBHYUd0U2VteFhWRlphZDAxR1ZYbE9WazVwVW1zMVIxVXllR0ZXTWtWNFYydDRWMUpXY0hsYVZtUlhVMVpTZEdOR1pHbFNWemt6VmpKMFYyRXdNVWRYV0doWVYwaENiMVZyV2t0WFJsWnhWR3hPVjAxV1NsaFdNblF3VmtaS2NtTkljRmROYm1oUVdWWmFZVkl4WkhOWGJHUnBWMGRvV0ZaR1dtRlNiVlpIWTBWc1UySkZjSEJaV0hCWFZsWmFXRTFVUWxwV2JWSllWMnRvUzFZeVNuUlZiR1JhVjBoQ1NGVnFSbHBsVlRWWFdrWmthR1ZyV2xsV2FrbzBVVEZhYzFkWWNHaFNSWEJvVld0V2QxUkdWblJsUm1ScVRWVTFlbGRyVlRGaFZrcFpVV3MxVjJKWWFHaFdWRVpHWlVaT1dXSkdVbWxoZWxaWFYxZDBZV1F4V25OaVJsWlNZbTFTYjFWdGVFdFdNV1J5Vld4T1ZrMVdjSHBXTW5odlYwZEZlVlZZWkZkaE1sSk1WVzE0WVdOV1VuTlhiV3hYVWxWWk1GWnRNVEJaVm14WFYyNUtUMVpzY0ZaWmEyUnZZakZzVlZKdVpGTldiSEJXVlZjeFIxWlZNWEpPVm1oV1RXcFdWRmxVUmt0ak1VNXpWV3h3VjFKWGMzaFdSM2hoVjIxV1IyRXpjR2hTTTBKUFZteGFXazFXV2xoTlJFWldUVlp3U1ZWc2FITmhSa3B6VTIxR1dtSkdTbGhWYTFweVpVWmtkVnBHYUZOTlJGWklWbXRqZUdReFZYbFRiR1JVWVd4YVdWWnRlR0ZYUmxKV1drVmFiRlpyTlhwV01uTTFWakZaZW1GR2FGZFNiVTE0VlZSR1MxSXlTa2RhUjBaVFZqRktXVmRYZUZkV01EVnpWbGhzYkZJd1dsaFVWM1IzVjBaVmVXVkZaRmROVlhCNlZqSTFTMVp0Um5KWGJrcFdZbGhOTVZacVNrdFNNWEJJWWtab1UxWllRVEpXYWtacVpESldSMVp1VWxkaVIxSlpWakJrYjFsV2NGaGtSMFpZVW14S1YxWlhkR3RXUmxwelkwWnNZVkpYVFRGV2JYaExaRVpXY21GR1pFNWliV2hOVm1wQ2ExTXlVbGRTYmtwV1lrZFNWRlp0TlVOVlZscDBUVlJTVmsxck5YcFdSelZUVlRKR05sWnNVbFZXUlhCMlZXcEdZV014WkhSU2JXaE9ZVEZaTUZacll6RlVNVlY0V2tWb1ZtSkdTbUZaYTFwTFYwWmFjMWR0Um1wTlZuQldWVzE0UzFSc1dYaFRhbEpYVm0xTmVGWkVSbFpsUms1MVUyeG9hVkl6YUZwWFZsSkhXVlV3ZUZkc2FHcE5NbWhVV1d0a1UwMVdXblJsUjBaVllrWndlbGt3V2tkV01WcDBWVlJDWVZKNlJsTmFWbHBQWTJ4a2MxZHRiRk5YUlVwYVZtdGFhMDVHVFhoVmEyUllZa2RTVjFsVVFURldSbEpZWkVoa2JHSkdjRWxhVldSSFZqRlpkMVpxVGxwTlIxSjJWbXhhWVZkR1ZsVlJiRnBwVW01Q1dWWnRjRWRXTWxKR1QxWmthbEp0VW05VVZ6VnFaVVpaZVdSR1RsVk5hekUwVmpKMGExZEhTa2hoUm1SYVlURmFURmRXV25kWFIxSklVbTE0YVZKdGR6Qldha28wVkRKRmVGZFlaRTlXVjJoWFdXeG9iMkZHV2tobFJUbFRZa1UxZUZadGVHdFViRnB5WTBWNFdHRXhTa05VVmxwclVqRmFjMkpIYUZOTk1FcFZWbTF3UzJJeFZuTlhibEpyVW14d1QxWnFRVEZUUm14eVYyMTBWMkpWVmpWV1Z6VkhWakpLVlZKVVFtRldWbkJYV2xWYVYyTnNjRWRXYld4VFYwVkdORlpzV210T1IwMTRWMnhvVkdFeVVsVlpWRVpMVmpGU1dHTkZaRlJTYlhRMFZqSjRhMkZ0UmpaaVJtaFdUVzVOZUZsV1dtdFRSMFpHVm14a2FHRXpRWHBXVmxKTFZHMVdSMVJ1U21GU2F6VndWV3BLYjJJeFdsaGxSemxTVFZaV05GWlhlR0ZXTWtwV1YyNUtWMkpZYUZoVWExcGhaRWRPTmxac1dtbFdXRUpLVmtSR1UxUXhaSFJTV0doWVlrWktXRlpxVG05WlZuQlhWMnhrYW1KV1NraFdNbmhyVlRGYVdWRnJjRmROVjA0MFZHdGFVbVZHWkhWVWJGcHBZVE5DVmxkWGVGZFpWbEY0Vm01R1ZXSlViRlJaYTFwM1YwWlplVTFVUW1oU1ZFWlhWR3hvZDFadFNraGhTRXBYVmtWd1RGWnNXbUZqTVZweldrZHNVMkpHV1RCV2JGcFRVakpGZVZSc1pGTmliRnBXV1d0Vk1WWkdiRlZTYm1SWVlrWnNOVnBGV210aE1ERlhWMjVzVlZac1dtaFdNR1JMWXpGa2MxcEdWbGRpU0VKdlZtMTBZVlV5VG5OalJWcGhVbXMxY0Zac2FFTlRSbVJYVm0xMGFVMVdjRWhWTVdoM1lVWktObUpHYUZwaVIyaEVWVEJhY21WWFRqWlNiR1JPVm10d05sZFdWbXRqTWtwSVUydGthbE5HY0ZoVmJURlNaREZrVjFkdGRHcE5WbkJhV1ZWYVlXRlhSalpXYkdoWFlsUkZkMXBFUmt0ak1rcEpVMnhhYUdWdGVGcFhWM1JoWkRGa1YySkdXbGRoZW14WlZXcENZV1ZXV1hsalJUbFhUVVJHU0Zrd1dsTlpWa3BYVmxSR1YwMUhVa3hWTUdSWFVqRndSMXBHWkU1TmF6UjZWbTB4ZDFJeFZYaFVibEpYWVRGd1VGWnNaRzlXVm14VlUyMDVWMVp0ZURCYVZWWXdWakpLU0dWRVFtRldWMmh5V1ZWYVMyTXhaSFZoUmxwcFYwZG9lVmRXVWt0VE1VcHlUbFpzYVZKdVFsaFdiWGgzVlZaa1YxWnRSbFJpVmxwSVZrYzFTMkZXU25SaFJ6bGFWMGhDV0ZWc1dtRmpNVnAwWkVaa1RsWnVRalpXVkVvMFl6RmtTRk5yWkdwU2JFcFdWbTV3VjJSc2JIRlNiWFJZVWpGS1NWVnRNVEJVYkZwVlZtdHdWMVpGYjNkV2FrWlhaRVpPY2xkc2FHbFNNbWhZVmtaV2ExVXhWa2RWYkdoc1VqTlNXRlp0ZEdGTlJuQkdXa2hPVldKVmNFZFdNV2gzVjBaWmVsVnNhRnBoYTFwaFdsWmFUMk15U2tkVGJXeFhVak5vV1ZZeFkzZE5Wa1Y1Vlc1T2FWTkdTbk5WTUdSVFZrWlNXR1JIUmxOTldFSkhWMnRvYTFaWFNraFZhMlJXVFc1b00xWnFSa3BsYlVaSlUyMUdVMUpZUWtsV2JURjZaVVprVjFWdVRsWmlWM2h2V2xkNFlWWXhXbkpYYkdSWFlYcEdXRll5ZEd0aGJFcFhWMnhTV21KWVRYaFdNVnBoWkVkV1NGSnJOVk5pUlZrd1ZtMHdNV0V4V25SVGJHUllZbTVDVjFSWGNGZFhSbHAwWXpOb2FsWnNjREZaYTFwWFlVVXhjMU5yTVZoV1JXdzBWWHBHUzJNeFduVlRiRUpYWVhwV1VGZFhkRmRrTVZKelYyNU9ZVk5IVWxSVVYzaEhUbFphVjJGSE9XaFdhelZIV1RCa2IxWnRTbFZTYkZKWFlURndhRnBGVlRGV2JGSnpZVWRzVTJKclNtRldhMXBoWVdzMVdGSnJaRlJpYXpWd1ZXdGFkMWxXV25OYVJrNXNZa1p3ZVZkclZtdGhiVXBXVm1wYVdsWldjRE5XYWtaYVpVWk9jazFXWkdoaE1IQnZWakZhWVdFeFNuSk9WbVJoVWpKNFZGbHJhRU5WUm1SWVRWaHdiRkpVVm5wV01uaFhWVEpLU0ZWc1pGcFhTRUpZVldwR2MwNXNVblJrUjJoWFlYcFdTRlpxU2pSUk1WbDVVMnRrYWxKRk5XRldiRnAzVjBacmVGZHJPV3BXYkVvd1drVlZNVll5U2tsUmEyeFhZbGhTYUZaVVJscGxWa3B5V2taU2FXRXpRbFpYVnpFMFdWWmFjMWR1VGxoaVNFSnlWRlphVjA1V2NGWldiVVpvVFVSR1Yxa3dVa05XVjBwSFkwWlNWMkZyV21oV2JGcGhZMnhXYzFwRk5XbGhNSEJHVmpGb2QxSXhUWGhUV0doVVltczFiMVZxUW1GV1JsbDNWbXQwVjFKc2NFaFdiWGhyVjJ4WmVGTnNhRmRpUjJoMlZtcEtSMDV0U2tkVWJIQm9UV3N3ZUZaR1VrZGpNazV6VjI1T1ZXSkdjSEJWYlRFelRWWmFjMXBFUWs1U2JIQjZWakowWVZaSFJYbGhSMFphWWtkb2RsWlZXbUZrUjFaSFZHMXdhVkpVVlhkV1Z6RjZUVlpWZDAxSWJHaFNWMUpZV1d0YWQyRkdiRlZUYTFwc1VteEtNVlpIZUU5WFJrbDRVMnhXV0ZZemFGUldha1poVmpGa2RWUnNaRmRTVm5CVVZrWmFhMVV5VmtkV2JHaFBWbFJzVjFSV1ZuZGxWbGw1WlVoT1dGSXdWalJaTUZadlZqRmFSbEpxVWxaaGExcHlXa1phWVdNeVJrZGFSMnhUWW10R05WWnRlRzlrTVUxNFZGaG9WRmRIZUZaWlZFbzBWa1pzV1dOR1pGZFNiRXBaVkd4ak5WWnJNVmRqUldoWVlURktWRlpyVlhoak1VcHhWV3h3VjFKVVZqWlhWbHBXWkRKV1YxWnVUbE5pUm5Cd1ZqQmFTMU5XV2toTlZGSlhUVmRTUjFSV1ZsZFdNa3BZWVVoQ1ZtSkdjR0ZhVjNoaFZsWk9WVkpzVms1V01VcEpWbXBLTUZsWFJuTlVhMlJxVWpKb1YxbFhjekZXUm5CWVpVWmFiRkp0VWpCVmJURXdWakF4U1ZGcmNGaFdNMUpvVmtSR1UyTXhaSFZWYkVKWFVtdHdXVmRXWkRCWlZscEhWbGhzYW1WcldsbFZiWFIzVjJ4c1ZscElaRlpOYTNCSFdUQmpOVll4U25SVVdHaFhWa1Z3VUZacVJtRmtWa3B6VTIxc1ZGSlZjRFZXYTFwaFlUQTFSMWRZYUZoaE1taFFWbXhvVTFac1VsWlZhMlJVVm01Q1YxWnRNVWRXTVZwVlVtdGtWV0V5YUhKV2JURlhZMjFPUm1WR2NFNWhhMXBSVmxSR1lWVXlUWGxVYTJocFVtMVNWRlp0TlVOVE1WcHhVMnBDVjAxWGVGbFdWbWh2VjBkS1IyTkZPVmRpUm5Cb1dXcEdWMlJIVWtoU2JGWk9WbXR3V0ZadE1ERmhNVkowVTJ0b1ZtSkdjRmRXYWs1T1RWWmFXR016YUdwaVZUVkhXVlZhZDFZeFNsVldhbHBZVm14YWFGWkVSa3BsVmxKeVYyMTBVMkpJUWxCV1Z6QXhVVEpKZUZkcmFHeFNNRnB4VkZkek1XVnNhM2RXYlhSYVZtdHNObFpYZUc5WGJVcElZVVpPVlZac2NHaFZiRnBMWkVkU1JrNVdUbWxYUjJoYVZtMHhOR0l5VFhoaVJtUlZZVEZ3Y1ZWdE1UUlpWbXh5VjJ0MFZGSnVRbGxhVldoUFZESktSbU5FUmxoaE1YQnlXVlphUzJNeVNYcGFSbWhwVW14d2VWWkdWbUZXYlZGM1RWWmFZVkl6UWxSVmJGSlhWMnhhZEdORk9WWk5hMXBJV1RCYWIxUnNXbGxWYmtwV1lsaE5lRlJXV21GWFIxWkdUMWRvVjAxSVFraFhWRUpxVGxaWmVWTnJaRlJoTTJoWVZtdFdkMUl4Y0ZaWGJFNVlWakJhU0ZZeU1YTmhWMFYzWTBoYVYyRXhjR2hXYWtaUFkyc3hXVlJzV21saE0wSnZWbFJDVmsxV1dYaFhia1pTWW0xU1ZGUldaREJOTVd4V1ZsUldXRkl3Y0ZkWk1GcGhWbTFLV1ZWdVdsaFdiSEJNVm1wS1QxSldVbk5hUjJ4VFRWVndWVll5ZUd0T1IwVjVWRmhzVldFeVVtaFZiWE14Vmtac1ZWUnJUbFppUm5CNlZqSjRUMVpGTVhKTlZGSldZbFJXVUZsV1ZYZGxWbFoxVVd4YWFWSnVRazFXYkZKSFdWZE9WMVJ1VGxWaVJrcFBWbTE0ZDFZeFdsZGFSRUpvVFd0YVdWVXlkR0ZVTVZwMFZXeG9WbUZyTlZSV1JWcHJWakZhV1dGR1VsTk5WbkJJVm0weE5GbFdXWGxUYkdSVVltMTRXRlpyVm5aTlJsWjBUVlpLYkZKck5URldWM00xVmpKS1JtTkdiRmRpV0doVVZtcEdTMUl4WkZsaVIzQlRWbFJXZUZaR1dsZGtNVTVIVm01U2JGSjZiR0ZXYlhSM1YyeFdXR1ZGT1ZkV2JIQllWakl4YjFsV1NuTmpSbVJoVmxad2FGa3ljelZXTVU1MFlrWk9iR0pZVVRKV2FrWnJUVVpaZUZaWWFGZGlhelZaVmpCa05GWXhiRlZVYkU1WFRWWndlVlp0ZERCV1JrcDBaVVJDWVZaV1ZURldha3BMVWpGa2RXRkdaRmRsYTFveVZteFNSMWR0Vm5SU2ExcHFVbTFvV0ZsclduZE5iR1JaWTBWa2FrMVdiRFJYYTFwellVWkplV0ZJVGxwaE1YQXpWbTE0WVdSSFRrWmpSVGxUVmtWYVdWZFhkR0ZXTVZwSVVsaHNWbUpIZUZoWmJHaE9aVVphZEdWSVRtcGlSMUo1VjJ0YVlWUnNXbGxSYTNCWVlURktVRnBFUm10U01XUjFWR3hvYVdKSVFsaFdiWEJQWWpBeGMyTkdXbUZTVkd4VVZGZDBZVk5HV25STldFNVhUVlZzTmxsVlVrOVdNREYxWVVkb1YyRnJXbEJhUlZwaFkyeHdTR0ZGTlU1aWJXaFJWbTB4TUZsV1RYbFVhMlJYWW10YVUxbHRNVk5VTVZaMFpVaGtWRlpzU25wWGExWnJWMGRLUjJOSWJGcGhNVXBVVm1wS1MxWldXblJoUm1Sb1RXeEtTRmRzV210U01VcHpWbTVPYWxKdFVsaFVWbFozVm14YWMxVnJUbHBXTVVvd1ZtMDFUMVV5U25KT1ZrNWFZa2RvZGxZd1dtRmpNV1J6WTBkNFYySklRalpXYlRCNFRVZEdjazFXYUd4U2JYaFhXV3hTVjFaR1dsVlRhMXBzVmpCYVIxUXhXbXRVYkVwMVVWaHdXRlpzV21oV2FrcFBZekZhZFZOc1VtaGxiWGhWVjFkMFlXUXhTWGhYYmtwaFVrVktWbFJYZEdGV01WSlhZVVYwVlUxV2NGaFdNbmhyVmpKS2RWRnJaRlZXVm5CaFdsWmtUbVZ0Umtoa1JrNU9VbTVDU0Zac1VrdE9SbFY0VjFob1dGZEhlRzlWYlRFMFYxWnNjbGR1WkdwaVJsa3lWVzF6TlZVd01WaFZha1pYWWxob2NsbFdXazlTYkU1elVXeG9WMkpWTkRCV1IzUnJWakZaZUZwR2JHbFNNMmhVVm10a05HUXhaRmhsUm1SWFRVUldTRmxVVG10aFJrcHlUbGM1VjJKWVRYaFZha1pUWXpGd1NFOVdaRTVoTTBKSlYxUkNWMDVHWkhSV2JrcFlZV3MxVjFsc2FHOU5NVlowWlVoa1ZGSXdOVWhXUjNNeFZrWktWbU5GZEZkaGExcDJXa1JHVDJOck1WZGhSazVwVWpKb1ZsZFhkR0ZrTVdSWFlrWm9hMUpZVWxsV2JURTBaVlphYzFWclpHaGlWWEJKVmxjMWMxWXlTbGxSYTFKWFlXdGFZVnBFUVhoV1ZscHpZVWRvVGxkRlNrcFdNV1F3WVRGSmVWUllhRlZpYkZwb1ZXMHhVMWRHV25GU2EyUk9UVlp3ZVZaWGREQldSMHBYVjJ4b1YxSjZWbEJaVlZwTFkyeE9jMkZHVmxkU1ZuQk5WbXhTUjFsV1dYbFNhMnhoVWpOQ1QxbFVTak5OUmxwMFRWUkNhVTFYVW5sVVZXaHpWbTFLUjFkc1dsZGlSMUpUVkZWYVYyTXhaSE5hUm1ST1YwVktTbGRyVm1GVk1rWlhVMnhrV0ZkSVFsaFdibkJEVFRGU1YxZHRSbE5OVjFKNlZqSnpOVll4V2xWV2JIQllWbTFSZDFWNlNsZGpNVnAxVTJ4b2FFMXNTbHBXVnpBeFVURkplR0V6WkZoaE0xSldXV3RXZDFkR2EzZFZhMlJYVFZad1IxWXllRzlXTVVwR1YydG9XbVZyY0V0YVYzaDNVMGRLUjFSc1pHaE5NRXBXVm0wd2VHUXhUWGhXV0doVlYwZG9XRmxyV21GVk1XeFZVMnhPYWxKdGVIbFdiRkpIVmpBeFYyTkZiR0ZTVmxsM1ZqSjRZVlpXU25KaVIwWlhWbXh3V1ZadE1UUlpWMUpIVm01V1ZHSkdjRTlaYlRGdlUwWmtjbFZyWkZSTmJFcEhWR3hhYTFadFNraFZiR2hYWVRGd2FGVnNXbUZqVms1MVdrWk9UbFpXV1RCV2EyUXdZVEZhU0ZOcmFHaFNNbWhYV1ZkMGQyUnNXbk5YYkdScVRXdGFSMVpITVRSaFZrcDBaSHBHVjFKc2NIWlhWbVJHWkRBeFdWTnNhR2xTTW1oWVZtMHdlR0l5Vm5OWGJsSk9WbGhTY1ZsclZURk5WbFowWlVoa1YwMUVRak5WTW5SVFZqRkplbFZ0YUZkaGExcE1WbXBHVjJSV1RuTldiV3hYVFRKb1VWWXhXbTlrTVZsNFUyNU9XR0pIVW1GVVZFcHZWVVpXZEUxV1RteFdiRXBZV1ZWYVQyRkdTbkpqUldSYVRVWndXRlpxU2t0VFJsWjFWMnhrVGxKdVFYcFdiWEJIWkRGS2RGVnJaRlppUlRWd1ZUQldSMDVHV25STlNHaFBVakZHTkZaWE5WTlZNa3B6VTI1T1ZrMUhVVEJXTUZwVFYwVTFXRTlXV2xOaVdHZDNWa1phVjFsWFNrZFhiazVVWW0xNFlWWnNXbmRWUm14V1drVmFhMDFyTlVwV01uaHJWakpLUm1ORk1WaGlSMUkyV2tSS1YxSXhWblZVYkdocFVtNUNXVlpYTVRCa01WSnpWMnRrVjJKVWJGTlVWVkpIVTBaWmVXVkhPVlZpUm5CSVZUSXdOVll5U2xsVmJuQlZZVEZ3WVZwVlpFZFRSMUpIWVVaT1RsTkZTa3BXYkdONFpERlJlRmRzV2s1V1YxSnhWV3hWTVdGR1duRlViVGxVVW01Q1IxWnNVbGRYUmtsM1RsVm9WazF1VFhoV1ZFWnJVbXhPVlZOc1pHbFhSVXBKVm14U1IxUnRWbGRVYkd4cFVteHdjRmxVVGtOa01WcFlaVWQwVDFKdFVraFphMmhUVkd4YVIxTnVSbFppV0dob1dsVmFWMlJGTVZaYVJsWnBVbTVCZDFac1pEUlpWbHB5VFZaa1ZHSkhhR0ZXYkZwWFRrWlplRmRyWkdwTlZuQjZXVlZrYjJGRk1YRmhNM0JYWVd0YWFGbFVSazVsUm5CR1lVWmthRTF1YUhoV1Z6QjRZakpPUjFadVVteFRSMUpZVm0weFUxZFdjRVphUkVKWFlYcEdWMVJzVm05V2F6RnhWbXhvVjFaNlJreFdNR1JYVWpGV2MyTkhiRmhTVkVVd1ZtdGFZVmxYUlhoYVJWcE9WbGQ0YjFWdGN6RlVNV3h5Vm01a1ZGWnRVbFpWVnpGSFZtc3hXR1ZHYUZaTlYyaDJWbXRrUjA1c1NuTmhSbkJYVWxoQ01sWnNWbUZqTWxKSVZtdGtZVkpzU2xoVVZXTTBaVlphVjFremFHbE5WbXcxVld4b2EyRnNTa2RYYkdoYVlUSlNVRlJyV2xOamJIQkdXa1prVGxaVVZtRlhWbFpoWWpGa1IxTllhRlJpU0VKWlZtcE9VMkZHVlhsTlZtUnFUV3MxUjFsVlpEUldSa3BWVm14c1YySllhRlJXYWtaS1pVWldkVlJzWkdsU1ZGWjJWbGN4TkdReFdYaFhXR3hQVm0xU1dGbFljRWRYUmxsNVpVVk9WMkpHYkRaWlZWSkxXVlpLUm1ORmVGWmlXR2hZV1hwR1QyTXhjRVpPVjJ4VFYwVktUMVp0TVRSWlZsVjRVbGhvVkZkSGVGVlpiWE14Vm14c2NsZHVaRmRpUjNoV1ZWYzFhMkZHU25OVGJHUllZVEZLVkZaVVJtRmpNV1J6WVVab2FFMXNSak5XYlhSclV6RktjMWR1UmxWaVJuQndWbXRXUjA1R1duUmtSMFphVm14d2VWUnNXbUZXVjBwSVlVYzVXbFpGU2pOVWJYaGhWMGRTU0ZKc1RrNVdNVXBKVjFSQ1YxbFhSbk5UYmtwcVVsUnNWMWxyV25kTk1WSlhWMjFHVjFacmNIcFhhMXBYVkd4YVYyTkVXbGhXTTBKUVdWUktSMVl4VG5OYVJtaHBZVE5DVjFadGRGZFpWVEI0WWtaYVdHSkhVbkZXYlhNeFpVWmFTRTFVVWxkTmEzQklXVEJXZDFZd01WZFRiRUphVmtWYWFGVnRjM2hXYlVaSVpVWk9WMkpJUWxsV2JUQjNaVVpWZVZSdVRsZFhSM2h6Vld4YWQyTnNVbGRXYm1ST1VteEtlbFl5ZUU5V01ERlhZMFphVjJKWVVsUldha0Y0WkZaR2NsVnNjR3hoTVhCTlZsZHdSMU15VFhsU2EyaFRZa1UxV1ZWc1ZuZFdWbHB5VjJ4a1YwMVhlRmxXVjNoclZqRmtTR0ZHYUZwWFNFSjZWbFJHYzJOc2JEWldhelZPVmpOb05WWnRNVFJVTVZwMFUydGthVkpHV2xoV2FrNVNaREZhZEdWSFJsTmlSVFY1V1ZWYWQyRldaRWhoUmtaWFlsUkZNRlpVU2s5ak1WSjFWV3hPYUdWc1dsVldSbEpMWWpGSmVGZHVUbGhpVlZwdlZGZDBWMDVHV2toT1ZUbFhVakJXTlZwVlpHOVdiVVY0VjJwT1YwMVdjSHBXYkZwUFl6RlNkR1ZIYkZOaE0wSmhWako0VjFZeFVYbFNiR2hUWVd4d1ZGbFVTbE5oUmxaelYyMUdUazFXY0ZsWmVrNXZWVEpLU0ZWcVJsZGlXR2hvVmtkNFlXTXlUa2RTYkdSWFlsWkZkMWRyWTNoVmJWWlhWRzVLV0dKR2NIQlZiR2hEVjFaYVIxcEVVbFJOVmtwSVZqSjRhMVp0UlhkT1ZsSlZWak5TTTFwWGVHRlRSMVpJVW14a1YwMUdXWHBYVkVKcllqRmFWMWRzYUZaV1JVcFhXV3RhZDFkR1duRlNibVJVVWpGS1NGWlhNWE5WTVZwellrUmFWMkpIVGpOYVJFRjRWakZrY2xwR2FHbFNia0pSVm0xNFZrMVdaRmRpUm1oclVqQmFWRlZ0ZUdGbGJGcHpWV3hrV0ZKc2NERlZWM1J6VjJ4YVYyTkdVbGRXUlZwb1ZtcEtUMUpXU25OYVJUVm9ZVEZXTTFadGRGTlNNVWw1Vkc1U1ZsZElRbTlWYlhSM1kwWmFjbGR0UmxaU2JIQlpXbFZqTlZack1WWk5WRkpYWWxob1dGWlhNVVpsVmxaMVVXeHdhRTFXVmpSV2JYQkhXVlpPU0ZWcldtdFNia0pZVm10V1lWTnNaSE5XYkdSWFRWWndlbFl5TlZOV2JVcHlZMFprVlZaNlZuWlZha1ozVWxaS2NtUkhkRk5XUmxwWlZteGtOR0V4V1hoWGEyUllZVEZhV0ZsWGRIZE5NVlpWVTJzMWJGSnJOWGxYYTFwUFlWWkplV0ZIT1ZkV00yaDJWVlJHVm1WR1ZuTlhiR1JwVmxad2VWWnRNVFJXTURWSFYyNVNhbVZzV2xkWmJGWjNVMVpSZUZWc1RsZGlSbXcyVmxkNGIxWXhXbGRqU0VwV1RVWndXRnBGVlRWV01XUnlUbFpPYVZORlNrdFdha1pxWlVVMVNGUllhRmhYUjJoeFZXeGtVMk5XVm5GUmJVWlZUVlpXTTFZeWREQlZNa3BIWTBod1dGWkZOWEpaYTFwS1pERmtjbUZHWkU1V01tZDZWMVpXWVZReFNuSk9WbVJoVW01Q1dGVnNhRU5XVmxweFVXMUdWazFXY0hwWGEyaFhWbGRLU0dGR1VsVldWMmhFVlhwR1lXTnNjRVZWYld4T1lUTkNTVlpxUm05aU1WVjVVbTVLVDFadGVHRlpWRVozVFRGd1NHVkdaRmRXYXpWNVdrVmFUMkZXV2xoa2VrcFlWbXhhVjFSV1dsWmtNREZaVkd4U2FWSlVWbGxYVjNodlZURmFSMVpzYUdwbGExcFlWRlphUzJWc1dYbGxSbVJvVm0xU1NGVXllRmRXTVVwMFZWaGtXbVZyUlhoV2FrcFBVakZrZEZKc1RsTldXRUp2Vm0wd2QyVkdWWGhUV0docFUwVndiMVZ0TVZOWFJsWnpWV3RrVjAxV1NucFdiWGhQVmpGWmQxZHViRlpOYWxZelZtMHhTMUl4V2xWU2JGcG9UV3hLVlZaWE1UUlpWMDE0V2toT1lWSXphSEJXTUdSclRrWmFkR1ZHVGxOTlZtdzBWbFpvYjFVeVNuSk9XRUpWVmtWd1ZGa3dXbGRqTVdSeVpFWmFUbFp1UWpSV1ZFbzBWREZhUmsxV1pGaGlSbkJYVm1wT1UyTnNiRmRhUlhSVFlYcFdXRmRyV210Vk1EQjRVMnN4VjAxV2NGZGFWVnBQVTBaYWNsZHNaR2xTYmtKWlYxZDRZVk15VmxkWGJGWlVZV3hLVkZsc1drZE9SbFY1VGxaT1ZVMVdjSHBWTW5odlZqSktSMU5zYUZaaE1YQmhXbFprVDFKc1VuUmpSVFZYVjBWS1NsWnNZM2hPUjBsNFlrWmtWR0pIZUZOWmExVXhWbXhhYzFkdFJtaFNia0pJVmpJeFIxWXlTa2RqUkVKaFVsWndhRlpITVVkT2JGcHlZMFprYVZJd01UUldWbEpIVmpKU1IxUnVUbWxTYTNCd1dWUkNkMWRHWkZkYVJFSlVUV3RhU0ZaWE5WTmlSazVHWTBoT1dtSkdXbnBVYlhoclkyeHdTRTlXWkU1aE0wSTFWbFJLTUUxR1dYaFhhMXBvVFRKb1dWWnRNVk5UUm13MlVtczVXRll3V2toV1Z6RnZZVVV3ZDFOdVdsZGlSMUYzVm1wS1QyUkdWbGxoUjJ4VFlsWktXbGRXVWtKTlYwNUhZa1pzYWxKWFVsUlVWbWhEVWpGYWRFNVhkRmRpVlZreVZXMTBhMVl3TVhGV2JHaFhZbGhPTkZacVJtdGpNVVp6VjJ4a1RrMXRaRFZXTW5SVFV6Rk5lRk51VGxkaWF6VlZXV3RrVTFReGJISldibVJWVm14d2VsWXllRTlWYXpGV1lrUldWazFxVmxCV2JHUkxVakpPUjFkc2NGZFNWVzk2VjFaV1lWVXhXbk5qUlZaV1lrVTFXRmxyV25kWFZsbDVaRWQwVGxKc2NFbFZNblJoVmpKR2NrNVdaRnBpUmtwRFdsVmFZV05zWkhSU2JHUm9aV3hhV0ZaclpEUmlNa1pJVWxoa2FsSkdjRmhXYWs1VFlVWldjVkp0ZEZOTmF6VkhWakl4ZDFVeVJYcFJiRUpYVmpOb2FGcEVRWGhXTVdSelZteE9hVkl4U2xkV1JscFhXVmRXVjFWWWFGZGlXRkp2Vm0xek1WTkdXWGxsUnpsWVlrWnNObFpYZERSWGF6RjFZVVpvWVZKdFVsQlZNVnBUWTJzMVYxcEhhR3hpUm5CYVZtMXdTMDFHV25KT1ZtaFRZbXR3VDFadE1XOWpNVlowVGxWT1dGSnNXakZaTUZwclZHc3hWMk5HYUZkTmJtaG9XVlJCZUdOck5WWmpSbHBPWW0xbmVsWnJZM2hTTWs1elUyeHNhRkp0YUc5VVZsWjNVMVprV1dORmRGWk5WbXcwVmpJMVYxWXlTa2hWYlRsVlZrVktURnBIZUd0V01YQkZWV3h3VjJFelFrbFdha1p2WWpGYWRGSnFXbWxTYlZKV1ZtcE9UbVZHVlhoWGJGcHNVakJhU2xaSGVGZFViRmw0VTJ0MFYxWnRVVEJWZWtaaFl6RndSbUpHU21saWEwcG9Wa1pXWVdRd01IaFdia1pVWVRKU1ZGUldXa3RsVmxKelYyczVWV0pGYkRaWFZFNXZWakpGZVZWWVpGZFNSVVkwVldwR1QyTXhjRWRhUjJ4VFRXMW9VMVp0TURGa01WbDRWMnhrV0dKck5WaFdhMVpoVlRGU1YxcEdUbXhTYkZwWlZHeFZOVlpyTVZaalNHeFhUVzVvZWxZd1pFWmxSbVJ4Vkd4a1YwMHdOREJXVnpFMFlUSlNWMWR1VGxoaGVsWllXV3RvUTFWc1duTlhiWFJQVWpGS01GWldhSE5XUjBWNFkwWmtXbUV4V2pOV01GcFRWMGRXUm1SR1ZsTmlTRUpaVm14a01GUXhWWGROV0VwcVUwaENXRlZxVG05aFJscHpXa1ZhYTAxck5VbFpWVnBYVmpGWmVGSllaRmRXTTJob1ZtcEdXbVZIVGtaaFIzUlRZa1Z3ZDFaWGVHRlhiVlp6VjJ4b1RsTkhVazlXYlhoM1UwWlplV1ZIUmxWTlZuQlhWR3hhYzFkc1dYcFZhM2hoVmpOb1dGbDZSbmRTTVhCSFZXeE9UbFpZUWt0V01WcFhXVmRKZUZaWWJGUmlSM2h2Vld0V1lWZEdiRmhrUjBaWFVteFpNbFZXVWtkV1JrcHlZMGhzV2xaV2NGaFdNRnBQVW14T2MxcEdaR2xYUmtwNVZrZDBZVlJ0VmtoVGEyeFZZa2RvYjFSVVJrdFZWbHAwVFVob1QxSXhXa2hXTW5SdllURktWV0pIT1ZaaVJrcElXbFphYzJOc1ZuUlNiR2hUVFVaWk1WZFdWbUZpTVZsNFUyNU9hbEl3V21oVmExWkdaVVphYzFkck9XcE5helZKV1d0YWExVXlTa2xSYkdSWFlXdGFjbFJWWkVabFJsSlpZa1phYVZJeFNsbFhWM1JyWWpKT1IxWnVVbXRTTUZwdlZXMDFRMWRXY0VaV2FrSlhWbXh3ZWxadGNGTldNa3BaVkZSR1YxWjZSa3hWTUZVMVZsWlNjMk5IYUU1V2JrSldWbTE0YTA1R1pIUldiR1JYWW10d2NsVnRlSGRYUmxaelZtNWtWRlp0VWxsVVZsSlRWbFV4VjJOSWNGZFdlbFpNVm10a1MxWnNaSEpQVmxwb1lYcFdNbFpYTVRSWlZsbDRXa2hTYTFJeWFFOVdiRkpYVG14YVdHVkhPV2hOVmxZMVZUSjRWMVl5U2tkWGJHaGFZVEZ3VjFwVldsZFdWa3AwWkVkd1YyRXhiM2hXYTJRMFZERlZlVkpZYUdwU2JrSllWRmMxVTFkR2NFVlNiR1JxWVhwR1YxWXllRzloVjBwSFkwWm9WMUpzY0doWFZscFhVakZhYzJGSGVGUlNia0o1Vmtaa01HUXhTWGhYYkdoc1VsaFNXRlJWVWtkbGJGVjVaRVJTVjAxV2NIcFZNblJUVm0xR2NtTkZlRnBsYTFwb1dUSjRhMlJHU25OVWJHUnBZVEJ3TWxadGRHRmhNREZIWWtaa1ZXSnJOVmhXTUdRMFZERmFjbGRyZEZwV2JIQjRWVmN4UjJKR1NuTlhiR3hWWWtaYVVGWnFTa3RTYlU1R1drWndUbEp1UWxWV2FrcDZaVVpPUjFadVRsSmlTRUpQVm0xNFdrMUdXbGhsUjNSVFRWVnNORlV5TlV0VU1WcFZWbXhTVjAxR1draFViRnBoWTFaS2MxUnNTazVXYTFrd1ZsZDRiMk14V2toU1dHeFdZbFJzVmxaclZuWk5SbXh4VW14YWEwMVhVakZYYTFwVFZHeGFjMWRZY0ZkaGEydzBWV3BHVW1WR1pIVlZiWGhVVWpOb1dsZFdVa2RrTWs1ellrWldVMkpWV25KVmFrWkxVbXhhZEdWR1pGVmlSbXcwVlcxd1QxWXdNVmRqUjJoWFlsUkdXRlpxU2s5U2JVcEhWVzFzVkZKVmNGRldiR1IzVWpGTmVGUnNaRmhoTWxKWVdXeG9VMVpHVWxkV2JtUlVWbXhhTUZrd1pFZFhiRnB5WTBad1ZsWXphRlJXYlRGR1pWWldkVk50UmxkaVNFSllWMnhhVm1WR1NsZFRiazVXWVhwV2IxUlVRa3RUTVZwelZXdHdUbFpzVmpSV2JHaHpWa2RLY2s1V1ZscGlSMUoyVmpCYWMxWldTbkprUmtwT1ZtdHdOVlpxU2pSaE1WVjRWMjVPVkdKdGVGaFZibkJIWld4YVNFMVZaRTlpUm5CNVZqSjRhMVl5U2xaT1JFSlhVak5TYUZsVVNrOWphekZYWWtaYWFWWXlhRlZXVjNodlVURmFjMWR1VW14U00xSndWRlprVTFOR2EzZFhiWFJhVm10d1dsWlhlRmRXYlVwWllVUk9WVlpzY0doYVJXUlhVMVp3UjFadGJGZFdiVGt6VmpKNFYySXlUWGhYV0dST1YwWmFiMVZ0ZEV0WlZteHpWV3RrVTAxWVFsZFhhMVUxVmtaYWMxZHFRbHBoTVhCVVZsUkdZVkl4WkhWWGJHUnBWa1ZWZDFZeFdtRlViVlpYVld4c2FGSXpRbFJXYlRWRFlqRmFXR1ZIZEZaTmF6VllWbTAxUjFWdFNuUlZiRlpXWWxSRmVsUlhlRlpsUmxaeVdrZG9VMkpIZDNwWFZFSmhZVEZaZDAxWVZsSmhNVXBZVkZWa1UxUkdWblJqZWtaWVZtczFlbGxWWkc5VWJGcDBaRE53VjJKVVJUQlpWRVpUWkVaYWMxcEhjRk5XTVVwVlYxZDRiMkl5U1hoaVNFcFhZbTFTVDFSV1duZGxiRnAwVFZSQ1ZVMVZjSGxVVmxKWFZtc3hkVlZ1V2xkaE1sSk1XWHBHVDJNeFZuTmpSMnhZVWpKb1RsWXhXbGRaVm14WVZHNVNVMkV5YUhKVmJGSlhZMFpXY1ZKcmRGaFdiSEI2VmpKNFQxVnJNVmRqUm14V1lrZG9jbFpFUm10VFJsWnpXa1prYVZaRldsVlhWRW8wVm0xV1dGWnJXbGhpV0ZKUFZteG9RbVF4V2tobFIwWldUVlpzTkZZeWVGZFdNa1Y0VTJ4b1ZWWjZWa1JWYTFwelRteEtjbVJHVGs1V1dFSTJWMVpXYTFJeFZYaGFSVnBVWWtaS1dGVnRlR0ZYUm1SWFdrWk9WMDFXY0ZwWlZWcHJZVWRXZEdWR1VsaFdNMUp4Vkd4VmQyVkhTa2xUYkdScFVsUldXRmRYZEdGak1EVlhWMnhvYTFKRlNsaFphMXAzVWpGVmVXUkhPVmhpVlhCYVdWVmFRMVl5U2xsaFJsSmFUVzVvVUZwRldrdGphelZYVkdzMVRtSlhhRWxXYlRFMFdWWnNXRkpZYkZOWFIyaFdXVzF6TVZaR1dYZGFSazVYVW0xNGVsWlhlR3RXTVZwelkwaHdWMkpHU2toV1YzTjRWMFpXZFdGR1dsZGxiRnBSVm14U1IxZHRWa2RhU0VwcFVtNUNXRlp0ZUhabGJGcHpWV3RLYkZJeFNraFpNRkpoVlRKS1NGVnJPVnBpVkVaMldsWmFZV05XVG5WalJUbFhZa2hCZDFaVVNqQmpNVlY1VTJ0YVZHSkhhRlpXYTFaaFZFWndTR1ZIUm1wV2ExcDZWMnRrZDJGSFZuTlhiR3hYWWxSRmQxZFdXbUZqTVdSeVdrWm9hV0V6UWxkV2JYQlBWVEpHUjFaWWJHeFNiVkpZVkZab1ExTldjRVpYYm1SWFRXdHdTVnBFVG5kV01VbDZZVWhhV0Zac2NISmFSVnBQWkZaV2RHVkdUbGRoTTBKWVZtMHdkMlZHVlhoV2EyUnFVbFp3YUZWdE1WTldWbFp4VW0xR1ZGWnRlSGxYYTJoUFZqQXhWMk5GYUZkaVdFSllWbXBLUjJOdFNYcGFSbkJYVWxad2IxZHJWbUZVTVdSWFkwVm9hbEpyTlZoVVZFcHZWbFpaZUZwRVVtaE5hMncxVmtjMVQxWXlTbkpYYkZaYVlrZG9WRmt5ZUZOV01XUnlXa1U1YVZJemFEVldiVEV3VFVaYVYxZHNWbE5pUjFKWFZGZHdWMk5zV25GUldHaHFWbXR3ZUZaSGVIZFdNVnAxVVdzeFYxSjZSVEJWZWtwUFZqRlNkVlJ0YUZOTmJXaFFWbTE0WVdNd05YTlhia3BXWVRBMVlWWnRkR0ZOUmxwMFRsVTVWazFyY0hwVk1uaEhWakpHY2s1VlVsZFdSVnBVVm0xNFlXUldjRWhsUjJ4VFlsaGpkMVp0ZUd0TlJURklVbXhhVGxkRk5WVlpiVEUwV1Zac1ZWSnRSbXhpUm5CNFZUSjBNR0V4U1hoWGEzQldWak5vYUZsVlpFWmxSMDVJVDFaa1UySklRbTlYVmxKSFdWWlplRlZ1VGxkaVIxSndWbXBLYjFWR1duRlJiR1JVVFZad2VsWXhhSE5oYkVwWlZXczVWbUpVUlRCV01WcFdaVmRXU0U5WGJGTmhlbFpMVmxaa05HTXhaSFJTV0docVVqSm9XRmxVUm5kbGJHdDVaVWhrVTAxV1NucFdWM2hQWVVVd2QxSnFVbGRpUm5CeFdsVmtUbVZHV2xsaVJsSnBZVE5DVVZadGRGZFpWbVJYVjI1V2FsSlZOVkJWYlhoaFpVWlZlV1ZGT1ZaTlJFWjVWR3hXYjFZeFdqWlNhMmhYVmtWR05GWnRNVTlTYXpWWFdrZHNXRkpyYjNsV2JYUlRVekZOZVZSWWFGaGlhM0J3VldwS05HTXhiRlZSYm1ScllrWndNRlJXVWtOV1JURnpWMnhvVjAxdVVuWldSM2hMVWpGa2RFOVdaR2xYUjJkNVZrWmtOR015VG5SU2ExcHJVbTFTY0ZWc2FFTlhSbHBIVm14T1UwMVhVbnBXTW5ocllXeEtWMU50UmxwaVIyaFFWR3RhVjJSRk1WZFViRTVwVmxSV1NWWlVTbnBOVmxWNFYyNVdVbGRIYUZoWmExcExVMFphY1ZKc1NteFNhM0F4VmtjeGMxUnJNWE5UYm1SWFZqTm9hRlY2UmxabFJtUjFVbXhTYVZKVVZsWldSbHBoV1ZaYWMxWnNhR3RTTTFKdlZtcENkMUl4VW5OWGJYUlhUVlZzTmxaWGREUlhSbHB6Vm1wU1ZrMUhVbGhWYlhoaFl6RmtjMXBIYkZkaE0wRXhWbTE0VTFNd05VZFRibEpXVjBkb1ZWbHRlRXRWUmxwMFpVVjBXRkpzY0hwV1YzaHJWVEZLYzJKRVZscE5SbHBRV1ZkemVGWnRUa1poUmxwcFYwZG9NbFl4V21GVE1XUlhVbTVPVldKR1dsaFdiWGgzWWpGa2NsZHRSbGRpVmxwSVZqSTFTMVZHV25KalNFSldZbTVDZVZwWGVHdFhSMUpIV2taYVRsWnNjRFpXYWtadll6RmFkRk5yV21wU2JWSmhWbXBPVTFSR1dYZFhiazVyVWpGYVNsWkhlR3RoVmxwWFkwVm9XR0V4V25KWmVrWldaVlpPZFZOc1VtaGlSWEJaVmxjeE5GbFhUbk5pUkZwVFlrZFNXRmxZY0VkWGJGcElaVVpPYUZZd2NGaFZNakZ2VmpGS2RGUnFUbFZpUmxZeldsVmFWMWRXY0VkaFIyaE9VMFZLTmxZeFpEQldNV3hXVFZWa1ZsZEhhR2hWTUdSVFZqRnNXV05GWkZOTlYzUXpXVlZvYTFZd01VVlNiR2hXVFc1Uk1GWXlNVWRqYlU1SFZXeHdUbUZyV2sxV1Z6QjRVekZKZUdORmFHbFNNbmhaVldwS2JtVnNXblJsUjNSclRWVnNORmxyV21GVWJGcDBWVzFvVm1KWWFHaFdiRnBoWTJ4a2RGSnRiRTVXYTNCWlYxWldWMVF4V1hoWGJsSldZbTFvVjFSWE5VTlNSbXhXV2tWMFUySlZjRVpXUjNoclZHeFplV0ZJYkZkaGEyOHdWMVphWVdOck5WZGlSMnhUWWtad2RsZFdVa05rTURWelYyeG9iRkpzY0ZCV2JYUjNVMVphV0dSSFJtaE5WV3cxV2xWYWIxZHNXa1pPVlZKVllsaG9ZVnBWV25kU1ZrWjBZVVUxVjJKWVpEWldhMXBoVmpKRmVWSnVUbFJpYXpWWldWaHdjMVl4YkZWVGJFNXJZa1p3V1ZwVldrOVdNVnB5VjI1c1lWSlhVWGRaVmxwS1pXeFdXV05HWkdoTmJFWXpWbXRTUzFJeFdYaFVibFpXWWxoU1ZGVnRlSGRoUmxwMFpVZDBhVTFyV2toV2JHaHpZa1pLVldKR1VsVldiVkpVV2xWYVlXUkhWa2xhUjJoVFZrVmFObFpVU2pSak1XUklVbGhvYWxJeWFHRlVWM0JIVjBaYWRHTjZWbGROYTFwSldrVmFUMVJzU25WUmJHeFhZVEZ3Y1ZwVldsWmxWbHB6V2tab1dGSXphRkJXVkVKcllqSk9WMVZzYUdwTk1taFFWVzB4TUUweFdYbE5WV1JYVFd0d1Yxa3dXbmRYYkZwWVlVVjRWMkpVUmtoWk1uaFBaRWRHU0ZKc1RsTldia0V5VmpGU1MwNUhSWGxWYkdoVllUSm9jRlZxU2pSWFJsbDNWbXRrVGsxV2NIcFhWRTVyVkd4YWMxWnFVbHBoTVhCeVZtcEdhMU5IVmtkYVJuQnBVakpvVlZadGVHRlZNVmw0V2toS2ExSlViSEJWYWtaTFRrWmFXRTFVUWxWTlZrWTFWVzF3WVZZeVJYbGxSMFphVmtWYU0xVXdXbk5XYkZwWllVWmthVlpVVmt0WFZFSmhZakZaZDAxSWFGUmliWGhZV1d4b1ExRXhjRlpYYTNCc1ZteEtlVmRyV210aFZtUkhVMnhDVjFKc2NIWlZWRXBIVWpGa2RWVnRkRk5oZWxaWVZrWmFZVkl3TlVkV2JrNW9VMFUxYjFadGRIZFdNV3QzV2tjNVYxWnNjRmxXVmxKRFZtMUtSMk5HYUZkaGExb3pWVEJrVTFJeFZuUmlSazVYWWtkM01sWnRlR3BrTWxGM1RWWmtXR0V5VWxsWmExcDNWVVphYzFaVVJsaFdiWGhaV2tWV01HSkhTa2RYYm14WFRXNVNjbFl3V2t0a1ZrWnlXa1p3VGxKdVFrMVdhMlEwVXpGWmVWUnJWbE5pUjFKWVZXeGFkMWRXV25KVmEyUlRUV3N4TlZVeGFIZFpWa2w1WlVaU1YySllVak5XYTFwaFpFZE9SbVJHV2s1V1ZFVXdWbTB4TkZZeFZuUlNXR3hXWW10S1lWbFVSbFpsUmxweFVtMUdWRkl4U2tkYVJWcDNWakZhUmxkcmNGaGlSbHBZVm1wR1lXTXhaSFZWYkZwcFlUTkNXVlp0TVRSa01VNUhWVzVTVGxaWVVsVldiWE14Wld4cmQxZHRkR2hXYkd3MVdWVmpOVll4V2taT1ZFNVdWa1ZhVjFwVldtRmtWbFp6Vld4b1UwMHlhSFpXYkdRMFlqRkZlRlpZYUZaaVJuQllXV3hXWVdOc1duUmxSbVJQVW14d01Ga3pjRmRXYlVwV1kwVnNWVTFXU2xCV01qRkdaVVprYzFWc1pGZE5NbWhvVjJ4YVlWWXlUblJWYTJSWVlrZFNWRlpzYUVOVGJGbDRXVE5vVDFKc1JqUldNalZQVm0xS2NtTkdWbHBpUmxwb1ZrUkdWMk5XVW5SUFZrNXBVbTVDV1ZacVNYaE5SMFpHVFZaYVQxZElRbGRaYTJSdlkyeGFWVk5yZEZkV2JIQjZWbTE0YTJGV1NuTldhbEpYVm14S1NGbFVTazlXTVVwMVZteFdhVkpVVmxWWFZsSkhaREZrYzFkWWJHdFNiVkp5VkZaYVYwNUdXa2hrUnpsWFlrZFNTVnBWV205V1ZsbzJWbXhTV2sxdWFIcFViWGhIVjFkR1NHTkZOVmRXYlRrelZtdGtORlpyTVZkV1dHaGhVbGRTVlZsVVRtOVhSbHAwWlVWMFUxSnNXbmhWTW5Rd1lXc3hWMU51Y0ZkTmJtaFlXVlZWZUZOV1JuUlBWbVJUWWtad2VWWkhkR0ZUTVZsNFYyNU9ZVkl3V2xSVVZFWkxWbXhrV0dSR1pGZE5SRUkwVm0wMVUxUnNTa1pYYkdoV1lsaG9NMVpxUmxOak1WcHlUMVpvVTAxR2NEVldWRWt4WkRGYWRGSllhR3BTVjJoWVZGVmFkMDB4Vm5STlZUbFRUVlUxZVZSc1drOVdNa3B5VW1wU1YySllhRlJWYWtaYVpVWldXV0ZHVG1saGVsWjNWa1pTUzJJeFZYaGlSbFpUWWxWYVYxWnRlSE5OTVdSeVYyczVhRlpVUmxoV2JYQlBWakpLV1ZWdVNscFdiVkpNVlRGYVIyUlhUa2RhUms1T1RWVndUbFp0ZEdGV2JWWkhWMjVPVldKc1dsaFphMXBoVjBaYWRHVklUazVOVm5CV1ZUSndVMVV5U2xkU2FsSldUV3BXVkZaRVJtRmpNVTV6WVVaa2FWSnJjRmxXVjNSaFYyMVdXRlJyV2xWaVdFSlBWbXhvUTFOV1dsaE5WRkpwVFZkNFdGVXllSE5WYlVwR1RsWmFWMkpHY0doWlZWcDNVakZrYzFkdGVGTmlTRUkxVmtSR1lWTXlSbGRUYWxwb1RUTkNXVlpxVGxOWFJscFZVbXhrYWsxWFVscFphMXBoWVVVd2VGTnNhRmRpV0ZKWVZYcEdTbVZHVm5WVGJHaHBVbFJXVlZadE1UUlRNbFp6VjJ0b1RsWjZiRlpaYTFwM1ZqRnJkMVZyWkZkTlZYQjZWako0YjFaV1dsZGpSa0phWld0YVRGWXhXbmRTTVZKMFlrWmtVMkpJUWxoV2JUQjRUa1phY2sxV1pGTlhSMmhvVlRCV1lWVXhiSFJqZWtaWFVteGFNRnBGWkVkWFJscDBWVzVzVjJKVVZuSldiVEZIVG14S2NscEdaRTVoYkZwWlZtMHhlbVZHV1hoYVNFNVNZa1p3V0ZSVVNtNWxWbVJ5Vld0MFZFMVZjSHBXTWpWVFlURktWVlpyT1ZkTlJscE1WR3hhWVdNeFZuSlViR1JPWVhwVmQxWnJZekZVTVZwSVVsaHNWbUpHU21GWmJHaHZUVEZzVmxkc1RsZGlTRUpHVmxkNFQxWXlTa2RqUm14WFRXNVNjbFJWV21GVFJrNXlWMnhrYUdGNlZsaFhWM2hUVVcxV1IxZHVTbGhpVlZwWVdWaHdWMVl4V2tobFJ6bG9VakJXTTFrd1VtRldNVmw2Vlcxb1ZtRnJXbWhXTUZwTFkyeHdSMVJ0YUd4aVJuQlJWbXhrTkdJeFJuUldiR1JZVjBkb1YxbFVRVEZXYkZKWFZteGtUazFXUmpSV01qRkhZVVphY21OR2FGZE5ibWhJVm0xNFlWSnJOVmRWYkZwcFYwZG9iMVp0Y0Vkak1EVnpWMjVTYVZJeWVGUldhMXBoVjFaYWRHUkhkRTVTYXpFMFdXdGFZVlJzV2xoaFNFNVdZa1p3YUZacVJtRmtSVEZYVkcxd2FWSnNXVEZYYkZaWFRVWmFSMWR1VW10U1JuQllWRmMxYjAweFdraGxSWEJzVW1zMWVGVXllRzloUlRGV1kwVldXRmRJUWtoV1JFWmhZMnN4VjFkdGFGTk5SbkJWVmtaV1lXUXhaRmRYYTJSV1lUTlNjRmxZY0VkbGJGbDRZVWhPYVZKcmNGWlphMXBQVmxaYVYxTnNVbFZXUlZwNldUSjRZV014Y0VkWGJFNW9UVlpyZVZadGVHdE5SbXhYVjFob1dHSnNTbFpXYTFaaFdWWnNjMkZIT1ZaU2JIQXdXbFZhVDJGdFNrWk9WRUpXWWxoTmVGWlVRWGRsVjBaR1drWmthVkp1UW05WFZsSkxVbTFXUjFWdVZsVmlSVFZaVldwR1MxWldaRmhsUms1WFRWWndXRll5TlU5V01WcEdWMnhPVlZac2NFaFVWRVpyWTJ4a2NrOVdaRk5pU0VJMVZrZDRZVll4YkZkVGJHUllZa2RvV0Zsc2FHOWhSbEowVFZWMFZGWnNjSHBXTW5NeFZqSktTVkZzU2xkaVJuQnlWR3RrVTJSR1ZsbGlSbEpvVFZoQ1dGZFhkRmRrTVdSSFZXeG9iRkpZVWxaVmJYaDNWMFphV0dSRk9WWk5SRVo1V1RCb2QxWXhTWHBoUjJoWFlrZFNSMXBFU2s5VFIwWkhWbXhrVjAxVlZqTldiR1EwV1ZaWmVGZFlhR3BTVjJoeVZXMTRkMWRHYkZsalJtUlVWbXh3VmxVeFVrZFdSVEZYWTBWb1YwMXVhSFpXYlRGTFVteE9kR0ZHV21saWEwcEpWbXRXWVZadFZrZGFTRTVWWWxoU1dGbHRkRXRUVm1SVlVXMUdhRTFyY0VsVk1uUmhWakZrU0dGR2FGZGhNVnBvV1RKNGQxSldTblJTYlhSVFlUTkNObFl5ZEdGVE1rWllVbGh3VW1KRldsaFpWM1JMWVVad1JWTnJPVk5OYTNCS1ZrZDRiMkZXU25WUmJFWlhWbnBGTUZWNlJrdGpNV1J5WVVkNFUxWkhlSFpXVjNoVFVqRlplRlpZYkU5V2JWSllWbTE0ZDFkR1dYaGhSM1JYWVhwR01WbFZWbXRaVmtwR1YydDRZVkpXVlhoV2FrWlhZekZ3UjFwR1pGTmlTRUpIVm0weGQxTXlVWGhTV0d4VlYwZG9WVmxVU2xOV1JteHlXa2M1YUZKc1ducFpWVlpQVm1zeFYxTnNaRmRpVkVaSVdWUkdZV015VGtkYVJtUnBWMFV4TkZaclVrZFpWbHBYVTI1S2FWSnRVbFJhVjNoaFUxWmFjbFZyWkZSTlZuQllWakkxUzFZeVNrbFJiR2hhWVRGd00xVXhXbXRYUlRGVlZXeFdUbFp1UWpaV2JHTXhVekZhU0ZOc1dsaGhlbXhYV1Zkek1XUnNWblJsUjBaWFRWZFNNRnBGWkc5VWJGcHpZMFpzVjFaRmIzZFdha3BIVmpGT2NsZHJPVmROUm5CWlYxZDBhMVV5VW5OV2JGWlRZbGhTY1ZadGN6Rk5SbFowWlVkMFZrMXJWalJaTUZwaFZqRktSbGR0YUZaaGExcDZWakJhWVdSV1RuTlZiV2hzWVRGd1dWWnJXbUZaVm14WFZtdGtWMkpIYUhOVk1GcDNZMnhTV0dSSVpGTk5WbkF3VkZaU1ExWlhSalpTYkhCV1ZucFdlbFpxUmxwbGJFWnlWV3hvVjJKV1NsRldWM0JMVXpGT1YxUnVVbE5pUlRWd1ZUQldTMVF4V25KWGJHUmFWbXN4TkZac2FHOWhWazVHVjJ4V1dtSkhhRlJXYkZwelkyeGFjMXBGTlU1V2JHOTNWa1pXVTFJeFdYbFRhMXBxVW0xb1YxbHJXa3RUUm1SWFYydDBVMkpWTlVkWlZWcGhWR3hhZFZGcmJGZGlWRVkyVkZaYVlXTXhXblZWYld4VFRXMW9kbFpHVm05Uk1WWnpWMjVPV0dKRk5WVlVWM014WlZaU2MxWnRPVmRpVlhCNVZHeGpOVlpXV2taaWVrSmFZV3RhVjFwRVJtdGpiVkpJWTBaT2FWSllRbUZXTW5oWFZqSkZlRmRzV2s1V2JIQllXVmQ0WVZac1duUk5WazVVVW14d1NWcFZXbmRoTURGeVRsVmFWbFl6YUhKV1ZFRjNaREZPY2xac2FGZGlSbkJ2VmpGYVZrMVhVa2RVYmtwWFlrVTFjRlZ0ZEhkWFZscDBZMFZrVkUxV1dsaFhhMXB2WVd4S1dGVnVSbFZXYlZKVVZXcEdVMk14WkhSUFZsWk9WbTEzZWxacVNqUmlNV1J6VjJ0YVZHRnJOV2hXYWs1dlkyeGFjMWRyT1ZoV2JrSkpXbFZhVDFSc1NrZFhhM1JYWWxoU2FGbHFTbEpsUm1SellVWlNhV0V6UWxaWFZ6RXdVekZhYzFkdVJsVmhNRFZZVlcwMVExTldjRlpXVkZab1lsVndWMVl5ZEd0V01VbzJVbTVhVjFaRlJqUldiVEZQVW0xT1IxcEZOV2xoTUhCU1ZteGFVMUl4VFhoWFdHaFlZbXMxY0ZWdGRIZFhSbFp6Vld4a1YxWnNjRmxVVmxKRFYyeGFWVkp1Y0ZoaE1taElWbGN4UzJOck5WZFZiRnBwVjBaS2IxWnFSbUZoTWs1elkwVm9VRlp0VWs5VmExWmhWMnhrYzFadE9WZE5WbkF3Vm0wMVMxWkhTa1pUYkdSYVZqTlNNMVpGV2xwa01XUnlaRWR3VG1FeGNFcFhiRlpoVkRGU2NrMVlVbWhTTW1oWVdWUkdkMk5zVW5KWGJYUnFZWHBHVjFkclpITlZNa3BYVTI1YVYxWXphRlJaZWtaU1pVWmFkVkpzU2xkU1ZYQlFWbTB3ZUZVeVZrZFdXR3hxVWxVMWIxVnFRbmRTTVd4eVZXczVWMDFFUmxsWlZXaExWakF4ZFdGSGFGZGlXRTE0VmpGa1MxSXlUa1pPVms1cFUwVkZlVlp0ZUZOU01rVjRWVzVTVmxkSFVsQldiWGgzVmpGc2MxcEhPVmhTYkhCNlZqSTFhMVJzV25OalJscFdZbGhvY2xac1ZYaFdiR1IxWTBad2FHRjZWbmxYVmxwaFV6RlplRlJ1VGxWaVIxSnZXVlJPUTFaV1pGVlNiVVpxVFdzeE5GZHJhRTloYkVsNlZXczVWMDFHV2t4Vk1WcHJWakZhYzFwRk5WTk5SbGt3Vm1wS05HSXlTa2RUYkdSWVlrZDRZVlpyVm1GaFJtdDVaVWhPVjJKSFVucFpNR1EwWVZaYVYyTkZkRmRoTWxFd1ZsUkdXbVZHWkZsYVJUVlVVakpvV2xkWGRHRmtNV1JIWWtSYVUyRjZiRlJVVmxwM1RWWmFkR1ZGZEdoV2JWSkhWVEkxYTFZeVNsVlNWRUpoVWtWd1dGVnFSbmRUVms1eldrZHNXRkpWY0ZKV2JURjNVakZzVjFwR1pGaGliRXB6Vlcxek1WWXhiSE5XYm1SWVlrWndXVlJzVms5V01WcHpZa1JhV2xaWFVuWldiR1JMVjFkR1IxRnNaR2xYUjJnMlZrY3hORk15VWtoVmEyaHBVbTFTYjFSVVFrdFRSbHAwWlVkR2FHSldXa2RVYkZadlZrZEZlVlZzVmxkTlIxRXdXWHBHVjJOc1pIVmFSMmhUWWtad05sWnRlRzloTWtWM1RWWm9iRkpGU21GVVZFNURWMFphU0dNemFGTldhM0I1VjJ0a1IxVXhXbk5pTTNCWFlrZFNObHBWV2t0ak1YQkpWbXhrYVZKdVFsQldiVEUwWkRBeFYxcElTbFpoTWxKWFZGZHpNV1ZzV2xoT1ZrNVZUVlp3VmxadGVGTldNREZIWTBWNFYxSldjR2hXYWtaWFkyeFNjMVJyTldoTk1Fa3lWbTEwYTA1R2JGZFhiR2hVWVRGd1VGWXdWbmRXYkZwMFRWYzVVMUpzYkRWYVZWcGhZa1phVlZac2FGZFNla1oyVmxSS1MxWXhUbkpoUm1SVFRUSm9WVll4V21GaE1rMTRXa2hXVm1KR1dsaFZiRnAzWWpGYVdFMVVVbHBXTVZwNlZtMDFUMVl4WkVoaFJsWldZbFJXUkZVeFduTldiR1IwVDFaYVRsWnVRa2xXYlhodll6RlplVkp1U21sbGEwcGhXVmQwWVZkR2NFWlhhemxZVm01Q1NWa3dXazlXTURGV1kwWk9WMkpVUWpSVVZWcHpWakZrZFZSc1dtbFNNVXBaVm0xMFYxbFdaRWRpU0VwWVltczFVRmxyWkRSbFZtUnlWV3RPYUZKVVJrWlZiWGgzVm14WmVtRkVUbGRpV0U0MFdURmFZV014Vm5OalJtUlhZbXRLTlZac1kzaGxhekZYVjJ4a1lWTkZOWEZWYlRGVFkwWmFjMVZyVGs5U2JHdzFXa1ZrUjFZd01YTlRha0pYWWxoU2FGWkhlR0ZYUjFaSFZHeHdWMUpVVmtWV2JYUmhWakpPYzJORmFGQldNMUpZV1d0YVdrMVdaSEpXYlVaclRWWkdORll5TlU5WFIwcElZVVpvVjJKVVJuWmFSM2hoWXpGd1JtUkdUazVXTVVvMlYxZDBhMUl4V1hsVGJHUlVZa1phV0ZWdGVFdFRSbXhWVTJzMWJGWnJjSGxXTWpFd1ZUQXdlRk5zVmxkU2JGcG9Xa1JHYzFZeFpIVlRiSEJzWVRGd2VWWkdaREJaVms1SFYxaHNhbEl3V205V2JYUjNVakZaZVdWR1pGaGlSbXcyVmxkNGIxWldXa1pYYmtwYVRWWndTRlpzV21Ga1IwNUhWRzFvVGxkRlNtaFdiWFJyVGtaWmQwMVZhRlJoTW1oVldXMTBkMVZHV25Sa1JYUlhUVlp3ZVZadE5XdGlSMHBIVjJ4c1lWWlhhR2haVkVGNFkyMU9SbHBHWkZkTk1taE5WbTF3UjFsV1NYaGFTRXBZWWtkb1dGbHJhRU5YVmxwWVkwVjBWRTFyTVRSV1Z6VlBWMGRLUjFkdE9WVldWa3BZV2xWYVlWZEZNVVZTYkVwT1lrVlpNRlp0TVRSaE1XUjBWbTVPV0dKR1dsWldiWGhXWlVaV2NWSnNXbXhXVkZaWFZERmFiMkZIVm5KWGFsSlhWbTFTTTFaVVJtdGphekZXWVVaYWFHVnRlRzlXYlhCUFlqRmFSMk5GWkZoaE1sSnlWV3BDZDFJeFVuTmFSemxvVm10d1dsVldhRzlXTWtwWllVWm9XRlpzY0ZoYVJWcFhWMVp3UjFGc1pHbFRSVW96Vm14a05GbFdUWGhpUm1SV1lrZG9jVlZ0TVZOV2JGcDBaVWhrVjJKR1dsbGFSV2hyVmxkR05sSnNaRnBOUmxwMlZtMHhTMVpXV25SaFJtaFhZa1paTUZaVVFtdFdNVXB6VjI1T1dHSkhVbkJXYlhSM1RsWmFjMVZyZEU5U2EzQXdWbFpvYjFaSFNuTlRiRUpYWWxob1RGWXdXbUZqVms1MFQxWldWMkpXU2xwWGExWnJUVVphY2sxV1drOVdiV2hZVkZkd1YxZEdiRmRYYTNCc1ZqRmFTVlF4V210aFZrcHpZMGM1VjFKc2NHaFhWbHBoVmpGT2RWVnRjRk5XUmxwWlZtMTBWMWxWTlhOYVJtaHJVakJhY0ZSWGRIZFRSbHBJWkVkR1YxSXdjRmxaVlZwclZqSkZlRmRyZUZkU1ZuQlVWbXhhUzJSSFVraGpSVFZvVFZoQ1NWWXlkRmRoTURGSFZsaGtUbFpYVW5GVmFrSmhWMFpzVlZOck5XeFNia0pHVlRKMGExVXdNVmhWYm1oWFRXcEdlbFpVUmt0V01rNUhWMnhrYVZkSGFIbFhWM0JMVWpGSmVWTnJaRmhpVlZwVVZqQmFTMVpzV25STlZGSnJUVVJHU0Zrd1dtRldNV1JJWVVjNVZtSllhSHBVVkVaVFZtMUdTVnBHWkdsV1Zsa3dWMVJDVjJJeGJGZFRXSEJvVWtWd2FGVnJWbmRVUmxaMFpVWmthazFWTlhwWGExVXhZVlpLV0U5VVRsZGlWRVV3VjFaYVZtVkdTbGxoUmxwb1RXeEtWbGRXVWt0Vk1WcEhZa2hTYkZOSFVtOVZiWGhMVmpGa2NsVnNUbFpOVm5CNlZqSjRiMWRIUlhsVldHUmFWbFp3VEZsNlNrdFNWbFp6WTBkb1RtRjZSVEJXYlRFd1ZtMVdSMU51U2s5V2JIQnZWVzAxUTFReFZuRlNhM1JXVW0xU2VsWnRlR0ZVTVZwMFZXdHNWMVl6VW5aWlZWcExaRWRHUjFWc1pHaGhlbFl4VjJ4YVlWbFdXbGRVYmtaU1lsZDRUMVpzV2xwTlZscFlUVlJDYVUxV2NEQlZiR2h6WVVaSmVXRkdXbGRoTVZwTVZrVmFWMDVzU25OYVJtUlhZVE5CZUZaclkzaE5SbFY1VW1wYVYySkhhRmhaVkVwU1pERnNWVk5yWkdwTlZUVmFWMnRWTVZZeFNuSmpSbVJYVW14d2NsWkVRVEZTTWtwSFYyeG9hVk5GU25wWFYzaFhXVlpPYzFkcmFHeFNhelZXV1d0V2QxWnNXblJsUm1SWVVqQldORlV5ZEc5WGJWWnlWMjVLVjJGcldtaGFSbHBYWXpGR2MxcEdhRk5OYldoYVZtMTBZV0ZyTVZkV1dHeFdZa2RTYUZVd1ZURmlNVlp4Vkd0T2FtSkdTbGhXYkdodlZHc3hXR1ZJYkZkaVdHaFFWbTB4UzFJeVNrVldiR1JYVFRGR00xWnRNVFJaVmtwelZHNUthRkp1UW5CV01HUnZWVlphZEUxVVVsWk5helY2VmxjMVUySkdTblJWYmtKYVZrVktNMWxWV21Ga1IxWklaRWQwVGxaWGR6RldWekF4VlRGYVNGTnJaRmhpUjFKaFdXdGFTMWRHV25OWGJrNVlVakZLUjFwRldtRlZNa3BaWVVab1YwMXVVbGhVVldSR1pVWk9jMVpzWkdsVFJVcFpWa1prZDFKdFVYaFhiR2hxVFRKb1ZGbHNWVEZUYkd4V1YyMDVWMDFyY0VoWk1HaHpWakZaZWxGcmVGZFdSVnBoV2xaYVQxZFhUa2hpUms1cFZtdHdXbFpyV210T1JrMTVWbXRrV0dKSGFIRlZiR1JUV1ZaYWMxVnNaRmhTYlhoNVdWVlZOVmRzV25KT1ZXUlZZa2RvVUZZeU1VdFNNVnB4Vld4V2FWSnVRalpYVkVsNFVqRk9SMU51VW1oU2JWSlBWVzAxUTFkR1duUmxSM0JyVFVSR1dGWXhhRzlXUjBWNFkwYzVWVlpGY0haWFZscDNWMGRTU1ZwR2FGTmlTRUkxVm1wS01HRXlSWGhUV0doVVlUSjRZVlpzV25ka2JGcFZVbTEwVTJKRk5YaFdNbmhyWVVkRmVHTkdWbGRoTVVwSVZtMHhWMVl4V25WV2JGcHBVbXh3ZDFkWGRGZGtNbEY0VjJ4b2FsSlViSEJVVjNNeFYwWnJkMWR0ZEZkTmExWTJWbGMxUTFaV1duUlZWRUpWVmxad1ZGWnFSbXRqYlZKSFkwWmtWMUpXY0doV2JGcHJaREZGZUZwSVVsTlhSM2h2VlcxMFMxZFdXblJsU0dScVlrWmFNRmw2VG05WFJrcFZWbXhvV2xaV2NISldWRVpyVW14T2NtTkdaRTVpYkVwdlZtMXdTMVJ0VmtkVmJrcG9VbXMxYjFSWE1XOWtiRnBZWTBVNVZrMXJOVWhXTWpWVFlrWkpkMWR1U2xkaVZFWlVWbTE0VjFkRk1WVlJiR1JPVWtWYU5sWnFTalJqTVZweVRWaFdhRk5HY0dGV2JYaDNWVVpWZUZkclpHdFdhM0I2Vm0xNGEySkhSWGhXYWs1WFlURndjbFJyWkU1bFZsWnlWMnM1VjJKSVFsRldiWEJEV1ZaUmVHSkdWbFZoTURWWldXdGFkMUpzVm5STlZFSlZZa1ZzTTFZeWRHOVdNREZZWVVoYVdsWXphRkJWTUZwWFl6SktSMk5IYUU1aVJYQldWbTE0VTFJeVVYaFRXR2hZWW14YWFGVnNVbk5qUmxwelZXdGFiR0pHY0VsYVZWcHJWbXN4Y2xkcmFGZE5ibWhvVmpCa1MyTXhaSE5hUmxaWFlraENiMVpzVm1GV01WcFhVbXhXVjJKSFVuQlZiWGgzVG14YVZWTllhR3BOVmtwNlZUSjBhMWRIUlhoalJteFhZbGhvTTFZd1dsZGpWazV5WkVkd1RsWnJjRFpXYWtvMFZqSkdSazFWYkZKaWJIQllWVzB4VTA1c1VsZFhhemxYVFZad01WWlhjelZYUmtwVlZtNWFXRlp0YUROVmFrcFhZekZrV1dKRk9WZFhSa3BaVmtaYVlXUXhaRmRYYkdoc1VucHNZVlp0ZUhkTlJscFlaRVJTVjAxRVJrbFdWM1EwVm1zeFdGVnNRbFpOUjFKUVZXMXpNVmRIU2tkaFJrNU9Za1ZXTkZadE1YZFNNa1owVm10b1ZWZEhhRlJaYlhSM1ZWWmFkR1ZJWkdwU2JGcDZWMnRqTldGc1NuTldhazVYVFdwR1NGbFhNVXRTTVZweFZHeGtUbUZzV25sWFZscFdaVVprU0ZacmJHbFNiVkpVV2xkMFIwNUdaRmRXYkZwc1VqQTFlVlJzV21GaFZrcDBWVzVDVjJFeGNHaFViWGhyVmpGa2RGSnNhR2xXYkhCYVZtMHhNRll4WkVoVGEyeFNZbXMxWVZaclZURlNSbEowWlVkMGFtSkhkRFpaVlZwVFZHMUdObFpyY0ZkaVJuQjJXWHBHYzFZeFRuVlRiRkpwVWxSV1YxWnROWGRXTVZGNFkwWm9iRkp0VW5GWmEyUlRaVlprY2xwRVFtaFdhMjh5V1ZST2QxZEdXWHBWYkdoWFZrVmFXRmw2Um10WFYwcEhWMjFzVjFJemFGcFdNVnByVFVac1dGWnVUbWxUUmtwelZXeFNWMk5zVWxkWGEzUnNZa1p3U1ZSV1VrTldWMHBIWWtSYVdsWlhVa2hXYWtaaFVtMUZlbUZIUmxOU1ZuQTJWbTF3UjJFeFpGaFNhMlJXWWxkNFZGWXdWa3RaVmxsNFdrUkNhRTFyYkRSV1YzUnJZV3hLVjJOSGFGWmlSMUpVVmpGYVlXUkhWa1prUlRWWFlsaFJlbFl5ZEdwT1ZsbDNUVmhPV0dGclNtaFZhMVV4Wkd4YWRHTXphRmROVjFKNlZrY3hSMVV4U2xaV1dHaFhZbGhDU0ZWcVNrNWxSbHAxVkd4U2FWSXlhRlZXUmxwWFpERlJlRmR1VW14U2F6VlRWRlpWTVdWV1VsWmhSemxYVWpCV05WWlhlRk5YYlVwWllVUk9XbFpXY0ZSV2JYaDNVbFpXYzFSc1pHbFNia0phVm1wS01HRXdNVWRYYTJoVVlURndXRmxYY3pGV01XeHpWV3RLYkZKc2NIbFdNakZIVjBaSmQxZHJaR0ZXVm5BeldWVlZlR014VG5OV2JHUlhVbFp3YjFZeFdtdFZNV1JIVkc1S2FGSXllRlJVVnpGdlYxWmFkR1ZIUm10aVZscElWakkxVDFadFJYbFZiVGxhVjBoQ1NGWnFSbE5XTWtaR1QxZG9WMkV6UVhkWFZsWnZWREZhY2sxVlpGaGhNMmhoVm14YWQxZEdXbk5YYTJScVlsWktSMVJzVlRGV01ERldZbnBLVjAxV2NGaFdha0Y0VTBaS1dXRkdVbGhTTVVwYVYxZDBiMUV4WkVkV2JsWnFVbTFTVDFSV1pEUldNVmw1VFZWa1ZVMXJjRmRaTUZaaFZtMUtXV0ZHVWxkaGExcGhXbFprUjFORk9WZGhSbVJwVW01Q05WWnNhSGRTTVZGNFYxaG9ZVk5HV2xkWmJHaHZWa1phY2xadFJtdGlSbkF3V1RCV1MyRXdNWE5YYm5CWFlsUldURll3WkVabFZsWjFVMnh3YUUxck1IaFdSbEpIWXpKT2MxZHVUbFZpUm5Cd1ZXMHhNMDFXV25OWmVrWldUVlpzTkZZeU5VOVdSMFY0VTJ4b1ZtSkdjRE5XUlZwWFkxWktjbVJIZEZkaVZrbDNWbGN4ZWsxV1ZYZE5TR3hvVWxkU1dGbHJXbmRoUm14VlUydGFiRlpyY0hsWGExcHZWMFpKZVdGSVpGZFdlbFl6Vm1wR1lWWXhWbk5YYlVaVFlYcFdXRlpYTUhoT1IxWkhWbGhzYTFKRlNsbFZiWFIzVm14c2NsZHVUbHBXYTNCWVdUQmtiMWRzV25OalIyaGFaV3R3VUZVeFpFZFNNa1pJWVVVMVdGSlZiRFZXYlhodlpERk5lRmRZYkZaaE1sSlZXVzF6TVdOR1ZuUk5WemxxVW14c00xZHJZelZXVjBwSFkwWm9WMVl6VW5KV2ExVjRVbFpHY1ZWc2FHaE5XRUo1VjFaV1lWTXlUbkpPVm14U1lrWmFXRlpxU205TmJGcFlaVWRHVjAxV2JEUlpNRlpYVlcxS1dHRklRbFppUjFGNldsZDRZV05XVG5WYVJtUk9WakZKZDFadE1ERlRNa1p6VTI1U2FGSXdXbGhaVkVaaFlVWlpkMWRzV210TlYxSXdWVzB4TUZZd01VbFJhM0JZVmpOU2FGbFVSbE5rUms1MVZXeHdUazF1YUZsV1JscHJZakF3ZUZacVdsUmhlbFp6Vm0xNFlVMVdXbGhsUms1b1ZqQldNMWt3YUdGV01VcHpVMnRTVm1WcldrOWFWVnBoVjFad1NHRkdUbGRTTTJoWVZtdGFZVll4V1hkT1ZtUnBVMFZ3V0ZsVVRsTlpWbHB6Vld0a1ZGWnVRbGRXYlhoclZqSktSMk5FUWxkV2VsWk1WbTF6ZUdSWFJrWmFSMFpUVWxad1RWZHJWbFpOVmxsNVZHdGFUMVl5YUc5VVZtaERXVlphZEdSSFJsZE5hMVkwVm14b2IxbFdTblJWYkZwYVlsaG9hRll3V25OV1ZsSnlWR3hhVGxacmNGcFhiRlpYVFVaYWNrMVdaR2xTUmxwb1ZteGtUazFXV25KV1dHaHFUVlUxZVZscldtRmhWbVJJWVVSYVYySllhSEpWZWtwVFZqRktkVlZzUWxkaVZrcDNWMWN4TUZNd05YTlhhMlJZWWxWYVZsUldXbmRsYkd0M1ZtMUdWbEpzYkRWYVZWVTFWakpHY2s1WVdsZE5ibWhvVlRCa1YxTkhUa1pPVm1ScFYwZG9XbFp0Y0VkaU1rbDRWbGhzVkdKR1dsaFpiRlpoWVVaYWNWUnJOV3hTYkd3elZqSTFUMWRHU1hoWGEzQldUV3BGTUZacVNrdFRWa1paWVVab1YxSlZjSGxYYTFKSFZUSlNSMVJ1U21oU2EwcFlWVzEwZDFkc1duUmpSVGxXVFdzMWVsWlhOVXRXTVZwR1YyeG9XbUpHY0doVk1uaFhWMGRXU1ZwSGJGTk5TRUpaVmxSS01HRXhXWGxUYTJScVUwVmFWbGxyWkZOVVJtdzJVbXhPYWsxWFVucFdiVEZ2Vkd4T1JsTnVXbGRoTVhCeVZHdGtVbVZHWkhOYVJtUnBVakpvVUZadGRHRlRNa2w0VjI1U2FtVnJXbFJVVmxwTFpXeHNWbFpVVmxkTlZYQjZXVEJhYzFkc1dsZFRiV2hYWVd0YVMxcFhlRmRqTVVaelkwVTFVMkpyU2twV2JYQkRXVmRSZUZOdVVsVmhNbEpWV1Zod1YxWkdXblJPVlVwc1VteHdlbFpYZEd0V01ERlhVbXBTVm1KVVZsQlpWbFYzWlZkV1IxZHNjR2xYUjJoTlZtcENZV014WkVoVmExcHJVak5DY0ZWdE1UTmxiRnAwVFVSR2FFMVdTbnBXTWpWTFZERmFkRlZzYUZaaWJrSkhXa1JHWVZaV1RuSmtSbVJvWld4YVYxWlhNVFJaVmxKMFVtNU9XR0pVYkZsV2JURlBUa1pXY1ZKdFJtcE5Wa294Vm0xNFQyRldUa1pUYkd4WFlsaENTRlY2Ums5V01YQkpVMnhvYVZaV2NIbFhWM2hoV1Zaa1YxWlliR3RUUlRWWVZGZDBkMVl4V1hsT1ZUbFhUV3R3U0ZZeWNFdFpWbGw2WVVkR1lWWnRVbGhWTUZVMVZqRldjazVYYkZOWFJVcE1WbTE0YW1WRk5VaFVXR2hZWWtkb1ZWbHRlR0ZWTVd4elZXNU9XRkp0ZURCVWJGWlBZa2RLUjFOc2FGZE5ibWhRVm10YVNtUXlUa1ppUm5CT1VteFZlRlpyWkRSVE1rNTBWR3RrVm1KSGFGaFVWRUpMVkZaa1YxVnJaRlZOYXpFMFZUSjRjMWxXU25KT1dFSlhZVEZ3YUZscVJtdFhSMUpIV2taa1RsSkZTVEJXYlRGM1dWWmFTRk5zV2xoaVIxSmhWakJvUTFOR1ZuRlNibVJUWWtad2VsZHJXbXRoVmtwMFQwaHNXRll6VW1oVlZFWmhZekZrY2xkdGJGTlNhM0JhVm0weE5GWXdOVWRYV0dSWVlYcHNjbFp0ZUdGbGJGcDBUVmM1YUZKVVJrcFZWM0JMVmpKS1ZWRllhR0ZTUlhCUFdrUkJlRll4Y0VkV2JXeFRZbXRLZGxac1pEUlZNazE1Vkd0a1ZtSkhhSEpWTUdSVFYxWmFkR1ZGWkU5U2JWSjVWbGQwVDFZd01YSmpSbVJhVFVad2RsWnFRWGhqVmxweVlVWm9WMkpJUWsxWGExWnJVakZLZEZacmFGTmlSMUp6V1ZSR2QxTnNXblJqUldSYVZqQldOVlpYZEc5V01rVjRZMGhPVm1KWVVqTldSRVpoWXpGc05sWnJPV2xTYmtJMFZsY3dlRkl5UmxaTlZtUlhZV3hhVjFSV1pHOWpiR3h5VjJ0MFYwMVZOWHBXUjNocllVZEdObFpzVmxoV1JWcG9WbXBLVDFZeFRuVlZiRTVvWlcxNFdWZFhlRzlpTURWelYxaHNhMUo2YkZaVVYzUjNVMVpWZVdWSFJsVmlSbkJJVmpJeFIxZHNXa1pqU0ZwYVZsWndlbFpxUm5kU2JIQkhZVVpPVGxaWVFrbFdhMUpIV1ZaTmVGVnVVbE5pYXpWWlZtdFdkMWRHYkZWVGJFcHJUVlp3UmxVeWN6VlZNREZXWTBod1dsWlhVa2hXVkVaclVteE9jMVZzWkZOaVJuQlpWMnRTUW1ReVZrZGFSbXhwVWxSV1dWVnNVbGRXUm1SWVpVWmthazFFVmxoV2JUVlRZa1pPUms1V2FGZGhhMG96VmpCYWNtUXhjRWhQVm1ScFZsWndOVmRYTlhkUk1WcFlVMnRrYWxKVWJHaFZhMVpoVmtac05sSnNUbXRTTVVwSFZHeGFhMVJyTVhSaFJ6bFhZbFJGTUZsWE1WSmtNRFZYV2taYWFFMXNTbGxXYWtKclRrZE9jMVp1Vm1wU2JWSnZWVzE0YzAweFpISldWRlpWWVhwR1dGWXhVa3RXYkZvMlZteENWMVpGV2t4Wk1uaHJZekpLUjJGSGFFNVdiVGsyVm0xNGEyVnRWa2RUYms1aFUwWmFXRmxyV25kVU1WcDBaVWhrVmxac2NGaFhWRTV2VlRKS1YxZHNhRlpOYWxaUVdWWmFTMk15VGtsUmJHUk9VakZLTWxkclVrZFpWMDVYVW01T1dHSllhRlJVVldoRFRteGFkRTFVUW1oTlZuQlpWV3hvYTFReFpFWk9WMFphVmtWd1UxcEVSbE5qTVdSeldrZDBVMVpHV2xsV01uUmhaREZaZVZKWWJHdGxhMXBaV1d0YVlWWkdXbkZTYlVaVFlYcEdWMVl5Y3pWV01rcEdZMGM1VjFZelVsaFhWbVJYWXpGa1dXRkdhR2xTTVVwNVZsZDRVMk14V1hoalJscFlZbGhTV0ZWdGRIZFdiRnAwWlVWa1YwMVdjSHBWTW5RMFYyMVdjbGRyYUZwbGEzQkxXbGQ0ZDFOSFNrZFViR1JvVFRCS1ZsWnRNSGhrTVUxNFZsaG9WVmRIYUZoWmExcGhWVEZzVlZOc1RtcFNiWGg1VjJ0U1UxZEdTblJWYm14WFRXcFdjbFl5ZUdGV1ZrcHlZMFprVjAweFNsbFdiWEJIV1ZVMWMxZHVTbFppU0VKWVZXeGFkMVJHWkhOV2JVWm9UV3MxV0ZWdE5VOWhiRXBWVm1zNVdtSlVSblpWYkZwaFkyeFdjbHBHY0ZkaE1Wa3dWbXBLTkZsV1VuTlhiR2hvVWpKb1YxbFhkRXRoUm10M1YyMUdhazFYVWpGWGExVTFZVlpKZUZOdFJsaFdSVXBZVkZWYVdtVldUbk5YYXpsWFZqRkthRmRXVWtkWlYxWnpZa1pvYWsweWFGUldiWGgzWlZaYWRHVklaRmROYTNCSVdUQldjMWRHV2paU1ZFSlhVa1ZhYUZsNlJsZGtWazV6Vlcxc1YxWnVRbEZXYkdSM1ZESkplRk51VGxoaVIxSlpXV3hvVTJJeFVsZFdWRVpzWWtaYWVsbFZaREJXYXpGeVkwWmFWMkpZYUZoV2FrcExVMFpXZFZkc1pGTldia0kyVjFSS05HUXhTWGhWYms1V1lrZFNjRlV3VmtkT1JsbDRXa1JDYUUxck1UVlZiWFJyVjBkS1IyTklSbFpoTVZwTVZqQmFVMVl4WkhWYVIzQnBVbXR3TlZZeWRHRmhNa1p5VFZoS1QxWlhhRmhaYkZKSFRURmFTR1ZGZEZOTlYxSjVWako0YjFZeVNrbFJiR3hYVmpOQ1RGVjZTazVsUmxaMVZHeG9hVkpzY0haV1JsWnZVVEpKZUZkclpGZGlXRkpRVlcxMGQxZEdXblJsUjNSYVZtdHNObFpYTlVOV01rcFpZVWRvVjJKWWFGaFdNR1JUVWxaV2MxZHJOVmRYUlVreFZtMXdTMlF4VFhoYVJXaFRZbXR3VlZsdE5VTldNV3hWVW01a1ZGSnNiRE5XTWpWclZUSktWazVWYUZaTmJrMTRWbFJHWVdSV1JsbGhSbVJwVW10d1NWWnRjRXRTYlZaSVUydGthRkpzY0hCWmExWjNWakZrV0UxVVVsUk5WMUpJV1d0b1QxbFdTalppUjBaWFlsaG9URll4V2xOV01YQkZVVzFvVjAxSVFraFdSbHBUVkRGWmVGTlljR2hTYTBwaFZtcE9iMU14Y0ZaWGF6bHFZbFZ3U0ZkclpITldNVXB6WTBaYVYwMVdjSEZhVlZwYVpVWmtkVlJzVm1saVJYQlNWbTB3TVZFeFVYaFZiR2hQVm5wc1ZGVnRNVk5YUmxwWVpFUkNWazFFUmxsV1YzaHZWakpLVlZac1VscGhNWEJMV2xaa1YxSXhjRWRXYkdSc1lrWndWbFl5ZEdGWlYwVjVWRmhzVTJFeWFIRlZhazVUVkRGYWMxVnJXbXhpUjFKWldrVmFhMVpyTVZkWGJuQlhUVmRvZWxadE1VWmxiRlp6V2taa2FFMVdjRTFXVkVKaFl6SlNTRlpyV2xCV2JWSndWVzEwZDA1V1dsVlRXR2hUVFZaS2VsVXhhSGRoUmtwWFkwWm9WMkpZYUROWk1uaHpWbFpPY2xwR1RrNVdNVXBoVjFaV2EyTXhWWGxXYms1WVlrWndXRlZ0ZUdGV01WSlhWMjFHVTAxclZqWlhhMlJIVlRKR05sWnNXbGRXZWtVd1drUkJlRll4WkhOaFIzUlVVakZLV0ZaR1dsZGtNVWw0Vm01T1ZtRXlVbGhaV0hCSFYwWlplV1ZGVGxoaVJtOHlWVzE0VTFZeVNsVlNiRUpXWWtad2FGbDZSazlrUjBaSVlrWmtUbUpYVVhwV2JURTBXVlpWZUZKWWFGUlhSM2hXV1cxek1XTkdWblJOVms1cFRWWmFNRmt6Y0VkaGJFcHpWMjVvVmxaNlZuSldha1poWXpGa2MyRkdaRmRsYkZwUlZtMHhORmxYVFhoWGJrWlZZa1p3Y0ZacldtRlhWbHAwWlVkR1ZHSldXbGxXUm1oM1dWWktkVkZ1UWxkTlJuQklWRlJHWVdSSFVraFNiRTVPWVhwV1dWZFVRbGRaVmxsNVUydGthbEp0YUdoV2JuQkdUVVpTVjFkdFJsZFdhM0I2VjJ0YVYxUnNXbGRqUkZwWVZqTkNVRmxVU2tkV01VNXpXa1pTYVZKVVZsbFhWbVF3WkRGYVIxWnFXbE5pUjFKWVZtMTBZV1ZXWkhKYVNFNW9WbXR3VmxadGVHOVdNa1Y1VlZoa1ZtVnJXbnBXYlhONFZtMUdTR1ZHVGxkaVNFSlpWbTB3ZDJWR1ZYbFViazVZVjBkNGNWUlVTbTlqVmxweFVXNWtVMkpHV2pCVVZsWnJWbXN4VjJKRVVsWk5ia0pvVmpCa1JtVkhUa2xUYkdSWFVsWndlVlpYY0VkaE1rMTRWMjVTVTJKRk5WaFphMmhEVjFaYWRFMUVSbXROYXpFMVZsZDRhMVl4WkVoaFJtaGFWMGhDZWxaVVJuTmpiR3cyVm1zMVRsWXphRFZXYlRFMFZERmFkRk5yWkdsU1JscFlWbXBPVW1ReFduUmxSMFpUWWtVMWVWbFZXbmRoVm1SSVlVWkdWMkpVUlRCV1ZFcFBZekZXZFZSc1NtbFNNVXBaVjFaU1QxRXhXbGRYV0doaFUwZFNVMWxZY0VkWFJsVjVaRWM1VmsxcmNFaFpNRnBUVjIxS1IxTnNhRmRpUm5Cb1dYcEdZVlpXU25OVGF6VlhUVlZ2TUZac1dtcE5WbEY0Vmxob1ZHSnJjRmxaYTJRMFYxWnNWVkp0Ums1TlZuQlpXWHBPYjFVeVNraFZha1pYWWxob2FGWkhlR0ZqTWs1SFVteGthVkpyY0UxV2ExSkhWREZKZUZkdVZsUmlWMmhVV1d4YVMyUXhaRmhrUm1SclRWZFNTRll5ZUc5aGJFcFdUbFpzV21KR2NFaFVhMXB6WTJ4a2RGSnNaRmROUmxsNlYxUkNZVkl4V1hsVGEyaFdWa1ZLVjFsclduZGhSbGwzVmxSR1dGSXhTa2haVldSelZUQXhWbU5GY0ZkaVJrcExWRlphYzFZeFpISmFSbWhwVW01Q1VGWlVRbXRWTVdSWFlrWm9hMUpZVWs5VVZscExaV3hhYzFWc1pGZFNhM0JXVm0xNGExZHJNVWRqUlhoYVlUSlNURlZ0TVU5U1ZrcHpXa1prVTFaNmEzcFdNVnBUVXpGU2RGVllaRTVXYkhCb1ZXcE9RMVpHYkhOYVJ6bFdVbXh3V1ZwRlpEQldhekZXWTBod1YwMXVhSEpXTWpGWFl6RmtjMWRzVmxkaVJuQlpWa2Q0WVdNeVRuTlhia3ByVW01Q1dGWnJWbUZUYkdSelZteGtWMDFXY0hwV01qVlRWbTFLY21OR1pGVldlbFoyVldwR2QxSldTbkprUjNSVFZrWmFXVlpzWkRSaE1WbDRWMnRrV0dFeFdsaFpWM1IzVFRGV1ZWTnJOV3hTYkVwNVdWVmFVMkZGTVhSaFJrSlhZbGhvZGxWVVJsWmxSbFp6WVVVMVYyVnRlRkJXUmxwclZURmtjMkV6WkZkaVZWcFdWRlphYzAweFduUmpSbVJYWWxWd1dsbFZhSGRXTWtWNFkwZG9WV0pVUmt4VmJURlhVakZrZEdGSGFFNWhiWE41Vm1wS01GVXhTWGxTV0d4VlYwZG9iMVJVVGtOaU1WWjBaVWhrV0ZKdGVIcFpWV00xVjJ4YWMyTkljRmhXUlRWeVZrUkdZV014VG5KaFJtUnBVakpvTmxkV1VrZFRNRFZ6VjI1U2FGSnRVazlWYWtaTFZWWmFSMVZyWkZkTlJGWjZWVzAxVjFaWFNrWk9WbEphVmtWYU0xWXllRnBsVjFKSFdrZDBUbFpzY0RWV1JscFhXVlprU0ZOdVRsaGlSMUpXVm0xNGQyRkdXbFpYYkdSWVVqRmFTbFl5TVRCVWJVVjZVV3RvVjJKSFVUQlZla1phWkRBeFdWUnNVbWhOTW1oWlZtMHhORk14U2tkV2JrWlVZVE5TY1ZSV1drdGxiRmw1VFZWa1YxSnJjRlpXYlRWclZqSktXV0ZJU2xWaE1YQk1WbXBHZDFOV1NuTlZiV3hYVWpOb1lWWXhXbTlrTVVsM1RWVmthVkpzY0ZkWlZFRXhWMVpzYzFadFJteFdiWFF6VmpKek5WZEhTbFpYYm14V1RXNUNVRlp0YzNoVFJsWnlaVVphYVZKdVFrbFhhMVpoVXpKTmVHTkZhR3hTTW1oUFZqQldTMVpzV25STldHUlRUVmQ0V1ZVeGFHOVdNV1JJWlVaV1YwMUhVbFJaZWtaWFl6RmtjbVJHV2s1V2JrSTBWbXRrTkZReVJuTlhiazVZWW0xb1YxbHNVa2RUUmxwRlVtMUdhMUl4V2twWk1GcHZZVVV4ZEdGR1JsaFdNMUp5VlhwR1lXTnJNVmRXYkdScFUwVktkbFpHWTNoaU1rbDRXa1prV0dKWVVsUlVWbVJUVTFaYVdHUklUbHBXYTNCNlZUSjRiMVl5Um5KalNGWlZWak5vYUZreWVIZFNWa1p6Vm1zMWFHVnNXa3BXYkdONFRrZEplR0pHWkZSaVIzaFRXV3RWTVZac1duTlhiVVpvVW01Q1NGWXllR0ZpUmtwelkwaHNWVTFXY0V4WlZscExUbTFGZW1OR2FGZE5NVXBaVm14U1IxWXlUWGhhUm14cFVteHdiMVJVUmt0WFJscDBaRVprVkUxVk5VaFphMmhUWWtaS1ZXSkdhRnBoTVhCTVdsWmFWbVZWTVZaYVJsWnBVbGQzTWxkV1ZsZFpWbGw0VjI1T2FsTkZjR0ZXYTFaM1UwWndSbGRyT1dwTldFSklXVlZhYjFVd01WWmpTRnBYWWtkT00xcFZaRXBsUmxaeVdrZHdVMVl4U2xsWFZ6RjZUVlphVjFadVVrNVdhelZQVlcweE5GWXhaSEpoUlRsWFRWVndlVmt3V21GV01rcFZWbXBPVjJGcldreFZiWE14VjFaS2RGSnNUbE5XYmtKUlZqSjBVMU14VFhoVGJrNVhZbXMxVlZsclpGTlVNV3h5Vm01a1ZWWnNjSHBXTW5oUFZXc3hWbUpFVmxaTmFsWlFWbXhrUzFJeVRrZFhiSEJYVWxWdmVsZFdWbUZWTVZwelkwVldWbUpGTlZoWmExcDNWMVpaZVdSSGRFNVNiSEJKVlRKMFlWWXlSbkpPVm1SYVlrWktRMXBWV21GamJHUjBVbXhvVTJKclNrZFdhMlEwWVRGVmQwMUlhRlJpUlZwWlZtNXdSMDVzY0ZaWGEzUnJVbXhhZVZZeU1YZFZNa1Y2VVd4Q1YxWXphR2hhUkVGNFZqRmtjMVpzVG1sU01VcFhWa1phVjFsWFZuTmlTRVpWWWxoU2IxWnRkSGRYUmxWNVpVVTVWMDFyV25sWk1GcFRWbTFXY2xkc2FGZGlSbkJJV1RKNGQxTkhTa2hpUms1WFVteHdXbFp0TVRCaE1ERkhWRmhvYVZKc2NFOVdiR1J2WXpGV2MxcEVVbHBXYlhoV1ZUSnpOVlF4U25OV2FsWmhWbFphYUZscldtRmtWa1p5WWtaV1RsWnVRakpXYlhCSFV6RmtWMUp1UmxSaVIyaHZWRlphZDJWV1dsVlRXR2hYVFZac05GWXlOVmRXVjBwSFYyNUNWMkpHY0ROV01WcGhVakZhYzFSc1drNVNSbHBKVmpKMFlWWXhXa2RYYTFwWVlrWndWbFpxVGs1bFJsVjRWMjFHV0ZKVVZsaFdSM2hyVkd4YWRFOUliRmhXTTFKWVZHdGFZV1JHU25WVGJXeE9UVEJLYjFaWGRGZFpWMDV6WWtSYVUySnJjSE5aYkZaaFUwWlplV1ZIZEdoV2JWSkpXVlZrYjFZeVNsbGhTRVpoVWtWRmVGWnFSbGRqTVhCSFZHeG9VMDFWY0ZaV01XTjRUVWRSZUdKR1pGWmlSbkJvVlcxek1WZFdWblJPVlU1WVVtMVNlVlp0Y0VOWFJrcHlZa1JPV2sxR1dqTldNbk40VTBaV2NWUnNaRk5sYTFwTlZtcEdZV1J0Vm5SVGEyUm9VbTFTYzFsVVJuWk5iRmw0Vld0d2JGSnNSalJWTWpWVFZrZEZlR05JUWxaaGF6VkVWa1JHVjJOc1pIUlNiRTVwVWpGS1dWWnFTalJoTVZWM1RWaEthbE5JUWxoVmFrNXZZVVphYzFwRldtdE5helZKV1ZWYVYxWXhXWGhTV0dSWFZqTm9hRlpxUmxwbFIwNUdZVWQwVTJKRmNIZFdWM2hoVjIxV2MxZHNhRTVUUjFKUFZtMTRkMU5HV1hsbFIwWlZUVlp3VjFSc1duTlhiRmw2Vld0NFlWWXphRmhaTW5oclkyeHdSMkZHVG1saE1IQkpWakZTUTFsV1RYaFZiazVVWWtkU2NWVnJWbUZYUmxKWFYydDBWRTFZUWxkV01uaDNZVEF4UlZKc1pGcFdWbkJvV1ZaYVNtVnRSa2RYYkdoWFpXdFZkMVl4V21GVWJWWkhWMjVXVTJKRk5YQlpiRnBMWkRGYVIxZHRkRTlTTVZwWVdXdGFZVll4V2tkWGJUbFhZbGhTTTFadGVITldWbEoxV2taa1YySklRbGxXYWtadllURmFjazFZVm1oU1YxSm9WV3RXWVZSR2NFWldWRVpYVFZaYWVsZHJXbXRXTVVwelkwVmFWMkpZUWt4YVJFWkdaVlpTV1dGR1VtaE5iRXBWVjFkMGEySXlSa2RXYms1b1VsVTFWMVJXV2t0V01WcDBUVlZrYUUxV2NIcFdiWEJUVmpKS1dWUlVSbGRXZWtaTVZUQlZOVlpXVW5OalIyaE9WbTVCTWxadGRHdE9SazE0VjJ4a1dHSnJjRmhaYTJoRFYwWnNjbGR1WkZSV2JWSlpWRlpTVTFaVk1WZGpTSEJYVm5wV1RGWnJaRXRXYkdSeVQxWmFhR0Y2VmpKV1Z6RTBXVlpaZUZwSVVtdFNNbWhQVm14U1YwNXNXbGhsUnpsb1RWWldOVlV5ZUZkV01rcEhWMnhvV21FeVVsUlpNbmhUVmxaS2RHUkhjRmRoTTBGNFZqSjBZV0l4VlhkTlZtUnFVbGhTV1ZaclZrdGpiRlp4VW0xR2FtRjZSbGRXTWpGdlZHc3dkMU5zYUZoV2JFcElXa1JHVDFJeVRrWmhSM2hVVW01Q2VWWkdaREJrTVVsNFYyeG9iRkpZVWxoVVZWSkhaV3hWZVdSRVVsZE5WbkI2VlRKMFUxWnRSbkpqUlhoYVpXdGFWRmw2Um10ak1WcDBZVVUxVkZKVmNESldiWFJoVmpKRmQwNVZaRlJpUjFKWVdXdGtVMkZHVm5GVWJFNVhWbTE0ZVZadGVHdFVhekZYVjJwQ1ZWWldTa2hXTUdSTFVqSk9SVkZzWkZkbGExcEpWbXBDYTFJeVRuTlViR3hoVW14d2IxUldhRU5VVm1SeVZtMTBWVTFWTlVsVmJYUnJWbGRLV1dGSE9WVldiVkY2VkZaYVlXUkhUa1prUlRWVFlrVlpNVlpVU1RGVk1WVjRXa1ZvYkZKc1NtRlpWRXBTVFVaYWNWSnVUbXBOYTFwSlZERmtkMVV5U2tsUldHUllZVEZhV0ZSVlpFZFdhekZYWWtaS2FFMXNTbHBYVmxKTFZHMVdSMkpHYUdwTk1taFZWV3BHWVZJeFduUmxSM1JYVFd4YWVsWXlOWE5XTURGWFkwZG9XbFpGV2t4YVJWcFRZMnhhYzFOdGJGUlNWWEJhVmpGa05HRXlTWGhXYkdSaFUwVTFZVlJVU205V1JsSlhXa1pPVTAxV1JqUldNalZQVmpBeGNsWnFXbHBXVm5CeVZteGFZVTVzV25OVmJVWlRZa2hDZVZkWWNFdFNNVTVJVkd0b2ExSlVWbGhXYTFaWFRteFplRnBFUWxkTlZsWTBWbTAxVDFkR1pFaGxSbVJhVmtVMVZGWnFSbUZqYkZweVpFWlNVMkpZWjNkWGJGWldUbFpaZVZOclpGUmliWGhYVkZkd1IxTkdXa2hsUlhCc1lsVmFSMVl5ZUd0V01rcEpVVzVzV0Zac1NraFdSRXBPWlVaT2MySkhSbE5oZWxaM1ZtMTBZVmxXV25OWGJsSnNVbXh3VDFadGRGZE9SbVJ5WVVWa1ZtSlZjSGxVYkZwVFZtMUtXVlZ0YUZWV2JIQjZXVEo0ZDFKc2NFZGhSazVvVFRCSk1WWXhaREJWTVZWNFdrVmtXR0V4Y0hCVmExVXhWbXhhYzFkdVpFNWlTRUpYVjJ0Vk5WWkdXbk5YYm5CWFVucEdlbGxWWkZkak1XUnhWV3hrYUUxWVFubFdSM1JoV1ZkT2NrMVZiR2hTYkVwdlZGZDRTMVpXWkZoTlZGSnJUV3RhU0ZaWGVHRlpWa3BIVTJ4U1YySllhR2hXTUZwclkyeHdSVkZzWkZOTlNFSklWbTB4ZDFReFduUlRiRlpTVjBkb1dGbFVSbmRoUmxwMFkzcEdWMkpHU25wWlZXUnZZVVV4U1ZGVVNsZGlSMUYzVjFaYVNtVkdjRVphUjNCVFZtNUNlRlpYTVRCa01WRjRWbTVPV0dKdFVrOVdiWGh6VGxaU1YxVnNUbFpOYTNCWVZXMXdVMVl4U25SaFNFcGFWbXh3VEZacVJrOWpNVkp6V2tkb2FFMHdTbFpXYkdoM1VqRlplRmRzWkZOaWEzQm9WV3BLTkdOR1ZuTlZiR1JZVW14d2VWZHJVa05XUlRGWVpVWmtWVlpzV25aWmExcExWakZrYzFwR1pHbFdSVnBWVjFSS05HTXlUWGhhU0U1aFVtMVNXRmxVUm5kT1ZtUnpWbTFHVmsxV2JEUldNbmhYVmpKRmVGTnNhRlZXZWxaRVZXdGFjMDVzU25Ka1JrNU9WbGhDTmxkV1ZtdFNNVlY0V2tWYVZHSkdTbGhWYlhoaFYwWnJlV016YUZkTlZuQXhWVEo0YjJGRk1YTlRibXhZVmpOU2NWUnNWWGRsUjBwSlUyeGthVkpVVmxoWFYzUmhZekExVjFkc2FFOVdhelZZVkZaYWQxSXhWWGxrUkZKWVlsWmFlVll5TlhkWGF6RnhVbXRvVm1KWVRURldNR1JMVWpGU2MxcEZOVTVpVjJoT1ZtMXdSMkl5VVhoU2JrcE9WbTFTVlZsVVNtOVdSbXh5VjI1a1YxSnRlSHBXVjNoclZqRmFjMk5JY0ZkaVJrcElWbGR6ZUZkR1ZuVmhSbHBYWld4YVVWWnNVa2RUTWs1eldraE9hVkp0YUc5VVYzaExUV3hhZEdORlNteFNiVkpKVm0xMGMxWXlTa2RqU0U1YVZrVktNMVpXV21GWFIwNUdaRVpPVG1KRmNFbFdWRWt4VXpKR1IxTnNWbGRpUjNoWFdXeFNWMUpHYkhGU2JVWlhUVlphZVZwRlpHOVViVVkyVm1wYVdGWnNTbEJaVkVaelZqRk9jMkZHV21obGJYaFlWMVprTUZNeVJrZFdiazVZWW0xU1ZGWnRjekZOUm5CR1YyeE9WV0pHY0ZaV2JYUnZWakZhUm1FemFGZFNSVnB5V1RKemVGZFdTbk5UYldocFVsaENiMVpyV2xkaE1WVjRWVmhvYWxKdGFITlZiWE14WTJ4YWRHUkhSazVTYlhoNVZteFNSMkZHU1hkalJXUmFZV3MxTTFacVJtdFRWa1p5WVVaa1UxSldjRWhYYTFKQ1RWWk9WMk5GWkZoaVYzaFVWakJXUzAweFduSlhiWEJzVW14V05GWkdhRzlXTWtwSFYyeE9XbFpGY0ZSWk1GcHpZMnhhVlZKc1pFNVdia0pLVjJ0V1YwMUdaSE5YYkZaVFlUSjRhRlpzV21GWFJscDBaVWRHYTFKc1dqRlZNbmhoVkcxS2RHRkZhRmhoTVVwSVZrUktUMVl4WkhWVWJXaFRUVzVvVlZaR1kzaGlNVnB6VjI1S1dHSlZXbTlVVmxwSFRsWmFXR1JIUmxWTlZuQlpXVlZrYjFadFJuSlRiV2hhVFVad2FGbDZSbXRrVm5CR1QxZHNVMDFWY0doV01WSkRWakF4UjFkWWJGTmhiSEJYV1Zkek1WZEdXbkZVYlRsVlVtMTRXRlpzYUc5aE1VcHpWMjVzWVZKV2NHaFdha1pMVm0xT1JtSkdhRmRsYTFWM1ZtdFNSMWxYVFhoV2JsWlVZa1pLY0Zac1duZFZSbHBZWTBVNWFVMVZNVFJXTW5SclZqSktSMk5GT1ZkaVdGSXpWVEZhVjJSSFZraFNiRnBPWVROQ1YxWnRNVFJXTVZsNVUydGtWMWRIYUZkWlZFWjNWVEZ3VmxkdFJtcE5Wa3A2VmpJeGMxWXhXWHBhUkZwWFlUSlJNRlpxUmxabFZrcHlXa1pvYVZKdVFscFhWekUwV1ZaWmVGVnNaRmhpVlZwWFZXMTRZVlpzVlhsbFIzUlhUVVJHZVZSc1ZtOVhiVVY0WTBkb1dsWlhVa2RhVldSUFUxZEdSMkZHWkU1TmJXaFdWbTE0VTFNeFRYbFVXR3hWWVRGd1dWbHNaRzlXUmxsM1YydDBWbEpzY0RCVVZWSkhWV3N4VjJOSWNGcGhNVXBvVmxkNFlWSnNaSE5WYkZwb1lUQnZlbGRzVm1GV01XUklWR3BhVjJKR2NHOWFWM1JhWkRGYWNscElaRlZOVm5Bd1ZtMDFTMVpHV2taVGJGcGFZVEZ3VjFSV1dscGxSbkJHWkVaU1UyRXpRalpXTW5SclRrZEdWMU51VmxKWFIzaFlXVmQwWVdOc1VuSmFSVnBzVW0xU01WWkhlR0ZoVjBWNlVXeGtXRlo2UlRCVmVrWnJWakpLUjJGSGRGTk5SbkI0Vmxjd2VFNUhWbk5YYms1V1lUQTFiMVJWVWtkWFZuQldWMjA1V0ZKdFVrcFZWM2h2VjJ4YVJsZHRhRmROUjFKWVZXMHhUMUl4WkhKT1YyaG9UVlpaZWxacVJtRlpWMFY0VkZob1dHSnJOV2hWTUZaaFZURnNjbHBIT1dwU2JGb3dXbFZvYTJGVk1WaFZiRnBXVm5wRmQxWnJWWGhXYXpWV1lVWmtUbUp0YURKV2JGWmhXVlprVjFadVRsWmlWVnBZV2xkMFZtUXhXa2hOVkZKWVlsWmFXVlpYZEd0WFIwWTJWbXhvVlZaV2NETlZNbmhoVmxaT2NWVnRiRTVXYlhjd1ZqSjBWMWxXVVhoWGJHeFdZa2RTV0ZsVVJtRmhSbHBHVjJ4T1YwMVhVakJhUldSM1ZHMUZlR05GY0ZoaE1WcG9WbXBHVTJNeFpGbGpSMmhUWW10S1dWWlhNVFJrTWs1elZXNUtXR0pGTlZSVVZscDNaV3hhZEdWRmRHaFNWRUkxV1ZWak5WWXlSbkpUYmtwWFVrVkdNMXBWV21GalZtUnpVMjFzYUdWc1dsWldiR040VFVac1YxcEdaR0ZUUlhCWVdXMHhVMVl4VWxaVmEyUk9WbTE0VjFaWGRFOVdNa1kyVW14b1YwMXVhRVJXTWpGSFkyMU9SbVZHWkU1U2JrSk5WMWh3UzFJeFRraFdhMlJWWVhwV1QxbHNaRzlpTVZwMFpFZEdhRTFFVmtoWGEyaExWR3hhV0ZWdVFsWmlWRVpVV1dwR1YyTXhWblZVYkZaT1ZteHdORlpXV2xOUk1WSnpWMjVTVm1KdGFGZFVWelZEVWtac1ZsZHRSbGRXYTNCNFZXMTRkMVl4V1hsaFJURlhZbGhDU0ZWNlFURmpNVTUxVTIxb1UwMUdjRlZXYlRBeFVXMVdjMWR1VW10U00xSlVXV3hhWVdWc1ZuUk9WWFJvWWtWd2VsVXllRmRXYlVwSFUyeG9WMVpzY0doV2FrWlhZMjFTU0dORk5WZFdia0V5VmpGa2QxUXlSWGxTYkdSVVlrZFNWVmxyVlRGWFJteFlaRWhrVjFKc1dUSlZiWGhyVmpGYWNsZHViRmhoTWxKNldWWmFTMVpXV25GV2JHUk9ZbXhLYjFaclVrdFNNazE0Vkd4c1lWSlViRmhWYkZaM1YxWmtXR1ZHVGxOTlJFSTBXV3RhVjFVeVJYcFZiRUphWWtaYU0xVnRlR0ZrUlRGV1drWmtUbUV4YTNsV2JURXdWVEZaZUZOcldsaGlSMmhoV2xkMFlWVkdWbkZTYlVaclZteHdlbFV5TVhOWFJrcFdZMFJPVjJKVVJYZFhWbHB6VjBaV2RWUnRSbE5pVjJoNlZsZHdUMVV4WkVkaVNFNVhZbXMxVDFSV1pEQk5NVnAwVFVSV1YySkZjREJXVjNSclZsZEtTRlZ1V2xkaVZFWk1WV3BHVDJNeVJrZGpSMmhvVFZoQk1sWXhhSGRTTWxGNFUxaG9ZVk5HU25GVmJYTXhWMFpXY1ZSc1NrNWlSbkI1VmpKNGExWXdNVVZTYTJoWFVucFdVRlpVUm10VFJsWnpWV3h3YVZKcmNGbFdiWGhoV1ZkTmVGZHNWbE5pUlhCUFZtcEdTMDVHV2xkWmVrWlZUVlpXTkZVeU5VdFhSMHBJWlVkb1ZtSkhVbFJhVjNoelZqRmtkRkp0Y0U1aE0wSkhWbXBLTkdFeVJsZFRiazVxVTBkNFdGWnFUa05STVhCV1YyczVVMDFWTlRGVk1uaGhZVlpLV1ZGc2JGZFdNMEpRV1dwR1UxSXhaSE5hUmxwb1RXeEtWbFpHWkhwTlYxWnpZa2hLV0dKWVVtOVZiWFIzVjJ4YVdFNVZUbGRpVlhCV1ZXeG9hMVpYU2xsaFIyaFhUVVpWZUZZd1drdGtSMFpJWWtaa1dGSlZXWHBXYWtvd1ZqSkdjazFXWkZoaVIxSlZWakJrTkdNeFZuTldWRVphVm0xNGVsbFZXa3RVYkVwelUyNXdWMDFxVmt4WmExcGhaRlpHY2xwR1ZsZGlWa295Vm0xd1IxbFdXWGxVYTFaWFlrZFNUMVpxUVRCbGJHUnpWbTFHV0dKV1JqTlVWbFp6WVVaS2MyTklRbHBoTVZvelZteGFhMWRGTVZWVmJGSk9ZVEZ3U1ZacVNURlRNa1pIVTJ4V2FWSnNjRlpXYlhoaFYwWlNjMWR1VG1waVJuQjVXa1ZhZDFZeFdrWlhhM0JZWWtaYVdGWnFSbUZqTVdSMVZXeGFhV0V6UWxoV1JtTXhZakZKZUdORlZsTmhNMUp5Vld4U1YxZEdhM2RYYlhSb1ZteHdlVmt3WXpWV01rWnlZMFJPVmxaRlJqUlZha1pUWXpGd1IxWnRiR2xTV0VJMlZteGtkMU13TlVoVWEyUllZbXMxV1ZsdGVIZGpiRkpYVjI1T1QxWnVRbGRXYkZKWFlVWlpkMk5HWkZkaVdFSllWbTF6ZUZkSFJrbGpSbkJvVFZoQ1RGZHNaRFJXTWsxNFdraE9hbEl5ZUZSWmEyaERaR3hhY2xkc1pGcFdNRlkxVmtab2IxWnRTbkpYYkZwYVlrWmFhRlpFUmxaa01WcHlaRVpTYVZKdVFrcFhiRlpyVFVaUmVGTllaRmRoYXpWV1ZtMTRkMkZHV25KYVJYUlhWakJ3U1ZsVldtRmhWa2w0VTJ4V1dHRXhjR2haTWpGU1pVWmtkVkpzU21sU01VcFZWMVpTUjJRd05VZFhXR3hyVW0xU1dGUldXbmRsYkZsNVkwZEdhRlpyTlVoV01uaHJWbFphYzJOSGFGZFdWbkJZVmpCa1YxTldaSFJrUlRWb1RUQktTVlp0ZUd0T1JrMTRWMWhrVGxkRk5WVlpWRTV2VjBaYWRHVkZkRk5TYkZwNFZUSjBNR0ZyTVZkVGJuQlhUVzVvV0ZsVlZYaFNWbHAxWTBaa2FWWkZSalJXVmxKSFlUSk5lRnBJVG1oU00wSlVWbXBHUzJSc1pGaGxSbVJyVFZad2VsWXllRzlVYkVwR1YyeG9WbUZyU21oYVZscFdaVlV4V0U5V2FHaGxhMXBLVm14a01FNUdXbkpOVldScVVqSm9XRlJWV25kTk1WVjNXa1YwVTJGNlZsZFViRnBQVkdzeGRGcEVVbGRpVkVZelZUSXhVbVZXVmxsYVJUbFhZbGRvVjFacVFtdGlNazVYVm01T1lWSjZiRmxWYlRFMFRVWlNWMVZzVGxkU1ZFWllWbTF3VDFZeVNsVldia3BhVmpOT05GWXdaRmRTVmtaelZteGthVkp1UWpWV01WcFRVakZOZVZWc1pGTmlhelZ3VlcweFUxZEdiSE5YYTNSc1ZtMVNXRmRyYUhkaE1ERnpWMnRvV0dFeWFGaFdWRXBMVTBkR1IyRkdXbWxTTW1oRlZtcEdZV0V5VFhoaE0zQm9VbXhhY0ZadGVIZFhWbGw1WkVjNVUwMVdWalZWTW5odllrWktjMU5zV2xkaE1Wb3pXVEZhZDFac1pIUlNiRTVwVTBWS1MxWnJZM2hpTWtaSVZtNU9WRmRJUWxoWmEyUlNUVVpXTmxOclpGZGhla1phVmxkNFlXRkZNSGhUYkdoWFlsaFNXRlY2Ums5U01rcEpWVzE0VTFaSGVGbFhWM1JoVXpKV1YxWlliRTVXVjFKV1dXdFdjMDVzYkZaV2FrSlhUVlZ3ZWxZeU5VdFhiRnBHVjI1d1YyRnJXbkpXTVdSUFUwZEdSMVJzVG1saE1IQm9WbXBHYTAxR1duSk5WbVJVWVRKU1YxbHRkR0ZWTVd4eVZsUkdWMDFYZUhwV2JUVlBWREZhZEZWdWJGZGlWRlp5Vm0weFIwNXNTbkphUm1ST1lXeGFXVlp0TVhwbFJsbDRXa2hPVW1KR2NGaFVWRXB1WlZaa2NsVnJkRlJOVlhCNlZtMDFUMVpIU2toVmF6bGFZVEZhTTFaR1dtRmpNV1J6Vkd4S1RsWlVSWHBXUjNoaFlURnNWMVJyV2s5V2VteFhXV3hvVG1WR1drVlNiVVpxVm10YVZsVnRjekZWTWtwR1kwUldWMDF1VW5KVVZWcGhVbXN4Vmxac1RtaE5iV2haVmtaak1WRXhaRWRYV0d4cVRUSm9jVlp0ZEdGV2JGWjBUVlZrVjAxcmNFaFpNRkpoVmpGYVJsZHRhRmRTUlhCVVZUQmFZV050UmtoaVJrNU9ZbTFvV2xadE1IZGtNRFZXVFVob1dGZEhhRmxaYkZaaFlqRnNXV05GWkZoV2JGWTFWR3hXTUdGR1duSmpSbXhhVmxad2VsWXlNVXRYVmxaeVpVWndUbEp1UWxsWFZFWmhVekpOZUdORmFHbFNNbmhVVkZSS2JrMUdXblJrUjNST1VqRkdORmxyV21GVWJGcDBaVVpPV2xZelVreFdiWGhUVmpGd1NFOVdXbE5pVmtwWlZtcEtNR1F5U2tkVGJsSldZbTFvV0Zsc2FHOVhSbHBWVVZob2ExWXdXa3BaVlZwclZUQXdkMU5yVmxkaVJrcElWbXBLVTFJeFVuTmlSMnhUVFVad1ZWWnFRbGRUTVZwSFYydGtWMkpIVW1GV2FrWkxWMFphYzJGSE9WZE5hMWt5V1d0YVQxZHRSWGxVVkVaVlZrVmFlbGt5ZUdGa1ZsSnpWbTFzVTFkRlNsaFdiVEI0VFVaWmVGcElUbGhpYXpWWldWUktiMWxXYkhOaFJ6bFdVbXh3TUZwVldrOWhiVXBIVTI1d1ZsWXphSEpXYWtGM1pWZEdSbVJHWkdsV1JVbDZWa1phWVZWdFZsZFRibFpVWVhwV1dWVnNVbGRYVm1SWVpVWk9WMDFyV2toV01XaHJXVlpLVldKRk9WVldiSEJoVkZkNFYxZEZOVlpQVmxwT1ZsaENOVlpxU2pSak1XUklVbGhvV0dGck5WaFdhazVQVGtaV2RHVkhkR3RXYkhCNlZqSnpNVll5U2tsUmJFcFhZa1p3VkZWNlJscGxSbVJaWWtaV2FFMXNTbmRXVnpFMFpESkplR0pHVmxOaWJWSnpWVzB4VTFkV2NGWlhhemxYWVhwR2VWa3dhSGRXTVVvMlZtdG9WMVo2Umt4V2JYaHJaRlpLYzFkdGFHaE5SemsyVm14U1IxbFdiRmhVV0docVVsZG9jbFZxU205WFJscHlWbXR3YkdKSFVsbGFSV1IzVkd4YWRGVnJiRlpOYm1oWVZsZDRZVkpzWkhSU2JVWlhUVEZLYjFaR1VrZFdiVkY0V2toU1UySllVbGhVVldoRFUwWmtWVkZ0UmxWTlZrcDZWako0YjFWR1drZFhiR2hhVmpOU01sUlZXbk5qVmtwelZHMXdUbUV5ZHpKWFYzUmhWVEpHV0ZOcldtcFNhM0JZV1d4b1UxZEdWalpTYXpWc1VteHdNVlZ0ZUU5aFZrNUdVMnhDVjFaNlFqUlVhMXByVWpKS1IxZHNaRmRTYkhCWFYxZDBWMlF4WkhOaVJscG9Vak5TV1ZWdE1WTlRiRlpZVGxWMFYySlZjRWhaTUZwdlZqQXhSMVpVUmxkTlJsVjRWbXBHVjJNeGNFZGFSbVJUWWtoQ1IxWnRNWGRUTWxGNFZGaG9hVkp0VWxoWmJYUjNWREZhYzFkdVpHcGlSbG94V1RCV2ExWXdNVmRqU0d4WFlsaFJkMVpzV21Gak1XUjFZa1prVG1Kc1NubFhWbEpMVXpGWmVGUnVWbWxTTUZwVVZXeFNWMDVzV25STlNHaFVUVmRTV1ZWdGRITlZiVXBIWTBjNVdsWkZXak5aVlZwclkyeFdjbHBIYUU1aGVrVXdWbFJLTkdNeGJGZFRiazVVWVhwc1dGUlZXbUZUTVhCV1YyMUdhMUpVUmtaVmJYaHJWR3haZUZOcVZsZFNiRnAyV1dwR1lWTkdUblZWYkZwcFZsWndhRlp0Y0U5Vk1sWlhZMFZXVTJKWVVuRldiWFIzVFZaa2NsZHNUbFpOYTNCS1ZWWm9iMVl5UlhsVWFsSldZV3RhY2xWcVJrOWtWazUwWTBaU1ZGSlZjRnBXYlRBeFpERkZkMDVWWkdsU1JuQlZXVmh3VjJNeFZuRlJWRVpVVW14d1dWUldWbXRXVjBwV1kwaHdWazFxUVRGV01GcGFaVzFHU1ZOc1ZtaE5iRXBaVjFod1IyUXhUbGRWYms1WFlsZDRiMVJVUWt0WFJsbDRWMnhPVW1GNlJsZFVWbHByWVZaS1IyTkdUbGRoTVZwb1ZtdGFWMk5XUm5SU2JHUk9WbXh2ZDFaR1ZsTlNNVmw0VTI1T2FsSnRVbFpaYTFwaFZrWlplV016YUZOTmF6VkdWa2Q0ZDFSc1NuVlJhMnhYWVd0S1YxUnNXbXRTTVU1MVZXMXNVMkpXU2xCV1JtTjRZVzFXVjFkdVVtcFNXRkpRVlcweFUyVldVbk5YYlRsWFVqQldOVmxWV205WGJGcEdZMGhhV2sxR2NGZGFSRXBIVW14U2RHTkhiRk5pUm13MlZtMHhOR0l5U1hsU1dHeFVZVEZ3VUZZd1pEUlhWbXhWVTJ4T1ZGSnRlRmxhVlZaM1lUQXhjazVWWkZwaE1YQnlXVlphU21WWFJrWldiR1JvVFZad2IxWnRNSGhWYlZaSFZXNU9WMkpHV25CVmJGSlhWbFprVjFWclpHdGlWbHBZVmpGb2MyRnNTbFpPV0VaVlZteGFNMVV3V2xka1IxWklUMVp3VjJFelFtRldWbVEwVkRGYVYxZHNaRmhpVjJob1ZXMTRkMVl4Y0ZaWGJVWnJVakZLU1Zrd1ZURmhSVEIzVTJ4c1YwMVhVWGRXYWtaV1pWWktjbHBHVW1oTldFSmFWMWN4TUZNeGJGZGlTRXBoVW5wc2NsbHJhRU5TYkZaMFRsVTVhRTFWY0ZaVmJYaDNWMnN4U0ZWdWNGZFNNMmhRVlcxNFQyTnRUa2RhUjJob1RXNVJNRlpzV2xOVE1VbDRWMWhvVldKSGVHOVZiVEZUWTBac2MxZHJkRmRpUm5CSVZqSjRZVlJzV25KalJXaFhWbnBXU0ZaWE1VdFNhelZYV2tad2FWSnNjRFpXUjNoaFlUSk9jMWR1Vm1GU2JIQnZXbGQwWVZOR1duRlRWRVpYVFZad2VWUldXbXRYUjBwR1UyeGtWMkZyTlhaVVYzaDNVbFpPY21SR1RtbFNiSEEyVmxSS05HRXhVblJUYTFwcVVsUkdXRmxyV25kV1JsWlZVbXMxYTAxRVZsaFhhMlJIVmtaS1ZWWnVXbGRXZWtZMlZGWmFVbVZHWkhWU2JFcFhVbFp3VUZaWE1UUlRNbFpYV2toS1lWSkZTbGhWYkZKSFVteFdkR1JIT1ZoaGVrWkpXVlZvUzFZd01YRlNhMlJoVm14d1dGbDZSbmRTTWtaSVlVZG9UbFo2YXpKV2JYaFRVVEZzVjJKR2FGWmlSMUpYV1cxNFMxWkdiSEphUnpsWFVtMTRWbFpIZEU5VU1rcEhZMGhvVmsxdVFrUldiRlY0Vm14YWNWWnNaR2xXUmxwVlZtMHdlRk14VGtoU2EyUllZa2hDY0ZWcVNtOVNWbVJYVm0xR1dHSldSalJXTW5oWFZUSkdObUpJUWxaaGExcExXa1JHWVZOSFZraFNiV2hPWVRGd05WWkdXbTlUTWtaelUyeHNVbUpWV2xoWlZFWldaVVpaZDFkc1pFOWlSVFY2VjJ0YWEyRldTbGxSYWxKWFZucEZNRlpVUmxwbFJtUnpWbXhrYVZKc2NGcFdiWEJQWWpKT2MxWnVSbE5pV0ZKVlZXMTRkMlZXYkZaYVJGSldUV3RXTTFrd2FITlhSMHBJVlZoa1ZtVnJXbFJXYWtaaFYxZEdSMXBIYUd4aVdHaFZWakZrTUdGck5WWk5TR2hwVTBWd1dGbHJWVEZXTVd4eVYyNU9UMVpzY0ZsYVJWSkRWakpLUjJORlpGWk5ibEYzVm14a1MxSXlUa2RSYkdScFYwZG5lbFpYY0Vka01VNUlWR3RhVDFZeWFITlpWRVpYVGtaYWRFMUlhRTlTTUZZMVZXeG9jMVpIUlhsaFJtUmFWak5vTTFaVVJuTldWbEowVDFaa1YySklRalpXYlhoVFVqRldjazFXYUZaaWJXaFhWbTV3VjFWR1dsVlNhM1JxWWtkU2VsbHJXbTloUlRGWFlqTndWMkpIVWpaYVZWcExZekZ3U1Zac1pHbFNia0pRVm0weE5HUXhWbGRYYkdSaFVrWktjbGxzV21GWFJscFlUbFprVjJKVmNFbFdWekExVjJ4YVJsTnFUbUZXYkhCb1dURmFSMk14Y0Voa1JUVlRVbFp3V2xadGRHdE9SbXhYVjJ4b1ZHSkhlRmRaYTFwTFdWWnNjbGRzV214U2JFcFlWako0WVdKR1dsVldiR3hXWWxSR2RsbFdXbUZXTWs1SFlVWmtWMUpYZERSV1dIQkhZVEZPUjFSdVNtaFNiSEJZVld4V2QyRkdaRmRWYTNSV1RWWndTRlpzYUd0WlZrcFpWV3hXVjJKWWFETlVWVnBYWkVVeFZWVnNaRTVXYmtKaFZsWmFiMkV4V1hkTlZtUnFVakpvWVZaclZrWmxSbFYzVjJzNWFtSkhVakJhVlZwVFZURmFXVkZ0T1ZkTmJtaHhXbFZhVm1WR1RuVlViR2hwVWpGS2FGZHNaRFJaVjA1SFlraEtWMVpGV2xoVVZscDNVMVp3UmxacVFsaGlSbkJXVlcxMGMxbFdXbGRYYkdoWFlsaG9hRnBGV2xka1ZrNXpWMnMxYVdKWGFGSldiR1EwV1ZaSmVWUnVTbEJXYlZKVldWaHdWMk5HV1hkYVJ6bFRWbXh3ZUZVeU5XdFZhekZ5VFZSU1ZrMXVVbkpXVkVwTFkyeGtkVkZzV21sU01taEZWbTEwWVZVeFdYaGFTRlpoVWxSc2NGVnFSa3RaVm1SVlVXeGtUbEpzYkRWVk1uUnZWVVphUjFkc2FGcGlSMmhFVmxWYVlWTkhWa1prUm1oWFlrWndOVmRyVm1GWlZsbDRVMnhhYWxKWGVGbFdibkJHVFVaYVJWSnRSbXBOVmxveFZUSjRVMkZXV2xkalJrSlhWak5DVUZscVJrdGpNV1J6V2tad2JHRXhjSGhXUmxwclRrWmtSMXBJU2xkaVdGSllWVzB4VTFOV2JGWmFSV1JYVm14c05sVlhkRTlaVmtwR1YyNUtXazFXY0VoYVJscHJaRWRTUms1V1pFNVdWM2N3Vm0xNFlXRnRWa2hVV0doWFYwZFNUMVp0TVZOWFZteDBaVWRHV0ZKc1NsbFViRnBQWVd4YWMxTnVjRmhoTVZsM1ZtdGFTMk14VG5WaFJtUnBWMGRvVFZkV1dtdFRNVWw1Vkd0c1lWSnRVbFJaYTFaM1UxWmFXR05GZEZSTmF6RTBXVEJXYzFaWFNsaGhSbEpoVm5wRk1GcFZXbUZYUjA1R1UyMTRVMVpHV2paV2FrbzBZVEpHUjFOdVVsWmlSbHBXVm1wT2IyRkdVbGRYYlVaVVVqQTBNbFp0ZUdGaFIxWnlWMWhrV0dKR1dsaFdSRVpyVTBaS2RWTnNVbWxpYTBwWVYxWlNSMlF4VGtkaE0yaGhVbGhTVkZsclduZGxiRmw1WlVjNVZrMVdjRmhXYlhCVFZqSktTRlZZWkZoV2JIQkxXbFphVjJSV1VuTlhiV3hvVFRCS1dGWXhZM2hPUmsxNFdrWmthVkp0YUhKVmFrSmhZMVpXZEUxVVVteGlSbkI2VmxkMFQyRkZNVVZTYkd4aFZsWndkbFl3V210VFZrWnpZVVp3VjFKV2NHOVdha0pyVmpGS2RGTnJaR0ZTYlZKeldWUkdWMDB4V1hoWGJVWmFWbXMxTUZadGRHdFpWa3AwWlVkb1ZtSlVSblpaTUZwWFpFZFdTVnBIYkU1V01VbzFWakZTVDJJeFdrWk5WbHBQVmxkb1dGbHNVbGRXUm14eVYydHdiR0pGV2pCVU1WcHJZVWRGZWxGc1ZsaGlSbkJvVmpJeFYxWnJNVlppUjBaVFZrZDRXVlpHVmxOU2F6RkhXa1pXVW1KSFVuQlVWbHB6VGxaVmVVNVdUbWxTYTNCV1ZXMTRiMVl5U2xsaFJYaFdZVEZ3YUZWdGVHdGtWbkJIWVVaa2FWZEdSWGxXYWtvd1dWWlZlRlZ1VGxSWFNFSnZWV3hhZDFkR1duUmxTR1JxWWtkNFZsVnRjelZoYXpGV1RsWndXbUV5VVRCV2ExcExZMjFPUjFkc1pHbFhSMmhZVmtaYWExVXlUWGxTV0hCaFVqQmFWRlpyV21GbGJGcFlaVVpPYWsxWFVsaFpNRlpoV1ZaS05tSkdiRlppV0ZJelZqRmFkMVpzVm5Ka1JtUm9aV3RaZUZac1l6RlRNV1JIVjI1U1ZtSkdTbWhWYkZwM1ZVWnJlVTFWWkZOTlYxSXdXV3RhYjFVd01YUmFla0pYWVd0YWFGZFdaRVprTURGV1lVWmFXRkl5YUZkWFYzUmhaREpKZUZaWVpHaFNWVFZZV1d0a05GWnNWbGRWYTJSb1RVUkdXRll5ZUc5WFIwVjVWVmhrVjJFeVVreFZiWGhoWTFaU2MxZHRiRmRTVlZrd1ZtMHhNRmxXYkZkWGJrcFBWbXh3VmxsclpHOWlNV3hWVVc1YWJHSkdjRlpWVnpGSFlVVXhjMU5zYUZaaVZGWlVXVlphUzJOck5WWlBWbVJwVmtWRmQxZHNXbUZaVmxwWFUyNU9ZVkpzY0hCV2JYUmFUVVprV0dORk9XbE5hMXBYVkZWb2MySkdUa1pPVm1SVlZsWndNMVJVUm10V01XUjFWR3hrVGxkRlNrcFhhMVpyWkRKR1YxTllhRlJYUjFKWVZXMTRZVlpHV25GVGEyUnFZWHBHV0ZscldrdGhSVEYxWVVac1dGWXphRlJXYWtwWFl6RmFXV0pIZUZOV01VcFJWMWQwWVZsVk1VZFZiazVZWWtVMWIxWnFRbmRYYkZwSFlVZDBXRkpzY0VkV01uaHZXVlpLUmxKWWFGZE5SbkJNV1RGYWEyUkdTbk5VYkdScFUwVktXbFp0TUhkTlYxRjVWRmhzVm1KSFVsaFdNR1J2VjBac1dXTklUbFpOVjNoNVYxaHdWMVJyTVZobFNHeFhZbGhvVUZadE1VdFNNa3BGVm14a1YwMHhSak5XYlRCNFVqSk9jMXBJUmxWaVJscFlWRlJLYjA1V1pITlhiRnBzVW14c05Ga3dWbTloUmtweVRsaENWMDFHY0VkYVZWcGhZMVpPZFZwR1VrNWhNVmt3Vm14a01HRXhWWGhhUldob1VteGFZVmxzYUc5VVJtUlhWMjFHYTFKVVJsaFZNbk14VlRKS1dXRkVWbGROYmxKWFZHeGFVbVZHWkhWVGJHaG9ZVEJ3YUZadGVHdFZNREI0WWtoS1dHSlZXbGhaYTJSVFRWWnNjbGR0ZEZWaVZWcDVWVEZTUTFkR1pFbFJhM2hYVW5wR1dGVXdXbE5qYkhCSFYyMXNWMDF0YUZGV01XUTBXVlpOZVZadVRtRlRSWEJ2VlRCa1UxVXhVbGRYYTNSVVVteHdTVnBWWkVkV01WbDNWbXBPV2sxSFVuWldiRnBoVjBaV1ZWRnNXbWxTYmtKWlZtMXdSMlF4VGtoVmEyUldZbGQ0VkZadGVITk9iRnB6V1ROa2EwMUVSbGhXTW5SclYwZEtSMk5HUWxkaVJsVjRWakZhYzFkSFVrbGFSbEpUWWtkM01GWnFTalJVTWtWNFUyNVNWbUZyU2xkWmJHaHZWVVphU0UxVmRHdFNiWFEyV1ZWYWExZEdUa1pUYTFaWFlURktTRlp0TVZkV01WSjFWRzFvVTJGNlZuZFdWM0JMWWpKV2MxZHNhR3BTVkd4d1ZGWmFTMWRHV1hsbFJtUldZbFZXTkZrd2FFdFhiVVY0Vmxob1YyRnJXbkpaTW5oclkyczVXR0ZHWkdoTmJtUTJWakZTUTFZeVRYaFhXR3hVWWtkNFUxbFVSa3RYVmxwMFpVaGthRkpzY0hoVk1uTTFWVEZhY2s1WWNGcE5SMUoyVmtjeFMxSnRUa2RYYkdST1ZqRkdNMWRXVWtkVmJWWlhWVzVLWVZJeWVFOVVWelZ2WlZaYVdHTkZUbHBXTURWSVZqSTFSMVpYU2xWaVJrSmFZVEZ3ZWxSc1duZFdiRnBWVm0xb2FWWllRa3BXUkVaVFZERmFWazFXYUdoU1ZrcFlWbTV3UjFOR2EzbGxSM1JyVm10YWVsa3daSE5WTURGMFdqTnNWMDF1VWxSVmFrcE9aVlpXY2xkck5WZGlXR2g0Vmxkd1MwNUdVWGhXV0dSWFlUTlNWVmxyV25kbFJsVjRWV3RrVm1GNlJubFdNbmh2Vm1zeFdHRklXbGRoYTNCTVdrVmFWMk14WkhOV2JHUlRWMFZLVWxacldsTlNNVmwzVGxoT1UySnNXbFpaYTFVeFZrWnNWVkp1WkZoaVJtdzFXa1ZhYTJFd01WZFhibXhWVm14YWFGWXdaRXRqTVdSeldrWldWMkpJUW05V2JGWmhWakZhVjFKc1ZsZGlSMUp3VlcxNGQwNXNXbFZUV0docVRWWktNRlV5ZUd0V1IwVjZZVVpvVjJKWWFFeFZhMXBYWTFaT2NtUkhjRTVXYTNBMlZtcEtORll5UmtaTlZXeFNZbFJzV0ZWdGVHRmpiRkp5VjJzNVYwMXJjRXBWTW5oM1ZHc3hkR0ZHV2xoV00xSllWbXBCTVZZeVNrZFhiRnBwVWpGS1dsZFhlRmRrTVU1WFYyeG9iRkpyTlZsWldIQkhVMVphV0dWRlRsaGhla1pJV1RCU1MxbFdXblJWYkZKV1RVWndURnBGWkV0U01YQkhWR3MxVG1KVk5ERldiVEI0WkRGTmQwMVZhRk5YUjJoWlZqQmtORmRHYkhKWGJtUnFZa1phTUZwVlZqQmhWVEZYVTJ4c1ZWWnNjRkJaVjNONFYxWkdjbU5HY0U1U2JIQlJWbTE0WVZNeVRuSk9WbVJoVW0xU1ZGUlVSa3RVVmxsNFYyeGFiRkpyTlVsV2JYUmhWakpLUjJOR2FGcGlSbkJNV2xaYVlWWldUbkZWYkU1cFZtdFpNRlpVU1RGVk1WRjRWMjVPVkdKSGFGaFphMXBMVjBaV2NsZHNjR3hXTURWSFdrVmFWMVJ0U2taalJXeFhZV3RyZUZWcVJsZGtSazV6WWtaYWFWSXphRmhYVjNScllqRkZlR05HV2xoaVJuQnpWVzE0ZDJWV1VYaGFSemxWWWtad1dWcEljRWRXTVZwR1YyNWFXbVZyY0V4VmFrWlBWMWRPUjFkdGJGZE5iV2hhVm10YVYxbFdiRmhXYms1cFUwWktjMVZxVGxOalZteHlZVVZPVkZKdFVubFhhMmhyVmxkS1NGVnJaRlpOYWtaSVZtcEtTMU5HVW5GVmJGWm9UVmhDTmxadGNFZFRNV1JYWTBWa1ZtSlhhSEJWTUZaTFpHeGFjMWt6Wkd4U2JGWTBWbTEwYTJGV1NuUmhTRTVXVFVkU1ZGWXhXbUZrUjFaR1pFVTFWMkpZVVhwV01uUlhZVEpHUjFkWVpHcFNWMmhoVkZWYVMyRkdXWGRYYkhCc1lrWmFNVll5ZUhkVWJVWnlWMnhXVjJKVVFqUldSRVpMVmpGa2RWUnNVbWxTTW1oVlYxZDBiMUV4VWxkWGJrNVlZa1UxVkZSV1ZYaE9WbHBZWkVkMGFGWnJOVWRXTW5oWFYyeFplbUZGZUZwaGExcFVWbXBLUjFKc1VuTmhSMnhUWWtacmQxWnRlR3BsUlRGSFZsaG9XR0pyTlZsWmEyUTBWbXhTVjFwRk5XeFNiSEI1VmpJeFIxWXlSalpXYkdSWFVqTm9kbGxWWkVaa01rNUZWMnhrVjAweFNtOVdWM0JIWVRGSmVWUnJXbGhpV0VKVVdXdFdkMVpXV2xobFJtUnJUVVJHV0ZZeU5VZFdSMFp6VTIwNVZWWldTbGhWTVZwaFpFVTFWazlYYUdsU1dFSTJWbFJLTkZReFpITlhhbHBUWWtaS1YxbHNhRzloUmxweFVtNU9UMkpHY0RCWmEyUnpWVEZhUjFkc2JGZGlXRkp5VkZWYVRtVkhTa2RYYXpWWFZqSm9lbFpYZUdGWlZsbDRWMjVTVGxack5YRlphMXBYVGxad1ZsWnRSbWhOUkVaWFdUQlNRMVpYU2tkalJsSlhZV3RhYUZac1dtRmpiRnB6WVVkc1UySnJTblpXTW5SVFVqSkZlRmRZYUZoaWJGcFVXV3RWTVdOR1dYZFdhM1JyVFZad01GcEZaRWRXUlRGelUyeG9WMkpIYUhwWlYzaExWbXMxVjJGR1ZsZE5NbWh2Vm1wR1lWbFdUa1pPVm1SVllrWndWRmxzV2t0VGJHUnpWbXhrVGxKc2NEQlZiVFZMVjBkRmVtRkhSbUZXTTFKb1dsZDRjbVZYVmtsYVJrNU9WMFZLU0ZaSGVHRlVNVkp6VTI1V1VtSlZXbGhaVkVwU1RVWnNXR016YUZkTlZrb3hWa2Q0VTFkR1NYbGhTR2hYVmpOU1dGcEVSbk5XTWtwSFZteFNhVkpVVmxsV1Z6QjRUa2RXVjFwSVNsZFdSbHB2V1d0V2QxWnNXblJrU0U1WFZqQndTRmt3VmxOWGJGcEdZMFpvV2sxdWFGQlpNbk40VmpGa2NrNVdaR2xUUlVwVFZtMTRZV0V3TlVoVmJsSldWMGQ0VlZsVVJuZFdNV3h5Vm01a1dGSnNTbGxhVlZZd1ZsWktjMk5HYUZkV00xSlFWbXRrUjA1c1duTmhSbHBPWW14S2VWWnNVa3RUTWsxNVZHdG9hRkpzV2xoV2FrWkdaREZhV0dWSFJsZE5WbXcwV1RCV2IyRXhTWGxsUm1oYVlURndZVnBYZUdGV1ZrNVZVbXhXVGxZeFNYZFdWM2h2WXpKR1IxTnVTbFJpVlZwaFZtdFdZV0ZHY0ZobFJscHNVbTVDUjFSc1pEQlViRXBIVjJ4b1YySkhUalJaYWtaYVpVWmtjMXBIY0ZOU1ZuQlpWbTEwVjFsV1pFZFhhMVpUWVRKU2NWUlhkSE5PYkdSeVdraE9WazFXY0hsWk1GcFRWakpLV1ZGcmVGZFdSWEJRVm1wS1MxTldVbk5oUjJ4VVVsVndOVlpyV21GaU1VVjRWR3RrYVZKc2NGaFpWM1JMWWpGU1YxZHVaRmhXYmtKWFZtMTRhMWRHU1hkV2FsSlhUV3BXVEZZeWVHRmpNVnB4VlcxR1UySldTa2xXVkVaaFZESk5lVkpyYUdsU2F6VlBXV3hrYjFSc1duUmpSWFJyVFZWc05WWldhRzlXVjBWNFkwWkdWMkpVUm5aWmVrWlhZMVpTY2xSdGNFNVdia0kyVm0wd01WbFhTa2RUYmxKV1lrZDRZVlJWV2xaTlZscDBUVlYwVkZKVWJGWldWM2gzVkd4S2RWRnFXbGhXYkZwb1ZrUkdTMk14VW5WV2JFNXBVbXh3V1ZaWGVHRmtNVTVYVjJ0a1dHSlZXbFpVVjNoTFYxWmFTR1JJVG1oaVJYQjZWakl3TlZaV1dsZFRiR2hWVmtWYWFGWnFSbXRrUjFKSVlVVTFWMVpHV1RKV2JHUTBZakpGZUZkclpGaGhNbEpaV1d0YVMxWXhiSE5oUms1b1VteEtWbFZ0ZUV0aVJrcHpZMGh3VjFJemFHaFpWbHBoVjBkU05sTnNaR2hoTTBFeVYyeFdZVlV5VWtkVGJsWlVZa2RvY0ZscmFFTlhiRnAwVFZSU2EwMXJOVmhXVjNoaFYwZEtjMk5JVGxkaVdFMTRXbFphYzFac1pISlViR1JPWWtad05sWnFTVEZaVmxsNVUyeHNVbUV3TldoV2JHUlRWRVpzTmxKdVpGUldhelV3VlcxNFUxVXhXa2RYYWxwWFlsUkNNMVJXV2tabFJuQkhXa1pvYUUxdGFIaFdWM2hXVFZkSmVGZHVUbFpoTURWUFZGWmtORTFXYTNkV2JYUlhUVlZ3ZWxrd1dtdFdNa3BaVVd4Q1YySlVSbGhaTW5oUFkxWlNjMWRyTlZOaWEwcFdWakZTUjFsV1RYbFZhMmhWWVRKb2NGVnFTbTlVTVZKV1ZtNWFUbUpHY0hoVmJURjNZVEF4UlZKc2FGZGlSMmgyVm10a1MxTkhSa2RWYkhCb1RXeEZkMVp0ZUdGak1rMTVVbXRvVUZadVFsaFphMVozVmpGYVdFMVVRazVTYkVvd1ZUSjBiMkV4U2tkWGJGcGFZVEpTZGxaRldtdFdNVnBaWVVaa2FWSlVWalpXYlRFMFdWWlplVlp1U2xOaGJFcFlWRlphZDJGR2JGVlNhM0JzVW14S01WVXllR3RoVmxwWFkwWldXRll6YUhKWmFrWlRWakZ3U1ZSc2FHbFdWbkI1VmtaYWExVXhTWGhWYms1WVlrZFNWMWxzVm5kU01WSnpWMnhPVjFac2J6SldiVFZYVmxaYWMyTkhSbUZXYlZKWVZUQmtVMUl4V25KT1ZrNVRWbTVDVEZadGVGTlNNa2w1VlZob1dHRXlhRlJaYlhNeFYxWnNXV05GWkZkTlZuQjVWbTAxYTFReVNrZFRiRnBXWWxoUmQxWlVRWGhXYlU1RlVteGtUbUZyV2pKV2EyUTBZVEZLYzFSdVVsTmlSMUpZVld4a01FNUdaRmxqUlhSVFRWWndlVlJXVm5OWlZrbDZVV3hTVjJFeVVUQldNbmhyVjBkU1NHUkhiRTVXYkhCSlYxUkNZV0l5U2tkVWExcFBWbTE0VjFsc1VsZFNSbFY0VjI1a1YySkdjREZYYTFwaFZHeGFXVkZyYUZkV1JXdDRWbXBHWVdOck1WbFNiR1JwWW10S2FGWnRjRTlVYlZGNFkwVldVMkpIVW5GVVZsVXhUVVpzY2xaVVJtaFdNSEJIV1RCU1UxWXdNVmhWVkVKWVZteHdlbFp0Y3pGWFZsSjBZVVUxVG1KRmNHOVdNbmhyVGtac1dGUnVUbGhpYTFwVFZqQmtiMVZHV25SbFNHUk9VbTEwTmxrd1ZtdFhSMHBIWTBSQ1YxWXpVbkpXYkdSTFVqRk9kR0ZHWkU1U2JrSnZWMnRXWVZZeVVsZFViazVxVWpKb1QxWnROVUpOYkZweldrUlNWMkpXV2toV1IzUnJZV3hLVjJOSVNsWmhhelYyVmpCYVUxWnNWbkpVYXpscFVtNUNXbGRyVm10U01WVjNUVmhPVkdKdVFsaFdibkJYVkVaYWMxcEZkR3BOVlRVeFZWZDRZV0ZYU25KVGEyeFhWMGhDU0ZacVJtRldNVkoxVld4Q1YwMHhTbEJXYlhCUFlXMVdWMWR1U21GVFNFSlFWbXBDWVZkR1ZYaGhSemxYVWpCV05GWXllSE5YYkZsNlZXcEtZVkpGV21GYVZWcGhWMWRHUjFWc1RtbFNia0V4Vm1wS01GbFhSWGxTYTFwT1ZtMTRVMVpyVm5kWFZscDFZMFZhVGxKdVFrWlZiWE0xVmtaS2NrNVliRnBoTWxKNlZsUkdhMUl4VG5OUmJHUnBWMFpLV1ZaWWNFSmtNbFpIVjI1R1dHSkZOVzlhVnpFMFZrWmFSMVpzVGxaTlJFSTBWako0YjJKR1NsbFZiVGxYWWtaS1NGUlZXbUZYUjFKRlVXeGthVkp1UWtoV1ZFb3dZakZrZEZOc2JHaFRSWEJZV1d0YWQxVkdjRVpXVkZaWVVqQmFTRlpIY3pGV1JrcFdWMWh3VjJKWVFreFVWV1JHWkRBMVZscEdaRmhTTW1oV1ZtcENhMDVIVFhoV2JrcFlZbFZhV1ZadE1UUmxWbVJ5VjJzNVYySkZjSHBWTW5oclYwZEZlRmRxVGxwaE1sSk1WVzF6TVZkWFJrZGFSMnhZVW10V00xWnRlR3RsYlZaSFYyNVNWV0V5ZUZkWmEyUlRWMFpTVlZGcmRGTldiSEF3V1RCV2ExZHNXbk5pUkZKYVRVWmFXRlpxU2t0V2JHUnpWV3hXVjFKV2NFMVhhMlEwV1ZkT1YxSnVUbUZTTTBKUFdXdFdkMWRXV1hsa1JtUm9UVlp3V1ZVeU5VdGhiRXB5VTJ4YVYySkdjRE5XUlZwaFZsWktkVlJ0Y0ZkaGVsVjNWMnRXWVZVeVJsZFRiR1JZVjBoQ1dGWnVjRU5OTVZKWFYyMUdWRkpyY0ZwWmExcGhZVlpLVm1OR1pGZGlWRUkwVmxSR1YxSXlUa1phUm1ob1pXMTRlVlpYY0VkWlZrNVhZa2hLWVZORk5XOVdiWFIzVjJ4V1dHUkhPVmROUkVaWVdUQmtiMWR0Um5KWGF6bGhWbXh3VUZreWVIZFRSMFpHVGxVMVRsSllRbHBXYWtacVpVVTFTRlZZYkZWaVIxSndWVEJhUzFReFduSldhM1JxVW0xNGVWWXlNVWRXUmtwelkwVnNZVkpXVlRGWlZWcGFaREpPUm1OR1dsZE5NbWQ2Vm0xd1IxZHRWbk5XYms1V1lraENXRlZzV25kbFZscFlUVWhvVlUxVmNGaFdNalZQWVVaSmVXVkdVbFZXVmtwSFZGVmFZV05zWkhOYVJuQlhZWHBGTUZaclpEQmlNVnBJVWxoc2JGTkZTbGRaVjNSTFlVWlpkMWRzVGxkaVJscDZWa2R6TVZSc1dYaFRiSEJZVmtWS1YxUnNXbUZTYXpGV1ZteGthVkl4U205V1YzaGhXVlphUjJKR1dtRlNiVkp5VlcxNFlXVldXWGxsUjNSWFRXdHdXVmxWVmxOV01VbDZZVWRvVm1WcldrdGFWVnBQWkZaYWMyRkhiRmhTYTNBeVZtdGFVMU14Vm5KTlZtUllZbXhLVDFVd1pHOVVNVlp4VVcxR1ZGSnRVbmxXYlRFd1Ztc3hjbGRVU2xwaE1YQlFWbXhhV21Wc1JuSmhSMFpYVFRKb05sZFljRWRaVjFKWFZXNU9WV0pGTlU5VmJUVkRWRVphYzFkdGNHeFNNVVkwVmxjMVMxUnNXbGRYYkdoYVlsUldSRll4V25OV1ZrcDBVbXhhVTJKWVozZFdSbHBYV1ZkS1IxTnVVbEJXUm5CWldWUktVMU5HV2xWU2JVWnJWbXRhZWxscldtdFdNbFp5VW1wU1YyRXhTa3hXVkVaYVpVZE9SbUpHVm1sV1ZuQlZWMVpvZDFZeVZrZFhiR2hxVWxkU1ZWUldWbmRYUm1SeVlVVjBXbFpyY0hsVWJGcGhWbTFLV1dGR2FGVmlSbkF6VlcxNGMwNXNTbk5qUm1ScFZtdHdTMVp0ZEd0a01WRjRWMjVTVjJKcmNGVlpiVFZEVmpGc1ZWSnVaRlJTYkd3elZqSTFhMVV5U2xaT1ZXaFdUVzVOZUZacVJtdFNiRXB4Vkd4a2FHRXhjRzlXTVZwclVtMVJkMDVXV21oU2JFcHZWRlpvUTJReFdsaGxSMFphVm14R05GWnROVWRXUjBwR1RsWmFWbUpZYUdoVVZWcHlaREpHUms5V1pGTmlTRUkyVm1wSk1XUXhXWGROV0Zab1VtdEtXRlJYY0VkU01YQlhWbFJXVjFac2NIcFhhMlJ6VmpGS1YxZFljRmROVm5CWVYxWmtSbVZHVGxsaFJsSnBZa1p3V1ZkWGRHdGlNVnBIWWtoS1YySnNjRTlaYTFwM1pWWmtjbFZyVGxkV1ZFWjVWR3hXYjFadFNsbGhTRnBZVm14d1RGWXhXa2RqTVZKelZteGtWMkpJUW5aV01uaGhXVlprZEZaclpGZGlhM0J4Vld4U2MxZEdVbGRXYm1SWVlrWndlbGRyVWtOaFZURlhZa1JXVmsxcVZsQldNR1JMWTIxT1IxcEdaR2hOVm5CTlZsZHdSMVV5VFhoYVNFcFFWbTFTY0Zac1duZFRSbVJ5Vm0xMGFrMVdWalZWTW5oellVWktkVkZzYUZwaE1sSlRXa1JHYzFaV1RuSmFSazVPVmpGS1lWZFVRbXRpTVZwSFUyeFdWMkpIYUZoWmJHaFRWMFpyZVdNemFGZE5helZIVjJ0a1IxVXlSalpXYkZwWFZucEZNRnBFUVhoV01XUjFWV3MxVjFKVmNGaFhWbWgzVWpBeFIxZHNhRTlYUlRWWVZGVlNSMlZHVmxoalJrNVlZbFphZVZrd1ZUVlpWbHBZVld4Q1ZtRnJXbGhhUldSSFUwZFdTR0pHWkdoTk1FcEtWbTB3ZUU1R2JGaFNia3BQVm0xb1ZWbHRjekZXYkd4eVYyNWtWMkpIZUZaVlZ6VnJZVVpLYzFOc2JHRlNWMUpJVmpCYVlXTXlTa1ZWYkdob1RXeEdNMVp0ZUdGVE1rNXpWMjVHVm1KR2NFOVpWM1JLVFVaYWRHTkZaRnBXYTNCNlZrYzFUMkZHU25SVmJHaFdZa1p3TTFscVJtdFdWazV4Vld4d1YwMUVSVEJXYkdNeFZESkdSMU5ZY0doU2JXaFdWbTE0WVUweFduUmxSMFpxVFZoQ1JsWlhlSGRXTWtWNVpIcENWMkZyYTNoV1JFWmhVMFpPY21GR1dtbFNia0pvVjFaU1IyUXlSa2RYV0d4c1VtczFXRmxyV21GbFZtUnlWMnM1VldKR2NERlZWM0JYVmpKS1ZWRnFUbFZpUm5Cb1dYcEdUMlJXVG5SalJrNVhZa2hDWVZZeFdsTlRNVlY0VjJ0a1YxZEhlSE5WYkdoVFZrWmFkR1JIUmxkaVJuQXdXbFZrUjFack1YSlhWRXBYWWxoU1ZGWXdXbUZPYkVwVlVXeGthR0V4Y0UxWFZFcDZUbFpaZUdORlpGaGlWM2hVVkZaV2QxWldXbkpYYlhSc1lYcEdWMVJWYUc5V01XUklZVVpvV21KR1NucFpla1p6WTJ4a2NtUkhlRmRpU0VKS1ZrZDRWMVF4V25SVGEyUnBVa1phV0ZacVRsSmtNVnAwWlVkR1UySkZOWGxaVlZwM1lWWmtTR0ZHUmxkaVZFVXdWbFJLVDJNeFVuVlZiRTVvWld4YVZsWlhlRmRrTVZKSFYyNVNhMUl6UW5OVmFrSnpUbFpXYzJGSVRsZFNNSEJKVmxkNGMxZHRTbGxWYWs1WFlrWndhRmw2Um10amJIQkdUbFUxVjAxVmJ6QldiRkpMWldzeFdGTnJaRmhpYTNCeFZUQmtiMVl4VWxoalJXUlVVbXh3ZUZWdE1VZGhNVnB5VjI1b1YxSXphSFpXYWtGM1pVWk9kV0pHWkdsWFJVcEpWbGh3UjFReFNYaFZiazVwVWpKNFZGWnJaRFJYVmxwWVpVWmthMDFyYkRSV01qVlRWREZrU0ZWc2FGcGlSbkJJVkd0YVlWSXlSa2hrUm1SWFRVaENTRlpIZUc5Uk1WbDVVbTVLVkdKWGFGaFVWbHAzVFRGYWRHVklaRk5XYkZwNlZtMTRUMkZXVGtaVGEzaFhZbGhTY2xwWGN6RldNVnAxVTJzMVdGSnJjSHBXVjNoV1RWWmtWMkpHYUd0U1dGSnpXV3RhWVdWV1dYbGtSM1JZVW10d01WVlhkR3RYYXpGSFkwVjRWMUl6YUV4V2FrcFBVbFpLYzFwRk5WZGlhMHAyVmpGYVUxSXlSWGxVV0d4VVYwaENhRlZxVGxOV1JscDBaRWhrV0ZKdFVsbFVWVkpIVldzeFdHVkdhRmROVjJoeVZqQmtTMlJHVm5WU2JGWlhZbFpLVlZkc1dtRlpWazVHVGxaYWExSnVRbGhXYTFaaFRteGFjVkp0T1d0TlZuQllWako0YTFkR1pFaFZiR1JWVm5wV2RsVnFSbmRTVmtweVpFZDBVMVpHV2xsV2JHUTBZVEZaZUZkclpGaGhNVnBZV1ZkMGQwMHhWbFZUYXpWc1VtczFlVmRyV2s5aFZrbDVZVWM1VjFZemFIWlZWRVpXWlVaV2MxZHNaR2xXVm5CNVZtMHhORll3TlZkalJWcGFaV3hhV0ZWc1VrZGxWbXQzVm01T1YwMVZjREJaVlZKUFZqRmFObEpyZUZwbGEzQlFWVEZhUjJNeVRraGlSbWhUVmtWVmQxWnFSbTlrTVVsNFlrWmtWRmRIYUhGVmJHUlRZVVpXY1ZSdE9XcFNiSEI2VmxkMFlWUnNXbk5qUm14VlZsZG9jbFpIZUdGa1IxWkhZVVprYVZJeWFIbFdiRkpIV1ZaSmVGcElUbGRpUjFKd1ZXMTRWMDVHWkZWVGFsSlhUV3MxV0ZaSE5VdFpWa3AwWVVaU1ZWWnNjRE5WTW5ocll6RmFjMXBIZEU1V2JrSkpWbFJLTkZZeFdYbFRiazVxVW0xNFlWWnJWbmRWUmxKeVYyMUdhbFpyTlhsV01qRXdWRzFGZWxGcmFGaFdNMUpvVm1wS1IxTkdTbGxoUjNCVFRXMW9XVlpYTUhoVk1EVnpWV3hrWVZKVVZuTlZha0ozVW14WmVXVkdaR2hTTVZvd1dsVm9hMVl5U2xsUmEyaFdaV3RhY2xacVNrOVNNV1IwWVVaT1YxSXphRE5XYkdONFRrWmtjazFZVGxoaVIyaFFWbTB4VTFkR1ZuUmxTR1JYVFZaS1YxbFZaREJYUmtsM1YyNXNWazF1UWxCV2JYTjRVakpPU1ZOdFJsTmlTRUpKVjJ0V2ExTXhTWGhWYmtwUFZtMVNjRlZ0ZUhKbFZscDBaVWQwVGxKdGVGaFZNV2h6Vm0xS2NrNVlRbFZXUlhCVVdUQmFWMk14WkhKa1JscE9WbTVDTkZaVVNqUlVNVnBHVFZaa1dHSkdjRmRXYWs1VFkyeHNWMXBGZEZOaGVsWllWMnRhYjJGSFJqWldibXhYVFZad1YxcFZXbXRXTVVwMVZHMXNVMDFHY0ZsV2JYQkxZbTFXYzFkWWFGaGlWVnBZV1d4YVIwNUdXa2hsUm1SWFZqQndSMVJzV2xOWGJGcEdWMnBLWVZac2NHRmFWbVJQVW14U2RHTkZOVmRYUlVwS1ZteGplRTVIU1hoaVJtUlVZa2Q0VTFsclZURldiRnB6VjIxR2FGSnVRa2hXTW5oaFlrWktjMk5JYkZWTlZuQk1XVlphUzA1dFJYcGpSbWhYVFRGS1dWWnNVa2RXTWsxNFdrWnNhbEpzY0hCV2FrcHZWMVphUjFadFJscFdWRUkwVmxjMVQxZEhTbkpPV0VaWFlsaG9URnBXV25kU2JHUnpXa2RvVjJGNlZraFdWRWw0VWpGWmVWSlliRlZYUjJob1ZXdFdZV05zYkRaU2JYUllWakJ3U0ZZeU1YTmhSMVp6VjJ4a1YySlVSVEJYVmxwS1pEQXhTV0ZIUmxSU1ZuQlVWMWN4TkdReVRuTlZiR1JZWW0xU1QxWnRNVFJsVm1SeVlVZDBhRkpzY0hwWk1GWnpXVlpPU1ZGcmFGZGlXRTQwVm1wR2EyUldaSE5hUms1VFYwVktTbFpzVWtOWlZsbDVWV3hrVjJKc1NuQlZiWGhMVmtac2NtRkZUbXRpUm13MVdsVmtSMVl3TVZaTlZGWlhWak5TY2xsV1drdGtSbFowWVVaYWFFMVlRazFYVkVKaFZqSk5lVkpyYUZCV00xSlBWbXBHUzFsV1pGVlJiWFJPVW14V05GWXlOVTlYUjBwSVpVWmFWVlp0VWs5YVZWcGhZMnhrZEZKc1pHaGxiRnBZVm10a05HSXlSa2hTV0dScVVrWndXRlpxVGxOaFJsWnhVbTEwVTAxck5VZFdNakYzVlRKS1JtTkdWbGRXTTJoWVdrUkdWMVl4WkhOYVJscG9UVEZLZUZaR1dsZFpWMVp6WWtoR1ZXSllVbTlXYlhSM1YwWlZlV1ZGT1ZoaVJtOHlWV3hTUTFadFNsbGhSMmhYWVd0d1NGVnRlRTlqYXpsWFdrZG9UazFGY0V0V2JYaHFaREF4VjJKR1pGaGlSMmhVVmpCa1UxVkdXbkpXYTNSYVZtMTRWbFV5Y3pWVU1VcHpWbXBXWVZaV1dtaFphMXBhWkRGa2NtTkdhR2hOV0VGNlYxZDBhMUl3TlhOWGJrNVRZa2RvV0ZSVVJrdGxWbHB6Vld0a1ZFMVZiRFZWTVdoM1lWWkplbFZzVWxwaVIyaDJWbFZhWVZkSFRrWmFSbEpPVmxSV1NWWnFTVEZWTWtWNFUxaGtXR0pyTldGWmExcGhUVEZ3V0dWSVRsZFdiRW94VmtjeGIxVXlSalpXYTJ4WFZrVnJlRlZVUm1GV01XUlpZMGRvVTFZeWFHOVdWekUwWkRKT2MxWnVSbE5pUlRWeVZtMXpNVTFHYTNkWGF6bFhUVVJDTlZsVlZqUldNREZZWVVST1ZsWXpUalJXYWtaUFkyMUdSMVJ0YkZOaWEwcFdWakZrTkZVeFdYaFhiR1JZWW1zMVdGWnJWbUZWTVZKWFdrUlNWMkpHV2pCVWJHUXdZVVV4Vm1KRVRscE5SbG96Vm1wR1MwNXNTbkpoUm1ScFYwVTBNRlpYTVRSWlZscFhVMjVPV0dGNlZsaFphMmhEVld4YWRHVkdUbE5OYkVZMVZrWm9iMVpYU2tobFIyaFdZbFJHVkZrd1dsZGtSMVpKV2tab2FWSXhTalpXYWtsNFRVWmFjazFZU2s5V2JXaGhXVlJHZDJGR1dYbGpNMlJzVmpCYVNsVXllSGRoUlRGMFlVVldWMVl6YUdoWlZFcFBZekpPUmxwR1ZtbFNia0pWVmtaYVYyTnRWbGRYYkdSaFVrVktVRlZ0ZUhkVFJsbDVaVWRHVlUxV2NGZFViRnB6VjJ4WmVsVnJlR0ZXTTJoWFdrUkdkMUp0VWtkVmJFNVhVbFp3V1ZZeFVrTlpWazE0Vlc1U1ZHSkhVbFZaVjNoaFYwWnNXR1JGZEZkU2JGcDRWVzE0UzJKR1NuSk9WRVpYVWpOb2NsbFdaRWRPYkZwelkwWm9WMkpGY0VsWGExSkhWMjFXU0ZOcmJGUmlWMmhVVm10a05HVldXblJOVkZKclRWZFNXRmt3Vm1GWFIwcFpWV3hvV21KR1dqTlZNRnB5WkRGa2RHUkdaRTVoTTBKaFYxWldZVlV4V1hsU2JrcFlZVE5vWVZSV1pGTlVSbFowWTNwV1YwMVhVakJaYTFwUFlWZEZkMk5HWkZkaVdHaFVWV3BHYzFZeFduVlZiRnBZVWpKb1dWZFhkR3RpTVZaSFYyNVNUbFpHU2xoVVZscExWakZhZEdWSFJsVmlSbkI2V1RCYWExWXdNWFZoUlhoYVZrVkdORll3VlRWV1ZsSnpZMGRvYUdWc1dYbFdiWGhxWlVaTmVGTnVUbFZpYXpWb1ZXMTRZVmRHYkhKaFJVNVVWbTFTZVZZeU1VZFdWMHBYVjJ0b1YxWjZWa3hXYkdSSFRtMUtSazlXV21sWFJrbDZWbTEwWVdFeFpFaFVhMXByVWpKb1QxWnNVbGRPYkZwWVpVYzVhRTFXVmpWVk1uaFhWakpLUjFkc2FGcGhNWEJYV2xWYVYxWldTblJrUjNCWFlURnZlRlpyWkRSVU1WVjVVMnRrYVUweWFGbFdhazVUWTJ4V2NWSnRkRk5OVlRWNlZtMTRhMWRHVGtaVGJIQlhZbGhDVUZWVVJrNWxSbFp6V2tkR1UySldTbmhXUm1SNlRWWk9SMWRZYkdwbGExcFlWRlZTUTA1V2JGWmhSemxYVFZWd2VsVXlkRTlXVmxwMFZXdDBZVlpXY0ROVk1WcExZekZXZEdKR1RtbGhNSEF5Vm0xMFlWbFdXWGhVV0doWVlrZFNXRmxyWkc5VU1WbDNXa1pPYVUxV1dqQmFSV2hQVkdzeFYySkVWbHBOUmxweVZqQmFTbVF4WkhWaVJuQk9VbTVDTWxadGNFZFpWMDE1Vkd0V1ZXSkhVazlXYlRWRFZWWmtjbGR0UmxkTmJFcEpWVzEwYTJGR1NuSk9WbWhXWWxob1dGUnNXbUZqVmtwMFVteHdWMDFHY0RWV1IzaGhZakZhZEZOclpHcFRSWEJYV1d0YWQxUkdXbkZTYms1cVRWWmFlVmRyWkhOVWJGcDFVV3BTVjJFeVRqTlViR1JIWTJzeFYxZHJOVmRTYTNCWlZtMDFkMVl3TUhoWGJrNWhVbFp3Y2xSVlVsZFhiR1J5VjIxR1YwMXJjRmhWTWpWelZqRmFSbUo2UWxaaVZFWlRXbFZhVTJNeFduTmFSMnhUVmtaYVZsWXhXbE5TTWxKMFZtNU9XR0V4V2xSWmEyUlRWakZTVjFkdFJrNVNiRlkwV1ZWa01GWlZNVmRqUm1oV1RXcFdSRlpxU2tkamF6VlpWMnhXVjFadVFsaFhiRlpoV1ZkT2NrOVdhR2xTVkZadldsZDRZVk14V25Sa1IwWnBUV3hHTkZZeWVHOVdSMHBJWlVjNVZrMUdXak5XYWtaaFkyeGFkVnBIY0dsU00xRXhWMnhXYTAxR1ZYaFhia3BxVTBkNFdGVnFUbTloUmxwVlUydDBVMDFYVWxaVlYzaHJZVlpKZDA1RVFsZFhTRUpJVmtjeFVtUXdNVlppUjJoVFlsZG9kbGRXYUhkV01rWkhXa1prVm1FelVsWlpXSEJIVjBac2NsZHRSbGhTTUhBd1ZsZDRVMVp0U2xWV2ExSldUVlp3YUZZd1pGTlNWbFp6V2tkb2JHRXhiRFJXYlhocVRWWlplRnBGYUZSaE1taHZWVEJXWVdGR1ZuSldiVVpWVFZoQ1JsVXlkREJWTWtwSFYyNXdWazF1YUhKV1J6RkxVbTFPUmsxV1pHbFNia0pWVmxkd1IxUnRVWGRPVm1SaFVqQmFWVlZzVWxka2JGcFlaVVpPYWsxck5YcFdWM2h2WVRGT1JrNVdRbGRpV0doTVdsZDRjMVp0Umtoa1JtaHBVbTVDTmxkVVFtRlpWbHAwVTJ4V1YySkZTbGhVVjNCSFYwWnJlV042UmxkTlZWcDZXVEJhYTFZeVNuSlNhbFpYVFc1b2FGZFdXbk5XTVhCR1drZHdVMVl4U2xWWFYzUmhaREZSZUZadVRtRlNSVFZQVlcxNGMwNUdXbGhrUlRsb1VsUkdSbFp0ZEhOV01WbzJWbXhDV2xac2NFeGFSV1JIVWpGd1IyTkdaRk5YUlVwV1ZqRmtkMUl4YkZoVWJHUldZbXhLVVZacVRrTlVNVnB6Vld0YWJHSkdjSGxYYTFKVFZsVXhjbGRyYkZaTmJtaHlWbXRrUzFOV1JuTmFSbFpYVFRCS1dWZHNaRFJoTVZsNFdraFNVMkY2YkhCVmJUVkRXVlpaZVdSSFJscFdNRnBIVkZab1QxWkhSbk5qUm14YVlURndNMWxWV25kU1ZrcDBaRVpPVGxac2IzaFdWekUwVXpKR1YxZFljR2hTYTBwWVZXMTRZV05XVW5KYVJtUlRUVlp3ZUZZeWVFOWhWa3BWVm01d1dGWXpVbWhWZWtwWFZqRmtjbUZGT1ZkaVZrcFhWMWQwVjJReFduTlhibEpyVW0xU1dWVnFRbmROVmxaWVpFWk9WMDFWY0ZoWk1HaDNWakpHY2xkcVRsWmhhM0JRVlRCYVMyTnJOVmRWYkU1b1RUQktUVlp0Y0VkaE1ERklVMWhzVmxkSGVGUlpiWFIzVkRGWmQxWlVSbGhXYkd3elYydGFUMVl4V25OVGJHUlhZa1pLU0ZacVJrdGtSbFp4VVcxR1YxWnVRbmxXYkZKTFVqQTFkRk5yWkdoU2JWSllWRlJLYjJWV1duTlZhM1JVVFdzMWVWUnNXbGRWTWtwSVZXczVWMkpZVWpOV1JWcHJZekZhZEdSR1RtbFdhMWt4VmxSR2IyUXlSa2RUYkZaWFlrWmFWMWxyV21GTk1WcElaVWRHYWsxV1dubFdSM2hUWVVkV2NsTlVRbGRXUlc5M1dWUkdWbVZXVG5WVWJYQlRUVzFvVjFadGVHdFZhekZIVm01T1dHSkhVbGhVVm1oRFUxWndSbGRzVGxWaVJuQlpXa1JPZDFZeFNYcGhSbEpXVmtWYWNsVXdXa3RYVjBaSFdrWmtVMVp1UWxoV2JUQjNaVVpWZUZkclpGZFhSMmhaV1ZSS1UyTldXblJrU0dST1VtNUNSMVl5ZERCV1YwcEdZMFpvVjJKSGFIWldha1poVW14a2MyRkdjRmRTVm5Cb1YydFNRazFXV25OalJXaHFVbXMxY0ZacVNtOVhSbGw0VjIxMFRsSnRlRmxXUnpWUFZqSktjbGRzVWxwaVJscG9WbXRhWVdSRk1WVlZiWGhUWWtaWk1GZFdWbXBPVjBaR1RWWmFhbEpGU21oV2JGcDNaV3hhYzFwRmRGUlNiRnBhVjJ0YWExVXhXblZSYTJoWVlrWmFhRlpFU2xOU2F6RlhXa2RHVTJKV1NsbFhWM1JoVmpBMVIxZHVVazVXUlVwaFZtMHhORmRHVlhoaFNFNVhWbTFTU1ZwVldrTldNa3BWVm10U1YxSkZXbnBXTUdSVFUwWktkR1ZHWkdsU2JHdDRWakZTUTFZeGJGaFNXR1JPVjBWd1VGWnNaRk5XYkZKWFYydDBWbEpzY0VsYVZWWXdWMFphYzFkcVJsZFdNMmh5Vm1wS1MxSnRUa1pXYkdSb1RWWndiMVpZY0VkVGJWWkhWRzVXVjJKVldsUlVWRUpMVmxaa1dFMVVRbFJOUkVJMFZqSjRhMWRIU2xsUmJFSlhZV3RLYUZVd1dtdGpiRnAwVW14V1RsWnVRa2xYVkVKaFl6RmtkRkpZYkZaaWJIQllWbXRXWVdWc2EzaFhhMlJyVm01Q1NGWkhjekZWTVVsNllVWnNWMDFXY0ZoWFZscFNaVVprV1dKR1VtaE5XRUo0VmxSQ1YxTXhXWGhWYkdoUFZsVTFWMVZ0ZUZwTmJGVjVaRVJDVjFKcmNIbFViRkpIVmpGWmVtRkdRbHBXYlZKTVZXMHhUMU5GT1ZkYVIyeFRZVE5DVGxadGVGTlRNVXAwVm10a1ZtSkhlRzlWYlhoaFkwWnNWVlJyVG1sTlZuQklWMnRTVTFkSFNsZFhibkJYVmpOb2FGWnFTa2RqYkU1elZteHdhRTFXY0ZsV1JsSkhWakpTUmsxVlZsTmlSMUpVV1d0b1ExZEdXa2hsUjBaV1RWZFNNRlV5ZEc5V2JVVjVZVVpvVlZaWFVsUldNRnBXWkRGd1IxcEdUbWxXVkZaSlZtdGtORlF4VlhoWGJHeFNWMGRvV0ZscldrdFVSbEpXVjIxMGFtRjZWbGhYYTFwWFlVVXhjMU5zV2xoV00xSnlWbFJHV21WSFNrbFViR1JwWWxaS1YxWlhNVFJUTVZwelZteG9UMVl6VW05WldIQkhWMVp3VmxWclRsZFdiSEI2VmpJMVMxZHNXa1pYYTNoaFVteHdTRmw2Um1Gak1rWklZVVUxYVZKWVFsZFdiVEUwVmpKRmVGWllaRTlYUlRWVVdXMTBkMk14Vm5SbFJYUllVbXh3ZWxaWGVHdFZNVXB6WWtSV1drMUdXbEJaVjNONFZtczFWbUpHV2s1aWJFb3lWbXRrTkZsV1pGZFNiazVWWWtaYVdGcFhkR0ZXVm1SelYyMUdXR0pXUmpSV2JUVkxXVlpLYzFkck9WZGlSMmhFVkcxNFlXUkZNVVZTYkZaT1ZqRktTbFpYZUc5aU1rWnpVMjVTVm1KVldtRldhMVozWkd4YVZsZHVaRk5OVjFJd1ZXMTRiMVV3TVZaalJXeFhUVzVTYUZkV1pFZFdNVTUxVm14S2FWSXlhRmxYVjNoVFVtc3hSMWRzVmxOaVNFSnpWVzF6TVUxV1ZuUk5XRTVXVFZad1NWcFZXbTlYUmxsNlZXMW9ZVkpGV21oVmFrWmhWMWRHUjJGSGJGTlhSVW8xVm10YVlWbFdiRmRhUm1SV1ltczFXVmx0Y3pGWFJteFpZMFZrVTAxV2NIcFdWM1JyVmpBeFYyTkdhRnBOUm5CUVYxWmFTMUpzWkhGVGJVWlRVbGhDVEZkc1kzaFNNVWw0Vkc1U2FWSnJOVmhXTUZaTFYyeGFkR1JIUmxwV2JYaFlWVEZvYzFadFNraFZiRnBYVFVkU2RsWnRlSE5XVmtaVlVteGFVMkpGY0ZoV2Frb3dUVVphY2sxV2FHeFRSMmhYVkZkd1JtUXhXbkphUlhSVFlrWndlRlpIZUdGaFZscEdVbXBTVjJKWVVtaFhWbHBoWTJzMVYxZHNWbWxTTW1oMlYxWlNRMlF3TlhOWGJHaHJVakJhV0ZSWGVFdFhSbGw1VGxaT1ZrMXJjRWxaVlZwVFZsWmFjMWRxVGxkV00yaG9XVEZhUzJSR1NuUmhSMnhYWWtoQ1MxWnNVa3ROUm14WVVteGtWR0pIVWxsWldIQnpWakZzV0dSSVpGZFNiSEJIVmpKNGEyRXhTWGRPVlhCWFVqTm9hRmxXV2t0a1ZrWnlXa1prVjJWcldUSldSM2hoVjIxV1IxcElWbFppUm5CWVZXeGFkMWRzWkZkVmEzUnBUVmRTU0ZkcldtdFhSMHBaVld4V1ZtSllhR2hVVlZwVFZqRmtkVnBIYUZkaVNFSklWbXBLTUdNeFpFaFNXR2hZWWxkb2FGVnJWbUZoUmxaeFUyczVVMkpWV2toV01qRnpWVEZhV1ZGcVZsZE5ibWh5VkZWYVRtVkdWbk5hUm1SWVVqSm9XVmRXYUhkak1WVjRZa2hLV21Wc1drOVVWbVEwWlZaYWRHVkZPVmRpVlhCSVdXdFNWMVl4V1hwVldHUlhZbGhvYUZWdGVFOWpiVlpJVW14T1UxWnVRalZXTW5SWFlURk5lRk51VGxWaWJFcHdWV3hTVjJJeFVsZGhSVTVvVW14d01GcEZaSGRpUmtwMFpVWm9XbUV4Y0haV2EyUkxVMGRHU1ZSc1drNVNNbWhGVm1wR1lXTXlUbk5YYkZaVFlsaFNXRmxzYUc5V01WcFlUVVJHYUUxclZqUlZNV2hyWVd4S1dWRnNhRlppYmtKSVZUQmFZV1JIVFhwaFIzUlhZa1p2ZUZadE1UUmlNa1pYV2tWa1ZHRnJjRmhWYlhoTFUwWndTRTFXWkZkTlZUVXhWa2N4YzFVeVNrZGpTR1JYWWxSQmVGVlVTa3BsUm1SellVZHdVMWRHU2xGV1YzaFRWakZrUjFkclpHaFNNMUpZVm1wQ2QxSXhVbk5oUlU1WFRXdGFlVlV5TVc5V01ERlhZMFJPVjJKWWFETlZiRnBYWXpGYWMxUnRiRk5pUjNRMFZtcEtNRll5Um5KTlZtUnBVbTFTYUZWc1pHOVdiR3hZWTNwR1YwMVlRbGxhUlZZd1lrZEtSMWR1YkZkTmJsSnlWakJhUzJSV1JuSmFSbkJPVW01Q1RWWnJaRFJUTVZsNVZHdFdVMkpIVWxoVmJGcDNWMVphY2xWclpGTk5hekUxVlRGb2QxbFdTWGxsUmxKWFlsaFNNMVpyV21Ga1IwNUdaRVphVGxacmNFbFdiWGh2WVRGWmVWTnVVbFppYTFwV1ZtMHhVbVZzVWxobFIwWlVVakZLUjFReFpHOVViVVY2VVd4b1dGWkZTbFJWYWtaYVpVWk9jVmRzVGxkU1ZYQlpWMWQwWVdReGJGZGpSbHBZWWxoU2NWWnRNVk5sYkd0M1drUlNhRkpVUWpOVk1uUjNWakF4V0ZScVVsVmhNbEpUV2xWYWEyTnNjRWRVYld4VFlraENNMVpzWkRSaU1VVjRWMnhrVjJKck5XOVZiRlV4WXpGc2NscEdUbGhXYkVwWFdWVmpOVlpyTVVWU2JuQldUVzVTZGxZeWMzaFNNazVJWVVaa1RsSXhTazFYVkVvMFZESlNWMUp1VGxoaVYyaHZWRlpvUTFkc1dYbGtSM1JQVW14R05WWkhOVTloYkVwWVlVWlNXbUpIYUVSV2ExcFRWbTFHUmxSc1VtbFNia0YzVjJ4V2FrNVdXbFpOVmxwUFYwaENWMWxyWkc5a2JGcHlXa1ZrYW1KSFVucFphMXAzWVVVeGMxTnFTbGhXUlc4d1YxWmFTMVl4VG5WV2JGWnBVakpvVlZadGRGZFpWbVJ6V2toT1YySkhVbEJWYlhoelRrWmFTR1JIUmxWTlZuQjVWVEo0YTFZeVJYaFhhazVoVmpOb1dGWXdaRmRUVm1SMFpFVTFhRTB3U2tsV2JYaHJUa1pOZUZkWVpFNVhSVFZWV1ZST2IxZEdXblJsUlhSVFVteGFlRlV5ZERCaGF6RnlUbFZ3VjFJemFGaFpWVlY0VWxaYWRWcEdaRmROTUVwRlYydFNSMVF5VFhoYVNFcG9VbFJXV0ZWdGRIZFdiR1JZWkVaYVRsWnJOWHBXTW5SdllXMVdjMWRzWkZwWFNFSklWRlZhZDFac1duSlBWbWhUVFVad05WWlVTVEZrTVZwMFVsaG9hbEpYYUZoVVZWcDNUVEZXZEUxVk9WTk5WVFY1Vkd4YVQxWXlTbkpTYWxKWFlsaG9WRlZxUmxwbFJsWlpZVVpPYVdGNlZuZFdSbEpMVlRKT1IxWnVUbGhoTTFKWVZGWmtOR1ZzYkZaWmVsWm9Za1p3TUZwVlVrTlpWa3BZWVVoS1YxSjZSa3hWTUdSVFVsWmFjMk5IZUdobGJGbDVWakZhWVZsV1RuUlZXR1JPVm14YVdWbHJaRk5XUm5CWVpFZEdUbUpHYkRSV01uaGhZa1pKZDAxVVVsZE5hbFpVVmtSR1lXTXlUa2RWYkhCWVUwVktXVlpYZEdGaE1XUkdUVlpXVm1KR1NrOVphMVozVTJ4YVZWTnFRbXBOVm5CWlZUSjRZVmRIU2toVmJGcFhZa1p3YUZSWGVIZFdNV1IwWkVaa1YyRjZWWGhXYTJRMFV6RlNkRkpZY0ZKaVNFSllWbXRXWVdSc2JEWlRhM1JUVFZVMVdsa3dXbUZoVmxsNVlVWnNWMUpzV21oWFZtUlhZekpLU1ZWdGVGTk5NVXA0VjFkMGEwMHdNWE5YYmxKT1YwVTFWMVJWVWtkU2JGcFhZVWM1VjAxV2NEQldSbWh2VmpKR2NtTkZhRmRpV0U0MFZURmtSMUl4VW5SaVJtUlRZa2hDYUZacVJtdE5SMFY1VTFoc1ZtSnJOVzlVVkVwVFlVWldjMVZzWkdwTlYzaDVWakl4UjFkSFNrZGpSRUpoVWxaS1JGbFdXa3BrTWs1SllrWldhVkp1UWtWV2JURTBXVlpLZEZScmJHcFNiSEJZVkZSS2JtVldaSEpWYTNSVVRWVndlbFp0TlU5V1IwcElWV3M1V21FeFdqTldSbHBoWXpGa2MxUnNTazVXVjNjeFZsUkpNVlF5Um5OVWExcFBWbXhLV0ZSVlpGTldSbHB6VjJ4T1YySklRa1pXVjNoUFZqSktSMk5HYkZkTmJsSnlWRlZhWVZOR1RuSlhhemxYVm01Q1dGWnRjRTlVYXpGWFYyeG9hazB5YUhGV2JYaGhaVVphU0dWSGRGWk5SRUkwVlRKNFIxZEdXalpTYWxwaFZsWndURnBGV2xkamJVWklZVVpPYVZacmNGRldiVEYzVkRKSmQwMVdaRmhpUjNoeFZXeFZNV0l4VWxoak0yaFBWbXh3TUZSc1drOVdNVnAwVld0c1lWWldjSFpXTW5oYVpXeFdjbVZHWkZOaVNFSlpWbTE0WVZNeVRuUlZhMmhwVW0xU2NGVnROVUpOUmxwelYyMTBUMUl3VmpSV01XaHZWMGRLYzFOc1pGZGhNVnBvVmpGYWMxWldUbk5UYlhST1ZqRktXVlpxU2pSa01rcElVMnhhV0dFelFsaFZibkJIVTBaYVZWSnNjR3hTYXpWNldWVmFiMVl5Vm5KV1dHUllWak5DU0ZkV1drOVNNVTV6WWtkd1UyRXpRblpXUmxKRFV6RmFjMWRzVmxKaVJuQlBWbTE0WVZOR1duUmxSbVJYVWpCd2VWUnNXazlYYlVWNVZGUkdWVlpGV25wWk1uaGhZekZTYzFkdGJGTmlXR041Vm0xNGFtVkhTWGhhU0ZKVVlUSm9WMVpyVmt0aFJscHhWRzA1YW1KSGR6SlZiWGhQWVcxS1JrNVljRlpXTTJoeVZtcEJkMlZYUmtaYVJtUnBWMGRvZUZkc1ZtRmpNVmw0VjJ4c1lWSlVWbGhXYWtaTFYyeGtXR1JIUm10TlYxSklWbGQ0VjFaSFJuTlRia1phWVRKUk1GWnRlRmRrUlRWWVpFWm9VMkV5ZHpCV2Frb3dZekZzVjFkc2FGWlhSMUpZVm10V1IwNUdXbkZTYlhScVZtdHdlbGRyVlRGVk1rcHlVMnhhVjAxdWFISlVhMXBXWlZaU2RWUnNXbWxpUm5CVVYxZDBWMlF4WkVkVmJHaHNVbGhTVmxWdGVIZFhSbHBZWkVVNVYxSlVSbnBWYlhCVFYwZEZlV0ZHVWxwV2JIQk1WbTB4VDFOV1JuTldiR1JYVFcxb1JsWnNVa05aVmxaMFZtdGtZVk5GTlZaWmExcDNWREZhZEU1VlRrOVdiVkpXVlZjeFIyRlZNVmRqUkVKV1RXNVNjbGxYZUV0WFYwWkhZa1prYUdGNlZsVldSbVEwWkRGYWMxcElTbEJXTTBKd1ZXcEdTMDVzV25GVGFsSm9UV3RhV0ZVeU5WZFZiVVY1WlVab1dtSkhhSFpXYTFwWFkxWktjMWR0ZUZOTlJGWkxWbXRrTkZsWFJsZFRibFpTWWtkNFdWWnFUbE5oUm1SWFYyMUdWMDFXY0RGV1IzaGhZVmRHTmxac1ZsaFdNMUpYVkZaa1YxSXhXblZVYldoVFRURkthRlp0ZUZOU01WbDRWbGhzYkZJd1dsaFdiWGgzVjBaVmVVNVlaRmRoZWtZeFdWVldhMWxXV25OalJtaGFUV3BHVEZWcVJtdGtSMHBIVkcxc2FFMUlRbGRXYlhCSFlXMVdSazFWV2s1V1YxSlpXVlJLVTFaR2JIUmtSMFpvVW14YWVsWXlNVWRXTURGWFkwUkdXazFIYUZCWlZFWmhZekZhY1ZWc1pHbFhSVEI0Vm14amVGTXhUa1pQVmxaVllraENiMVJXV25kV1ZscHpXa1JTV0dKV1dsaFdiVFZMWVRGS2MyTkdhRlppUm5BelZrWmFhMVpXU25SU2JYUk9WbGQzTVZaWE1UQlpWMFY0VTFod2FGSnRhR0ZaYkdoVFZFWlplV1ZIUmxSU01WcElWa2Q0UzFSc1duTlhWRUpYVmtWYWRsbDZTa3RTTVU1eVdrWm9hVkl6YUdoWFZsSkxWVEZhUjFkc1dsaGlSVFZZV1d0b1ExSXhhM2RhUkZKb1ZtdHdWbFp0Y0ZOV01rcFZVbGhrWVZKRldsZGFWVnBQWTJ4a2MxVnRiR2xTYmtKYVZtdGFhazFXUlhoVmEyUllZbXRhVTFZd1pHOVdSbEpYVm01a1dHSkhkRE5XTWpFd1lVWlpkMk5HY0ZwV1YyaDJWakJhV21WdFJraGhSbWhYWWtaWk1GWnRjRXRVTVVweldraE9ZVkl5ZUZSV2ExcGhUa1phYzFwSVpGSmhla1pYVkZaV2ExZEhTbk5UYXpsWFRVZFNWRmxxUmxOV01WcDFWMnMxYVZJemFEVldiR1EwWVRGa2MxZHVUbXBUUjNoV1dXdGtiMWRHV1hsak0yaFRUVlp3VmxWdGVGZFdNVXBXVjFSQ1YxWjZRalJXVkVaTFpFWlNjbHBHVW1obGJGcFZWbTB3TVZGdFZrZFhiazVXWVRKU1dGUldXa2RPUmxaMFRsVTVhRlpVUWpWV1Z6VkRWbTFLUjJORmVGZFdSVnA2V2tWa1UxSnRVa2hoUms1cFYwZG9XbFp0TUhoTlIwVjVVbGhzVkdFeWFITlZiVEZ2V1ZaYWMxZHNXazVXYlZKWVYydFdNRlpHV25KWGJtaFdWak5vTTFsVlZYaGtSMFpIVW14a1RsWnVRbTlXYlRCNFZqRlplVlJyV21sU2JFcHdWV3BLYjJReFduUmtSbVJhVmxSV2VsZHJXbk5oYkVwWVZXNUtWVlpzY0ROVk1WcFhZekpHU1ZwR1dtbFdWbGt5Vmxaa05GWXhXbkpOVldSWFYwZG9XRlpzV25kWFJscHpWMnM1YTFac1NucFZNakZ6VlRKV2RHUkVXbGROVjFGM1ZtcEdWbVZHV25WVWJHaFlVak5vV0ZkV1VrOVZNVmw0VjI1S1YyRXpVbFZWYlRFMFRVWndWbFpVVmxkTmEzQklWVEkxYzFack1YRlNhMmhYVWpOb1MxcFhNVWRTYkdSeldrZHNVMDFFUlRCV01XaDNVakpOZUZkWWFHcFNWbkJaV1Zod2MxZEdWbk5WYkdSb1VtMVNXRmRyVWtOaGJVcFhWMnRvV2sxR2NIWlphMXBQVTBaV2MyRkdjRmhUUlVwSlZtcEdZV1F4V25OalJXeGhVbXhhYjFwWGRHRlNNVnAwVFVSR1dsWnNiRE5VVm1oWFZXMUZlbUZHYUZwaVIyaDJWRmQ0ZDFac1pISmFSM0JPVm14d05sWlVTWGhqTVdSSFUyNUthbE5HY0ZoWmJGSkhUVEZhUlZOcmNHeFdiRXBhV1ZWa2QxVXhXblZSYlRsWFZucENORlpVUm1GU01WWnpZVWQwVTAxR2NGcFdiVEF4VVRGWmVGcElTbFppUlRWWVZtMTBkMlZXV25SalJrNVhZWHBHZUZadGVGTldNREYxWVVkb1lWSldjRmhXYkZwSFl6Sk9TR0ZGTlZkaVdHUTJWbTB3ZUU1SFJYaFZibEpXVjBkU1VGWnRlSGRXTVd4eldrYzVXRkpzY0hwV01qVnJWR3hhYzJOR1dsWmlXR2h5Vm14VmVGWnNaSFZqUm5Cb1lYcFdlVmRXV21GVE1WbDRWRzVPVldKSFVtOVpWRTVEVmxaYVdXTkZaRmROVm5CWVZXMDFTMWxXU1hsbFNFSldZa1pLV0ZZd1dscGxWMUpJVW0xb1RtRXhjRXBXVkVvMFdWWmtTRkpZYkd4U2JIQldWbXhrVTFaR2EzbGxSbHBzVmxSR1YxZHJaREJXTURGSFkwVmtWMkZyYnpCWmFrWmFaVVpPYzFac1pHaGxhMXBhVm0xMFYxTXlUbk5YYTFaVFlYcHNXRlJXV25kbGJGcFlUVlJDVmsxcmNIbFZNbmh6VmpGS2MxTnJlRnBoYTNCWVdYcEdkMUl4V25OVmJHUlRWbTVDV1ZZeFpEUldNazEzVFVob2FWTkZXbFpaYkdoVFYxWldjVkZ1Wkd4V2JGWTFWR3hXVDFZeVNsWlhibXhYVFc1b2RsWXlNVXRYVjBaSlUyeHdUbUp0WjNwV1ZFWmhWVEpTU0ZOcldrOVdiVkpQVkZjeGIySXhXblJsUjBab1RXeEdORlV4YUhOVk1rcHpVMnhvV21FeVVuWldiWGh6WkVVeFYxUnNaR2xUUlVwYVYxUk9kMUl5Um5SVGEyaHJVa1UxV1ZsVVJscGtNV3hWVW10MGFrMVhVbmhWYlhoclZHMUdjbFpxVGxoV00xSm9WMVphU21WR2NFbFNiR2hwVWpKb1dWWkdVa05UTVZKWFYyNUtWbUV6VWxSVVZsVXhVMFphZEU1VmRHaFNhMncxV2xWYVYxWnRTbFZXYTFKaFVrVmFjbFpxUm5kVFZuQkhVMnMxYVZKWVFscFdiVEI0VFVaWmVGZHJhRlJoTVhCUVZqQldZVll4YkZoa1JWcHNVbTVDVjFZeWVFOVdNa3BKVVd0d1YxSXphRlJaVmxwTFZqSkZlbUpHWkdsU01EUjZWa1phWVdNeFdYaFVibFpXWWxkb1ZGWXdaRzloUm1SeldrUkNXbFpVUWpSV01XaHJWakZhUmxkc2JGWmhhMFY0VlRGYWMyTnNXbFZTYldoWFlUTkNZVlpXWkhkWlZsbDRXa1ZzVW1FeFNsaFZhMVpoVmpGd1YxZHJkR3RXYkZwNlZqSXhjMVV3TUhsaFJtUlhUVmRPTTFwVlZURlRSa3B5V2tab2FXSkdjSGhXVnpFMFpESk9jMVZzWkZoaVZWcHpWbTB4VTJWV2JGWldWRlpvVm10d2Vsa3dVa2RXYkZsNllVaHdWMkZyV2t0YVYzaEhZMnhXYzJOR1pHbFNiR3cyVmpKMFUxTXhUWGRPV0U1VVltczFWMWxZY0ZkWFJscHlWMjFHVTFac2JEVmFSV1JIVmpBeGNrMVVVbFpOYmxKeVZteGtTMU5IUmtkUmJHUnBWMFpLVFZkWWNFZGpNbEpHVFZaa1ZHSllhRmhaYkZwTFdWWmtWVkZzWkU1U2JIQlhWRlpvVDFkSFNraGxSbVJhWWtkb2RscFhlR0ZYUlRGV1drZHdhVkpVVmpaV1ZFbzBaREZaZVZOclpHcFNSbHBZVlcxNFMxTkdWalpTYTNCc1VtczFNVlp0ZUc5aFZscFhZMFpDVjFZelFsQlpha1pMWXpGa2MxcEdhR2xYUmtwMlZrWmFWazFYVm5OV2JrNW9Vak5TVjFSWGRIZFdiRnAwWlVaa1YwMXJjRWhXYkdodlZteGFSbGR1U2xwTlZuQklXa1phVTJNeFVuTlViV2hPVm5wcmVsWnFTalJXTWtWM1RsVmtWMWRIVWs5V01GcGhZVVpXY2xaVVJsaFNiRnA1Vm14U1IyRnNXblZSYTFwV1lsaE5lRmxVUVhoamJVNUdXa1prVjAweWFFMVdiWEJDWlVkTmVGUnVTbXhTYlZKWVdXdFdkMUpXV2xoalJYUlVUV3N4TkZaWE5VOVhSMHBIVjIwNVZWWldTbGhXVjNoaFpFZFdTR1JGT1ZOaGVsWlpWbXBKTVZVeFVYaFhiRlpwVW5wc1lWWXdhRU5UUm5CWVpVWndiRlpVVmxsYVJWcHZWVEF4U1ZGc2NGaGlSbHBZVmtSR2EyUkdTblZUYlhCVFZqSm9XVlpHV21Ga01WcEhZMFZhV0dKWVVuSlZiWFIzWld4YVNHTjZSbWhXTUhCWlZrZHdVMVl5U2toaFJFNVdWa1ZhVTFwVldtRlhWMHBIVlcxc1UwMXRhRlpXTVdRd1lUSkplVlJZYUZkaWExcFdXV3hTYzFac1duUmxTR1JYWWtaV05Wa3dWazloUmxsM1kwVndWbFl6YUROV01GcGhVbXMxV1ZOc1pHaE5WbGt3VmxSQ2ExWXhTbk5YYms1WVlrZFNjRlp0ZEhkT1ZscHpWV3QwVDFKcmNEQldWbWh2VmtkS2MxTnNRbGRpV0doTVZqQmFZV014Vm5OYVJrNVRZa2QzTVZkVVFsZFVNa1p5VFZaYWFsSlhhRmRaYkdodlpHeGtWMWRyZEZoV2JGcDZWbTE0WVdGV1NYbGhSVlpZWWtkUk1GbFVSbXRYUmxKeVYyeENWMkV6UWxCWFYzUlhaRzFSZUZkc1ZsUldSVnBZVkZaYWQxZFdWWGxsU0U1b1VtdHdlbGt3V205WGJGbDZWVzFvV2xaV2NGUmFSV1JYVTFaU2NrOVhiRk5XUmxreFZtcEtNR0V5VFhsU2JHUlZZVEZ3VlZsclduZFhSbHAwWlVoa1YxSnRkekpWYlhNMVlXc3hWazVXY0ZwV1ZuQlVXVlprUjA1c1duUmhSbWhYWWtWd1RWWnNVa2RoTVVsNFZtNU9XR0pIYUhCWmJGcExWMVprV0dSSGRGWk5SRVpZVmpGb2MxUnNaRVpPVm1SVlZsWktTRlpxUm5Ka01rWkpXa1pvVTJKSVFraFhWRUp2WkRGa2RGTnNWbE5oTWxKb1ZteGtVMVZHVlhoWGJHUnJVakJ3U0ZaWGVFOVdNVXB6WTBSS1YySlVSVEJXVkVaT1pWWmFkVk5yTlZSU01taFdWMVpTUzFVeFdrZGlTRkpzVTBkU2IxVnRlRXRXTVdSeVZXeE9WazFXY0hwV01uaHZWMGRGZVZWWVpGZGhNbEpNVlcxNFlXTldVbk5YYld4WFVsVlpNRlp0TVRCWlZteFhWMjVLVDFac2NGWlphMlJ2WWpGc1ZWRnVaRTlpUm5CWldrVmtSMVV3TVhOVGEyeFhZbGhTY2xsWGVFdFdWbHAxVVd4a2FHRXpRbmxXUjNoaFdWWmFWMU51VG1GU2JGcFBWbXhTVjA1V1drVlNiR1JwVFZad1dGZHJWbTlpUmtwelkwZEdXbUpHU2tkVVZWcHpZMVpLYzJOSGRFNVdia0kxVjFSQ2EwMUdVbk5YYms1cVVsaENXRlZ0ZUhkWFJteFZVMnRrYW1GNlJsaFphMXBMWVZaT1JsTnNhRmRTYlUxNFZWUkdTMUl4WkhKWGJHaG9UVmhDZWxadE1UUlpWMVpYWWtaYVdHSnRVbTlWYWtKWFRsWlJkMkZIZEZoU2JIQjZWVEowYjFsV1NrWlhia3BYWVd0YVZGbDZTa2RUUmtwelZHczFVMkpyU2xkV2JYUmhZV3N4V0ZOWVpFNVhSVFZaVmpCa2IxZFdiSE5WYms1V1RWWktWMVpYZEd0WFJscHpZMFZzV2sxR2NISldNR1JIVG14R2NWUnNXazVpYldoSlZtMTRZVmxXU25SVWEyUldZbFZhVkZWc1duZE9iR1J5Vm14YWJGSnNiRFJXVnpWVFlURkplV1ZHYUZwV1JXOTNWR3RhWVdOc2NFVlZiV3hPVm10Wk1WWlhNVFJaVmxKeldrVmFhbEpyU2xoWmJUVkRaV3hzVmxkc1pHcE5XRUpJVmtjeE5HRldUa1pUYTNCWFVteHdXRlJWWkVkak1XUnpWbXhPYUUxdWFGZFhWM1JoWkRGT1IxZHJhRTVXV0ZKVVdXeFZNVkpzV2tobFJ6bFhUVlZ3V2xWV2FITlhSMFY0VTJ0NFZtRnJXbWhhUlZwUFkyeGtjMWR0YUd4aVdHaFdWbXRhYTA1R1RYbFdiR1JZWW10YVUxbHJaRk5qYkZKWVpVZEdiR0pIVW5sWlZWVTFWMGRLVjFkdWJGZE5ha0V4VmpJeFMxSXhaSFZqUmxacFVtNUNiMVpxUWxabFJscFhWbTVPVjJKRk5XOVVWbHB5WkRGYWMxVnJjRTVXYTJ3MFdXdGFhMVpIU25OVGJUbFdZa2RvZGxsVldtRmtSMVpKV2tVMVRsWnRkM3BXYlhoVFVqRlplRmR1U2xoaWJrSllWV3BPYjFWR1draE5WWFJyVW0xME5sbFZXbXRoUjBWNVQwaGtXRlpzU2toV1Z6RlNaREF4VjFkdGFGTmlSWEJhVmxSQ1YxTXhXbk5hUm1SaFVrWktZVlp0ZUV0WFJsbDVaVVprVm1KVlZqVldWM00xVmpKS1dWUllhRmRoYTFwb1ZUQmtVMU5XY0VoaFJtUk9VbTEwTlZZeFdtOWtNVTE0WWtaa1ZHRXhjRkJXYWtwdldWWmFjVlJyT1U5U2JYUTFXVE53UjFZeFduTmpTSEJhVFVad2NsbFdXbHBsVjBaR1YyeGthRTFZUWxsV01WcGhVbTFXVjFWdVNtRlNiRnB3VlcxNGQySXhXbGhsUjBaYVZteHNORll5TlZkaGJFNUdUbGhLVjJKWWFGaFVhMXBoWkVkT05sWnNXbWxXV0VKS1ZrUkdVMVF4WkhSU1dHaFlZa1pLV0ZacVRtOVpWbkJYVjJ4a2FtSldTa2hXTW5oclZURmFXVkZyY0ZkTlYwNDBWR3RhVW1WR1pIVlViRnBwWVROQ1YxZFhlR3RPUmxwSFZXeGtXR0p0VWxWWmEyUlRWMVp3Umxkck9WWmhla1pZVmpKMGMxWXhXWHBSYldoWFZucEdSMXBYTVVkU01WcHpXa2RzVTJKR1dUQldiRnBUVWpKRmVWUnNaRk5pYkZwV1dXdFZNVlpHYkZWU2JtUllZa1pzTlZwRldtdGhNREZYVjI1c1ZWWnNXbWhaVldSWFkyeGtjMXBHVmxkaVNFSnZWMVJLTkZsWFRsZFVia3BQVmpOb1dGbHJWbmRaVm1SWVpFZEdhRTFXYkROVVZtaFBWa2RLZFZGc2JGcFdSWEIyVkZSR1YxWldTbk5VYkU1T1ZtdHdObFpxU2pSV01rWkdUVlZzVW1KVWJGaFZiWGhoWTJ4U2NsZHJkRmROVm5CNlYydGtSMVV3TUhoVGJGcFlWak5TV0ZacVFYZGxSbHAxVldzMVUxSldjRmxXVnpFMFpERlplRlZ1VGxkaGVteFpWV3BDWVdWV1ZYbGpSVGxYWVhwR1NGa3daRzlaVmtwMFZXdDRWazFIVWxCVk1HUkxVakZ3UjFSck5VNWhlbEYzVm0wd2QyVkZNVWRpUm1oVFYwZG9XVll3WkRSWFJteDBaVVYwVjJKR2JETlhhMUpUVmpGS2RHVkljRmRXTTJoeVdWVmFTMk15VGtkWGJGcFhUVEZLYjFaclVrZFpWMDV5VGxaa1lWSnRVbFJhVjNSWFRURmFjMVZyU214U01EVjZWMnRvVDJGV1NYZFhiR2hYWVd0YVIxcEVSbUZXVms1eFZXeFNUbEpHV1hkV1ZFb3dWakZaZVZOclpGUmlSMmhZV1ZkMFlWUkdiSEZTYlhScVlrZDBObGxWV2xOVWJGcFZWbXRzVjJKVVFYaFdWRXBMVWpGT1dXTkdTbWxXUjNoWlYxZDBZVmxWTUhoalJtUllZbGhTV1ZWcVFURlNNWEJHVjIxMFZXSlZjRWhaTUZKWFYwWlplbFZzYUZwaGExcFRXbFZhZDFKc2NFaGpSbEpUVjBWS1dWWnRNVEJXTVUxNFZXdGthVkpHY0ZSWmJURlRWMFpzY21GRlRsUmlSbkJKVkZaU1UyRkdXbk5qU0d4YVRVWmFhRlpxUmtwbGJGWjFVbXhXVjJKSVFsbFdWRUpoVmpKT1YxcElUbFJpVjJoUFZGY3hiMVl4V25STlZGSlhZWHBHV0ZWc2FHOVpWazVHVjJ4T1dtSllUWGhXYTFwWFpFZFNTRkpzYUZkaVZrbzFWbTB3TVdFeFduUlNhbHBUWVRKU1lWWXdhRU5UUmxwMFRWVmFiRkl3TlVkWlZXUkhWVEF3ZVZvemJGaGhNVXBNVlhwR1MyTXhXblZVYkZKcFVqRktVRmRYZEZka2JWRjRWMjVTYkZJd1dsZFVWbFpYVGtaYVdHUkhkR2hpUlRWSFZHeGFVMVl3TVVoVmJGSlhZa1p3VkZadE1VZFRSVFZXVGxaa2FWSldhM2RXTVZwWFlUQXhSMXBGYUZSaE1sSndXbGQwZDFkR2JITlZiR1JZVW14c00xZHJWbXRoYlVwV1RsVndXazFHY0ROWmEyUkdaREpPUlZkc1pGZFNWWEJ2Vmxod1MxVXhUa2RXYmtwb1VqSjRWRmxzV2t0VlJtUllUVWhvYUUxRVZraFdNalZIVmtkR2MxTnVRbFZXYkZWNFdsZDRZVmRGTlZaa1JtUlhUVWhDTmxaVVNURlJNVnAwVTI1V1VtRXlhRmRhVjNSaFYwWmFjMWRyT1d0U1ZHeFpXa1ZWTVZZd01IbFVhbFpYWWxoU2NscFhjekZYUmtweldrWlNXRkl5YUZaWFZsSkhXVlprVjJKR2FHdFRSbkJ5VkZaYWMwNUdXbk5oUnpsWFRXdHdSMVJzYUhkV2JVcFpZVWhLVjJGcldreFdha3BQVWpGYWMxcEZOVmROVlZsNlZqSjBhbVZHV1hoVFdHaFhZbXhhVkZsclZURmpSbHB4VkcwNVdGWnRVbnBYYTFKRFYwZEtWMWRzYUZoaE1YQjJWa2Q0YTFKck5WaFBWbFpYWWxkb1JWWlhjRWRrTVVweldraE9WV0pYYUZSV2ExWmFaREZhYzFsNlJsVk5WM2hZVmtkMGMxVnRSWGhUYkdoV1lrWndNMVpWV21Ga1IxWkhWRzF3YVZKVVZYZFdWekY2VFZaVmQwMUliR2hTVjFKWVdXeG9iMk5XY0ZaYVJUVnNVbTVDU2xaSE1VZFZNVnAxVVd4R1YyRnJTbGRVVmxwclVqSktTVk50UmxObGJYaFhWbGN3ZUUwd01YTldiR2hQVmxSc1YxUldXbmRXYkZaMFpFaE9XRkl3VmpSV01XaHJWakZLTmxKcmVGZE5SbkF6Vld4YVUyTXlSa2hoUlRWWFltdEdOVlp0ZUdGVk1VMTRWMWhzVldKcmNGRldiVEUwVlRGc2NsWnJkRmRXYkZvd1ZHeFdUMkZWTVZkalJXaFlWa1UxZGxaSGMzaGpNVXB4Vld4d2FFMVlRbTlYVmxaaFV6SlNSMVp1VWxCV2JWSndWV3BLYjAxc1drZFdiVVphVm1zMVIxUnNXbTlWTWtwWVlVWm9XbUV4Y0hsYVZscHJWakZXY2s5WGNFNVdNVW8xVmtaYWIxSXhWWGxTV0d4b1VqSm9WMWxzYUc5Tk1YQllaVWRHYW1KR2NGWldiWGh2VlRBeFIyTkZjRmRXZWtVd1ZrUktTMU5HU2xsaFIyeE9UVEJLV1ZaR1dtdFVNREI0WTBaYVdHSklRbk5XYlhoM1pXeFplVTFVUWxWaGVrSXpWVEo0WVZkR1dYcGhTRnBhWVd0d1VGVnFSbUZrVmtwelZHMXNWMVp1UWpOV2ExcGhZVEF3ZDAxWVRsZFhSM2h6VldwT1UyTkdWbkZSYkdSUFlrZFNlVlpYZUd0V01ERlhZbnBLVjJKVVJuWldNbmhoVW14S2NWVnNjRTVXYmtKdlYydGFhMVF4U1hsVWEyaG9VakpvVDFSVlZuZFRNVnB4VW0xR1ZrMVZWak5VVldoelZqSktjazVYYUZaaVdHaG9WbFJHYzFkWFRrWmFSMnhPVmpOb05sWXlkR0ZUTWtwSFUyNU9hbEpYYUZoVVZ6Vk9aVVphUlZKc2NHdE5WMUo1V1ZWYWQxUnNTbk5qUkVwWFlUSlJNRmxVUmt0ak1WSjFWbXhLYVZORlNuZFdWekF4VVRKSmVGZHJhR3hTTUZwWFZGWldjMDVHV25ST1ZUbFhVakJ3V2xaWGVHOVdNa1Y1VlZSQ1ZtSllhR2hWTUdSVFUwVTVXR0pGTlZkaE0wSmhWbXhTU2sxV1RYaFhhMmhVWW1zMWNWVnFRbUZXYkZwelYyeGFiRkp0ZERSV01uaFBZV3hhY2xkdWNGZFNNMmhvV1ZaYVlWZEhValpTYkdST1lteEtXVmRyVWtkV01rNXlUVlphV0dKSGFIQlphMXAzVjBaYVIxbDZSbFpOYXpWNlZqSjBWMVZzWkVoaFJteFdZbGhvVEZSV1dtRmtSMVpIVkcxb1YySldTa3BYVmxadllURmtSMWRxV2xOV1JVcFhXbGQwWVZkR2JEWlNibVJUVFZoQ1NWbFZXazloUjFaelYycE9WMkV4Y0ZoWlZFRXhVakZPZFZSc1dtbFNia0p2Vmxkd1QxVXhiRmRYYms1V1lUSlNjMWxyV25OT1JteFdXa1JDVjAxcmNFaFpNRlpyVmxkS1IyTklXbGhXYkhCb1drVmFWMk14Um5SU2JFNVhZbXRLZGxZeWRHRlpWbXhZVld0b1ZtRXlVbFpaYTJSVFlqRlNWVkZyWkU5aVJuQjRWVzE0VDFaSFNsZFhhMmhYVFZkb2VsWlVTa3RqTVU1eldrWndWMUpZUWpKV2JGcGhWMjFSZUdORlZsWmlXRUpQVm0wMVExWXhXbFZUV0doT1VqQldNMVJXV210Vk1rWnpZMFpzVjJFeFZYaFpNbmhoWTJ4YVdXRkdUazVXVkZZMlZtdGtOR1F5UmtoU1dIQlNZbTE0V0ZaclZuWk5SbFowVFZaS2JGSnJOVEZXVjNNMVZqSktSbU5JV2xkU2JWRXdWWHBLU21WR2NFZFdiRXBwVjBaS1ZsWkdXbFpOVms1SFYxaHNUMVpVYkZsVmFrSjNWMnhXV0U1VlRsZE5SRVpKVmxkNFUxbFdTbk5qUjJoWFlsaG9jbGt5Y3pWV01VNTBZa1prVjJKSGRETldha1pyVFVkSmVGWllhRmRYUjNoVldXMTRZVlV4YkhOYVJ6bFlVbTE0ZWxsVll6VmhSa3B6VTI1d1YwMXFWbEJaVnpGTFVqRmtjVkpzY0U1U2JrSlpWMVpXVm1WR1NsZFhia1pWWWtkU1dGbHJhRU5sVm1SWFZXdGtWVTFyTVRSVk1uaHpXVlpLY2s1WVFscFdSVFZFVmpKNGExZEhWa2RVYkU1T1lrWndObGRYZEZOWlZsVjVVMjVTVm1KSGFHRldNR2hEVjBaWmVGZHVUbGRpU0VKS1ZrZDRhMVJzU2taWGJHeFhZV3RyZUZacVJscGxSbVJ6V2tkd1UyRXdjRmhXYlRWM1VqRlNSMkpFV2xOaE0xSnhWRmQwWVZOR1dYbE5XRTVvVm10d1dsVlhjRXRXTWtwVlVWaG9ZVkpGV21GYVZscFRWMWRHU0dGRk5VNWliV2d5VmpKNGEwMUdiRmhVYms1V1lrZG9jbFZxUW1GV1ZteHlWMjFHV0ZKdFVscFpNRlpyVmpKS1JtSkVVbFpOVmtwTVZtMTRXbVZzVmxWUmJHUlhVbFp3VFZkVVNqUmhNazVYVkc1T2FGSXlhRzlVVldoQ1RXeGFjMXBFUWxwV2EydzBWMnRXYTJGc1NsZGpTRXBXWWxoTmVGWkVSbHBrTVZweVkwZDRhVkp0ZHpCV01uUlRVVEpHUmsxV1pHbFNSa3BZV1d4b2IyTnNiRmRYYTNSclVqRmFTRmRyV25kaFZrcHlZMFJhVjFkSVFraFdha3BQWXpGYWRWTnNWbWxXTTJoM1ZsZDRVMVl3TlZkWFdHeHJVbXh3VUZadGVFdGxiRmw0WVVkMFZVMVdjRWRXTW5oclZsWlplbEZyWkZWV1ZuQjZWbXBHZDFKdFVraGpSVFZYVmtaWk1sWnNVa3RPUjBsNFYxaHNWR0pIYUc5VmJYaGhWMVphY1ZSclRsTlNiWGN5VlcxME1GVXlSalpXYkdSYVZsZFNTRlpVUm10U01VNTFZMFprYVZkR1NubFhWM0JDWlVaWmVGZHNiR2hTYlZKdldsZDRZVlZHV2xoTlNHUlBWbFJDTkZsVVRtdFdNa3BWWWtac1ZtRnJTak5hVmxwV1pWVTFWbFJzWkdsV1ZuQTFWbXBKZUdJeFdYaFhiR1JxVTBWd1dGbFhkR0ZsVm5CWVRWVmtWRkl3Y0VoV1IzaHJWVEF3ZUZKWWJGZGlXRkpvVm1wR1dtUXdNVlphUmxKcFVqRktXVmRYZEd0aU1WWlhWMjVXYWxKdFVsaFdiWGgzWld4YWMxVnJaRlpoZWtaWlZsYzFiMVpzV2paV2JrcFhZVEZ3VEZwRldsZGpWa3B6VjJ4a2JHRXhiekpXYlhoVFVXMVdSMWRZYkZWaE1YQlpXV3RrYjFkR1VsVlJhM1JWVW14d1NGWXllR0ZpUmtweVlrUldWMUl6VW5KWlZWcExWbGRLUjJGR1dtbFNiRzk2Vm10V1lWbFdaRWhWYTJSVllrVndUMWxVVGtOT2JGcDBUVlJTV2xadGVGaFZNV2hyVjBkS2NsZHNaRnBXTTFKTVZGUkdWbVZHWkhSU2JYUlRWa1ZhV2xaWE1UUmtNVmw0VjJ0YVdHRnNjRmhaVjNSaFpHeHNWVkp0ZEZOTlZUVjVWakl4ZDFVeVJYZGpSemxYVm5wV00xVnFSbE5TTWs1R1drWm9hVkl4U25sV1YzQkhXVlpPVjJKSVNtRlRSVFZ2Vm0xMGQxZFdVWGRoU0U1WFRWZFNTbFZYZEZOV01VcEdWMnhrWVZac2NGQlpla3BIVWpGU2RHSkdUazVpVjJjeVZtMTRhMlF4VVhsVFdHaGhVbGRTV1ZZd1pGTlhSbXgwVFZaT2FrMVhlSGxXYkdodlZERktjMk5HYkZWaVIyaHlWbXBHV21ReFduRlViRlpwVWpKb2VWWnRNVFJaVjFKSFZtNVdWR0pHY0U5WmJURnZVMFprY2xWclpGVk5iRXBZV1RCV2EyRkdTWGxsUm1oVlZrVndkbFZzV2xwbFJuQkpXa1pLVG1KRldUQldhMlF3WVRGc1YxUnJaRmhpUlRWaFdXdGtVazFHV25KWGJFNVhUVmRTTVZkcldrOWhWa2w0VTJ4d1dGWkZTbGhhUkVaVFl6RmtjMVpzVG1oTmJXaG9Wa1pXWVdReVVuTlhhMVpUWWxWYVZGbHJWVEZsVm5CR1YyMUdWMDFWY0ZkWk1GcHZWakZKZW1GSGFGZGhhMXBMV2xWYVYyUldUbk5XYld4WFRUSm9XbFl4WkRSaU1rbDRXa2hPWVZORk5WaFpiRkp6WTJ4U1YxcEVVbGhTYkhCNldWVm9UMkZGTVZaaWVrcFhZbFJHZGxacVFYaFRSbFp6VVd4V1YxSldjRmxXUnpFMFVqSlNWMVZ1VGxWaVJUVnZWRlpvUTFsV1duRlRha0pYVFd4R05GWnROVXRVYkZwWFkwWnNXbUpZYUdoV2FrWlRWakZrZEZKc1dsTmlSbkJYVmxSS2VrNVdWWGROV0VwUFZsaENWMVpxVG05VVJscHhVMnhrYTFJeFdrbFVNVnB2VmpBd2VXRkliRmRTTTFKeVZtcEtUbVZIVGtaaVJsWnBVakpvV1ZaWE1UUmtNbFpYVjJ0a1lWSkdTbFZVVm1SVFpXeFplV1ZIT1ZWaVJtd3pWako0YzFkc1pFbFJhMmhoVmxad2Vsa3llRmRqYkhCSFkwWmthRTB3U21GV2JYaHJUa2RKZUdKR1pGUmliRXBYV1d0YVMxWXhVbGRYYm1SWFVteHNNMVpzVWxkV01rcFhVMnRvVjFJelRYaFdNRnBMVm0xS1JWZHNaR2hoTVhCNVZrWldhMUp0VmtkYVJteG9VbTFTY0ZWcVJrdGtNVnBZVFVob1QxSnNiRFJaYTJoUFZtMUtjazVXV2xwaE1YQm9WbTE0VjFkSFVraGtSMmhwVmxoQ1NsWnNaSGRSTVZwWFYyNVNhRkpyU21GV2FrNVBUa1paZUZkclpHcE5XRUpJVjJ0YVQySkhTa2RqU0ZwWFRWWndhRmxVUms1bFZsSlpZVVpXYVdKR2NGZFhWM1J2VVRKT1IxZHVTbGhpVlZwWVZXMHhVMVpzVmxobFIzUm9ZWHBHVjFrd1ZtOVdhekYxWVVab1dsWnNjRXhaTW5ocll6RndSMVpzWkZkaVJ6azJWbXRhVjFsV1pIUldhMlJoVTBaS2NsVnNVbk5XUmxKWFYyNWtUMkpIVWxaVlZ6RkhWbXN4Y2xkclpGVldiV2hVVm0weFMyTnJOVmhoUmxwT1VqSm9SVlpYZEdGWlZrcHpXa2hLVUZadFVuQlZiWFIzVGxaYVZWTllhRk5OVmtwNlZURm9kMkZHU2xkalJtaFhZbGhvTTFacVJsTldNV1J5WkVaU1UyRXpRalpXYWtvMFZESkdWMWRyWkZoaVJuQllXV3hvYjFZeFVsZFhhMXBzVW01Q1NsVnRlRXRoVjBZMlZteFdWMVo2UlhkWFZscHJWakZ3U1ZOc1pHbGlWa3BZVjFab2QxSXhTWGhYV0d4UFZtMVNXRmxZY0VkWFJsbDVaVVZPVjAxV2NFZFpNRnB2VmpKR2NtTkdRbFpoYTNCTVZXcEdZV1JIU2toaVJtUm9UVEJHTmxadE1UQlpWMFY1VlZob1dGZEhVbEJXTUZVeFlVWlZkMVpVUmxoU2JHd3pWMnRqTldGc1NuTlhibWhXVm0xb2RsWkVTa3RTTWs1R1lrWldWMkpWTUhoV2FrbzBXVlphVjFOdVZtcFNiVkp3Vm10V1IwNUdXblJOVkZKVVRXczFlVlJzV21GV1YwcEpVVzVDVjAxSFVuWldSbHByWTJ4YWRHUkdVazVXVkZaWlZteGpNVlV4VlhsVGEyUnFVbFJzVjFsclduZE5NVkpWVW0xR1YxWnJOVlpWYlRGM1ZHeGFWMkl6WkZkaVIxRXdWMVprUjFZeFRuTmFSbEpwVWpGS2FGZFhkR0ZUTVU1SFlraEdVMkpWV25GV2JYaExUVVpSZUZwSVpGVmlSbkF4VlZkMGQxWXhTbk5qUm1oYVZrVndSMXBWV2s5a1ZscHpVMjFzVTJKSVFsbFdiVEIzWlVkSmVGcEZaRmRYUjNoelZXeGFkMk14V25SbFJYUk9WbXhhV1ZwVldrOVdNREZYWWtSV1dsWldjRWhXYWtaTFl6Sk9TVk5zV214aE1YQjVWbGN4ZW1WR1dYbFRhMlJvVWpKNFdGUlVTbTlOTVZwMFRVaG9UMUl4UmpWV2JYaHJWakZrU0dGR2FGcGlSa3A2Vm0xNFUxWnNWbkphUm1oVFlsaG9WMVpyWXpGVU1WbDRWMWhrYWxKdVFtRldiR1J2VTBaYWMxZHRSbE5pUlhCYVdWVmtSMVV4V25WUldIQlhWak5DU0ZwRVJrdFdNVnAxVlcxd1UxWkdXbmRXVnpBeFVURlplRmR1U21GU1JVcHZWRmQwVjA1R1duUmxSM1JYVW0xU1NWWlhlRzlYYlVwSFUyeG9XRlpzY0doWmVrWjNVMFU1VjFac1RtbFhSMmN4Vm0xd1NrMVhSWGxTYms1WVlrWmFWRmxVU2pSWlZteFZVbXh3YTAxWGVIbFdNakZIVmpKS1NGVnNjRnBXVm5Cb1ZrZDRZV015VGtkU2JHUnBVbXR3VFZaWWNFZGhNVWw0Vkc1V1ZXSlhhRlJVVkVwdlZsWmFSMVZyZEdsTlYxSklWako0YjJGc1NsWk9WbXhhWWtad1NGUnJXbk5qYkdSMFVteGtWMDFHV1hwWFZFSnZVekZaZVZOcmFGWldSVXBYV1d0YWQyTnNXbk5YYXpsclZteEtlbFl5ZUd0VWJFcDFVVzFHVjJKWVVuRmFSRUY0VmpGa2MxcEdVbGhTTTJoNlZsZDRWazFXYkZkWGJrcFhZbFZhVDFSV2FFTlNNV1J5Vm1wQ1YxSnNjSHBWTW5CRFZtMUtXV0ZJU2xwV1ZsWTBWVEZhUjJOV1RuTmFSVFZwWWtWd1dsWXhXbE5UTVUxNVZGaHNWRmRJUW1oVmFrNXZWbFpXYzFadVpGZFNiSEF3Vkd4b2ExWXdNVmRYYm5CWFlsaG9lbGxYZUU5U2F6VlpVV3hXVjJKSVFtOVdWRVpoWXpKT2MyTkZiR0ZTYkZwUFZXdFdZVk5zWkhOV2JHUlhUVlp3ZWxZeU5WTldiVXB5WTBaa1ZWWjZWblpWYWtaM1VsWktjbVJIZEZOV1JscFpWbXhrTkdFeFdYaFhhMlJZWVRGYVdGbFhkSGROTVZaVlUyczFiRkpyTlhsWGExcFBZVlpKZVdGSE9WZFdNMmhvVjFaYVdtVkdaSFZXYlhCVVVsUldlVlp0TVRSV01EVkhWMjVTYW1Wc1dsZFpiRlozVTFaUmVGVnJPVmhpVlZZMFZqSjRVMVl4V1hwaFIwWmhWbXh3V0ZreU1WTlNNV1J5VGxaT2FFMHdTa2RXYWtacVpVVTFTRkpZYkZWWFIyaHhWV3hhWVZZeGJITmhSemxxVW14V00xWnRkREJXTWtwSFkwWm9XR0V5YUhKWlZWVjRWbTFPUjJGR1pHbFhSMmd5Vm14V1lWbFZOWE5YYms1WFlrZFNjRlZ0ZUZkT1JscFhWV3RrYUUxck5WaFZiVFZYVmxkS1JrNVdVbHBXUlZvelZqSjRXbVZYVWtkYVIzUk9WbXh3TlZaR1dsZFpWbVJJVTI1T1dHSkhVbFpXYlhoM1lVWmFWbGRzWkZoU1ZFWlhWakl4TkZVd01VVldhMnhZVmpOU2FGWlVTa2RYUms1ellrZG9WRkl4U2xsV1Z6RTBVekZLUjJORlZsTmlSWEJ6VlcwMVExTnNXa2hOVnpsV1RWWndTVnBWYUhkWFJsbDZWVzVLVldFeGNISldha1ozVTFaT2RGSnNUbE5oTTBKWFZqRmtNRll5VVhoVGJrNVhZa2RvVDFWclZtRlhSbFp4VVcxR2JGWnNWalZVVm1NMVYwZEtSMk5HYkZkV00xSjJWbXBCZUZOR1ZuTmhSbHBPVWpGS1dWWlVRbUZUTWsxNFZHNUtUMVpyTlZoVVZFcFNUV3hhZEdORlpHaGhla1paVmtab2IxVXhaRWhsUm1oYVlsaE5lRmt3V2xka1JURlZWV3hvVjJKWWFEWlhWbFpxVGxaYVJrMVdaRmRoYXpWWVZGYzFVbVF4YkZWVGEzUlVVbXhhTVZrd1dtdFZNREI0VTJ4R1dGWXpVbkpWZWtaYVpVWlNkVlJ0YkZOaVJuQlpWMWQ0YTJJeFdsZGFSbVJZWWtad2MxVnFRVEZYUmxsNVRsWmtWMVl3Y0VsWlZXTTFWbFphVjFOc2FGWmlSbkJ5VmpCa1YxTkhVa2RVYXpWWFRWVndTMVp0TUhoTlIwbDVVMnRrVkdKR1dsUlpiRkp6VjBac1dHUkZaRTVOV0VKWldsVmFhMkZ0U2toVmJteFlZVEpSZDFsV1drdE9iVVY2WTBab1YwMHhTbGxXYkZKSFZqSk5lRnBHYkdsU2JIQnZWRlJHUzFkR1duUmtSbVJVVFZVMVNGbHJhRk5pUmtwVllrWm9XbUV5VFRGVWJYaHJZMnhrYzFwSGFGTldSVnBIVm0weGQxUXhXWGhYYms1cVUwVndZVlpyVm1GVlJtdzJVbXQwV0ZadVFraFdWM2hyVlRKS1NWRnNaRmRpVkVVd1dWUkdWbVZHY0VaYVIyeFRVbTVDVmxkV2FIZFdNazE0VjI1U2JGTkhVbGxXYlRGVFpWWmtjbFZzVG1oU1ZFWjZWakkxYzFack1YVlVhbEpYWWxoT05GWnFSbXRqTVVaelYyeGtUazF0WkRWV01uUlRVekZOZUZOdVRsZGlhelZWV1d0a1UxUXhiSEpXYm1SVlZteHdlbFl5ZUU5VmF6RldZa1JXVjFKNlZsQlhWbHBQVW1zMVdFOVdXbWxTTW1oVlYxaHdSMWxYVGxkU2JsWlZZWHBzY0ZWdGVGcE5WbVJWVkc1a1UwMVhVbnBXTWpWVFZtMUZlVlZzV2xwaE1YQk1XVlZhV21ReFpIUlNiWFJUWWtadmVGWlVTalJrTWtaR1RWWmthbEpHY0ZoV2FrNXZWakZ3Vmxkck9WTk5helZIVmpJeE1GVXhXa2RYYkZaWVZucEZkMVY2UVhoak1XUlpZVVpvYVZaV2NIWldSbFpUVmpGT1YxWlliR3RTTTFKdldXdFdkMWRHVlhsbFJUbFlZa1pzTmxaWGREUlhhekZIWTBST1YyRnJXbWhaTWpGVFUwZFNSMVJ0YkZkaE1qaDVWbXBHWVZZeGJGZFZXR3hUWVRKb1ZWbHJXbmRYVm14VlVtMUdWMDFXY0hoV1IzUlBWVEZLZEdWR1pGZE5ibEl6V1d0YVMyTXlUa1ZSYkZacFVtNUNNbGRXV21GWlZrcHpXa2hHV0dKSGFGbFZNRlpMVTFaa2NsVnJaRnBXYTJ3MFZUSTFWMVp0U2xsUmJGSlZWbnBXZGxaVldtdFdNWEJGVld4a1RsSkZTVEJXYWtadll6SktSMU5ZY0ZKaGVteFlXV3RhUzFOR1ZuRlNibVJYWWxWYVIxWkhlR0ZoVmxwWFlUTnNXRll6VW5aVlZFWmhWakZrV1dOR1NtbFNNbWhvVjJ4a01GbFdWa2RYYmxKc1VqQmFjbFZ0ZEhkTlJtdDNWMnM1VldKRk5VZFZNblF3VmpKS1ZWSlVRbHBXTTA0MFZtcEdZV050UmtkWGJXaHBVMFZLVlZZeFdsTlVNa2w0VjJ4a1dHSnJOVmhXYTFaaFZURlNWMXBHVG14U2JGcFpWR3hWTlZZeFNuTmpSbHBXWWxoU2NsWnNaRXRTTVdSelZXeHdWMkpXU2tsWFZFbzBWREpOZUZKdVRsaGlSMUpVVmpCV1NrMVdXbkphUkVKb1RWWldOVlpITlZOV1IwVjRZMGM1Vm1Gck5WUldhMXBUVjBVeFdFOVhlRmRpU0VKYVYxUkNWMVF4WkhOWGJGWlRZa2RvWVZSVlduZGpiR1JYVjJ0MFYwMXJOVWxaVlZwWFZqSktWMUpZWkZkU2JIQm9XWHBLVDJSR1NuSmhSM1JUWWxkb2QxWlhjRWRUTVU1SFYydG9iRkpyTldGV2JYaFhUa1pWZVU1VmRGaFNNRnA1Vkd4a1IxWldXbGRqUkU1VlZrVmFlVnBFUm10amJIQkhZVVpPVjFJemFHRldiR04zWlVkTmVWSnNaRlJpYkVwUlZtdGFTMWRHYkZoa1IwWlhVbXh3UmxWdGVHRmlSbHB6VTI1c1dsWldjRlJXTUZwS1pXMUdSMUpzWkdsWFJVcEpWMnRTUzFJeFNYaGFSbXhoVWpCYVZGcFhNVFJsVmxwSFYyMTBUazFFUm5wV01uUnZZa1pLVldKSVFsWmhhMHBZVkcxNFlWZEhVa2RhUm1oVFRVWlpNVmRXVm1GUk1XUnpWMnhrYWxORmNGZFpWM1JoVlVad1IxZHNUbXBOYXpWSldsVmtiMkpIU2tkalJXUlhZV3RhY2xSVlduTlhSbFpaWVVkR1UxWXhTbGxYVnpFMFV6RmtWMkpJVG1oU1ZUVnhWVzE0ZDAxR2NGWmhSMFpWWWtWd01GWlhOWE5XTURGeFVsaGtWMkZyUmpSWmVrWnJZMVpHYzFwR1pFNU5WWEExVm0xNFYxbFdiRlpPV0ZKVVlUSm9iMVZ0TVZOaU1XeFZVVzVrYVUxWFVsWlZNbkJUWVVVeGNrMVVWbFppV0ZKb1dWUkdTbVZ0UmtoUFZsWlhVbFZ3U0Zkc1ZtRmhNVmw0Vm01S1VGWnJjRTlXYkZKWFRteGFjbHBFUW1wTlZuQlpWVzF3WVdGV1NuSk9WbHBYWW01Q1IxUlZXbGRXVmtwMFpFZHdWMkV4YjNoV2EyUTBWREZWZVZKWWFHcFNia0paV1ZSR1lXTnNiSEZTYkZwclRVUkdXRmRyWkhkV1JrcDFVV3hzVjFKdFRYaFdWRXBQWXpGa2RWSnNVbWxTTVVwYVZsY3hORk15VmtkWGJsSnNVbGhTV0ZSV1ZuTk9iR3hXVm1wU1YwMVdiRFpWVjNoRFYyMUdjbU5HVG1GV1YxSlFWVzE0YTJSR1NuTlViV3hYWVROQk1sWnFSbXRPUmxweVRWWmtWV0pIVWxsWmJYaExWREZhY2xkcmRGcFdiSEF3V2tWb2EySkdTblJsU0d4WFZqTm9jbFl3V2twa01rNUdZa1p3VjFac2NESldiWGhoV1ZkTmVWUnJWbFZpUjFKUFZtMDFRMVpXWkZWU2JVWlRUV3N4TlZVeWRHRlVNVmw1WlVab1ZWWjZSblZVVjNoaFpFZE9SbHBHY0ZkTlJsa3dWbTE0YjJNeFdraFNXR3hvVW14d1lWbHNhRzloUmxwMFpVZEdhMVl3TlVwV1IzaFhWakpLU1ZGcVZsaFdiRnBYVkd4YVlWWnJNVmRYYkdSb1lrWndhRmRXVWtkWlZsSkhXa1prVjFkSGFGVlZha1poVWpGYWRHVkhSbGROYkZwNlZqSjBWMVl3TVZkalNFcFdZV3RhYUZsNlJrOWtWbHB6WVVkc1ZGSlZjRnBXTVdRMFlUSkplRlpzWkdGVFJUVm9WV3RhUzJOc1VsZGFSazVZVW14d01GcFZZelZXYkVwelkwWndWMVl6YUZSV2JGcGhUbXhLZFZkdFJsZE5NbWhvVjJ4V1lXRXlVa2hWYTJSWVlYcFdiMVJVUWt0VE1WcDBaRWR3VGxac2JEUldNbmh2VmtkS1IyTklSbFppUjJoMlZtMTRZV1JGTVZkVWJYQnBVbXR3V0ZacVNYaFNNVlY1VTJ0b1ZtSnRlRlpVVmxwM1ZVWmFWVk5yV214U01EVklXVlZhYTJGRk1YTlNhazVZVjBoQ1NGWnRNVmRTTVdSellrZHNVMkpJUW5kV2FrSmhVekZhYzFkclpGaGlSbkJQVm1wR1lWZEdaSEpoUldSWFVqQndTVlpYY3pWV1ZscFhVMnRvVm1GcldqTlZiWGhoWkZad1IxZHRhR3hoTVhCSlZtMXdTazFXV1hoWGJrcE9WbTFTV1ZsclZrdFdNVnB4VkcwNVRtSklRa1pWTW5Rd1ZUSktSMWR1Y0ZaTmFrWjZWbXBHU21WdFJrbFhiR1JwVmtWWmVsWldVa2RqTVdSSFZXNVdWV0pWV2xWVmJGSlhaR3hhV0dWSE9WSk5helZJVmxkNFlWZHRWbk5YYkVKV1lsUkdWRnBWV21GVFIxWkdUMVprVGxadVFqVlhWRUp2WXpGYVdGTnJaRmhpUjJoWVdXeG9iMkZHYkRaU2JYUnFUVlZhZWxZeWN6RldNa3B5VTJzMVYySlVSVEJaVkVaUFpFWmFjMXBIY0ZOV01taDNWbGQ0VTFZeVRrZFdXR1JYWVROQ2NsUldXbmRXYkZWNFZXdGthR0Y2Um5sVWJHaHpWbGRGZVdGSVNsZGlWRVpNVlcweFQxTldSbk5XYkdSc1lURndWbFpzYUhkU01WbDRWMnhrVTJKcmNHaFZha28wWTBaVmQxWnJkRTlpUm5CWldsVmpOV0ZGTVZkalJXUlZWbTFvVUZsWGVFdGphelZYVjJ4a2FWSnVRbWhYYTFKSFZqSk5lRnBJVG1GU2JXaFlXVlJHZG1WR1dYbGtSMFpwVFd0YVdGWXhhSGRoUmtwWFUyeHNWMkZyTlVSVk1GcDNVbFpLY2s5V1RrNVdNVWw0Vm14a2VrMVdXWGROV0ZKb1VtMTRXVmxyWkZKTlJtUlhXa1prYWsxWFVscFphMlF3VlRGYVNHVklaRmhXTTJoWVdrUktWMk14WkZsaFIyaFRUVEZLV0ZaWE1UUmtNbFpYVlc1T1dHSkZOVmhaYkZaM1UwWnJkMVZyT1ZkaVZWcDVWakl4YjFack1VaFZiRkpXWWxoTk1WWnFSbE5rUjBwSFZHczFhVkpXV1hwV2JUQjRaREZOZDAxVlpHbFNiVkpaV1cxNFMxWldiRlZTYm1SV1VteHdlbGxWV2s5WFJrcHpWMjVzVjJKWVVtaFpWRUY0VjBkV1JWRnRSbE5XYTNCRlZtMXdSMU50VVhoWGJrWlhZa2RvYjFSWGVFWmtNV1JYVld0MFYwMXJOWHBXUnpWTFZHeGFjMk5GT1ZkaVdHZ3pWbFphWVZZeGNFVlZiWFJwVm10Wk1WWlVTakJaVjBaSFUyNU9hbE5GU2xoVVZXUlRaR3hzY1ZKdGRGaFNNVnBKV2tWVk5WVXhXa1pYYkd4WFRXNVNkbFpFUm1GWFJrNXpWbXhrYVdFd2NHaFhWbEpIWkRKV2MxVnNWbE5pUlhCelZXMHhVMlZXVVhoWGJVWlZZa1p3V2xWWGVITlhSbHBHVTJ4b1dsWkZXbUZhVlZwUFYxZE9SMWR0YkZOV1dFSlpWakZrTkdJeVNYbFZiR1JxVWxaYVZGbHJaRk5qVm14elZsUkdWRkpzYkRWWk0zQkhWbXN4VjJORVJsWldNMUpvVm1wS1MxZFdWbk5oUm1Sb1lURndhRmRzVm10VU1VNVhWVzVPV0dKWGFFOVdNRlpMVFRGYWMxa3paR3hTYkZZMFZqSjBhMWRIU25OVGJrWldUVVpWZUZZd1duTmpiR1IxV2tab1YySnJTa2hXYlRCNFRVWmFjazFWVmxOaVIxSmhWRlZrYjJWc1dYbE5WVnBzVW0xU2VsWlhlR0ZpUjBWNlVXeHNWMkZyV21oYVJFWlBVbXMxVjJGR1RtbFNWRlpaVmtaamVHSXhVbk5YYmtwWVlsVmFZVlpxUmtkT1JsbDVaRWM1VmsxclducFpNR1J2Vm0xS1IyTkhhRmRoYTFwb1drWmtUMU5XVW5Sa1JtUnBVbXhyZDFadE1IaGxhelZYVm01U1ZHRXlhRkZXYTFwTFdWWlNWbGR0Um10aVJuQjRWVEowTUZZeFduSmpSRUpWVFZad2NsbFdaRXRqYkU1ellrWm9XRk5GU2tsV2EyTjRWVzFXUjFadVZsWmlXRkpVV1d4a2IxWldaRmhrUm1SWVlYcEdTRll5ZUZkV1IwWnlVMnhvVlZac2NGaFViRnBYWXpKR1NFOVdhRk5OU0VKSVZsUktOR0V4V1hsU1dHaFlZVE5vV0ZSVlduZGpiSEJHV2taa1UySldTa2hXUnpGelZqRmtSbE5yY0ZkaVdHaHlWR3RhVG1WR1pGbGhSbWhwVWpOb1ZGZFdhSGRqTVdSSFYyNUdWV0pVYkdGV2JYaExaV3haZVdSSVpHbFNhM0I2VlRJMWQxWXdNWEZTVkVKWFZrVmFhRnBHV2tka1JrcHpXa1pPYVZKdVFsWldiR1IzVWpGWmVGZFlhRmhpYkZwVldXdGtiMkl4Y0ZobFIwWnJUVmRTV0ZaWGN6VmhWVEZXWTBab1YySllhSFpaVjNoTFZtczFXRTlXY0dsU2JHOTZWMnhrTkZkdFZsWk9WbHBRVm0xU1ZGWnJWbUZYVmxwVlUyNWtXbFpzYkRSVk1XaDNWbTFLUmxOdGFGWmlXR2hZVkd0YVYyUkhUalpTYkdScFVteHZkMVpYTUhoT1IwWkdUVlZzVW1GNmJGaFpWM1JoWVVaa1YxcEZXbXhTYmtKS1ZrY3hjMVJyTVhOVGJteFhWak5vY2xscVJtdFdNa3BIWVVkMFUwMUdjSGhXVnpCNFRrZFdjMWR1VGxaaE1EVnZWRlZTUjFkV2NGWlhiVGxZVW0xU1NsVlhlRzlYYkZwR1YyMW9ZVkpXY0ROVmJGcGhZekZ3U0dKR2FGTldXRUpYVm1wR1lWWXhiRmhTV0doVVltdHdVRlpzWkRSaFJsWjBUbFZPVlUxV1NsbFViR00xVkd4YWRGVnNiRlZXVjJoMlZsUkJlRmRHVm5KYVJsWlhZa2hDV1Zac1VrdFRNV1JJVm10c1VtSkhVbTlaV0hCWFRXeGFSMVp0Um1oTmF6RTBWMnRvVDFaWFNrZFhiVGxoVmpOU2FGUnNXbUZTTVdSeldrZG9UbFpzY0VsV01uUlhZakpLUjFOWWJHaFNiV2hXVm14YWQyRkdaRmRYYm1SWFlrZFNNRnBGWkhkVWJVVjRZMFZvVjFKRldsZFVWbHBXWlZaT2MyRkdXbGRTVm5CYVZtMHhORmxYVG5OVmJrcFlZbGhTY1ZSV1pGTlhiR3hXVjJ4T2FGWXdXVEpXYlRGdlZqRktkRlZxVGxkaGExcFRXbFZrUzFOV1ZuUmtSazVUVmxoQ1dsWnNZM2hOUm14WFdrWmtWbUpIVWxoWlYzUkxZakZXZEdWSVpGZE5WM1F6V1ZWb1QxWXdNVVZTYWtaYVZsZG9URll3V21Ga1JsWnpVV3hhVGxKdVFsRlhhMXBoVmpKTmVHTkZhR2xTYldoVVdWUk9RMVZHV25SbFIwWldUVlV4TkZac2FHOVdWbVJJWVVac1dsWkZjRlJXTVZwelkyeHdSMVJzWkdsU2EzQlpWbTE0VTFJeFdYZE5WbVJwVWtaYWFGWnNaRzlqYkZweldrVjBWMDFYVWpGWk1GcDNZVVV4Vm1OR1JsZGhhMHBvVlhwR1MyTXhjRWxWYldoVFlraENkMVpxUW10aU1XUlhXa1pzYWxKWFVsZFVWM014VFVaYVNHUkhkRmROYTFreVZtMTRVMVp0U2xsVmFrcGhWbFp3YUZZeFpFOVNiSEJIVm1zMWFHVnNXVEpXTVdSM1ZESk5lRmRZYkZOaWEzQlFWbXhTYzFZeGJISmFSemxYVW14Wk1sVnRlR3RXTVZweVYyNXNXR0V5VW5wWlZscExWbFphYzJGR1pHaE5iRVYzVm10U1MxSXlUWGhVYkd4aFVqTkNWRmx0ZEV0WFZtUllaVVpPVjAxWFVraFphMXBoVjBkS1NWRnVUbFpoYTBveVZGZDRWMlJIVmtoU2JGWnBVbGQzTUZaVVNqUmpNV1JIVjI1T1dHSlhhR2hWYTFaaFZVWldjVkp0ZEd0V2JIQXdXV3RhVDFSck1VWmpSRnBYWWxSRk1GWnFSbUZqYXpGWFdrWmtXRkl5YUZsWFYzaHZWVEpPVjFWc2FHeFNXRkpWVm0xNGQxZFdjRlpaZWxaWFZsUkdXVlpYZEd0V2F6RnhVbTVhVjAxcVJreFdiRnBMVjFad1IxWnRiRmhTTW1oV1ZqSjBWMkV4VVhoVGJrNVdZbXhLVkZsc1pEUlhSbHB5VjJ4a1RrMVdjREJVVldoclZHeFpkMkpFVmxaaVIyaDJWakJhYTFOSFJrZGlSbkJYVFRKbmVsZFdWbUZXTWsxNFdraFdWR0Y2VmxoWmJHaHZUa1phV0UxRVJtaE5WMUpJVlRJMVMyRnNTa1pUYldoV1lrZFNWRlV3V2xwa01XUnlaRVpvVjJFeGNGZFdWRW8wV1ZkS1NGSllaR3BTYTFwWlZtdFdkMDVzVWxaYVJrcHNVbXh3TVZaSGVGTmhWbGw2WVVaQ1dGWXphR2hWZWtaVFVqRmtjMXBHV21oTlJGWlZWa1prTUdReVZuTmlTRXBZWWxoU1lWWnRkSGROVmxaWVRWYzVWMVpzY0ZsWlZWcFRWbXN4VjJOSWNGcE5ha1pJVlRGYWQxTkhSa2hoUjNob1RWYzRlVlp0TVhkU01rbDVVbGhvV0dFeGNFOVdiRnAzVlVaYWRHVkZkRnBXYkVwWFYydGFUMVpXU25OaVJGSlhUV3BHU0ZsVVJtRmpNazVGVVd4d1YxWnVRbmxXYTJRMFdWVTFkRkpyVmxaaVIxSndWVzEwZDFKV1pGZFZhMlJZWWxaYVdGVXlOVXRaVmtsNlVXeFNWMkZyY0haV01WcHJWMFV4U1dGRk9WTk5SRlpaVm14a05HRXlSa2RUYkZacFUwVndXRmxzYUc5bGJGSlZVbTFHVTAxcldrbFVNVnByVlRBeFNWRnNhRmhXUlVwb1drUkdXbVZXVG5OV2JHUnBVakpvYUZadGVHRmtNV3hYWTBaYVlWSllVbEJaYTFaM1pXeGFkR1ZIT1ZkU2EzQlhXVEJqTlZZd01YVlZiRkpXVmtWRmVGVnFSbXRYVjBaSFZtMXNhVkpZUWpaV2JHUjNWREZGZUZwR1pGZGliRXB6VlRCa1UyTXhiSEphUms1WVlrZDBNMVpzVWxkV01rcFdZMFprV2sxSGFETldNbmhoVmpKT1IxVnNjRmRXYkZsNlYydFNSMVF5VG5SVmEyUllZWHBXVkZSWE1XOVZiRnAwWkVaT1UwMVZjREJXYlhodlZrZEZlR05HVmxwaVJscG9Wa1JHVjJOV1VuUlBWazVwVW01Q1dWWnFTWGhOUjBaR1RWWmFUMWRJUWxkWmEyUnZZMnhhVlZOcmRGZFdiSEF3VlcxNGEyRldTWGhUYkZaWFlXdEthRmw2Um1Gak1YQkpWbTFHVTJKRmNGVlhWM1J2VVcxV1IxcEdhR3RTYlZKUVZXMTRZV1ZXVWxkaFJUbFhVakJ3VjFZeWVHOVdiVXBIWTBST1YwMUdjSHBVYlhoUFl6RlNjMVZzVG1sU2JrRXlWakZhVjFack5WZGFSV1JVWWtad2NWVnVjSE5YVmxwMVkwVk9UMUpzU2xkV2JGSkhZV3N4VjFkcVJsZFdla1l6VmxSR1lWZFdSblZpUm1SWFpXdFZkMVl4V2xabFJrbDRXa2hXVm1GNmJGaGFWekUwWkd4YVIxZHRSbXBOUkZaSVZqRm9jMkZzU1hkWGJVWlhZbGhTTTFZd1dsWmxWMDVHWkVab1UwMUdjRFZXYWtreFpERnNWMU51VWxaaE0yaFhWRlphZDAweFZuRlRhemxUVFd0YVNGWkhlR3RWTWtwSFYxUkdWMkpZYUZSVk1uTjRWMFpTV1dKR1ZtbGhNMEpSVmxSQ2ExVXhXWGhpU0VwWFltMVNjVlZ0ZUV0WFZsSlhWMnM1VjFKVVJsaFdNbmhoVm14WmVsVnVTbHBXYlZKTVZURmFSMlJYVGtkWGJXeFRUVzFvTlZadE1UQldiVlpIVkd0b1YyRXhjRmhaYTFwM1YwWnNjMWRyZEd4V2JIQldWVEp3VTFaSFNsZFhiR3hYWWxoU2VsWnRNVXRTTVU1ellVWmthVkpyY0ZsV1JtUTBZVEZhVjFKdVVtdFNiRnB3Vm0xNGQwNXNXbk5aZWtaV1RXdHdTRlV4YUhkV2JVcEdUbFphVjJKdVFraFdhMXAzVmpGa2RHUkdaRTVXTVVsM1YxUkNhMDVHVlhoWGExcFlZa2hDV0ZaclZuSmxSbHBWVTJ0a1YwMVZOWGhXTW5oUFlWZEdObFpzYkZoV00xSnlWbFJLVTJNeVNrVlhiRTVwVjBaS1dWWkdXbTlSTVU1SFYydG9UbGRGTlZkVVZWSkhVbXhhYzJGSE9WZE5hMVkxVmtkd1UxWnRWbkpYYXpsaFVrVkdORlpxU2tkVFJrcHpWR3hPVjFkRlNscFdiWFJoV1ZkRmVGVllaRTlXVjFKWFdXdGtVMkZHVm5OaFJrNXFZa1phZUZWWE5XdFdSbHB6VTJ4b1dHRXhTbFJXYWtGNFZtMU9SMWRzV2xkTk1FcFpWbTF3UjFNeVRYaGFTRXBRVmpCYVdGWnROVU5VVmxwWVkwVjBWRTFWYkRWVk1uUnJWa2RLV0dGSE9WVldWMmhFV1dwR1lXTnNaSFJqUjNoVFRVZDNNVlpVUm05aU1WcDBVbGhzVm1KSGFHRldhMVV4VmtaYVZsZHRSbXBXYTFwV1ZXMTRVMVl5U2tkaU0yUlhVak5vZGxsVVNrZFRSazV6V2tab2FWSXphRmxXYlRWM1VtMVJlRmR1U2xkWFIyaFlXVmh3VjFkc2JISlhiVGxvVWpCV05sVlhlSE5XTVVwelUydE9ZVlpXY0V4YVJWcFhZMnhrZEdOR1RtaE5NRXBSVm14a05GbFhVWGROVm1SWVlrWmFWRmxyWkZOV2JGSlhWbTFHYkdKSGVIaFdSekV3WVVaYWNtTkdhRlpOYm1oUVZqSXhTMUl4VG5WalJuQlhWbTVDYjFkVVJtRlNNbEpIVTI1U2FsSXllRlJVVmxaMlRXeFplRmRzWkZkTmJFWTFWVzE0WVZSc1dsaGhSa1pYWVRGd1RGWXhXbk5YUjA0MlVteGtVMkpJUWpWV2FrbDRVakZSZVZOcldtcFNia0poVm14YWQwMHhiRmRYYlVaVFlrZFNlRll5ZUc5V01EQjVZVWhzVjJKWVFraFhWbHBhWlVaYWRWUnNaR2xTYTNCMlYyeGtORmxXV2tkYVNFNWhVa1ZLWVZadGRIZGxiRmw0WVVjNVdGSXdjRlpaYTFwUFZsWmFWMU5yYUZaTlJuQjZWbXhhVTJSV1VuUmhSazVvVFc1amVGWXhXbGRXYXpGWFYxaHNWR0V5VWxsWlYzUjNWbXhhZEdWSVpHeFdia0pHVlcwMWExVXlTa2xSYTJ4aFZsZFNlbFpxUm1GU01VcHhWbXhrVGxZeFNYcFdXSEJMVW0xV1IxVnNiR2xTYlZKd1ZXMDFRMVpXWkZkYVJFSmFWbXh3V0ZZeU5VOVdNVnBHVjJ4b1ZtSlVSWGRVVkVaclkyeGFjVkZzYUZOaVNFSTJWMVJDVTFJeFdYbFRiRlpUWW14d1dGbFhkRWRPUmxsM1ZsUldWRll3V2toWGExcHJWVEZhV1ZGcVZsZGlWRVl6VlhwR1NtVkdUbGxpUmxab1RWaENkbFpYTUhoVk1rNUhZa2hPYUZKNmJITlZiWGgzVTBaWmVVMUVWbGRXVkVaNlZUSjRiMVl3TVZoaFNFcFhZa1p3Y2xVd1pFZFNNVnB6WTBkc1UySkhPVFpXYlhCTFRrWnNXRlZyV2s5V2JWSm9WV3BLYjFaR2JISmFSRTVPVW0xU1dWUnNhR3RWTURGWFkwWm9XR0V4V25wV1Z6RkxWbXhrZEdGR1dtaE5WbkJNVmtaV1lWbFhVa2hXYTJSVllsaFNWRlJWV25kVGJHUlZVVzFHVmsxV1ZqVlZiR2gzVlcxR2MxTnNhRlZXYkhBelZqQmFjMVpXU25Ka1IzUlRZa1p3TlZZeWRHRlVNa1pZVTJ0a2FsTkhVbGhXYTFaTFkyeGFWVkp1VGxkTlYxSmFWMnRhYTFZeFNsZGpSa1pZVmpOU1YxUldaRmRTTVZwMVZHMW9VMDB4U25aWFYzUlhaREZhYzJKR1ZsVmliVkpZVm0xNGQxZEdXWGhoUjNSWFlYcEdNVmxWVm10WlZrcEdWMnQ0WVZKV1ZYaFdha1pYWXpGd1IxcEZOV2xTVm10NVZtMHdlRTFIUlhkTlZXUldWMGQ0VjFsclduZFVNVnB6VjI1a1ZsSnNjSHBXTW5Rd1lVWktkVkZzYkdGU1ZsbDNWbXhhWVdNeFpIVmlSbVJPWW14S2VWZFdVa0psUjA1eVRsWmFhRkp1UWs5VmFrcHZVbFphYzFwRVVscFdWRll3VlRKMGIyRkdTblZSYmtKWFRVZFNkbGxxUm1GU01XUjBVbTFvVGxadVFsbFdiR014VkRGYVdGTnNiRkppUmtwV1ZteGtVbVZzVWxkWGJVWlVVakZhU1ZwRlduZFdNa3BaWVVac1YwMXVVbGhaYWtwSFVqRlNjbUZHV21sV1ZuQnZWbTF3VDFSdFZrZFhia3BZWW0xU1dWVnFSa3RTYkZaWVpVVTVWazFyY0hsVk1uUjNWMFphYzFkdVNtRlNSVnBYV2tSQmVGWnNjRWhqUmxKVFRXMW9ZVlp0TUhoT1JteFlWRzVPV0dKcldsUlpiVEZUWTJ4V2RHVkZkRTVXYkhCWldsVmtNR0ZHV1hkalJteGFWbGRvZWxacVNrdFhWa1p5WVVab1YySkdWalJYV0hCTFZERktjMXBJVG1oU2JWSlVXV3RvUTAweFduSlhiVVpwVFZWV05GZHJXbXRXTWtwelUyczVWMkV4V2t4WFZscGhaRVV4VjFSc1RrNVdNMUY2Vm14amVGSXhXWGhUV0dScVVrVkthRlpzWkc5bGJGbDVZek5vVTAxWFVqRlpNRnBoVkd4WmVGTnNRbGhoTVVwRFZGWmFZV014V25WVmJXaFRZbFpLV1ZadE1ERlJiVlpIVjI1T1ZtRXlVbGhVVmxwSFRrWldkRTVXVGxaTlYxSkpXVlZvUTFadFNsVlNWRUpYVmtWYWVsbDZSbmRUUlRsWFkwWmthVkpZUW1GV2ExcGhZV3MxV0ZKdVNrNVdiVkpZV1Zkek1WZFdiRlZTYm1ScVlrZDRWMVl5ZERCaE1WcHlWMjVzV21FeGNISlpWbHBoVWpGa2NWZHNhRmRpVlRRd1ZtMXdSMWxYVFhoVWJrNVhZa2RTY0ZWdGRIZFhWbHAwWTBWa1ZFMVZOVmhYYTJoTFZtMUZlVlZ1UmxWV2JWSlVWVEJhWVZkRk5WZFViRnBUWWtkM2VsWnFTalJpTVdSelYycGFVMWRJUWxaV2JYaDNXVlp3VjFwR1pGUlNWR3hZVmtkek1WVXhTbGRqUm5CWFRWWktSRmRXWkU1bFJtUnpZVVpPYVdFelFsWlhWM1J2VVRGYWMxZHVWbXBTVjFKeVdXdGtNMDFzVm5STlZFSlhUVVJHV2xWWGRHOVdNVW8yVW01d1YxWkZSalJWYkZwaFYxZEdSMXBIYUU1WFJVbzBWbXRrTkZsV1ZYaFRXR2hoVTBWd2NGVnRlR0ZpTVhCWVRWUlNWMUpzY0VoWFZFNXZWREZLY2xacVVsaGhNbWhJVmxjeFMyTnJOVmRWYkZwcFYwWktiMVpHV21GV01XUkdUVlphWVZJeWFGUlphMmhEVjBaYWNWTnVaRlJOVjFKSVZqSTFUMkZzVGtkalJtaFdZVEZhTTFZd1duTk9iRTV5VDFaT1RtRXpRa2xXYWtvMFlUSktTRk5zYkdoU1ZGWllXV3RrVTAweFZsVlNiazVYWVhwR1NsbFZaRWRWTWtwWFUyMDVWMVl6YUZSWmVrcFBVakZXYzFwSGFGTldWRlpaVmtaYWEwNUdXWGhhU0VwV1lrVTFXVlZxUW5kVFJteHlWV3hPVjJGNlJuaFdiWGhEVmpBeGRWUnFVbHBOVm5Cb1dYcEdSMk15UmtkYVJUVk9WbGQzTVZacVNqUldNV3hZVlc1U1YySnJOVmhaYlhNeFYwWnNjbHBHVG1wTlYzaDZXVlZqTlZReFduTmpTR3hYWWxSR1NGWXllR0ZqTVVweFZteGFUbUpzU25sWFZsWldaREpXYzFKdVRtaFNia0p3Vm10V1ZtUXhaRmhqUldSWVlsWkdORmRyYUV0aGJFcFZWbXhvV2xkSVFsaFVhMXBoVjBkV1NFOVhhRTVoTVhBMlZsUktOR014V25SVGEyUllZa2RTV0ZsWGN6RlNSbXQ1WlVaa2FrMVhVbnBYYTFwdlZURmFTR1ZHY0ZkU00yaG9WbFJHV21WR1pITldiR1JvVFZWd1dWWkdZekZSTVVwSFlrUmFVMkV6VWxSVVZsWjNaV3hzVmxwRlpGWk5WMUpIVlRKNFYxWXhTblJVYWxKYVlXdHdXRmw2Um10WFYwWkhZVWRzV0ZKcmNGbFdhMXByVFVkUmVGUnNaRmhoTW1oUVZteFZNVmxXV25OVmEyUnNVbXh3TUZwVmFFOVdNa3BJVld0d1ZsWXpVblpXYWtaTFVteGtkV05HY0U1V2JrSlJWMWh3UjFReVVraFZhMlJWWWxkNFZGbHJaREJPUmxwMFRVaGthMDFzV2tsV1ZtaHpWVEZrU0dGSGFGWmlSbkF6V1RGYVZtUXhjRWRVYldoVFlrWndObFl5ZEdwT1YwcEhWMjVPVkdGclNtaFZiR1J2VlVaYVZWSnJkR3RTTVVwR1ZtMTRiMkZGTVZkWFZFSllWbXhhYUZkV1dtRmpNWEJKVm0xc1UySldTbEJXYlRBeFVUQXhjMWRzWkZaaE0xSlVWRlpXYzA1V1ZuTmhTR1JvVm10c05WbFZXbE5XVmxwR1kwaGFWMkpZYUdoV01HUlBVbXh3UjJOR1pFNVNNMk4zVm1wS01HSXhUWGhpUm1SVVlteEtWMWx0Y3pGWFJteFlaRVZrVDFKc1NubFdNalZQVkRKS1JrNVdXbFppV0doMlZsUktSbVZIUlhwaVJtUlhaV3RaTWxaSGVHRmhNbEpIVTI1V1ZHSllRbFJaV0hCWFlqRmFXR1ZIUm10TlZtdzBXVEJhYTFkSFNsWlhia3BXWVd0RmVGVXhXbmRTYkdSMFQxWmFUbFl4U2toV1ZFWnZaREZaZDAxWVZsWmlSMmhoV1ZkMGQxVkdjRVpYYXpsclZteEtNRmxWV2s5aFZrcFpVV3BLVjAxdWFIRmFWVnBXWlVaT2RWUnNhR2xTTVVwb1YyeGtORmxYVGtkaVNFcFhWa1ZhV0ZSV1duZFRWbkJHVm1wQ1dHSkdjRlpWYlRWM1Yyc3hSMk5HUWxkaVJuQm9WbXBHYTFkV2NFZGpSMnhUWW10S1dsWnRNVFJaVmtsNVZHNVNWMkV5VWxaWmExVXhZakZTVjFsNlZrOWlSbXcwVmxkMFQxZHNXWGhTYWxaWFVqTlNjbFpVU2t0VFIwWkhVbXhrYUdFelFqSldha1poVmpKTmVGWnVUbGhoZWxad1ZXMHhNMDFXWkhOV2JYQlBWbXh3TUZVeWVHRmhWa3BHVGxkR1ZWWldjR2haTW5oaFZteGtkRkp0Y0U1V1ZGWTJWbXhrTkdFeVJsZGFSV1JVVjBoQ1dGbFhkRXRoUmxweFUyczFiRkp1UWtwVk1qRXdWVEpLY2xOdVdsZFNiVkl6V1RJeFYyTXhjRWRhUm1ScFZsWndXVlpHV21Gak1EVkhWbGhzVDFaWVVsaFZha0ozVm14V2RHVkhkRmROYTFZMFZqSjBORmRzV2xkalNFcGhVbGRTV0ZWdGVHdGtSMUpHVGxaT1UwMHlhRnBXYlhSVFVqRnNWMWRZYkZOaE1YQlBWbTB4VTJOV1ZuTlhibVJZVW0xNGVsbFZXazlYUmtwMFpIcEtWbUpZYUV4WmExcExZMnMxVjJOR2NGZFdia0pGVm0xd1IyRXhTbk5VYms1b1VtMVNXRmxyVm5kVVZscHpWV3QwVTJKV1draFdWM2h6WVVaS2MxZHRPVlZXVjJoRVdrUkdZV1JIVmtoUFZrcE9Za1ZaTUZadE1UUmlNVkp6VjJ0YVZHSlZXbGhaYkdodlpXeFNjbGR1U210TmExcEpXa1ZhYjJGV1dsbFJiR1JYVm5wRk1GbHFSbXRqTVdSeVYyeFNXRkl4U2xoWFZsSkhaREF3ZUZadVVteFNiVkp4VkZaYWQyVnNXa2hsUjNSV1RVUkNOVmxWV25kV01rcFpZVWhLVlZaV2NHRmFWV1JMVWpGd1IxZHRiRk5OVlhCV1ZqRmtNR0V4VlhoWGJHUnBVbXhhVkZsdE1WTlhWbXh5VjJ0MFdGSnNiRFZVYkdRd1Ztc3hSVkpzYUZwTlJuQjZWMVphWVZZeFdsVlNiR1JvVFd4S1RWWlhjRWRUTWs1WFZXNU9WMkpYYUU5WldIQkdUVVphZEdSR1pGcFdiSEF3Vm0xNGIxWnRSWGxoUmtKWFlXdEthRll4V2xkalZrWlZVVzE0YVZKdVFtRlhWRUpYVkRKR2NrMVdXbXBTVjJoWFdXeG9iMlJzWkZkWGEzUllWbXRhZWxaSGVGZFdNa3BIWWpOd1dHRXhXbWhYVm1ST1pVWmFkVk5zVm1sU01VcFFWbTB4TkZkck1VZFhia1pVVmtWYVZWUldXbk5PVmxWNVpFZEdWVTFXY0RCYVZXUnZWakpLVlZKc1VsZGhNWEJvV1RKNGEyTXhjRWhqUlRWWFltdEthRll4V2xkWlZteFhWbGhzVkdFeWVGTlpWRXB2VjBac2MxVnJUazlTYlZKWVZqSjRhMkZyTVZoVmJuQllZVEZ3VkZsVlZYaFhWa1p6WWtaa2FWZEZTazFXUjNSclZESk5lR05GYkZSaVIxSndXVmh3VjFaV1duUmxSazVUVFZVMVdGZHJhRXRXTWtaeVUyeGtWVll6VW1oVVZWcDNWbXhrZEZKc1pFNVdiWGN5VjFaV2EySXhXblJXYmtwWVlsVmFhRlpzV25kVlJtdzJVbTVrVTAxV1dqQlphMXByVjBaS1ZtTkZPVmRpV0ZKb1ZtcEtSbVZXVGxsaFJtaHBZWHBXV2xkWE1UQmtNV1JYWWtaV1VsWkZXbTlWYlRFMFpWWmFkR1ZIZEZWaGVrWllXV3RTVjFaV1duUlZhMmhYWWxSR1NGUnRlRXRqYkdSelkwZG9UbGRGU2taV2JURjNVakZPZEZadVRsZGlhelZ2VlcxNGQySXhVbGRoUlU1cFRWWndXVlJWYUc5V1JURldZMGhzVlUxV2NISldiR1JIVG14YWMyRkdXbWhoZWxZeVZtdGFZVmxYVWtoV2EyUmhVbXhhVDFsVVJscE5SbVJWVVd4a1dsWnNXa2hXTW5SaFZERmFWV0pHWkZwaE1sSjJWbXRhVjA1c1NuTmFSbVJYWVRGd05WWXlkR3RqTWtaWFUyeFdWMkpIYUZoVVZ6VlRaR3hhUlZOclpGZE5WMUo2V1ZWa05GVXhXbk5qUjJoWFlsaG9jbGxxUmt0U01rcEhZVWR3VGsxc1NubFdSbFpUVmpGa2MxZHJhRTVXVjFKWFZGWmFkMVpzV25SalJXUllVbXh3ZWxVeWRHOVhiVlp5VjI1S1YyRnJXa3hhUmxwWFpFZEdSMVJ0YkdoTlNFSlNWbXBHYTA1SFJYbFRXR3hYWW1zMVdWbHJXbUZWTVd4ellVWk9XRkpzU2xsYVJXUkhWa1pLZEdSRVRsZGlWRUV4Vm1wQmVHTnRUa1ZSYlVaWFZqSm9TVlp0ZUdGWlYxSklVbXRrVW1KVldsUlphMmhEVjBaa2NsVnJaR2hOYXpFMFZsYzFUMWxXU25SVmJrSldZbFJXUkZVeWVHRmpiRlp5V2taa1RsWnNXVEJXYlhodll6RmFTRkpZYUZoaWEwcFhXV3hTUjJSc1duRlNiRTVYVFZkU01WZHJXbUZWTWtwSFYxUkdXR0pHV25KVmFrWldaVlpLY1ZkdGJGTmlWMmhaVmxkd1QxVnRVWGhYYTJoc1VqQmFWRmxyVlRGbFJscElaVWRHYVZJd1ZqUlpNRnBIVmpGYWMxTnJUbFZXVjFKVFdsVmFZV1JXVW5OVmJXeFhUVEpvVVZZeFpEUlpWazE0Vld0a1dHSkhVbGRaVkVFeFZrWlNXR1JJWkd4aVJuQkpXbFZrUjFZeFdYZFdhazVhVFVkU2RsWnNXbUZYUmxaVlVXeGFUbFp1UWpaV2JURTBaREZLVjFadVRtaFNNbmhVV1d4b2FtUXhXbk5WYTNCT1ZteEdORmRyYUV0VWJHUkhVMjVPVmsxR2NHaFhWbHB6WXpKR1NFOVdXbE5pUm5BMFZsY3hOR0V5Um5KTlZtUnFVMGhDV0ZSWE5XOVZSbXhXV2tWMFdGWXdXa2RYYTFwcllWWkpkMDVFUWxkU2JFcERWRlphV21WR2NFZGlSMmhUWWtad2QxWlhjRWRUTVZsNFdrWmtWbUY2YkZOVVZtUlRVMFphZEU1Vk9WZGlWWEI1Vkd4YWIxWnRTbGxoUldoVllrWndlbGt5ZUdGamJWSklZVVprVGxKc2EzaFdNbmhYVmpGWmVGZHNhRk5YUjNoWFdXMTBkMVl4Y0Zoa1IwWlVUVmhDUmxWdE1UQmhiRnB6VTI1d1dsWldjSEpaVmxwaFkyMU9SMU5zWkU1V01VbDZWbGR3UzFWdFZrZGFTRlpXWWtVMWIxUlhNVzlsYkZwWVRVUkdVazFYVWtoV1YzaHJWakpLZEZWdVRscGhNbEpVVm0xNFZtVkdWbkphUm1SWFZrVmFXbGRzVm05ak1XUjBVbTVLVDFkRmNHRldiRnAzVkVac05sSnRkR3BOYTFwSVZqSXhjMWRHU25KalJUVlhUVmRSTUZkV1dscGxSbVJ6V2taT2FXSkZjRlZYVjNoWFdWZE9SMVp1VWs5V1ZUVlFWbTB4VTFkV2NFWmFSV1JYWVhwR1dGa3dWbTlXTURGeFZteENWMkV5VWt4VmJYaHJZekpHUjFwSGFHaE5hbWd6VmpGU1MwNUhSWGxVYms1WVltdGFVMWxyWkZOWFJsSldWV3RhYkdKR2NFbGFWVnByVm1zeGNsZHJhRmROYm1ob1ZqQmtTMk14WkhOYVJsWlhZa2hDYjFac1ZtRldNVnBYVW14V1YySkhVbkJWYlhoM1RteGFWVk5ZYUd0TlZsWTBWVEZvZDJGR1NsaFZiR2hhWVRGd00xa3hXbE5qYkhCSFZHMXdUbFp1UWpWWFZsWmhaREZTY2sxWVRsUmlSbkJZVlcxNGQxZEdWalpTYTNSWFRWWndNVlpYTVRCVk1rcFhVMnhzVjJKWWFGUlZha1pLWlVaV2RWUnNhR2xXVm5CWlZrWldVMUl4WkVkaE0yUlhZa1UxV0Zsc1ZuZFhiRnBZVGxoa1YyRjZSa2xXVjNSdlZtMUtSMk5GYUdGU1YxSk1WV3BHZDFKck5WWk9WMmhzWWtaV05GWnRNVFJoTURGSFlrWmtWRmRIZUZkWmJYUjNWVlphYzFwSE9WZFNiWGhXVlRKd1UxWXdNVmhsUkVKaFZsWlpkMWxYZUV0ak1XUjFZa1prVjAweWFGRldiWGhXWlVaYWMxZHVSbGRpU0VKUFZXMTBkMVpXWkZkWGJGcHNVbTFTV0ZWdE5VOWhWa3B6WTBoQ1YyRXhXbGhVVkVaaFl6RmtkRkp0ZEU1U1JsbzJWbGN3TVZNeVNrZFRiazVVWWtkb1dGbHJXa3RYUmxaeVYyeHdiRll3TlVkV1J6RjNWR3hhV1ZGc2NGZGlWRVYzVm1wR1YyUkdUbk5oUjJoVFlsaG9XRmRYZUc5Vk1EQjRWVzVTYkZKdVFuTldha1poVTBaVmVXTjZSbFpOVm5CSFZqSjBiMVl4U25OalJtaFhZV3RhYUZsNlJtdGpiVVpJWVVaT1YxSnNjRmhXYlRFd1ZqRnNWMVZyWkdwU1ZscFVXVzB4VTFaR2JISmhSVTVUWWtad1dWUldhRTlXYXpGeVZtcE9XazFHU2toV2FrWkxZekZrYzJGR1ZsZFdia0pSVjFod1IxTXhaRmRqUldSVllrZFNWRmxVVGtOaU1WbDRWMnhPVkUxV1ZqVldiVFZQWVd4S1dGVnRhRlppUjFKVVZsVmFZV1JIVWtoU2F6VlhZbGhvTlZZeWRGZGhNVmwzVFZWV1VtRnNXbGhWYlhoTFUwWmFkR016YUZoU2JFcGFXVlZhYTFVeFNsWlhWRUpYVmtWS2FGZFdaRTVsVmtweVlVZDRVMkY2VmxCV1JtTjRZakExUjFkdVNsaGlXRUp6VldwQ2MwNVdXa2RoUnpsYVZtczFSMVJzWXpWV2JVcFpWV3BPV21GcldtaFpla1ozVWxaV2MxVnNaR2xYUjJoWlZqRmFWMkl4VVhoYVNFNVlZbXMxY0ZWcldrdFpWbGwzWVVWT1dGSnNjSGxXTWpGSFZESktSbU5FUmxkTmJtaFlWbXBHV21WR1RuTldiR1JYVWxad2IxWlhjRXRWTVdSSFZXNUtZVkpyY0hCV2FrcHZWMVphV0dORmRHaE5SRlpZVmpGb2IxWnRSWHBSYms1V1lsaFNlbFJVUmxOV2JVWklUMWRvVTFaRlNURlhiRlpoWVRGa2RGTnNiR2hTTW1oWVZXcE9iMlZzYkRaU2JtUlRUVlpLTUZwRlZURlhSa3BXWTBWc1YyRnJiM2RaVjNNeFYwWktjbHBHVW1saVJYQjVWbGQwWVZsV2JGZGpSbWhxWld0YVdWVnRlSE5PVm13MlZHMDVhR0pHYkROWk1GWmhWbXhaZW1GR2FGZFdSVnBNVm0weFNtVnRUa2RoUm1ST1RWVndOVlpzYUhkVE1WVjRVMWhvV0dKc1dsZFpiR2h2VmtaU1ZWRnJkR3ROVm5Bd1dsVmtSMkV3TVVWV2JuQlhUVzVTV0ZaVVNrdFNhelZYVm14d2FWSnVRazFYYkdRMFZqSlNSazVXWkZWaVYzaFVXVmh3VjFOV1pGVlJiWFJwVFZkNFdGWXlOVTlXUjBWNVlVWmtWVlpzY0ROWk1uaGhZMVpLZFZSck9XbFNWbTkzVjJ0V2EySXlTa2hUYTJScFpXdEtXRmxzYUZOaFJteHhVMnRhYkZKc1dscFphMXByWVZkRmVsRnNSbGRoYTBwWFZGWmFZV015U2tsVWJXaFRWbFJXVkZaR1dtRlRNVmw0VjFoc1QxWlViRzlaYTFwM1RVWlJlRlZ0UmxoaVJuQlpWbGQwYjFZeFdrWlNhbEpYVFVkU1ZGVnNXbUZqTVhCSFZHMXNWMDF0VVRKV2JURXdZVEpXZEZWWWJGZGhNbWhWV1ZSR1lWZFdiSEpXVkVaWVVteGFNRnBWYUd0V2JFcHpZMFJDWVZKWFVYZFdiR1JIVG14S2MyRkdaRmRpVjJneVZtMHdlRkp0VVhkT1ZtaFFWbXh3Y0ZWdGRIZFhSbHBIV2tSU1dsWnJiRFZWYlhSeldWWktjMWR1UWxaaVIxRjZWRlZhWVZkSFZraFBWMmhPVm01Q1dsWlVTalJXTVZWNVVsaHdWbUpYYUZoWmJHaHZWMFpTY2xkdVpGTmlSMUo1V2tWa01GVXdNVmRqUld4WFZtMVJNRmRXWkV0VFJrNXpZa2RHVGsxdGFGbFhWbVF3V1ZkR1IySkdhR3BOTW1oWVdWaHdSMVl4WkhKYVNHUldUV3R3V1ZsVldrZFdNa3BWVm1wT1YyRnJXbFJaZWtwTFUxWlNjMXBHWkZOV2JrSlNWakZrTUdFd01VWk9XRTVwVTBWd1dGbHRNVk5XYkZaelZXdGtWRlp1UWxkV2JYaHJWakpLUjJOSWNGZGlSMmgyVm0weFJtVldWbkpoUjBaVFlraEJlbFpYZUdGVU1rMTVWR3RrWVZKdFVrOVdiR2hEV1ZaYWNWSnRSbGROVjNoWlZsWm9iMVpIU2tkalJrSlhZa1p3TTFaVldtRmpNV1J5WkVkc1RsWXpaM2RXUmxwcVRsZEZkMDFXYUZaaVIzaGhWRlZhV21ReFduUmpNMmhUVm14d2VsbFZXbUZXTWxaeVVtcFNWMkV5VVRCVmVrWnJWakZhZFZOdGRGTmlTRUpaVmxkNFYyUXhUbGRhUm1oT1ZrWktWbFJXV25kbGJGcDBUbFZrVjJKVmNGbFpWVlUxVjJ4YVJsZHFUbGhXYkhCb1dURmFTMlJIVWtoaFJUVlhUVlZ2TVZacldtRmlNVmw1VW10a1ZHRnNjSEJWYWtKaFlVWmFjVlJyTld4U2JIQkdWVzE0UzJKR1NuTmpSRVpYVW5wRmQxWlVTa3RTYlVsNllVWmthR0V5ZHpCWFdIQkxVakZrUjFSdVNsaGlXRUpWVlcwMVExZHNXblJOVkZKclRXczFXRlpYZUd0WlZrcFpWV3hXVm1KWWFFeFVWbHBYVjBkV1IxUnNaR2hsYTBrd1ZsUktNR0V4V1hsVGEyUnFVMFZhVmxsclpGTlVSbXcyVW14T2FrMVhVbnBXYlRGdlZHeE9SbE51V2xkaE1YQllXVlJCTVZJeFRuTmFSbVJwVWpGS2IxWlhjRTlWTVZwWFlraEtWMkp0VWxWWmEyUTBWakZzVmxwRlpGZE5WbkI2V1RCb2QxWnRTa2hoU0ZwWFRVWndZVnBYTVVkU2JWWkhZMFUxYUdFeGNFNVdiR040WlcxV1IxZFlhRlppYXpWb1ZXcEtiMk14YkZWU2JscHNVbXh3TUZSV1VrTlhiRnB6WWtSU1ZrMVhhSFpXYlhoclUwZEdSMVZzY0doTldFRjZWMVpXWVZZeVRYaGFTRlpoVW0xU2NGVnROVU5PYkZweFUxaG9VMDFXY0hwVk1qVlBZV3hPU0dWR2FGVldiVkoyV1RKNFlWWnNaSEprUm1oWFltdEtSMVp0TVRSaU1rWklVbXBhVjJGcmNGaFphMXAzWVVad1JWRlVSbXBOVlhBeFZUSXhORlV5U2taalJteFhZbGhvVkZacVJrdFNNV1JaWWtkd1UxWlVWbmhXUmxwWFpERk9SMVp1VW14U2VteGhWbTEwZDFkc1ZsaGxSVGxYVm14d1dGWXllR3RXVmxwWFkwZEdZVlp0VWxSVk1HUlRVMGRPUms1V1RsTldiVGg0Vm1wR2EwMUdXWGxUV0doWVlrZG9WVmx0ZEhkVlJscHhVVzFHV0ZKc1NsZFdNbmhoWWtaS2MxTnFRbUZXVm5CeVZsUkJlRll4VG5WaVIwWlRWakZHTTFac1VrdFRNazV6Vkc1T2FsSnRVbFJVVkVwdlZsWmFXR05GWkZaTlZtdzBWMnRhYzJGV1NYcGhSbFpXWWtad00xbFZXbXRXTVhCRlVXMXdhVlpyV1RCWFYzUmhZVEZaZVZOdVNrOVdiRnBYV1d0YVMyVnNXWGxsUjBaclVqRmFTbGRyV2xkaFZscFpVVmhrV0Zac1dsUldSRVphWkRBeFYxcEdVbWhOTW1odlZtMXdUMVJyTVZkWGJsSk9WbGhTVlZadGVIZGxiRmw1VFZoT2FGWnJOVWRWTWpWaFZqSkZlR05JUm1GV1ZuQlhXbFphWVdSV1VuUlNiRkpUVmtaYVlWWXhXbTlrTWsxNVZHeGtWMkpzU2xCV2JGVXhWbFphZEdWSVpFNVNiRXBZV1ZWVk5WZEdTWGRqUld4WFZqTlNjbFl5TVVabFYwWklZVVprYUUxV1dUQldiVEY2VFZaYWRGVnJaRlppV0dodlZGWm9RMUpzV25OYVJFSlhZWHBXV0ZkclZtOVdiVVY1WVVjNVZtSlVSblpXYTFwell6SkdSMVJyT1ZkaVNFSmFWMnRXYTFJeFZYZE5XRTVVWW01Q1lWbFhjekZqYkd4WFYydDBWMDFWTlhwV1IzaHJZVWRGZWxGc1ZsZFhTRUpJVm1wR1lWWXhTblZUYlVaVFRXNW9kMVpYZUZOV01XUkhWMjVPWVZOSFVsZFVWM1JoVmpGU1YyRkZkRlZOVjFKSldWVmFZVmRzV2taWGJHUmhWbFp3V0ZreWVIZFNiSEJIV2tkc1UxZEZSak5XYTJRMFdWWlZlRmRZYUZoaVJscFlXVlJHUzFkR1VsaE9WVTVUVW0xM01sVnRkREJWTURGV1kwaHdXbFpYVWtoV1ZFcEdaVWRPUjFac1pGTmlTRUpaVjJ0U1FtUXlWa2RqUld4VVlsVmFWVlZzVWxkV1JscEhXa1JDV2xaVVJraFdiR2h6WVRGS05tSkdaRlZXTTFJelZGWmFWMWRGTlZaYVJuQlhZa2QzTWxaV1pEQlZNV1J5VFZWa2FsTkZjRmhVVlZwV1pVWmFjVkp1WkZOaGVsWllWa2R6TVZZeFpFWlRhM2hYWWxoU1ZGVnFTa3BsUm1SWllVWmFhVkl4U2xwV2FrSnJWVEZXUjFkdVNsZGliVkpoVm0weE5HVnNXbGhsUjNSWFRWVndNRnBWV210WFIwVjRWMjVLVjAxR2NFeFdiRnBoWXpKS1NGSnNaRmROVld3MlZqRmFWMWxXYkZkYVJXaFdZVEo0Y0ZWdGVIZGlNVkpYWVVWT1ZGWnRVbmxYYTFKVFlUSktWMUpxVmxaTmJsSm9WbTB4UzFKdFRrZGhSbFpYVFRKb1RWWnJWbUZaVmxsNFZtNUtWV0pGTlU5WlZFNURUbXhhY2xwRVVscFdiSEJaVld4b2EyRnNTWGxoUmxwWFlrZFNVMVJWV2xkak1XUnpXa1prVGxac2IzZFdSRVpoWkRGWmQwMVZiRkppUjFKWlZtcE9VMVpHV25GU2JYUnJVbXMxZVZZeWN6VldNVnB5WTBjNVYxWXphR2hhUkVGM1pVWmtXV0ZHYUdsU01VcDVWbGQ0VTJNeFpGZGlTRXBYVmtWYWIxWnRkSGRYUmxwellVYzVWMDFXY0VkV01qVkhWbFphYzJORlpHRldiSEJZV2taYVYyTXhXbk5oUmxKVFZsaENXbFp0TUhoa01VMTNUbFZrVlZkSGFGaFdNR1JUVjBaYWNsWnJkR3BpUmtwWVdWVldUMWRHU25SVmJteFhWak5vVUZsVldtRmpiVTVKWWtaYVRtSnRhRmxXYlRGNlpVZE9WMU5zYkdGU2JrSllWbTAxUTJWV1dsaE5XSEJPVm14d1dGWlhOVTloYkVsNVlVVTVXbUV4V2pOVk1uaGhZMnh3UlZWc1pHaGxiRnBhVm10a01HRXhWWGxUYms1WVlrVTFZVmxyWkZKTlJtdDNWMnh3YTAxWVFrbFVNVlV4Vkd4WmVGTnNjRmRTYkZwMldXcEdXbVZXVG5OYVJsSm9UVzFvYUZkV1VrdGlNVnBIWWtoS1dHRjZiRlJVVjNNeFUxWldkR1ZHWkZkTmJGcDZWako0UTFZeFNuTlRhMmhYVWtWYWNsVXdXazlqVm1SelUyMXNVMkpJUWpKV2ExcFhWVEZaZDAxSWFGaGlSMUpaV1d4b1UySXhVbGRXVkVac1lrWmFlbGxWWkRCV2F6RnlZMFphVjJKWWFGaFdha3BMVWpGYVdXRkdXbGRTVm5CNVYxUkdZVkl5VWxkVmJrNVZZa1UxYjFSV2FFTlpWbHB4VTJwQ1YwMXNSalJXYlRWTFZHeGFWMk5HYkZwaVdHaG9WbXBHVTFZeFpIUlNiRnBUWWtad1dsZFVUbmRXTVZwSFUyNUthbE5JUW1GV2JGcFdUVlpaZDFkcmNHeFNhelV4V1d0YWEyRkhSWGRqUnpsWFZqTkNURlY2U2s1bFZsSnlWMnhvYVZZeWFGWldWM2hUVmpKV1YxZHJaRmhpVkd4VFZGWmFkMlZzV2xobFIwWmFWbXMxUjFSc1l6VlhiR1JKVVd0U1ZXRXhjR0ZhVmxVeFZteFNjMkZIYkZkWFJVcExWbTE0YWsxWFVYaFhiR1JZWWtkU1dWbHROVU5aVmxKV1YyNWtWRkp1UWtoV01qRkhZV3N4Y2s1VmFGaGhNbEV3V1ZWVmVGZFdSbFZUYkdScFYwZG9XVll4V21GVmJWWkhWV3hzYUZKdGFHOVVWekZ2VjBaa1dHUkhkR2xOVmtZMFZqRm9hMWRIUlhwVmJrWldZbGhvVEZZeFduSmtNV1J5VDFkb2FWSllRalZXUjNoaFlURmtjMWRzYUZaaE1taGhWbXhhZDFNeGNFVlRhemxUWWxVMVNGZHJaSE5XTVVwWFZtcE9WMkpZYUdoWFZscGhaRVpXV1dKR1ZtaE5XRUpYVjFkMGEySXlTWGhWYkdocVpXdEtUMVZ0TVZOV2JGWllUVlJDVjFKVVJucFZNblJ2VmpBeGNWWnNhRnBXYkhCTVZqRmFSMlJGT1ZkYVIyeFRZa2M1TmxZeWVGZFpWMFY0V2tWb1ZtRXlhSEpWYlhNeFZERnNjbGR1V210TlZuQjVWMnRvYTFkc1duTlRibkJXVFZkb2VsbHJXazlTYkdSelYyeGthRTFXY0c5WFZsWmhWVEZhYzFwSVZsVmlXRUpQVm1wT2FtVldXblJOU0doT1VteHNORmRyVm05aFJrcDFVV3hvVjJFeFdqTlVWRVpYWTFaT2NsZHRlRk5pUlhBMVZqSjBZVlV5UmtoU1dIQlNZbGRvV1ZacVRtOWpiRkp5VjJzMWJGSnNTbmhXTW5oTFlWWktWVlpzYUZoV00yaFlXWHBCTVZZeGNFbFRiR1JwWWxaS1dGZFdhSGRTTVVsNFYxaHNUMVp0VWxoWldIQkhWMFpaZVdWRlRsZGlSbXcyV1ZWU1MxbFdTa1pqUlhoV1lsaG9XRmw2Ums5ak1YQkdUbGRzVTFkRlNrOVdiVEUwV1ZaVmVGSllhRlJpYTNCUVZteGtVMVl4YkZWU2JVWlhWbTE0ZWxadE1VZGhiVXBJWlVod1YySkdTa2hXUjNoTFl6Rk9jMXBHWkZOTk1FcEZWbXhTUjFsWFRYaGFTRTVwVW14YVQxWnFRWGhPUmxwMFpFZEdXbFpzY0hsVWJGcGhWbGRLU0dGSE9WcFdSVW96VkcxNFlWZEhVa2hTYkU1T1ZqRktTVmRVUWxkWlYwWnpVMjVLYWxKVWJGZFphMXAzVFRGU1YxZHRSbGRXYTNCNlYydGFWMVJzV2xkalJGWlhVa1ZhV0ZsVVNrZFdNVkp5V2tab2FWSXlhR2hXYlhCUFZURlNSMkV6Ykd4U2JWSnlWbXBCTVZOc1draGpla1pYVFd0Wk1sWnRlRzlYUmxwelYyMW9WMUpGV2xOYVZWcHJWMVp3Ums5V1pGZE5NbWhhVmpGa01GbFdUWGxXYms1WFYwZDRUMVpzYUZOWFJteHpWbTVPVDJKSGVGZFhhMVpyVm1zeFYySkVWbHBXVm5CWVZqQmtSbVZXVW5GVmJGcHNZVE5DVVZaWGNFZFZNazE1VW10b1UySkZOVTlaYlRGdlZWWlplRmR0ZEU5U2JYaFpWbTEwYTFsV1NuUmhTRXBXWVdzMVZGa3hXbE5YUjFKSVVtczFVMkpHYjNkWFZFSnJVakZhV0ZOcldtbFNSbHBvVm14a2IxUkdXbk5YYlVaUFlrVndWbFZYZUZkV01rcEpVVzVzV0ZaRmJ6Qlpla0V4WXpGa2RWTnJPVmRXUmxwV1ZsZHdTMkV3TUhoWFdHeHNVbTFTY0ZSV1pEUlhSbVJ5WVVWMFZXSkhVa2RaTUZwelZqQXhTRlZzVWxoV2JIQm9Xa1ZWZUZack5WWk9WbVJwWVRCd1NsWnRNSGhrTVZWNVVsaG9WRmRIVWxsWlZFNURXVlpzVlZOc1RsUlNiSEI0VlZab2IxZEdTWGRPUkVwV1lsaG9hRlpITVVkak1XUlpZa1prVTAweWFIbFdXSEJMVkcxV1YxUnVTbUZTTW5oVVdXdGFkMWRXWkhOYVJGSmFWbXhLU0ZkcldtdFhSMHBJVld4V1ZWWXpUWGhXTUZwelkyMUdSbVJHY0ZkaE0wSmFWbXhqTVZReFpIUlRhMlJYVjBkU1ZsWnFUbTlXUmxwMFpVaGtWRlpzU2pCWlZXUnZZa2RGZDJFelpGZGlXRUpNV2tSR1JtVkdjRWxWYkZKb1RXMW9WMVp0ZEZkWlYwWkhWbTVTYkZKdVFrOVZiWGh6VFRGWmVXTjZWbWhpUm5CNVdUQlNRMWxXU2xkalJsSlhWa1Z3UjFwV1ZUVldWbHB6V2tVMVYwMUVVWGRXTVdoM1VqRlJlVlJ1VWxWWFNFSnZWVzE0ZDJOR1ZuRlRiVGxYVm0xU1dWUldVa05XUlRGeVRsVm9WMkpZYUZoV1Z6RkdaV3hXYzJGR2NHaE5iRXBWVjJ4a05HTXhXbk5YYkZaWFlrWmFjRlZzYUVOT1ZscFZVMnBDVjAxV2NGZFVWbHB2Vm0xS2RWRnRSbGRoTVZwb1dUSjRWMk5XU25KUFZtaFhZbXRLU1ZkVVFtdGlNa1pHVFZoV1ZsZElRbGhXYTFVeFRURldWVkpzV214U2JIQXhWbGQ0VTFkR1NYcGhSemxYVmpOb2RsVlVSbFpsUmxaelYyeGthVlpXY0hsV2JURTBWakExUjFkdVVtcGxiRnBYV1d4V2QxTldVWGhWYXpsWVlsVldORll5ZUc5WGJGcEdVbXBPWVZaWFVsQlZNR1JIVWpGa2RHRkhhRTVoYlhONVZtcEtORmxXYkZkWFdHaFZZVEpTYjFSVVRrTmhSbFowWlVWMFZVMVdXbmhXUnpBMVZUSktSMk5HYUZkTmFrVjNXVlZWZUZack5WbGpSbHBwVWpKb2VWWnNVa3RUTVZwWFYyNU9WMkpIVW5CVmJYaFhUa1phVjFWclpGcFdhelZKVmxkMFlWVkdXWGxsUnpsaFZqTlNhRlV3V210amJGcHpXa2QwVGxac2NEVldSbHBYV1Zaa1NGTnVUbGhpUjFKV1ZtMTRkMkZHV2xaWGJHUllVakZhU2xZeU1UQlViVVY2VVd0b1YySkhVVEJWZWtaYVpVWk9XV0pIYUZOaGVsWlpWbGN4TkZNeFNrZFdhbHBVWWtVMWNWUlhkRmRPYkdSeVYyczVXRkpyYkRSVk1uaGhWakZLYzFkdVNsVmhNWEJNVm1wR1lXTXhjRWhTYkU1T1RWVndWMVl4WkRCV01WbDNUVWhvVjJKc1NrOVZhMVpoVjBaV2RHVklaRmROVmtwNlZtMXpOVmRzV25KaVJGcFhWbTFvTTFkV1dtRmpNVnB4Vld4a1RsSXhTa2xXVkVKclVqRkplR05GV2s5V1ZGWndWbXBLYW1WV1duUmpSV1JXVFZVeE5WVnROVk5XYkdSSVlVWmFWMDFIVWxSWk1GcFhZekZrY21SR1drNVdia0kwVmxSS05GUXhXa1pOVm1SWVlrWndWMVpxVGxOamJHeFhXa1YwVTJGNlZsaFhhMXByVlRBd2VGTnNSbGhXYlZFd1ZYcEtVMVl4U25WV2JVWlRZa2hDV1ZkWGVGWmtNbFpIV2taa1YySlZXbTlVVmxaM1pWWlNjMWRzWkZoU01IQkpXVlZvUTFadFJuSmpTRnBYWVRGd2NsWXdaRTlTYkZKMFpFVTFWMVl6WkRaV2ExSkhXVlpzV0ZKclpGUmlhM0JRVm0weGIxbFdiRlZTYlVaT1RWZDBNMVl5ZUdGaVJsbDNUbFZrWVZKWFVuWldSekZHWlVkT1JtTkdaR2hOYkVsNlZtMXdSMk14V1hoVWJHeG9VbXhLYjFwWGRHRlhWbHAwWkVaa2EySldSalJaYTJoVFlrWk9TRlZzYkZkaVZFVjNWRzE0YTJOc1pITlViRlpwVWxkM01sZFdWbGRaVmxsNFYyNU9hbE5GY0dGV2ExWmhWVVpzTmxKcmRGaFdia0pJVmtjeGMxWXhTbk5qUm1SWFlsUkZNRlp0YzNoV01VcFpZVWRHVkZKV2NGUlhWekY2VFZaYVIxWnVVbXRTTUZwWlZtMHhVMlZXWkhKWmVsWlhUVVJHUmxWdGVITlpWbHBZWVVab1YySlVSbGhaTW5oUFl6RkdjMXBHWkZOV2JUazJWakZvZDFJeGJGZGFSbVJxVWxkU2FGVnFTalJXUmxweVYyMUdXR0pHYkRSV01uaFBWVEF4V0dWR2FGZE5ibEp5VmpCYWExTldSblZSYkZwb1lYcFdWVlp0Y0VkVk1WbDRWMjVXWVZKdGFGUlphMXAyWkRGa2MxWnRkRk5OVm5CNVZGWmFhMkZzVGtobFJscGFZVEZ3TTFsVldscGtNV1J5WkVaT2FWSllRalJXYkdRMFdWZEdWMXBGYUdoU2VteFlWbTV3UTA1R1ZuRlNhM0JzVW10d01WWkhlRmRoVmtwWlVXeENXRll6VWxoYVJFcFhWakZrYzFac1RtbFNNVXBZVjFkNFlWSXdNSGhWV0doWVlsaFNWMWxzVm5kVFJsVjVaVVU1VjAxcmNERlZWM2h2VmpKR2NsZHNhRnBsYTFwWVdrWmFVMk14Y0VkYVIyeFVVbFZyZUZadE1UQmhiVlpJVlZoc1UySnJOVlZaYTJSdll6RldjMkZGVGxwV2JrSlpXa1ZXWVdKR1NuTlhibXhZWVRGYWNsWnFTa3RTYlU1RlVXeFdhVkp1UWxWV2JYQkhXVlphVjFkdVNsWmlSMUpQV1cxMFMxSldaRmxqUldSVVRWVnNORlV5TlU5aFJrbDNWMnhTVjAxR1dreFdhMXBoVWpGYWMxcEdjRmROVlhCWlZtMTRiMkl4V1hsU2FscHBVbXMxWVZsVVNrNU5WbEpWVW01T2FtSkdjSHBXUjNoaFlWWmFXVkZxVmxkV1JXdzBXV3BHYTJNeFpIVlViR2hvVFcxb2IxWlhjRTlpTVZaSFYyNUdVMkp0VWxSVVZtaERVMVp3Umxkck9WVmlSWEJJVmpKME5GWXlTbGxoU0VwaFVrVmFZVnBWV2xkamJIQkhWR3hvVTAxdGFGZFdNV1EwVlRGSmVGcEZaRmhpYXpWWldXdGFkMVF4V25SbFNHUnNWbXhzTlZSV1ZtdFdhekZGVW01c1ZWWnNTbGhXYkdSTFUwWldjbUZHWkdoaE0wSlpWMVJLTkdFeVVsZGFTRTVvVW0xU2NGVXdWa3RPVmxweVYyeE9WRTFWTVRWV1JtaHpWVEpGZVZWc1pGcGlSMUoyVmtSR1UxWnNXblZhUmxaVFlraENWMVpXWTNkT1ZscFdUVlprVTJGc1NsZFphMlJ2Wld4c1YxZHJkRmRpVlRWSldWVmFWMVl4V1hoU1dHUlhWak5vYUZacVJscGxSMDVHWVVkMFUySkZjSGRXVjNoaFYyMVdjMWRzYUU1VFIxSlBWbTE0ZDFOR1dYbGxSMFpWVFZad1YxUnNXbk5YYkZsNlZXdDRZVll6YUZoWk1uaHJZMnh3UjJGR1RtbGhNSEJKVmpGU1ExbFdUWGhWYms1VVlrZFNjVlZyVm1GWFJscHlWbTFHV0ZKc2NFWlZiWFJyWVdzeGNtSkVXbGhoTWxJelZsUkdXbVZ0UmtsWGJHUlhUVEZLYjFaWWNFZFViVlpIVjI1V1ZHSkdjRzlVVlZKWFpERmtXR1JIZEU1U1ZGWllWbGQ0YTFZeVNsbFZiVGxWVm14d00xUldXbGRYUjFKSFdrWm9VMDFHY0RWV1IzaFhWVEZaZUZkc2FGWmlSa3BXV1d4b2IxTkdhM2xOVm1SVFRWWmFlbGRyV210V01VcHpZMFZhVjJKWVFreGFSRVpHWlZaU1dXRkdVbWhOYkVwVlYxZDBhMkl5UmtkV2JrNW9VbFUxVjFSV1drdFdNVnAwVFZWa2FFMVdjSHBXYlhCVFZqSktXVlJVUmxkV2VrWk1WVEJWTlZaV1VuTmpSMmhPVm01Q1ZsWnRlR3RPUm1SMFZteGtWMkpyY0hKVmJYaDNWMFpXYzFadVpGUldiVkpaVkZaU1UxWlZNVmRqU0hCWFZucFdURlpzWkV0WFZrWnpWV3h3YVZkR1NrMVdSbEpIV1ZaWmVGcElVbXBTVkd4WVZGVmFkMWRXV25GU2JUbG9UVmRTU1ZVeU5WTldiVXBXVjIxR1YyRXhXa2RhVlZwM1VqRmtkVlJzWkZkaE0wRjNWa2Q0YTA1R1ZYbFNXR2hxVWtad1dGWnRNVkpOUm1SWFYyeE9hazFYVWpGVk1qRjNWa1pLVm1OR2FGZFNiVTE0VlZSR1UxSXhaSFZTYkZKcFVsUldWVlpHWkRCa01VNUhZa1phWVZORk5WaFZiWFIzVm14YWRHTXphRmROVlhCNldUQmFVMVpzV2taalJtaGFaV3RhVkZsNlJtdGpNVnAwWVVVMVRsWllRbUZXYlhoclpERkZlR0pHWkZWaVIxSndWVEJXZDJJeFZuUk5WazVYVm0xNGVWWnROV3RXTWtwSFYycENWVlpXU2xoV01HUkxVakpPUlZGc1pGZGlSWEJGVm1wSmVGSnRWbGRXYms1U1lraENUMVZ0TlVOVFZtUlpZMFZrV2xZeFNraFZNalZQWVVaS2NrNVdhRlppV0ZKNlZHMTRZV014Vm5KYVJtUk9WbXR2ZDFac1dtOWlNa1pXVFVoc1ZtSnJTbGRVVlZwaFZFWmFWVkpzY0d0TlYxSXdWVzE0VTFSc1duTmpSbVJYVm5wRmQxcEVSbE5qTVU1MVZteEthVkl4U2xsV1YzQlBVVEZXUjFwR1pGZFhSMmhWVldwR1lWTnNhM2RYYlhSV1RXeGFlVlZzYUc5WFJscHpWMjFvV0Zac1ZYaFpla1poWkZaV2NrOVdaR2xUUlVveVZqRmFVMVF4UlhoVWJHUmhVMFZ3V1Zsc2FGTldNVkpYVmxSR1ZGSnNiRFZVYkZwclZqQXhjbU5HWkZkTmFsWlFWbXBLUzFOR1ZsVlJiRlpYVWxad1dWWkhNVFJUTWs1eVQxWmtWR0Y2VmxSVmJYUnpUbXhhZEdWSGRFOVNhekUxVlcxNFlWUnNaRWRUYkdSYVZrVTFWRlpxUm1GamJGcHlaRVpTVTJKWVozZFhiRlpXVGxaWmVWTnJaRlJpYlhoWFZGZHdSMU5HV2tobFJYQnNZbFZhUjFZeWVHdFdNa3BKVVc1c1dGWnNTa2hXUkVwT1pVWk9jMkpIUmxOaGVsWjNWbTEwWVZsV1duTlhibEpzVW14d1QxWnRkRmRPUm1SeVlVVmtWbUpWY0hsVWJGcFRWbTFLV1ZWdGFGZE5WbkJ5V1RKNFlXUldjRWRYYldoc1lURndTVlp0Y0VwTlZsbDRWMjVLVGxadFVsbFphMVpMVmpGYWNsWnVaRlZTYkZwNFZUSjBZV0pIU2xaalJXeGFWbFp3VkZaVVNrdGpiRTV5VFZaa2FWSnVRbFZXVmxKTFZESk9jazVXV21GU01GcFVXV3hrYjJReFpITmFSRUphVm0xU1NGWnROVk5VTVZwV1RsWnNWMkpZYUV4YVYzaHJZMnhXY2xSc1pGTk5TRUpJVjFkMFUxUXhXWGxUYkZaU1YwZG9XRlJYTlU5T1JtdDRWMnQwYWsxcldrbFZiWGhQVlRGa1JsTnJNVmROYm1oeVZHdGFVbVZXVW5OYVJrNXBZVE5DZUZaWE1UUlRNVnBIWWtaV1ZGWkdXbEJXYlhoM1ZteFdkR1ZIZEZoaVJtdzBWakp3UTFadFNsbGhSMmhhVm14d1RGWnFSazlqTVVaelYyMW9hRTB3U2xaV2JYUlhXVlpaZVZWcmFGVmhNbmhXV1d0YWQyTkdWblJPVlU1VFRWWndXVlJXYUhkVU1WcHpZa1JTVjAxcVZsUldiWGhoVW14a2MySkdjRmRTV0VKVVZrWldZV014V1hoYVNFNXFVak5TVDFacVJrcGxSbGw1WkVkR2EwMXJXa2RVVmxaWFZqSktkR1ZHYUZWV2VsWlVWakJhYzA1c1NuSmtSazVvWld4YVdGZFdWbXRTTVZWNFdrVmFWR0p0VWxoV2FrNVRWMFpXTmxOc1RsZE5WMUo1VmpKNGIyRkhWblJsUmxKWVZqTm9XRlpxUVRGV01XUjFWVzEwVkZKVVZtaFdiWEJIV1ZVeFIySkdXbGRXUlZwWVZtMTRjMDVzV2xoT1dFNVlZWHBHTVZsVldrTldNREZJVld4Q1ZrMVhVbEJWYWtaaFpFZEdSazVXVGxOaVIzY3lWbTB4TkZsV2JGaFNXR3hUVjBkb1ZsbHRjekZXUmxsM1drWk9WMUp0ZUhwV1YzaHJWakZhYzJOSWNGZGlSa3BJVmxkemVGZEdWblZoUmxwWFpXeGFVVlpzVWtkVE1rNXpXa2hPYVZKdGFHOVVWbHAyWld4YWMxcEljR3hTYTNCNlYydG9WMVl5U2tkalJUbFhZbGhvTTFaV1dtRldNWEJGVlcxMGFWWnJXVEZXVkVvd1dWWmFkRk5yV21wU2JXaFdWbXBPYjFSR1VsWlhiVVpxVFZaYWVWWkhlRk5VYlVZMlVsUkNXRll6VW5aVmVrcEhVakZPYzFadGJGUlNWWEJZVjFkMGExVnJNVWRXV0d4c1UwVTFVRmxyVm1GV2JGWjBaVVU1VmsxRVJraFpNRnB2VmpGYU5sRnFUbFZXYkhCb1ZXcEdhMk14WkhKUFZtUlhWa1phWVZZeFdtdE5SazE1Vm01T1YySnJjRmxaVkVwVFYxWldkRTVWVGxOTlYzUXpWakowTUZaWFNrWmpSbWhhVFVaS1NGWnFSbUZTYkdSellVWmtVMUpXY0VsWFdIQkxVMjFXYzJORmFHbFNhelZZV1ZST1ExWldXblJOV0dSVVRWWldORlpHYUc5V01rcEhWMnhPV2xaRmNGUlpNRnB6WTJ4YVZWSnNaRTVXYmtKS1YydFdWMDFHWkhOWGJGWlRZVEo0YUZac1dtRmxiRnB4VTJ0MFYxWnJjSGhXUjNoM1ZqRmFkVkZyTVZkU2VrSTBWV3BHVDFKck5WZGFSbHBwVWpGS1VGWkdXbGRrTWxKelYxaG9XR0pIVW05VVZsWnpUa1prY2xadE9WZE5hMVkxV1ZWb1QxWnRSbkpUYldoWFZrVmFWRlp0ZUdGa1ZsSnlUbFUxVjAxVmNHRldhMlEwWWpGUmVGWnVTazVYUlRWWldXMDFRMWxXVWxaWGJtUnJZa1p3UmxWdGVIZGlSMHBIVjI1c1lWSldjR2hXUjNoTFpGWkdjazFXYUdoTmJFVjNWMVpTUzFSdFZrZFdibFpVWWtaYWNGWnFUbTlXVmxwSFZtMDVVazFYVW5wV01uaHZWR3hLUmxkc1RsVldNMUpvVmpCYVYyUkhUa2hTYkdScFZsaENOVlpVU2pSWlZscFhWMnRhYWxKclNsWldhMVpoVjBaU2RHVkZaR3RXYkVwNlZrZDRUMkZGTVZsUmJVWlhZV3R2ZDFacVNsSmxSbHAxVTJzMVYxWnVRbHBYVnpFMFdWWlplRlZzWkZoaVZWcFhWVzE0WVZkV2NGWmhSMFpvVFVSR2VWa3dWbXRXTVZsNllVVjRWMkZyUmpSWmVrWlBZMjFXUjFwR1pHbFNXRUpHVm14a2QxTXhUWGxVV0doV1ltczFXVmxyV21GaU1WSldZVVZPYVUxV2NFaFdiVEV3VkRGS2NtTkdhRmRpV0doMldWZDRUMUpyTlZkVmJHUnBWMGRvYjFacVJtRlZiVlpIWWtSYVUySkhVbFJaYTJoRFYwWmFTR1ZHWkZWTlYxSkpWVzAxUzFaSFNuVlJiR1JhVmtWYU0xVXdXbHBrTVdSMVdrWk9hVlpVVmtsV1ZFcDZUVlpWZUZkdVZsSlhSMmhZV1d0YVMxTkdXbkZTYkVwc1VtdHdNVlpITVhOVWF6RnpVMjVrVjFZemFHaFZla1pXWlVaa2RWSnNVbWxTVkZaNVZsY3hOR1F4V25OV2JHaHJVa1ZLYjFsWWNFZFhWbkJXWVVoT1dHSkdjRmhXYkZKSFYyeGFjMk5GZUZkTlIxSllWVzB4VDFJeVRraGxSMmhPVW14cmQxWnRlR3ROUjBWNFUxaG9XR0pyTlZWWmJYaExWVVphZEdWRmRGaFNiSEI2VmxkNGExVXhTbk5pUkZaYVRVWmFVRmxYYzNoV2JVNUdZVVphYVZkSGFESldNVnBoVXpGa1YxSnVUbFZpUmxwWVZtMTRkMkl4WkhKWGJVWlhZbFphU0ZZeU5VdFZSbHB5WTBoQ1ZtSnVRbmxhVjNoclYwZFNSMXBHV2s1V2JIQTJWbXBHYjJNeFduUlNXSEJXWWtkU1dGbFVSbUZVUmxWM1YyNU9hMUl4V2tsYVJXUjNWR3hrUmxOcmFGZFNSVnB5V1hwR1UyUkdTbGxpUmtKVVVqSm9XVlp0TVRSa01rNXpZa1JhVTJKVlduRlVWbFV4VjJ4cmQxcEhPVmRTYTNCV1ZtMTRkMVl5U2xWUmFsSmFZV3RhV0ZWcVNrdFRWazV6V2tkc2FHVnNXbGRXYlRCNFRVWnNWazFXWkdsVFJYQm9WVEJWTVZac2JGbGpSV1JZWWtaYVdWa3dWVFZXTURGRlVtcEdWMVo2Vmt4V2FrcExWMWRHUlZOdFJsZFdNVXBOVmxkd1MxSXhTbkpQVm1SVllYcFdjRlZzYUVOTmJGcDBUVWhrVGxZeFJqUlZNV2h6Vmtaa1NHRklRbFppVkVaVVdWVmFWMk5zV2xWU2JXaFRZa1Z3V1ZZeWRGTlZNV1JIVjI1T2FsSnRlRlpXYlhoTFVrWnNWbHBGZEZkaVZUVklXVlZhYTFSdFNuSlRiVGxYWVd0d05scEVTbGRYUmxKWlkwZEdVMkpyU2xsWFYzUmhWbTFXUjFkclpGWmhNSEJ6VlcxMGQwMUdXbGhrUjBab1lrVndlVmt3VlRWV2JVcEhZMFJPVlZac2NHaFdiRnBMWXpGd1IxWnJOVmRXYmtFeVZqRmtkMVF5UlhsU2JHUlVZa2RTVlZsclZURlhSbXhZWkVoa1YxSnNXVEpWYlhoclZqRmFjbGR1YkZoaE1sSjZXVlphUzFaV1duTmhSbVJvVFd4R00xWlljRWRqTVZweVRWWmFhRkl6YUZSV01GWkxWakZhZEdWSFJsZGlWbHBJVm0wMVMxbFdTbGhWYkdoYVlURmFNMVJWV2xOak1XUnpWR3hrVGxadVFsZFdiVEV3VlRGWmQwMVlWbEpoTVVwaFdsZDBZVlJHVm5GU2EzUnFUV3RhU1ZWdGVFOVhSa3BXWTBaV1YyRXhjRmhXYWtaelYwWldjMXBHWkZoU01taFpWMWQ0VTFZeVRuTlZiR1JhWld4YVVGVnRNVEJOTVZsNVRVUldhRlpyY0hsVWJGWjNWbXhhTmxKdVdsZGhhMXBvVlcxNFQyTnRVa2RXYkdSVFZtNUNUbFpzWkhkU01VMTVWV3hrWVZOR1NsUlpXSEJYVmtaU1ZWTnRPVk5OVm5CNlZqSXhSMkZGTVhKV2FsSlhVbnBXVUZaVVJtdFRSbFp6Vld4d2FWSnJjRmxXYlhoaFdWZE5lRnBJU2xoaGVsWlVXVmh3VW1WV1dsZGFSRkpWVFZad01GVXllR0ZoVmtwSFYyeHNXbFpGV21oVVZFWmhWMGROZW1GR1RtbFNNVWw0Vm0weE5GbFdVbk5YYms1cVVtdGFXRlp0TVZKTlJuQklUVlpLYkZack5YbFdNbmhoWVZaS1dWRnNiRmRTYlZFd1ZYcEdVMUl4WkhOYVJscG9UVVJXVlZaR1pEQmtNbFp6VjJ0b2JGSXdXbGhXYWtKWFRURnJkMXBIT1ZkV2JIQjZWakowTkZack1WZGpTRXBhVFZad1ZGcEdXbE5qTVdSeldrVTFVMkpZVVRGV2JYaHFaREpSZDA1V1pHRlRSVFZaV1cxNFMxWXhXWGRoUlU1WVZtMTRXVnBGWkVkaFJrcHpWbXBPVjAxcVJraFpWRVphWkRBMVZtSkhSbE5XYmtKTlZtdGtORk14V1hoWGJrWlhZa2RTY0ZWdGVIZFhWbHB5V2tod1RsWnRVa2hXUjNoeldWWktWVlpzYkZaaVJuQXpWbFphWVZkSFZrZFViR1JPVmxoQ1dWZFhkR0ZoTVZsNVVsaHNWbUpyU21GWlZFWldaVVphY1ZKdFJsUlNNVXBIV2tWYWQxWXhXa1pYYTNCWVlrWmFXRlpxUm1Gak1XUjFWV3hhYVdFelFsaFdSbU14WWpGSmVHTkZWbE5oTTFKeVZXeFNWMWRHV2xobFIzUlhUVlp3U0ZZeWRGZFdNa1p5WTBST1ZsWkZjRTlhVlZwUFkyeHdSMVJ0YkZOaVNFSXlWbXhrZDFFeGJGaFVhMlJZWW10d2FGVnJWVEZVTVZwMFRWWk9XRlp1UWxkV2JGSlhWbTFHTmxKdWNGWk5ibEoyVmpKemVGSXlUa2xqUm1ScFZrVmFUVlp0ZUd0VE1VNVhVbTVPVjJKSFVrOVVWekZ2VTFaYWNscEVVbHBXYkVZMFYydFdZVlF4V25OalJscGFZa2RvVkZrd1dtRmpNVlp5VjJzMWFWSnVRalpXYWtsNFRVZEdjazFXWkZoaVIyaGhWRlZhUzJGR1dsaE5WVnBzWWxWYVNGWnRlR3RoVmtwelZtcFNWMVpzU2toWlZFcFBWakZLZFZac1ZtbFNWRlpWVjFaU1IyUXhaSE5YV0d4clVtMVNjbFJXV21GbFZsSlhWbTFHV0ZJd2NIcFdNbmhyVmxaYWMyTkhhRmRXVm5CWVZqQmtWMU5XWkhSa1JUVm9UVEJLU1ZadGVHdE9SazE0VjFoa1RsZEZOVlZaVkU1dlYwWmFkR1ZGZEZOU2JGcDRWVEowTUdGck1WZFRibkJYVFc1b1dGbFZWWGhUVmtaelUyeGtWMDB3U2tWV01WcGhZVEZaZUZadVZsVmlWMmhVVkZSR1MyUnNXa2RYYlhSV1RWVTFTRlp0TlZOVWJFcEdWMjFHVjJKWVVqTldNVnB6Vm0xR1NWcEdjRmRoTTBKSVZtcEtkMVF4V1hsVGEyUlhZV3hLVjFSVlpGTlVSbFYzV2taT1UwMVdTbmxVYkZwcllWWmtSMUpxV2xkaVdFSk1WRlZhV21WR1ZsbGhSbFpwWVhwV2QxWkdVa3RPUmxwWFlraFNiRkpZVWxoVmJURTBUVVp3VmxacVFtaFNhM0I2V1RCb2MxWXhXWHBWYkVKYVZqTm9URnBGV2xka1YwNUhZVVprVTFaR1dYbFdNVnBYV1ZaT2RGVllhR0ZUUlRWd1ZXcENZVlpHVm5OaFJVNVBZa1p3VmxVeWNGTldWVEZXWTBod1YxSjZWbGhaVjNoTFpFZEdSMkZHY0dsU2JrSk5WbXhhWVdFeFpFaFZhMmhyVW1zMVQxWnNVbGRUUmxwRlVtMUdhazFXY0ZsVk1uaGhWMGRLUjFOc1dsZGlXR2d6VkZkNFUxWXhaSFJTYkdScFVqRktOVlpFUm1GVk1WSnpWMnhzVWxkSFVsaFdhMVp5WlVaYWNWSnRSbXRTYXpWNldXdGtiMVpHU2xkalIyaFhZbFJGTUZkV1dsTlNNa3BGVjJ4T2FXRjZWbmhXUmxwdlVURkplRnBJU21GVFIxSlhWRlZTUjFOc1ZsaGtSMFpYVFZad1IxWXlOVXRYYkZwR1kwVm9ZVkpXY0ZCWmVrWjNVakpHU0dGSGJGTlhSVW95Vm0xNGFtUXlWa2RXV0d4WFltczFjVlZ0TVZOWFZteDBUVlpPV0Zac1dqQmFWV1JIVmpGYWRWRnJaRmRpV0doeVZtcEtTMUl5U2paVGJIQm9UVzFvV1ZadE1YcGxSbGw0V2toT1VtSkdjRmhVVkVwdVpWWmtjbFZyZEZSTlZYQjZWbTAxVDFaSFNraFZhemxhWVRGYU0xWkdXbUZqTVdSelZHeEtUbFpYZHpGV1ZFa3hWREZhV0ZOclpHcFNiSEJoVm10V1MwMHhiRlpYYkU1WFlraENSbFpYZUU5V01rcEhZMFpzVjAxdVVuSlVWVnBoVTBaT2NsZHNaR2hoZWxaWVYxZDRVMUZ0VmtkWGJrcFlZbFZhV0ZSV1ZURldiRlpZWlVoa1ZXSkZiRFJWTW5ONFYwZEZlR05IYUZaaGEzQlFWbXBHVDJSV1ZuUmtSazVvVFRCS1VWWnNaRFJoTURCNVZtNU9XRmRIZUhOVmFrSmhZMFpTVjFac1pFOVdiRlkxV2tWa01GWnRTbFpqUldoV1RXNW9XRll5TVV0V1ZscHlWV3h3VG1KdGFHOVhWRVpoVWpKU1YyTkZXazlXYXpWd1ZqQmtiMWRzV1hoWGJHUmFWbXN4TlZWdGRHdFhSMHBJWVVoT1ZtSkhhRVJXTUZwVFYwZE9SbHBIZEdsU00yaFpWbXBLZWs1V1ZYZE5WbWhXWVd0YVdGVnFUbTloUmxwVlUydGtUMkpHY0hsVVZscHJZVlprUjFOdE9WaGhNVXBJV1ZSR1MyTnJOVmRhUjJoVFRURktWVlpxUWxkVE1WcHpWMnhvVGxaRlNuSlVWM2hoWld4a2NsZHVUbWhpUlhCV1dXdGFhMWR0UlhsVVZFWlZWa1ZhZVZwRVNrZFNNWEJIV2taT1RsTkZTbUZXTVZwWFlqRkplRmRZWkU1V1YxSnhWV3BLYjFac1duRlViVGxXVFZoQ1dWUldWakJWTWtwV1RsVmtZVlpXVlhoV1ZFcEdaV3hHYzFac1pFNVdNVWw2Vmxod1MxSnRWa2RWYmxaVllrVTFXVlZxUmt0V1ZtUllaVVpPVjAxV2NGaFdNalZQVmpGYVJsZHNUbFZXYlZKVVdsVmFWMWRGTlZaUFZscE9WbGhDTlZacVNqUmpNV1JJVWxob1dHRnJOVmhXYWs1UFRrWldkR1ZIZEd0V2JIQjZWakp6TVZZeVNrbFJiRXBYWWtad2NsUnJaRk5rUmxweVdrWk9hV0V6UWxoWFYzUlhVekZrUjJOR2FHdFNNRnB5VkZaYWQxTkdXbGhrUlRsb1RVUkdSbFZ0ZEc5V01rcFpWVzVhVjAxdVRqTmFWbHBYWXpGYWMxWnNaRmROVlZZelZteGtORmxXV1hoWFdHaHFVbGRvY2xWdGVFdGpSbFp6VjJ4d2JHSkdjRmxVVldoclZHeGFjMk5GYUZkTmJtaG9Wa1JHWVZack5WZFhiRlpYVm01QmVsWldVa2RrTVdSSVZtdGFZVkl6VWxSV2EyUTBWMnhrVlZGdFJsUk5WbXcwVlRKNFlXRnNTbFZXYkdoWFlURmFhRll3V21GU1ZrcHlXa2R3VG1FeWR6SldNblJyWXpGVmVGZHVTbXBTYkVwWVdXeG9RMVJHV2xWU2F6VnNVbXh3ZWxadGVFdGhSVEZ6VTI1a1dGWXpVbGRVVmxwYVpVWmtjbUZIZEZOWFJrcG9WbTE0VTFJeVZuTmhNMlJZWVhwc1dGWnRlSGRYUmxsNFlVZDBWMkY2UmpGWlZWWnJXVlpLUmxkcmVHRlNWbFY0Vm1wR1YyTXhjRWRhUm1SVFlraENSMVp0TVhkVE1sRjRVbGhzVlZkSGFGVlpWRXBUVmtac2RHUkhSbXBTYkZwNlZqSXhSMVl3TVZkalJFWmFUVWRvVUZsVVJtRmpNVnB4Vld4a2FWZEZNSGhXYkdONFV6Rk9SazlXVmxWaVNFSnZWRlphZDFaV1duTmFSRkpZWWxaYVdGWnROVXRoTVVwelkwYzVWVlpzV2pOVVZscHJWbFpPY1ZWc1VrNVdWM2N3VmxSSk1WWXhaRWhUYTJSWVlsUnNWbFpzV2t0WFJsSlZVbTFHVjAxWFVqQmFSV1J2Vkd4YVZWWnFXbGRXTTJoMldWUkdWbVZXVG5OV2JHUnBVbXh3V1ZkWGRHRldiVlpIVm14V1UySllVbkZXYlhSM1pWWmFTR1ZGT1ZkTlZuQkpXbFZrUjFZd01YVlZia3BhWVd0YWFGVnFSazlqTVdSellVZHNhVkp1UW1GV2JUQjRUa2RSZVZSdVRsaFhSM2h6VlRCYWQyTnNVbGhsUlhSVFRWWndXVnBWVlRWaFJscDBWV3RzV2xaWGFISldha3BIWTJ4T2MyRkdXazVoYTFwVVYyeFdhMVF4U1hoalJXUlhZbGQ0V0ZWdGVIZE5iRnB5VjIxR2FVMVZWalJYYTJoUFZqRmtTR1ZHUWxkTlJsVjRXV3BHWVdNeFZuSlVhelZPVmpOUmVsWnRlRk5XTVdSSFUxaGthbEpYZUdGV2JGcDNVa1prVjFkc2NHeGlWVnBLV1RCYWExUnNTblZSV0hCWFZrVktjbFpxUmt0a1JscHlXa1pvYUdWc1duZFhWM1JYWkcxV1IxZHVSbFJoYkVwd1ZGZHplRTVHVm5ST1ZYUm9UVVJDTlZsVldrOVhiVXBIVTJ4b1YxSkZXbGhaZWtwSFVqRlNjMVZyTlZkaVNFSllWbXhhYTAxSFJYbFNiR2hVWVRGd1VGWnRNVk5YUmxaeFZHeE9WVkp0VWxoV2JHaHZWa1pKZUZkclpGZGlXR2hvVm1wS1MxWXhUblZpUm1SWFVsYzRkMVpYTUhoVmJWWkhWRzVXVm1GNmJGaFphMmhEVmxaYWRHTkZkR2xOVlhCSVZqRm9jMkZzU2xsVmJGcGFZa1p3YUZwWGVHRmtSVFZXV2taa1RtRXpRbHBYYkZaaFZURmFWMWR1VG1wU2JWSldWbTE0ZDFZeGNGWlhia3BzWWxWYVNGWnRjekZoVmtwWVQxUk9WMkpHU2t4VVZXUktaVVphY2xwSFJsTldNbWg2VmxjeE1GbFdiRmRYYmxKc1VqQmFWbFZ0ZUV0bGJGbDVUVlJDYUdGNlJscFZWM1J2Vm1zeGRWUlVSbGRTTTJoTFdsY3hSMUpXVm5OYVJrNU9UVlZ3VmxZeFpIZFNNVmw0VjI1S1RsWlhlR2hWYlhoTFkwWnNjbUZGVG1oU2JIQklWbTE0WVZSc1duSmpSV2hhWVRKb1RGWXdaRXRqYlU1SlZHeGthR0V3Y0c5V1ZFbzBWMjFXV0ZWcmJHRlNiSEJ2V2xkMFlWZEdaRlZSYlRsclRWZFNTRll5ZEdGaFJUQjVZVVprWVZZelVqTldhMXAzVW14a2MxUnRkRmRoZWxZMVZrZDRZV0V4VW5KTldGSm9Va1pLV0ZsVVJuZFdSbFpZWXpOb1dGSnJOVnBaVldSSFZrWktWMk5HV2xoV00xSm9Xa1JHVjFJeFZuTlhiVVpUVW10d1ZWZFhkR0ZTTURCNFYydG9hbEpWTlZoWmExcDNaVlpaZUZWcmRGaGlWVlkwVlRKNFExWXlTbGxoUlhSaFZteHdWRmt4V2xOak1XUjBaVWRvVGxORlJYbFdiWGhyVFVac1YxTllhR0ZTVjFKeFZXeGFkMk5XVm5Sa1NHUlZUVlphZWxZeU5XdFViRnB6WTBaYVZtSllhSEpXYkZWNFZteGtkV0pHVms1V2JIQjVWbXhrTkdFeFRsZFNiazVWWWtoQ2NGVnRkSGRPYkdSVlVtMUdWMDFXY0ZoVmJUVkxZV3hLVldKR2FGcFhTRUpZVmpCYVlXTXhaSE5VYkZwT1ZtdHdTRlpHV2xkaE1WcElVMnRhVDFZd1dtRldhazVUVWpGd1ZsZHNaR3BpU0VKSFYydGFhMkZXU2xsUldHUlhVak5vYUZaVVJscGxSbVJ6Vm14a2FFMVZjRmxXUm1NeFVURktSMkpFV2xOaE0xSlVWRlpXZDJWc2JGWmFSV1JXVFd0V05Ga3dXbGRXTVVwMFZHcFNXbUpZVGpSV2FrWnJZekZrZEZKc1RrNU5SWEExVm10YVlWWnRWa1pOU0doWVlrZG9jMVZzYUZOaU1WcHpWV3RrVGxKc2NGbGFSVkpEVmpKS1IyTkZaRlpOYmxKMlZqSXhTMWRYUmtkUmJHUnBWMGRvVlZkVVNqUlVNbEpIVTI1S1QxWnJOVTlVVnpGdlUxWmFjVk5xVWxkTmExWXpWRlpXYjFVeVJYbFZiV2hXWWtkU1ZGa3dXbGRrVjA1SFdrWm9WMkpJUWpWV2JUQXhXVlpTYzFOdVVteFNiVkpaV1ZSR1ZtVkdiSEphUlhSVFRWVTFlbFl5ZUhkaFJURlhZak53V0Zac2NISlZla1pLWlZaT1dXTkhjRk5pVjJoWlZrWlNSMU15VmtkWGEyaHNVak5TVkZSV1ZuTk9WbHBJWkVkR1YySlZXVEpXYlhodlZsWmFSbE5yZUdGU1JWcG9Xa1ZrVDFKc2NFZFVhelZUVWxad1NsWnFTakJaVmxsNFYydGtXR0V5VWxsWmJYUjNWMFpzV0dSSFJsVlNiRlkwVmpKNGEyRXhTbFZXYkdSWFVucEdkbFpxUVhoVFZrWnpZa1prYUdFelFYcFdiWEJIV1ZaSmVGcEdiR2xTYTBwVlZXcEdTMWRXV2xoalJUbFdUVlphU0ZsVVRtdFhSMFY1Vld4c1ZtSlVWa1JWYWtaeVpERmtjbVJHVm1sU1dFSlpWMVJDVTFJeFdYaFhhMXBZWWtkb1dGVnJWbUZUUm13MlUydHdiR0pJUWtsWmExcFBWakpGZWxGc1ZsZGlWRVl6VlhwR1ZtVkdVbGxoUm1ScFlUTkNkbFpYTlhkak1rNVhZa2hLWVZKR1NsbFZiVEUwVmpGWmVVNVhkRmhpUm5CV1ZXMTRjMWxXU2xkVGJHaFlWbXh3YUZZd1dsZGtWbVJ6WTBaa1RrMUVValpXTW5SVFVXMVdSMU5zWkZoaWF6VlhXV3RrVTJNeGJISlhibVJZWWtac05WcEZXazlXUlRGV1RWUlNWMUl6VW1oV1ZWcGhaRWRHU0U5V1dtaGhNSEJ2Vm14U1IyUXhaRWhWYTJoVFlYcFdWRmxzV2t0WGJHUlZVV3hhVDFac2NFZFVWbWhQVmtkRmVWVnRSbHBXUlhCMlZUQmFZVkpXU25Ka1JtUlhZa2hDTlZadE1UUmtNVmw1VTJ0a2FsSlhlRmxXYm5CR1RVWmFSVkp0Um1wTlZsb3hWVEo0VTJGV1dsZGpSa0pYVmpOQ1VGbHFSa3RqTVdSeldrWm9hVmRHU25aV1JscFdUVmRXYzFadVRtaFNNMUpYVkZkMGQxWnNXblJsUm1SWFRXdHdTRlpzYUc5V2JGcEdWMjVLV2sxV2NFaGFSbHBUWXpGU2MxUnRhRTVYUlVwWlZtcEdZVll5UlhsVFdHaFhWMGRvVlZsclpHOWpiRlYzV2tSU1dGSnRlSHBaVldNMVlUSktSMWRzV2xaTmJrMTRXV3RhWVdOck5WZGpSbkJvVFZoQ1VWZFdXbUZoTVVsNFZHNU9WR0pIYUZoWmJGVjRUa1prVjFWclNteFNNREUxVlRKMGExZEhTa2RqUnpsVlZrVktURlpIZUdGU01WcDBVbXhTVGxac1dUQlhWM1J2VWpGYVNGTnNiRlppUmxwaFdWUkdZVmRHVWxWU2JHUnJVbFJHUmxWdGVHdFZNa3BKVVd4b1YxSXphRmhXUkVaclUwWktkVk5zVW1saWEwcFlWMVpTUjJReFRrZFhXR1JZWW0xU1ZGbHNWVEZUUmxWNVkzcEdWazFXY0RGVlZtaHZWakpLUjFOcmFGZGhhMXBUV2xWYVMyUldVblJpUlRWT1lsZG9WVll4V2xOVE1rbDRXa1prYVZOR1NuTlZNR1JUWTFaYWRFMVVVbXhpUm5CWldrVlZOV0ZHV1hkalJXeGhWbGRvTTFZd1pFWmxSMDVKVTJ4a1UwMHlhRXhYYTFKSFlUSk9kRk5yWkZkaGVsWllWRlpXV21Wc1duUmxSMFphVm14d01GWldhSE5XVjBWNFYyeGFXbUV5YUVSWmFrWnpWMWRPUjFwR1dsZGlTRUpKVm0weE5HRXlSbkpOV0VwUFZsZG9WMWxzVWxkV1JteHlWMnR3YkZZeFdrcFZWM2hyWVZaS2NtTkdWbGRTYkVwSVdWUktUbVZHY0VsVmJFSlhZVE5DVUZkV1VrOVJNVTVYVjJ4a1lWSkdTbGRVVmxwM1UxWlZlVTVWT1ZkU01IQjVXVEJhYjFkc1dYcFVXR2hoVW14d00xVnNXa3RrVmxKeldrVTFhRTFZUWtsV2JYUnFaVWRKZUZaWVpFNVdWbHBZVmpCa2IxZEdiSEpYYm1ScllrZFNXRll5TlU5WFJrcHlUbGh3VjJKVVJucFdWRVpMWXpKT1NHRkdhRmROTVVwWVYyeFdWazFXU1hsVGEyUlhZa1UxY0ZsWWNGZFhiRnAwVFZSU1dsWlVSa2haYTFwaFZqSktkRlZ0T1ZaaGEwcG9XbGQ0Vm1WWFZrWlViR1JwVW01Q1NGZFVRbTlrTVZwelYxaHdhRkpGY0doVmExWjNWRVpXZEdWR1pHcE5WVFY2VjJ0Vk1XRldTbGxSYXpWWFlsaG9hRlpVUmtabFJrNVpZa1pTYVdGNlZsZFhWM1JoWkRGYWMySkdWbEppYlZKdlZXMTRTMVl4WkhKVmJFNVdUVlp3ZWxZeWVHOVhSMFY1VlZoa1YyRXlVa3hWYlhoaFkxWlNjMWR0YkZkU1ZWa3dWbTB4TUZsV2JGZFhia3BQVm14d1ZsbHJaRzlpTVd4VlVtNWtVMVpzY0ZaVlZ6RXdWa1V4Vms1V2FGZE5hbFpVV1ZkNFMyTXhUbk5WYkhCb1RXeEdObGRzWkRSWlZscFhVMjVPWVZJeWVFOVdiWGhhWld4YVNHVkhSbWxOVm5CWlZXeG9jMkZHU25SaFJtaGFWa1Z3VTFSVldsZE9iRXAxVkcxd1RsWXhTWGhXTW5SclRVWlNjMWRZY0doU1JscFlWRmMxVTJGR1pGZGFSV1JUVFZkU2VsbFZaRFJWTVZsNllVWmtXRll6VW5KV1ZFcFRZekpLUjFwR2FHbFRSVXA2VmxjeE5HUXhXbk5YYmxKc1VtczFXRlJYZUdGbFZsbDVUVVJXV0ZKc2NFZFZNalZMVm0xV2NsZHNRbFpoYTFweVdYcEtSMU5IU2tkVWJXaE9WMFZLTWxacVNqUmhNREZIVkZob1ZtSkhVbGhXTUdSdlYwWnNXV05JVGxaTlYzaDVWMWh3VjFSck1WaGxTR3hYWWxob1VGWnRNVXRTTWtwRlZteGtWMDB4UmpOV2JURTBXVlpLYzFSdVNtaFNia0p3VmpCa2IxVldXblJOVkZKV1RXczFlbFpITlZOVk1rWTJWbXhTVlZaRmNIWlZha1poWXpGa2RGSnRhRTVoTVZrd1ZtdGpNVlF4VlhoYVJXaFdZa1pLWVZscldrdFhSbHB6VjIxR2FrMVdjRlpWYlhoTFZHeGFjbGRZY0ZkaGEydDRWa1JLUm1WR1pIVlViWEJVVWpKb1dGWnROWGRTYlZGNFYyeFdWR0pIVW5KVmFrWkhUbXhzVmxkdFJsVmlSbkI2V1RCb2MxWXlSWGhUYTNoWFVucEdXRlV3V2s5amJIQklZa1pPYVZKdVFqTldNV040VFVaTmVGWllhRmhpYXpWWFdWUkJNV05zVWxoamVrWlVVbTEwTTFadE1UQmhSa3B5WTBoc1ZXSkdWVEZXYlRGSFkyeE9kV05HVm1sU2JrSlZWMVJLTkdReFRsZFZiazVXWWxkNFZGWnJXbUZUYkZwelZXdGtWazFWYkRSWGEyaExWR3hhV0dGR1pGcGhNbEpVVm0xNFUxWXhaSFJTYlhocFUwVktTVlpxU2pSVU1rWnpWMjVLYWxOSVFtRlVWV1JUWld4YWNWSnJkRmROYTJ3MldUQmFhMVJ0U25OVGJHeFhZVEZLU0ZaRVNrNWxWazVaWTBkc1UySkZjSGRYVjNSWFpERmFWMXBHYUU1V1JrcFZWRmQwWVZOR1dYbE9WWFJYWWxWV00xUnNhRWRXYlVwVlZtdFNWazFHY0hwV2JYaGhZMnM1V0dGSGFHeGhNVzh4VmpGa01GVXhXWGhYYmxKVVlrWmFWRll3WkZOV01WSllZMFZrVkZKdGREUldNakZIWVdzeFdWRnJhRnBOUmxWNFZsUkJlRlpzV25GVWJHUk9ZbXhLZVZaSGRHdFViVlpIWTBWYVlWSnRVbkJWYlhoM1pHeGFXR1ZHVGxOTlZrWTBXV3RhVjFaR1drZFhiRUpXWWxSR1ZGcFdXbUZrUlRGRlZteGthR1ZyV2paV1ZFcDNVVEZhY2sxWVJsZGhNbWhZVld0V1lWUkdXbk5YYlVacVlrWndlbGt3V210aFZrcDFVV3R3VjAxWFRqUlVhMXBTWlVaa2RWUnNXbWxoTTBKV1YxZDRWMWxXVVhoV2JrWlZZbFJzVkZsclduZFhSbGw1VFZSQ2FGSlVSbGRVYkdoM1ZtMUtTR0ZJU2xkV1JYQk1WbXhhWVdNeFduTmFSMnhUWWtaWk1GWnNXbE5TTWtWNVZHeGtVMkpzV2xaWmExVXhWa1pzVlZKdVpGZE5WMUpZVm0xNFlXSkdTbk5UYWtKV1RXNVNlbFpYZUd0VFIxWkhZa1prYUUxV2NEWldSbEpIWkRGS1YxSnVWbXBTTTFKUFZtMTRkMDVzV2xWVFdHaHFUVlpLTUZVeWVHdFdSMFY2WVVab1YySllhRXhWYTFwWFkxWk9jbVJIY0U1V2EzQTJWbXBLTkZZeVJrWk5WV3hTWWxSc1dGVnRlR0ZqYkZKeVYydDBWMDFXY0hwWGEyUkhWVEF3ZUZOc1dsaFdNMUpZVm1wQmQyVkdXblZVYkZwcFVsUldXVlp0TVRCa01VbDRZVE5rV0dKRk5WbFpXSEJIVTFaYVdHVkdUbGhoZWtaWVZteG9iMVp0U2xsVVdHaFhZbGhvV0ZwRldrdGtSMVpJWVVVMVZGSlZjRkZXYlRFMFZURkplRmRZYUZaWFIyaFVXVzF6TVdOR1VsVlRiRTVxVW14YWVsWXlkREJXYXpGWFkwaG9WazF1YUZCV2ExVjRWakZrYzFkc1dsZE5NVXA1VjFaYWExTXhTbkpPVm1SaFVtMVNWRlJVUmt0VVZsbDRWMnhhYkZKc2NIcFdSelZMWVZaS2RGVnNhR0ZXTTJob1ZXeGFhMVl4Vm5Ka1JrNU9WbTVDTmxacll6RldNVlY1VTJ0c1VtSlViRlpXYWs1dlZFWlZlRmR0ZEdwTlYzUTJXVlZhVjFSc1NrZFhhbFpYVW14d1dGbHFTa2RXTVU1MVZteEthR1Z0ZUdoV2JYQlBWVEpHUjJOR1pGaGlWVnBVV1d0a1UwMUdjRVpYYm1SWFRVUkdWMWxxVG10V01rVjVWRmhvVjFaRldsUlpla1pQVjFkS1NHVkdUbWhOTUVwaFZqRmpkMDFXUlhoVGEyUllZVEZ3V1ZsWWNITlhSbXh5VjJ0MGJGWnNWalZVVmxaclZsZEtSbUpFV2xwV1ZscG9WbXBHWVdNeVRrbFRiSEJYVWxad1VWZFljRWRUTVdSWFkwVmtWV0pYZUZoVmJYaDNWakZhZEUxVVVsZGhla1pZVld4b2IxbFdUa1pYYkU1YVlsaE5lRlpyV2xka1IxSklVbXhvVjJKV1NqVldiVEF4WVRGYWNrMVdXazlXVjNoaFZteGFTMVJHV25GU2EzUnJVbXhhZUZVeWVGZFdNa3BKVVdzeFYxWkZTbWhXUkVaclYwWk9jbGRyT1ZkaVYyaFZWMVpTVDFFeVNYaFhibEpPVWtWYWNsUldXbk5PVmxwSVRsVTVWMkpIVWtsYVZXaEhWbTFGZUZaWWFGcE5ibWg2V1hwR1lXUkdTbk5VYld4VFlrWnJkMVp0ZEd0a01VVjRWbGhvV0dKck5WbFphMlEwVm14U1YxcEZOV3hTYkhCNVZqSXhSMVl5UmpaV2JHUlhVak5vZGxsVlpFWmtNazVGVjJ4a1YwMHhTbTlXVjNCSFlURkplVlJyV2xoaVdFSlVXVlJPUTFWR1dsaGxSMFpyVFVSR1dGWXllRmRWTWtwSVZXeGFWVlpzV21oYVYzaHpZMVpTZEdSSGFGZGhNMEpaVmxSS05GUXhXWGxTYmtwcVVteEtXRlpxVG05WFJtdDRWMnQwYTFadVFrZFViR1J6VlRBd2VGSllhRmRoTVhCWVdXcEtSbVZIU2tkWGF6VllVbGhDZUZaWE1IaE9SbVJIWWtoT2FGSlZOVlJWYlRFMFZqRlplV1JFUWxWTmEzQlhXVEJXZDFack1YVmhSMmhYVmtWd1NGUnRlR0ZqYXpGWFlVZG9UbFpZUWs1V2JGSktaVVpaZVZSWWFGZGliRnBVV1d0V2QySXhVbFZSYTNScllrZFNXRmRyVWxOV1JURlhWMnRvVjJKWWFGaFdhMlJMWTJzMVYxUnNjR2hOYXpCNFZrWlNSMk15VG5OWGJrNVZZa1p3Y0ZWdE1UTk5WbHB6V2tSQ1RsSnNjSHBXTW5SaFZrZEZlV0ZIUmxwaVIyaDJWbFZhWVdSSFZrZFViWEJwVWxSVmQxWlhNWHBOVmxWM1RVaHNhRkpYVWxoWmExcDNZVVpzVlZOcldteFNiRW94VmtkNFQxZEdTWGhUYkZaWVZqTm9WRlpxUm1GV01XUjFWR3hrVjFKV2NGUldSbHByVlRKV1IxWnVVbXRTVkd4WFZGWmFkMVpzYkhKWGJtUllVakJXTlZaWE5XRldNa1Y0WTBWNFYySllhSEphUmxwaFl6RndSazVYYkdsV01tY3hWbTB4TUZVeFRYaFVibEpYWWtkU1ZsbHRkR0ZYUm14eVZtNWthVTFXU2xkV01qVnJZVlV4VjJORmFGaGhNVXBVVmpCa1MxWXhTbkZWYkdob1RWWndXVlp0ZEd0U01EVjBVMnRhVUZadFVtOVpWRUpYVGtaYVIxZHRSbGRpVmxwWFZGWmFWMVp0U2xoaFJtaFZWbGRvUkZSdGVHRldWazVaV2tkNFUySllhRmxXVkVreFZUSkdSMU51U2xSaVZWcGhWbXRXZDFaR1dsWlhia3ByVFZkU01WWXlNVFJoVmtwWFkwUldXRlpGU21oVmVrcExVMFpPY2xkdGNGTlNWbkJaVm0xMFYxbFhUbk5WYkZwWVlUSlNjbFZ0ZEhkbGJGbDVUVmhPVmsxV2NIbFpNRnBIVmpGWmVsRnJlRmRXUlZwWFdsVmFZV014V25OVWJXaE9UVlZ3TTFadE1IaE9SMUY0VjI1T1YySkhhSE5WYWs1VFYwWnNXV05GWkZoU2JYUXpXVlZvVDFZd01YSmpSbkJhVmxad1JGWnFRWGhUUmxaellVWmtUbEp1UWxsWFdIQkhWakpOZUZwSVVtbFNhelZ3VlcweE1FMHhXblJOVkZKWFRWZDRXRmxyV210V1IwcHlUbFpzV21KWWFFeFdNVnB6WTJ4YWRWcEdhRk5pU0VGM1YydFdiMkV4VlhkTlZtUnFVMGhDV1ZsVVNtOVZSbXhXVmxob1dGWnJXbmxYYTFwM1lVVXhWMk5HVmxkaE1VcElWVEl4VjFZeFduVlRiWFJUWW10S1dWZHNaREJTYlZaSFdrWm9UbFpHU25KVVYzaExVMVpWZVdSSFJsZFNNSEJaV1ZWVk5WWnRSbkpPV0ZwVllURndjbFl4WkU5U2JWSklZVVUxVjJKSVFtRldiVEIzVFZaSmVGZHVUbGhoTWxKVldXeFdZVmRHYkhOVmEyUlZUVmhDVjFZeU5XdFZNVnB5VGxod1YxSXphSFpXYWtwTFVqSk9SMk5HWkU1aWJFcDVWa1pXWVZsV1NYaFViR3hxVWpCYVQxUlVRa3RYVmxwSFdYcEdhVTFXVmpSWk1GWlhWa2RGZWxWdVNsWmlXR2hvV2xaYWMxWnNaSFJrUjJoVFRVaENTRmRVUW05ak1WbDRWMjVPVkdFemFGaFZhMVozVkVac05sTnJkRk5XYlZKNlZsY3hjMkZIVm5OWGJFcFhUVmRSZDFscVJrWmxSbVIxVkd4YWFWSnVRbWhYYkdRd1dWWmFjMkpJVGxoaVZWcHpWbTE0WVUxR1VuTlhiWFJYVFZWd2Vsa3dXbk5XTVZvMlZtMW9WMDFxUmtkYVZscFhZMjFHUjFwRk5WTmlhMFkyVm14U1ExWnJOVmRhUldoV1lUSlNWbGxyVlRGV1JscHpXWHBXVDFKc2NEQmFSV1JIVjJ4YWMxWnFVbFppVkZaVVZtdGtTMk50VGtsUmJGcHBVakZLTWxac1ZtRlpWMDVYVkc1U1VGWXpRbFJaYTJoRFRrWmFXRTFVVWxwV2JFWTBWakkxUzFReFpFaGhSbVJWVm5wV1QxUldXbk5XVmtweVpFZDBWMkV4Y0RWV2JURTBZakZrUjFOWWNHRlNSVFZZVm1wT2IyRkdXbkZTYlhSVFlYcHNXRmxWVlRWV01rcEdZMFpzVjJKWWFGUldha1pMVWpGa1dXSkhjRk5XVkZaNFZrWmFWMlF4VGtkV2JsSnNVbnBzWVZadGRIZFhiRlpZWlVVNVYxWnNjRmhXTWpGdldWWktjMk5HWkdGV1ZuQm9XVEp6TlZZeFRuUmlSazVzWWxoUk1sWnFSbXROUmxsNFZsaG9WMkpyTlZsV01HUTBWakZzVlZSc1RsZE5WbkI1Vm0xME1GWkdTblJsUkVKaFZsWlZNVlpxU2t0U01XUjFZVVprVjJWcldYcFdiRkpDWlVaT1YxSnNiR2hTYlZKWVdXeGFTbVZzV2xoalJYUlRZbFphU0ZVeWVITlpWa3B6VTJ4c1ZtRnJXa3haYWtaaFpFVXhTV0ZIYkU1V1dFSkpWMWQwYjFNeFpFaFNXR1JQVm0xb1YxbHNhRTVsUmxKWFYyNUthMDFZUWtaVlYzaHJWR3hLUmxkcmRGZFdiSEIyV1ZSR2ExSXhaSFZVYlhCVVVtNUNXVlp0TlhkU01VNUhWMjVTVGxaWVVsUlpiRlpoVTBaYWRFMVlUbWhTTVZwNlZqSXdOVll5U2xsUmExSlhZbGhPTkZadGN6RlhWbEp6V2tkb1RtSkZjRmhXTVZwVFZERlZlVlJyWkZkaWExcFRXVzB4VTFkV2JISlhiVVpZVm0xME0xWnRjelZoUmxweVkwaHdWMDFXU2t4V2JURkxWbFphY2xWc2FGZGlTRUpOVjJ0V2ExSXhTWGhXYms1WFlrZFNXRlJXVm5kVVZsbDVaVWRHVjJGNlJsaFdSM1J2VmtkRmVWVnNVbHBpUmxwb1dYcEdjMVpXUm5WYVJsWnBVbTVDV2xkclZtdFNNVlYzVFZoT1ZHSnVRbUZaVjNNeFkyeHNWMWRyZEZkTlZUVjZWa2Q0YTJGSFJYcFJiRlpYVjBoQ1NGWnFSbUZXTVVwMVUyMUdVMDF1YUhkV1YzaFRWakZrUjFkdVNtRlNSVXBWVkZaa05GWXhVbGRXYlRscFVtdHdXRll5ZUd0V01rcFZVbXhTV2sxdWFGZGFWbVJYVW14a2RHUkZOVmRYUlVZelZtdGtORmxXYkZkV1dHaFlZa1phVTFZd1pHOVhWbHB4VkcwNWFtSkdWalZVVmxwcllXc3hWMU5xUmxkaVdHaG9XVlphUzFZeVRraFBWbWhwVWpGR00xWlljRWRWTVZsNFYyeHNhRkp0VW05YVZ6RTBWa1prV0dSSGNFOVdWRUkwV1d0b1MxWXlTa1pPVm1SYVlURndlbFJzV21GWFIxSkZVV3hrYVZKdVFraFdWRW93WWpGa2RGTnNiR2hTYTBwWVdXeG9iMVpHYTNsbFJUbHJVbXR3ZVZSc1dtdFdNV1JHVTJ0b1YySllVbFJWYWtwR1pEQXhWbUZHVG1oTmJFcHZWbGQ0YTFVeVNYaFZiRlpTWW0xU1dGVnRlR0ZOUm5CR1drVmtWV0pWY0VsV1Z6VnZWbXhhTmxac1FsZFdSVnBNV1RKNGEyTXlTa2RoUjJoT1ZtMDVObFp0ZUd0bGJWWkhVMjVPWVZOR1dsaFphMXAzVkRGYWRHVklaRmRXYkhCSVZsZDBNRlpyTVhKTlZGWlhVak5TYUZsVldrcGxWMVpIVld4YWFWSXlhRVZXYkZKSFYyMVdWazVXYkdGU2EzQlBWbTEwZDFOV1duSmFSRkphVm14d1dWVnNhR3RoYkVsNVlVWmFWMkpIVWxOVVZWcFhZekZrYzFwR1pFNVhSVXBLVjJ0V1lWVXlSbGRUYkdSWVYwaENXRlpxVG05V1JscFZVbTFHYWsxVk5YbFdNbk0xVmpGYWNtTkhhRmhXYlZGM1drUkdWMUl4V25OaFIzQk9UVzFvVlZkWGVHRlRNVWw0WVROa1dHRXpVbFpaYTFaM1YwWnJkMVZyWkZkTlZuQkhWako0YjFZeFNrWlhhMmhhWld0d1MxcFhlSGRUUjBwSFZHeGthRTB3U2xaV2FrWnFaVVV4UjFSWWJGTmhNbEp3VlcweFUxZEdiRlZUYkU1cVlrZDRlVmRyVWxOWFJrcDBaVVprVjJKR1NsaFpWbHBLWkRKT1JtTkdXbGROTW1kNlZtMXdSMWxYVWtkVmJGWlRZa1p3YzFsVVJuZFVWbVJWVW0xMFZFMVZjREJWTW5SclYwZEtXR1ZHVWxwaVdGSk1WbTE0WVdOV1NuUmtSVFZUVFZWdmQxWnRNREZVTVZwWVUyNU9WR0pyTlZkWmJGSlhVa1paZDFkc1RsZE5WbkF3Vlcxek1WWXlTa2hrTTNCWFlXdHdObFJzWkVka1JrNXpWMnM1VjFZeFNtaFhWbEpIV1ZkV2MySkdhR3BOTW1oVVZtMTRkMlZXV25SbFNHUlhUV3R3U0Zrd1ZuTlhSbG8yVWxSQ1YxSkZXbWhaZWtaWFpGWk9jMVZ0YkZkV2JrSlJWbXhrZDFReVNYaFRiazVZWWtkU1dWbHNhRk5pTVZKWFZsUkdiR0pHV25wWlZXUXdWbXN4Y21OR1dsZGlXR2hZVm1wS1MxSXhXbGxoUm1Sb1RWaENObGRZY0Vka01VcHpZMFZrYUZKck5VOVdiVFZEVXpGWmVXVkdaRmROYkVZMFZteG9iMVpIUlhoalJsWmFZbGhvYUZacVJsTlhSVFZYVkd4d1YySkZjRFpXYWtwNlRsWlZkMDFXV2s5WFNFSlpXVlJHZDJGR2JGZFhiVVpZVm10YWVWUldXbXRWTWtwR1kwVldXR0V4U2t4V1J6RlhVakpPUmxwSFJsTk5SbkJWVjFaU1QxRXlVWGhhUm1oclVqTlNjRlJXV25kbGJHeHlWVzFHVm1KR2NFZFdNbmhUVm0xR2NsTnRhRmRoYTFwWVdrVlZlRkpXU25OYVJrNXBVMFZLV1ZaclpEUldNVkY0V2tWb1UySnJjRlZaYlRWRFZqRnNWVkp1WkZSU2JHd3pWakkxYTFVeVNsWk9WV2hXVFc1TmVGWlVSbUZrVmtaWllVWmthVkpyY0VsV2JYQkhWVzFXUjFkc2JHbFNhelZ3V1d0V2QxWnNXbkZSYlhSUFVteGFTRll5TlV0V01rVjZWVzA1Vm1KWWFETlVWbHB5WkRGa2RGSnRhRTVTUlZwWVZrZDRZV0V4V1hoWGJsSm9VMFZ3V1ZadGVGZE9SbXQ1WTNwR1YxWnJXbnBYYTJSelZqRktWMkl6YkZkaGExcG9WMVphVG1WR1pGbGlSbFpvVFc1b2IxWlhNREZSTWtsNFZXeG9iRkpZVWxsV2JYaDNWMVp3UmxwRVFsZFNNSEJZVmpKNGExWlhTa2RqUm1oWFZucEdURlp0ZUd0ak1rWklVbXhrVGsxdGFGcFdhMXBUVWpGWmQwNVlUbE5pYTNCUlZtMTRkMVF4YkZWVWEwNVlZa1p3V1ZSV1VsTmhWVEZ5WTBWb1ZrMVhhRE5aVlZwTFZsWktjMkZHY0ZkU1dFSXlWbXhXWVZsV1NsZFRia3BZWWxob1dGUlZhRU5UUmxwVlUxaG9VMDFXU25wVk1XaDNZVVpLVjJOR2FGZGlXR2d6V1RKNGMxWldTbkpQVjNCT1ZsaENZVll5ZEdGVU1rWlhWMnRrV0dKR2NGaFpiR2h2VmpGU1YxZHJXbXhTYmtKS1ZXMTRTMkZYUmpaV2JGcFhWak5DUkZwRVJrOVdNVlp6V2taa2FXSldTbGhYVm1oM1VqQXhSMWRzYUU5WFJUVllWRlZTUjFkR1ZYbGtSRUpYVmpCd1NWWlhlRk5XTURGSFkwWm9XazFxUmtoVmFrWjNVMGRLU0dKR1RtbGhNR3Q0Vm0weE5GbFdWWGhTV0doVVYwZDRWVll3Wkc5WFJteFZVMnhPVjAxV2JETlhhMXBQWVVaS2MxTnNhRnBXVmxwUVZrZDRTMk14WkhGUmJGWnBVbXhWZUZkV1ZtdFNNRFZ6VTI1V2FsSnRVbkJXYTFwaFpWWmFkR1JIUmxwV2JWSkpWVzEwVjFkSFNraFZiRkpWVmtWYVRGWldXbXRXVmtaMFVteE9UbFl4U2tsWFZFSlhXVmRHYzFOdVNtcFNWR3hYV1d0YWQwMHhVbGRYYlVaWFZtdHdlbGRyV2xkVWJGcFhZMFJhV0ZZelFsQlpWRXBIVmpGT2MxcEdVbWxTVkZaWlYxWmtNR1F4V2tkV2FscFRZa2RTV0ZadGRHRmxWbVJ5V2toT2FGWnJjRlpXYlhodlZqSkZlVlZZWkZkU1JYQklWbXBHVDJSV1ZuUmtSazVUWWtoQ2IxWnRNVFJoTWtsNVVtdGtWMWRIZUhOVmJGcDNZekZhZEdWRmRGZGlSbkJaV2xWak5XRkdTbFZTYm5CV1RXNUNhRlpxUmt0a1JsWlpXa1p3YkdFeGNGRldWM0JIVmpKU1YxZHVUbGRpVjNoVlZXeFdkMWxXV25OYVJGSldUVlp3ZVZSV2FFOVhSMHBIWTBac1dsZElRbnBXYkZwVFYwZFNTRkpyTlZOaVJsa3dWMVpXYjFReFdsaFRhMmhXWVRKb1YxUlhjRWRUUmxweFUydDBhMVpyV25wWlZWcDNWRzFLZEdGR1ZsZFdNMEpJV1hwQk1XTXhaSFZUYXpsWFlsWktVRlp0ZUc5Uk1WSkhWMjVPV0dKWVVuSlVWbFp6VGxaV2MyRkhPVlpOVjFKSlZsY3dOVlpXV2taVGFrNVhZa1p3ZWxwRlZURldiRkp5VDFkc1UySnJTa3RXTW5SWFZtczFXRkp1VGxSaWEzQlpXV3RrTkZkV2JGVlNiVVpPVFZad1dWbDZUbTlWTWtwSVZXcEdWMkpZYUdoV1IzaGhZekpPUjFKc1pGZGlWa1YzVjJ0amVGVnRWbGRVYmtwWVlrWndjRlZzYUVOWFZscEhXa1JTVkUxV1NraFdNbmhyVm0xRmQwNVdVbFZXTTFJeldsZDRZVk5IVmtoU2JHUlhUVVpaZWxaSGVHOVJNVnAwVTJ4V1UxZEhVbFpaYTFwM1pXeGFkRTFWWkZSU2EzQjZWbGN4YzFVeFduTmhNMmhYWWxoU2FGWlVSbFpsUm5CSlUyczFWMVl5YUhaV1YzaHZZakZzVjJKR1ZsTmliVkpVVlcweE1FMHhXWGxPVlhScFVteHdNVlZYZEd0V1ZscDBWVzVhVjJGcldtaFdNVnBIVjFkS1IxcEZOV2xpUlhCYVZqRmFhbVZHV1hoVWEyUldZa2Q0Y0ZWdGVHRlhWbFYzVm10MFYxSnRVbGxhVldNMVlWVXhXR1ZHYUZkV00yaDJWa2Q0WVZJeFRuVlJiRlpYWWxaRmQxZHNXbUZoTWs1elYyeFdWMkpYYUZoV2ExWmhWMnhrYzFadFJtdE5WbkI1VkZab1IxWXlSbkpPVm1oV1lrWndNMVZxUm5kV2JHUnlUMWQwVjJFelFqWlhWRUpyWWpKR1JrMVlWbFpXUlVwWVdWUkdkMWRHWkZkYVJrcHNVbTVDUjFZeWN6VldNa3BIWTBaU1dGWnNTbEJaYWtaYVpVWldjMWRzWkdsVFJVcDZWbGN4TkZZd05VZFhibEpxWld4YWIxVnFRbHBOYkd4eVZtMTBXbFpyY0VkVWJGSlBWakZhTmxKcmVHRlNWMUpZVlRCa1IxSXhjRWhoUlRWWFYwVktWMVpxU2pCWlZteFhWbTVTVjJKck5XOVVWRTVEWVVaV2RHVkZkRlZOVmxwNFZrY3dOVlV5U2tkalJtaFhUV3BGZDFsVlZYaFdhelZaWTBaYWFWSXlhSGxXYkZKTFV6RmFWMWR1VGxkaVIxSndWVzE0VjA1R1dsZFZhMlJvVFdzMVdGVnROVmRXVjBwR1RsWlNXbFpGV2pOV01uaGFaVmRTUjFwSGRFNVdiSEExVmtaYVYxbFdaRWhUYms1WVlrZFNWbFp0ZUhkaFJtdDVaVWRHYWxack5YbFhhMlF3VlRKRmVsRnFWbGhXYkZwb1ZWUkdWbVF3TVZsVWJGSm9aV3RhV2xkWGRHdFViVlpIWWtaV1VsZEhhSEZVVm1oRFUyeFZlVTFWWkZkU2EzQldWbTE0UTFkR1dYcFZiR2hXWld0d1UxcFZXbmRTTWtwSVkwWk9UazFWY0ZaV2JUQjRUa1pzVjFwR1pGWlhSMmhoV2xkMFlWZEdWblJsU0dSWFRWWktlbFp0Y3pWWFJrbDNWMjVzVmsxcVZqTldiVEZHWlVkT1JtRkdaRTVTYmtGNlZsY3dlRlF4U1hoVWJrcFBWbXMxV0ZsdGRFZE9SbHAwWlVaT1UwMVdiRFJXVm1odlZURmtTRlZzUmxkaVdHZ3pXVEJhVjJNeGNFaFBWbWhUWWxobmQxZFVUbmRTTWtaelYyNU9WR0pIZUdoV2JGcDNZMnhzVjFwRmRGUldhMXA2V1RCYWIxWXhTbFZXYm14WFlsaFNWMXBWV2s5VFJscHlWMnhrYVZKdVFsbFhWM2hoVXpKV1YxZHNWbFJoYkVwVVdXeGFSMDVHVlhsT1ZrNVZUVlp3ZWxVeWVHOVdNa3BIVTJ4b1ZtRXhjR0ZhVm1SUFVteFNkR05GTlZkWFJVcEtWbXhqZUU1SFNYaGlSbVJVWWtkNFUxbHJWVEZXYkZwelYyMUdhRkp1UWtoV01uaGhZa1pLYzJORVFtRlNWbkJ5VmtjeFJtVkhTWHBhUm1SWFpXdFdNMWRYY0VkV01VbDRWR3hzYVZKc2NHOVVWRXB2VmpGYWRHVkhSbXROUkVJMFdXdG9SMVV5U25KT1ZtaFZWbTFvUkZWdGVHRlhSVEZaVkd4YVRtRXpRalZXVkVvd1dWWlplRmR1VWxaaGF6VlhWbXRXZDFOR1dYZFhiVVpxVFZkU2VsWlhNVzloVmtwMVVXMUdWMDFYVVhkWlZFWldaVVpTY2xwSGJGTmlSbkJVVjFjeGVrMVdXbGRYYmxKc1VqQmFUMVZ0ZUVkT1JtUnlWbTEwVjAxcldUSlZiWFJyVjJzeFIxTnJVbGROUm5Cb1dYcEtUMU5XVG5OV2JXaE9Za1Z3VGxac1kzZGxSbGw0Vkd4a1UySnJOWEZWYWs1dlkwWmFkR1JJWkZSU2JIQXdXbFZrUjJGSFJqWldiR3hXVFdwV1VGWnNaRXRTTWs1SFYyeHdWMUpWYjNwWFZsWmhWVEZhYzJORlZsWmlSVFZZV1d0YWQxZFdXWGxrUjNST1VteHdTVlV5ZEdGV01rWnlUbFprV21KR1NrTmFWVnBoWTJ4a2RGSnNaR2hsYkZwWVZtdGtOR0l5UmtoU1dHUnFVa1p3V0ZacVRsTmhSbFp4VW0xMFUwMXJOVWRaVlZVeFZqSktTVkZzYkZkV00yaFlXa1JHVTJNeFpITldiRTVwVWpGS1YxWkdXbGRaVjFaellraEdWV0pZVW05V2JYUjNWMFpWZVdWRk9WZE5hMXA1V1RCYVUxWnRWbkpYYkdoWFlrWndTRmt5ZUhkVFIwcElZa1pPVjFKc2NGcFdiVEV3WVRBeFIxUllhR2xTYkhCUFZteGtiMk14Vm5OWGJVWlhUVlp3ZUZaSGRFOWlSMHBIVjI1d1YwMXVhSEpXTUZwTFZsZEtSMkpHVm1sU2JrSlZWbTF3UjFsV1dsZFhia3BXWWtkU1QxbHRkRXRTVm1SWlkwVmtWRTFWYkRSVk1qVlBZVVpKZDFkc1VsZE5SbHBNVm10YVlWSXhXbk5hUm5CWFRWVndXVlp0ZUc5aU1WbDVVMnRhYWxKclNsZFphMlJ2VlVaU1ZWSnRSbGhTTVZwSFdrVmtiMVl4V2taWFdHUlhZa2RSZDFSVldtRmpNV1J5VjJ4U2FFMXRhR2hYVjNodllqRldSMWR1VW14U2F6VnhXV3RWTVUxR1ZuUmpla1pXVFVSQ05WbFZWbTlXTURGMVZXNWFXazF1VFhoV01GcExaRlpTYzFWc2FGTk5NbWd5Vm14a01GWnJNVmRYYkdSWVltczFhRlZ0Y3pGak1XeHlXa1JTYkdKR2NEQlViRlUxVm1zeFZtTkVRbFZOVmtwWVZqSjRZVmRHVm5KaFJtUm9ZVE5DV1ZkVVNqUmhNV1JZVkd0a2FGSXlhRTlXYlRWQ1pWWlplRlZyY0d4U2F6VXdWbFpvYzFaWFJYaGpSemxXWWxob2FGa3dXbk5qYkZwMVdrZHNUbFp1UWxwWGJGWmhWREpHZEZOc1pGaGhNbWhoVkZWYVlXRkdiRlpYYTNSWFlYcFdWMVF4V210aFIwVjRZMFV4VjFZemFHaFpla1poVmpGV2RWTnNWbWxTYTNCM1ZsZDRVMVl4VFhoWGJrcGFUVEpTVDFadGVIZGxiRnBJWkVjNVZsSnJOVWxXVjNodlZtMUdjazVXVWxkV1ZuQjVXa1JHYTJOc2NFZGhSazVwWVRCd1NWWXhVa05aVmsxNFZXNU9WR0pIVW5GVmExWmhWMFphY2xadFJsaFNiSEJHVlcxMGEyRnJNWEppUkZwWVlUSlNlbFpVUm1GamJVNUhWV3hrYVZkRlNrMVdiRkpIVkcxV1IxZHVWbFJpVjJoVVdsY3hOR1ZXWkZoa1IwWlVUVmRTZWxscmFGZGhiRXBZVld4a1ZWWnNXbnBVVkVaelkyeFdjMXBHWkZkaVNFRjNWMVpXWVZVeFdYZE5XRlpvVWpKb1ZsbHNhRzloUm5CSFYyczVhazFXV25wWGExcHJZVlpLYzFkVVFsZGlXRkpvVjFaa1JtVkdXbGxoUmxacFVqRktWVmRYTVRCWlZscEhZa2hPYUZKck5WaFZiWGhoVFZacmQxbDZSbFZpUlhCNldUQldhMVl4V1hwVldHUmFWbTFTVEZacVJtdGtWMDVIVjJ4a2JHRXdXVEJXYlhSclRrWk5lRnBHWkZkaWEzQnlWVzE0ZDFkR1ZuTldibVJVVm0xU1dWUldVbE5XVlRGWFkwaHdWMVo2Vmt4V2EyUkxWbXhrY2s5V1dtaGhlbFl5VmxjeE5GbFdXWGhhU0ZKclVqSm9UMVpzVWxkT2JGcFlaVWM1YUUxV1ZqVlZNbmhYVmpKS1NGVnNaRnBoTWxKVVZtdGFZV05zWkhWVGJYUk9WMFZLU1ZaclkzaGtNVlY1VWxob2FVMHlVbGxXYTFaTFkyeHNObEpzV210TlJFWlhWMnRrYzJKSFJYcFJiSEJYWWxoU1YxUldWWGhqTWs1R1ZteFNhRTFzU2xsV1JtUXdWakExYzJKSVNsaGhNRFZaVlcxMGQyVldhM2RoUjNSWFRXdHdXbFZYZEZOWFJscHpWbXBTVjJGcldqTlZNVnBQWXpGYWMyRkdUazVpVjJjeFZtcEdhMDVHYkZkVVdHaGhVMFUxV1ZsclpHOVZSbHB4Vkd4T2FVMVdTbGhYYTFwUFZrWktjMWRxUWxWaVJscFFWbXBLUzFKdFNrVldiR1JUVFRCS1VWWnRNSGhXTWs1elZHNVdhbEpzY0c5VVZtaERVMVphY1ZGdFJtdE5WWEF3VmtkMGExWkhSalpXYkZKWFlsUldRMXBWV21Gak1WWnlXa1prVGxacldUQldWekF4VkRKR1ZrMUliRlppYTBwWFdXdGFkMVJHV2xWU2JVWnFWbXMxZWxaSGVGTlViRnB6WTBaa1YxWnRVWGRaVkVwSFYwWk9jbGRyT1ZkaVZrcFpWbTF3VDFFeFdrZGlSbFpTVjBkb2NWbFljRmRXYkZaWVpVZDBhRlpyY0ZaV1YzQlBWakpLUjJOSGFGWmxhMXBNVmpCYVQyTnNXbk5XYld4VVVsVndXbFp0TVhkVE1rbDRVMnRrV0ZkSGVIRlZiR1JUWTJ4U1YxcEdUbFJTYkhCWlZHeGFUMVpzU25OaVJGWmhWbGRvVUZacVNrdFNNV1J4Vkd4V1YwMHlhSGxYVkVvMFdWZFNTRlJyYUd4U2F6VlBWV3RXVm1WR1duUmtSMFpwVFd4R05GWnROVk5XUjBwSVpVYzVWbUZyU21oV2JYaGhaRmRPUmxkck5WTmlXR2cwVmxjd01WUXlSblJUYTJ4U1lUSlNWbFJXWkZObGJGcElaVVp3YkdKVldrbFZiWGhyVmpGS1dHUkVVbGhoTVVwSVZsUkdTbVZHVG5OaVIyaFRZa1Z3ZDFkV1VrZGtNa1pIV2tab2ExSXpVbGRVVmxwM1UwWlplV1ZIUmxwV2EzQjVWR3hhYzFZeVNsbGhSMmhWVm14d2Nsa3llSGRTVmtaellVWk9hRTB3U1RGV2JYQkxaREZSZUZkWWFGUmhNWEJRVmpCb1ExWXhXbkZVYkVwc1lraENWMVl5ZEd0aE1WcHlZMFJDWVZKV1ZYaFdSM2hyVW14T2NWVnNaR2xTYTNCRlZtMXdTMVZ0VmxkVmJHeG9VbTFTYjFSWE1XOWhSbHBIVld0MFZrMVdjRmhXVjNoaFdWWktSMU5zVWxkaVdHaG9WakJhYTJOc2NFVlJiR1JUVFVoQ1NGWnRNWGRVTVZwMFUyeFdVbGRIYUZoWlZFWjNZVVphZEdONlJsZGlSa3A2V1ZWa2IyRkZNVWxSVkVwWFlrZFJkMWRXV2twbFJuQkdXa2R3VTFZeFNsVlhWM1JYWkRKTmVHSklUbWhTZW14UVZtMTRjMDVHV1hsTlZXUm9WbFJHV1ZaWE5YTlhiVlp5VGxoS1YySlVSa3hWYlRGUFUxWkdjMVpzWkd4aE1YQldWbXhvZDFJeFdYaFhiR1JUWW10d2FGVnFTalJqUmxaelZXeGtXRkpzY0hsWGExSkRWa1V4V0dWR1pGVldiRnAyV1d0YVMxWXlUa2hoUmxwT1VqRkpNbFpHV21Gak1XUklWbXRhYWxJemFGaFVWVnAzVWpGYWNscEVVbFpOVm13MFZqRm9jMVpzWkVsUmJHaFZWbnBXUkZVd1dsZFdWa1pWVW0xd2FHVnNXbGhXYWtwNlRsWlplRmR1U21wU2VteFpXV3RrVW1ReFZqWlNiRTVYVFZad1dsbFZXbXRoUjFaMFpVWlNXRll6VW5GVWJGVjNaVWRLU1ZOc1pHbFNWRlpZVjFkMFlXTXdOVmRYYkdoclVrVktXRmxyV25kU01WVjVaRWQwVjFZd1ZqUlpNRnB2Vm0xS1IyTkdVbHBOYm1oVVdrVmtTMUpyTlZoaFIzaHBVbTVDU1ZadE1UUlpWMFp5VFZaa1UxZEhhSEJWYlRGdlZrWnNjbGR1WkZkU2JYZ3dXbFZvYTFZeFduTmpSRUpWVm14d1VGWXdXa3RrVmtaeVdrWm9hRTFXVlhoV2JYUmhXVmROZUZwSVZtaFNiVkp3VmpCYVJtUXhXbk5hU0hCc1VteHdNRlV5Y0dGVk1rcElWV3M1V21KVVJuWlVWM2hoWTJ4V2NtUkdXbWxXYkhCWlZtdGtOR015UmxkVGJGWnBVbTE0VjFSVldtRlVSbXh4VW0xR2ExSXhXa2hXUjNoUFZHMUdObEpVUWxoV00xSlVWMVphWVZkR1NuRlhiV3hUWlcxNFdGZFhlRk5SYXpGWFZXNU9XR0pWV25GVVYzUmhVakZhU0dWR1pGWk5hM0JJVmpGb2QxWXhXa1pYYkZKWFVrVmFhRlZxUm10ak1YQkhWR3hrVTFaWVFsZFdNbmhyVFVaTmVGZHJaRmhpUjJoUFZteG9RMk14V25ST1ZVNVRUVmQwTTFZeWREQldWMHBHWTBab1drMUdTa2hXYWtaaFVteGtjMkZHWkZOU1ZuQkpWMWh3UzFOdFZuTmpSV2hwVW1zMVdGbFVUa05XVmxwMFRWaGtWRTFXVmpSV1JtaHZWakpLUjFkc1RscFdSVm96VmxWYVYyUkZNVlZSYXpWT1ZtNUNTbGRyVmxaT1YwWkhVMWhrYWxKdFVtRlVWVnBoWld4YWRFMVZkRmRXYkhCNFZrZDRkMVl5Vm5KWGJHeFlWa1ZhYUZWcVNsTldNVXAxVkcxd1UxWkdXblpYVmxKSFpERmtjMWRZYkd4U00wSnpWVzE0UjA1R1draGtSMFpXVW14d01GcFZXbTlYYlVwSVlVVlNWMUpGV25wWk1uaHJZekpPU0dSRk5WZE5WWEJoVmpKNFYyRXdNVWRYV0dST1YwVTFXVmxYZEV0WFJsWjBUVmM1YkdKR2NGWlZNblF3VmpGYWMyTkVRbHBXVm5CeVZtcEdTMVp0VGtWWGJHaFhaV3RWZDFkWWNFSk5WMDE0Vm01V1ZXSkdXbTlhVnpFMFYxWmFSMVp0T1ZKTlZUVjZWakkxVTJKR1NuSk9XRVpWVm14VmVGUlZXbFpsVjFaSVVteFdUbFp1UWtoWFZFSnJVakZrYzFkcldtcFNWR3hXVm0xNGQwMHhXbkZTYlVaWFZteHdNRmt3V2s5aFJURllUMVJPVjJFeVVUQlpWRXBTWlZaS2MxcEdhR2xoZWxaNFZsUkNiMUV4WkZkWGJsWnFVbGRTVDFSV2FFTlhWbEpYVm0xMFYwMUVSbGRXTW5CSFZtMUtWVkpZWkZwaE1YQm9WVEJrVjFOWFJrZGFSbVJPVFVWd1RsWXhaSGRSYlZGNVZtdGtWbUpyTlZsWmJGWmhWa1pzYzFkcmRHdGlSMUpaV2xWYWExZHNXbkpPVm1oWFZtMW9jbGRXV2twbGJGWnpWbXhXVjJKR1ZqUldWM0JIWTIxUmVWSnJXbEJXYldod1ZtMTRkMDVXV2tobFJtUldUVmQ0V0ZVeWNHRlZNa1Y2WVVkb1ZtSllhRE5XYTFwM1VteHdSMXBHVGs1V2JrSTJWakowVmsxV1dYbFRiRlpvVWtaYVdGbFhkR0ZrYkhCRlVtczFiRkpyTlZwWmExcFRZVmRHTmxadWFGZFdla1V3VjFaa1QxWXhWbk5oUlRWWFlYcFdXRmRYZEc5Uk1XUlhZVE5rV0dFelVsWlVWbFozWld4VmVXUkhSbGROVld3MlZsZDBORll4U2xkV2FsSldZV3RhVUZsNlJsTmpNazVJWVVkb1RrMUZiekZXYlhoVFV6QTFSMU51VWxaWFIyaFZXVzE0UzFWR1duUmxSWFJZVW14d2VsWlhlR3RWTVVwellrUldXazFHV2xCWlYzTjRWbTFPUjJKR1pGZE5NRXBaVm14V1lWZHRWbk5TYms1V1lrWmFXRnBYZEdGTlZtUnpXa1JTVjJKV1draFdNalZUVkRGWmVsVnJPVmRpYmtKNVZGVmFZVll4Y0VsYVJuQlhZa1ZaTUZaVVJtOWpNVnAwVWxod1ZtSkhVbGhaVkVaaFZFWlZkMWR1VG10U01WcEhWREZhYTJGV1NuSmpSRlpYVmtWc05GVnFSbE5qTVU1WlkwZG9VMVp1UWxsV2JURTBaREpPYzJKR1ZsTmhlbXh4VkZaV2QxZHNaSEpYYXpsb1VqRmFNRnBWV2xOV01VcDBWR3BTVldFeGNFZGFWVnAzVTFaS2MxTnRiR2hsYkZwV1ZteGplRTFHYkZkYVJtUmhVMFZ3V0ZsdE1WTldNV3haWTBWa1UwMVdiRFZVYkZwclZqQXhWMk5HYUZkTmJtaFFWbXhrUzFOR1ZuTlViVVpYWWtoQ1RWZFVTWGhUTVVsNFZHNU9ZVkpVVm5CVmJHaENaVlphZEUxSWFHdE5WV3cxVmtab2MxWkhTbkpPVmxwWFRVZFNWRmxWV2xaa01WcFZVbTF3VGxZemFEWldiWGh2WWpGUmVGZHVUbXBTUlVwaFZGVmFZVlZHV25OWGEzUnFZa1p3ZUZaWGVHRlViVVp5VTFSQ1YySlVRalJWYWtwUFl6RlNkVlJ0YUZOaVZrcDNWbGN3TVZFeVZsZFhhMmhzVWpCYWNsUldWVEZYVmxWNVpFYzVWazFyY0VsV1Z6VlBWMjFGZUdORVRsVldNMmhoV2xWYWQxSldWblJoUlRWWFltdEdNMVpzVWtwTlZsRjVVbXRrVkdKck5WVlpiRkp6Vm14YWNsWnJkRlZTYkZreVZXMTRZV0V3TVhKWGEyUlZUVmRTZWxsV1drdGpNazVHWkVab1YyVnNXWHBXVmxKSFdWWmtSMU5zYkdGU1ZHeFpWV3BHUzFkR1duUk5TR2hXVFdzMWVsWnNhSE5pUmtwWFkwaEtWVlpzV2pOVVZWcFRZekZrYzFSc1pFNVdia0pYVm0weE1GVXhXWGROV0ZaU1lUSm9WMVpyVm1GVlJsWnhVbTFHYTFac2NIcFZNakZ6VjBaS2NtTkVTbGRpVkVVd1ZtcEtVbVZXV25KYVIwWlRZbGRvZVZaWGNFOVZNVnBIVld4b2JGSXdXazlWYlhoM1UxWnJkMXBGWkZkV01IQkhXV3RTVjFsV1dsaGhSV2hYVFdwR1RGVnFTazlUUjBaSFZteGthVk5GU2pWV2JURjNVakpPZEZadVVsTmhNbWh3Vlcxek1WZFdWbkZUYlRsYVZteHdNRmt3Vm5kVWJGcDBaVVpzVm1KVVZsUldhMlJMVWpGa2MxUnNjR2xYUmtwTlZtMXdSMVl5VGxkVWJrcFFWbFJXVDFadGVISmxWbHBYV1hwR1ZVMVdWalJWTWpWTFYwZEtTR1ZHYkZwV1JWcG9WRlJHWVZkSFRYcGhSazVwVWpGSmVGWnRNVFJaVmxKelYyNU9hbEpyV2xoV2JURlNUVVp3U0UxV1NteFdhelY1VmpKNFlXRldTbGxSYkd4WFVtMVJNRlY2UmxabFJtUnpZVWR3VTFkR1NuWldSbFpUVmpGa1IxZHVVbXRTZW14d1ZXMTBkMWRzV2xoT1ZVNVhZbFZhZVZVeWNFOVdWbHBYWTBab1lWSldWWGhXYWtaVFl6Sk9SMXBIYkZOaVIzY3lWbTE0VTFNd01VaFRXR2hoVTBVMVdWbHRlRXRXTVZweVZtdDBXbFp0ZUZaVmJURkhZa2RLUjFacVRsZGlSa3BZVmpCYVdtUXlUa1phUm5CT1VtNUNVVlp0Y0V0VE1rNXpVMjVHVjJKSFVrOVdha1pIVFRGa1YxVnJaRmRpVmxwWVZrYzFTMkZHU25OWGJrSmFWa1ZhTTFwRVJtRlNNV3Q2WVVaYVRsWnNjRFpXYlRBeFV6RmFkRk51U2s5V1ZHeFdWbTB4VWsxR1duRlNiazVYWWtad2VWcEZXbmRXTVZwR1YyMUdWMVp0VVRCWmVrWmFaVVpPY1Zkc1NsZFNWbkJvVm0wd2VGVXhaRWRYYmxKc1VsUnNjbFp0ZEdGbGJHeFdWMjEwYUZac2JEVlpWVnBMVmpBeFdGVllaRnBXUlZwUFdsWmFWMk5zY0VkVmJXeHBVbTVDV1ZZeFpEUldNV3hYVjFob1ZtSkhhRTlXYlhNeFl6RmFkR1ZJVGs5V2JFcFhXVlZqTldGSFJqWlNibXhWVm14S1ZGWXljM2hTTWs1SFZXeHdWMVl4U2xsWGExWmhWakpPZEZWclpGaGlWMmhQVm14b1FtVkdXWGhWYTNSUFVteHNORlV5TlU5V2JVcEhWMnhvV21KSFVUQldSRVpYWTJ4YWRGSnJPVk5pU0VKS1YydFdZVmxXVW5OWGJrcHFVbGQ0VjFsc2FHOWhSbHBWVTJ0MFYxWnNjSHBXYlhocllWWktjMVpxVWxkV2JFcElXVlJLVDFZeFNuVldiRlpwVWxSV1ZWZFdVa2RrTVdSelYxaHNhMUp0VW5KVVZscGhaVlpTVjFadFJsaFNNSEI2VmpKNGExWldXbk5qUjJoWFlURndWRmt5ZUhkU2JWSkhZVVpPYUdWc1dtaFdNVkpEV1ZaVmVWSnNhRlJoTVhCeFZXeG9iMWRHV25WalJtUk9UVlphZUZVeWN6RmlSa2wzVGxWa1YwMXFSa2hXVkVwWFpFZFdTV0pHYUZkTk1Vb3lWbFpTUjFNeVRYaFdiazVZWWxWYVZWVnNVbGRrYkdSWVpFWmthMkY2Um5wWmEyaExWbTFLVmxkdFJsZGlXRkl6Vm1wR1UyTXhXbkZSYkdSVFRWWndOVlpVU2pSVk1WbDRWMnBhVTJFelVtaFdiWGgzVFRGV2RFMVZPVk5OVlRWNVZHeGFUMVl5U25KU2FsSlhZbGhvVkZWcVJscGxSbFpaWVVaT2FXRjZWbmRXUmxKTFZUSk9SMVp1VGxoaE0xSlhWRlphZDJWR1ZYbGxSVGxYVWxSR1dGWXllR0ZXYkZsNlZXNUtXbFp0VWt4VmJYTXhWakZ3UjFwR1RrNU5WWEJPVm1wR1lWWnRWa2RYYms1VlltdHdjRlZ0TlVOaU1WSllUVmM1V0ZadFVsaFhhMUpUVmxVeFZtSkVVbGhoTVhCNlYxWmFTMk14VG5OaFJtUm9ZVE5DTWxadGVHRlpWazVJVm10b2ExSnNXazlXYkZKWFUxWmFjVk5xVWxkTmExcFlWVEo0YzFWdFNuSlRiVVphVmtWYWFGUlVSbmRYUjFaSVpFZHdUbFp1UVhkV1JFWmhXVmRHVjFkc1pHcFNiV2haVm1wT1UxZEdiSEZTYkVwc1VtMVNXbGxyWkc5V1JrcFdZMFpzV0ZadFVYZFhWbHBhWlVaV2RWUnNhR2hsYlhoYVZsZDRVMUl4U25OV2JsSk9WMFUxVjFSVlVrZFdNVmw0Vld0T1YwMVZjRWRXTWpWaFZqSkdjbGR1U2xwbGExcHlXVEZhYTJNeFVuUmlSMmhzWWtad1dGWnRNSGhrTVUxM1RsVmtWR0V5VW5GVmJGcGhWbFpzVlZSc1RsZFdiRm93V2tWb2ExUnNTblJrUkU1WVlURmFjbFpxUVhoU1ZrcHhVV3hvYUdGNlZqWldha0poVjIxV2MxWnVWbFJpUjFKWVZXeG9RMVJXV2xWUmJVWldUV3hLV0ZVeU5VdFVNVnB5VGxVNVdtSlVSblpXTUZwYVpVWndSVlZzY0ZkaVZrbDNWbTB3TVZReFdsaFRhMlJxVW0xb1dGbFVSbUZoUm14eFVteGthbFpyV2pGWGExcHZWakpLU1ZGcVdsZE5ibEoyVmtSR1lWTkdUbkpYYXpsWFZqRkthRlpHVm10aU1WWkhWMWhzYWsweWFGbFZha0poVTBac1ZsZHVaRlZpUld3MFZUSjRSMWRIUlhoWGJXaFlWbTFTVkZVd1dsZGpiSEJIVkcxc1YxWnVRalpXTVZwVFVUSlJlRlZ1VGxoaVJscFVXV3RrVTFac1VsZFdiVVpzWWtkNGVGWkhNVEJoUmxweVkwWm9WazF1YUZCV2FrcEhZMjFPUjFWc1dteGhNWEJaVm0xNFlWSXlUbk5qUldocFVqSjRWRlpyV21GWFZscDBaRWQwVGxKck1UUlphMXBoVkd4YVdHRklUbFppUm5Cb1ZtcEdZV1JGTVZkVWJYQnBVbXhaTVZkc1ZsZE5SbHBIVjFoa1dHRXpRbGRXYWs1dlRURmFTRTFWZEZkV01GcEdWa2Q0YTJGRk1YTlNhazVYWVRGS1RGWkVSa3BsUms1MVZHMW9VMDFHY0ZWV2FrSlhVekZhUjFkclpGZGlSMUpoVm1wR1MxZEdXbk5oUnpsWFRXdFpNbGxyV2s5WGJVVjVWRlJHVlZaRlducFpNbmhoWXpGU2MxZHRiRk5pV0dONFZtMTRhMDFGTVVkWGJrNVlZVEZ3VlZsVVNtOVpWbXh6WVVjNVZsSnNjREJhVlZwUFlXMUtSazVZY0ZaV00yaFFWa2Q0UzJSV1JuUlNiR1JvVFd4RmQxZFhjRXRTYlZaWFUyeHNhRkl3V2xSV2FrWkxWbFprV0dWR1RsZE5hMXBJVm0wMVQxbFdTalppU0U1YVlUSm9SRlZ0ZUZka1JUVllaRVprVGxadVFsZFdWekV3WXpGa2RGSlliRlpoYXpWWVZXcE9UMDVHV25GVGF6bFVWbTVDU0ZsVldtdFVhekYwWVVSV1YwMVhhRE5WVnpGWFVqRk9kVlZzVW1oTmJtaFVWMWQwVjJReVNYaGlSbFpWWVRBMWIxVnRlSGROUm10M1ZsUldhRll3Y0ZoV01uUnZWMGRGZVdGR1FsZGlXR2h5VlRCYVYyUkZPVmRhUjJ4WVVqSm9kbFpyV2xkWlZteFlWV3RhVDFadFVtaFZiVEZ2WTBaV2RFMUVVbXhXYkhCWlZGVlNSMVpWTVZkalJXaFhUVmRvZWxscldrdFdNVTUwVW14a2FXSnJTa2xXYTFaaFZtMVJlRnBJU210U00xSllWRlZTVjFOc1pGVlJiWFJQVWpCYVNWVnNhR3RoYkVwR1RsWm9XbFl6VW1oWk1WcFRWakZrYzJOSGRFNVNSVnBZVjFaV1lWbFhSa1pOV0ZKb1VtdHdXRmxYZEV0aFJtUlhWMnMxYkZJd2NFaFpWV1IzVlRKR05sWnNaRmRTYkhCWVZtcEJNVll5U2tsVGJHUm9UVEZLYUZadGVGTlNNVTVYWTBaYVYySkhVbGhaYTFwM1RVWmFXRTVWZEZkaGVrWXhXVlZXYTFsV1NrWlhhM2hoVWxaVmVGWnFSbGRqTVhCSFdrWmtVMkpJUWtkV2JURjNVekpSZUZKWWJGVlhSMmhWV1ZSS1UxWkdiSEphUnpsb1VteGFlbGxWVms5V2F6RlhVMnhrVjJKWWFHaFdSM2hMWXpKS1JWVnNaRTVpYXpCNFZteGtlbVZIVG5SVGExWlhZa2RTVkZwWGVHRldWbHAwWTBWMFZFMVdjRmhWTWpWUFZrZEtTRlZzYUZaaVJsb3pWR3hhYTJOc2NFVlZiV2hPWVhwV05sZFVRbGRqTVZwWVUyeHNhRkp0YUdGV2ExWkxUVEZhY1ZKdGRHcGlWVnBLVlRKek5WWXdNVWRqUkZwWFZrVmFkbGw2U2tkU01VNXlWMnM1VjJKR2NGbFhWM1JyVlRGYVIxZFlaRmhpYXpWWlZXeFNSMVl4WkhKWGJFNVdUVlp3U1ZwVlZuZFdNREYxVlc1S1ZWWldjSEpWYWtaUFl6SktSMU50YUdsVFJVcGFWbXRhYWsxWFNYbFViR1JXWWtkU2FGVnNaRk5qYkZaMFkzcEdXR0pIZUhsV01qRkhZVVphZEZWcmJGcFdWbFY0Vm1wR1dtVnNSbkpoUmxwc1lUTkNWRmRzVm10U2JWWjBVMnRhVDFack5WUldiVFZEVFd4YWMxcElaRkpOYkVZMFYydGFhMWRIU25KT1YwWmhWak5vYUZac1dsTldNVnAxVkdzNVUySllVWHBYVmxaclRVWmtTRk5zV2xkaGJGcFlWbXBPYjJOc1dYbGpNMmhUVFZkU1dsZHJXbXRoVmtsNFUyeENXR0pHY0doYVJFWktaVVpPZFZWdGVGTk5iV2gzVmxkNGIxRnRWbk5YYms1V1lUSlNXRlJYZEZkT1JscFhZVWhPVjFadFVrbFpWV2hEVm0xS1ZWSlVRbGRpV0doNldrVlZNVlpzVW5OWGJXeFRZbXRLV0Zac1dtcE5WMFY1VW01T1ZHSnNXbE5aVkVwdldWWmFjMWR1WkZaU2JIQkpXbFZXZDJFd01YSmpSVnBYWWxob1dGbFZWWGhqTVU1eFYyeGthVkp1UW5sV1Z6QjRWVzFSZDA1V1pHaFNhMHBZV1cxMFMyUXhXblJrUm1SYVZteGFXRmRyV205aE1VbDZWV3hXVlZac1dqTldNVnBoVmpKR1NWcEdhRk5OU0VKTFZsWmtOR0l4V25SU1dHaHFVbGhvV0Zac1duZFhSbHB6VjJzNWExWnNTbnBWTWpGelZUSldkR1JFV2xkTlYxRjNWbXBHVm1WR1duVlViR2hZVWpOb1dGZFdVazlWTVZsNFYyNUtWMkV6VWxWVmJURTBUVVp3VmxaVVZsZE5hM0JJVlRJMWMxWnJNWEZTYTJoWFVqTm9TMXBYTVVkU2JIQkhZVWRvVGxaWVFsSldha1poV1ZkTmVGcEZaRlZpYXpWWVdXeGtORlpHVm5SbFNHUm9VbTFTV1ZwRlpFZFZNa3BYVW1wU1YwMXVVblpaVkVaTFZsZEtTVkpzV21sWFJrcHZWbXBHWVdFeVRuTlhibFpoVW14d2IxcFhkR0ZUUmxweFUxUkdWMDFXY0hsVVZscHJWMGRLUmxOc1pGZGhhelYyVkZkNGQxWnNaSEphUjNCcFVteHdObFpXWkRSaE1WSnlUVlphYWxKRmNGaFpiR2hEVWtaa1YxcEZPV3RTYkVveFZrZDRVMkZGTVhOVGJGWllWbnBGTUZwRVNrZFNNVlp6VjIxR1UxSnJjRlZXYlRFMFdWWmtSMXBJU21GU1JVcFlWV3BDZDFJeFduUmpSVGxYWWxWd1ZsVldhRzlXTWtWNFkwZG9WMkZyV2xCV01XUlBVakZhYzFSc1RsaFNWWEJUVm0xNFUxRXlSWGhUV0doVllrZFNjVlZzV25kalZsWjBaVVYwVjFKc1ducFdiVFZyVkd4YWMyTkljRmRpVkVFeFdWUktSMDVzU25KaFJtUlhaV3hhVFZadGVHdFRNazV6Vkc1T1ZXSkhVbTlaVkU1RFZsWmFXV05GWkZkTlZuQllWVzAxUzFsV1NYbGxTRUpXWWtaS1dGWXdXbUZqYkhCRlVXeFNUbFl6YUZoV1JscGhXVlphU0ZKWWFHcFNiSEJXVm0weFUyUnNhM2xsU0U1WFlrZFNlVlF4V2s5aFZrcFpVVmhrVjFJemFHaGFSRVphWlZaT2MxcEdVbWxXTW1oWlZrWmpNVkV4U2tkVmJGcFlZWHBzVlZWdGN6RmxWbXh5V2toa1ZrMUVRak5WTW5oRFYwWlplbFZ0YUZwbGEwWXpXbFZhWVdOV1pITlRiV2hzWWxob1dWWnJXbUZpTVVWNVZtNU9WMWRIYUc5VmFrNVRWMFpTV0dSSVpGUlNiR3cxV2xWb1QxZHNXbk5qUkVKWFZqTm9WRll5TVZkamJHUjFVMnh3VG1KdFozcFdWRVpoVlRKT2NrNVdaRlZpUjFKeldXeG9UMDB4V25Sa1IwWlhUV3RzTkZWc2FHOVdiVVY1Vld4b1YwMUhVbFJXYkZwaFkyeGFWVkpzWkZkaVNFSTJWbXBLTUZsV1VuTlRia3BQVWtWd1YxWnFUbTlWUmxwMFRWVjBWMkpWY0VaV2JYaHZZVVV4VjJJemNGZGlSMUkyV2xWYVMyTXhjRWxXYkdScFVtNUNVRlp0TVRSa01WWlhWMnhrWVZKR1NuSlpiRnBIVGxaVmVXUkhSbGRpVlhCSFdUQmFiMVpXV1hwaFJYaFhVbFp3YUZacVJsZGpiRkp6Vkcxb2JHSkdjRXBXYWtvd1lqRk5lR0pHWkZWaE1YQlFWbXhTYzFsV1duSldibHBPVW14V05GWXlNVWRXUmtwVlZteGtWVTFXY0haWlZscEtaVVpPY21GR1pGTk5NbWhWVmpGYVlWbFhUWGhVYmxaVVlYcHNXRll3Wkc5aFJtUlhWV3RrYTAxRVFqUldiR2hyV1ZaS1dWVnNVbGRpV0ZKb1dsWmFVMVl4WkhSa1JsWnBVakZLU0ZaVVJtOWtNVmwzVFZab1ZsZEhVbUZXYTFaaFlVWndSbGRyZEdwTldFSklWVEl4YzFZeFNuTmpSa1pYWWtkUk1GbHFSbFpsUmxKWllVWmthVkpzY0ZSWFZsSkxWVEpPUjJKSVNsZFdSVnBZVkZaYWQxTldjRVpXYWtKWVlrWndWbFZ0ZEhOWlZscFhWMnhvVjJKWWFHaGFSVnBYWkZaT2MxZHJOV2xpVjJoSlZqSjBVMUl4VFhsVmExcFBWbTFTVjFsclpGTlhSbHB5VjIxR1UxWnNjSGhWTWpWclZXc3hjazFVVWxaTmJtaDJWbXBLUm1WWFJrZFNiR1JwVW10d1dWZFhjRWRqTVdSSVZtdG9VMkpHU2xSWmEyUXpUVlprY2xadGRFNVNNRnA1VkZaV1YxVXlSWGxWYlVaYVZrVmFhRmxWV2xwa01YQkdaRWR3YVZKVVZYaFdWbVEwV1ZkR1NGSllhR3BTYldoWVZXMHhVazFHV2tWU2JVWnFUVlp3TVZWdGVGZGhSMVp5VjJ4Q1dGWnRhRE5XYWtaUFl6RndSMXBHWkdsV1IzaDJWa1phVmsxWFZuTldXR2hvVW5wc1dWVnFRbmRsVmxsNVRWVmtWMDFyY0VsV1YzTTFWbFphVjJOSVNscE5WbkJNV2taYVUyUkhVa2RVYldoT1RVVlpNRlpxUmxOUk1rVjRVMWhvV0ZkSGVGaFpiWE14VjFac2RHVklaRmhXYkhCNFZrY3dOV0Z0U2tkalJFSlZWbXhhTTFsVVFYaGphelZXV2tad1YxWnVRakpYVmxwclVtMVJlVlJyYkdGU2JWSllWRlJDUzFOV1duUmpSWFJXWWxaYVNGWnRlSE5oYkVsNVpVWlNWMkpIYUVSV1JFWmhVakZrYzFwR1VrNWlSbkJKVjFSQ1YxWXhXbGhUYkZwWVlsUnNWMWxzYUZOTk1WWnhVbTVPVjFac1NubGFSVnBoVkd4YVdWRnFWbGRoYTNBelZYcEdhMU5HU25WVGJGSnBZbXRLV0ZkV1VrZGtNVTVIVjFoa1dHSnRVbFJaYkZVeFUwWlZlV042UmxaTlZuQXhWVlpvYjFZeVNrZFRhMmhYWVd0YVUxcFZXa3RrVmxKMFlrVTFUbUpGY0ROV2JHUTBXVlpOZUZaWWFGaGlhMXBWV1d0Vk1WWldVbGRYYlVaWFlrWmFXVnBGWkRCaFJsbDNZMFZvVjAxdVVuSldNR1JHWlZaV2NtRkdjRmRTV0VKTlZtMHhlazFXV2xkU2JrNVhZa2RTV0ZSV1ZuZE9WbGw0VjIxR1dsWnRVakJXYlhScldWWktkR1ZIYUZaaVZGWkVWakJhWVdOV1JsbGFSM2hUWWxaS1dWWnNaREJoTVZaeVRWWmthbEpYYUZoVmJuQlhWMFprVjFkcmNHeFdNVnBIVkRGYVYxWXhXbkpqUmxaWFVteEtTRlp0TVZkU01rNUdZa1pvYUdWc1dsVlhWM1JYWkRBMVYxZHVTbHBsYTFwVFZGWmFZV1ZzV1hoaFNFNVhZbFZXTmxaWGVHdFdNa1Y0VjJ0NFZrMUdjSHBhUldSWFVtczVWMXBIYkZOaE0wRXhWbXhTU21WR1NYaFZiazVVVjBoQ2IxVnNXbmRYUmxwMFpVaGthbUpIZUZaVmJYTTFZV3N4Vm1OR2NGaGhNWEJRV1ZaYVlWSXhaSE5YYkdScFYwZG9XRlpHV21GU2JWWkhZMFZzVTJKRmNIQlpXSEJYVmxaYVdFMVVRbHBXYlZKWVYydG9TMWRIUlhsVmJHaFdZbGhTTTFwV1duSmtNa1pKV2tab1UwMUlRa2xXYWtreFdWWlplRmRyV21wU1YyaFhWRlZhZDFaR2NFZFhiR1JxVFZoQ1NWbHJXbXRVYlVwWVlVVTFWMkpZYUhGVVZtUlNaVVprV1dKR1VsaFNNbWgzVmxSQ1ZrMVhSa2RXYmxKc1UwZFNWMVp0ZUhkbGJHUnlWV3hPVldKRmNIcFpNRlp6VmxkS1NGVnJhRnBXVm5CaFdrUktUMU5YVGtkWGF6Vm9Za1p3VWxadGNFcGxSazE0VjJ4a1dHSnJOVlpaYTJoRFYwWnNjbGR1WkU5aVJuQldWVzB4UjFaVk1YTlRiR2hZWVRKb1ZGbFVSa3RXVmxweVQxWmFhRTFXY0VoWGJGWmhXVlphVjFOdVVtdFNNMUpQVm14b1FtUXhXbk5YYlRsb1RXdGFXRlpIZEdGV1IwcEdUbGRHV21FeVVuWlZhMXB5WkRGa2MxUnNhRk5XUmxwYVZrUkdWazVYUmxkVGJrNXFVbGQ0V0ZsVVNsSmtNWEJGVW14T2FrMVhVbnBXYlhoUFlVVXhWMk5HYUZkU2JIQlhWRlZrVW1WR1pITmFSbWhvVFRGS1ZWWnRjRU5rTVVwelYydG9iRk5IVWxoVVZscHpUbFpzVmxac1RsZE5SRVl4VlZkMGIxbFdTa1pYYmtwV1lXdGFXRnBHV2xkak1VWnpXa1UxYVdKWFp6SldiVEI0VGtaWmVWVllaRTVYUlRWb1ZUQldkMWRHYkhOaFJVNXFUVlphZUZWV2FHOVVNVnB6WTBWb1dsWlhhSEpXYlRGTFZtMU9SMk5HY0ZkV01VcEpWbTE0WVZsVk5YTlRiRlpTWWtoQ2IxbFVSbmRPYkdSVlUycFNhMDFWY0hsVU1WcHZZVlpLVlZac2FGVldSWEIyV1ZWYVlXTXhWbkpqUlRWWFRWVlpNRlpzWkRCaE1WVjRXa1ZvYUZKc1dtRlpiR2hUWVVaa1YxZHVUbGhTTVVwS1ZUSXhORlV5U2taalJtaFhZV3RyZUZsVVJtdFNNVTV6Vm14a2FWSnVRbGhXYlhCUFZXc3hSMWR1UmxOaGVteFVXVmh3VjFkc1duUmxSM1JYVFZac05WZHFUbk5XTVVwelYyeGtWV0pHY0V4YVJWcFhWMWRPU0dOR1RtbFRSVW96Vm0xd1EyRXlTWGxXYms1WVlrWmFVMWxzVm1GV1ZsSllaRWhPVDFKdGVGWldSelZQVmxkS1IyTkVRbGRXZWtFeFZtMHhTMWRXVm5KbFIwWlhWbTVCZWxadE1UUmtNVTVYVlc1U2FGSXllRmhXYlRWQ1RVWmFkR1ZIZEd4aGVsWllWbTAxUzFSc1pFZFRiazVXWWtaVmVGWXhXbk5YUjFKR1pFZDRhVkpzY0RWV2Frb3dZVEZrUjFOdVZsSmhNbEpoVkZWYWQxUkdXa2hsUlhSWFRXczFSbFZ0ZUd0V01VcFhZMFpzVjJFeFNraFZha3BPWlZaT1dXTkhSbE5OYm1oVlZtMHhNR1F4V2tkWGJsSnFVbGhTVjFSV1ZYaE9SbHAwWlVaa1ZtSlZWalZXVnpWRFYyMUZlRlpZYUZkaGExcG9WVEJrVTFKdFVrZGpSbVJYVWxad1dWWnNVa3ROUjAxNFYyNUtUbGRHV2xOWlZFcHZXVlphY2xadFJsWlNiRnA0Vlcxek5XRnNXbkpPV0hCYVRVZFNlbFpxUVhkbFYwWkdWMnhrVGxadVFuaFhiRlpoVkcxV1IxVnVTbUZTYkVwd1dXdGFkMlZHV2xoalJUbFNUV3N4TkZscldtOWhNVXBaVlc1S1ZWWnNjSHBVYTFwclYxZE9SbHBHWkU1U1JWcEhWbGN4TUdNeFdYaFhXSEJXWW14d1dGWnNXbmRqYkZaeFVtMTBhbUpXU2toWk1GcHJZVlpLZFZGck1WZE5ibEpVVldwS1VtVkdaRmxpUms1b1RWaENWMWRYZUd0T1JscEhZa1pXVW1KdFVsaFphMXAzVm14VmVGVnJaR2hOUkVaNVZtMXdVMVl3TVZoaFNFcGFWak5vVEZWdGVFOWtSa3B6V2tkc1YxSldiM2xXYlhoVFVqSk5lRmRZYUdGVFJYQldXV3hvUTFReFduUmtTRnByVFZkU1dGWnRNVEJVYkVsM1YyeG9WMDFxVmxCV2FrWmhVbXhPYzJGR1dtbFNia0pOVm10V1lWWXdOWE5TYkd4b1VtMW9WRmxyV25kT1ZtUllaRWRHV2xZd1dsbFZNblJ6VlcxS2RGVnNiRmRpVkVaVVZGUkdZVlpXU25OVGJYaFRZVE5DWVZkWGRHdGpNVlY0VjJ4c1VtSlViRmhWYlhoaFkyeFNjbGRyZEZkTlZuQjZWMnRrUjFVd01IaFRiRnBZVmpOU1dGWnFRWGRsUmxwMVZXczFVMUpXY0ZsV1Z6RTBaREZaZUZWdVRsZGhlbXhaVldwQ1lXVldWWGxPV0dSWFlsVldORmt3Vm05V01ERkhZMFJPVm1KVVJsQlZha1pQWTJzMVYxUnNaR2xTYkd3MlZtMHdlRTFHV1hoV1dHaFZWMGRvY0ZWdE1XOVdNV3gwWlVWMFYySkhlREJhVlZZd1ZsVXhWMWRzV2xkU00yaFFWbFJLUzFJeVRrZGhSbWhZVTBWS1dWZFdXbXRUTVVweVRsWmtZVkp0VWxSVVZFWkxWRlpaZUZkc1dteFNhelZKVm0xMFlWWXlTa2RqUm1oYVlrWndURnBXV21GV1ZrNXhWV3hPYVZacldUQldWRWt4VlRGUmVGZHVUbFJpUjJoWVdXdGFTMWRHVm5KWGJVWlRWbXRhZWxkclZURlViVXBIWTBac1YySlVRWGhXYWtaWFpFWk9jMkpHV21sV1IzaG9WbTF3VDJJeFVrZFhiRnBZWWtkU1dGWnRjekZOVmxwSVpVVjBhRlpyYnpKWlZFNTNWMFpaZWxWc2FGZFdSVnBZV1hwR2ExZFhTa2RYYldoT1RWVndXVlp0TVRCV01VMTRWR3RrYVZOR1NuTlZiVEZUVmtac2NsZHRSbGRpUm5Bd1ZGWlNRMVpYU2xaV2FsSmFUVVpaZDFacVJtRmpNazVKVTJ4d1YxSllRazFXYlhCSFdWWmtWMk5GWkZaaVYzaHZXbGQ0WVdJeFdYaFhiRTVVVFd0c05GWnRkR3RoVms1R1kwZG9WbUpIVWxSV01WcFhaRVV4VjFSc2FGZGlWa28xVm0weGQxVXhXbkpOVlZaVFlXdGFXVmx0TlVOVVJsbDNWMjEwVkZacldubGFWVnByWVVkRmQxZFVRbGRXZWtJMFZsUkdTMk14V25WVWJHaHBWak5vV1ZkWE1UQlRNVnB6VjI1S1dHSkhVbUZXYlRFMFYwWlplVTVWT1ZoU2JWSktWVmMxUTFadFJuSk9WbEphWVd0YWVsbDZSbUZrUmtwelZXeGthVkpZUWxwV01WcFhZVEZKZUZwSVRsaGlhM0JZV1ZkNFlWZEdXblZqUlZwclRWWndlVlpzYUc5V01rWTJWbXh3V21FeGNIWlpWV1JHWld4R2MySkdaRk5OTW1odlZsZHdSMWxXU25KUFZtUmhVbXMxY0Zac1duZGxiR1JYVld0T2EwMVdTbnBXTW5oWFZUSktTRlZzV2xWV2JGcG9XbGQ0YzJOV1VuUmtSMmhYWVROQ1dWWlVTalJVTVZsNVVtNUthbEpzU2xkYVYzUmhWMFphYzFkclpHcGlTRUpKV1d0a2MxVXhXa2RYYkd4WFlsaFNjbFJWV2s1bFIwcEhWMnMxVjJKSVFsWlhWbEpMVGtaa1IxZHVWbXBTYlZKVVZXMHhORlpzVlhsa1IzUlhUV3R3UjFSc1VrZFdiVXBaWVVST1dsWldWalJaZWtaUFkyMUtSMkZIYkZOTlJGRjNWbTEwVTFGck1WaFVia3BPVm14d2IxVnFTalJXUm14MFpFVjBWbEp0VWxsYVZXUXdZVlV4YzFOdWNGaGhNWEIyVmtkNFQxTkhSa2hQVmxaWFRURkplbFpYY0Vka01WcHpXa2hXVldKR2NIQldiR2hEV1Zaa1YxWnRPVk5OVjFJd1ZUSjBhMVpIUlhsaFIyaFdZVEZhYUZwWGVGTmtSMVpIVkcxd2FHVnRlRnBYVkVKaFZERlNjMU5ZY0ZwTk1taFlXVlJLVW1ReGJGVlRhelZzVW14d2VsZHJaSGRWTVVwMVVXeFNXRlpzU2xCWmFrWmhWakZrZFZSc1pGZFNWbkJVVmtaYWExVXlWa2RXYkdoUFZsUnNWMVJXVm5kbFZsbDVaVWhPV0ZJd1ZqUldNbkJQVmpGWmVsUnFVbFppV0doeVdrWmFZV014WkhKT1ZtUnBVMFZLVTFadGVHRmhNRFZJVlc1U1ZsZEhlRlZaVkVaM1ZqRnNjbFp1WkZoU2JFcFpXbFZXTUZaV1NuTmpSbXhoVWxkTk1WbFdWWGhqTVU1MVkwWmtWMDB5YURKWFZscHJWakpPYzFwSVRsWmlSbkJ2V1ZSQ2QySXhXbFZTYlVaWFRXeEtSMVJzV210WlZrcDFVV3hvVjJFeFdtaFViWGhoWkVVeFNWcEZOVmRpUjNjd1ZtcEtOR0l4V25SVGEyaG9VakpvV0Zsc1VrZFdSbHBHVjJ4d2EwMVlRa2RhUlZwVFZqQXhSVlpyY0ZoV1JVcFhWRlprUjFZeGNFWmhSMFpUVW14d1dWWkdXbXRVTURWSFkwVldWR0pGTlhGVVYzUnpUbXhzVmxkcmRHaFNWRVpZV1RCYVMxWXlSbkpUYmtwWFZrVndTMXBWV21GWFZuQkhXa2RvVG1KRmNETldNV1F3WVRGVmVWWnVUbUZUUlhCWVZtdGFZV0l4V25OVmEyUnNWbTE0TVZrd1ZtdFdNa3BIWW5wS1ZtSlVWak5XYWtGNFpGZEdTVk5zV21sWFJURTBWbXBHWVZVeVRYbFVhMmhwVW0xU1ZGWnROVU5UTVZweFUycENWMDFYZUZsV1ZtaHZWMGRGZVZWdVFsVldSVzh3V1RKNFYyTldSblJTYlhCVFlraENORlpyWTNkT1ZsRjVVMnRrYVZKR1dtaFdiRnBXVFZac1dFMVZaRTlpUmxwNFZrZDRkMkZGTVZkalJteFhZa1phYUZWdE1WZGpNVnAxVkd4U2FWSnVRbHBXVkVKWFV6QTFjMXBJU21GU1JrcFhWRlprVTFOV1ZYbGpSMFpXWWxWd1NGWXlNRFZXVmxwWFUyeG9WVlpGV21oV2FrWnJaRWRTU0dGRk5WZFdSbGt5Vm14a05HSXlSWGhXV0d4VVlrWmFXRmxyV21GWFJteHlWMnhhYkZKc1dsWlZiVEV3WVd4YWNsZHFSbGRTTTJoUVZsUktSbVZIVGtkalJtUk9ZbXhLV1ZkclVrZFdNazV5VFZaYVdHSkhhSEJaYTFwM1YwWmFSMWR0UmxwV2JGcElWbTE0YjJGdFZuTlhiRkpWVmpOTmVGVXllR0ZYUjFaR1ZHeG9VMkV5ZHpKWFZsWnZZVEZaZVZOclpGUmhNVXBYV2xkMFIwNUdWbkZTYm1SVVZteEtNRmxWV2s5aFIxWnpWMnBPVjJFeGNISlVWV1JPWkRBMVYxcEdhR2xTTVVwWVYxY3hlazFXV2xkaVNFNVhZbTFTYzFadGVGZE9WbXQzVm1wQ1dGSXdjRmhXTWpWelZsZEtSMk5HUWxkTmJtaG9XWHBLVDFKc1ZuTmpSMnhZVWxSUmQxWnNZM2RsUmxWNFUyNVNWV0V5VWxWWldIQlhWa1phZEU1VlNteFNiSEI2VmxkMGExWXdNVmRTYWxKV1lsUldVRmxXVlhkbFZsWjFVV3hhYVZKdVFrMVdiRkpIV1ZkT1YxUnVUbFZpUmtwUFZtMTRkMVl4V2xkYVJFSm9UV3RhV1ZVeWRHRlVNVnAwVld4b1ZtRnJOVlJXUlZwclZqRmFXV0ZHVWxOTlZuQklWbTB4TkZsV1dYbFRiR1JVWW0xNFdGWnJWblpOUmxaMFRWWktiRkpyTlhwV2JYaGhZVlpPUmxOc2JGaFdNMmhYV2xWVk1WSXhjRWxUYkZwb1RURktXRlpHV210Vk1XUkhWMjVTYkZKNmJHRldiWFJ6VG14YVdHVkdaRmRpVlZwNVZHeG9WMWxXV1hwaFIwWmhWbTFTV0ZWcVJrOWtSMUpHVGxkb1RsZEZTbWhXYlhocVpVVXhTRk5ZYkZOaVIxSlZWakJvUTFZeGJITmFSemxYVFZkNFdWcEZaRWRoUmtwelUyeG9WMDF1VFRGV01GcEtaREpPUmxwR1pGTmxhMVl6Vm0xd1MxTXhaRmhTYTJScVVtMVNWRmxyYUVObFZscElaRWRHVjAxV2JEUldNbmh6V1ZaSmVsRnNWbFppUm5BeldWVmFZV1JIVmtoa1JsWk9Va1phU1ZkVVFsZGlNa3BIVkd0b1ZtSkdTbGRaYkdoT1pVWlplRmR0ZEdwaVNFSkdWVmN4YjFZeVNrbFJiR3hZVmtWS1ZGZFdXbXRUUmtwWllVZHdWRkpZUWxsWFYzaHZWR3N4VjFkdVVrNVdXRkpWVm0xMGQwMUdjRVphUkZKWFRWVnNObGxWVWxOV01rcElWV3BPVm1WcmNFdGFSRUY0VTFkR1IxWnRiRk5pYTBwMlZteGpkMlZHVlhsVFdHaHBVMFUxV0Zsc1ZtRldWbHAwWlVWa1RrMVhVbmxYYTFKRFlVWktWVkpzYkZkV00xSnlWakp6ZUZOSFJrVlViR1JPVWpGS1RWWlVRbUZWTVdSWVVtdGthbEp0VW5OWlZFWjNWRlpaZVdWSFJscFdiR3cxVmxkMGIxWXlSWGhqU0U1V1lsaFNNMVpFUm1Gak1rWkdVMjEwVGxadGR6Qldha2w0VWpKR1JrMVZWbGRoTW5oWFZGYzFVMkZHYkZWU2EzUnFUVmRTTVZWdGVGZFdNbFp5VjJ4V1YySkhVVEJhUkVaclUwWlNjbHBHVm1sWFJVcFZWMWQwWVdReFRuTlhXR2hXWVhwc2IxUldXbmRTTVZKWFZtMDVhVkpyY0ZoV01uaHJWakpLVlZKc1VscE5ibWhYV2xaa1YxSnNaSFJrUlRWWFYwVkdNMVpyWkRSWlZsVjRWMWhvV0dKR1dsaFpWRVpMVjBaU1dFNVZUbE5TYlhjeVZXMTBNRlV3TVZaalNIQmFWbGRTU0ZaVVJtdFNiRTV6Vld4a1UySkdjRmxXTVZwclZURlplRmRzYkdoU2JWSnZXbGN4TkZaR1pGaGtSM0JQVmxSQ05GbHJhRXRXTWtwR1RsWmtXbUV4Y0ROVk1WcHpWbXhzTmxac1pFNWhNMEY0Vmxaa05HSXhXbGRYYTFwWVlXczFWMWxYZEhkVFJsWnhVbXM1YTFKcmNIbFViR1J6VlRGa1JsTnJNVmRoYTFweVZGVmtTbVZXU2xsaFIyeFRZbFpLV2xkV1VrZFpWbFY0WWtoU2ExSllVbTlWYlhoaFpXeGtjbGRyT1ZoU2EzQjZWVEkxYzFkSFJYaGpSa0pYVmtWYVRGa3ljekZXTWtwSFlVZG9UbUpGYnpKV01WcGhXVlpzVjFkWWJGUlhTRUpvVlcweFUxUXhiSFJOVnpsWFVtMVNlVlpYZERCVk1ERllWV3RvVjFaNlZreFpWVnBMWkVaV2RWRnNjR2xTTW1neVYydFNSMWxYVWtoVWExcHJVbFJzVkZacldtRk9iR1JZWkVaT1dsWnNjRWxWTWpWTFZERmtSbU5IUmxwaE1YQm9WRlJHZDFKV1NuTlhiWGhUWW10S1NsZHJWbXRpTWtaWFUyeG9hMlZyY0ZsV2JYaGhZMVpTYzFkdGRGTk5WMUo1VmpJeGQxVXlTbGhoUjJoWVZtMVJkMXBFUms1bFIwNUhXa2RHVTJKV1NsWldWM0JIVXpGT1YxWnVVbXhTZW14WFZGWmFjMDVzV2tkaFJ6bFhUVlp3UjFZeU5VdFdWbHBYWTBkR1lWWnNjRmhaZWtwSFVqRmtkR0ZGTldsV01taGhWbXBHYW1ReVZrWk9WV1JWVjBkb1dGWXdaRk5YUm14VlZHeE9hbFpzU2xoWGExSkRWREZhYzFOc1pGcFdWMDB4V1ZWa1MxSnRTa1ZVYkZaWFlrVndiMVp0Y0VkVE1EVnpWMjVLVm1KSVFsaFphMXBhVFVaa1ZWSnRSbGROYkVwSFZHeGFhMVp0UmpaV2JGSlZWbXhhTTFZeFdscGxWMUpJVW14d1YwMVZXWHBXUjNoaFdWWlJlRmRzYUd4U2JIQmhWbXRWTVZKR1duSlhiR1JxVFZad2VsZHJWVFZoVmtwMVVXdHdWMUl6YUhaWlZFWlhaRVpPYzFkck9WZFdNVXBvVjFaU1MySXhUa2RYYTFaVFlUTlNXRlp0ZUhkbFZscDBaVWhrVjAxcmNFaFpNRlp6VjBaYU5sSlVRbGRTUlZwb1dYcEdWMlJXVG5OVmJXeFhWbTVDVVZac1pIZFVNa2w0VTI1T1dHSkhVbGxaYkdoVFlqRlNWMVpVUm14aVJscDZXVlZrTUZack1YSmpSbHBYWWxob1dGWnFTa3RTTVZwWllVWmFWMUpXY0hsWFZFWmhVakpTVjFWdVRsVmlSVFZ2VkZab1ExbFdXbkZUYWtKWFRXeEdORlp0TlV0VWJGcFhZMFpzV21KWWFHaFdNRnBoWXpGa2RGSnRjR2xTYkd0NVZsWmFiMkl4WkVkVGJrNVlZbTE0WVZsVVJuZGhSbXhYV2tWMFZGWnJXakZYYTFwdlZqSktTVkZzYkZkWFNFSk1Wa1JHV21WV1RuSmlSbEpwVmxad1ZWWnRjRWRUTWxaeldrWm9iRkpzY0U5VmJGSkhaV3hhV0dWSFJscFdhelZIVkd4YWMxZHRTa2RYYWs1aFZqTm9ZVnBWWkVkVFIxSkhZMFprYUUwd1NtRldiWFJoVlRGSmVHSkdaRlJpYXpWWldXMDFRMWxXVWxaWGJtUlVVbTEwTkZZeWRHdGhNVWw0VjJ0b1dsWldjRkJXYWtaclVteE9WVk5zWkdsWFIyaFpWakZhWVZWdFZrZFZiR3hwVW0xU2NGbHJWbmRYUm1SWVpFZDBhVTFXY0ZoWmEyaFRZa1pLV1ZWdVFsVldiSEI2VkZSR1dtVlhVa2hrUjJocFVsaENObFpxU2pCak1XeFhVMnhrVjFaRldtRldiWGhYVGtaWmQxcEdaRk5OYTNCSVZtMHhjMVV3TVVWU1ZFSlhZV3RhYUZkV1duTldNVkp6V2tkd1UxWnNjRlpYVjNScllqRmtSMk5HYUd4U01GcFpWbTE0ZDFOR1duUk5WRUpYWVhwR1YxUnNWbXRXVlRGWFkwaHdWMkZyY0V4VmJYaHJaRWRHU0ZKc1pFNU5WWEJPVm0xMFlWbFdXblJXYTJSWVltdHdVVlp0ZEhkalJsWjFZMGhLYkdKSFVsbGFSVnByVm1zeFYxZHVjRmROVjJoNlZtMHhSbVZzVm5OYVJtUm9UVlp3VFZaVVFtRmpNbEpJVm10YVVGWnRVbkJWYlhSM1RsWmFWVk5ZYUZOTlZrcDZWVEZvZDJGR1NsZGpSbWhYWWxob00xa3llSE5XVmtweVQxZHdUbFpVVmpWWFYzUnJVakZWZUZOc2JGSmlTRUpaVm1wT2IxWkdWbGhqTTJoWFRXczFTRmRyWkVkVk1XUkhVMnhzVjJKWWFGUldha1pLWlVaV2RWUnNaR2xTVkZaMlZsY3hOR1F4V1hoWFdHeFBWbTFTV0ZsWWNFZFhSbGw1WlVWT1YySkdiRFpaVlZKTFdWWktSbU5GZUZaaVdHaFlXWHBHVDJNeGNFWk9WMnhUVjBWS1QxWnRNVFJaVmxWNFVsaG9WRmRIZUZWWmJYTXhWbXhzY2xkdVpGZE5WM2haV1ROd1IyRnRTa2hsU0d4YVZsWmFVRlpyV21Ga1IxWkpZa1prVjAweFJqTldiVEUwV1ZkU1YxSnNWbFJpUm5CWVZGUkdSbVF4V25Sa1IwWmFWbXh3ZVZSc1dtRldWMHBJWVVjNVdsWkZTak5VYlhoaFYwZFNTRkpzVGs1V01VcEpWMVJDVjFsWFJuTlRia3BxVWxSc1YxbHJXbmRXTVhCRlVtMUdhazFXY0hwV1IzaFhWR3hhVjFkVVJsZFdSVnAyV1hwR1lWZEdTbGxoUmxKcFVsUldhRlp0TlhkU2F6RkhWbXBhVTJKSFVuRlphMXBoVFVaU2MxcElaR2hXYTNCYVZWZDBjMVl4V2paUldHaFlWbXh3ZWxadGMzaFdiVVpJWlVaT1YySklRbGxXYlRCM1pVWlZlVlJ1VGxkWFIzaHpWV3hhZDJOc1VsZFdibVJPVW14S2VsWXllRTlXTURGWFkwaHNXbFpGTlhKV01GcGFaV3hHY21WR1pGTlNXRUpSVm0weGVrMVdXbk5hU0VwUVZtMVNXRmxVVGtOa2JGbDVaVWQwVGxKck1UUldWM2hyVmpGa1NHRkdhRnBYU0VKNlZsUkdjMk5zYkRaV2F6Vk9Wak5vTlZadE1UUlVNVnAwVTJ0a2FWSkdXbGhXYWs1U1pERmFkR1ZIUmxOaVJUVjVWMnRhVjJGRk1WbFJiR3hYVmpOb2FGWlVTazlqTVZaMVZXMXNVMVpHV25aWGJHUTBXVlpLVjFkdVNsaGlSMUpZVkZWU1IxTkdXa2hPVlRsV1RWZFNTVlpYZUZOWGJVcEhVMnhvVjJKR2NHaFpla1poVmxaS2MxTnJOVmROVlc4d1ZteGFhazFXVVhoV1dHaFVZbXR3V1ZsWGRFdGhSbHB6VjI1a1RrMVdjRWxVVmxZd1YwWktkRTlVV2xwaE1YQm9Wa2Q0WVdNeVRrZFNiR2hYWWxaSk1sWkhlR0ZVTVVsNFZHNVdWR0pIVW5CVmJYUjNWMFphUjFWclpGUk5WbkJZVjJ0YWIySkdTWHBWYkVKV1lXdGFhRnBYZUd0amJVWkdUMVpvYUdWclNURlhWbFpxVGxaYWRGSnVTbFJoYXpWV1ZteGFkMWRHY0VaV1dHaFRWbXR3ZWxrd1dtdGhWbHB5WTBWc1YwMVdjSFphUkVaV1pVWmtjMXBHVW1oTldFSjRWbFJDWVZsWFJrZFhibEpzVTBkU1ZGVnRNVEJOTVZsNVRsVTVWVTFyY0VwVlYzUnJWakpLV1dGSGFGZGhhM0JZV2tWa1YxSldTbk5hUm1SVFZtNUNXbFp0ZEZOU01VbDVWRmhzVkZkSVFtaFZha28wVmtaYWRHUklaRmRTYkhBd1dUQldNRlpyTVZaTlZGSlhZa2RvY2xacVJtRlNiR1IxVTJ4d2FFMXNSWGRYYkZaaFdWWk9SazFXVmxKaVJuQnZXbGQwWVU1V1draGxSazVTVFZac05WVXllRmRWTWtwelkwWnNWMkpZYUROVmVrWjNVbFpHVlZKc1pGZGlTRUYzVmxjeE5GUXlSbGRYYkZaV1YwZFNXRlJXV25kaFJscHhVVmhvVTAxVk5YbFhhMXByWVZkS1JtTklhRmRXTTBKUVZsUkdhMVl4V25WVWJXaFRWbGhDVUZadE1UUmpNRFZYWTBaYVlWTkhVbFpaYTFwM1ZteFdkR1JIT1ZkaGVrWXhWbGMxWVZkc1duTmpSa0pXVFVkU1dGVXdaRWRTTVhCSVlVZG9UbEpzYkRaV2Frb3dWVEZKZVZSWWJGVmlSMUpYV1cxMGQyTnNWbk5WYms1WVVteHNNMVl5ZERCV01ERllWV3h3V2sxR1dreFdSM2hoWTIxT1JtSkdXbWxYUjJodlZteFNTMU14V2xkWGJrNVhZa2RTY0ZWdGVGZE9SbHBYVld0a2FFMXJOVmhWYlRWWFZsZEtSazVXVWxwV1JWb3pWako0V21WWFVraGtSM1JPVm10dmQxWlVTalJpTVd4V1RVaHNiRkp0ZUdGV2ExWmhWRVpXY2xkdGRGZE5XRUpIVkRGYVUxVXlSalpXYWxaWVZteGFhRmxVU2tkV01VNTFWRzF3VTAxdGFGbFhWM2h2VVRGS1IyTkZWbFJpUjFKeFZGWm9RMU5zV2tobFJtUm9WbXh3U0ZZeU5XRldNVXB6WTBoS1ZWWldWWGhaZWtaclpGWldjazlXYUZOV1Jsb3lWakZrTkZZeVVYaGFSV1JZVjBkNGNWVnNaRk5aVmxwMFpFaGtXRkpzYkRWYVZWcFBWMGRHTmxKcmJGZFdNMmhFVjFaYVMxWXlUa2hoUjBaVFZqRktVVlpVUW10Vk1VbDRWVzVTYkZJeWVGbFZha0V3VFVaYWRHTkZkRTlTYlhoWVZsWm9jMVpYU25KalJrSldUVWRTVkZacVJuTmpiRnAxV2tkd1UySkZjRnBXUmxwaFZERmFSazFXWkZoaVJuQlhWbXBPVTJOc2JGZGFSWFJUWVhwV1dGZHJXbXRWTURCNFUyc3hWMDFXY0ZkYVZWcFBVMFphY2xkc2FHbFNiSEJRVmxkNFUxVXdNSGhYYkdoc1VqQmFXRlJXWkZOU01WRjRWMjA1VlUxV2NIcFZNbmh2VmpKS1IxTnNhRlpoTVhCaFdsWmtUMUpzY0VkVGF6VlhWMFZLU1ZaclVrZFpWMGw1VWxob1ZGZEhlRzlWYlRFMFZqRnNjMVZyV210TldFSllWako0YTJGdFNraFZibXhZWVRKUmQxbFZaRmRrUjFaR1lrWm9WMUpWY0ZsWFYzQkxVakZaZUZSdVNsaGlXRUpVVmpCYVMxZEdaRmRhUkVKVFlsWmFTRmt3V205aVJrbDZWV3hvVlZZelVtaFZha1pTWlVad1JWVnRhRmRoTTBKWVYxUkNZVmxXV1hoWGExcG9UVEpvYUZWclZuZFRSbFp4VW0xMFdGWXdXa2hXVnpGellVZFdjMWR0UmxkaVZFRjRXa1JHU21WR1VuSmFSM0JUWWxaS1dWZFhNWHBOVjA1WFZtNVNhMUl3V2s5V2JYaGhWMVpTVjFadGRGZGhla1pYV1RCV2ExWnJNWEZXYmtwWFRVWndjbFV4V2tkamJWWkhZMGQ0YUUwd1NrbFdNbmhYWVRGUmVGTlliRk5oTWxKWFdXeGtORmRHVWxoTlZ6bFBVbXhzTkZZeU1VZFdNREZ5VGxSQ1YxSjZWbEJXYTJSR1pWWldjMVZzY0dsWFIyZDZWMVpXWVZVeFduTmpSVlpXWWtVMVdGbHJXbmRYVmxsNVpFZDBUbEpzY0hwV01qVkxZVlpLUjFOc1pGVldNMEpZV1RKNGExWXhaSEpqUjNoWFRWWndTRlpzWkRSa01WbDVWbTVLV0dGNlJsaFdhMVpMWVVaV05sTnNUbGhTYkVwNVdWVmtkMVV3TUhsaFNGcFlWbXhLUkZwRVFYZGxSbVJaWVVkb1ZGSXhTbFpXUm1SNlpVVTFWMVp1VG1oU2VteHZXV3RXZDAxR2JGWlhiR1JZWWxWd1NWWlhOV0ZYYXpGWFkwaHdWMkZyV2xoWk1uaDNVMGRPUjFwSGJGaFNNbU4zVm0xNFUxSXhWWGhUV0doV1ltczFWVmx0ZUdGVk1XeHlXa1JTVjJKSGVIbFdNblF3VlRGS2MxWnFWbFZXYkZweVdWZDRZV014WkhWaVJsWk9WbTVDVFZaclkzaFRNV1JZVW10YVZtSkhVazlaYlhSTFVsWmtXV05GWkZSTlZXdzBWVEkxVDJGR1NYZFhiRkpYVFVaYVRGWnJXbUZTTVZweldrWndWMDFWY0ZsV2FrbzBXVlpaZVZOc2JGWmlSMUpXVm1wT1RtVkdWWGhYYlVaWVVsUldWMVpIZUdGaFZscFpVVzFHVjFadFRYaFZWRVpoWkVaS2RWTnNVbWxXTW1oWFYxZDRiMkl5VmxkalJtaE9WbGhDYzFscmFFTlRWbXhXVjIxMFZXSkZjRWRXYkdodlZqQXhXRlZZWkZwV1JVWTBWV3BLUzFJeGNFZGhSbWhUVFZWd05GWnNZekZrTWsxNFlrWmtWbUpIYUU5V2ExWkxWVVpXZEUxVVVsaFdiRXBZVm0xd1ExWXhTbkpqUmxwYVlURndNMVl5YzNoVFJsWnlZVVprYVZkRk5EQldWRUpyVlRGT1dGTnJaRmhpVjJoUFZqQldTMU5zV1hsa1IzUlBVakZLTUZaV2FITldSMFY0WTBaa1dtRXhXak5XTUZwVFYwZFdSbVJHVmxOaVNFSlpWbXhrTUZReFZYZE5XRXBxVTBoQ1dGVnFUbTloUmxweldrVmFhMDFyTlVsWlZWcFhWakZaZUZKWVpGZFdNMmhvVm1wR1dtVkdXblZWYkVKWFlsZG9kMVp0ZUc5Uk1EVnpWMjVHVTJKVWJHOVVWbVEwVjBaVmVXVkhPVmRXYkhCSFZqSXhiMVp0U2xsaFIyaGhWak5vVjFwRVJtRldWbHB6WVVaa2FWTkZTVEpXTVZKRFZtc3hXRkpzYUZSaVIyaG9WRlJPUTFkR2JGaGtSMFpYVW14Wk1sVXllR3RoYlVZMllrWm9WMDFxUm5wV2ExcExZekpPUjJGR2FGZGxhMVYzVjJ0U1MxSXhTWGhXYms1b1VsUldXRmxZY0ZkbGJHUllaRWQwVmsxc1ducFdNV2h6WVcxV2MxZHRPVnBoTVZvelZGWmFWMWRIVWtsVWJHUk9ZVE5DVjFaWE1ERmtNVmwzVFZoV2FGTkZjRmRaYkZKSFZFWlZlRmR0ZEdwTlZscDVWR3hhYTFZeFNuTmpSVFZYWWtaS1VGcEVSa3BsUms1MVZXeGthVkl5YUZsWFZsSkxUa1prVjJKSVRtaFNWVFZXVkZaa05HVldXWGxsUjBaVllrVndlbGt3Vm10V01WbDZWVmhrVjJFeFZqUlZiRnBMWXpKS1IxcEdaRTVOVlc4eVZtMHdkMlZHVFhsVVdHeFZZVEo0VTFscmFFTlhSbEpWVVd0MFYxWnNjSGxXVjNSclZUSktWMWRzYkZaTmJsSm9WbXRrUzFac1pISlBWbHBvWVhwV01sWlhNVFJaVmxsNFdraFNhMUl5YUU5V2JGSlhUbXhhV0dWSE9XaE5WbFkxVlRKNFYxWXlTa2hWYkdSYVlURndXRlJVUmxOV01XUjFWR3hrVjJGNlZqVldNblJoWWpGWmVWTnNaRlJpUm5CWldWUkdZVmRHV25GU2JVWnFUVmRTZUZZeU1YTldSa3B6WTBab1YxSnNjR2hYVmxwWFVqRmFjMkZIZUZSU2JrSjVWa1prTUdReFNYaFhiR2hzVWxoU1dGUlZVa2RsYkZWNVpFUlNWMDFXYkRaV1Z6VmhWMjFHY21OR1FscGxhM0JNVldwR2QxTkhSa2RVYld4b1RVaENNbFp0ZEdGWlYwVjNUVlZhVDFadFVuRlZiWGgzWVVaV2RXTklUbWxOVjNoYVdUQldUMVJyTVZkVGJHUlhWak5vY2xacVJrdGpNa28yVTJ4YWFWWkdXWHBXTVZwaFV6Sk5lVlJyVmxWaVZWcFVWbTE0Vm1WR1dsVlNiVVpYVFdzeE5WWkhkR0ZVTVZsNVlVaENWMDFIVWxOVVZWcGhZMVpPY1ZGc1pFNWhNVmt3VmxSR2IyTXhXbGhTV0d4b1VteGFZVmxzYUc5VVJsbDNWMjVPYTFKVVJsWldWM2hUVkd4WmVtRkdjRmhXUlVwb1ZrUkdZVlpyTVZkWGJHUm9Za1p3YUZkV1VrZFpWbEpIV2taa1YxZEhhRlZWYWtaaFVqRmFkR1ZIUmxkTmEzQllWVEkxYzFZeFdrWmlla0pXWWxSR1UxcFZXazlrVmxaeVQxWmthVkpZUWxwV2JURTBWVEZaZUZOclpGaFhSM2h4Vld4Vk1XTldVbGRXYm1SWVZteHdNRnBGWXpWV2JFcHpZMFphVjJKVVFURldNbmhhWlcxR1NHRkdaR2xYUjJob1YyeGFhMVl4VGtaUFZtUldZWHBXVkZWc1duWk5iRmw0Vld0T1dsWXdNVFJXTW5SclYwWmtTR1ZHWkZwaE1YQm9WakJhYzJSRk5WWlViR2hUWW10S1NGWnFTVEZVTWtWNFYxaGtUMVpXY0ZoVmJuQkdaREZzVjFkdFJsZE5helZIVjJ0YWExWXhTbGRqUmtaWFVteGFhRlY2UmxwbFJtUjFWRzFvVTJFd2NGbFhiR1EwV1ZaYWMxZHVVbXhTYkhCUFZtMTBWMDVHWkhKaFJXUldZbFZ3ZVZSc1dsTldiVXBaVlcxb1YwMVdjSEpaTW5oaFpGWndSMWR0YUd4aE1YQkpWbTF3U2sxV1dYaFhia3BPVm0xU1dWbHJWa3RXTVZweFZHczFUbFpzV25oVmJYUnJWMFpaZDA1VmFGWk5ha1o2Vm1wR1NtVnRSa1ZWYkdScFVtNUNiMVpzVWtkU2JWWkhWbTVLWVZKc1duQlZiVFZEVmpGa1YxVnJUbXROYTFwSVZsZDRZVmxXU2tkVGJGSlhZbGhvYUZZd1dtdGpiSEJGVVd4a1UwMUlRa2hXYlRGM1ZERmFkRk5zVmxKWFIyaFlXVlJHZDJGR1duUmpla1pYWWtaS2VsbFZaRzloUlRGWVQxUmFWMDF1VW1oWFZscHpWMFpXYzFwR2FHbGhlbFo0VmxkNFUxWXhVWGhYYms1b1VsVndjMWxyV25OT1JtUnlZVWQwVjFJd1dUSlZiWFJ2VjIxR2NrNVlXbHBXVmxZeldsWmtWMUl4U25OYVIyaE9WbTVDZGxZeFVrTlpWMDE1Vld0b1YyRXhjSEpWYlhNeFkwWldjVlJ0T1U5U2JIQldWVzB3TldGVk1YSlhhMmhXVFZkb2NsWXdaRXRUUjFaSFYyeHdhRTFzU2pKV1JsSkhXVmRPYzFwSVVsTmhlbXh3VlcwMVEwNXNXblJOVkZKcFRXdGFXRlV4YUhOaFJrcFZVbXhvVm1KVVJsTlVWVnAzVWxaS2RHUkdaRTVXYTNBMlYxWldZVkV4V1hoYVJXaG9VbTFvV0Zsc2FGTlhSbFkyVW14T1YwMVdjRnBaVlZwcllVZFdkR1ZHVWxoV00xSnhWR3hWZDJWSFNrbFRiR1JwVWxSV1dGZFhkR0ZqTURWWFYyeG9hMUpGU2xoWmExcDNVakZWZVdSSE9WaGlWWEJhV1ZWYVExWXlTbGxoUmxKYVRXNW9VRnBGV2t0amF6VllZa1pPYVZkSFRqVldiVEV3V1ZaWmVGZFlaRTVXVjFKV1dXMXpNVlpHV1hkYVJrNVhVbTE0ZWxaWGVHdFdNVnB6WTBod1YySkdTa2hXVjNONFYwWldkV0ZHV2xkbGJGcFJWbXhTUjFNeVRuTmFTRTVwVW0xb2IxUldXblpsYkZweldraHdiRkpyY0hwWGEyaFhWakpLUjJORk9WZGlXR2d6VmxaYVlWWXhjRVZWYlhScFZtdFpNVlpVU2pCWlZscDBVMnRrYWxORlNtRlpiR2hUVkVac2NWSnRSbXBXYTFwNlYydGtNR0ZXV25OalJteFhUVzVTZGxaRVNrZFNNVTV6WWtaYWFWSnVRbGRXYlRCNFZXc3hSMWRZYUZoaVJUVllWRlpvUTFKc1dsaGxSazVvVm10d1dsVlhkR3RXTVZwMFZHcE9WVlpzY0doVk1GcExWMWRHU0dGSGVHaE5XRUphVmpGYVUxSXlVWGhWYTJSWVltdGFWRmxZY0hOalZsSlhZVVZPVkZKc2NFbGFWV1F3WVVaS1ZWRnFUbFpOYWxaeVZtcEdZVkp0VGtWVWJGcG9ZVEZ3VkZkc1ZtRlVNbEpYVlc1T1lWSXllRzlhVjNoaFdWWlplRmRzVGxOTmJFWTBWakZvYjJGV1RrWmpSbVJhWWxoTmVGWnFSbGRrUjFaSVVteG9VMkpJUWpaWFZsWnFUbFphY2sxWVNsZGhiRnBXVkZaYVMxWkdXbk5YYlVaWFRWVTFNVlV5ZUdGaFZrcDFVV3hzVjJGclNsZFViRnByVW1zMVYxcEdXbWxTTVVwWlZtMTBZVmxXU2xkWGJrWlVZbTFTVTFSWGMzaE9SbFY1WkVkMFZrMXJjRWxaVldSdlZtMUtTR0ZGVWxkV1JWcFVWbTE0WVdSR1NuUmtSbVJwVW14cmQxWnRNSGhsYXpWWFZtNVNWR0V5YUZGV2ExVXhXVlpzVlZKdFJsZFNiSEJaV2xWYWQySkdXbk5YYm14aFZsWndhRmxWWkVabFZUbEpXa1prVTJKRmNFbFdiWEJIVjIxV1NGUnJXbUZTYkZwd1ZtcEtiMVZHWkZkaFNHUlhZbFpHTkZZeU5WTlViRXBHVjI1S1ZWWXpVbWhhVmxwVFZqSkdSazlXYUZOTlJuQTJWMVJDWVZZeFdYbFRhMlJxVWxkb1ZsWnJWbUZqYkd0NFYydDBhbUpJUWtoV1YzaFBZVmRGZDJORmRGZE5ibWhZV1ZSQmVGSXhXbGxhUlRWWVVtdHdiMVpHVWt0T1JtUlhWMWhrYUZKVk5WZFZiWGgzVm14VmVXUkhkRmhTYTNCNldUQm9kMWRzV2xkV1ZFWlhZV3RHTkZwRlpFZFRWbkJIV2tkc1dGSlZjRXBXYWtaaFlURlplVlJZYUZaaVIzaG9WVzE0WVdOR1ZuTlZiR1JzWWtkU1dWcEZZelZWYXpGWVZXNXdWMkpIYUhwWlYzaExWMVpXZEZKc1pHbFdSVnBWVmxkd1IyTnRVWGhhU0VwVllrZG9WRmxyYUVKa01WcHlXa2hrVmsxWFVqQlZiR2h2VjBaa1NGVnNhRnBoTWxKVVZrUkdkMUpXUmxWU2JHUnBVbXh2ZDFaWE1IaE9SMFpHVFZWc1VtRjZiRmhaYTFwTFUwWmFjVkpzU214U2EzQXhWa2N4YzFSck1YTlRibVJYVmpOb2FGVjZSbFpsUm1SMVVteFNhVkpVVmxaV1JscGhXVlphYzFac2FHdFNNMUp2Vm1wQ2QxSXhVbk5YYlhSWFRWVnNObFpYZERSWFJscHpWbXBTVmsxSFVsaFZiWGhoWXpGa2MxcEhiRmRoTTBFeFZtMTRVMU13TlVkVWJsSlhZa2RvV0ZsVVNqUldNV3h5VjJ0MFdGSnNjSHBXVjNoclZHeGFkRlZzYUZkV00xRjNWbFJCZUZkR1ZuTmhSbHBwVmtaYVRWWnRkR3RUTVZweldraE9WbUpHV2xoWmExcDJaVlphUjFkdFJsaGlWbHBaVm0xMGIxVkdXbk5YYXpsYVlURndNMVJ0ZUd0V1ZrWjBVbTF3VGxadVFsbFdha1p2WXpGYWRGSlljRlppUjJoaFZtdFdZVlJHVmxWU2JFNXFUVmRTZVZReFdtdGhWazVHVTJ0d1YxWjZRalJaYWtaV1pEQXhWbUpHU21oTk1VcFpWMVpTUzFRd05VZFZia3BZWWtVMVZGUldXbmRYYkdSeVYyeE9WMDFWY0ZaV2JYaFhWakZhTmxKWVpGaFdiRlkwV1hwR2QxTldTbk5UYld4b1pXeGFWbFpzWTNoTlJteFhXa1prWVZORmNGaFpiVEZUVmpGc1dXTkZaRk5OVm13MVZHeGFhMVl5UmpaU2JHaFhUVzVvUkZadGVGcGxiVVpGVTIxR1UxSllRazFXVnpFMFZqSk5lRlJ1VG1GU1ZGWndWV3hvUTFSc1duUmxSMFpXVFZWV05GVXhhSE5XUjBweVRsWmFXbUV4Y0ROV2JYaHpWbFpHZFZwSGFGTmlSWEJZVmpKMFUxVXhXa2hUYTJSWFlXeGFWbFp0ZUV0V1JteFdWbGhvVjJGNlZsZFpWVnByVkcxS2NsTnNiRmRoYTJ3MFZYcEdhMU5HV25KWGJGcHBVMFZLV1Zkc1pEQlpWbEpIV2toT1lWSkdTbUZXYWtaTFYwWlplVTVXVG1oTlZYQjVXVEJWTlZkdFNrZGpSWGhWWWtad1lWcFZXbXRrUmtwMFlrVTFWMVpzYTNkV2JHTjNUVlpSZVZKdVRsUmlSMmh2VlcweFUxbFdiSE5WYTFwT1VtMTRWMVl5ZUhkaE1ERlhZMFphVm1KWVRURlpWbHBLWlVaT2NWZHNhRmRpUm5CWVZrWmFhMUl5VFhoVWJrNVhZbGRvVDFSVVFrdFdNVnAwWlVkR1dHSldSalJXYkdoellrWktWMk5JU2xWV2JGb3pWRlZhVTJNeFpITlViR1JPVm01Q1YxWnRNVEJWTVZsM1RWaFdVbUV4U21GYVYzUmhWRVpXY1ZKcmRHcE5hMXBKVlcxNFQxZEdTbFpqUmxaWFlURndXRlpxUm5OWFJsWnpXa1prV0ZJeWFGbFhWbWgzWXpGVmVHSklTbHBsYkZwUFZGWmtOR1ZXV25ST1ZUbFhWakJ3UjFsclVsZFdNVm8yVW01YVYyRnJjRWhaTW5NeFYxWmtjMVp0YkZoU01tZzFWakZvZDFJeFZYbFViazVXWW10d1VWWnNVbGRXUm14VlZHdE9WMVpzYkRSWGEyaHJWa1V4Y2xacVVsZFNlbFpRVmxSR2ExTkdWbk5WYkhCcFVtdHdXVlp0ZUdGWlYwMTRWMnhXVTJKRmNFOVdha1pMVGtaYVYxbDZSbFZOVmxZMFZUSTFTMWRIU2tobFJteGFWa1ZhYUZSVVJtRlhSMDE2WVVaT2FWSXhTWGhXYlRFMFdWWlNjMWR1VG1wU2ExcFlWbTB4VWsxR2NFaE5Wa3BzVm1zMWVWWXllR0ZoVmtwWlVXeHNWMUp0VVRCVmVrWlRVakZrYzFac1NtbFNNVXA1Vmtaa2VtVkZOVWRoTTJSWFlsVmFiMVZ0ZEhkTlJscFlUbFU1VjAxcldubFZNbkJQV1ZaS1JsZHNhRmRoYTNCSVZUQmtVMUl4WkhOVWF6VlhWak5STVZadGVHRmhNREZHVGxWa1dHRXlVbGxaYTFwM1ZVWmFjMVpVUmxoV2JYaFpXa1ZXTUdKSFNrZFhibXhYVFc1U2NsWXdXa3RrVmtaeVdrWndUbEp1UWsxV2EyUTBVekZaZVZSclZsTmlSMUpZVld4YWQxZFdXbkpWYTJSVFRXc3hOVlV4YUhkWlZrbDVaVVpTVjJKWVVqTldhMXBoWkVkT1JtUkdXazVXVkVVd1ZtMTRiMkV4V25SU1dHUlBWbXh3VmxadGVHRlhSbEp6VjI1T2FtSkdjSGxhUlZwM1ZqRmFSbGRyY0ZoaVJscFlWbXBHWVdNeFpIVlZiRnBwWVROQ1dGWkdZekZpTVVsNFkwVldVMkV6VW5KVmJGSlhWMFphV0dWSGRGZE5WbkJJVmpKMFYxWXlSbkpqUkU1V1ZrVndUMXBWV2xOak1XUnlUbFprVjJKclNsSldiVEUwV1ZaTmVWSnJaR3BTYldoeVZXeG9VMVpzV25SbFJtUlBVbXh3TUZremNGZFdiVXBXWTBWc1ZVMVdTbEJXTWpGR1pVWmtjMVZzWkZkTk1taG9WMnhhWVZZeVRuUlZhMlJZWWtkU1ZGWnNhRU5UYkZsNFdUTm9UMUpzUmpSV01qVlBWbTFLY21OR1ZscGlSbHBvVmtSR1ZtUXhXbkprUmxKcFVtNUNObFl4YUhkU01XUnpWMWhrV0dKSGFGaFVWbVJ2WTJ4WmQxcEZkR3RTYkZvd1ZXMTRkMkZXU1hsaFJsWlhZa1phYUZwRVJrOVNhekZYV2taV2FWSXlhRlZXYlhSaFdWWlplRmRzWkdGU1JVcHlWRlphVjA1R1ZYbGtSMFpYVWpCd2VsWXllRzlXTWtwWllVZG9XazF1YUdoVmJGcFBZekZTZEdSR1RtbFNia0V5VmpGYVYxWnJOVmRYV0doVVlrWndjVlZ0ZUdGWFJscDFZMFprVGsxWGR6SlZWbWh2VlRBeFdWRnJhRmhoTWxKSVZtdGFTMVpXV25WaVJtUnBWMFZLUkZkc1ZsWmtNbFpJVTJ0c1ZHSlhhRlJaYkZwTFYxWmtWMkZJWkZOTmJGcDZWakZvYzJGc1NuUlZiVVpYWWxoU01sUlhlRmRrUjFaSVQxWndWMkpJUWpaV2FrWnZZVEZhZEZKWWJGWmhNbWhXV1d4b2IwMHhWblJsUjBacVRWZFNlbGRyWkRSaFZtUklZVVpPVjJKWWFHaFdWRVpPWlZaU1dXRkdUbWxoZWxaM1ZrWlNTMVV5VGtkV2JrNVlZVE5TVjFSV1duZGxSbFY1WlVVNVYxSlVSbGhXTW5oaFZteFplbFZ1U2xwV2JWSk1WVzF6TVZZeGNFZGFSazVPVFZWd1RsWnFSbUZXYlZaSFZHdG9WMkV4Y0hCVmJURlRWREZzZEdSRmRGUldiVkpZVmpJeE1GWkZNVmRqU0d4VllrWmFlbGRXV2t0a1ZrWnpZVVp3YVZKc1dYcFhiRlpoWVRKT2MxcElUbUZTTTBKUFZteFNWMU5XV1hsa1J6bFhUVmRTU1ZVeWVITlZiVXB5VTJ4b1dsWkZXbWhaVlZwM1UwZFdTR1JIY0dsU2JrSTJWakowWVZVeFVuTlRhMlJZWWtoQ1dGbHJaRkprTVd4eFVteHdiRlpyTlRGV2JYaExZVWRXY2xkc2FGZGlXRkpZVjFaYVUxSXlSWHBhUm1ocFlsWktXVlpHWkRCWlZrNUhWMnRvVGxkRk5WZFVWVkpIVW14YVYyRkhPVmhTTUZZMFZUSjBORmRzV2taWGF6bGhWbFp3VkZreWVHdGpNVlowWVVkc1UySnJTbWhXYWtaclRVZEZlRlpZYUZkaE1sSnZWRlJLVTJGR1ZuTlZiR1JxVFZad2VGVlhOV3RXUjBwSFlrUldWVlp0YUZCWlZWcExZekpPUjFwR1pHbFNhM0JKVm0weGVtVkdXWGhhU0U1V1lrWndUMWxYZEdGVlZscFlUVlJTVjAxck1UUldSelZUWVZaS1ZWWnVRbGRpV0ZJelZrWmFZV014WkhOVWJFcE9WbGQzTVZaVVNURlVNVnBZVTJ0a2FsSnNjR0ZXYTFaTFRURnNWbGRzVGxkaVNFSkdWbGQ0VDFZeVNrZGpSbXhYVFc1U2NsUlZXbUZUUms1eVYyeGthR0Y2VmxoV1JscGhVekZXUjFkc1ZsTmhNMUp4V1d0a1UyVkdWWGxsUnpsb1VqQldNMWt3VW1GV01WbDZWVzFvVm1GclduSlZha3BQVW14a2RHTkdUbWhOTUVwUlZteGtORmxYVVhkTlZtUllZa1phVkZsclpGTldiRkpYVm0xR2JHSkhlSGhXUnpFd1lVWmFjbU5HYUZaTmJtaFFWbXBLUjJOdFRrZFZiRnBzWVRGd1dWWnRlR0ZTTWs1elkwVm9hVkl5ZUZSV2ExcGFUVlpaZUZkc1pGcFdNRlkxVld4b2IxZEdaRWhWYkd4YVlUSm9SRll3V21Ga1YwNUhXa1UxVGxac1dURlhiRlpYVFVaVmVGZHVTbGhoYTBwV1dXdGFkMlJzV25GVGEzUllVakJhUjFSV1dtOWhWa3AxVVcwNVdGZElRa2haVkVaclVqRk9jMkpIYkZOaE1IQlpWbXBDWVZNeFZrZFhiR2hzVWpOU1VGVnNVa2RYUmxsNVpFZEdWMDFyV1RKWmExcFBWMjFLUjFkcVRtRldNMmhvVldwS1IxTkhVa2RhUms1cFVucG9OVlp0TUhobGF6RlhWMjVPV0dFeGNGVlpWRXB2WVVaV2RHVklaR2hTYkZwNFZXMHhSMkZ0U2xaT1ZXeGFZVEpTZGxaSGMzaGtSMFpHV2taa2FWSnVRbTlYVm1SNlpVWlplRmRzYkdGU1ZGWllWbTAxUTJReFdsVlJiVVphVm14d2VsWnROVTlXTVZwR1YyeE9WVlp0VVRCVVZWcDNWbXh3UmxwR1drNWhNMEpJVmtkNFlXTXhXbGhUYTJSWVZrVktXRmxYZEdGVlJsWjBZM3BHVjAxVlducFdNbmhyVlRGa1JsTnFVbGROYmxKVVZXcEdVMlJHVmxsaVJsSm9UVmhDV0ZkWGRGZGtNV1JIVld4b2JGSllVbFpWYlhoM1YwWmFXR1JGT1ZaTlJFWjVXVEJvZDFZeFNYcGhSMmhYWWtkU1IxcEVTazlUUjBaSFZteGtWMDFWVmpOV2JHUTBXVlpaZUZkWWFHcFNWMmh5VlcxNFMyTkdWbk5YYkhCc1lrWndXVlJWYUd0VWJGcHpZMFZvVjAxdWFHaFdSRVpoWXpGT2RGSnNaR2xXUlZwVlZtcENZVmR0VmtkYVNFNWhVak5TVkZSV1duZFRiR1JWVVcxMFQxSnNiRFJXTW5oclZqRmtTR0ZHYUZkaE1WcG9WakJhYzFkRk1WZGFSbEpUWVROQ05WZFdWbUZoTWtaR1RWWmFhbEo2YkZoVmJURk9aVVphVlZKdVRsZE5hM0JLVmxkek1WWXhTbFZXYm14WFVteHdjbFpVU2xkak1rcEhWMnhrVjFKV2NIWlhWbWgzVWpGT1YyTkdXbGRpVlZwWVdXdGFkMDFHYkZaV2JFNVhUVlp3V1ZaWGVGTldWMHBaWVVWb1drMXFSbGhWYWtaWFl6RndSMXBHWkZOaVNFSkhWbTB4ZDFNeVVYaFNXR3hWVjBkb1ZWbFVTbE5XUm14eVdrYzVhRkpzV25wWlZWWlBWbXN4VjFOc1pGZGlWRVpJV1ZSR1lXTXhXbkZWYkdScFYwVXdlRlpzWTNoVE1VNUdUMVpXVldKSVFtOVVWbHAzVmxaYWMxcEVVbGhpVmxwWVZtMDFTMkV4U25OalJtaFdZa1p3TTFaR1dtRlNNVlp5V2tkd1RtRjZWbGxXYkdNeFZUSkdjMU5ZWkZoaGVteFlXV3RhWVUweFduUmxSMFpYVFZkME5sZHJaRFJWTURGSFkwWnNWMVpGY0ROWFZtUkhWakZPY2xkdGNGTk5SbkJYVm0wMWQxSnJNVWRqUldSWVltczFjVlp0ZEdGTlZtUnlWMnhPVmsxcldUSldiWEJUVmpKS1ZWRnFVbFZXVm5CWFdrUkJlRll4Y0VoaVIzaG9UVEJLV1ZacldtRlpWbXhYVmxob1ZtSnJjRmxaYlhoM1l6RmFkR042Um14V2JYaFhWakowVDFZd01YTlhibkJYVFc1TmVGWnFSbUZqTVU1eVlVWmFiR0V6UWxGV1YzQkxWREZKZUdORmFHaFNhelZ2V2xkNFlVMHhXbk5hU0dSU1lYcEdSMVJXV210aFZrcHpWMnhXV21KSGFGUldha1pYWTFaR2RGSnNaRTVXYkc5M1YxUkNWazVXV1hoVGJGWlRZa2RTVmxscldtRlZSbVJYVjJ0d2JHSkdXakZaTUZwaFZHeEplRk5zYkZkV1JWcG9XVlJLVTFJeFRuVlZiWGhUWWxaS1VGZFhkRmRXTURCNFYyNVNhMUl3V2xoVVZscFhUa1phU0U1VmRGVmlSbkJZV1RCb1MxWnRTbGxoUlhoYVlXdGFNMVl3VlhoV01WSnpWRzFzVTJKclNscFdha1p2WkRGWmVWSnNhRlJoTVhCUVZtMHhVMWRHVm5GVWJFNVZVbTFTV0Zac2FHOVdSa2w0VjJ0a1YySllhR2hXYWtwTFZqRk9kV0pHWkZkU1Z6aDNWbGN3ZUZWdFZrZFVibFpXWVhwc1dGbHJWbmRYVmxwMFpVWk9WMDFWY0VoV01XaHpZV3hLVms1WVJsVldiRm96VlRCYVYyUkhWa2hQVm5CWFlUTkNZVlpzWkRSV01WcDBVMnRrV0dGcmNHaFdiWGgzWTJ4cmVVMVZaRlJXYkVwNlZUSXhiMkpIU2xsaFJteFhUVmRSZDFacVNrcGxSbFoxVkcxR1UxWnVRbFpYVnpFd1V6RnNWMWR1VWs1V2F6VnhXV3RrTUU1V2NGWmhSWFJvVFVSR1dWcEljRXRXTWtwWlZGaG9WMUl6YUZCVk1HUkhVbXhrYzFwR1pHbFdWRkYzVmpKMFUxTXhTWGhYYmtwT1ZsZDRiMVZ0TVc5aU1XeFZVbTVrYVUxV2NGbGFWVnBoVkd4WmVGTnNhRnBoTVhCWVZtdGtTMUpyTlZkaVJscHBVbXR3V1ZacVNqUldNV1JHVFZaV1VtSkhVbFJaVkU1RFZqRmFXRTFZWkZWTlZuQjVWRlphYTFkSFJqWmlSMmhXWVRGYWFGUlhlSGRTVmtaWllVWmtUbFpzYjNkWFZsWnJUa2RHVjFkdVNtcFNWMmhZV1d4b2IyRkdiRmhqZWtaWFRWWmFXbGxWV2s5WFJrbDZZVWhrVjFZemFGaGFSRXBIVWpGV2MxZHRSbE5TYTNCVlZtMHhORmxXWkVkYVNFcGhVa1ZLV0ZWcVFuZFNNVnAwWTBVNVYySlZjRlpWVm1odlZqSkZlR05IYUZkaVdFMTRWbTE0VTJNeVJraGhSMmhPVTBWRmVWWnRlR3ROUm14WFUxaG9ZVkpYVW5GVmJGcDNZMVpXZEdSSVpGVk5WbHA2VmpJMWExUXhXbk5qU0doV1lsUkdNMVpIZUZwa01ERlZWR3hXVjJKR2NIbFhWbVEwVXpKU1NGWnJaRmhpUjFKdldWUk9RMVpXV25KYVJGSnJUVmRTU1ZaSGRHRldWMHBZWlVoQ1ZtSkdTa2RhVjNoaFl6RndSVkZzY0ZkaVdHaFlWa1phWVZsV1draFNXR2hxVWpKb1YxbFVSbUZOTVd0NVpVZEdVMkpIVW5sYVJWcFBZVlpLZFZGcVVsZGhNbEV3VmxSR1dtVkdaSE5XYkdSWVVqTm9XVlpHWXpGUk1VcEhZMFZXVTJGNmJGaFVWbFozVFZaYWRHVkhPV2hXYlZKSVZUSTFkMVl5U2xsUmJFSlhWa1ZHTTFwVldtdGpiRnB6Vm0xc1dGSlZjRFZXYTFwaFZtMVdSazFJYUZoaVIyaHpWV3hvVTJJeFduTlZhMlJPVW14d1dWcEZVa05XTWtwSFkwVmtWazF1VW5aV01qRkxWMWRHUjFGc1pHbFhSMmhWVjFSS05GUXlVa2RUYmtwUFZtczFUMVJYTVc5VFJscDBaVWRHV2xZd1ZqVlZiR2h2VmxkS2NrNVdVbGROUjFKVVZtdGFjMk14Vm5OYVJtUlhZa2hDTmxadGVGTlNNVlp5VFZab1ZtSnRhRmRVVnpWT1RWWnNWVkpyZEdwTmF6VktXVlZhWVZZeVZuSldhazVYWVd0S2FGVjZSbXRXTVVwellrZG9VMkpJUWxCV2JURTBaREF4YzFkc2JHcFNXRkpYVkZkNFMxTkdXblJPVlRsb1VtdHdWbGxyV205V1ZscEdWMnQ0VjFJemFHaFdha1pYWTJ4d1IxVnJOV2hsYkZwS1ZqRlNRMWxYUlhsU2EyUlVZbXR3VUZZd1ZrdFdNV3hZWkVWYWEwMVdTbGhXTWpWclZURmFjazVVUW1GU1ZuQlVWa2Q0WVZaV1duSmhSbVJYVWxoQmVsWnRjRWRoTVU1SFZHNUthRkpzY0hCVmJGWjNZVVphUjFadGRGWk5Wa1kwV1RCYWExbFdTbGxWYkZaWFlsUkdWRlJWV25OamJIQklUMVprVGxKRlNUQldWRXAzVWpGWmVWSllhRmhpYTNCaFdsZDBZVk5HY0VaWGF6bHJWbXMxTUZscldrOVdNa1Y2VVcwNVYyRXhjSEZhVlZwV1pVWldkVlJ0YkZOaVZrcFpWMVpTUzFVeVRsZGlTRXBvVWxVMVZWVnRNVk5YYkd0M1ZtMTBhRkl3Y0VkWmExSlRWbXN4ZFZWcVRsZGhhMXBNVkcxNFMyTnRWa2RYYlhob1RWaENVbFpzWTNoT1JsRjVWR3hrVldKc1NsUlphMVV4VmtaYWRHVklUazlpUm5CNVYydG9hMVZyTVZkV2FsSlhZbFJXVkZacldtdFRSMVpJWVVaYWFWSXlhRVZXYkZKSFZURmFjMWR1VWxOaVdGSllXV3RhV2sxR1duUk5XSEJQVm14YU1GVXlkRzlWUmxwR1RsZEdXbFpGV21oV2ExcGhWMGRXUjJOSGVGZGlSbkExVjJ0V1lWbFdXWGhUYkZwcVVsaG9XRlZxVG05aFJsWTJVbXR3YkZKck5URldiWGh2WVZaYVYyTkdRbGRXTTBKUVdXcEdTMk14WkhOYVJtaHBWMFpLZGxaR1dsWk5WMVp6Vm01T2FGSXpVbGRVVjNSM1ZteGFkR1ZHWkZkTmEzQklWbXhvYjFac1drWlhia3BhVFZad1NGcEdXbE5qTVZKelZHMW9UbGRGU2xoV2JYUlRVakZzVjFOWWFHbFNiV2hZV1cxMGQxWldiRmxqUldSWFRWZDRWbFZ0Tld0V1JrcDFVV3RzWVZaWGFHaFpWRUY0WTIxT1JscEdaRmROTW1oTlZtMXdRbVZIVFhoVWJrcHNVbTFTV0ZsclZuZFNWbHBZWTBWMFZFMXJNVFJXVnpWUFYwZEtSMWR0T1ZWV1YyaEVXV3BHWVZJeFduUmtSVGxUWVROQ1dWWnRNVFJoTVZwMFUyeFdhVko2YkZaV2JYaDNaV3hTZEdWSGRHcGlSM2N5VlcxNGIxVXlTa2xSYTJoWVZucFdNMVZVUm10ak1XUnpZVVphYUdWdGVHOVdiWEJQWWpGYVIxZHVUbUZTV0ZKVVdXeFZNVk5XYkhKWGJYUlZZWHBHTUZaV1VrTldNa3BaVVd0MFlWSkZjRk5hUkVFeFZtMUdSMWR0YUU1aVYyaFhWakZhVTFNeVNYbFVhMlJYVjBkU2IxVnNWVEZqVm14eVYyMUdWMkpHV2xsVWJGWXdZVWRLVm1ORlpGcE5SbHAyVm0weFMxWldXblJoUm1oWFlrWlpNRlpVUW10V01VcHpWMjVPV0dKSFVuQldiWFIzVGxaYWMxVnJkRTlTYTNBd1ZsWm9iMVpIU25OVGJFSlhZbGhvVEZZd1dtRmpNVlp6V2taT1UySkhkekZYVkVKWFZESkdjazFXV21wU1YyaFhXV3hvYjJSc1pGZFhhM1JZVm10YWVsWkhlRmRXTVZwelkwYzVXR0V4Y0doWFZscGhZekZrZFZWdGRGTldSM2hWVmtaV1UxWXhUbGRYYkdSYVpXdGFWVlJYZEdGVFJscElaRWQwYUdKRk5VZFdNbmhoVmpKRmVGZHRhRmRTVm5CVVZtcEdhMlJIVWtkYVJUVlhUVEZGZVZZeFdsZGhNazE0Vmxob1dHRXlhSE5WYTFVeFYwWmFkR1ZJWkZkU2JYaDRWVzE0YTFZeVJqWlNhM0JZWVRGd1ZGbFdaRXRUVmtaMFlVWmtVMkpHY0ZoV1JscGhVekZKZVZOcmJGUmlSMmh3V1ZST1EyVnNXblJqUlU1YVZtczFlbFl4YUhOaE1VNUlWV3hrVlZac2NETldha1p5WkRGV2NscEdaRTVTUlZsNFYxWldiMWxXV1hoWGExcHFVbGhTYUZadGVIZFZSbGw0V2tVNVUwMVdjREJaVldSdlZHeE9SbE5ZY0ZkaGExcHlWR3RhV21WSFNrZFhhelZYVmpGS2IxWlVRbFpOVmxwellraE9WbUpIVW5GV2JYaGhaV3hhV0U1VmRGVmlSbkI2VmpKNGIxWXhTbk5UYkdoWFlsaG9ZVnBFUm10alZrcHpZVWRvVGxaWVFrNVdiWEJLWlVaS2RGWnNaRmRpYkZwd1ZXMTRTMk14YkZWUmJtUlhWbXh3ZWxkVVRtOVdSMHBYVjJ4b1drMUdXbWhaVjNoTFkyMU9SazlXV21sU2JrRjZWa1phWVZsV1dsZFRiazVoVW14YVQxWnNXbmRPYkdSWVkwVTVhRTFyV2xoVk1uaHJWa2RLUms1V2FGcFdNMUl6Vm10YVYwNXNTbk5hUm1SWFlURndOVll5ZEd0ak1rWlhVMnhXVjJKSGFGaFpWRXBTWkRGV05sSnVUbGRoZWtaWVZqSjRVMkZGTVZsUmJHUlhVbXh3Y2xscVNrOWpNa3BIVjJ4b2FHVnRlRlZYVjNSWFpEQXhSMVZ1VGxoaWJWSllWRmQwZDFkR1ZYbE5WemxYVFVSR01WVlhkRk5XVmxwWFkwWkNWazFHY0ZCWk1qRkxVMGRPUjFSck5VNVNXRUpTVm1wR2EwMUdiRmhVV0dST1UwZG9XRmxYZUhkVk1XeFpZMGhPVjAxV1NsaFpWVlpQWWtkS1IyTkljRnBXVjFGM1ZtcEJlR050VGtaYVJsWnBVbTVDTWxacVNqUlpWa3B6V2toU2FGSnRVbTlVVm1oRFlVWmtjMWt6YUZSTlZUVkpWbGQwYTFsV1NuSk9WemxWVmtWS1RGWXllR0ZqTVZaeVpFVTVVMDFHV1RCV2JYaHZZakZrU0ZOdVNtcFRSVnBYV1cwMVExTkdXbkZTYlVaclVqRmFTVlZ0ZUd0Vk1rcEhZMFJhVjJGcmJ6QlpWRXBIWXpGT2RWWnNTbWhOYm1oWlZtMXdUMVZyTVVkWGJsSnFUVEpvY2xadGVHRk5WbHAwWlVkMFZrMVZjRnBWVjNCaFZqRmFkRlZZWkZWV1JYQllWV3BHUzJSV1ZuSlBWbVJYVW14d1ZsWnRjRU5aVmsxNFZXdGtXR0pIVWxkWlZFRXhWa1pTV0dSSVpHeGlSbkJKV2xWa1IxWXhXWGRXYWs1YVRVZFNkbFpzV21GWFJsWlZVV3hhYVZKdVFsbFdiWEJIWkRGT1NGVnJaRlppVjNoVVZtMTRjMDVzV25OWk0yUnJUVVJHV0ZZeWRHdFhSMHBIWTBaQ1YySkdWWGhXTVZwelYwZFNSbVJIZUdsU2JIQTFWbXBLTUdFeFpFZFRibFpTWVRKU1lWUlZXbmRVUmxwSVpVVjBWMDFXY0ZwWGExcHJWR3haZUZKcVRsaFdiRXBNVmtSS1QyUkdVbGxqUjJoVFlrWndkMVpYY0VkVE1WcEhWMjVTYWxKWVVsZFVWbHBYVGtaWmVVNVZaRlpOYTFZMlZsYzFSMWR0UlhsVldHUlZZa1p3VkZacVJtdGtSMUpJWWtaT1RsTkZTbGxXYTJRd1ZURk5lRnBJVWxOaWEzQnhWVEJXZDFkR1duUmxTR1JWVW14YWVsZHJWakJWTVZwelUyNXdXazFHY0hKV2FrRjRaRWRHUmxac1pHaGhNMEY2Vmxkd1MxVnRWa2RqUlZwaFVteHdjRmxyVm5kVmJGcDBZMFYwVDFJd01UUldNalZQVmpKS1ZsZHVUbGRpV0doNlZGUkdZVmRIVWtoa1JtUlhWa1ZhV0ZkVVFtOWtNVmw1VTJ4V1YySkZTbGhVVldSVFVqRndWbHBGT1ZOTldFSklXVEJrYjFSdFNsaGhSa3BYVFc1U2FGZFdXbk5XTVdSeldrWk9hV0Y2Vm05V1Z6RTBaREZSZUZkdVVrOVdWVFZRVm0xNGQwMUdVbGRWYkU1WFZsUkdXVlpYZUd0V1ZscHpWMjFvVjAxSFVrZGFWV1JQVWpGd1IyTkdaRk5XYlRrMlZteG9kMUl5VFhsVmEyaFhZVEpvVVZadE1WTlhSbEpXVld0YVRsWnNiRFZhUldSSFZUQXhjbU5GYkZaaVZGWlFWbFJHWVZKc1RuTmhSbHBwVW01Q1RWWnJWbUZWTWs1elkwVmFVRlpyTlU5V2JGcDJaREZhU0dWR1drNVdiRlkwVjJ0V2ExWkhSWHBoUm1oWFlsaG9URlZyV2xkalZrNXlaRWR3VGxacmNEWldha28wVmpKR1JrMVZiRkppVkd4WVZXMTRZV05zVW5KWGEzUlhUVlp3ZWxkclpFZFZNREI0VTJ4YVdGWXpVbGhXYWtGM1pVWmFkVlZyTlZOU1ZuQlpWbGN4TkdReFdYaFZiazVYWVhwc1dWVnFRbUZsVmxWNVRsaGtWMkpWY0VsV1YzaFRWbGRLUjFaVVJsZE5SMUpRVldwR1UyTnJOVmhpUm1ST1lrVldOVlp0TVRSVk1VbDRWMWhzVTFkSGFGbFdNR1EwVmpGc2NscEdUbXBXYkZwNlYydGpOV0ZzU25OWGFrWmFUVVphY2xadGVHRmtWa1p6WVVaa2FWZEdTbTlYVmxKTFV6RkplRnBJU21sU2JXaFlWV3hTVjJWV1duUmtSbHBzVW1zMVNWWnRkR0ZXTWtwSFkwWm9XbUpHY0V4YVZscGhWbFpPY1ZWc1RtbFdhMWt3VmxSSk1WVXhVWGhYYms1VVlrZG9XRmxyV2t0WFJsWnlWMnh3YkZZd05VZFdSekYzVkd4YVdWRnJiRmRXZWtVd1dXcEdjMVl4VG5OaVJrcHBVbFJXVjFadGVHRlpWMFpIWTBWa1dHSkdjSE5WYlhoM1pXeGFTR042VmxaTlJFWkdWV3hTUjFZeFdqWlNWRUpYWVd0YVUxcFZXbXRrVms1ellVZHNVMkpJUWxsV01XUTBZakZWZUZSclpHbFRSa3B6VldwQ1lXTnNWbk5WYTJSWVVtMVNlVmRyVWxOV01ERkZVbXRhVm1KR1NraFdNRnBhWld4V2RWZHNhRmRpVmtwSlZtcENZVk15VWxkV2JrNVNZa2RTYzFsclduZFhWbHB6V2tSU1dsWnJjSGxVVmxwcllXeEtWMWRzVmxwV1JYQlVWbXhhWVdSSFVraFNiR2hYWWxaS05WWXlkRmRoTVZsM1RWVldVMkV4Y0ZoWmJHaERWRVpaZDFkdFJrOWlSbkF4V1RCYVlWWXhTbGRqUld4WFlXdEthRlpVU2s5a1JrcHlZVWRvVTJKRmNGVldSbHBYWkRBMVYxZFlhR0ZTUmtwaFZtMHhORll4VW5OWGJYUm9WbXR3U0Zrd1dsZFhiVXBaVkZob1drMXVhSHBaZWtaaFpGWndTR1JGTlZkTlZXOHdWbTEwYTAxR1VYaFhiazVVVjBkb1dWbHJaRk5XTVd4eVdrYzVhRkpzY0RCYVZWWjNZa2RLUmxkc2NGcE5SMUpJVmxSS1YyTnNaSEpOVm1SWFVsVndlVlpYY0VKTlZtUkhWbTVLV0dKSFVuQlZiVFZEVjFaa2Mxa3phRTlTVkVaWVZqSjRWMVV5U2toVmJGcFZWbXhhYUZwWGVITmpWbEowWkVkb1YyRXpRbGxXVkVvMFZERlplVkp1U21wU2JFcFhXbGQwWVZkR1duTlhhMlJxWWtoQ1NWbHJaSE5WTVZwSFYyeHNWMkpZVW5KVVZWcE9aVWRLUjFkck5WZFdNbWg2VmxkNFlWbFdXWGhYYmxKT1ZtczFjVmxyV25kWFJsbDVaRWhrYVZJd2NGZFdNblIzVjBkRmVHTkhhRmRXUlVZeldsWmtSMUl4U25OaFJtUk9UVlZ3TlZadGRGTlRNVlY0VjFob2FsSlhlRmRaYkdodlZrWlNWVkZyZEd0aVJuQXdXbFZhYTJFd01WZGpTSEJZWVRGd2RsbFhlRXRYVmxaMFVteGthVkpyY0VsV1ZFWmhXVlpaZVZKcmJGVmlSbkJQV1ZST1FtUXhaSE5XYlhScFRWWnNOVlZzYUhOV1ZscEdWMjFHV21KSGFIWldNRnBYWkVkV1IxcEdaRmRpU0VGM1YydFdWazFYUmtaTlZteFNZVE5vV0ZsclduZGhSbXhWVTJ0YWJGSXdjRWhYYTFwdlYwWkplRk5zUmxkaGEwcG9Xa1JHYzFZeVNrbFZhelZYVW10d1ZGWkdXbXRPUmxwelZtNVNUbEpGV25CVmJYUjNaV3hWZVU1WVRsZE5SRVl4V1ZWa2IxZHNXbk5qUlhoaFVteHdTRmt5TVVkU01YQklZa1pPVGxaV1dYcFdha28wWVcxV1IxUlliRlZYUjJoWldXdGtOR0ZHVm5STlZrNXFVbXhhZWxaWGVHdFhSbHAwVld4b1YxWXpVbkpXTW5oaFl6Sk9SbUZHYUdoTlZuQlpWbXhTUzFJd05YUlRhMlJoVW14d2NGWXdXa3BsYkdSeldrUlNXbFp0VWtsV2JYUnZWVVphYzJOSVFsWmlWRlpFVkd4YWExWldSbk5hUjJoT1ZtNUNTbFpYTURGVE1WbDVVbTVLVDFac2NHRldhazVUVkVad1dHVkdaR3BOVm5CV1ZtMTRUMVV3TVZaalJXeFhWbnBGTUZWNlNrdFRSazV6WWtkR2JHRXpRbGxXUmxwaFpESkdSMWRzYUdwTk1taFVWRlphWVUxV1ZYbGxSbVJvVmpCV00xa3dXbE5XTWtwWlVXdDRWMVpGV2s5YVZWcGhZekZhYzFOdGFFNWlSWEF6VmpGa01GWnJNVmRYV0doWVlUSm9jbFZzYUZOWlZscHpWV3RrVkZadVFsZFdiWGhyVmpKS1IyTkVRbGRXZWxaTVZtMXplR1JYUmtaYVIwWlRVbFp3VFZkclZsWk5WbGw0Vm01T1lWSnRVbGhWYlhoM1VteGFkR1JHVGxKTlYzaFlWVzAxVTFZeVNuSk9WbEphWWxob1RGWldXbUZqVmxKeVZHeGFUbFpyY0ZoV2JUQXhZVEZTY2sxV1pHbFNSbHBXVm0weGIxVkdXbGhOVlhSWFlsVndSbFpYZUhkVWJFbDVZVVpzVjJKWVFreFZla3BPWlVad1NWVnNUbWxTYkhCWlZsZDRZV1F4VWxkYVNFcFdZVEpTY1ZSWGN6RlhSbHBJWlVaa1ZrMXJjRmRXTWpWRFZtc3hSMWRyZUZoV2JIQnlWbXBHWVdSRk9WZFRhelZvVFZoQk1WWnJXbGRpTWtsNFYydG9VMkpyTlhGVmJYaGhWbXhhYzFkc1dteFNiWFExV2xWb1QxWXhXbkpPV0d4WVlURndkbFpxU2t0U2JVbDZZVVprVjFKWE9IZFhXSEJIVlRKT2NrMVdaRmhpVjNoUFZGYzFiMWRzWkZkVmEyUmFWakExZWxadE5VZFdSMFkyVm01T1ZtSlVRVEZVYlhoeVpERmtjMXBIYUZkTlNFSlpWbFJKZUdJeFdYbFRiR3hTWVRBMVZsWnRNVk5VTVhCV1YyeE9hMVpzY0RCWmExcFRWVEZrUmxOcVVsZGlSMUV3V1ZSQk1WSXhUblZVYld4VVVsWndWbGRYZUc5Vk1WbDRWMjVHVTJKVlduTlZiWGgzVjFacmVtTkdaRmRpVlZreVZXMXdRMWxXV2xkWGJFSlhUVWRTU0ZreWVFOWtWMDVIVjIxb1RsZEZTa3BXYlhCRFdWZFJlRk51VWxWaE1sSlZXVmh3VjFaR1duUk9WVXBzVW14d2VsWlhkR3RXTURGWFVtcFNWbUpVVmxCWlZsVjNaVlpXZFZGc1dtbFNia0pOVm14U1IxbFhUbGRVYms1VllrWktUMVp0ZUhkV01WcFhXa1JDYUUxcldsbFZNblJoVkRGYWRGVnNhRlpoYXpWVVZrVmFhMVl4V2xsaFJtUnBVbFJXTlZkWGRHdFNNVmw0VjFoc2FGSldXbGhaYTFwM1kyeFdkRTFXWkZoU2EzQjVWako0YjJGV1NuVlJibHBYVW14YVZGWnFSa3RXTVdSMVZXMTRVMDB4U2xaWFYzaGhXVmRXYzFkdVVrOVdhelZ2VlcxMGMwNVdjRlpYYXpsWFZteHdXRll5Y0U5V01rcFpZVWhLVjJKR2NFaGFSV1JUVWpGU2NrNVhhRTVYUlVWNVZtcEdVMUV4YkZkWFdHeFRZa1p3VDFZd1drdFdNV3h5Vm01a1YwMVhlRlpWYlhRd1lrZEtSMU5zV2xaaVZGWlFWbXBLUzFac1pISmFSbHBPWVd0YVNWWnJaRFJoTVVwelZHNU9hbEp0VW05VVYzTXdaV3hhU0dWSGRGTk5WMUpJVmpJMVQxZEhTa2RUYlRsVlZsZG9SRll5ZUd0WFIxWkhWR3hLYUdWcldsbFhWRUpoWVRGc1YxTnNiRlppUjNoWFdXeG9VMDB4Y0ZaWGJHUllVakZhUjFwRlpHOVdNREZKVVcxR1YwMXVVbFJXUkVaYVpEQXhXVlp0YUZSU2JrSlpWbGMxZDFJeFRYaGpSbHBoVWxSc1ZGbHNWbUZUVm14eVYyeE9WMUpyY0ZkWk1GSkxWakpGZUdOSGFGZFdSWEJRV2tWYVYxZFhSa2hpUmxKVFZtNUNXRll4WkRCV2F6RllVMWhvVjJKcldsTlpiVEZUVmxaV2RHVkZaRTlTYlhoWFdWVmtNR0ZHU1hkalJXUmFZVEZLVUZacVFYaGpWbHB5WVVaa1RsSXhTazFXVnpGNlRWWmtWMWR1VG1wU01uaFpWVzEwVjAweFduSmFSRkphVmpBMU1GWnROVTlWTWtweVkwaE9WbUpVUmxSV2JGcFhZekZXYzFwRk5WZGlTRUkyVm0wd2QwNVhSWGxTYWxwVFlUSlNWbFJXV21GaFJteFZVVmhrYkZZeFdrcFdSM2hoVkd4S2MyTkZNVmRpUjFFd1dWUktVMWRHVW5KWGJGWnBVbXh3VlZkV2FIZFdNV1JIVjI1S1lWSkZTbFZVVm1RMFZqRlNWMVp0T1dsU2EzQllWako0YTFZeVNsVlNiRkphVFc1b1YxcFdaRmRTYkdSMFpFVTFWMWRGUmpOV2EyUTBXVlpWZUZkWWFGaGlSbHBZV1ZSR1MxZEdVbGhPVlU1VFVtMTNNbFZ0ZERCVk1ERldZMGh3V2xaWFVraFdWRVpyVW14T2MxVnNaRk5pUm5CWlZqRmFhMVV4V1hoWGJHeG9VbTFTYjFwWE1UUldSbVJYWVVoa2FrMVZOVmhXYkdoellURktObUpIT1ZaaGExcG9Wako0WVZkSFZrZGFSbVJwVmxoQ1NWZFVRbGRPUmxwMFUyeHNhRkpyU2xoWmJHaHZZVVp3UmxkcmRHdFNNVnBJVjJ0a2MyRkZNVWxSYldoWFlsUkNORlJyWkVabFZrcFpZVVpvYVdFelFsQldWRUpyVlRGYVYySklUbFppYXpWWlZtMTRkMlZXV25ST1YzUlhUVVJHV0ZVeWNFTlpWa3BZWVVaQ1YxWkZXbUZhVlZwUFZsWktjMVpyTlZkTlZXdzJWbTE0VTFGdFZraFZhMlJwVFROQ2NWVnRlSGRVTVZwMFpVaGtiRlpzY0RCWk1GWXdWVEF4YzFOcmFGWk5hbFpNV1ZWYVMyTnNUbk5WYkZaWFRUSm9UVlp0ZEdGWlZtUklWR3RhWVZJelVrOVZhMVpoVG14a1YxVnJPV3BOVmtwNlZrZDBiMkZHU2paaVJtUmFWak5TYUZaRldsZGpWa3B6VjIxNFYwMUVWa2xXTW5ScllqRlNjMWRzYUd0bGEwcFlXVmQwZDAweFpGZFhiVVpUWVhwR1YxbFZXbUZoVmtweVkwZG9WMUpzV25KV1ZFWlNaVWRPUjFwSFJsTmhlbFpXVmxjd2VGVXdNVWRXYmxKT1YwVTFiMVZzVWtOTk1WVjVZMGRHVjAxcldubFpibkJEVmpBeGRWUllhRmROUm5Cb1drWmFWMk14V25SaFJUVnBWakpvVjFacVJtdE9SMGw0VWxoc1UyRXlVbGxaYTFwaFZsWnNjMkZHVG1waVJuQXdXbFZXTUZaSFNraGxTR3hZWVRKb2NsbFZaRXRTYlU1SFkwWmtWMDB5YUc5V2FrbDRWakpPZEZScmJGUmlSMUpZV1d4YVMxZFdaRlZTYlVaWFRWWndXRlp0TlU5V01rcEdUbFpTVjJKdVFuWlVWRVphWlVaV2NsUnNjRmRoTVZreFZsUkpNVk14VW5OWGJHUnFVMFZ3VjFsclpHOVNSbHBWVW14T1YySkdjREJWYlRFd1ZqSktSMWRVUWxkaVZFWTJWR3hhVjJSR1RuSmhSa0pYVWxSV2FGZFdVa2RaVmxwSFYyeG9iRkp1UW5OV2JYaGhaVlp3UmxkdFJsZE5WWEJYV1RCV2MxZEdXalpTVkVKWFVrVmFhRmw2Umxka1ZrNXpWVzFzVjFadVFsRldiR1IzVkRKSmVGTllhR0ZUUlhCdlZUQldkMVZHV25GUmJVWnNZa1pXTkZsVmFFOWhSa3B5WTBWa1ZXSkdjRmhXYWtwTFUwWldjMVZzWkU1U2JrRjZWbGR3UjJFeVVsZGpSV1JXWWtVMVQxVXdWa3RUTVZweVYyMUdXbFpyVmpWVk1uUnJWMGRLUjJOR2FGcFdNMUl6VmpCYVlXTXhjRWRVYlhCWFltdEtSMVpYTVhwTlYwVjNUVmhLYWxKWFVsaFdhazV2VkVaYWNWRllhR3BOVlRWNVdsVmFhMVl5U2taalJWWlhWak5DVEZWNlNrNWxSbFoxVkd4b2FWSnNjSFpXUmxadlVUSkplRmRyWkZkaVdGSlFWVzEwZDFkR1duUmxSM1JhVm10c05sWlhlRmRYYlVWNFYyeG9WVlpGV2xoYVJWVjRVbFpLYzFwR1RtbFRSVXBhVm14U1IxVXhSWGhhU0ZKWFltdHdjVlZzWkc5WFJteHlWMnhhYkZKc2NIaFZiVEZIWVRGSmQyTkZaRlZpUmxWNFZtcEdhMUpzVGxsaVJtUm9ZVEZ3ZVZaR1ZtRlZiVlpIVTJ4c2FGSnNTbkJWYWtwdlZteGFjVkZ0ZEU5U2JFWTBWakkxUjFaSFNsVmlTRUpWVm14d00xUldXbkprTVdSMFpFWldUbUV6UWtoV1IzaGhZVEZrU0ZKWWJHaFNhMHBoVm10V1lXRkdXWGRhUm1SVFlsVmFTRmRyV2s5aVIwVjRWbXBPVjAxV2NIRmFWVnBPWlZaU1dXSkdWbWhOYm1oWFYxZDBiMUV4VVhoaVNGSnJVbGhDYzFadGVITk9WbXQzVm0xMFZtRjZSbGRaTUZwclZsVXhWMk5JY0ZoV2JIQkxXbFprUjFJeFduTlhiV3hUWWtoQ2RsWXlkR0ZaVm1SMFZteG9WMkV5YUhKVmJYaGhWREZzVlZOcVRrNVdiSEJXVlRJMWExWXdNVmRYYm5CWFRWZG9NMVp0TVV0WFIwWkhXa1p3YVZaR1drVlhiR1EwVlRGYWMxcElVbXRTYlZKUFZqQldTMU14V25KWk0yaE9VbXhzTlZWc2FHOVhSbHBHVjJ4b1ZtRXhXbWhXYTFwWFkxWk9jbHBHYUZOaGVsVjRWbXRrTkZReFdYaFRiRlpYWWtad1dGbHNhRzloUmxaMFl6Tm9VMDFXU25oV01uaFBZVVV4UlZac1ZsZFdNMmhVV1hwR2EyTXhaSEpoUlRWWFpXMTRXVlpHV2xka01VNUhWbGhzYkZKVk5WaFphMXAzVWpGcmQyRklaRmRpUm13MldWVlNTMWxXU2taalJYaFdZbGhvV0ZsNlJrOWpNWEJHVGxkc1UxZEZTazlXYlRFMFdWWlZlRkpZYUZSWFIzaFZXVzF6TVZac2JISlhibVJYWWtkNFZsVlhOV3RoUmtwelUyeGtXR0V4U2xSV1ZFWmhZekZrYzJGR2FHaE5iRVl6Vm0xMGExTXhTbk5YYmtaVllrWndjRlZ0ZEhkV1ZscHhVMWhvVTJKV1dsaFdiVFZYWVZaS2MxTnVUbHBXUlZvelZqQmFhMk14YTNwaFJsSk9WbFJXV2xaclpEQmlNa1Y0VTI1S1QxWlViRmhaYkZKQ1RWWlNWVkp0Um1waVJscDVXa1ZrZDFSc1dsZGpSRlpYVWtWYVdGbFVSbGRqTVhCR1lrWkthVkpVVm1oWFYzUmhVekpXYzJFemFGaGlSMUpZVm0xMFlXVldjRVphU0dSVllrWnNORlV5ZUd0V01WcEdZa1JPVldKSFVrZGFWbHBMVjFkS1NHVkdUbGROVlhCWlZtMHdNV1F4V1hsVWJrNXBVbXh3V1ZsWWNITldSbXh5VmxSR1RsSnNTbGhYYTFaclZtc3hjbU5HWkZWV2JFcFVWakJhWVdNeFpIVlRiRnBzWVRGd2VWWlhjRWRoTWsxNVVtdGtVbUpIVWxsVmFrcHZWMnhhYzFWclRsZGhla1paVmxkNGExZEhTa2RqUnpsV1RVWndNMVpFUmxkak1WWjFWR3hPVGxkRlNrZFdhMk14VkRKR1YxTnVTazlXVjFKWFZGYzFiMVJHV1hkYVJYUnJWbXRhZVZaWGVHdFZNVnAxVVd4R1YySlVSVEJXVkVwUFl6RlNkVlZzVG1obGJGcFZWa1pTUzJJeFNYaFhiazVZWWxWYWIxUlhkRmRPUmxwSVRsVTVWazFYVWtsV1YzaFRWMjFLUjFOc2FGZGlSbkJvV1hwR1lWWldTbk5UYXpWWFRWVnZNRlpzWTNoTlJsRjRWbGhvVkdKR1duQlZiWGgzVmpGc2MxVnJaR3hpUm5CV1ZXMTBNRlV3TVZaT1dIQldWak5vYUZacVJrdFhWa1p4VjJ4a1YySldSWGRYYTJONFZXMVdWMVJ1U2xoaVJuQndWV3hvUTFkV1drZGFSRkpVVFZaS1NGWXllR3RXYlVWM1RsWlNWVll6VWpOYVYzaGhaRWRTU0ZKc1pGZGlTRUpKVm1wSmQwNVdXbGRYV0hCV1lsZG9XRlJYTlc5WlZuQldWMnhPYWxaclducFdSM2hyWVZaS2RWRnRSbGRoTVVwSVZtMXpNVll4V25WVGF6VllVbXR3ZWxaWGVGWk5WbVJYWWtab2ExSllVbk5aYTFwaFpWWlplV1JIZEZoU2EzQXhWVmQwYTFkck1VZGpSWGhYVWpOb1RGWnFTazlTVmtweldrZHNVMkpJUWxwV01WcFRVakZhZEZac1pGWmlhM0J2VlcxNGQyTkdiRlZSYm1SWFVtMVNXVnBWWXpWVmF6RnlUbFZvVjJKVVZraFdWekZMVm14a2MxRnNjR2hOYkVZelZrY3hOR015VGxkVmJsSnJVakpvVkZsclpETmxiRnB4VTJwU2FrMVdjRmxWTW5SdlZsZEdjMU50UmxkaVZFWlVWakJhWVdNeFpISmtSM1JYWVROQ05sZFVRbXRpTWtaR1RWaFdWbFpGU2xoWlZFWjNWMFprVjFwRk5XeFNia0pIV1ZWYVUyRkZNWFZoUm14WVZqTm9XRmRXV210V01WcDFWRzFHVTFKcmNIbFdSbHBoWkRGWmVGcElTbUZUUjFKdlZGVlNSMVl4VWxkVmF6bFlZbFZXTkZZeWVGTldNVmw2WVVkR1lWWnNjRmhaTWpGVFVqRmtjMXBHVGxkWFJVcExWbXBHYW1WRk5VZFZXR2hZWW1zMVYxbHRkSGRXVm14elZtMUdWVTFXV25oV1J6QTFWVEpLUjJOR2FGZE5ha1YzV1ZWVmVGWXhaSE5oUmxwT1ZqSm9ObFl4V21GVE1VbDRXa2hPWVZKc2NHOVpXSEJYVFd4YWMxWnRSbFpOYXpFMFdUQldZVlF4V1hwaFNFSldZbGhvTWxwRVJtdGpNVnAwWkVkd1RsWnVRalZXUmxwWFdWZEdjMU5zYkdoU2JYaFlXVzAxUTFKR1VuSlhiWFJYVFZoQ1NGWkhNWGRVYkZwWFkwUldWMkpIVVRCVlZFWmFaVlphZFZWdGVGTmhNSEJhVm0wd2VGVXdNSGhYYkZaVFlrVndjMVZ0ZEhkWGJHeHlXa2hPVmsxV2NGcFZWekExVmpGS2MxZHVTbFZoTVhCTVZtcEdZV014Y0VoU2JFNU9UVlZ3VjFZeFpEQldNVmwzVFVob1YySnNTazlWYTFaaFYwWldkR1ZJWkZkTlZrcDZWbTF6TlZkR1NYZFhibXhXVFdwV00xWnRNVXRUUmxaellVWmFhVkp1UWsxWGExWnJVekZKZUZSdVNrOVdhelZaVld4V2NtUXhXblJqUldSb1RVUkdTVlZzYUc5V1JtUklaVVpvV21KWWFFeFdiWGh6VjBkV1NWcEdWazVXYkhBMFZsUktkMVV5UmxaTlZtUnFVa1ZhWVZSVlduZGpiR3hWVW10MGExSXhXa1pWYlhoM1ZqRktWVlpxU2xoV2JWSTJXbFZrVDJNeGNFbFViWEJUWWxaS1ZWWkdVa05UTVVwWFYyeFdWRmRIYUZSVVYzTXhWMFphZEU1VmRGWlNiSEI1V1RCVk5WZHRTa2hoU0ZwV1lURndZVnBXWkU5U2JGSjBZMFUxVjFkRlNrcFdiR040VGtkSmVHSkdaRlJpUjNoVFdXdFZNVlpzV25OWGJVWm9VbTVDU0ZZeWVHRmlSa3B6WTBoc1ZVMVdjRXhaVmxwTFRtMUZlbU5HYUZkTk1VcFpWbXhTUjFZeVRYaGFSbXhwVW14d2IxUlVSa3RYUmxwMFpFWmtWRTFWYkRSV1Z6VkxWMGRLU0ZWc1VsZGlXR2hNV2xaYVlWTkZNVmxVYkZacFZsWnJlVlp0TVRCVk1WbDRVMjVPV0dKSGFGWldiRnAzVlVac05sSnJkRmhXYmtKSVZrY3hjMVl4U25OalJtUlhZbFJGTUZadGMzaFdNVXBaWVVkR1ZGSldjRlJYVnpGNlRWWmFSMVp1VW10U01GcFpWbTB4VTJWV1duUk9WM1JYWWxWWk1sVnRkR3RXTURGeFZteG9WMkpZVGpSV2FrWnJZekZHYzFkc1pFNU5iV1ExVmpKMFUxTXhUWGhUYms1WFltczFXVmxzWkRSWFJsWnpWMjVrYTJKR2NEQlVWbWhyVldzeFdGVnFRbGRXYldoMldWZDRTMWRHVm5SUFZscHBVakpvVlZkVVFtRldNazVYVW14V1VtRjZWbGhaYTFwM1YxWmFjMWw2UmxWTlZuQkpWVEowWVdGc1NrWlhiR2hXWVdzMVQxUldXbUZYUjAxNllVZDBVMDFXY0VoV2EyUTBZakpHU0ZKWVpHcFNSbkJZVm1wT1UyRkdWbkZTYlhSVFRXczFSMVl5TVhkVk1rVjZVV3hDVjFZemFHaGFSRUY0VmpGa2MxWnNUbWxTTVVwWFZrWmFWMWxYVm5OaVNFWlZZbGhTYjFadGRIZFhSbFY1WlVVNVYwMXJXbmxaTUZwVFZtMVdjbGRzYUZkaVJuQklXVEo0ZDFOSFNraGlSazVYVW14d1dsWnRNVEJoTURGSFZGaG9hVkpzY0U5V2JHUnZWVlphY2xkcmRGaFNiRm94V1RCV2EyRXlTa2hWYkdoWVlURlpkMVpxUVhoV01rNUZVV3hXYVZKdVFubFdiRkpMVXpGYWNrMVZiR2hTYldoWVdXdFdkMU5XWkhKVmEyUmFWbXRzTlZWc2FIZGhWa2wzVjJ4U1dsWkZXak5XTVZwaFYwZFNTRkpzVWs1aVJYQlpWakowWVdFeFpFaFRiR3hTWVhwc1dGbFhkRVpsUmxWM1YyMTBhbFpzU2pGV1IzaDNWakpGZVdSNlNsaFdiRnAyVlhwR1lXTXhaSEpYYlhCVVVsaENiMVpYTVRSa01sWnpWVzVTYkZKVWJIRlphMmhEVTFac2NsZHRkR2hXTUZZeldUQmFkMVl5UlhoVGEyaGFZV3RhVjFwV1drdGpNV1J5VGxab1UxWkdXbGRXTVdONFpXc3hWMWRzWkdsVFJrcFBWbXRhUzJNeFduUk5WazVzVW14YU1GcEZWVFZXVlRGWFkwaHNWMDF1YUhwV2JHUkxVakpPUjFGc1pHaGhNMEpaVjFod1IyRXlVbGRhU0U1aFVsUldXRlJWVWxKa01WcHlXa1JDYUUxVk1UUlZNV2h6VmxkRmVHTkdaRnBoTW1oRVZrUkdjMk14WkhKa1JscHBVakZLV1ZacVNqUmhNVlYzVFZoT1ZHSkhhRmhaYkZKWFZFWmtWMWRyT1ZOaGVsWmFWa2Q0ZDJGRk1YTlNXR1JYWVd0YWFGWnRNVmRXYXpWWFYyeENWMkpyU2xsWFYzUnJUVEF4UjFkc2FFNVNSVnBZVkZaYWQxZEdWWGxsUjBaWFRXdGFlVlJzV210WlZsbDZWV3Q0WVZZemFGaFpNbmhyWTJ4d1IyRkdUbWxoTUhCSlZqRlNRMWxXVFhoVmJrNVVZa2RTY1ZWclZtRlhSbHB5Vm0xR1dGSnNjRVpWYlhScllXc3hjbUpFV2xoaE1sSjZWbFJHWVdOdFRrZFZiR1JwVjBWS1RWWnNVa2RVYlZaSFYyNU9WMkpGY0c5VVYzaExaREZrV0dSR1drNVdiR3cwVmpKMGIyRXhTbGxWYlVaWFlrWktTRlV4V25kV2JGcHpXa1prYVZKdVFYZFdhMXB2WWpGWmVGZHJXbGhoTTFKb1ZtMHhVMWRHVm5OWGJYUnFUV3RhU0ZkclpITldNa1Y2VVdzNVYyRnJXblphUkVaS1pWWldXV0ZHYUdoTmJFcFZWMWN4TUdReVJrZFdia1pWWWtVMVdWVnROVU5YVm5CV1drVmthVkpyY0RCV1Z6VnpWakpLVlZKWVpGcFdNMDQwV1hwR1QyTldSbk5YYXpWb1lrWndXbFp0TVRSWlZteFdUbGhPV0dKcmNISlZiWGgzWWpGU1YxWnVaRk5TYlZKV1ZUSndVMVpWTVZkalNIQmFUVVphZWxac1pFdFhWbFp6WVVaV1YxWnVRWHBXYWtaaFdWWktWMU51VW1wU1ZGWllXV3hvYjFkV1dYbGtSbVJvVFZaV05WVXlOVTloYkVwelYyMUdWMkZyTlZSVVZFWmhZMnhrZFZOdGRFNVhSVXBJVmtkNGEwNUdXWGxTV0hCU1YwZFNXVlpxVGxOamJHdzJVbXhhYTAxRVJsaFhhMlIzVmtaS2NtTkdiRmRTYlZJelZWY3hWMUl4WkhWU2JGSnBVbFJXV1ZaR1pEQldNRFZ6WVROa1dHSlZXbTlXYWtKWFRURnJkMkZIZEZkTlZYQXdWbGR3VDFZeVJuSlNXR2hhWld0YVZGcEdXbUZrUjBwSFZXeE9XRkpWYnpCV2JYUmhWakZzVjFSWWFGZFhSMmh3VlRCV1lWWldiSE5oUms1WFZtMTRlVlp0ZUd0VWF6RlhWMnBDVlZaV1NraFdha1pMWXpKT1IxcEdWbWxTYkhCUlZtcENhMUl5VG5OVWJsWnFVbXh3YjFSV2FFTlRWbHB4VVcxR2EwMVZjREJXUjNSclZrZEdObFpzVWxkaVZGWkRXbFZhWVdNeFZuSmFSbVJPVm10Wk1GWlhNREZVTWtaV1RVaHNWbUpyU2xkWmExcDNWRVphVlZKdFJtcFdhelY2VmtkNFUxUnNXbk5qUm1SWFZrVnZNRlpFUm1GU01XUjFWR3hvYVZKdVFsaFdiWEJQVkcxV1IySkdaR0ZTVm5CelZtcEdZVkl4V1hsbFJtUlhUVlp3VmxaWGNFOVdNVnBHWW5wQ1ZrMXFSbGhWTUZwUFYxZE9TR0ZHVG1saE1IQXpWbTB4TUZZeGJGZFdiR1JZWVRKU1dGbHNhRk5XUmxKWFdrWk9VMDFXUmpSV01qVlBWakF4Y21ORmJHRldWbFV4VmpJeFJtVkhUa2xpUjBaVFVsWndlVlp0Y0VkaE1sSkdUMVprVjJGNlZsUlZiRnAzVXpGYWRHUkhkR3ROVm13MFdXdGFZVlJzWkVaWGJHaGFZbGhTYUZadGVHRmtWMDVHV2tkMGFWSXpZM2xXVnpBeFZESkdkRk5yYkZKaE1YQllWbTV3UjFOR2JGZFhhemxUWWtVMU1GVnRlRzlXTWtwSFkwaHNWMUl6VW1oWlZFcFRVakZrZFZSdGFGTmlSbkIzVjFkNFlWTXhXbk5YYmxKc1VteHdUMVp0TVRSWFJteHlZVVU1VjAxcmNIbFViRnBYVmpKS1dXRkZlRlZXVm5CVFdsVmFkMUpzY0VkYVJUVlRVbFZyZUZZeFdsZFZNV3hYVjFoa1RsWlhVbFZaVkU1dlYwWnNXR1JGV214U2JGcDRWVEp6TlZVd01YSlhhMmhYWWxob2NsbHJaRXRYVjBaR1RsWmthRTFZUW5oWGJGWmhWbTFXVjFWdVRtRlNNRnBVV1d4b2IyUXhXbGhsUm1SclRXczFlbFp0TlU5aFJrbzJZa1pzV21FeGNIcFViRnBUVmpGV2MxUnRhRk5OU0VKWVYxUkNiMk14V2xoVGEyaG9VMFZ3V0ZSWGNFZFRSbXQ1VFZWYWJHSklRa2haTUdSelYwWktjbGRZY0ZkaVZFVjNWMVphU21WR1pISlhiRUpYWWtoQ2VGWlhNVEJrTVZGNFlraEtWMkp0VWxkVVZscHpUa1prVlZSdE9XaGhla1o1VmpJMWQxZHRSbkpPV0VwWFZsWndjbFZ0ZUU5ak1WSnpXa2RzYVdFd2NGcFdiVEI0VGtaVmVGcEZhRmRoTW5ob1ZXcE9VMVpHYkZsalJscHNVbTFTV1ZwRldrOVdWVEZYWTBac1ZtSkhhSEpXUkVaclUwWldjMXBHWkdsV1JWcFZWMVJLTkZadFZsaFdhMXBZWWxoU1QxWnNhRUprTVZwSVpVZEdWazFXYkRSV01uaFhWakpGZUZOc2FGVldlbFpFVld0YWMwNXNTbkprUms1T1ZsaENObGRXVm10U01WVjRXa1ZhVkdKR1NsaFZiWGhoVjBaa1YxcEdUbGROVm5CYVdWVmFhMkZIVm5SbFJsSllWak5TY1ZSc1ZYZGxSMHBKVTJ4a2FWSlVWbGhYVjNSaFl6QTFWMWRzYUd0U1JrcFlWbTE0ZDJWc1dYbGtSRkpZWWxaYWVWWXlOWE5aVmxwelZtcFNWMkpHY0ZSYVJXUkxVMGRHUms1WGJHbFdNbWhLVm0weE1GbFdXWGhWV0dST1ZsZFNWbGx0Y3pGV1ZsbDNXa2M1YWxKc1NsWlZNakExVjJ4YWRHVkljRmRXTTFKeVZtMTRTMk14VG5OYVJtaG9UVlp3ZVZacVFtRlRNVnBZVTJ0a2FsSnRVbkJXTUdSdlRteGFjbGt6YUZSTlZXdzFWV3hvZDFsV1NuUmhSbWhhWVRKb1JGUlhlR0ZqYkZaeVUyMTRVMkY2VmtsV2JHTXhVakZaZVZOc1dsaGhlbXhoVm1wT2IyRkdjRlpYYlVaVFRWZDBObGxWWkhOVWJVWTJVbFJDV0ZZelVuWlZla1p6VmpGT2NscEdVbWxXTW1ob1YxWlNTMkl4U2tkWFdHeHNVMFUxV0ZscmFFTlNiRnBZWlVjNWFGWnNjSHBaTUZwM1ZqSkZlVlJZYUZwV1JWcG9WV3BHYTJNeFpISlBWbVJPVW01Q2IxWXhaREJaVm14WVZtNU9WMWRIYUZsWmExVXhZMnhXYzFWdVRsaFdiRm93V2xWa01GWlhSalpTYWtKWVltNUNURlpxU2tkamJFNXpWV3hhYkdFeGNHaFhhMUpDVFZaYWMyTkZhR3BTYXpWd1ZtcEtiMWRHV25STlJFWnJUV3N4TkZaWGRHdFdiVXBIVjJ4T1dsWkZOVlJaTVZwVFZqRndSVkZyT1ZkaVJYQlpWbXhrZWs1V1pITlhiRlpUWVROQ1lWWnNXbmRYUmxwelYyMUdhazFWTlhsYVZWcHZWakpLU1ZGdWJGZFdla0kwVmtSR1MxWXhjRWxVYlhCVFlsWktkMVp0ZUZOUk1EVkhWMWhzYTFJd1dsaFVWM2hIVFRGU2MxZHRPVlpOVjFKSldsVmtiMVp0U2xsVmJXaGFaV3RhYUZsNlJtRmtSa3B5VGxaa2FWTkZTVEZXYlhoclRVZFJlRlZ1VGxSWFIxSnhWVEJrTkZsV2JGVlNiVVpZVW0xNFdGWnNhRzloTVVwelYyNXNZVlpXY0ZoV2FrWmhZMjFPUlZkc2FHaE5WbkJ2VjFaU1MxVXhUa2RVYmtwb1VqTkNWRlJVUWt0VlJscFlUVlJDYTAxV2NFaFhhMXB2WVd4S1dWVnRPVlZXYkZWNFdsZDRWMk15Umtoa1JscE9ZVE5DVjFadE1UUldNVmw1VTJ0a1YxZEhhRmRXYTFaaFkyeHJlRmRyWkd0V2JFcDZWa2Q0VDJGRk1WbFJiVVpYWVd0dmQxWnFTbEpsUmxwMVUyczFWMVp1UWxwWFZ6RTBXVlpaZUZWc1pGaGlWVnBYVlcxNFlWZFdjRlpoUjBab1RVUkdlVmt3Vm10V01WbDZZVVY0VjJGclJqUlpla1pQWTIxV1IxcEdaR2xTV0VKT1ZtMTRVMUl4V1hsVVdHeFZZVEpTYUZWcVNtOVdSbXhaWTBaa2EwMVdjRWhYYTFKRFlXc3hSVlpzYUZkV2VsWk1WMVphU21Wc1ZuTmhSbFpYVFRGSmVsWnFRbUZYYlZaWVZHdGtZVkp0YUhCV2JYaDNUbFprVlZGdE9XdE5WM2hZVlRKd1lWVXlSWHBoUjBaVlZsWndNMXBXV25kV01XUjFXa1pPVGxaWVFqWldNblJoVkRGVmVWSlljRkpYUjJoWVdXdGtiMDB4VmxWU2JFcHNVbXh3V2xscldtRlhSa2w2WVVac1dGWXpVbkpVYTFwYVpVZEtTVlJzV21saGVsWjRWbGN4TkZNeFpGZGhNMlJZWWxoU1dWVnRkSGROUmxwWVRsaGtXR0pHY0ZoV01XaHJWMjFGZVZWcmVGZGlXR2h5V1hwS1MxSXhXbkpPVm1ST1lsZG9ZVlp0ZUZOVE1EVkhWRmhvVkdKSFVsUlpiWGhMVlVaYWRFNVZUbXBOVjNoV1ZrZDBUMVJ0U2toVmJHeGhVbGRSZDFaclZYaFdhelZXWWtaa2FWZEdTakpXYWtKclV6RmFjMXBJVG1sU2JIQnZXVlJPUTAxc1pITmFSRkpZWWxaYVNWVnRkSE5XVjBwWVpVaENWMkpIYUVOYVJFWmhZMnh3UlZGdGNFNWhNWEJaVmxSS01GbFdXa2hUYkZacFVtMVNZVmxzVWxkU1JuQllaVVpPVjAxWFVubFVNVnByWVZaS2NtTkhSbGROYmxKeVZGVmFWbVF3TVZkWGJXeE9UV3hLV1ZkWGVGTlJiVlpIWWtSYVZHRXlVbkZaV0hCSFYyeGFXRTFVVWxaTlZYQmFWVmN4YjFkR1dYcGhTRXBWWVRKU1VGWnFTa1psYkhCSFdrZG9hRTFJUWxwV2JHTjRUVVpzVjFkc1pGWlhSMmhZV1cweFUxWXhiRmxqUldSc1lrWldOVnBWVmpCWFJrcHpZbnBLVm1KVVZqTldiWGhoVG14S2NtUkhSbE5TV0VKUlZsZDRZVmxYVFhoVWJrNW9VbXMxY0ZVd1ZrdFViRnAwWlVkR1ZrMVZiRFJXUm1oclZHeE9TR0ZJUmxaaVZFWlVXV3BHVjJSSFRqWlNiWEJUWWtWd1dsZHJWbTlVTVZGNFYyNU9WR0p1UWxoVVYzQkdaREZaZVdWSFJtdFNiRnA1VjJ0YWQxUnNTbkpqUnpsWFlXdHZNRmRXWkZOU01WWnpWbXhPYVZaV2NGVlhWM1JoWkRBMWMxZHNhR3RTYkhCUFZtMXpNVk5HYTNkV2JVWm9UVlZzTmxsVldtOVdWbHBHVjJ0MFlWWldjR2hXYkZwTFl6RndSMWRyTldsU1dFRXlWakZrZDFReVJYbFNiRnBPVTBkNFYxbHJWbUZYUm14MFRsVk9WRkp0ZUZkV01qVlBWakF4V1ZGclpGVk5WMUV3V1ZaYVMxZFdSbkppUm1SWFpXdEdORll4V21Gak1WcHlUVlphYUZJemFGUldiWGgzVjBaYWRFMUlhRlpOYXpWNlZteG9jMkpHU2xkalNFcFZWbXhhTTFSVldsTmpNV1J6Vkd4a1RsWnVRbGRXYlRFd1ZURlpkMDFZVmxKaE1VcGhXbGQwWVZSR1ZuRlNhM1JxVFd0YVNWVnRlRTlYUmtwV1kwWldWMkV4Y0ZoV2FrWnpWMFpXYzFwR1pGaFNNbWhaVjFab2QyTXhWWGhpU0VwYVpXeGFUMVJXWkRSbFZscDBaVVU1V0dKR2NIbFpNR2h6VmpBeGRXRkdhRmRpUm5Cb1ZtcEtUMU5IUmtkYVJUVnBZbGRvV2xZeGFIZFNNV3hZVkc1S1QxWnRhRlJaV0hCWFYwWnNkR1JGWkU1TlZuQXdWRlZvYTFSc1dYZE5WRlpXWWxSV1RGWkhlR3RTTVU1MVZHeGFhRTFXYjNwV01WcGhZekpOZUdORlZsWmlXRUpZV1d4YVMwNUdXbGhOVkVKVlRWWnNORll5ZUZkV01rVjVaVVpzV2xaRldtRlVWVnBoVjBkTmVtRkdaR2xXVjNjeVYxUkNZV0l4V1hsVGExcHFVbFJHV0Zsc2FFTlJNVkpYVjJ0d2JGWnNTbmxYYTJSdlZUSktSMk5JWkZkV00wSklWWHBLU21WR1pIVlNiRXBwVWpGS2VWWkdWbE5XTWxaellraEtXR0pZVWxsWmJGcGhaV3haZVU1VmRGZE5hM0JKVmxaU1ExWnRTbGxoUmxKWFlsaG9NMVV3WkZOVFIwWklZVWQ0YUUxWGQzcFdha1poVmpKSmVGVllhR0ZUUmtwVVZqQmtORll4V25KV2EzUllWbTE0ZWxsVll6VlVhekZYWWtSU1dHRXhXbkpXYTFwS1pVWmtjbUZHY0U1U01VVjNWbTF3UW1WSFRYaFViR3hvVW0xU1QxWnRkSGRTVm1SWFZXdEtiRkpyTlVoV1J6VkxZVVpLZEZWdE9WVldla1oyVmpGYWExZEhWa2hQVmtwT1ZsUkZNRlp0TVRSak1rWnpVMnhhVDFaVWJGZFpiRkpYVWtaVmVGZHNUbGROVjFJd1drVmtjMVV5U2toa00zQlhVbXh3VkZacVJtdGtSa3BaWWtkb1UwMXRhR2hXYlRCNFZURk9SMWRZWkZoaVJUVnlWbTAxUTFOR1dsaGpla1pYVFZad1NGWXlkRmRXTWtWNFYyeFNWbFpGY0U5YVZWcFBZMnh3U0dOR1RsZE5WWEJWVmpGa05HRXdOVWhUV0doWVltczFXRmxzVm1GVU1XeHlWMnhrVDFac1NucFpWVlUxVm0xS1ZtTkdhRlpOYm1oeVZqSXhSbVZHWkhOVmJHUnBWa1ZhVFZkclZtRldNbEpHVDFaa1YySkhVazlVVnpGdllqRmFjbGRzWkZwV01GWTFWa1pvYjJGc1NsZGpSa1pYWWxSR1ZGWkVSbHBrTVZweVpFWndWMkpJUWxkV1ZFWlRVakpGZDAxWVNsaGhNbWhZVkZjMVEyRkdiRmRYYTNSVFlrZFNlbFp0ZUd0aFZrcHpWMWh3V0dFeFNraFpWRXBQVmpGS2RWWnRSbE5XUjNoWlZrWldZVmRyTVZkWGEyaHNVbTFTY2xSV1dsZE9SbFY1WTBkR2FGWnJOVWhXTW5oclZsWmFObFpyVWxaV1JWcFVXWHBHZDFKdFVrZGFSVFZvWld4YVRGWnNXbXRPUjFGNFZXNUtUbFpXV2xoWlZFcFRWMFpzY2xkdVpHcFdiRXA2VjJ0V01HRnJNVmRUYm5CWFRXNW9XRmxWVlhoVFZrWjBUMVprVTJKR2NIbFdSM1JoVXpGWmVGZHVUbUZTTUZwVVZGUkdTMVpzWkZoa1JtUlhUVVJDTkZadE5WTlViRXBHVjJ4b1ZtSllhRE5XYWtaVFl6RmFjazlXYUZOTlJuQTFWbFJKTVdReFduUlNXR2hxVWxkb1dGUlZXbmROTVZaMFRWVTVVMDFWTlhsVWJGcFBWakpLY2xKcVVsZGlXR2hVVldwR1dtVkdWbGxpUms1WVVqSm9WbGRXVWt0aU1WbDRZa2hLWVZKR1NsaFdiVEUwVFVacmVtTkZaRmRXYTNBeFZWZDRiMVl5U2xsVmJXaFhVa1ZhYUZsNlJtdGpiVXBIWTBkb1RsWnVRbEpXTVZwaFdWWmtkRlpyWkZWaWF6VndWVzE0WVdOR1ZuRlNhM0JzWWtkU1dGWlhkR3RXUjBwWFYyeHNWMkpZVWxoV2EyUkxVMVpHZFZGc1pFNVNNVXBRVjJ4V1lXRXhaRWhWYTJoclVtMVNUMVpzVWxkVGJGcFZVMnBDYWsxclducFZNV2gzVm0xS1IxZHNaRnBoTVhCTVZUQmFVMWRIVmtkWGJYaFhUVVJXU0ZaRVJtRldNVkowVWxoc2EyVnJTbGxXYTFaTFlVWnNjVk5yZEZOTlZrcDVWakp6TlZZeVNuSlRiR1JYWWxoQ1VGbHFSbk5XTVZaelYyeG9hVmRHU25oV1JscHZVVEZKZUZWdVRtRlRSVFZ2Vld4U1EwNUdWWGxsUjBaWFRWWndlbGt3YUVkWlZscFhZMFU1WVZac2NFeFpla1pyWXpGV2RHRkhiRlJTVlhCMlZtMHdlRTVIUlhoV1dHaGhVbGRTY0ZWclduZFdWbXhWVkd4T1YxSnNTbGRXVnpWUFYwWmFkVkZzWkZoaE1VcFVWbTF6ZUZKV1NuTmhSbkJPVWpKb01sWnRNSGhXTWs1elZHNU9VbUpJUWxoVmJHaERVMVprY2xadFJsZE5hekUxVlRKMGExWnRTbGhsUnpsaFZqTm9hRlpHV21Gak1XUjBUMWQwVGxaV1dYcFdSbHBYWVRKR2MxTnNhR2hTVkd4WVdXeFNSMVpHYkRaU2JVWnFWbXRhV2xsVlZUVldNa3BaWVVSV1dGWnNXbkpWYWtwSFVqRmtXVnBHYUdsU00yaFpWbGMxZDFZeVRuTlhia3BZWWxWYVdGUldWbmRXYkZaWVpVYzVhRkl3VmpOWmFrNXpWMGRGZUZOclRsVmlSbkJ5Vm1wR2EyUldUblJrUms1T1RXMW9XbFp0TVRSWlZsbDNUbFprV0dKR1dsUlphMlJUVm14U1dHUkdaRTlTYkhBd1drVmtNR0ZIU2taT1ZXaFdUVzVvZWxacVNrdGtWa1p6WVVaa1UwMHlhRmxXYlhCSFZqSk9jMVZ1VGxkaVJUVnZXbGQ0WVZkV1duUmtSM1JPVW1zeE5GbHJXbUZVYkZwWVlVaE9WbUpHY0doV2FrWmhaRVV4VjFSdGNHbFNiRmt4VjJ4V1YxbFhSWGROVmxwcVVrVktWbGxyV25kV1JscHhVbTFHVjFac2NIbFdWM2hyVkcxS2NsTnJWbGhYU0VKSVZYcEdTbVZHVG5WVWJXaFRUVVp3VlZacVFsZFRNVnBIVjJ0a1YySkhVbUZXYWtaTFYwWmFjMkZIT1ZkTmExa3lXV3RhVDFkdFNrZFhhazVoVmpOb1lWcFZaRWRUVmxKelkwWmthRTF1WTNsV01WcFhZakZOZUZkdVRsaGhNWEJ4VlcxMFMxbFdiSE5oUnpsWVVteGFlRlZ0ZUd0V01WcHlWMnBDVm1KWVRYaFdNRnBMVm0xS1JWVnNaR2xXUlVsNlZrWmFZVmR0VmtkalJXeFVZWHBXVlZWcVNtOVdiR1JZVFVob1ZrMVhlRmhaYTFwdllURk9SbU5JVGxaaVZFWlVWRlZhZDFadFJraGtSbWhUWWtkM2VsWnFTakJrTVZwelYycGFVMkZyTlZoVmFrNVBUa1phZEUxVmRFOWlSVFY2VmpJeE5HRkZNVWxSYkVwWFRWWndWRlY2UmxwbFZsWnlXa1pTYVdFelFuWldWekI0VlRKT1IySkdiR3BTYlZKeVZGWmFkMWRXVWxkaFIzUm9ZWHBHZVZSV1VsTlhhekZIWTBkb1dGWnNjRXhhUlZwWFpFVTVWMk5HWkZOV1JscEZWbXRhWVZsWFRYaFhiR1JWWW14S2NsVnRlRXRVTVd4VlVtNWtXRlp0VWxsYVJXUjNWR3hhZEZWcVFsZGlWRlpNV1ZkNFQxSXlUa2hTYkhCWFVsaENWVlpyVm1GV2JWRjRZMFZrWVZKc1NsUlpiRnBLWkRGYVdFMVVVbWxOVmxZelZGWm9VMkZHU2tkalJtaGFWak5TYUZwSGVITk9iRTV5WkVkMFUyRjZWWGhXYkdRMFdWWmtSMU5ZY0doU2VteFlWbXBPUTFWR2JIRlRhemxxVFZad2VsWnRlRXRoUlRGelUyeENWMVo2UlRCVmVrWlBVakpLUjFkdFJsTldNVXAyVm0weE1HTXdNSGhWYms1V1lUSlNXRlJXVm5aTmJGcDBaRVpPV0dKR2NIcFdiWEJUVjJzeFYyTkdhR0ZTYkhCb1dYcEdWMk5yTlZkYVJtUlRZa2hDUjFadE1UQldNVlY0VWxoc1ZWZEhhRlZaVkVwVFkxWldjMXBHVGxaTlYzaDZWMnRTVTJGVk1WZGpTR2hXVm14S1NGbFVSbUZqTWs1R1YyeGFUbUZzV2xGV2JHTjRVekZhZEZScmJHcFNiVkpZV1d4a2IwNXNXbkZSYlhSVVRWWndXRlV5TlV0aVJrbDNWMnhvV21KSFVuWmFWbHBoWTJ4V2NscEdUbWxXYkhCYVZsUktNRmxXV2toVGJGcFlZWHBzVjFsWGN6RmtiRlowWlVkR1YwMVhVakJhUldSdlZHeGFWVlpxV2xkV00yaDJXVlJHVm1WV1RuTldiR1JwVW14d1dWZFhkR0ZXYlZaSFZteFdVMkpZVW5GV2JYUmhUVlphU0dWRk9WWk5hMVkwV1RCYWQxWXdNWFZWYkdoaFVrVmFXRmt5YzNoV2JHUnpZVWRzYVZKdVFsbFdhMXBoV1Zac1YxWnJaRmRpUjJoelZUQmFkMk5zVWxoa1NFNVBZa2RTZVZac1VrZFdNREZXWTBod1drMUhhSFpXYWtaTFl6Rk9jbFZzYUZkaVZrcFpWMWh3UjFVeVVsZFhibEpwVW1zMVdGWXdWa3RWTVZwMFRVaG9UbEpyTVRWV1ZtaHZWakpLU0dGRk9WWk5SMUoyV1dwR1UxWXhaSFZYYXpWcFVtNUJkMVpIZUZkaE1XUnpWMjVLYWxKdGVGaFdibkJYVFRGa1YxZHJkRTlpUlhCNVdsVmFkMkpIUlhkV1dHaFhZV3RLY2xacVJrOVRSbHB5V2taV2FHVnNXbmRYVjNoclZEQTFWMWR1UmxSaGEwcFlWRmQwYzA1R1dsaE9WazVYVW0xU1NWWlhOVU5XVmxwR1RsVlNWMkpZYUhwWmVrWlhaRlpTZEdGR1RtbFRSVWt3Vm0xMGFtUXdOVmhUYTJoVVlUSm9WMWxVUm5kV01WSllUbGM1YW1KR2NFWlZiWFF3WVRGYWNsZHVjRnBoTVhCeVZsUktTMVpyTVZWVmJHUm9UVlp3YjFadE1IaFZiVlpIVkc1V1YySkdjSEJWYlhSM1pERmFkR05GT1dsTlZYQllWMnRvVDFkck1IbGhSbEpWVm14VmVGVXdXbHBsVlRWWFdrWmtWMDFJUWxwWGJGWmhWVEZrYzFkcVdsTldSVXBvVm1wT2IyTnNiRFpTYlVaclVqRktTRmRyVlRGaFJURlpVVlJHVjAxdVVsaFdha1pXWlVkS1IxcEdWbWhOYkVwV1YxY3hlazFXWkVkVmJGcFlZa1p3YzFWdGVFdGxWbGw1VGxVNWFHSlZjRWhWTWpWelZtc3hjVkpZWkZkV1JWcHlWVEJrUjFOR1NuTmFSMmhvVFc1amQxWnJaREJoTVVsNVZXdGtWV0pzV2xWWldIQnpWMVpXY1ZKcmRHaFNiVkpZVjJ0U1EyRnRTbGRTYWxKYVlUSm9WRmxVUmt0U2JFNXpZVVphYVZkR1NtOVdiWGhoVlcxV1IxZHVWbUZTYkhCdldsZDBZVTVzV2xWVGFsSlVUVmRTU0ZZeWNHRlZNa3AxVVcxR1YyRnJOWFpVVjNoM1VsWkdWVlpzYUZkaE1YQTJWbFJLTkdFeVNraFRhMlJxVW0xb1dGbFVSbmRqYkZKeVdrWktiRlpzV25sWGExcFhZVmRLUjJOSVpGZFdNMUpYVkZaYVlXTXlTa2RXYkVwWFVsWndlVlpHV21GWlZtUkhXa2hLWVZKRlNsaFZha0ozVWpGYWRHTkZPVmRpVlhCV1ZWWm9iMVl5UlhoalIyaFhZbGhOZUZadGVGTmpNa1pJWVVkb1RsTkZSWGxXYlhoclRVWnNWMU5ZYUdGU1YxSnhWV3hhZDJOV1ZuUmtTR1JWVFZaYWVsWXlOV3RVYkZwelkwWmFWbUpZYUhKV2JGVjRWbXhrZFdOR2NHaGhlbFo1VjFaYVlWTXhXWGhVYms1VllrZFNiMWxVVGtOV1ZscHlWbTFHVmsxV2NIcFhhMmhYVjBkS1dWVnJPVmRoYXpWVFdsZDRZV05zYTNwaFIzUk9Wak5vV0ZaR1dtRlpWbHBJVTJ0a2FsSnNjR0ZXYTFaM1ZrWnJlV1ZIZEZkTldFSkhXa1ZrZDFSc1dYaFRhbEpYVm5wRk1GbHFSbHBsUms1elZteGthVkpzY0ZwV2JYUlhVekpPYzFaWWJFNVdiVkpZV1Zod1YxZEdiRlpYYlRsb1ZteHdXRmt3V25kV01WbDZVV3Q0V21GclJqTmFWVnAzVWpKS1NHTkdUbGRTTTJoWlZtdGFhMDVHYkZoV2JHUnFVbFp3V0ZsclZURlpWbHAwWTNwR1ZHSkdXbGxVVlZKWFZqSktWbGR1YkZkTmFrWjJWMVphV21WdFJrbGpSbkJPWW0xb2VWWnRlR0ZaVjFKSVUydGtWV0Y2VmxoWmJYUkxWRVphZEUxSVpHdE5iRnBKVmxab2IxWldaRWhsUm1oYVlUSlNkbGt5ZUZka1YwNUhXa1prVjJKWWFEWldNblJUVlRGa2MxZHVVbFppYldoWFZGYzFUbVZHYkhKWGJIQnJUVmRTZVZsclpFZFdNVmw0VTJwYVYySkdTa05hUkVwWFYwWktjbUpHV21sU01VcFFWMWN3ZUdJd01YTmFSbWhxVWxoU1ZWUldWbk5PVmxWNVpFWmtWMDFyY0ZkV01uTTFWMnhaZW1GSGFGcGhhMXB5VmpCVmVGWldWbk5WYXpWVFVsVnJkMVp0ZEd0T1JteFhWMnhrWVZKWGFGZFpiWFIzVmpGc1dHUkhSbFZTYkVwWFZqSXhSMkV4U2xWV2JIQlhVbnBHZGxsVlpGZGpiR1JaV2tab2FWSnNjRlZXV0hCSFlUSlNSMVJ1VG1oU00yaFZWV3hhZDJGR1drZFdiVVphVmpGYWVsWnROVTlXTVZwSFYyeFdWbUpVVmtSVmFrWjNVbXhhVlZKc1drNVdWM2N5VmpKMFUxVXhXWGhYYTFwb1RUSm9ZVnBYZEdGVFJtdDVZM3BHV0Zack5UQlphMXBQVmpKRmVsRnVXbGRpUjA0MFZGVmFUbVZXU25KYVIyeFVVbFJXV2xkWE1YcE5WMDV6VjI1U2JGSllVbFJVVmxwaFpXeHNWbHBFUWxkTlZYQldWVzEwYzFsV1dsZFhiR2hYWWxob2FGcEZXbGRrVms1elYyczFhV0pYYUVsV01uUlRVakZOZVZWcldrOVdiVkpYV1d0a1UxZEdXbkpYYlVaVFZteHdlRlV5Tld0VmF6RnlUVlJTVmsxdVVuSldWRXBMVTBkR1NHRkdXbWxTTW1oRlZteFNSMVV4V25OWGJsSlRZbGhTV0ZscldscE5SbHAwVFZod1QxWnNXakJWTW5SdlZVWmFSazVYUmxwV1JWcG9WbXRhWVZkSFZraFNhemxwVW01Q05sWXlkR0ZXTVZsNFUyeGFWMkZzU2xsWlZFcFNUVVphUlZOc1RsaFNhelY1VmpKNFUyRldTbFpqUm14WVZteEtSRnBFUVhkbFJtUnpXa1p3VGsxc1NucFdWM0JEVmpBMVIxZFliR3BTTUZwWVZGZDBkMlZXV1hsTlZ6bFhZbFZ3U1ZaWGVGTlpWbGw2WVVST1ZrMUdWalJXYlRGVFUwZE9SazVXVGxOTk1taG9WbXBLTkZZeVJYZE9WV1JYVjBkU1QxWXdXbUZoUm5CWVpFaGtXRlp0ZUZaVmJURkhZVEpLUjJORmJGVldiRm96V1ZSQmVHTnRTa1ZYYkhCT1VtNUNXVmRXV21GWlZrNUlWbXRvVUZadFVuQldNRlpMVlZaa1dHTkZkRmROYXpFMFdUQldZVll5U2tkVGJrSldZV3RhVEZaV1dtRlhSVEZGVW14S1RsWXhTbGxXYWtvd1lURmtkRlp1U2xoaVJuQlhXV3hvYjFkR1VsVlNiR1JyVWxSV1dGWkhlR3RWTURGSlVXeHdXR0pHV2xoV1ZFWnpWakZrY1Zkc1RtaE5iV2hZVmtaV1lXUXlSa2RqUldSWVlrVTFjbFZxUW5kVFJscElUVmM1YUZadFVrbFhibkJMVmpKR2NtSjZRbGRoYTNCSFdsVmFhMWRYU2tkVWJXeG9UVEJLTlZac1pEUlpWazE1VW10a1YxZEhVbTlWYkZVeFkxWmFkR1ZGZEZoV2JFcFlWMnRTUTJGR1dYZGpSV2hXVFc1U2RsWnFSa3RrUjBaSlYyeGtVMlZyV2sxV1ZFWmhVakpOZVZSclpGaGhlbFp2V1d0YWMwNXNXWGhYYkdSYVZtMTRWMVJzYUZOV1IwVjRWMnhTV21FeGNFeFpNRnB6WXpKR1NFOVZPVmRpUjNjeFYxUkNWMkV4Vm5KTlZWWlhZa2RvVjFsc2FHOWtiRnBGVW0xR2FrMVhVbmxVTVZwM1ZqQXdlV0ZGTVZkU2JIQm9WbTB4VjFJeFpIVlViRlpwVjBaS2QxWlhOWGRqYlZaeldrWm9hbEpVYkc5VVZscGhVMFpaZVdOSFJsWk5hM0JaV1ZWa1IxWXlTbFZTYkZKWFZsWndNMVl3WkZkU2JWSkhWR3MxVjFkRlJqUldiWEJLWlVaSmVGVnVUbFJYU0VKdlZXeGFkMWRHV25SbFNHUnFZa2Q0VmxWdGN6VmhhekZXWTBad1dHRXhjRkJaVmxwaFVqRmtjMWRzWkdsWFIyaFlWa1phWVZKdFZrZGpSV3hUWWtWd2NGbFljRmRXVmxwWVRWUkNXbFp0VWxoWGEyaExWakpLZEZWc1pGcFhTRUpJVldwR1dtVlZOVmRhUm1Sb1pXdGFXVlpxU2pSUk1WcHpWMWh3YUZKRmNHaFZhMVozVkVaV2RHVkdaR3RTYTNCNlZrZDRhMVV5U2tsUmJscFhZbFJDTkZwRVJrNWtNRFZXWVVaa2FXRjZWbGRYVnpFMFdWZE9SMVp1VGxkaWJWSlhWbTE0ZDAxR2NFWldha0pvVFVSR1dGWXllSE5XVmxwWVlVaGFXbFpXVmpSV2FrcExUbXhPYzFwSGJGZFNiSEJLVm1wR1lWbFdUWGhhUldSWFlteGFjVlZxUW1GV1JuQllaRWRHVlZadFVscFpNRlpMVkRGYWRGVnJiRmRpV0ZKMldXdGFTMk5yTlZaUFZuQnBWa1ZhZUZkc1dtRlhiVlpZVld0a1lWSXllRTlXYlhSMlpERmFWVkp0T1doTmExcFhWRlZvZDFWdFNrZGpSMFphWVRGd1RGcFhlSE5XYkdSMFVtMXdWMkpGYjNkV1JFWnJUa2RHVjFOWWFGUmhNbEpZVm10V2RrMUdiRlZTYkVwc1VtczFNVlp0ZUV0aFZrbDZZVVpzVjFaNlFqUldSekZYVWpGa2NsZHNhR2xTYmtKNVZrWmFWMlF3TVZkWGJHaHNVbXMxYjFadGVITk9iR3hXVm14a1dGSXdjRWxXUjNCVFZtMUdjbGRzUWxaaGExcHlXa1phWVdNeFduUmlSbVJPVFcxb1YxWnFSbUZoYlZaR1RsVm9WMkpyTldoVk1GVXhWMFpzYzJGR1RsaFNiRXBaV2tWa1IySkdXblZSYTJSWFlsaG9VRll5ZUdGamF6VldZVVphVG1GcldrbFdiWEJMVWpKT2RGTnFXbEppVlZwWVZGUktiMVZXV25STlZGSldUVmRTV0Zrd1ZtOWhNVXB5VGxVNVYySkhUVEZVVkVaaFpFVXhTVnBGTlZkTlJFVXhWbGN3TVZNeFVuTmFSV1JVWW1zMVYxbFVSbUZOTVdSWFYyNU9hazFZUWtaV1Z6RjNWakpLV1ZWWWNGZGlWRUY0VmtSR1ZtVkdaSE5XYld4VFZqTm9XbGRXVWtkWGJWRjRWMnRvYkZKWVVsVlZha1pIVG14c1ZsZHRSbFZpVlZwNlZqSndZVll4V25SVmFscFZWbTFTVUZwRldrOWpiR1J6VjIxc1YxWnVRbFpXTVZwVFVUSlJlVk5ZYUdGU2JXaHpWV3BDWVdOV1VsaGxSWFJZVW14d1dWcEZaRWRXYXpGWVZXdHNWMVl6YUZoV2JGcGhWMFpXVlZGc1dtbFNia0paVm0xd1IyUXhUa2hWYTJSV1lsZDRWRlp0ZUhOT2JGcHpXVE5rYTAxRVJsaFdNblJyVjBkS1IyTkdRbGRpUmxWNFZqRmFjMWRIVWtaa1IzaHBVbXh3TlZacVNqQmhNV1JIVTI1V1VtRXlVbUZVVlZwM1ZFWmFTR1ZGZEZkTmF6VkdWVzE0YTFZeFNsZGpSbXhYWVRGS1NGVnFTazVsVms1WlkwZEdVMDF1YUZWV2JURXdaREZhUjFkdVVrOVhSMUpZVkZaa05GZEdXbGhsUm1SV1lsVndNRlpYY3pWWGJVVjVWVlJDVlZaV2NIcFpNbmgzVTFad1IyTkdaRmRTVm5CWlZteFNTMDVHYkZkWGJHaFRWMGQ0VjFsdGRIZFhWbHAwVFZaT1ZWSnRkekpWYlRFd1lXeGFjbU5JY0ZwV1ZuQnlWbFJHWVZJeFpITlhiR1JPVm10d1JWZFdVa2RVTWxKSFYyNU9XR0Y2YkZoWmJHUnZWMnhrV0dWR1pGcFdiVkpZVm0wMVIxWkhTbFZpUlRsVlZtMVNWRll5ZUhKa01WcFZWbXhrYUdWcldqWldha2t4WXpGc1YxTnNaRmhpUmtwWlZtMTRkMVZHVlhoWGEyUnJVbFJzV0ZZeU1XOWhSVEZaVVc1YVYwMXVhSEpVYTJST1pWWlNkVlJ0UmxOaVJuQlpWMWQ0YTA1R1drZFZiR1JZWW0xU1ZWbHJXbmROUmxKV1lVYzVhRTFFUmxkVVZsSlhWakpLV1dGSVdscFdSVnBNVkcxNFlXTXhXbk5qUjJ4VFRWVldNMVpxUm1GWlYwVjVWR3hrVldKcmNGQldhazV2VjBaU1ZsZHVaRlJpUjFKNlZtMHhNR0ZyTVZkV2FrNVZWbGRvZWxsVldrOVNNVTV6WVVaV1YyVnNXakpYYTJRMFl6Sk9WMVJ1U210U2F6VlBXVlJPUTFJeFduUk5TR2hUVFZaS01GVnROVTlYUjBwWVlVWm9WbUpZYUV4VmExcDNVbFpHV1dGSGNFNWhNMEpMVm14amVHTXhWWGhYYkd4U1ltMTRXRlpxVG05a2JHeHhVbTEwYWsxWFVscFphMVV4VmpGS2NtTklXbGhXTTJoWVdrUktWMVl4Vm5WVWJXaFRUVEZLV2xkWGVGZFpWMVpYWWtaV1ZXSllVbGxaYkZaM1YyeGFWMkZIZEZkTmExWTBXVEJXYjFZeVJYaFdWRVpYWWxSR1VGVnFSazlqYXpWWVlrWk9XRkpWY0ZaV2JURjNVakpHZEZacmFGVlhSM2hVV1cxek1XTkdVbFZUYkU1V1ZteHNNMVp0ZERCV2F6RlhZMFJHV2sxR2NISldha3BMVWpGT2MySkhSbGRXTW1oNVYxWlNSMU15VG5KT1ZsWlRZa2hDYjFSV1ZuZFZWbHAwWlVkMFUySldSak5VYkZweldWWktjMk5HYUZwaVJuQk1XbFphWVZaV1RuRlZiRTVwVm10Wk1GWlVTVEZWTVZGNFYyNU9WR0pIYUZoWmExcExWMFpXY2xkc2NHeFdNRFZIVmtjeGQxUnNXbGxSYTJ4WFZucEZNRmxxUm5OV01VNXpZa1pLYVZKVVZsZFdiWGhoV1ZkR1IyTkZaRmhpUm5CelZXMTRkMlZXVVhoWGEzUm9WbXR2TWxsVVRuZFhSbGw2Vld4b1YxWkZXbGhaZWtaclYxZEtSMWR0YUU1TmJXaFlWbTB3ZUU1R1duUldhMlJwVWtad1ZGbHRjekZqYkZaelZXdGtXRkpzY0VsYVZWcHJZVVphY21KRVdscFdWbkF6VmpCYVdtVnNWblZYYkdSVFVsWndVRmRzV21GWlYwMTRXa2hPVldKSFVsUlphMmhEVjFaYWMxcElaRlJOUkZaSVZUSjBhMkZXVGtaT1YyaFdZbGhOZUZZeFdsZGpNVlp6V2tab1YySllVWHBXTW5SVFVURmFjazFWVmxOaGExcFpXVmR6TVdWc1dYZFhiVVpQWWtWd1dsa3dXbGRoVmtsNFUyc3hWMVpGU21oWFZtUlBaRVpLY21GSGJGTmlSWEJXVmxkNFYyUXdOVmRYYms1V1lUQTFXRmxzV21GVFZscFlUbFU1VjFZd2NIbFdNbmhoVjJ4a1NWRnVjRnBOUm5CVVZtcEtSMUpzVW5OaFJtUnBZVEJ3V1ZZeFdsZFdhelZYV2tWa1dHSkdXbFJaYlRWRFYwWlNWMWRyZEZOU2JHd3pWMnRXTUZaR1NuTlhibXhWVFZad00xbFdXbXRTTVVweFZHeGthVmRHU205V1YzQkhZVEZLY2sxV1pGaGlXRkpVVkZjeGIxZFdXblJsUjNCUFVqRmFXRll4YUc5WFIwcElWVzA1VlZac2NIcFViRnBoVWpKR1NWUnNaRk5OUmxreFZteGtORkl4V1hsU2JrcFBWMFp3WVZwWGRHRlhSbXQ0VjJ0MGExSnJjREJaTUZwcllVZFdjbFpxV2xkaVdGSnhXbFZWZUZOR1RuSmhSbEpvVFc1b1ZGZFhkR3RPUmxwellraEtZVkpyY0hKVVZtUTBWMFpaZVdWSVpHaE5SRVpaVmxkd1IxZEhSWGhqUkU1YVZsWldORlZzV21GamJGWnpZVWRvVGxadVFscFdhMlF3V1ZkRmVGZFlhR3BTVjNoWFdXeG9iMVpHVWxWUmEzUnJUVmRTV0ZsVmFHdFdNREZGVVdwU1dHRXhjSFpaVjNoTFYxWkdjazlXV21oaE1HOTZWMnhhWVdReFNuTmFTRTVWWWtad2NGVnRlSEpsVm1SWVpFWmtUbEpzY0hwV01uUmhZV3hLYzFOc2FGZGlXR2d6V2xkNGQxSnNjRVprUmxKVFRVUldTbFpYTVhwTlZsVjRVMWh3WVUwelFsaFphMXAzWVVac1dHTXphRmROVjFKNlZqSnpNVmRHU2xWV2JtaFhWa1ZLYUZWNlJtRldNa3BKVldzMVYxSlVWbnBYVjNSaFpERk9WMk5GV2xkV1JscHZXV3RXZDJWV1dYbGxTRTVZVWpCV05GWXljRTlXTVZsNlZHcFNWbUpZYUhKYVJscGhZekZrY2s1V1pHbFRSVXBUVm0xNFlXRXdOVWhWYmxKV1YwZDRWVmxVUm5kV01XeHlWbTVrV0ZKc1NsbGFWVll3VmxaS2MyTkdhRmRXTTFKUVZsUkJlR050VGtsalJtUlRUVEpvYjFadGVHdFNiVkYzVGxab2FGSnNjSEJWYlhSM1RsWmtjMXBFVWxaTlZuQjZWakkxUjFWdFNrZFRia0pXWWtad1lWcFhlR0ZYUlRGSldrVTFWMkpJUWtsV2FrbzBXVlpSZUZkc1drOVdiWGhoVm1wT1UxUkdjRmhsUm1ScVlrZFNlVmRyV205Vk1rcHlVMnRvV0ZaRlNtaFZla1pUWXpGT2MxcEhjRk5TVm5CWlZtMTBWMWxXWkVkWGExWlRZVEpTY1ZSWGRITk9iR1J5V2toT1ZrMVdjSHBaTUZwTFZqRmFjMU5zUWxkV1JWcE1XWHBHYTJNeGNFZGpSM2hwVW01Q1dGWnJXbUZXTVZsM1RsWmthVk5GY0ZoWlZFNVRXVlphYzFWclpGUldia0pYVm0xNGExWXlTa2RqUkVKWFZucFdURlp0YzNoa1YwWkdXa2RHVTFKV2NFMVhhMVpXVFZaWmVGWnVUbUZTYlZKWVZXMTRkMUpzV25SalJYUnJUVlZXTlZaR2FHOVdSMFY1Vld4U1dtRXlVblpaVlZwWFl6SkdSbFJzV2s1V2EzQllWbTB4TkZsV1VuTlRibEpXWWtkNGFGVnNaRkprTVZwVlVWaG9hbUpIVW5wWlZWcDNWR3hLZFZGcVNsaFdiRXBEV2xWa1UxSXhXblZWYldoVFltdEtkMVpYTVRCa01EVnpWMnRvYkZJd1dsaFVWbFp6VGtaYVdFNVZkR2hOVld3MVdsVmFiMWR0U2xsVmEzaFhUVzVvYUZZd1ZYaFhWbkJIVTJzMWFFMVdhM2RXYWtvd1ZqRnNXRkp1VGxWaE1YQlFWbTE0ZDFZeGJITlZhMlJyWWtad1YxWXlOVTloYlVwSlVXdGtZVkpXY0ZSV1ZFcExVMVpHV1ZwR2FGZFNWWEI1VmtaV1lWWXlUbkpOVmxwb1VqTlNWVlZxVG05WFZtUllaRWRHVkUxV1NraFdNalZIVmtkR05sWnVUbFpoYTBWNFZUQmFjMVpzWkhOYVIyaFRUVVpaZWxkVVFsZE9SbGw0VjFod2FGSXlhR2hWYTFaM1ZERndWbGR1WkZOTldFSkpXVlZhVDJGSFZuTlhiRVpYWWxSR00xVlhjM2hXYXpGV1drWm9hV0Y2VmxoWFYzaFhXVlpaZUZkdVVtdFNia0pQV1d0a05HVldiRlpoUjNSWVVtdHdlbGt3VWtOV01WbDZWVlJDVjAxcVJrZGFWbHBYWTIxV1IxZHRiRk5pUmxrd1ZteGplR1ZyTVZkWGJrNVhZbXhLYjFWdE1WTlhSbHAwVGxWS2JGSnNjSHBXVjNSclZqQXhWMUpxVWxaaVZGWlFXVlpWZDJWV1ZuVlJiRnBwVW01Q1RWWnNVa2RaVjA1WFZHNU9WV0pHU2s5V2JYaDNWakZhVjFwRVFtaE5hMXBaVlRKMFlWUXhXblJWYkdoV1lXczFWRlpGV210V01WcFpZVVpTVTAxV2NFaFdiVEUwV1ZaWmVWTnJXbXBTUlhCWlZtMHhVMDVzY0ZaYVJUVnNVbTVDU2xadE1YZFZNa3BZWVVoa1YxWXpRa2hWZWtaWFZqRmtjbHBHWkdsU01VcDRWa1phVmsxV1RsZFdXR3hyVW5wc2IxUldWbmRsVmxsNVpVZDBWMVpzY0ZsWlZWWlRWbFphVjJOSFJtRldiVkpZVlRCa1UxSXhVbkpPVms1VFZtNUNURlp0TVRSaE1EVklWRmhvV0dFeWFGVlphMlEwWWpGV2MxVnNaRmhTYkVwWFZqSjRZV0pHU25Sa2VrcFdZbFJXVUZsWE1VdFRWa1p5WVVab2FFMXNTakpYVmxwaFdWZE9kRlJyV2xoaVIxSllWV3hhZDFWV1drZFdiVVpVVFZac05GWXlOVTloUmtweVUyeG9ZVll6YUdoV2JYaGhaRWRXUjFkck5WZGhNVmt3VmpKMGIxSXhWblJUYmtwUFZteEtWMWxzYUZOaFJsbDRWMjEwYW1KR2NERlhhMXBoWVVkV2NsZHJhRmRoYTJ0NFZtcEdZV05yTVZkYVJtaHBVbFZ3V0ZadGNFOWlNREZ6WTBWV1ZHRXpVbFJaYTFwaFpXeFZlV1ZIZEZWaVZYQkhXVEJWZUZZeVNrZGpSbEpXVmtWYVMxcFdXazlrVmxKelZtMXNVMkpyU2xsV01WcHJaV3N4VjFWdVRsWmlSMmh4V2xkMFlWWldXblJOVkZKWFRWZDRWMWRyVWtOV01VbDNZMFZrV21FeFNsUldNbk40VWpGT2NtVkdaRTVpYXpRd1YxUkdZVk15VFhsU2EyUnFVbTFTV0ZsdGRFcE5WbGw1WlVkR1dsWXhTakJXYlhocllXeEtWMk5JVGxaaVdGSXpWa1JHWVdNeVJrWlRiWFJPVm01Q05GWlVTbmRWTWtaR1RWWmFhVkpGTlZaV2JYaGhaR3hhZEUxVmRGUlNNVnBJVm0xNGQyRldTWGxoUkVwWVZrVmFhRnBFUmxwbFJtUjFVMjEwVTAxdWFGQldiWEJQVldzeGMxcEdhR3RTYlZKVlZGZDBZVkl4VWxkWGJrNVdZbFZhZVZVeWVHOVhiVXBIVTJ0b1lWSXphSHBXYkZwTFkyczVWMVJyTlZkTlZXOHdWbTB3ZUU1SFNYbFNiR1JVWWtaYVdGbFVSa3RYUmxaeVZtMUdhRkpzV2xaVk1uTTFWVEF4Vm1OSWNGcFdWMUYzVmxSQmQyUXhUbk5SYkdSVFlraENXVmRyVWt0Vk1rMTRZMFZzVkdKSFVuQldhMlEwVjFaYVIxcEVVbHBXTVZwWVdUQldZVmRIU2taT1ZtUmFZVEZ3TTFVd1duSmtNVnB4VVd4a2FWWldXVEJXVkVreFZqRmtjazFZVm1oU1dHaFhXVmQwWVZSR2NFZFhiWFJyVW10d2VWUnNXazlVYXpGMFlVVm9WMkpZYUdoWFZtUkdaVlpLV1dGR1ZtbGhlbFpWVm1wQ2ExVXhXa2RpU0U1V1lrZFNXRlp0ZUhkbGJGcHpWV3RrVm1GNlJsbFdWelZ2Vm14YU5sWnNRbGRXUlZwTVdUSjRhMk15U2tkaFIyaE9WbTA1TmxadGVHdGxiVlpIVTI1T1lWTkdXbGhaYTFwM1ZERmFkR1ZJWkZaV2JIQllWMnRTVTJFeVNsZFNhbFpXVFc1U2FGWnRNVXRTYlU1SFlVWldWMDB5YUUxV2ExWmhXVlpaZUZadVNsVmlSVFZ2V2xkNFlWTldaRmhrUnpsVFRWWndXVlZzYUd0VU1WcFZZa1prV2xZelVreFpWVnBhWlVaa2MxTnRlRk5OUm5CSlZqSjBZVlV5UmxkVGJGWlhZVEo0V1ZaclZrdGpWbEp6VjIxMGExSnJjRnBaYTJSdlZUSktXR0ZIYUZoV2JFcElXa1JHUzFJeFpIVlRiR2hvWlcxNFdWWnRjRU5aVms1SFZtNVNhbVZyV2xaWmExWjNWMnhXVjJGSVRsZE5SRVpZVlRKMFUxWXhTa1pYYTJSaFZteHdVRmt5ZUhkVFIwWkdUbFUxYVdKWFozbFdiWGhUVVRGc1dGVllhRlZYUjJoWVdXdGFZVlpHYkZWVWJFNXFZa1phTUZSV1drOWlSMHBJVlc1c1YySlVSWGRXYkdSTFVtMUtSVlZzV2s1aWJXZDZWbTB4ZW1WSFRsZFRiRlpTWWtkU1dGWnFSa3RYVmxwMFRWUlNWRTFYVWxoWGEyaFBWMGRLUms1Vk9WcGlWRVoyVmtaYVlWWldVblZhUms1T1ZsWlpNRlpVU2pSWlZsWkhWMjVTYkZJeWFGZFpWM1IzWkd4YWMxZHNaR3BOVm5Bd1ZXMHhNRll5U2toa2VrWllZa1phY2xSVldtRldhekZaVTIxc1UxSnNjRmhXUm1NeFVURmtSMWRzYUd4U2JrSnpXV3RhWVUxR2JGWlhibVJvVm10d01WVlhNRFZYUmxsNlVXdG9ZVkpGV2t4YVJWcExZMnh3U0ZKc1RrNU5iV2hhVmpGamVFMUdUWGhYYms1WVlrZFNXVmxzVW5OWFJsSlhWbFJHYkdKR1ducFpWV2hQVmpGYWMyTkZaRnBOUm5CWVZtcEtTMUl4V2xsaFJuQk9WbTVDZVZkVVJtRlNNazVYVm01U2FsSnJOVzlVVm1oRFdWWlplV1JHWkdoTmJFWTBWbGMxUzFSc1duTmpTRVpXVFVad00xWXhXbk5XVmtwMFVtMTBhVkp1UWpSV1ZFbzBZVEpHZEZKcVdtbFNiSEJZV1d4b2IxUkdXblJOVm1SclVqRmFTRlpIZUc5V01rcFdUVlJTV0Zac1NrTmFWV1JPWlZaT2NtSkdUbWxTYkhCMlZrWldVMVl4VmtkWGJHaHFVbFUxWVZadE1WTlhSbHBYWVVjNWFGSnJjREJXVjNoclZqSktWVlpyVGxWV00yaFlWakJrVTFKV1ZuTmFSazVwVTBWS1dWWnJaRFJXTVZGNFdrVm9VMkpyY0ZWWmJUVkRWakZzVlZKdVpGUlNiR3d6VmpJMWExVXlTbFpPVldoV1RXNU5lRlpVUm1Ga1ZrWlpZVVprYVZKcmNFbFdiWEJIVlcxV1IxTnVWbFZpVjNoUFZGZDRTMlF4V2xobFIwWlVUVlpXTkZZeU5VZFdSMHBHVGxaV1ZWWnNjR2hXYlhoWFYwZFNTR1JIYUZkTlNFSklWa2Q0WVdFeFdYaFRXSEJXWVROb1dGWnNXbmRVUm10NVpVVjBhbFp0VW5wV01uaHJZa2RGZDFacVVsZE5WbkJ5Vkd0YVMyUkdWbGxoUmxacFlrWndWMWRYZEc5Uk1rNUhWMjVLVjJKVldsaFdiVEZUVjFad1ZscEVRbGRTTUhCWVZqSTFkMVl4U2paV2JGSmFZVEZ3VEZwR1drZGpNa1pIVm14a1YyRXpRbHBXYTFwclRrWnNWMU5zWkZaaWJGcFdXV3RXZDJJeFVsVlRiRXBPVW14d1dGZFVUbXRVYkZwelUyNXdWazF1YUhwV2JURkdaV3hXYzFwR1pHaE5WbkJOVmxSQ1lXTXlVa2hXYTFwUVZtMVNjRlZ0ZEhkT1ZscFZVMWhvVTAxV1NucFZNV2gzWVVaS1YyTkdhRmRpV0dneldUSjRjMVpXU25KUFYzQk9WbGhDWVZZeWRHRlVNa1pYVjJ0a1dHSkdjRmhaYkdodlZqRlNWMWRyV214U2JrSktWVzE0UzJGWFJqWldiRlpYWWxoQ1NGVnFRVEZqTVdSWllrVTFXRkl4U2xkWFYzaFhaREZPUjJFelpGWmlWVnBZVkZWU1IwMVdiRlpoUlhSWFRWVndSMVZ0Y0ZOV2JVWnlWMnRvWVZKV1ZYaFdiWE14VmpGU2MyRkdUbWhOTUVwUFZtMHhORmxXVlhoU1dHaFVWMGQ0VlZsdGN6RldiR3h5VjI1a1YySkhlRlpWVnpWcllVWktjMU5zWkZoaE1VcFVWbFJHWVdNeFpITmhSbWhvVFd4R00xWnRkR3RUTVVwelYyNUdWV0pHY0hCV2ExWkhUa1phZEUxVVVsUk5WbkI1VkZaV1YxVXlTa2RYYkdoYVlrWndURlpHV21GWFIxWkhWMnMxVjJFelFqVldSM2hoV1ZaYWRGTnNhR2hTYldoWVdXdGFkMDB4VWxkWGJVWlhWbXR3ZWxkcldsZFViRnBYWTBSYVdGWXpRbEJaVkVwSFZqRk9jMXBHVW1sU1ZGWlpWMVprTUdReFdrZFhiR2hzVW0xU1dWWnFRVEZUYkZwSVRWaGthRlpyYkRaWlZWcHpWMFphYzFkdGFHRlNSVnBVVlcxemVGWnNjRWRWYld4VFZrWmFiMVl4V210TlJrcDBWbXRrVjJKcmNHaFZiR1JUVjBac2NsWnVaRTVTYkVwNlZqSjRUMVl3TVZkalJscFhZbGhTVkZacVFYaGtWa1p5Vld4d2JHRXhjRTFXVjNCSFV6Sk5lVkpyYUZOaVJUVnZWRlpvUTFac1duSlhiVVpYVFd4R00xUlZhRzlaVms1R1kwZG9WazFHVlhoV1ZFWlRWMGRTU0ZKck5WTmlSbGt4VjJ0V2FrNVdXbkpOV0VwcVVrVmFWMVp1Y0ZkVFJtUlhWMnh3YkdKRldubFdWM2gzVkd4S2RWRnFXbGRpV0VKSVdYcEJNV014VG5WVmJXeFRZbFpLVUZaWE5YZGlNRFZIVjI1S1dHSlZXbTlVVjNoSFRsWldkR1ZIUmxWaVIxSkhWako0YjFZd01VaFZiRkpYVFZad2FGcEZWWGhXTVZKMFpVZHNWRkpWY0VwV2JYQktUVmRGZUZwRlpGaGlhM0JRVm0weE5GbFdiRlZTYm1SVVVtMVNXRmRyV210aGJVcEdUbGhzVlZac2NHaFdSM2hoWXpKT1IxSnNaRmRpVmtWM1YydGplRlZ0VmxkVWJrcFlZa1p3Y0ZWc2FFTlhWbHBIV2tSU1ZFMVdTa2hXTW5oclZtMUZkMDVXVWxWV00xSXpXbGQ0WVZOSFZraFNiR1JYVFVaWmVsZFVRbXRpTVZwWFYyNU9XR0V6YUZkVVZscDNZMnhyZUZkc1RtdFdiRXA2VmpKNGExUnNUa1pUYTNCWFlsaENURnBFUm5OV01YQkdZVVpTYUUxdGFIWldWM2h2VlRGa1YySkdhR3RTTUZwWFZXMTRjMDB4V25OVmEyUllVbXR3VmxWdGVITlhiVVY1VlZSQ1dsWnRVa3hXYWtaTFkxWmFjMXBGTlZkaWEwcGFWbTE0VTFJeFVYbFVibEpWVjBoQ2FGVnRlSGRqUmxaellVVk9hMDFXY0VoWFZFNXZWbXN4VmsxVVVsZGlXR2hZVmxjeFJtVldWblZSYkhCb1RWWldORlp0Y0VkWlZrNUlWV3RhYTFKdVFsaFdhMVpoVTJ4a2MxWnNaRmROVm5CNlZqSTFVMVp0U25KalJtUlZWbnBXZGxWcVJuZFNWa3B5WkVaa1YySkdiM2RXVnpFMFZESkdWMWR1U2xoV1JYQllXVmQwZDAweFZuRlRhemxyVW14d2VsbFZXbXRoUlRGMFlVaGFWMVl6UWxCVlZFWlNaVVpXYzFkc1dtaE5TRUpRVm0weE5GWXdOVWRhUmxaVllsUnNiMWxZY0VkbGJGVjVaVWM1V0dGNlJrbFpWVnBUVmpGYVYyTkdRbFpoYTFwUVdrWmFSMk14WkhSaFIyaE9ZVzFuZWxadGRHcGxSVFZJVlZob1ZHSnJOVmRaYlhSM1kxWldjMkZIT1ZWTlZsb3dXa1ZvYTFZeFNuUlZiR3hhVFVaWmQxbFZWWGhXYXpWWlkwWmFhVkl5YUhsV2JGSkxVekZhVjFkdVRsZGlSMUp3VlcxNFYwNUdXbGRWYTJSb1RXczFXRlZ0TlZkV1YwcEdUbFpTV2xaRldqTldNbmhhWlZkU1IxcEhkRTVXYkhBMVZrWmFWMWxXWkVoVGJrNVlZa2RTVmxadGVIZGhSbHBXVjJ4a1dGSXhXa3BXTWpFMFZUSkZlR05FVmxoV2JGcHlWR3RhWVZJeFRuTlhiWEJUWVhwV1dsWnRjRTlWTWtaSFdrWmtWMVpGV25GVVZtaERVMnhhU0UxWE9WWk5WMUpJVlRJMWMxWXlTbFZSYWxKVllURndjbFpxUmxkak1YQklVbXhPVTJFelFsbFdiR1IzVVRGc1YxZFlhRmRpYXpWWFdXdFZNVmRHYkhKV2JtUlRUVlpLZWxadGVFOVhSMHBXVjI1c1drMUdjRVJXYlRGR1pVZE9SbUZIUmxOV01VcFpWbGR3UzFReFNuSk9WbWhwVW0xU1QxbHNXa1psUmxwMFpVWk9VMDFXYkRSV01XaHZWVEZrU0dWR1ZscGlXRTE0V1RGYVYyUkZNVlZWYkdST1ZqTm9ObFpxU1RGaE1XUnpWMjVPVkdKR2NGZFpiRkpIVTBaYVJWSnRSbXRTTVVwR1ZtMTRWMVl5U2tsUmJteFlWbXhLU0ZZeU1WZFNNVkoxVTIxb1UySkdjRkJXYlRFd1pERk9WMXBHWkdGVFNFSnpWV3BCZUU1R1pISmhSV1JYVFd0d1NGVXljelZXYlVwSFUyeG9WV0pHY0doVk1HUlBVbXhTZEdORk5WZFhSVXBaVm10U1IxWXhWWGxTV0doVVltdHdXVmxyVlRGaFJscDFZMFZhVGxKc1NqQmFWV1F3VmpBeFdGVnVjRlpOYmsxNFZsUktTMUp0VGtWV2JHUm9UV3N4TkZaV1VrZFdNazE0V2tac2FWSnNjRzlVVkVaTFYwWmFkR1JHWkZSTlZUVklXV3RvVTJKR1NsVmlSbWhhWVRGd1RGcFdXbFpsVlRGV1drWldhVkpYZHpKWFZsWlhXVlpaZUZkdVRtcFRSWEJoVm10V1lWVkdiRFpTYTNSWVZtNUNTRlpITVhOV01VcHpZMFprVjJKVVJUQldiWE40VmpGS1dXRkdXbGhTTVVwdlZsZDRiMVV4V2xkV2JrWlNZa2hDVDFadE5VTlNNVmw1VFZSQ1dGSnJjSGxaTUZwaFZqSktWVlpxVGxkTlJuQm9WVzB4VDFOWFRrZFhiR1JUVm01Q1VsWXhhSGRTTVZGNVZHNU9XR0pzU25CVmJGSlhZMFphZEdSSVpGZFNiSEI2VjJ0U1ExWnJNWEpOVkU1VlZsZG9kbGxXV2t0ak1rNUlUMVphYVZKc2IzcFhWbFpoVlRGWmVWSnJXbFZpUjJoWVdXdG9RMU5zV2tkV2JFNVhUV3RhU0ZZeGFHOVhSMHBJVld4a1ZWWjZWbFJXUlZwYVpERndSbHBIY0dsV1ZGWkpWMVpXWVZZeFdYaFhXR2hVWVhwR1dGbFhkR0ZqYkZZMlVtdDBWMDFWTlRGV1Z6RnZWVEpLVjFOc1FsZGlXR2hvV2tjeFYxWXhaSE5pUjNCVFZqRktXRlpHWkRSWlYxWnpZa2hHVldKVWJGZFpiRlpoWld4cmQxZHJUbGRpVlZZMVZsYzFZVll4U1hwaFJsSlhUVVpWZUZZd1ZUVlhSMUpHVGxaa2FWTkZTa3hXYlhCSFZURlJlVkpZYUZoaE1YQlBWbXhrYjJNeFZuTlhiVVpYVFZad01GUldXazloYlVwSFZtcFdZVlpXV21oWlZFRjRWbTFPUlZGc1ZtbFNia0pWVm0xd1IxbFdXbGRYYmtwV1lrZFNUMWx0ZEV0U1ZtUlpZMFZrVkUxVmJEUlZNalZQWVVaSmQxZHNVbGROUmxwTVZtdGFZVkl4V25OYVJuQlhUVlZ3V1ZadGVHOWlNVmw1VTJ0YVQxWnJTbGRaVjNSSFRrWlNjMWRzWkd0U01WcElWMnRhVjFSc1duVlJiSEJZVm14YWRsVnFSbXRrUms1eVdrWlNhV0pZYUc5V2JYaGhaREpXVjJORlZsTmlSVFZ4V1d0YVMyVnNXbGhOV0U1V1RWZFNSMVV5ZEc5V01ERllWV3BPVm1WcmNFZGFWVnBoWXpGd1IxVnRhRTVXYmtJelZteGtNRlpyTVZkaVJtUllZbXMxYUZWdWNITlZNVkpYV2taT2JGSnNXakJVYkdRd1YwWktjbU5JY0ZaTmJrSkVWbXhWZUZkR1ZuVmpSbkJvVFZoQ2IxWnRNSGhVTVVwelZXNU9ZVkpVVm5CWlZFSjNWR3hhZEUxWVpGSmlWbHBJVmtkMGExWlhTbkpPV0VKV1lXdHZNRlpyV25kWFIxWklVbTEwYVZKdVFYZFhWRUpYWVRGVmQwMVlUbFJpYmtKWVZXMHhiMlJzV25STlZYUnJWbXRhTUZsVldsZFdNa3BIWTBWNFYxSnRVVEJXVkVwUFl6RmFkVlZzUWxkaVJuQlpWbTEwVjFkdFZrZGFSbVJYWWxSc2IxUldXbmRsYkZWNFlVaE9WMVl3V25sVWJGcHJXVlpaZWxWcmVHRldNMmhZV1RKNGEyTnNjRWRoUms1cFlUQndTVll4VWtOWlZrMTRWVzVPVkdKSFVuRlZhMVpoVjBaYWNsWnRSbGhTYkhCR1ZXMTBhMkZyTVhKaVJGcFlZVEpTZWxaVVJtRmpiVTVIVld4a2FWZEZTazFXYkZKSFZqSk5lRmR1VG1sU00wSlZWV3hvUTJWc1dsaE5TR2hQVWpGYVdGWXllR3RXYlVWM1RsWm9WMkZyU2xoVVZFWlRZekpHU0dSR1pHbFNia0YzVm14ak1WTXhXbkpOV0Zab1VsZFNhRlZyVm1GVVJuQkdWbFJHVjAxV1ducFhhMXByVmpGS2MyTkZXbGRpV0VKTVdrUkdTbVZHU2xsaFJsSm9UVmhDVWxadE1IaGlNazV6Vm01R1ZHSlViRmxXYlhoaFRVWlNWMVZyVG1sU2JIQjZWakkxYzFZd01YVlZia3BhVmtWd1RGVXdWVFZXVmxKelkwZG9UbFp1UWxaV2JYaHJUa1prZEZac1pGZGlhelZWV1d0YWQxZFdWWGRXYTNSUFlrZFNWbFV5Y0ZOaGF6RlhZa1JXVm1KWVVuSlpWM2hMVjFkR1JrOVdXbWxYUmtsNlZtMTBZV0V4WkVaT1ZteGhVako0VDFadGRIZFhSbHBIVjIwNVZVMVdjRWxWTWpWVFZtMUtXR0ZHWkZwV00xSjVWRlZhZDFKV1NuUlNiRkpUVFZWd1NGWkVSbXRrTVZWNVVsaG9hbEp1UWxoVVZ6VlRWMFp3UlZKc1pHcGhla1pYVmpKNGExWXhTbFpqUm5CWFlXdEtkbFZVUmxOU01XUnlWbXhTYVZJeFNscFdWekV3WkRKV2MySklTbGhoTTFKdlZXcENWMDB4YTNkWGF6bFhUVVJHZUZadGNFOVdiRnBHVjJ4U1ZtRnJXbFJaZWtacll6RmFkR0ZGTlZSU1ZYQXlWbTEwWVZZeVJYZE9WV1JVWWtkU1dGbHJaRk5oUmxaeFZHeE9WMVp0ZUhsV2JYaHJWR3N4VjFacVZsVmlSbkJRVmpKNFlXTnRUa1ZSYkdSVFlsZG9NbFpxU2pSWlZUVnpVMjVPVm1KR2NFOVZha1pMVkZaYVZWSnRSbWhOYkVwSlZUSjBiMkZHU25SVmJHaFhZV3MxY2xSdGVHRmpWa3AwWkVkMFRsWlVSVEZXVjNodll6RmFTRk51VGxSaVJscGhWbXRXZDJSc1dYZFhiazVxWWtad2VWcEZaSGRXTWtwSFYxaHdWMkZyYjNkVVZXUkdaREF4VjJGSGVGUlNNbWhZVmtaYVlWTXhUa2RpU0VwaFVsaFNWRlJXVlRGbGJHeHlWMjEwYUZac2NFaFdNbmh6VjBaYWMxTnJhRmRpVkVaWVZtcEtUMUp0U2toU2JFNXBVbGhDV2xadE1YZFRNa3B5VFZoT1dHSnJjR2hWYTFaTFZteFNXR042UmxSU2JGb3dXbFZqTlZkc1duSmpSbkJXVmpOb1VGWnNXbUZXTVdSMFlVZEdVMkpJUWxoWGJGWmhXVmRPY2s5V1pGUmlWM2hVV2xjeE1FNXNXWGhhUkVKWFRWWldORlp0TlU5WFJtUklaVVprV2xaRk5WUldha1pUVm14a2RWcEZOVTVXTTJnMFZsY3dNVk15U2tkWFdHUnFVbGRTV0ZWdWNFWmtNV3hYVjIxR1YxWnNjSGxhUlZwcllWWkpkMDFVVWxkV2JFcE1WV3BHWVdOck1WZGlSazVwVWpGS2RsZFhkRzlSTVdSWFYyeG9UbE5IYUZkVVZtUlRVMFpyZDFadGRGcFdhM0I1Vkd4YWIxWnRTbGxWYldoWFlsaG9lbGt5ZUdGa1ZuQkhWMnMxVTFKV2NGbFdNV1IzVkRKTmVGZFlaRTVXYlZKVldXdFdTMWRHYkZoa1NHUlhVbXhhZUZVeWN6VlZNREZ5VjJ0a1ZVMVdjSEpXVkVaaFYxWkdjMUZzWkU1V01VVjNWMVpTUjFadFZsZFZiR3hvVWpOQ1ZGWnROVU5YVm1SWVpFZDBWazFyTlZoV1YzaHJZVVpLVms1V2JGZGlXR2hNVmpCYWEyTnNWbk5VYldoVFlrZDNlbGRVUW05a01WcHlUVmhXVm1KR1NsbFdiWGgzWVVac05sSnRkR3RXTURWSVdUQmFhMVV4V2xoa00zQlhZa2RSZDFkV1pGSmxSbEp6V2tkR1ZGSnJjSGhXVnpFMFV6RmFSMkpHVmxWaE1IQnpXV3RhYzA1R1pISmhSM1JYVWpCWk1sVnRlSE5XTWtwVlZteENWMkpVUmt4Vk1HUkhVakpHUjJOSGJGaFNNbWgyVmpGU1MwNUdiRmRYYkdSVlltdHdVVlpxVGxOVU1WcDBaRVp3VG1KR2JEUldWM00xWVVVeFYyTkZaRlZXYkZwMldXdGFTMVl4WkhOYVJtUnBWa1ZhVlZkVVNqUldiVlpZVm10YVdHSllVazlXYkdoQ1pERmFTR1ZIUmxaTlZtdzBWako0VjFZeVJYaFRiR2hWVm5wV1JGVnJXbk5PYkVweVpFWk9UbFpZUWpaWFZsWnJVakZWZDAxWVZtaFNhMHBZVlcxNFlWZEdiRFpSV0dSc1VtNUNTRmRyV205aFZtUkdVMnhHVjJKWVFraFZla1pyVmpGa2NscEhhRk5OTVVwWFYxZDBZV013TlhOaVJscG9VbFUxV1Zsc1ZuZFhiR3hXVjIwNVYxWnNjSHBaTUdoTFZqSktSMk5HUWxwTlZuQllXa1ZrUjFJeFVuSk9WazVUVm14Wk1WWnRNSGhOUjBWNVZtNVNWMkV5YUZSWlZFcFRZVVpXYzFkdVpGWlNiRll6VjJ0YVQxWXlTa2RYYWtaYVRVWndjbFpxUmt0a1ZrWnlZa2RHVjFZeWFHOVhWM1JoV1ZkU1YxSnVTbXBTYlZKVVdsZDBZVk5XV25STldIQnNVakZLU0ZadE5VZFZNa3BJWVVac1ZrMUdXa3hXUmxwclYwZE9SbVJHV2s1aVJYQkpWbTB3TVZJeFdYbFRhMnhTWVhwc1ZsWnNXbUZOTVZwWVpVZDBhbUpWV2twWGExcExWR3hhY21ORmJGZGhNbEV3VjFaYVlWZEdTbGxhUjNCVFRXMW9WMVp0ZUd0VmF6RkhWbTVPV0dKSFVsaFVWbWhEVTFad1JsZHNUbWhXYTNCWVZqRm9kMVl4V2taWGJGSlhZV3RhVjFwVldrOWtWazV6WVVkb2FFMHdTbUZXTVZwclRVWk5lVlp1VGxkaWEzQlpXVlJLVTFkV1ZuUk9WVTVUVFZkME0xWXlkREJXVjBwR1kwWm9XazFHU2toV2FrWmhVbXhrYzJGR1dtbFdSVnBVVjJ4V1lWVXhaRmRqUldocFVtczFXRmxVVGtOV1ZscDBUVmhrVkUxV1ZqUldSbWh2VmpKS1IxZHNUbHBXUlhCVVdUQmFjMk5zV2xWU2JHUk9WbTVDU2xkclZsWk9WMFpIVjI1T2FWSkdTbGRVVnpWdlpXeGFjMXBGZEZSU2JGcDRWa2Q0ZDFZeFNsZGpSWGhZWWtad2NsWnFSa3RXTVZKMVZHMXdVMDF1YUZsV1JsSkxZakZLYzFkdVNsaGlSMUp2VkZaVk1VMUdXblJsUjNSb1lrVndXVmxWV2tOV01rWnlZbnBDVjJFeGNGUldha1pyWkZad1IxcEhiRk5OVlhCYVZtMXdTbVZGTVVkWGJrcE9WMFZ3Y1ZWc1pHOVpWbXhWVTIwNVYxSnNjRlpWTW5Rd1lURkplRmRyWkZWV2JIQm9WbXBHUzFkRk9WVlViR2hYWld0VmQxZHJVa2RoTVZsNVVsaHdhbEl3V2xSWmExWjNWVVphV0dORk9XbE5WWEI2VmpKNGExZEhTbGxWYlRsVlZteFZlRnBYZUZkak1rWklaRVphVG1FelFsZFdiVEUwVmpGWmVWTnJaRmRYUjJoWFZtdFdZV05zYTNoWGEyUnJWbXhLZWxaSGVFOWhSVEZaVVcxR1YyRnJiM2RaVkVGNFUwWktjMXBHYUdsU01VcDNWMnhrTUZsV1dYaFZiR1JZWWxWYWNsbHJXbmRTYkZWNVkzcFdWazFFUm5sVWJGWnJWMnhhVjJOSVNscFdiSEJoV2xjeFIxTkhSa2RhUjJob1RVaENXbFl4YUhkVE1VMTVWRmhvV0dKcmNHaFZiWGhoWWpGU1ZsVnNaR3RpUm5CSVYydFNRMkZyTVVWV2JHaFhUVzVTZGxsWGVFdFhSbFowVDFaa2FWZEhhRFpXUjNSaFYyMVdXRlJyV21GU2JrSllXVlJPUTFkR1drZFdiVGxwVFZkU01GVXllSE5oUmtwR1RsWm9WVlpzY0ROV01GcHlaVmRXU0dSSGRGTk5TRUpKVm10a2VrMVdXWGxUYkZab1RUTkNXRmxzYUVOVVJsSnlXa1ZrYW1GNlJsaFdNbk14VmpGWmVGTnNWbGhXZWtVd1YxWmtUMUl4V25WVWJXaFRWbFJXZGxaWE1UUlpWbHB6Vmxoc1RsWkZTbTlVVmxwM1RVWndTV05GZEZkaGVrWjRWbTE0UTFkc1dsZFdhbEpYVFZad1NGbDZTa3RTTVdSeVRsZG9hRTFYT1RWV2FrWmhZVzFXUjFOWWFHRlNWMUpYV1cxNFlXRkdWblJsUjBaVlRWWktXVmt6Y0VOaVIwcEhZMFp3V2sxR1dsQlpWM040Vm0xT1JtRkdXbWxYUjJneVZqRmFZVk14WkZkU2JrNVZZa1phV0ZadGVIZGlNV1J5VjIxR1YySldXa2hXTWpWTFZVWmFjbU5JUWxaaWJrSjVXbGQ0YTFkSFVrZGFSbHBPVm14d05sWnFSbTlqTVZwMFUyNUtXR0pHY0ZoWmJUVkRVakZTVmxkdVNteFdNVnBKV2tWa2QxUnNaRVpUYTJoWVlURmFjbGxxUmxaa01ERldWbXhrYUdGNlZsbFdWM0JQWWpKT2MyTkZWbFJoTWxKWVZGWlZNVmRzWkhKWGJUbG9VakJ3U2xWWE1XOVhSMHBJVlZoa1ZrMXVUalJWYWtwR1pXeHdTRkpzVGxkU2JIQTJWakZrTUZsV2JGZGFTRTVZWW14S1QxWnJWa3RXTVZKWVpVZEdUbEp1UWxkV1YzUnJWakF4UlZKcVJsWldNMUV3Vm14a1JtVldWbkpsUmxwcFZrVmFWVlpYTVRSV01sSkhVMjVPVm1KRk5YQlpWRUoyVFVaYWRHVkhkR3ROVld3MFdXdGFZVlJzV25SVmJGcGFZbGhvYUZrd1dsWmtNVnAxV2taYVUySkZjRmhXYWtvd1RVWmFjazFXYUd4VFIyaFhWRmR3Um1ReFduSmFSWFJUWWtad2VGWkhlR0ZoVmxwR1VtcFNWMkpZVW1oWFZscGhZMnMxVjFkc1ZtbFNNbWgyVjFaU1EyUXdOWE5YYkZaVFlrWndjMVZ0ZEhkbFZsSnpWMjFHVjJKVmNGbFpWVnB2VmpKS1IyTkVUbFZXYkhCb1ZteGFTMk14Y0VkV2F6VlhWbTVCTVZaclVrZFdNV3hZVWxoa1RsTklRbE5aYTFwM1dWWnNjbHBIT1ZOU2JYUTBWakkxVDJGck1WbFJhMXBYVmpOTmVGWkhlR3RTYkU1eVlVWmthVkp1UWxWV1ZsSkhXVlprUjFOc2JHRlNWR3haVldwS2IySXhXbGhrUmxwT1ZqQmFTRmRyV210WFIwVjZVVzVPVjJGcldraFViWGh6WTJ4a2RGSnNXazVTUlZvMVZrZDBiMlF4V1hoYVJXeFNZVEpvVjFaclZtRlZSbFp4VW0xR2ExWnNjSHBWTWpGelYwWktjbU5FU2xkaVZFVXdWbXBLVW1WV1duSmFSMFpUWWxkb2VWWlhjRTlWTVZwSFZXeG9iRkl3V2s5VmJYaDNVMVpyZDFwRlpGZFdNSEJIV1d0U1YxbFdXbGhWYmxwWFRXcEdURlZxUms5a1YwNUhWbXhrVGsxdFpEWldiR040VGtkUmVGTllhR3BTVjJoelZXMHhVMWRHVWxWVGJUVk9VbXh3ZVZkclVrTldNa1kyVW14b1ZrMXVVblpXVkVwTFVqSk9SMVZzY0dsU2EzQlpWbTE0WVZsWFRYaFhiRlpUWWtWd1QxWnRkRnBsYkZsNVpFWmFUMVpzVmpSV01uaFhWakpGZVdWR1dsZGlXR2d6VkZSR1lWTkZNVlphUjNSVFRWVlpNbGRVUW1GaU1rWlhVMjVXVW1KR1dsbFphMlJTVFVad1NFMVdaRk5OVlhBeFZUSjRhMkZXU2xaalJuQlhWak5DU0ZWNlNsTmpNV1J6Vm14S2FWSXhTbFZXUm1Rd1pESldjMXBJU21oU1ZHeGhWbTEwZDFac2JISmhSVTVYVm14c05sWlhjRXRXVmxwelkwWm9WMDFHVmpSV2JGcEhZekpHU0dKR1RrNVdXRUpMVm0xNFUxTnJNVmRWV0doWVlURndUMVpzV25kVlJscHpZVWM1V0ZKc1NsbFViRnBQWWtkS1NHUkVUbGhoTVZweVZrUktTMU5XUm5KYVJuQk9VbTVDVVZac1VrZFRiVlpYVm01R1YySkhVbGhWYkZwM1YxWmFjMVZyU2s1V2F6VklWVEkxUzFkSFNsaGxSbEpYWVd0d2RscEhlR0ZXVmtaMFpFVTVVMDFHY0VsV2Fra3hVakZWZVZOdVNtcFNhMHBZV1d4b1RtVkdXWGhYYkU1WFRWZDNNbFp0ZUZkaFZrcFlaSHBDVjFaRmIzZGFSRVpoWXpGa2NWZHNaR2hoZWxaWlZtMTRhMVV4VGtkWGJrNWhVbGRTVkZadGN6Rk5SbFowWlVVNVZrMVdjRWhXTW5CWFZqSkZlR05HVWxaV1JVVjRWVEJhVjJOc2NFZFdiV3hwVW01Q1dGWXhaRFJoTURWSFZWaG9hVk5GTlZoV2ExWkxZMnhTVjFkdVRrOVdiWFF6Vm0xd1ExWnJNVVZTYm5CV1RXNW9jbGRXV21GWFIwWkhWV3hrVjFadVFubFdWRUpyVmpGT1NGSnJhRk5pUjFKd1ZXeG9RbVZXV1hoVmEwNWFWbXhzTkZaSGRHOVdiVVY0WTBaR1YyRnJOVlJaTUZwV1pERmFjbVJHVW1sU2JrRjNWa1pXYjJJeFVuTlRia3BQVjBoQ1YxUlhOVzloUm14WFdrWmthbUpIVW5wWGExcGhZVlpLYzFkWWNGZFNiSEJvV1hwR1lXTXhjRWxUYkZacFYwVktWVmRXVWtka01EVnpWMjVPV2sweWFIQlVWbHBYVFRGU1YyRkdaRnBXVkVJMVdWVmFhMVpXV25OalIyaFhUVVp3YUZWc1drOWpNVkowWTBVMWFHVnNXa2xXTVZwWFdWZEZlRnBGWkZSaWF6VnhWVzF6TVZkR1duUk5WemxPVFZkM01sVldhR3RpUmtwelkwaHNXbFpXY0ROV1IzTjRZekZPYzFkc1pGTmlTRUpaVmxod1IxTXhXWGhXYkd4b1VqQmFWRlZzVm5ka2JGcFlUVWhvVmsxVk5VaFphMXBYVmxkRmVsVnNaRlZXYkZveldsWmFXbVZYVGtaa1JtUlhWa1ZhU1ZacVJtOWtNV3hYVjI1T2FsSnJTbWhWYlhoM1kyeHdSbGRyZEdwTlZscDZWa2R6TVZSc1NrZFdXR2hYWWxob2NsUlZXbk5XTVU1WllrWmFhV0V6UWxKV2JYaGhaREpPYzFWc1ZsUmhiRXB3VkZaYVlXVldXblJrUkVKb1lrVndlbGt3YUc5V01VbzJVbXBPV2xaNlJrZGFWbVJYVTFad1IyTkdaRk5XUmxwR1ZtMTRWMkV4V1hoWGJrNVVZa2Q0V1ZsclduZFdSbEpZWXpOa1RsWnNjRmRXTW5NMVZrZEtWazVWWkdGU1ZuQllXVmR6ZUdSR1ZuTlRiVVpYVFRCS1ZGWkVSbGRrTURWWVVsaHdVbUpGV25OWlYzaEdUbFpPZFdKSVNtcFNhMGt5Vkd0UmQySnJkRlJoZVRsUldub3dPVXA1YTNCUWVqUTlKeWtwUHo0PScpKT8+'))?>PK"w[hllResources/CaptureCollection.phpnu[client); } } PK"w[G }JJResources/Payment.phpnu[consumerName and $details->consumerAccount. * * @var \stdClass|null */ public $details; /** * Used to restrict the payment methods available to your customer to those from a single country. * * @var string|null; */ public $restrictPaymentMethodsToCountry; /** * @var \stdClass */ public $_links; /** * @var \stdClass[] */ public $_embedded; /** * Whether or not this payment can be canceled. * * @var bool|null */ public $isCancelable; /** * The total amount that is already captured for this payment. Only available * when this payment supports captures. * * @var \stdClass|null */ public $amountCaptured; /** * Indicates whether the capture will be scheduled automatically or not. Set * to manual to capture the payment manually using the Create capture endpoint. * * Possible values: "automatic", "manual" * * @var string|null */ public $captureMode; /** * Indicates the interval to wait before the payment is * captured, for example `8 hours` or `2 days. The capture delay * will be added to the date and time the payment became authorized. * * Possible values: ... hours ... days * @example 8 hours * @var string|null */ public $captureDelay; /** * UTC datetime on which the merchant has to have captured the payment in * ISO-8601 format. This parameter is omitted if the payment is not authorized (yet). * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $captureBefore; /** * The application fee, if the payment was created with one. Contains amount * (the value and currency) and description. * * @var \stdClass|null */ public $applicationFee; /** * An optional routing configuration which enables you to route a successful payment, * or part of the payment, to one or more connected accounts. Additionally, you can * schedule (parts of) the payment to become available on the connected account on a * future date. * * @var array|null */ public $routing; /** * The date and time the payment became authorized, in ISO 8601 format. This * parameter is omitted if the payment is not authorized (yet). * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $authorizedAt; /** * The date and time the payment was expired, in ISO 8601 format. This * parameter is omitted if the payment did not expire (yet). * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $expiredAt; /** * If a customer was specified upon payment creation, the customer’s token will * be available here as well. * * @example cst_XPn78q9CfT * @var string|null */ public $customerId; /** * This optional field contains your customer’s ISO 3166-1 alpha-2 country code, * detected by us during checkout. For example: BE. This field is omitted if the * country code was not detected. * * @var string|null */ public $countryCode; /** * Is this payment canceled? * * @return bool */ public function isCanceled() { return $this->status === PaymentStatus::STATUS_CANCELED; } /** * Is this payment expired? * * @return bool */ public function isExpired() { return $this->status === PaymentStatus::STATUS_EXPIRED; } /** * Is this payment still open / ongoing? * * @return bool */ public function isOpen() { return $this->status === PaymentStatus::STATUS_OPEN; } /** * Is this payment pending? * * @return bool */ public function isPending() { return $this->status === PaymentStatus::STATUS_PENDING; } /** * Is this payment authorized? * * @return bool */ public function isAuthorized() { return $this->status === PaymentStatus::STATUS_AUTHORIZED; } /** * Is this payment paid for? * * @return bool */ public function isPaid() { return ! empty($this->paidAt); } /** * Does the payment have refunds * * @return bool */ public function hasRefunds() { return ! empty($this->_links->refunds); } /** * Does this payment has chargebacks * * @return bool */ public function hasChargebacks() { return ! empty($this->_links->chargebacks); } /** * Is this payment failing? * * @return bool */ public function isFailed() { return $this->status === PaymentStatus::STATUS_FAILED; } /** * Check whether 'sequenceType' is set to 'first'. If a 'first' payment has been * completed successfully, the consumer's account may be charged automatically * using recurring payments. * * @return bool */ public function hasSequenceTypeFirst() { return $this->sequenceType === SequenceType::SEQUENCETYPE_FIRST; } /** * Check whether 'sequenceType' is set to 'recurring'. This type of payment is * processed without involving * the consumer. * * @return bool */ public function hasSequenceTypeRecurring() { return $this->sequenceType === SequenceType::SEQUENCETYPE_RECURRING; } /** * Get the checkout URL where the customer can complete the payment. * * @return string|null */ public function getCheckoutUrl() { if (empty($this->_links->checkout)) { return null; } return $this->_links->checkout->href; } /** * Get the mobile checkout URL where the customer can complete the payment. * * @return string|null */ public function getMobileAppCheckoutUrl() { if (empty($this->_links->mobileAppCheckout)) { return null; } return $this->_links->mobileAppCheckout->href; } /** * @return bool */ public function canBeRefunded() { return $this->amountRemaining !== null; } /** * @return bool */ public function canBePartiallyRefunded() { return $this->canBeRefunded(); } /** * Get the amount that is already refunded * * @return float */ public function getAmountRefunded() { if ($this->amountRefunded) { return (float)$this->amountRefunded->value; } return 0.0; } /** * Get the remaining amount that can be refunded. For some payment methods this * amount can be higher than the payment amount. This is possible to reimburse * the costs for a return shipment to your customer for example. * * @return float */ public function getAmountRemaining() { if ($this->amountRemaining) { return (float)$this->amountRemaining->value; } return 0.0; } /** * Get the total amount that was charged back for this payment. Only available when the * total charged back amount is not zero. * * @return float */ public function getAmountChargedBack() { if ($this->amountChargedBack) { return (float)$this->amountChargedBack->value; } return 0.0; } /** * Does the payment have split payments * * @return bool */ public function hasSplitPayments() { return ! empty($this->routing); } /** * Retrieves all refunds associated with this payment * * @return RefundCollection * @throws ApiException */ public function refunds() { if (! isset($this->_links->refunds->href)) { return new RefundCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl( MollieApiClient::HTTP_GET, $this->_links->refunds->href ); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->refunds, Refund::class, $result->_links ); } /** * @param string $refundId * @param array $parameters * * @return Refund * @throws ApiException */ public function getRefund($refundId, array $parameters = []) { return $this->client->paymentRefunds->getFor($this, $refundId, $this->withPresetOptions($parameters)); } /** * @param array $parameters * * @return Refund * @throws ApiException */ public function listRefunds(array $parameters = []) { return $this->client->paymentRefunds->listFor($this, $this->withPresetOptions($parameters)); } /** * Retrieves all captures associated with this payment * * @return CaptureCollection * @throws ApiException */ public function captures() { if (! isset($this->_links->captures->href)) { return new CaptureCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl( MollieApiClient::HTTP_GET, $this->_links->captures->href ); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->captures, Capture::class, $result->_links ); } /** * @param string $captureId * @param array $parameters * * @return Capture * @throws ApiException */ public function getCapture($captureId, array $parameters = []) { return $this->client->paymentCaptures->getFor( $this, $captureId, $this->withPresetOptions($parameters) ); } /** * Retrieves all chargebacks associated with this payment * * @return ChargebackCollection * @throws ApiException */ public function chargebacks() { if (! isset($this->_links->chargebacks->href)) { return new ChargebackCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl( MollieApiClient::HTTP_GET, $this->_links->chargebacks->href ); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->chargebacks, Chargeback::class, $result->_links ); } /** * Retrieves a specific chargeback for this payment. * * @param string $chargebackId * @param array $parameters * * @return Chargeback * @throws ApiException */ public function getChargeback($chargebackId, array $parameters = []) { return $this->client->paymentChargebacks->getFor( $this, $chargebackId, $this->withPresetOptions($parameters) ); } /** * Issue a refund for this payment. * * @param array $data * * @return \Mollie\Api\Resources\Refund * @throws ApiException */ public function refund($data) { return $this->client->paymentRefunds->createFor($this, $data); } /** * @return \Mollie\Api\Resources\Payment * @throws \Mollie\Api\Exceptions\ApiException */ public function update() { $body = [ "description" => $this->description, "cancelUrl" => $this->cancelUrl, "redirectUrl" => $this->redirectUrl, "webhookUrl" => $this->webhookUrl, "metadata" => $this->metadata, "restrictPaymentMethodsToCountry" => $this->restrictPaymentMethodsToCountry, "locale" => $this->locale, "dueDate" => $this->dueDate, ]; $result = $this->client->payments->update($this->id, $body); return ResourceFactory::createFromApiResult($result, new Payment($this->client)); } /** * When accessed by oAuth we want to pass the testmode by default * * @return array */ private function getPresetOptions() { $options = []; if ($this->client->usesOAuth()) { $options["testmode"] = $this->mode === "test" ? true : false; } return $options; } /** * Apply the preset options. * * @param array $options * @return array */ private function withPresetOptions(array $options) { return array_merge($this->getPresetOptions(), $options); } /** * The total amount that is already captured for this payment. Only available * when this payment supports captures. * * @return float */ public function getAmountCaptured() { if ($this->amountCaptured) { return (float)$this->amountCaptured->value; } return 0.0; } /** * The amount that has been settled. * * @return float */ public function getSettlementAmount() { if ($this->settlementAmount) { return (float)$this->settlementAmount->value; } return 0.0; } /** * The total amount that is already captured for this payment. Only available * when this payment supports captures. * * @return float */ public function getApplicationFeeAmount() { if ($this->applicationFee) { return (float)$this->applicationFee->amount->value; } return 0.0; } } PK"w[~Resources/LazyCollection.phpnu[ */ class LazyCollection implements IteratorAggregate { /** * @var callable */ private $source; /** * @param callable $source */ public function __construct($source) { $this->source = $source; } /** * Get all items in the collection. * * @return array */ public function all(): array { return iterator_to_array($this->getIterator()); } /** * Get an item from the collection by key. * * @param TKey $key * @return TValue|null */ public function get($key) { foreach ($this as $outerKey => $outerValue) { if ($outerKey == $key) { return $outerValue; } } return null; } /** * Run a filter over each of the items. * * @param (callable(TValue, TKey): bool) $callback * @return self */ public function filter(callable $callback): self { return new self(function () use ($callback) { foreach ($this as $key => $value) { if ($callback($value, $key)) { yield $key => $value; } } }); } /** * Get the first item from the collection passing the given truth test. * * @param (callable(TValue, TKey): bool)|null $callback * @return TValue|null */ public function first(callable $callback = null) { $iterator = $this->getIterator(); if (is_null($callback)) { if (! $iterator->valid()) { return null; } return $iterator->current(); } foreach ($iterator as $key => $value) { if ($callback($value, $key)) { return $value; } } return null; } /** * Run a map over each of the items. * * @template TMapValue * * @param callable(TValue, TKey): TMapValue $callback * @return static */ public function map(callable $callback): self { return new self(function () use ($callback) { foreach ($this as $key => $value) { yield $key => $callback($value, $key); } }); } /** * Take the first {$limit} items. * * @param int $limit * @return static */ public function take(int $limit): self { return new self(function () use ($limit) { $iterator = $this->getIterator(); while ($limit--) { if (! $iterator->valid()) { break; } yield $iterator->key() => $iterator->current(); if ($limit) { $iterator->next(); } } }); } /** * Determine if all items pass the given truth test. * * @param (callable(TValue, TKey): bool) $callback * @return bool */ public function every(callable $callback): bool { $iterator = $this->getIterator(); foreach ($iterator as $key => $value) { if (! $callback($value, $key)) { return false; } } return true; } /** * Count the number of items in the collection. * * @return int */ public function count(): int { return iterator_count($this->getIterator()); } /** * Get an iterator for the items. * * @return Iterator */ public function getIterator(): Iterator { return $this->makeIterator($this->source); } /** * Get an iterator for the given value. * * @template TIteratorKey of array-key * @template TIteratorValue * * @param IteratorAggregate|(callable(): \Generator) $source * @return Iterator */ protected function makeIterator($source): Iterator { if ($source instanceof IteratorAggregate) { return $source->getIterator(); } return $source(); } } PK"w[[Resources/BaseResource.phpnu[client = $client; } } PK"w[~ˮ<Resources/Partner.phpnu[_links->productUrl)) { return null; } return $this->_links->productUrl; } /** * Get the image URL of the product sold. * * @return string|null */ public function getImageUrl() { if (empty($this->_links->imageUrl)) { return null; } return $this->_links->imageUrl; } /** * Is this order line created? * * @return bool */ public function isCreated() { return $this->status === OrderLineStatus::STATUS_CREATED; } /** * Is this order line paid for? * * @return bool */ public function isPaid() { return $this->status === OrderLineStatus::STATUS_PAID; } /** * Is this order line authorized? * * @return bool */ public function isAuthorized() { return $this->status === OrderLineStatus::STATUS_AUTHORIZED; } /** * Is this order line canceled? * * @return bool */ public function isCanceled() { return $this->status === OrderLineStatus::STATUS_CANCELED; } /** * (Deprecated) Is this order line refunded? * @deprecated 2018-11-27 * * @return bool */ public function isRefunded() { return $this->status === OrderLineStatus::STATUS_REFUNDED; } /** * Is this order line shipping? * * @return bool */ public function isShipping() { return $this->status === OrderLineStatus::STATUS_SHIPPING; } /** * Is this order line completed? * * @return bool */ public function isCompleted() { return $this->status === OrderLineStatus::STATUS_COMPLETED; } /** * Is this order line for a physical product? * * @return bool */ public function isPhysical() { return $this->type === OrderLineType::TYPE_PHYSICAL; } /** * Is this order line for applying a discount? * * @return bool */ public function isDiscount() { return $this->type === OrderLineType::TYPE_DISCOUNT; } /** * Is this order line for a digital product? * * @return bool */ public function isDigital() { return $this->type === OrderLineType::TYPE_DIGITAL; } /** * Is this order line for applying a shipping fee? * * @return bool */ public function isShippingFee() { return $this->type === OrderLineType::TYPE_SHIPPING_FEE; } /** * Is this order line for store credit? * * @return bool */ public function isStoreCredit() { return $this->type === OrderLineType::TYPE_STORE_CREDIT; } /** * Is this order line for a gift card? * * @return bool */ public function isGiftCard() { return $this->type === OrderLineType::TYPE_GIFT_CARD; } /** * Is this order line for a surcharge? * * @return bool */ public function isSurcharge() { return $this->type === OrderLineType::TYPE_SURCHARGE; } /** * Update an orderline by supplying one or more parameters in the data array * * @return BaseResource * @throws \Mollie\Api\Exceptions\ApiException */ public function update() { $result = $this->client->orderLines->update($this->orderId, $this->id, $this->getUpdateData()); return ResourceFactory::createFromApiResult($result, new Order($this->client)); } /** * Get sanitized array of order line data * * @return array */ public function getUpdateData() { $data = [ "name" => $this->name, 'imageUrl' => $this->imageUrl, 'productUrl' => $this->productUrl, 'metadata' => $this->metadata, 'sku' => $this->sku, 'quantity' => $this->quantity, 'unitPrice' => $this->unitPrice, 'discountAmount' => $this->discountAmount, 'totalAmount' => $this->totalAmount, 'vatAmount' => $this->vatAmount, 'vatRate' => $this->vatRate, ]; // Explicitly filter only NULL values to keep "vatRate => 0" intact return array_filter($data, function ($value) { return $value !== null; }); } } PK"w[?{{$Resources/OrganizationCollection.phpnu[client); } } PK"w[2l Resources/PaymentLink.phpnu[paidAt); } /** * Get the checkout URL where the customer can complete the payment. * * @return string|null */ public function getCheckoutUrl() { if (empty($this->_links->paymentLink)) { return null; } return $this->_links->paymentLink->href; } } PK"w[Resources/MethodPrice.phpnu[client); } } PK"w[h'Resources/ClientLink.phpnu[ $client_id, 'state' => $state, 'approval_prompt' => $approval_prompt, 'scope' => implode(' ', $scopes), ], '', '&', PHP_QUERY_RFC3986); return "{$this->_links->clientLink->href}?{$query}"; } } PK"w[QH?\\Resources/Chargeback.phpnu[status === SettlementStatus::STATUS_OPEN; } /** * Is this settlement pending? * * @return bool */ public function isPending() { return $this->status === SettlementStatus::STATUS_PENDING; } /** * Is this settlement paid out? * * @return bool */ public function isPaidout() { return $this->status === SettlementStatus::STATUS_PAIDOUT; } /** * Has this settlement failed? * * @return bool */ public function isFailed() { return $this->status === SettlementStatus::STATUS_FAILED; } /** * Retrieve the first page of payments associated with this settlement. * * @param int|null $limit * @param array $parameters * @return PaymentCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function payments(int $limit = null, array $parameters = []): PaymentCollection { return $this->client->settlementPayments->pageForId( $this->id, null, $limit, $parameters ); } /** * Retrieve the first page of refunds associated with this settlement. * * @param int|null $limit * @param array $parameters * @return RefundCollection * @throws ApiException */ public function refunds(int $limit = null, array $parameters = []) { return $this->client->settlementRefunds->pageForId( $this->id, null, $limit, $parameters ); } /** * Retrieve the first page of chargebacks associated with this settlement. * * @param int|null $limit * @param array $parameters * @return ChargebackCollection * @throws ApiException */ public function chargebacks(int $limit = null, array $parameters = []) { return $this->client->settlementChargebacks->pageForId( $this->id, null, $limit, $parameters ); } /** * Retrieve the first page of cap associated with this settlement. * * @param int|null $limit * @param array $parameters * @return CaptureCollection * @throws ApiException */ public function captures(int $limit = null, array $parameters = []) { return $this->client->settlementCaptures->pageForId( $this->id, null, $limit, $parameters ); } } PK"w[VږZ Z Resources/Shipment.phpnu[tracking !== null; } /** * Does this shipment offer a track and trace code? * * @return bool */ public function hasTrackingUrl() { return $this->hasTracking() && ! empty($this->tracking->url); } /** * Retrieve the track and trace url. Returns null if there is no url available. * * @return string|null */ public function getTrackingUrl() { if (! $this->hasTrackingUrl()) { return null; } return $this->tracking->url; } /** * Get the line value objects * * @return OrderLineCollection */ public function lines() { return ResourceFactory::createBaseResourceCollection( $this->client, OrderLine::class, $this->lines ); } /** * Get the Order object for this shipment * * @return Order * @throws \Mollie\Api\Exceptions\ApiException */ public function order() { return $this->client->orders->get($this->orderId); } /** * Save changes made to this shipment. * * @return BaseResource|Shipment * @throws \Mollie\Api\Exceptions\ApiException */ public function update() { $body = [ "tracking" => $this->tracking, ]; $result = $this->client->shipments->update($this->orderId, $this->id, $body); return ResourceFactory::createFromApiResult($result, new Shipment($this->client)); } } PK"w[Jyy#Resources/PaymentLinkCollection.phpnu[client); } } PK"w[;~^ Resources/CursorCollection.phpnu[client = $client; } /** * @return BaseResource */ abstract protected function createResourceObject(); /** * Return the next set of resources when available * * @return CursorCollection|null * @throws \Mollie\Api\Exceptions\ApiException */ final public function next() { if (! $this->hasNext()) { return null; } $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->next->href); $collection = new static($this->client, $result->count, $result->_links); foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) { $collection[] = ResourceFactory::createFromApiResult($dataResult, $this->createResourceObject()); } return $collection; } /** * Return the previous set of resources when available * * @return CursorCollection|null * @throws \Mollie\Api\Exceptions\ApiException */ final public function previous() { if (! $this->hasPrevious()) { return null; } $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->previous->href); $collection = new static($this->client, $result->count, $result->_links); foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) { $collection[] = ResourceFactory::createFromApiResult($dataResult, $this->createResourceObject()); } return $collection; } /** * Determine whether the collection has a next page available. * * @return bool */ public function hasNext() { return isset($this->_links->next->href); } /** * Determine whether the collection has a previous page available. * * @return bool */ public function hasPrevious() { return isset($this->_links->previous->href); } /** * Iterate over a CursorCollection and yield its elements. * * @param bool $iterateBackwards * * @return LazyCollection */ public function getAutoIterator(bool $iterateBackwards = false): LazyCollection { $page = $this; return new LazyCollection(function () use ($page, $iterateBackwards): Generator { while (true) { foreach ($page as $item) { yield $item; } if (($iterateBackwards && ! $page->hasPrevious()) || ! $page->hasNext()) { break; } $page = $iterateBackwards ? $page->previous() : $page->next(); } }); } } PK"w[pOɺKK!Resources/OrderLineCollection.phpnu[id === $lineId) { return $line; } } return null; } } PK"w[-qPPMollieApiClient.phpnu[httpClient = $httpAdapterPicker->pickHttpAdapter($httpClient); $compatibilityChecker = new CompatibilityChecker; $compatibilityChecker->checkCompatibility(); $this->initializeEndpoints(); $this->initializeVersionStrings(); $this->initializeIdempotencyKeyGenerator($idempotencyKeyGenerator); } public function initializeEndpoints() { $this->payments = new PaymentEndpoint($this); $this->methods = new MethodEndpoint($this); $this->profileMethods = new ProfileMethodEndpoint($this); $this->customers = new CustomerEndpoint($this); $this->settlements = new SettlementsEndpoint($this); $this->settlementCaptures = new SettlementCaptureEndpoint($this); $this->settlementChargebacks = new SettlementChargebackEndpoint($this); $this->settlementPayments = new SettlementPaymentEndpoint($this); $this->settlementRefunds = new SettlementRefundEndpoint($this); $this->subscriptions = new SubscriptionEndpoint($this); $this->customerPayments = new CustomerPaymentsEndpoint($this); $this->mandates = new MandateEndpoint($this); $this->balances = new BalanceEndpoint($this); $this->balanceTransactions = new BalanceTransactionEndpoint($this); $this->balanceReports = new BalanceReportEndpoint($this); $this->invoices = new InvoiceEndpoint($this); $this->permissions = new PermissionEndpoint($this); $this->profiles = new ProfileEndpoint($this); $this->onboarding = new OnboardingEndpoint($this); $this->organizations = new OrganizationEndpoint($this); $this->orders = new OrderEndpoint($this); $this->orderLines = new OrderLineEndpoint($this); $this->orderPayments = new OrderPaymentEndpoint($this); $this->orderRefunds = new OrderRefundEndpoint($this); $this->shipments = new ShipmentEndpoint($this); $this->refunds = new RefundEndpoint($this); $this->paymentRefunds = new PaymentRefundEndpoint($this); $this->paymentCaptures = new PaymentCaptureEndpoint($this); $this->paymentRoutes = new PaymentRouteEndpoint($this); $this->chargebacks = new ChargebackEndpoint($this); $this->paymentChargebacks = new PaymentChargebackEndpoint($this); $this->wallets = new WalletEndpoint($this); $this->paymentLinks = new PaymentLinkEndpoint($this); $this->terminals = new TerminalEndpoint($this); $this->organizationPartners = new OrganizationPartnerEndpoint($this); $this->clients = new ClientEndpoint($this); $this->clientLinks = new ClientLinkEndpoint($this); } protected function initializeVersionStrings() { $this->addVersionString("Mollie/" . self::CLIENT_VERSION); $this->addVersionString("PHP/" . phpversion()); $httpClientVersionString = $this->httpClient->versionString(); if ($httpClientVersionString) { $this->addVersionString($httpClientVersionString); } } /** * @param \Mollie\Api\Idempotency\IdempotencyKeyGeneratorContract $generator * @return void */ protected function initializeIdempotencyKeyGenerator($generator) { $this->idempotencyKeyGenerator = $generator ? $generator : new DefaultIdempotencyKeyGenerator; } /** * @param string $url * * @return MollieApiClient */ public function setApiEndpoint($url) { $this->apiEndpoint = rtrim(trim($url), '/'); return $this; } /** * @return string */ public function getApiEndpoint() { return $this->apiEndpoint; } /** * @return array */ public function getVersionStrings() { return $this->versionStrings; } /** * @param string $apiKey The Mollie API key, starting with 'test_' or 'live_' * * @return MollieApiClient * @throws ApiException */ public function setApiKey($apiKey) { $apiKey = trim($apiKey); if (! preg_match('/^(live|test)_\w{30,}$/', $apiKey)) { throw new ApiException("Invalid API key: '{$apiKey}'. An API key must start with 'test_' or 'live_' and must be at least 30 characters long."); } $this->apiKey = $apiKey; $this->oauthAccess = false; return $this; } /** * @param string $accessToken OAuth access token, starting with 'access_' * * @return MollieApiClient * @throws ApiException */ public function setAccessToken($accessToken) { $accessToken = trim($accessToken); if (! preg_match('/^access_\w+$/', $accessToken)) { throw new ApiException("Invalid OAuth access token: '{$accessToken}'. An access token must start with 'access_'."); } $this->apiKey = $accessToken; $this->oauthAccess = true; return $this; } /** * Returns null if no API key has been set yet. * * @return bool|null */ public function usesOAuth() { return $this->oauthAccess; } /** * @param string $versionString * * @return MollieApiClient */ public function addVersionString($versionString) { $this->versionStrings[] = str_replace([" ", "\t", "\n", "\r"], '-', $versionString); return $this; } /** * Enable debugging mode. If debugging mode is enabled, the attempted request will be included in the ApiException. * By default, debugging is disabled to prevent leaking sensitive request data into exception logs. * * @throws \Mollie\Api\Exceptions\HttpAdapterDoesNotSupportDebuggingException */ public function enableDebugging() { if ( ! method_exists($this->httpClient, 'supportsDebugging') || ! $this->httpClient->supportsDebugging() ) { throw new HttpAdapterDoesNotSupportDebuggingException( "Debugging is not supported by " . get_class($this->httpClient) . "." ); } $this->httpClient->enableDebugging(); } /** * Disable debugging mode. If debugging mode is enabled, the attempted request will be included in the ApiException. * By default, debugging is disabled to prevent leaking sensitive request data into exception logs. * * @throws \Mollie\Api\Exceptions\HttpAdapterDoesNotSupportDebuggingException */ public function disableDebugging() { if ( ! method_exists($this->httpClient, 'supportsDebugging') || ! $this->httpClient->supportsDebugging() ) { throw new HttpAdapterDoesNotSupportDebuggingException( "Debugging is not supported by " . get_class($this->httpClient) . "." ); } $this->httpClient->disableDebugging(); } /** * Set the idempotency key used on the next request. The idempotency key is a unique string ensuring a request to a * mutating Mollie endpoint is processed only once. The idempotency key resets to null after each request. Using * the setIdempotencyKey method supersedes the IdempotencyKeyGenerator. * * @param $key * @return $this */ public function setIdempotencyKey($key) { $this->idempotencyKey = $key; return $this; } /** * Retrieve the idempotency key. The idempotency key is a unique string ensuring a request to a * mutating Mollie endpoint is processed only once. Note that the idempotency key gets reset to null after each * request. * * @return string|null */ public function getIdempotencyKey() { return $this->idempotencyKey; } /** * Reset the idempotency key. Note that the idempotency key automatically resets to null after each request. * @return $this */ public function resetIdempotencyKey() { $this->idempotencyKey = null; return $this; } /** * @param \Mollie\Api\Idempotency\IdempotencyKeyGeneratorContract $generator * @return \Mollie\Api\MollieApiClient */ public function setIdempotencyKeyGenerator($generator) { $this->idempotencyKeyGenerator = $generator; return $this; } /** * @return \Mollie\Api\MollieApiClient */ public function clearIdempotencyKeyGenerator() { $this->idempotencyKeyGenerator = null; return $this; } /** * Perform a http call. This method is used by the resource specific classes. Please use the $payments property to * perform operations on payments. * * @param string $httpMethod * @param string $apiMethod * @param string|null $httpBody * * @return \stdClass * @throws ApiException * * @codeCoverageIgnore */ public function performHttpCall($httpMethod, $apiMethod, $httpBody = null) { $url = $this->apiEndpoint . "/" . self::API_VERSION . "/" . $apiMethod; return $this->performHttpCallToFullUrl($httpMethod, $url, $httpBody); } /** * Perform a http call to a full url. This method is used by the resource specific classes. * * @see $payments * @see $isuers * * @param string $httpMethod * @param string $url * @param string|null $httpBody * * @return \stdClass|null * @throws ApiException * * @codeCoverageIgnore */ public function performHttpCallToFullUrl($httpMethod, $url, $httpBody = null) { if (empty($this->apiKey)) { throw new ApiException("You have not set an API key or OAuth access token. Please use setApiKey() to set the API key."); } $userAgent = implode(' ', $this->versionStrings); if ($this->usesOAuth()) { $userAgent .= " OAuth/2.0"; } $headers = [ 'Accept' => "application/json", 'Authorization' => "Bearer {$this->apiKey}", 'User-Agent' => $userAgent, ]; if ($httpBody !== null) { $headers['Content-Type'] = "application/json"; } if (function_exists("php_uname")) { $headers['X-Mollie-Client-Info'] = php_uname(); } $headers = $this->applyIdempotencyKey($headers, $httpMethod); $response = $this->httpClient->send($httpMethod, $url, $headers, $httpBody); $this->resetIdempotencyKey(); return $response; } /** * Conditionally apply the idempotency key to the request headers * * @param array $headers * @param string $httpMethod * @return array */ private function applyIdempotencyKey(array $headers, string $httpMethod) { if (! in_array($httpMethod, [self::HTTP_POST, self::HTTP_PATCH, self::HTTP_DELETE])) { unset($headers['Idempotency-Key']); return $headers; } if ($this->idempotencyKey) { $headers['Idempotency-Key'] = $this->idempotencyKey; return $headers; } if ($this->idempotencyKeyGenerator) { $headers['Idempotency-Key'] = $this->idempotencyKeyGenerator->generate(); return $headers; } unset($headers['Idempotency-Key']); return $headers; } /** * Serialization can be used for caching. Of course doing so can be dangerous but some like to live dangerously. * * \serialize() should be called on the collections or object you want to cache. * * We don't need any property that can be set by the constructor, only properties that are set by setters. * * Note that the API key is not serialized, so you need to set the key again after unserializing if you want to do * more API calls. * * @deprecated * @return string[] */ public function __sleep() { return ["apiEndpoint"]; } /** * When unserializing a collection or a resource, this class should restore itself. * * Note that if you have set an HttpAdapter, this adapter is lost on wakeup and reset to the default one. * * @throws IncompatiblePlatform If suddenly unserialized on an incompatible platform. */ public function __wakeup() { $this->__construct(); } } PK"w[$ԅ Endpoints/ProfileEndpoint.phpnu[resourceClass($this->client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return ProfileCollection */ protected function getResourceCollectionObject($count, $_links) { return new ProfileCollection($this->client, $count, $_links); } /** * Creates a Profile in Mollie. * * @param array $data An array containing details on the profile. * @param array $filters * * @return Profile * @throws ApiException */ public function create(array $data = [], array $filters = []) { return $this->rest_create($data, $filters); } /** * Retrieve a Profile from Mollie. * * Will throw an ApiException if the profile id is invalid or the resource cannot be found. * * @param string $profileId * @param array $parameters * * @return Profile * @throws ApiException */ public function get($profileId, array $parameters = []) { if ($profileId === 'me') { return $this->getCurrent($parameters); } return $this->rest_read($profileId, $parameters); } /** * Update a specific Profile resource. * * Will throw an ApiException if the profile id is invalid or the resource cannot be found. * * @param string $profileId * * @param array $data * @return Profile * @throws ApiException */ public function update($profileId, array $data = []) { if (empty($profileId) || strpos($profileId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid profile id: '{$profileId}'. An profile id should start with '" . self::RESOURCE_ID_PREFIX . "'."); } return parent::rest_update($profileId, $data); } /** * Retrieve the current Profile from Mollie. * * @param array $parameters * * @return CurrentProfile * @throws ApiException */ public function getCurrent(array $parameters = []) { $this->resourceClass = CurrentProfile::class; return $this->rest_read('me', $parameters); } /** * Delete a Profile from Mollie. * * Will throw a ApiException if the profile id is invalid or the resource cannot be found. * Returns with HTTP status No Content (204) if successful. * * @param string $profileId * * @param array $data * @return Profile * @throws ApiException */ public function delete($profileId, array $data = []) { return $this->rest_delete($profileId, $data); } /** * Retrieves a collection of Profiles from Mollie. * * @param string $from The first profile ID you want to include in your list. * @param int $limit * @param array $parameters * * @return ProfileCollection * @throws ApiException */ public function page($from = null, $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over profiles retrieved from Mollie. * * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[̈ !Endpoints/SettlementsEndpoint.phpnu[client); } /** * Get the collection object that is used by this API. Every API uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return \Mollie\Api\Resources\BaseCollection */ protected function getResourceCollectionObject($count, $_links) { return new SettlementCollection($this->client, $count, $_links); } /** * Retrieve a single settlement from Mollie. * * Will throw a ApiException if the settlement id is invalid or the resource cannot be found. * * @param string $settlementId * @param array $parameters * @return Settlement * @throws ApiException */ public function get($settlementId, array $parameters = []) { return parent::rest_read($settlementId, $parameters); } /** * Retrieve the details of the current settlement that has not yet been paid out. * * @return Settlement * @throws ApiException */ public function next() { return parent::rest_read("next", []); } /** * Retrieve the details of the open balance of the organization. * * @return Settlement * @throws ApiException */ public function open() { return parent::rest_read("open", []); } /** * Retrieves a collection of Settlements from Mollie. * * @param string $from The first settlement ID you want to include in your list. * @param int $limit * @param array $parameters * * @return SettlementCollection * @throws ApiException */ public function page($from = null, $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over settlements retrieved from Mollie. * * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[R)Endpoints/OrganizationPartnerEndpoint.phpnu[client); } /** * Retrieve details about the partner status of the currently authenticated organization. * * Will throw an ApiException if the resource cannot be found. * * @return Partner * @throws ApiException */ public function get() { return $this->rest_read('', []); } /** * @param string $id * @param array $filters * * @return mixed * @throws \Mollie\Api\Exceptions\ApiException */ protected function rest_read($id, array $filters) { $result = $this->client->performHttpCall( self::REST_READ, $this->getResourcePath() . $this->buildQueryString($filters) ); return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } } PK"w[Z 9 9 "Endpoints/SubscriptionEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return SubscriptionCollection */ protected function getResourceCollectionObject($count, $_links) { return new SubscriptionCollection($this->client, $count, $_links); } /** * Create a subscription for a Customer * * @param Customer $customer * @param array $options * @param array $filters * * @return Subscription * @throws ApiException */ public function createFor(Customer $customer, array $options = [], array $filters = []) { return $this->createForId($customer->id, $options, $filters); } /** * Create a subscription for a Customer * * @param string $customerId * @param array $options * @param array $filters * * @return Subscription * @throws ApiException */ public function createForId($customerId, array $options = [], array $filters = []) { $this->parentId = $customerId; return parent::rest_create($options, $filters); } /** * Update a specific Subscription resource. * * Will throw an ApiException if the subscription id is invalid or the resource cannot be found. * * @param string $subscriptionId * @param string $customerId * * @param array $data * * @return Subscription * @throws ApiException */ public function update($customerId, $subscriptionId, array $data = []) { if (empty($subscriptionId) || strpos($subscriptionId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid subscription ID: '{$subscriptionId}'. An subscription ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); } $this->parentId = $customerId; return parent::rest_update($subscriptionId, $data); } /** * @param Customer $customer * @param string $subscriptionId * @param array $parameters * * @return Subscription * @throws ApiException */ public function getFor(Customer $customer, $subscriptionId, array $parameters = []) { return $this->getForId($customer->id, $subscriptionId, $parameters); } /** * @param string $customerId * @param string $subscriptionId * @param array $parameters * * @return Subscription * @throws ApiException */ public function getForId($customerId, $subscriptionId, array $parameters = []) { $this->parentId = $customerId; return parent::rest_read($subscriptionId, $parameters); } /** * @param Customer $customer * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * * @return SubscriptionCollection * @throws ApiException */ public function listFor(Customer $customer, $from = null, $limit = null, array $parameters = []) { return $this->listForId($customer->id, $from, $limit, $parameters); } /** * Create an iterator for iterating over subscriptions for the given customer, retrieved from Mollie. * * @param Customer $customer * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorFor(Customer $customer, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->iteratorForId($customer->id, $from, $limit, $parameters, $iterateBackwards); } /** * @param string $customerId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * * @return SubscriptionCollection * @throws ApiException */ public function listForId($customerId, $from = null, $limit = null, array $parameters = []) { $this->parentId = $customerId; return parent::rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over subscriptions for the given customer id, retrieved from Mollie. * * @param string $customerId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $customerId, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $customerId; return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } /** * @param Customer $customer * @param string $subscriptionId * @param array $data * * @return null * @throws ApiException */ public function cancelFor(Customer $customer, $subscriptionId, array $data = []) { return $this->cancelForId($customer->id, $subscriptionId, $data); } /** * @param string $customerId * @param string $subscriptionId * @param array $data * * @return null * @throws ApiException */ public function cancelForId($customerId, $subscriptionId, array $data = []) { $this->parentId = $customerId; return parent::rest_delete($subscriptionId, $data); } /** * Retrieves a collection of Subscriptions from Mollie. * * @param string $from The first payment ID you want to include in your list. * @param int $limit * @param array $parameters * * @return SubscriptionCollection * @throws ApiException */ public function page($from = null, $limit = null, array $parameters = []) { $filters = array_merge(["from" => $from, "limit" => $limit], $parameters); $apiPath = 'subscriptions' . $this->buildQueryString($filters); $result = $this->client->performHttpCall(self::REST_LIST, $apiPath); /** @var SubscriptionCollection $collection */ $collection = $this->getResourceCollectionObject($result->count, $result->_links); foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) { $collection[] = ResourceFactory::createFromApiResult($dataResult, $this->getResourceObject()); } return $collection; } /** * Create an iterator for iterating over subscriptions retrieved from Mollie. * * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $page = $this->page($from, $limit, $parameters); return $page->getAutoIterator($iterateBackwards); } } PK"w[Nc<"Endpoints/OrderPaymentEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API * endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return \Mollie\Api\Resources\PaymentCollection */ protected function getResourceCollectionObject($count, $_links) { return new PaymentCollection($this->client, $count, $_links); } /** * Creates a payment in Mollie for a specific order. * * @param \Mollie\Api\Resources\Order $order * @param array $data An array containing details on the order payment. * @param array $filters * * @return \Mollie\Api\Resources\Payment * @throws \Mollie\Api\Exceptions\ApiException */ public function createFor(Order $order, array $data, array $filters = []) { return $this->createForId($order->id, $data, $filters); } /** * Creates a payment in Mollie for a specific order ID. * * @param string $orderId * @param array $data An array containing details on the order payment. * @param array $filters * * @return \Mollie\Api\Resources\Payment * @throws \Mollie\Api\Exceptions\ApiException */ public function createForId($orderId, array $data, array $filters = []) { $this->parentId = $orderId; return $this->rest_create($data, $filters); } } PK"w[L*Endpoints/SettlementChargebackEndpoint.phpnu[client); } /** * @inheritDoc */ protected function getResourceCollectionObject($count, $_links) { return new ChargebackCollection($this->client, $count, $_links); } /** * Retrieves a collection of Settlement Chargebacks from Mollie. * * @param string $settlementId * @param string|null $from The first chargeback ID you want to include in your list. * @param int|null $limit * @param array $parameters * * @return mixed * @throws \Mollie\Api\Exceptions\ApiException */ public function pageForId(string $settlementId, string $from = null, int $limit = null, array $parameters = []) { $this->parentId = $settlementId; return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over chargeback for the given settlement id, retrieved from Mollie. * * @param string $settlementId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $settlementId, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $settlementId; return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[w11'Endpoints/PaymentChargebackEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return ChargebackCollection */ protected function getResourceCollectionObject($count, $_links) { return new ChargebackCollection($this->client, $count, $_links); } /** * @param Payment $payment * @param string $chargebackId * @param array $parameters * * @return Chargeback * @throws \Mollie\Api\Exceptions\ApiException */ public function getFor(Payment $payment, $chargebackId, array $parameters = []) { return $this->getForId($payment->id, $chargebackId, $parameters); } /** * @param string $paymentId * @param string $chargebackId * @param array $parameters * * @return Chargeback * @throws \Mollie\Api\Exceptions\ApiException */ public function getForId($paymentId, $chargebackId, array $parameters = []) { $this->parentId = $paymentId; return parent::rest_read($chargebackId, $parameters); } /** * @param Payment $payment * @param array $parameters * * @return Chargeback * @throws \Mollie\Api\Exceptions\ApiException */ public function listFor(Payment $payment, array $parameters = []) { return $this->listForId($payment->id, $parameters); } /** * Create an iterator for iterating over chargebacks for the given payment, retrieved from Mollie. * * @param Payment $payment * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorFor(Payment $payment, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->iteratorForId($payment->id, $from, $limit, $parameters, $iterateBackwards); } /** * @param string $paymentId * @param array $parameters * * @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\Chargeback * @throws \Mollie\Api\Exceptions\ApiException */ public function listForId($paymentId, array $parameters = []) { $this->parentId = $paymentId; return parent::rest_list(null, null, $parameters); } /** * Create an iterator for iterating over chargebacks for the given payment id, retrieved from Mollie. * * @param string $paymentId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $paymentId, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $paymentId; return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[MffEndpoints/PaymentEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return PaymentCollection */ protected function getResourceCollectionObject($count, $_links) { return new PaymentCollection($this->client, $count, $_links); } /** * Creates a payment in Mollie. * * @param array $data An array containing details on the payment. * @param array $filters * * @return Payment * @throws ApiException */ public function create(array $data = [], array $filters = []) { return $this->rest_create($data, $filters); } /** * Update the given Payment. * * Will throw a ApiException if the payment id is invalid or the resource cannot be found. * * @param string $paymentId * * @param array $data * @return Payment * @throws ApiException */ public function update($paymentId, array $data = []) { if (empty($paymentId) || strpos($paymentId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid payment ID: '{$paymentId}'. A payment ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); } return parent::rest_update($paymentId, $data); } /** * Retrieve a single payment from Mollie. * * Will throw a ApiException if the payment id is invalid or the resource cannot be found. * * @param string $paymentId * @param array $parameters * @return Payment * @throws ApiException */ public function get($paymentId, array $parameters = []) { if (empty($paymentId) || strpos($paymentId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid payment ID: '{$paymentId}'. A payment ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); } return parent::rest_read($paymentId, $parameters); } /** * Deletes the given Payment. * * Will throw a ApiException if the payment id is invalid or the resource cannot be found. * Returns with HTTP status No Content (204) if successful. * * @param string $paymentId * * @param array $data * @return Payment * @throws ApiException */ public function delete($paymentId, array $data = []) { return $this->rest_delete($paymentId, $data); } /** * Cancel the given Payment. This is just an alias of the 'delete' method. * * Will throw a ApiException if the payment id is invalid or the resource cannot be found. * Returns with HTTP status No Content (204) if successful. * * @param string $paymentId * * @param array $data * @return Payment * @throws ApiException */ public function cancel($paymentId, array $data = []) { return $this->rest_delete($paymentId, $data); } /** * Retrieves a collection of Payments from Mollie. * * @param string $from The first payment ID you want to include in your list. * @param int $limit * @param array $parameters * * @return PaymentCollection * @throws ApiException */ public function page($from = null, $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over payments retrieved from Mollie. * * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } /** * Issue a refund for the given payment. * * The $data parameter may either be an array of endpoint parameters, a float value to * initiate a partial refund, or empty to do a full refund. * * @param Payment $payment * @param array|float|null $data * * @return Refund * @throws ApiException */ public function refund(Payment $payment, $data = []) { $resource = "{$this->getResourcePath()}/" . urlencode($payment->id) . "/refunds"; $body = null; if (($data === null ? 0 : count($data)) > 0) { $body = json_encode($data); } $result = $this->client->performHttpCall(self::REST_CREATE, $resource, $body); return ResourceFactory::createFromApiResult($result, new Refund($this->client)); } } PK"w[z#<' ' !Endpoints/PaymentLinkEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return PaymentLinkCollection */ protected function getResourceCollectionObject($count, $_links) { return new PaymentLinkCollection($this->client, $count, $_links); } /** * Creates a payment link in Mollie. * * @param array $data An array containing details on the payment link. * @param array $filters * * @return PaymentLink * @throws ApiException */ public function create(array $data = [], array $filters = []) { return $this->rest_create($data, $filters); } /** * Retrieve payment link from Mollie. * * Will throw a ApiException if the payment link id is invalid or the resource cannot be found. * * @param string $paymentLinkId * @param array $parameters * @return PaymentLink * @throws ApiException */ public function get($paymentLinkId, array $parameters = []) { if (empty($paymentLinkId) || strpos($paymentLinkId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid payment link ID: '{$paymentLinkId}'. A payment link ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); } return parent::rest_read($paymentLinkId, $parameters); } /** * Retrieves a collection of Payment Links from Mollie. * * @param string $from The first payment link ID you want to include in your list. * @param int $limit * @param array $parameters * * @return PaymentLinkCollection * @throws ApiException */ public function page($from = null, $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over payment links retrieved from Mollie. * * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[K Endpoints/ClientEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return ClientCollection */ protected function getResourceCollectionObject($count, $_links) { return new ClientCollection($this->client, $count, $_links); } /** * Retrieve a client from Mollie. * * Will throw an ApiException if the client id is invalid or the resource cannot be found. * The client id corresponds to the organization id, for example "org_1337". * * @param string $clientId * @param array $parameters * * @return Client * @throws ApiException */ public function get($clientId, array $parameters = []) { if (empty($clientId)) { throw new ApiException("Client ID is empty."); } return parent::rest_read($clientId, $parameters); } /** * Retrieves a page of clients from Mollie. * * @param string $from The first client ID you want to include in your list. * @param int $limit * @param array $parameters * * @return ClientCollection * @throws ApiException */ public function page(?string $from = null, ?int $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over clients retrieved from Mollie. * * @param string $from The first client ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[?$Endpoints/PaymentCaptureEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return \Mollie\Api\Resources\CaptureCollection */ protected function getResourceCollectionObject($count, $_links) { return new CaptureCollection($this->client, $count, $_links); } /** * Creates a payment capture in Mollie. * * @param Payment $payment. * @param array $data An array containing details on the capture. * @param array $filters * * @return Capture * @throws \Mollie\Api\Exceptions\ApiException */ public function createFor(Payment $payment, array $data = [], array $filters = []) { return $this->createForId($payment->id, $data, $filters); } /** * Creates a payment capture in Mollie. * * @param string $paymentId The payment's ID. * @param array $data An array containing details on the capture. * @param array $filters * * @return Capture * @throws \Mollie\Api\Exceptions\ApiException */ public function createForId($paymentId, array $data = [], array $filters = []) { $this->parentId = $paymentId; return $this->rest_create($data, $filters); } /** * @param Payment $payment * @param string $captureId * @param array $parameters * * @return Capture * @throws \Mollie\Api\Exceptions\ApiException */ public function getFor(Payment $payment, $captureId, array $parameters = []) { return $this->getForId($payment->id, $captureId, $parameters); } /** * @param string $paymentId * @param string $captureId * @param array $parameters * * @return \Mollie\Api\Resources\Capture * @throws \Mollie\Api\Exceptions\ApiException */ public function getForId($paymentId, $captureId, array $parameters = []) { $this->parentId = $paymentId; return parent::rest_read($captureId, $parameters); } /** * @param Payment $payment * @param array $parameters * * @return Capture * @throws \Mollie\Api\Exceptions\ApiException */ public function listFor(Payment $payment, array $parameters = []) { return $this->listForId($payment->id, $parameters); } /** * Create an iterator for iterating over captures for the given payment, retrieved from Mollie. * * @param Payment $payment * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorFor(Payment $payment, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->iteratorForId($payment->id, $from, $limit, $parameters, $iterateBackwards); } /** * @param string $paymentId * @param array $parameters * * @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\Capture * @throws \Mollie\Api\Exceptions\ApiException */ public function listForId($paymentId, array $parameters = []) { $this->parentId = $paymentId; return parent::rest_list(null, null, $parameters); } /** * Create an iterator for iterating over captures for the given payment id, retrieved from Mollie. * * @param string $paymentId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $paymentId, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $paymentId; return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[,Z;Endpoints/ShipmentEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API * endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return ShipmentCollection */ protected function getResourceCollectionObject($count, $_links) { return new ShipmentCollection($count, $_links); } /** * Create a shipment for some order lines. You can provide an empty array for the * "lines" option to include all unshipped lines for this order. * * @param Order $order * @param array $options * @param array $filters * * @return Shipment * @throws \Mollie\Api\Exceptions\ApiException */ public function createFor(Order $order, array $options = [], array $filters = []) { return $this->createForId($order->id, $options, $filters); } /** * Create a shipment for some order lines. You can provide an empty array for the * "lines" option to include all unshipped lines for this order. * * @param string $orderId * @param array $options * @param array $filters * * @return Shipment * @throws \Mollie\Api\Exceptions\ApiException */ public function createForId($orderId, array $options = [], array $filters = []) { $this->parentId = $orderId; return parent::rest_create($options, $filters); } /** * Retrieve a single shipment and the order lines shipped by a shipment’s ID. * * @param Order $order * @param string $shipmentId * @param array $parameters * * @return Shipment * @throws \Mollie\Api\Exceptions\ApiException */ public function getFor(Order $order, $shipmentId, array $parameters = []) { return $this->getForId($order->id, $shipmentId, $parameters); } /** * Retrieve a single shipment and the order lines shipped by a shipment’s ID. * * @param string $orderId * @param string $shipmentId * @param array $parameters * * @return \Mollie\Api\Resources\Shipment * @throws \Mollie\Api\Exceptions\ApiException */ public function getForId($orderId, $shipmentId, array $parameters = []) { $this->parentId = $orderId; return parent::rest_read($shipmentId, $parameters); } /** * Update a specific Order Shipment resource. * * Will throw an ApiException if the shipment id is invalid or the resource cannot be found. * * @param string $shipmentId * @param string $orderId * * @param array $data * @return Shipment * @throws ApiException */ public function update($orderId, $shipmentId, array $data = []) { if (empty($shipmentId) || strpos($shipmentId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid subscription ID: '{$shipmentId}'. An subscription ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); } $this->parentId = $orderId; return parent::rest_update($shipmentId, $data); } /** * Return all shipments for the Order provided. * * @param Order $order * @param array $parameters * * @return ShipmentCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function listFor(Order $order, array $parameters = []) { return $this->listForId($order->id, $parameters); } /** * Return all shipments for the provided Order id. * * @param string $orderId * @param array $parameters * * @return \Mollie\Api\Resources\ShipmentCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function listForId($orderId, array $parameters = []) { $this->parentId = $orderId; return parent::rest_list(null, null, $parameters); } } PK"w[[ii'Endpoints/SettlementPaymentEndpoint.phpnu[client); } /** * @inheritDoc */ protected function getResourceCollectionObject($count, $_links) { return new PaymentCollection($this->client, $count, $_links); } /** * Retrieves a collection of Payments from Mollie. * * @param string $settlementId * @param string $from The first payment ID you want to include in your list. * @param int $limit * @param array $parameters * * @return mixed * @throws \Mollie\Api\Exceptions\ApiException */ public function pageForId($settlementId, $from = null, $limit = null, array $parameters = []) { $this->parentId = $settlementId; return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over payments for the given settlement id, retrieved from Mollie. * * @param string $settlementId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $settlementId, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $settlementId; return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[tt Endpoints/ClientLinkEndpoint.phpnu[client); } /** * Creates a client link in Mollie. * * @param array $data An array containing details on the client link. * * @return ClientLink * @throws ApiException */ public function create(array $data = []): ClientLink { return $this->rest_create($data, []); } } PK"w[(Endpoints/BalanceTransactionEndpoint.phpnu[client, $count, $_links); } /** * @inheritDoc */ protected function getResourceObject() { return new BalanceTransaction($this->client); } /** * List the transactions for a specific Balance. * * @param Balance $balance * @param array $parameters * @return BalanceTransactionCollection|\Mollie\Api\Resources\BaseCollection * * @throws \Mollie\Api\Exceptions\ApiException */ public function listFor(Balance $balance, array $parameters = []) { return $this->listForId($balance->id, $parameters); } /** * Create an iterator for iterating over balance transactions for the given balance retrieved from Mollie. * * @param Balance $balance * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorFor(Balance $balance, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->iteratorForId($balance->id, $parameters, $iterateBackwards); } /** * List the transactions for a specific Balance ID. * * @param string $balanceId * @param array $parameters * @return BalanceTransactionCollection|\Mollie\Api\Resources\BaseCollection * * @throws \Mollie\Api\Exceptions\ApiException */ public function listForId(string $balanceId, array $parameters = []) { $this->parentId = $balanceId; return parent::rest_list(null, null, $parameters); } /** * Create an iterator for iterating over balance transactions for the given balance id retrieved from Mollie. * * @param string $balanceId * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $balanceId, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $balanceId; return $this->rest_iterator(null, null, $parameters, $iterateBackwards); } /** * List the transactions for the primary Balance. * * @param array $parameters * @return BalanceTransactionCollection|\Mollie\Api\Resources\BaseCollection * * @throws \Mollie\Api\Exceptions\ApiException */ public function listForPrimary(array $parameters = []) { $this->parentId = "primary"; return parent::rest_list(null, null, $parameters); } /** * Create an iterator for iterating over transactions for the primary balance retrieved from Mollie. * * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForPrimary(array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = "primary"; return $this->rest_iterator(null, null, $parameters, $iterateBackwards); } } PK"w[ZZEndpoints/OrderLineEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API * endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return OrderLineCollection */ protected function getResourceCollectionObject($count, $_links) { return new OrderLineCollection($count, $_links); } /** * Update a specific OrderLine resource. * * Will throw an ApiException if the order line id is invalid or the resource cannot be found. * * @param string|null $orderId * @param string $orderlineId * * @param array $data * * @return \Mollie\Api\Resources\BaseResource|null * @throws \Mollie\Api\Exceptions\ApiException */ public function update($orderId, $orderlineId, array $data = []) { $this->parentId = $orderId; if (empty($orderlineId) || strpos($orderlineId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid order line ID: '{$orderlineId}'. An order line ID should start with '".self::RESOURCE_ID_PREFIX."'."); } return parent::rest_update($orderlineId, $data); } /** * @param string $orderId * @param array $operations * @param array $parameters * @return Order|\Mollie\Api\Resources\BaseResource * @throws \Mollie\Api\Exceptions\ApiException */ public function updateMultiple(string $orderId, array $operations, array $parameters = []) { if (empty($orderId)) { throw new ApiException("Invalid resource id."); } $this->parentId = $orderId; $parameters['operations'] = $operations; $result = $this->client->performHttpCall( self::REST_UPDATE, "{$this->getResourcePath()}", $this->parseRequestBody($parameters) ); return ResourceFactory::createFromApiResult($result, new Order($this->client)); } /** * Cancel lines for the provided order. * The data array must contain a lines array. * You can pass an empty lines array if you want to cancel all eligible lines. * Returns null if successful. * * @param Order $order * @param array $data * * @return null * @throws ApiException */ public function cancelFor(Order $order, array $data) { return $this->cancelForId($order->id, $data); } /** * Cancel lines for the provided order id. * The data array must contain a lines array. * You can pass an empty lines array if you want to cancel all eligible lines. * Returns null if successful. * * @param string $orderId * @param array $data * * @return null * @throws ApiException */ public function cancelForId($orderId, array $data) { if (! isset($data['lines']) || ! is_array($data['lines'])) { throw new ApiException("A lines array is required."); } $this->parentId = $orderId; $this->client->performHttpCall( self::REST_DELETE, "{$this->getResourcePath()}", $this->parseRequestBody($data) ); return null; } } PK"w[  Endpoints/MethodEndpoint.phpnu[client); } /** * Retrieve all active methods. In test mode, this includes pending methods. The results are not paginated. * * @deprecated Use allActive() instead * @param array $parameters * * @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\MethodCollection * @throws ApiException */ public function all(array $parameters = []) { return $this->allActive($parameters); } /** * Retrieve all active methods for the organization. In test mode, this includes pending methods. * The results are not paginated. * * @param array $parameters * * @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\MethodCollection * @throws ApiException */ public function allActive(array $parameters = []) { return parent::rest_list(null, null, $parameters); } /** * Retrieve all available methods for the organization, including activated and not yet activated methods. The * results are not paginated. Make sure to include the profileId parameter if using an OAuth Access Token. * * @param array $parameters Query string parameters. * @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\MethodCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function allAvailable(array $parameters = []) { $url = 'methods/all' . $this->buildQueryString($parameters); $result = $this->client->performHttpCall('GET', $url); return ResourceFactory::createBaseResourceCollection( $this->client, Method::class, $result->_embedded->methods, $result->_links ); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return MethodCollection */ protected function getResourceCollectionObject($count, $_links) { return new MethodCollection($count, $_links); } /** * Retrieve a payment method from Mollie. * * Will throw a ApiException if the method id is invalid or the resource cannot be found. * * @param string $methodId * @param array $parameters * @return \Mollie\Api\Resources\Method * @throws ApiException */ public function get($methodId, array $parameters = []) { if (empty($methodId)) { throw new ApiException("Method ID is empty."); } return parent::rest_read($methodId, $parameters); } } PK"w[client = $api; } /** * @param array $filters * @return string */ protected function buildQueryString(array $filters) { if (empty($filters)) { return ""; } foreach ($filters as $key => $value) { if ($value === true) { $filters[$key] = "true"; } if ($value === false) { $filters[$key] = "false"; } } return "?" . http_build_query($filters, "", "&"); } /** * @param array $body * @param array $filters * @return mixed * @throws ApiException */ protected function rest_create(array $body, array $filters) { $result = $this->client->performHttpCall( self::REST_CREATE, $this->getResourcePath() . $this->buildQueryString($filters), $this->parseRequestBody($body) ); return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } /** * Sends a PATCH request to a single Mollie API object. * * @param string $id * @param array $body * * @return mixed * @throws ApiException */ protected function rest_update($id, array $body = []) { if (empty($id)) { throw new ApiException("Invalid resource id."); } $id = urlencode($id); $result = $this->client->performHttpCall( self::REST_UPDATE, "{$this->getResourcePath()}/{$id}", $this->parseRequestBody($body) ); if ($result == null) { return null; } return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } /** * Retrieves a single object from the REST API. * * @param string $id Id of the object to retrieve. * @param array $filters * @return mixed * @throws ApiException */ protected function rest_read($id, array $filters) { if (empty($id)) { throw new ApiException("Invalid resource id."); } $id = urlencode($id); $result = $this->client->performHttpCall( self::REST_READ, "{$this->getResourcePath()}/{$id}" . $this->buildQueryString($filters) ); return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } /** * Sends a DELETE request to a single Molle API object. * * @param string $id * @param array $body * * @return mixed * @throws ApiException */ protected function rest_delete($id, array $body = []) { if (empty($id)) { throw new ApiException("Invalid resource id."); } $id = urlencode($id); $result = $this->client->performHttpCall( self::REST_DELETE, "{$this->getResourcePath()}/{$id}", $this->parseRequestBody($body) ); if ($result == null) { return null; } return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } /** * Get the object that is used by this API endpoint. Every API endpoint uses one type of object. * * @return BaseResource */ abstract protected function getResourceObject(); /** * @param string $resourcePath */ public function setResourcePath($resourcePath) { $this->resourcePath = strtolower($resourcePath); } /** * @return string * @throws ApiException */ public function getResourcePath() { if (strpos($this->resourcePath, "_") !== false) { [$parentResource, $childResource] = explode("_", $this->resourcePath, 2); if (empty($this->parentId)) { throw new ApiException("Subresource '{$this->resourcePath}' used without parent '$parentResource' ID."); } return "$parentResource/{$this->parentId}/$childResource"; } return $this->resourcePath; } /** * @param array $body * @return null|string */ protected function parseRequestBody(array $body) { if (empty($body)) { return null; } return @json_encode($body); } } PK"w[?4^HH#Endpoints/PaymentRefundEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return RefundCollection */ protected function getResourceCollectionObject($count, $_links) { return new RefundCollection($this->client, $count, $_links); } /** * @param Payment $payment * @param string $refundId * @param array $parameters * * @return Refund * @throws \Mollie\Api\Exceptions\ApiException */ public function getFor(Payment $payment, $refundId, array $parameters = []) { return $this->getForId($payment->id, $refundId, $parameters); } /** * @param string $paymentId * @param string $refundId * @param array $parameters * * @return \Mollie\Api\Resources\Refund * @throws \Mollie\Api\Exceptions\ApiException */ public function getForId($paymentId, $refundId, array $parameters = []) { $this->parentId = $paymentId; return parent::rest_read($refundId, $parameters); } /** * @param Payment $payment * @param array $parameters * * @return Refund * @throws \Mollie\Api\Exceptions\ApiException */ public function listFor(Payment $payment, array $parameters = []) { return $this->listForId($payment->id, $parameters); } /** * Create an iterator for iterating over refunds for the given payment, retrieved from Mollie. * * @param Payment $payment * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorFor(Payment $payment, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->iteratorForId($payment->id, $from, $limit, $parameters, $iterateBackwards); } /** * @param string $paymentId * @param array $parameters * * @return \Mollie\Api\Resources\BaseCollection|\Mollie\Api\Resources\Refund * @throws \Mollie\Api\Exceptions\ApiException */ public function listForId($paymentId, array $parameters = []) { $this->parentId = $paymentId; return parent::rest_list(null, null, $parameters); } /** * Create an iterator for iterating over refunds for the given payment id, retrieved from Mollie. * * @param string $paymentId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $paymentId, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $paymentId; return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } /** * Creates a refund for a specific payment. * * @param Payment $payment * @param array $data * @param array $filters * * @return Refund * @throws \Mollie\Api\Exceptions\ApiException */ public function createFor(Payment $payment, array $data, array $filters = []) { return $this->createForId($payment->id, $data, $filters); } /** * Creates a refund for a specific payment. * * @param string $paymentId * @param array $data * @param array $filters * * @return \Mollie\Api\Resources\Refund * @throws \Mollie\Api\Exceptions\ApiException */ public function createForId(string $paymentId, array $data, array $filters = []) { $this->parentId = $paymentId; return parent::rest_create($data, $filters); } } PK"w[0lkk!Endpoints/OrderRefundEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return RefundCollection */ protected function getResourceCollectionObject($count, $_links) { return new RefundCollection($this->client, $count, $_links); } /** * Refund some order lines. You can provide an empty array for the * "lines" data to refund all eligible lines for this order. * * @param Order $order * @param array $data * @param array $filters * * @return Refund * @throws \Mollie\Api\Exceptions\ApiException */ public function createFor(Order $order, array $data, array $filters = []) { return $this->createForId($order->id, $data, $filters); } /** * Refund some order lines. You can provide an empty array for the * "lines" data to refund all eligible lines for this order. * * @param string $orderId * @param array $data * @param array $filters * * @return \Mollie\Api\Resources\Refund * @throws \Mollie\Api\Exceptions\ApiException */ public function createForId($orderId, array $data, array $filters = []) { $this->parentId = $orderId; return parent::rest_create($data, $filters); } } PK"w[ !`Endpoints/CustomerEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return CustomerCollection */ protected function getResourceCollectionObject($count, $_links) { return new CustomerCollection($this->client, $count, $_links); } /** * Creates a customer in Mollie. * * @param array $data An array containing details on the customer. * @param array $filters * * @return Customer * @throws ApiException */ public function create(array $data = [], array $filters = []) { return $this->rest_create($data, $filters); } /** * Retrieve a single customer from Mollie. * * Will throw a ApiException if the customer id is invalid or the resource cannot be found. * * @param string $customerId * @param array $parameters * @return Customer * @throws ApiException */ public function get($customerId, array $parameters = []) { return $this->rest_read($customerId, $parameters); } /** * Update a specific Customer resource. * * Will throw an ApiException if the customer id is invalid or the resource cannot be found. * * @param string $customerId * * @param array $data * @return Customer * @throws ApiException */ public function update($customerId, array $data = []) { if (empty($customerId) || strpos($customerId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid order ID: '{$customerId}'. An order ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); } return parent::rest_update($customerId, $data); } /** * Deletes the given Customer. * * Will throw a ApiException if the customer id is invalid or the resource cannot be found. * Returns with HTTP status No Content (204) if successful. * * @param string $customerId * * @param array $data * @return null * @throws ApiException */ public function delete($customerId, array $data = []) { return $this->rest_delete($customerId, $data); } /** * Retrieves a collection of Customers from Mollie. * * @param string $from The first customer ID you want to include in your list. * @param int $limit * @param array $parameters * * @return CustomerCollection * @throws ApiException */ public function page(?string $from = null, ?int $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over customers retrieved from Mollie. * * @param string $from The first customer ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[t~#Endpoints/BalanceReportEndpoint.phpnu[client); } /** * Retrieve a balance report for the provided balance id and parameters. * * @param string $balanceId * @param array $parameters * @return \Mollie\Api\Resources\BalanceReport|\Mollie\Api\Resources\BaseResource * @throws \Mollie\Api\Exceptions\ApiException */ public function getForId(string $balanceId, array $parameters = []) { $this->parentId = $balanceId; $result = $this->client->performHttpCall( self::REST_READ, $this->getResourcePath() . $this->buildQueryString($parameters) ); return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } /** * Retrieve the primary balance. * This is the balance of your account’s primary currency, where all payments are settled to by default. * * @param array $parameters * @return \Mollie\Api\Resources\BalanceReport|\Mollie\Api\Resources\BaseResource * @throws \Mollie\Api\Exceptions\ApiException */ public function getForPrimary(array $parameters = []) { return $this->getForId("primary", $parameters); } /** * Retrieve a balance report for the provided balance resource and parameters. * * @param \Mollie\Api\Resources\Balance $balance * @param array $parameters * @return \Mollie\Api\Resources\BalanceReport|\Mollie\Api\Resources\BaseResource * @throws \Mollie\Api\Exceptions\ApiException */ public function getFor(Balance $balance, array $parameters = []) { return $this->getForId($balance->id, $parameters); } } PK"w[?Endpoints/RefundEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return RefundCollection */ protected function getResourceCollectionObject($count, $_links) { return new RefundCollection($this->client, $count, $_links); } /** * Retrieves a collection of Refunds from Mollie. * * @param string $from The first refund ID you want to include in your list. * @param int $limit * @param array $parameters * * @return RefundCollection * @throws ApiException */ public function page($from = null, $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over refunds retrieved from Mollie. * * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[ Endpoints/ChargebackEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return ChargebackCollection */ protected function getResourceCollectionObject($count, $_links) { return new ChargebackCollection($this->client, $count, $_links); } /** * Retrieves a collection of Chargebacks from Mollie. * * @param string $from The first chargeback ID you want to include in your list. * @param int $limit * @param array $parameters * * @return ChargebackCollection * @throws ApiException */ public function page(?string $from = null, ?int $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over chargeback retrieved from Mollie. * * @param string $from The first chargevback ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[9~&Endpoints/CustomerPaymentsEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return PaymentCollection */ protected function getResourceCollectionObject($count, $_links) { return new PaymentCollection($this->client, $count, $_links); } /** * Create a subscription for a Customer * * @param Customer $customer * @param array $options * @param array $filters * * @return Payment * @throws \Mollie\Api\Exceptions\ApiException */ public function createFor(Customer $customer, array $options = [], array $filters = []) { return $this->createForId($customer->id, $options, $filters); } /** * Create a subscription for a Customer ID * * @param string $customerId * @param array $options * @param array $filters * * @return \Mollie\Api\Resources\Payment * @throws \Mollie\Api\Exceptions\ApiException */ public function createForId($customerId, array $options = [], array $filters = []) { $this->parentId = $customerId; return parent::rest_create($options, $filters); } /** * @param Customer $customer * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * * @return PaymentCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function listFor(Customer $customer, ?string $from = null, ?int $limit = null, array $parameters = []) { return $this->listForId($customer->id, $from, $limit, $parameters); } /** * Create an iterator for iterating over payments for the given customer, retrieved from Mollie. * * @param Customer $customer * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorFor(Customer $customer, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->iteratorForId($customer->id, $from, $limit, $parameters, $iterateBackwards); } /** * @param string $customerId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * * @return \Mollie\Api\Resources\PaymentCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function listForId($customerId, ?string $from = null, ?int $limit = null, array $parameters = []) { $this->parentId = $customerId; return parent::rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over payments for the given customer id, retrieved from Mollie. * * @param string $customerId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $customerId, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $customerId; return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[/ #Endpoints/ProfileMethodEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return MethodCollection() */ protected function getResourceCollectionObject($count, $_links) { return new MethodCollection($count, $_links); } /** * Enable a method for the provided Profile ID. * * @param string $profileId * @param string $methodId * @param array $data * @return \Mollie\Api\Resources\Method * @throws \Mollie\Api\Exceptions\ApiException */ public function createForId($profileId, $methodId, array $data = []) { $this->parentId = $profileId; $resource = $this->getResourcePath() . '/' . urlencode($methodId); $body = null; if (count($data) > 0) { $body = json_encode($data); } $result = $this->client->performHttpCall(self::REST_CREATE, $resource, $body); return ResourceFactory::createFromApiResult($result, new Method($this->client)); } /** * Enable a method for the provided Profile object. * * @param Profile $profile * @param string $methodId * @param array $data * @return Method * @throws \Mollie\Api\Exceptions\ApiException */ public function createFor($profile, $methodId, array $data = []) { return $this->createForId($profile->id, $methodId, $data); } /** * Enable a method for the current profile. * * @param string $methodId * @param array $data * @return \Mollie\Api\Resources\Method * @throws \Mollie\Api\Exceptions\ApiException */ public function createForCurrentProfile($methodId, array $data = []) { return $this->createForId('me', $methodId, $data); } /** * Disable a method for the provided Profile ID. * * @param string $profileId * @param string $methodId * @param array $data * @return mixed * @throws \Mollie\Api\Exceptions\ApiException */ public function deleteForId($profileId, $methodId, array $data = []) { $this->parentId = $profileId; return $this->rest_delete($methodId, $data); } /** * Disable a method for the provided Profile object. * * @param Profile $profile * @param string $methodId * @param array $data * @throws \Mollie\Api\Exceptions\ApiException */ public function deleteFor($profile, $methodId, array $data = []) { return $this->deleteForId($profile->id, $methodId, $data); } /** * Disable a method for the current profile. * * @param string $methodId * @param array $data * @return \Mollie\Api\Resources\Method * @throws \Mollie\Api\Exceptions\ApiException */ public function deleteForCurrentProfile($methodId, array $data) { return $this->deleteForId('me', $methodId, $data); } } PK"w[a22Endpoints/WalletEndpoint.phpnu[parseRequestBody(array_merge([ 'domain' => $domain, 'validationUrl' => $validationUrl, ], $parameters)); $response = $this->client->performHttpCall( self::REST_CREATE, 'wallets/applepay/sessions', $body ); return json_encode($response); } } PK"w[;zKhEndpoints/MandateEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return MandateCollection */ protected function getResourceCollectionObject($count, $_links) { return new MandateCollection($this->client, $count, $_links); } /** * @param Customer $customer * @param array $options * @param array $filters * * @return \Mollie\Api\Resources\Mandate * @throws \Mollie\Api\Exceptions\ApiException */ public function createFor(Customer $customer, array $options = [], array $filters = []) { return $this->createForId($customer->id, $options, $filters); } /** * @param string $customerId * @param array $options * @param array $filters * * @return \Mollie\Api\Resources\Mandate * @throws \Mollie\Api\Exceptions\ApiException */ public function createForId($customerId, array $options = [], array $filters = []) { $this->parentId = $customerId; return parent::rest_create($options, $filters); } /** * @param Customer $customer * @param string $mandateId * @param array $parameters * * @return \Mollie\Api\Resources\Mandate * @throws \Mollie\Api\Exceptions\ApiException */ public function getFor(Customer $customer, $mandateId, array $parameters = []) { return $this->getForId($customer->id, $mandateId, $parameters); } /** * @param string $customerId * @param string $mandateId * @param array $parameters * * @return \Mollie\Api\Resources\Mandate * @throws \Mollie\Api\Exceptions\ApiException */ public function getForId($customerId, $mandateId, array $parameters = []) { $this->parentId = $customerId; return parent::rest_read($mandateId, $parameters); } /** * @param Customer $customer * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * * @return \Mollie\Api\Resources\MandateCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function listFor(Customer $customer, $from = null, $limit = null, array $parameters = []) { return $this->listForId($customer->id, $from, $limit, $parameters); } /** * Create an iterator for iterating over mandates for the given customer, retrieved from Mollie. * * @param Customer $customer * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorFor(Customer $customer, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->iteratorForId($customer->id, $from, $limit, $parameters, $iterateBackwards); } /** * @param string $customerId * @param null $from * @param null $limit * @param array $parameters * * @return \Mollie\Api\Resources\MandateCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function listForId($customerId, $from = null, $limit = null, array $parameters = []) { $this->parentId = $customerId; return parent::rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over mandates for the given customer id, retrieved from Mollie. * * @param string $customerId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $customerId, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $customerId; return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } /** * @param Customer $customer * @param string $mandateId * @param array $data * * @return null * @throws \Mollie\Api\Exceptions\ApiException */ public function revokeFor(Customer $customer, $mandateId, $data = []) { return $this->revokeForId($customer->id, $mandateId, $data); } /** * @param string $customerId * @param string $mandateId * @param array $data * * @return null * @throws \Mollie\Api\Exceptions\ApiException */ public function revokeForId($customerId, $mandateId, $data = []) { $this->parentId = $customerId; return parent::rest_delete($mandateId, $data); } } PK"w[u Endpoints/BalanceEndpoint.phpnu[client, $count, $_links); } /** * @inheritDoc */ protected function getResourceObject() { return new Balance($this->client); } /** * Retrieve a single balance from Mollie. * * Will throw an ApiException if the balance id is invalid or the resource cannot be found. * * @param string $balanceId * @param array $parameters * @return \Mollie\Api\Resources\Balance|\Mollie\Api\Resources\BaseResource * @throws ApiException */ public function get(string $balanceId, array $parameters = []) { if (empty($balanceId) || strpos($balanceId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid balance ID: '{$balanceId}'. A balance ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); } return parent::rest_read($balanceId, $parameters); } /** * Retrieve the primary balance from Mollie. * * Will throw an ApiException if the balance id is invalid or the resource cannot be found. * * @param array $parameters * @return \Mollie\Api\Resources\Balance|\Mollie\Api\Resources\BaseResource * @throws ApiException */ public function primary(array $parameters = []) { return parent::rest_read("primary", $parameters); } /** * Retrieves a collection of Balances from Mollie. * * @param string|null $from The first Balance ID you want to include in your list. * @param int|null $limit * @param array $parameters * * @return BaseCollection|BalanceCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function page(?string $from = null, ?int $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over balances retrieved from Mollie. * * @param string $from The first Balance ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[2*"Endpoints/OrganizationEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return OrganizationCollection */ protected function getResourceCollectionObject($count, $_links) { return new OrganizationCollection($this->client, $count, $_links); } /** * Retrieve an organization from Mollie. * * Will throw a ApiException if the organization id is invalid or the resource cannot be found. * * @param string $organizationId * @param array $parameters * @return Organization * @throws ApiException */ public function get($organizationId, array $parameters = []) { if (empty($organizationId)) { throw new ApiException("Organization ID is empty."); } return parent::rest_read($organizationId, $parameters); } /** * Retrieve the current organization from Mollie. * * @param array $parameters * @return Organization * @throws ApiException */ public function current(array $parameters = []) { return parent::rest_read('me', $parameters); } } PK"w[tXX$0 0 (Endpoints/CollectionEndpointAbstract.phpnu[ $from, "limit" => $limit], $filters); $apiPath = $this->getResourcePath() . $this->buildQueryString($filters); $result = $this->client->performHttpCall(self::REST_LIST, $apiPath); /** @var BaseCollection $collection */ $collection = $this->getResourceCollectionObject($result->count, $result->_links); foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) { $collection[] = ResourceFactory::createFromApiResult($dataResult, $this->getResourceObject()); } return $collection; } /** * Create a generator for iterating over a resource's collection using REST API calls. * * This function fetches paginated data from a RESTful resource endpoint and returns a generator * that allows you to iterate through the items in the collection one by one. It supports forward * and backward iteration, pagination, and filtering. * * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $filters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * @return LazyCollection */ protected function rest_iterator(?string $from = null, ?int $limit = null, array $filters = [], bool $iterateBackwards = false): LazyCollection { /** @var CursorCollection $page */ $page = $this->rest_list($from, $limit, $filters); return $page->getAutoIterator($iterateBackwards); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return BaseCollection */ abstract protected function getResourceCollectionObject($count, $_links); } PK"w[W^^"Endpoints/PaymentRouteEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return \Mollie\Api\Resources\RouteCollection */ protected function getResourceCollectionObject($count, $_links) { return new RouteCollection($this->client, $count, $_links); } /** * @param Payment $payment * @param string $routeId * @param string $releaseDate - UTC datetime in ISO-8601 format when the funds for the following payment will become available on * the balance of the connected account * * @return Route * @throws \Mollie\Api\Exceptions\ApiException */ public function updateReleaseDateFor(Payment $payment, $routeId, $releaseDate) { return $this->updateReleaseDateForPaymentId($payment->id, $routeId, $releaseDate); } /** * @param string $paymentId * @param string $routeId * @param string $releaseDate - UTC datetime in ISO-8601 format when the funds for the following payment will become available on * the balance of the connected account * * @return \Mollie\Api\Resources\Route * @throws \Mollie\Api\Exceptions\ApiException */ public function updateReleaseDateForPaymentId($paymentId, $routeId, $releaseDate, $testmode = false) { $this->parentId = $paymentId; $params = [ 'releaseDate' => $releaseDate, 'testmode' => $testmode, ]; return parent::rest_update($routeId, $params); } } PK"w[ok k Endpoints/OnboardingEndpoint.phpnu[client); } /** * Retrieve the organization's onboarding status from Mollie. * * Will throw a ApiException if the resource cannot be found. * * @return Onboarding * @throws ApiException */ public function get() { return $this->rest_read('', []); } /** * Submit data that will be prefilled in the merchant’s onboarding. * Please note that the data you submit will only be processed when the onboarding status is needs-data. * * Information that the merchant has entered in their dashboard will not be overwritten. * * Will throw a ApiException if the resource cannot be found. * * @throws ApiException */ public function submit(array $parameters = []) { return $this->rest_create($parameters, []); } /** * @param string $id * @param array $filters * * @return mixed * @throws \Mollie\Api\Exceptions\ApiException */ protected function rest_read($id, array $filters) { $result = $this->client->performHttpCall( self::REST_READ, $this->getResourcePath() . $this->buildQueryString($filters) ); return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } /** * @param array $body * @param array $filters * * @return mixed * @throws \Mollie\Api\Exceptions\ApiException */ protected function rest_create(array $body, array $filters) { $this->client->performHttpCall( self::REST_CREATE, $this->getResourcePath() . $this->buildQueryString($filters), $this->parseRequestBody($body) ); } } PK"w[i&Endpoints/SettlementRefundEndpoint.phpnu[client, $count, $_links); } /** * @inheritDoc */ protected function getResourceObject() { return new Refund($this->client); } /** * Retrieves a collection of Settlement Refunds from Mollie. * * @param string $settlementId * @param string|null $from The first refund ID you want to include in your list. * @param int|null $limit * @param array $parameters * * @return mixed * @throws \Mollie\Api\Exceptions\ApiException */ public function pageForId(string $settlementId, string $from = null, int $limit = null, array $parameters = []) { $this->parentId = $settlementId; return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over refunds for the given settlement id, retrieved from Mollie. * * @param string $settlementId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $settlementId, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $settlementId; return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[Endpoints/OrderEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API * endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return OrderCollection */ protected function getResourceCollectionObject($count, $_links) { return new OrderCollection($this->client, $count, $_links); } /** * Creates a order in Mollie. * * @param array $data An array containing details on the order. * @param array $filters * * @return Order * @throws ApiException */ public function create(array $data = [], array $filters = []) { return $this->rest_create($data, $filters); } /** * Update a specific Order resource * * Will throw a ApiException if the order id is invalid or the resource cannot be found. * * @param string $orderId * * @param array $data * @return Order * @throws ApiException */ public function update($orderId, array $data = []) { if (empty($orderId) || strpos($orderId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid order ID: '{$orderId}'. An order ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); } return parent::rest_update($orderId, $data); } /** * Retrieve a single order from Mollie. * * Will throw a ApiException if the order id is invalid or the resource cannot * be found. * * @param array $parameters * @return Order * @throws ApiException */ public function get($orderId, array $parameters = []) { if (empty($orderId) || strpos($orderId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid order ID: '{$orderId}'. An order ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); } return parent::rest_read($orderId, $parameters); } /** * Cancel the given Order. * * If the order was partially shipped, the status will be "completed" instead of * "canceled". * Will throw a ApiException if the order id is invalid or the resource cannot * be found. * Returns the canceled order with HTTP status 200. * * @param string $orderId * * @param array $parameters * @return Order * @throws \Mollie\Api\Exceptions\ApiException */ public function cancel($orderId, $parameters = []) { return $this->rest_delete($orderId, $parameters); } /** * Retrieves a collection of Orders from Mollie. * * @param string $from The first order ID you want to include in your list. * @param int $limit * @param array $parameters * * @return OrderCollection * @throws ApiException */ public function page(?string $from = null, ?int $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over orders retrieved from Mollie. * * @param string $from The first order ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[äHH Endpoints/PermissionEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API * endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return PermissionCollection */ protected function getResourceCollectionObject($count, $_links) { return new PermissionCollection($count, $_links); } /** * Retrieve a single Permission from Mollie. * * Will throw an ApiException if the permission id is invalid. * * @param string $permissionId * @param array $parameters * @return Permission * @throws ApiException */ public function get($permissionId, array $parameters = []) { return $this->rest_read($permissionId, $parameters); } /** * Retrieve all permissions. * * @param array $parameters * * @return PermissionCollection * @throws ApiException */ public function all(array $parameters = []) { return parent::rest_list(null, null, $parameters); } } PK"w[Lʠ Endpoints/InvoiceEndpoint.phpnu[client); } /** * Get the collection object that is used by this API. Every API uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return \Mollie\Api\Resources\BaseCollection */ protected function getResourceCollectionObject($count, $_links) { return new InvoiceCollection($this->client, $count, $_links); } /** * Retrieve an Invoice from Mollie. * * Will throw a ApiException if the invoice id is invalid or the resource cannot be found. * * @param string $invoiceId * @param array $parameters * * @return Invoice * @throws ApiException */ public function get($invoiceId, array $parameters = []) { return $this->rest_read($invoiceId, $parameters); } /** * Retrieves a collection of Invoices from Mollie. * * @param string $from The first invoice ID you want to include in your list. * @param int $limit * @param array $parameters * * @return InvoiceCollection * @throws ApiException */ public function page($from = null, $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * This is a wrapper method for page * * @param array $parameters * * @return \Mollie\Api\Resources\BaseCollection * @throws ApiException */ public function all(array $parameters = []) { return $this->page(null, null, $parameters); } /** * Create an iterator for iterating over invoices retrieved from Mollie. * * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[x Endpoints/TerminalEndpoint.phpnu[client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return TerminalCollection */ protected function getResourceCollectionObject($count, $_links) { return new TerminalCollection($this->client, $count, $_links); } /** * Retrieve terminal from Mollie. * * Will throw a ApiException if the terminal id is invalid or the resource cannot be found. * * @param string $terminalId * @param array $parameters * @return Terminal * @throws ApiException */ public function get($terminalId, array $parameters = []) { if (empty($terminalId) || strpos($terminalId, self::RESOURCE_ID_PREFIX) !== 0) { throw new ApiException("Invalid terminal ID: '{$terminalId}'. A terminal ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); } return parent::rest_read($terminalId, $parameters); } /** * Retrieves a collection of Terminals from Mollie for the current organization / profile, ordered from newest to oldest. * * @param string $from The first terminal ID you want to include in your list. * @param int $limit * @param array $parameters * * @return TerminalCollection * @throws ApiException */ public function page($from = null, $limit = null, array $parameters = []) { return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over terminals retrieved from Mollie. * * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iterator(?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w['Endpoints/SettlementCaptureEndpoint.phpnu[client); } protected function getResourceCollectionObject($count, $_links) { return new CaptureCollection($this->client, $count, $_links); } /** * Retrieves a collection of Settlement Captures from Mollie. * * @param string $settlementId * @param string|null $from The first capture ID you want to include in your list. * @param int|null $limit * @param array $parameters * * @return mixed * @throws \Mollie\Api\Exceptions\ApiException */ public function pageForId(string $settlementId, string $from = null, int $limit = null, array $parameters = []) { $this->parentId = $settlementId; return $this->rest_list($from, $limit, $parameters); } /** * Create an iterator for iterating over captures for the given settlement id, retrieved from Mollie. * * @param string $settlementId * @param string $from The first resource ID you want to include in your list. * @param int $limit * @param array $parameters * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). * * @return LazyCollection */ public function iteratorForId(string $settlementId, ?string $from = null, ?int $limit = null, array $parameters = [], bool $iterateBackwards = false): LazyCollection { $this->parentId = $settlementId; return $this->rest_iterator($from, $limit, $parameters, $iterateBackwards); } } PK"w[,,%HttpAdapter/CurlMollieHttpAdapter.phpnu[attemptRequest($httpMethod, $url, $headers, $httpBody); } catch (CurlConnectTimeoutException $e) { // Nothing } } throw new CurlConnectTimeoutException( "Unable to connect to Mollie. Maximum number of retries (". self::MAX_RETRIES .") reached." ); } /** * @param string $httpMethod * @param string $url * @param array $headers * @param string $httpBody * @return \stdClass|void|null * @throws \Mollie\Api\Exceptions\ApiException */ protected function attemptRequest($httpMethod, $url, $headers, $httpBody) { $curl = curl_init($url); $headers["Content-Type"] = "application/json"; curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HTTPHEADER, $this->parseHeaders($headers)); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, self::DEFAULT_CONNECT_TIMEOUT); curl_setopt($curl, CURLOPT_TIMEOUT, self::DEFAULT_TIMEOUT); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($curl, CURLOPT_CAINFO, CaBundle::getBundledCaBundlePath()); switch ($httpMethod) { case MollieApiClient::HTTP_POST: curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $httpBody); break; case MollieApiClient::HTTP_GET: break; case MollieApiClient::HTTP_PATCH: curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PATCH'); curl_setopt($curl, CURLOPT_POSTFIELDS, $httpBody); break; case MollieApiClient::HTTP_DELETE: curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE'); curl_setopt($curl, CURLOPT_POSTFIELDS, $httpBody); break; default: throw new \InvalidArgumentException("Invalid http method: ". $httpMethod); } $startTime = microtime(true); $response = curl_exec($curl); $endTime = microtime(true); if ($response === false) { $executionTime = $endTime - $startTime; $curlErrorNumber = curl_errno($curl); $curlErrorMessage = "Curl error: " . curl_error($curl); if ($this->isConnectTimeoutError($curlErrorNumber, $executionTime)) { throw new CurlConnectTimeoutException("Unable to connect to Mollie. " . $curlErrorMessage); } throw new ApiException($curlErrorMessage); } $statusCode = curl_getinfo($curl, CURLINFO_RESPONSE_CODE); curl_close($curl); return $this->parseResponseBody($response, $statusCode, $httpBody); } /** * The version number for the underlying http client, if available. * @example Guzzle/6.3 * * @return string|null */ public function versionString() { return 'Curl/*'; } /** * Whether this http adapter provides a debugging mode. If debugging mode is enabled, the * request will be included in the ApiException. * * @return false */ public function supportsDebugging() { return false; } /** * @param int $curlErrorNumber * @param string|float $executionTime * @return bool */ protected function isConnectTimeoutError($curlErrorNumber, $executionTime) { $connectErrors = [ \CURLE_COULDNT_RESOLVE_HOST => true, \CURLE_COULDNT_CONNECT => true, \CURLE_SSL_CONNECT_ERROR => true, \CURLE_GOT_NOTHING => true, ]; if (isset($connectErrors[$curlErrorNumber])) { return true; }; if ($curlErrorNumber === \CURLE_OPERATION_TIMEOUTED) { if ($executionTime > self::DEFAULT_TIMEOUT) { return false; } return true; } return false; } /** * @param string $response * @param int $statusCode * @param string $httpBody * @return \stdClass|null * @throws \Mollie\Api\Exceptions\ApiException */ protected function parseResponseBody($response, $statusCode, $httpBody) { if (empty($response)) { if ($statusCode === self::HTTP_NO_CONTENT) { return null; } throw new ApiException("No response body found."); } $body = @json_decode($response); // GUARDS if (json_last_error() !== JSON_ERROR_NONE) { throw new ApiException("Unable to decode Mollie response: '{$response}'."); } if (isset($body->error)) { throw new ApiException($body->error->message); } if ($statusCode >= 400) { $message = "Error executing API call ({$body->status}: {$body->title}): {$body->detail}"; $field = null; if (! empty($body->field)) { $field = $body->field; } if (isset($body->_links, $body->_links->documentation)) { $message .= ". Documentation: {$body->_links->documentation->href}"; } if ($httpBody) { $message .= ". Request body: {$httpBody}"; } throw new ApiException($message, $statusCode, $field); } return $body; } protected function parseHeaders($headers) { $result = []; foreach ($headers as $key => $value) { $result[] = $key .': ' . $value; } return $result; } } PK"w[r <<,HttpAdapter/Guzzle6And7MollieHttpAdapter.phpnu[httpClient = $httpClient; } /** * Instantiate a default adapter with sane configuration for Guzzle 6 or 7. * * @return static */ public static function createDefault() { $retryMiddlewareFactory = new Guzzle6And7RetryMiddlewareFactory; $handlerStack = HandlerStack::create(); $handlerStack->push($retryMiddlewareFactory->retry()); $client = new Client([ GuzzleRequestOptions::VERIFY => CaBundle::getBundledCaBundlePath(), GuzzleRequestOptions::TIMEOUT => self::DEFAULT_TIMEOUT, GuzzleRequestOptions::CONNECT_TIMEOUT => self::DEFAULT_CONNECT_TIMEOUT, 'handler' => $handlerStack, ]); return new Guzzle6And7MollieHttpAdapter($client); } /** * Send a request to the specified Mollie api url. * * @param string $httpMethod * @param string $url * @param array $headers * @param string $httpBody * @return \stdClass|null * @throws \Mollie\Api\Exceptions\ApiException */ public function send($httpMethod, $url, $headers, $httpBody) { $request = new Request($httpMethod, $url, $headers, $httpBody); try { $response = $this->httpClient->send($request, ['http_errors' => false]); } catch (GuzzleException $e) { // Prevent sensitive request data from ending up in exception logs unintended if (! $this->debugging) { $request = null; } // Not all Guzzle Exceptions implement hasResponse() / getResponse() if (method_exists($e, 'hasResponse') && method_exists($e, 'getResponse')) { if ($e->hasResponse()) { throw ApiException::createFromResponse($e->getResponse(), $request); } } throw new ApiException($e->getMessage(), $e->getCode(), null, $request, null); } return $this->parseResponseBody($response); } /** * Whether this http adapter provides a debugging mode. If debugging mode is enabled, the * request will be included in the ApiException. * * @return true */ public function supportsDebugging() { return true; } /** * Whether debugging is enabled. If debugging mode is enabled, the request will * be included in the ApiException. By default, debugging is disabled to prevent * sensitive request data from leaking into exception logs. * * @return bool */ public function debugging() { return $this->debugging; } /** * Enable debugging. If debugging mode is enabled, the request will * be included in the ApiException. By default, debugging is disabled to prevent * sensitive request data from leaking into exception logs. */ public function enableDebugging() { $this->debugging = true; } /** * Disable debugging. If debugging mode is enabled, the request will * be included in the ApiException. By default, debugging is disabled to prevent * sensitive request data from leaking into exception logs. */ public function disableDebugging() { $this->debugging = false; } /** * Parse the PSR-7 Response body * * @param ResponseInterface $response * @return \stdClass|null * @throws ApiException */ private function parseResponseBody(ResponseInterface $response) { $body = (string) $response->getBody(); if (empty($body)) { if ($response->getStatusCode() === self::HTTP_NO_CONTENT) { return null; } throw new ApiException("No response body found."); } $object = @json_decode($body); if (json_last_error() !== JSON_ERROR_NONE) { throw new ApiException("Unable to decode Mollie response: '{$body}'."); } if ($response->getStatusCode() >= 400) { throw ApiException::createFromResponse($response, null); } return $object; } /** * The version number for the underlying http client, if available. This is used to report the UserAgent to Mollie, * for convenient support. * @example Guzzle/6.3 * * @return string|null */ public function versionString() { if (defined('\GuzzleHttp\ClientInterface::MAJOR_VERSION')) { // Guzzle 7 return "Guzzle/" . ClientInterface::MAJOR_VERSION; } elseif (defined('\GuzzleHttp\ClientInterface::VERSION')) { // Before Guzzle 7 return "Guzzle/" . ClientInterface::VERSION; } return null; } } PK"w[ cQQ'HttpAdapter/MollieHttpAdapterPicker.phpnu[guzzleIsDetected()) { $guzzleVersion = $this->guzzleMajorVersionNumber(); if ($guzzleVersion && in_array($guzzleVersion, [6, 7])) { return Guzzle6And7MollieHttpAdapter::createDefault(); } } return new CurlMollieHttpAdapter; } if ($httpClient instanceof MollieHttpAdapterInterface) { return $httpClient; } if ($httpClient instanceof \GuzzleHttp\ClientInterface) { return new Guzzle6And7MollieHttpAdapter($httpClient); } throw new UnrecognizedClientException('The provided http client or adapter was not recognized.'); } /** * @return bool */ private function guzzleIsDetected() { return interface_exists('\\' . \GuzzleHttp\ClientInterface::class); } /** * @return int|null */ private function guzzleMajorVersionNumber() { // Guzzle 7 if (defined('\GuzzleHttp\ClientInterface::MAJOR_VERSION')) { return (int) \GuzzleHttp\ClientInterface::MAJOR_VERSION; } // Before Guzzle 7 if (defined('\GuzzleHttp\ClientInterface::VERSION')) { return (int) \GuzzleHttp\ClientInterface::VERSION[0]; } return null; } } PK"w[ۡMM0HttpAdapter/MollieHttpAdapterPickerInterface.phpnu[newRetryDecider(), $delay ? $this->getRetryDelay() : $this->getZeroRetryDelay() ); } /** * Returns a method that takes the number of retries and returns the number of milliseconds * to wait * * @return callable */ private function getRetryDelay() { return function ($numberOfRetries) { return static::DELAY_INCREASE_MS * $numberOfRetries; }; } /** * Returns a method that returns zero milliseconds to wait * * @return callable */ private function getZeroRetryDelay() { return function ($numberOfRetries) { return 0; }; } /** * @return callable */ private function newRetryDecider() { return function ( $retries, Request $request, Response $response = null, TransferException $exception = null ) { if ($retries >= static::MAX_RETRIES) { return false; } if ($exception instanceof ConnectException) { return true; } return false; }; } } PK"w[>Twmm*HttpAdapter/MollieHttpAdapterInterface.phpnu[length = $length; } /** * @throws \Mollie\Api\Exceptions\IncompatiblePlatform * @return string */ public function generate() { $length = $this->length; $string = ''; while (($len = strlen($string)) < $length) { $size = $length - $len; try { $bytes = random_bytes($size); } catch (\Exception $e) { throw new IncompatiblePlatform( 'PHP function random_bytes missing. Consider overriding the DefaultIdempotencyKeyGenerator with your own.', IncompatiblePlatform::INCOMPATIBLE_RANDOM_BYTES_FUNCTION ); } $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size); } return $string; } } PK"w[:Vww/Idempotency/IdempotencyKeyGeneratorContract.phpnu[fakeKey = $fakeKey; } public function generate() { return $this->fakeKey; } } PKw[~x  PurifierServiceProvider.phpnu[app instanceof LaravelApplication) { $this->publishes([$this->getConfigSource() => config_path('purifier.php')]); } elseif ($this->app instanceof LumenApplication) { $this->app->configure('purifier'); } } /** * Get the config source. * * @return string */ protected function getConfigSource() { return realpath(__DIR__.'/../config/purifier.php'); } /** * Register the service provider. * * @return void */ public function register() { $this->mergeConfigFrom($this->getConfigSource(), 'purifier'); $this->app->singleton('purifier', function (Container $app) { return new Purifier($app['files'], $app['config']); }); $this->app->alias('purifier', Purifier::class); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return ['purifier']; } } PKw[ yIIFacades/Purifier.phpnu[config); } } PKw[4#<Casts/CleanHtmlOutput.phpnu[config); } /** * Prepare the given value for storage. Does not clean the HTML. * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @param array $value * @param array $attributes * @return string */ public function set($model, $key, $value, $attributes) { return $value; } } PKw[fCasts/WithConfig.phpnu[config = $config; } } PKw["ECasts/CleanHtml.phpnu[config); } /** * Prepare the given value for storage by cleaning the HTML. * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @param array $value * @param array $attributes * @return string */ public function set($model, $key, $value, $attributes) { return clean($value, $this->config); } } PKw[k'"'" Purifier.phpnu[files = $files; $this->config = $config; $this->setUp(); } /** * Setup * * @throws Exception */ private function setUp() { if (!$this->config->has('purifier')) { throw new Exception('Configuration parameters not loaded!'); } $this->checkCacheDirectory(); // Create a new configuration object $config = $this->getConfig(); // Create HTMLPurifier object $this->purifier = new HTMLPurifier($config); } /** * Add a custom definition * * @see http://htmlpurifier.org/docs/enduser-customize.html * @param array $definitionConfig * @param HTMLPurifier_Config $configObject Defaults to using default config * * @return HTMLPurifier_Config $configObject */ private function addCustomDefinition(array $definitionConfig, HTMLPurifier_Config $configObject = null) { if (!$configObject) { $configObject = HTMLPurifier_Config::createDefault(); $configObject->loadArray($this->getConfig()); } // Setup the custom definition $configObject->set('HTML.DefinitionID', $definitionConfig['id']); $configObject->set('HTML.DefinitionRev', $definitionConfig['rev']); // Enable debug mode if (!isset($definitionConfig['debug']) || $definitionConfig['debug']) { $configObject->set('Cache.DefinitionImpl', null); } // Start configuring the definition if ($def = $configObject->maybeGetRawHTMLDefinition()) { // Create the definition attributes if (!empty($definitionConfig['attributes'])) { $this->addCustomAttributes($definitionConfig['attributes'], $def); } // Create the definition elements if (!empty($definitionConfig['elements'])) { $this->addCustomElements($definitionConfig['elements'], $def); } } return $configObject; } /** * Add provided attributes to the provided definition * * @param array $attributes * @param HTMLPurifier_HTMLDefinition $definition * * @return HTMLPurifier_HTMLDefinition $definition */ private function addCustomAttributes(array $attributes, HTMLPurifier_HTMLDefinition $definition) { foreach ($attributes as $attribute) { // Get configuration of attribute $required = !empty($attribute[3]) ? true : false; $onElement = $attribute[0]; $attrName = $required ? $attribute[1] . '*' : $attribute[1]; $validValues = $attribute[2]; if ($onElement === '*') { $def = $validValues; if (is_string($validValues)) { $def = new $validValues(); } if ($def instanceof \HTMLPurifier_AttrDef) { $definition->info_global_attr[$attrName] = $def; } continue; } if (class_exists($validValues)) { $validValues = new $validValues(); } $definition->addAttribute($onElement, $attrName, $validValues); } return $definition; } /** * Add provided elements to the provided definition * * @param array $elements * @param HTMLPurifier_HTMLDefinition $definition * * @return HTMLPurifier_HTMLDefinition $definition */ private function addCustomElements(array $elements, HTMLPurifier_HTMLDefinition $definition) { foreach ($elements as $element) { // Get configuration of element $name = $element[0]; $contentSet = $element[1]; $allowedChildren = $element[2]; $attributeCollection = $element[3]; $attributes = isset($element[4]) ? $element[4] : null; if (!empty($attributes)) { $definition->addElement($name, $contentSet, $allowedChildren, $attributeCollection, $attributes); } else { $definition->addElement($name, $contentSet, $allowedChildren, $attributeCollection); } } } /** * Check/Create cache directory */ private function checkCacheDirectory() { $cachePath = $this->config->get('purifier.cachePath'); if ($cachePath) { if (!$this->files->isDirectory($cachePath)) { $this->files->makeDirectory($cachePath, $this->config->get('purifier.cacheFileMode', 0755),true); } } } /** * @param null $config * * @return mixed|null */ protected function getConfig($config = null) { // Create a new configuration object $configObject = HTMLPurifier_Config::createDefault(); // Allow configuration to be modified if (! $this->config->get('purifier.finalize')) { $configObject->autoFinalize = false; } // Set default config $defaultConfig = []; $defaultConfig['Core.Encoding'] = $this->config->get('purifier.encoding'); $defaultConfig['Cache.SerializerPath'] = $this->config->get('purifier.cachePath'); $defaultConfig['Cache.SerializerPermissions'] = $this->config->get('purifier.cacheFileMode', 0755); if (! $config) { $config = $this->config->get('purifier.settings.default'); } elseif (is_string($config)) { $config = $this->config->get('purifier.settings.' . $config); } if (! is_array($config)) { $config = []; } // Merge configurations $config = $defaultConfig + $config; // Load to Purifier config $configObject->loadArray($config); // Load custom definition if set if ($definitionConfig = $this->config->get('purifier.settings.custom_definition')) { $this->addCustomDefinition($definitionConfig, $configObject); } // Load custom elements if set if ($elements = $this->config->get('purifier.settings.custom_elements')) { if ($def = $configObject->maybeGetRawHTMLDefinition()) { $this->addCustomElements($elements, $def); } } // Load custom attributes if set if ($attributes = $this->config->get('purifier.settings.custom_attributes')) { if ($def = $configObject->maybeGetRawHTMLDefinition()) { $this->addCustomAttributes($attributes, $def); } } return $configObject; } /** * @param $dirty * @param null $config * @param \Closure|null $postCreateConfigHook * @return mixed */ public function clean($dirty, $config = null, \Closure $postCreateConfigHook = null) { if (is_array($dirty)) { return array_map(function ($item) use ($config) { return $this->clean($item, $config); }, $dirty); } $configObject = null; if ($config !== null) { $configObject = $this->getConfig($config); if ($postCreateConfigHook !== null) { $postCreateConfigHook->call($this, $configObject); } } //If $dirty is not an explicit string, bypass purification assuming configuration allows this $ignoreNonStrings = $this->config->get('purifier.ignoreNonStrings', false); $stringTest = is_string($dirty); if($stringTest === false && $ignoreNonStrings === true) { return $dirty; } return $this->purifier->purify($dirty, $configObject); } /** * Get HTMLPurifier instance. * * @return \HTMLPurifier */ public function getInstance() { return $this->purifier; } } PK̺w[Egvoku/helper/ASCII.phpnu[>|null */ private static $ASCII_MAPS; /** * @var array>|null */ private static $ASCII_MAPS_AND_EXTRAS; /** * @var array>|null */ private static $ASCII_EXTRAS; /** * @var array|null */ private static $ORD; /** * @var array|null */ private static $LANGUAGE_MAX_KEY; /** * url: https://en.wikipedia.org/wiki/Wikipedia:ASCII#ASCII_printable_characters * * @var string */ private static $REGEX_ASCII = "[^\x09\x10\x13\x0A\x0D\x20-\x7E]"; /** * bidirectional text chars * * url: https://www.w3.org/International/questions/qa-bidi-unicode-controls * * @var array */ private static $BIDI_UNI_CODE_CONTROLS_TABLE = [ // LEFT-TO-RIGHT EMBEDDING (use -> dir = "ltr") 8234 => "\xE2\x80\xAA", // RIGHT-TO-LEFT EMBEDDING (use -> dir = "rtl") 8235 => "\xE2\x80\xAB", // POP DIRECTIONAL FORMATTING // (use -> ) 8236 => "\xE2\x80\xAC", // LEFT-TO-RIGHT OVERRIDE // (use -> ) 8237 => "\xE2\x80\xAD", // RIGHT-TO-LEFT OVERRIDE // (use -> ) 8238 => "\xE2\x80\xAE", // LEFT-TO-RIGHT ISOLATE // (use -> dir = "ltr") 8294 => "\xE2\x81\xA6", // RIGHT-TO-LEFT ISOLATE // (use -> dir = "rtl") 8295 => "\xE2\x81\xA7", // FIRST STRONG ISOLATE // (use -> dir = "auto") 8296 => "\xE2\x81\xA8", // POP DIRECTIONAL ISOLATE 8297 => "\xE2\x81\xA9", ]; /** * Get all languages from the constants "ASCII::.*LANGUAGE_CODE". * * @return string[] * * @phpstan-return array */ public static function getAllLanguages(): array { // init static $LANGUAGES = []; if ($LANGUAGES !== []) { return $LANGUAGES; } foreach ((new \ReflectionClass(__CLASS__))->getConstants() as $constant => $lang) { if (\strpos($constant, 'EXTRA') !== false) { $LANGUAGES[\strtolower($constant)] = $lang; } else { $LANGUAGES[\strtolower(\str_replace('_LANGUAGE_CODE', '', $constant))] = $lang; } } return $LANGUAGES; } /** * Returns an replacement array for ASCII methods. * * EXAMPLE: * $array = ASCII::charsArray(); * var_dump($array['ru']['б']); // 'b' * * * @psalm-suppress InvalidNullableReturnType - we use the prepare* methods here, so we don't get NULL here * * @param bool $replace_extra_symbols [optional]

      Add some more replacements e.g. "£" with " pound ".

      * * @psalm-pure * * @return array * * @phpstan-return array> */ public static function charsArray(bool $replace_extra_symbols = false): array { if ($replace_extra_symbols) { self::prepareAsciiAndExtrasMaps(); return self::$ASCII_MAPS_AND_EXTRAS ?? []; } self::prepareAsciiMaps(); return self::$ASCII_MAPS ?? []; } /** * Returns an replacement array for ASCII methods with a mix of multiple languages. * * EXAMPLE: * $array = ASCII::charsArrayWithMultiLanguageValues(); * var_dump($array['b']); // ['β', 'б', 'ဗ', 'ბ', 'ب'] * * * @param bool $replace_extra_symbols [optional]

      Add some more replacements e.g. "£" with " pound ".

      * * @psalm-pure * * @return array *

      An array of replacements.

      * * @phpstan-return array> */ public static function charsArrayWithMultiLanguageValues(bool $replace_extra_symbols = false): array { /** @var array>> */ static $CHARS_ARRAY = []; $cacheKey = '' . $replace_extra_symbols; if (isset($CHARS_ARRAY[$cacheKey])) { return $CHARS_ARRAY[$cacheKey]; } // init $return = []; $language_all_chars = self::charsArrayWithSingleLanguageValues( $replace_extra_symbols, false ); /** @noinspection PhpSillyAssignmentInspection - hack for phpstan */ /** @var array $language_all_chars */ $language_all_chars = $language_all_chars; /** @noinspection AlterInForeachInspection */ foreach ($language_all_chars as $key => &$value) { $return[$value][] = $key; } $CHARS_ARRAY[$cacheKey] = $return; /** @var array> $return - hack for phpstan */ return $return; } /** * Returns an replacement array for ASCII methods with one language. * * For example, German will map 'ä' to 'ae', while other languages * will simply return e.g. 'a'. * * EXAMPLE: * $array = ASCII::charsArrayWithOneLanguage('ru'); * $tmpKey = \array_search('yo', $array['replace']); * echo $array['orig'][$tmpKey]; // 'ё' * * * @psalm-suppress InvalidNullableReturnType - we use the prepare* methods here, so we don't get NULL here * * @param string $language [optional]

      Language of the source string e.g.: en, de_at, or de-ch. * (default is 'en') | ASCII::*_LANGUAGE_CODE

      * @param bool $replace_extra_symbols [optional]

      Add some more replacements e.g. "£" with " pound ".

      * @param bool $asOrigReplaceArray [optional]

      TRUE === return {orig: string[], replace: string[]} * array

      * * @psalm-pure * * @return array *

      An array of replacements.

      * * @phpstan-param ASCII::*_LANGUAGE_CODE $language * @phpstan-return array{orig: string[], replace: string[]}|array */ public static function charsArrayWithOneLanguage( string $language = self::ENGLISH_LANGUAGE_CODE, bool $replace_extra_symbols = false, bool $asOrigReplaceArray = true ): array { $language = self::get_language($language); // init /** @var array|array{orig: string[], replace: string[]}>> */ static $CHARS_ARRAY = []; $cacheKey = '' . $replace_extra_symbols . '-' . $asOrigReplaceArray; // check static cache if (isset($CHARS_ARRAY[$cacheKey][$language])) { return $CHARS_ARRAY[$cacheKey][$language]; } if ($replace_extra_symbols) { self::prepareAsciiAndExtrasMaps(); /** @noinspection DuplicatedCode */ if (isset(self::$ASCII_MAPS_AND_EXTRAS[$language])) { $tmpArray = self::$ASCII_MAPS_AND_EXTRAS[$language]; if ($asOrigReplaceArray) { $CHARS_ARRAY[$cacheKey][$language] = [ 'orig' => \array_keys($tmpArray), 'replace' => \array_values($tmpArray), ]; } else { $CHARS_ARRAY[$cacheKey][$language] = $tmpArray; } } else { /** @noinspection NestedPositiveIfStatementsInspection */ if ($asOrigReplaceArray) { $CHARS_ARRAY[$cacheKey][$language] = [ 'orig' => [], 'replace' => [], ]; } else { $CHARS_ARRAY[$cacheKey][$language] = []; } } } else { self::prepareAsciiMaps(); /** @noinspection DuplicatedCode */ if (isset(self::$ASCII_MAPS[$language])) { $tmpArray = self::$ASCII_MAPS[$language]; if ($asOrigReplaceArray) { $CHARS_ARRAY[$cacheKey][$language] = [ 'orig' => \array_keys($tmpArray), 'replace' => \array_values($tmpArray), ]; } else { $CHARS_ARRAY[$cacheKey][$language] = $tmpArray; } } else { /** @noinspection NestedPositiveIfStatementsInspection */ if ($asOrigReplaceArray) { $CHARS_ARRAY[$cacheKey][$language] = [ 'orig' => [], 'replace' => [], ]; } else { $CHARS_ARRAY[$cacheKey][$language] = []; } } } return $CHARS_ARRAY[$cacheKey][$language] ?? ['orig' => [], 'replace' => []]; } /** * Returns an replacement array for ASCII methods with multiple languages. * * EXAMPLE: * $array = ASCII::charsArrayWithSingleLanguageValues(); * $tmpKey = \array_search('hnaik', $array['replace']); * echo $array['orig'][$tmpKey]; // '၌' * * * @param bool $replace_extra_symbols [optional]

      Add some more replacements e.g. "£" with " pound ".

      * @param bool $asOrigReplaceArray [optional]

      TRUE === return {orig: string[], replace: string[]} * array

      * * @psalm-pure * * @return array *

      An array of replacements.

      * * @phpstan-return array{orig: string[], replace: string[]}|array */ public static function charsArrayWithSingleLanguageValues( bool $replace_extra_symbols = false, bool $asOrigReplaceArray = true ): array { // init /** @var array|array{orig: string[], replace: string[]}> */ static $CHARS_ARRAY = []; $cacheKey = '' . $replace_extra_symbols . '-' . $asOrigReplaceArray; if (isset($CHARS_ARRAY[$cacheKey])) { return $CHARS_ARRAY[$cacheKey]; } if ($replace_extra_symbols) { self::prepareAsciiAndExtrasMaps(); /** @noinspection AlterInForeachInspection */ /** @psalm-suppress PossiblyNullIterator - we use the prepare* methods here, so we don't get NULL here */ foreach (self::$ASCII_MAPS_AND_EXTRAS ?? [] as &$map) { $CHARS_ARRAY[$cacheKey][] = $map; } } else { self::prepareAsciiMaps(); /** @noinspection AlterInForeachInspection */ /** @psalm-suppress PossiblyNullIterator - we use the prepare* methods here, so we don't get NULL here */ foreach (self::$ASCII_MAPS ?? [] as &$map) { $CHARS_ARRAY[$cacheKey][] = $map; } } /** @phpstan-ignore-next-line - ... error? */ $CHARS_ARRAY[$cacheKey] = \array_merge([], ...$CHARS_ARRAY[$cacheKey]); if ($asOrigReplaceArray) { $CHARS_ARRAY[$cacheKey] = [ 'orig' => \array_keys($CHARS_ARRAY[$cacheKey]), 'replace' => \array_values($CHARS_ARRAY[$cacheKey]), ]; } return $CHARS_ARRAY[$cacheKey]; } /** * Accepts a string and removes all non-UTF-8 characters from it + extras if needed. * * @param string $str

      The string to be sanitized.

      * @param bool $normalize_whitespace [optional]

      Set to true, if you need to normalize the * whitespace.

      * @param bool $normalize_msword [optional]

      Set to true, if you need to normalize MS Word chars * e.g.: "…" * => "..."

      * @param bool $keep_non_breaking_space [optional]

      Set to true, to keep non-breaking-spaces, in * combination with * $normalize_whitespace

      * @param bool $remove_invisible_characters [optional]

      Set to false, if you not want to remove invisible * characters e.g.: "\0"

      * * @psalm-pure * * @return string *

      A clean UTF-8 string.

      */ public static function clean( string $str, bool $normalize_whitespace = true, bool $keep_non_breaking_space = false, bool $normalize_msword = true, bool $remove_invisible_characters = true ): string { // http://stackoverflow.com/questions/1401317/remove-non-utf8-characters-from-string // caused connection reset problem on larger strings $regex = '/ ( (?: [\x00-\x7F] # single-byte sequences 0xxxxxxx | [\xC0-\xDF][\x80-\xBF] # double-byte sequences 110xxxxx 10xxxxxx | [\xE0-\xEF][\x80-\xBF]{2} # triple-byte sequences 1110xxxx 10xxxxxx * 2 | [\xF0-\xF7][\x80-\xBF]{3} # quadruple-byte sequence 11110xxx 10xxxxxx * 3 ){1,100} # ...one or more times ) | ( [\x80-\xBF] ) # invalid byte in range 10000000 - 10111111 | ( [\xC0-\xFF] ) # invalid byte in range 11000000 - 11111111 /x'; $str = (string) \preg_replace($regex, '$1', $str); if ($normalize_whitespace) { $str = self::normalize_whitespace($str, $keep_non_breaking_space); } if ($normalize_msword) { $str = self::normalize_msword($str); } if ($remove_invisible_characters) { $str = self::remove_invisible_characters($str); } return $str; } /** * Checks if a string is 7 bit ASCII. * * EXAMPLE: * ASCII::is_ascii('白'); // false * * * @param string $str

      The string to check.

      * * @psalm-pure * * @return bool *

      * true if it is ASCII
      * false otherwise *

      */ public static function is_ascii(string $str): bool { if ($str === '') { return true; } return !\preg_match('/' . self::$REGEX_ASCII . '/', $str); } /** * Returns a string with smart quotes, ellipsis characters, and dashes from * Windows-1252 (commonly used in Word documents) replaced by their ASCII * equivalents. * * EXAMPLE: * ASCII::normalize_msword('„Abcdef…”'); // '"Abcdef..."' * * * @param string $str

      The string to be normalized.

      * * @psalm-pure * * @return string *

      A string with normalized characters for commonly used chars in Word documents.

      */ public static function normalize_msword(string $str): string { if ($str === '') { return ''; } /** @var array{orig: string[], replace: string[]} */ static $MSWORD_CACHE = ['orig' => [], 'replace' => []]; if (empty($MSWORD_CACHE['orig'])) { self::prepareAsciiMaps(); /** @var array */ $map = self::$ASCII_MAPS[self::EXTRA_MSWORD_CHARS_LANGUAGE_CODE] ?? []; $MSWORD_CACHE = [ 'orig' => \array_keys($map), 'replace' => \array_values($map), ]; } return \str_replace($MSWORD_CACHE['orig'], $MSWORD_CACHE['replace'], $str); } /** * Normalize the whitespace. * * EXAMPLE: * ASCII::normalize_whitespace("abc-\xc2\xa0-öäü-\xe2\x80\xaf-\xE2\x80\xAC", true); // "abc-\xc2\xa0-öäü- -" * * * @param string $str

      The string to be normalized.

      * @param bool $keepNonBreakingSpace [optional]

      Set to true, to keep non-breaking-spaces.

      * @param bool $keepBidiUnicodeControls [optional]

      Set to true, to keep non-printable (for the web) * bidirectional text chars.

      * @param bool $normalize_control_characters [optional]

      Set to true, to convert e.g. LINE-, PARAGRAPH-SEPARATOR with "\n" and LINE TABULATION with "\t".

      * * @psalm-pure * * @return string *

      A string with normalized whitespace.

      */ public static function normalize_whitespace( string $str, bool $keepNonBreakingSpace = false, bool $keepBidiUnicodeControls = false, bool $normalize_control_characters = false ): string { if ($str === '') { return ''; } /** @var array> */ static $WHITESPACE_CACHE = []; $cacheKey = (int) $keepNonBreakingSpace; if ($normalize_control_characters) { $str = \str_replace( [ "\x0d\x0c", // 'END OF LINE' "\xe2\x80\xa8", // 'LINE SEPARATOR' "\xe2\x80\xa9", // 'PARAGRAPH SEPARATOR' "\x0c", // 'FORM FEED' // "\f" "\x0b", // 'VERTICAL TAB' // "\v" ], [ "\n", "\n", "\n", "\n", "\t", ], $str ); } if (!isset($WHITESPACE_CACHE[$cacheKey])) { self::prepareAsciiMaps(); $WHITESPACE_CACHE[$cacheKey] = self::$ASCII_MAPS[self::EXTRA_WHITESPACE_CHARS_LANGUAGE_CODE] ?? []; if ($keepNonBreakingSpace) { unset($WHITESPACE_CACHE[$cacheKey]["\xc2\xa0"]); } $WHITESPACE_CACHE[$cacheKey] = array_keys($WHITESPACE_CACHE[$cacheKey]); } if (!$keepBidiUnicodeControls) { /** @var array|null */ static $BIDI_UNICODE_CONTROLS_CACHE = null; if ($BIDI_UNICODE_CONTROLS_CACHE === null) { $BIDI_UNICODE_CONTROLS_CACHE = self::$BIDI_UNI_CODE_CONTROLS_TABLE; } $str = \str_replace($BIDI_UNICODE_CONTROLS_CACHE, '', $str); } return \str_replace($WHITESPACE_CACHE[$cacheKey], ' ', $str); } /** * Remove invisible characters from a string. * * e.g.: This prevents sandwiching null characters between ascii characters, like Java\0script. * * copy&past from https://github.com/bcit-ci/CodeIgniter/blob/develop/system/core/Common.php * * @param string $str * @param bool $url_encoded * @param string $replacement * @param bool $keep_basic_control_characters * * @psalm-pure * * @return string */ public static function remove_invisible_characters( string $str, bool $url_encoded = false, string $replacement = '', bool $keep_basic_control_characters = true ): string { // init $non_displayables = []; // every control character except: // - newline (dec 10), // - carriage return (dec 13), // - horizontal tab (dec 09) if ($url_encoded) { $non_displayables[] = '/%0[0-8bcefBCEF]/'; // url encoded 00-08, 11, 12, 14, 15 $non_displayables[] = '/%1[0-9a-fA-F]/'; // url encoded 16-31 } if ($keep_basic_control_characters) { $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127 } else { $str = self::normalize_whitespace($str, false, false, true); $non_displayables[] = '/[^\P{C}\s]/u'; } do { $str = (string) \preg_replace($non_displayables, $replacement, $str, -1, $count); } while ($count !== 0); return $str; } /** * WARNING: This method will return broken characters and is only for special cases. * * Convert two UTF-8 encoded string to a single-byte strings suitable for * functions that need the same string length after the conversion. * * The function simply uses (and updates) a tailored dynamic encoding * (in/out map parameter) where non-ascii characters are remapped to * the range [128-255] in order of appearance. * * @param string $str1 * @param string $str2 * * @return string[] * * @phpstan-return array{0: string, 1: string} */ public static function to_ascii_remap(string $str1, string $str2): array { $charMap = []; $str1 = self::to_ascii_remap_intern($str1, $charMap); $str2 = self::to_ascii_remap_intern($str2, $charMap); return [$str1, $str2]; } /** * Returns an ASCII version of the string. A set of non-ASCII characters are * replaced with their closest ASCII counterparts, and the rest are removed * by default. The language or locale of the source string can be supplied * for language-specific transliteration in any of the following formats: * en, en_GB, or en-GB. For example, passing "de" results in "äöü" mapping * to "aeoeue" rather than "aou" as in other languages. * * EXAMPLE: * ASCII::to_ascii('�Düsseldorf�', 'en'); // Dusseldorf * * * @param string $str

      The input string.

      * @param string $language [optional]

      Language of the source string. * (default is 'en') | ASCII::*_LANGUAGE_CODE

      * @param bool $remove_unsupported_chars [optional]

      Whether or not to remove the * unsupported characters.

      * @param bool $replace_extra_symbols [optional]

      Add some more replacements e.g. "£" with " pound * ".

      * @param bool $use_transliterate [optional]

      Use ASCII::to_transliterate() for unknown chars.

      * @param bool|null $replace_single_chars_only [optional]

      Single char replacement is better for the * performance, but some languages need to replace more then one char * at the same time. | NULL === auto-setting, depended on the * language

      * * @psalm-pure * * @return string *

      A string that contains only ASCII characters.

      * * @phpstan-param ASCII::*_LANGUAGE_CODE $language */ public static function to_ascii( string $str, string $language = self::ENGLISH_LANGUAGE_CODE, bool $remove_unsupported_chars = true, bool $replace_extra_symbols = false, bool $use_transliterate = false, bool $replace_single_chars_only = null ): string { if ($str === '') { return ''; } /** @phpstan-var ASCII::*_LANGUAGE_CODE - hack for phpstan */ $language = self::get_language($language); static $EXTRA_SYMBOLS_CACHE = null; /** @var array> */ static $REPLACE_HELPER_CACHE = []; $cacheKey = $language . '-' . $replace_extra_symbols; if (!isset($REPLACE_HELPER_CACHE[$cacheKey])) { $langAll = self::charsArrayWithSingleLanguageValues($replace_extra_symbols, false); $langSpecific = self::charsArrayWithOneLanguage($language, $replace_extra_symbols, false); if ($langSpecific === []) { $REPLACE_HELPER_CACHE[$cacheKey] = $langAll; } else { $REPLACE_HELPER_CACHE[$cacheKey] = \array_merge([], $langAll, $langSpecific); } } if ( $replace_extra_symbols && $EXTRA_SYMBOLS_CACHE === null ) { $EXTRA_SYMBOLS_CACHE = []; foreach (self::$ASCII_EXTRAS ?? [] as $extrasDataTmp) { foreach ($extrasDataTmp as $extrasDataKeyTmp => $extrasDataValueTmp) { $EXTRA_SYMBOLS_CACHE[$extrasDataKeyTmp] = $extrasDataKeyTmp; } } $EXTRA_SYMBOLS_CACHE = \implode('', $EXTRA_SYMBOLS_CACHE); } $charDone = []; if (\preg_match_all('/' . self::$REGEX_ASCII . ($replace_extra_symbols ? '|[' . $EXTRA_SYMBOLS_CACHE . ']' : '') . '/u', $str, $matches)) { if (!$replace_single_chars_only) { if (self::$LANGUAGE_MAX_KEY === null) { self::$LANGUAGE_MAX_KEY = self::getData('ascii_language_max_key'); } $maxKeyLength = self::$LANGUAGE_MAX_KEY[$language] ?? 0; if ($maxKeyLength >= 5) { foreach ($matches[0] as $keyTmp => $char) { if (isset($matches[0][$keyTmp + 4])) { $fiveChars = $matches[0][$keyTmp + 0] . $matches[0][$keyTmp + 1] . $matches[0][$keyTmp + 2] . $matches[0][$keyTmp + 3] . $matches[0][$keyTmp + 4]; } else { $fiveChars = null; } if ( $fiveChars && !isset($charDone[$fiveChars]) && isset($REPLACE_HELPER_CACHE[$cacheKey][$fiveChars]) && \strpos($str, $fiveChars) !== false ) { // DEBUG //\var_dump($str, $fiveChars, $REPLACE_HELPER_CACHE[$cacheKey][$fiveChars]); $charDone[$fiveChars] = true; $str = \str_replace($fiveChars, $REPLACE_HELPER_CACHE[$cacheKey][$fiveChars], $str); // DEBUG //\var_dump($str, "\n"); } } } if ($maxKeyLength >= 4) { foreach ($matches[0] as $keyTmp => $char) { if (isset($matches[0][$keyTmp + 3])) { $fourChars = $matches[0][$keyTmp + 0] . $matches[0][$keyTmp + 1] . $matches[0][$keyTmp + 2] . $matches[0][$keyTmp + 3]; } else { $fourChars = null; } if ( $fourChars && !isset($charDone[$fourChars]) && isset($REPLACE_HELPER_CACHE[$cacheKey][$fourChars]) && \strpos($str, $fourChars) !== false ) { // DEBUG //\var_dump($str, $fourChars, $REPLACE_HELPER_CACHE[$cacheKey][$fourChars]); $charDone[$fourChars] = true; $str = \str_replace($fourChars, $REPLACE_HELPER_CACHE[$cacheKey][$fourChars], $str); // DEBUG //\var_dump($str, "\n"); } } } foreach ($matches[0] as $keyTmp => $char) { if (isset($matches[0][$keyTmp + 2])) { $threeChars = $matches[0][$keyTmp + 0] . $matches[0][$keyTmp + 1] . $matches[0][$keyTmp + 2]; } else { $threeChars = null; } if ( $threeChars && !isset($charDone[$threeChars]) && isset($REPLACE_HELPER_CACHE[$cacheKey][$threeChars]) && \strpos($str, $threeChars) !== false ) { // DEBUG //\var_dump($str, $threeChars, $REPLACE_HELPER_CACHE[$cacheKey][$threeChars]); $charDone[$threeChars] = true; $str = \str_replace($threeChars, $REPLACE_HELPER_CACHE[$cacheKey][$threeChars], $str); // DEBUG //\var_dump($str, "\n"); } } foreach ($matches[0] as $keyTmp => $char) { if (isset($matches[0][$keyTmp + 1])) { $twoChars = $matches[0][$keyTmp + 0] . $matches[0][$keyTmp + 1]; } else { $twoChars = null; } if ( $twoChars && !isset($charDone[$twoChars]) && isset($REPLACE_HELPER_CACHE[$cacheKey][$twoChars]) && \strpos($str, $twoChars) !== false ) { // DEBUG //\var_dump($str, $twoChars, $REPLACE_HELPER_CACHE[$cacheKey][$twoChars]); $charDone[$twoChars] = true; $str = \str_replace($twoChars, $REPLACE_HELPER_CACHE[$cacheKey][$twoChars], $str); // DEBUG //\var_dump($str, "\n"); } } } foreach ($matches[0] as $char) { if ( !isset($charDone[$char]) && isset($REPLACE_HELPER_CACHE[$cacheKey][$char]) && \strpos($str, $char) !== false ) { // DEBUG //\var_dump($str, $char, $REPLACE_HELPER_CACHE[$cacheKey][$char]); $charDone[$char] = true; $str = \str_replace($char, $REPLACE_HELPER_CACHE[$cacheKey][$char], $str); // DEBUG //\var_dump($str, "\n"); } } } /** @psalm-suppress PossiblyNullOperand - we use the prepare* methods here, so we don't get NULL here */ if (!isset(self::$ASCII_MAPS[$language])) { $use_transliterate = true; } if ($use_transliterate) { $str = self::to_transliterate($str, null, false); } if ($remove_unsupported_chars) { $str = (string) \str_replace(["\n\r", "\n", "\r", "\t"], ' ', $str); $str = (string) \preg_replace('/' . self::$REGEX_ASCII . '/', '', $str); } return $str; } /** * Convert given string to safe filename (and keep string case). * * EXAMPLE: * ASCII::to_filename('שדגשדג.png', true)); // 'shdgshdg.png' * * * @param string $str * @param bool $use_transliterate

      ASCII::to_transliterate() is used by default - unsafe characters are * simply replaced with hyphen otherwise.

      * @param string $fallback_char * * @psalm-pure * * @return string *

      A string that contains only safe characters for a filename.

      */ public static function to_filename( string $str, bool $use_transliterate = true, string $fallback_char = '-' ): string { if ($use_transliterate) { $str = self::to_transliterate($str, $fallback_char); } $fallback_char_escaped = \preg_quote($fallback_char, '/'); $str = (string) \preg_replace( [ '/[^' . $fallback_char_escaped . '.\\-a-zA-Z\d\\s]/', // 1) remove un-needed chars '/\s+/u', // 2) convert spaces to $fallback_char '/[' . $fallback_char_escaped . ']+/u', // 3) remove double $fallback_char's ], [ '', $fallback_char, $fallback_char, ], $str ); return \trim($str, $fallback_char); } /** * Converts the string into an URL slug. This includes replacing non-ASCII * characters with their closest ASCII equivalents, removing remaining * non-ASCII and non-alphanumeric characters, and replacing whitespace with * $separator. The separator defaults to a single dash, and the string * is also converted to lowercase. The language of the source string can * also be supplied for language-specific transliteration. * * @param string $str * @param string $separator [optional]

      The string used to replace whitespace.

      * @param string $language [optional]

      Language of the source string. * (default is 'en') | ASCII::*_LANGUAGE_CODE

      * @param array $replacements [optional]

      A map of replaceable strings.

      * @param bool $replace_extra_symbols [optional]

      Add some more replacements e.g. "£" with " * pound ".

      * @param bool $use_str_to_lower [optional]

      Use "string to lower" for the input.

      * @param bool $use_transliterate [optional]

      Use ASCII::to_transliterate() for unknown * chars.

      * @psalm-pure * * @return string *

      A string that has been converted to an URL slug.

      * * @phpstan-param ASCII::*_LANGUAGE_CODE $language */ public static function to_slugify( string $str, string $separator = '-', string $language = self::ENGLISH_LANGUAGE_CODE, array $replacements = [], bool $replace_extra_symbols = false, bool $use_str_to_lower = true, bool $use_transliterate = false ): string { if ($str === '') { return ''; } foreach ($replacements as $from => $to) { $str = \str_replace($from, $to, $str); } $str = self::to_ascii( $str, $language, false, $replace_extra_symbols, $use_transliterate ); $str = \str_replace('@', $separator, $str); $str = (string) \preg_replace( '/[^a-zA-Z\\d\\s\\-_' . \preg_quote($separator, '/') . ']/', '', $str ); if ($use_str_to_lower) { $str = \strtolower($str); } $str = (string) \preg_replace('/^[\'\\s]+|[\'\\s]+$/', '', $str); $str = (string) \preg_replace('/\\B([A-Z])/', '-\1', $str); $str = (string) \preg_replace('/[\\-_\\s]+/', $separator, $str); $l = \strlen($separator); if ($l && \strpos($str, $separator) === 0) { $str = (string) \substr($str, $l); } if (\substr($str, -$l) === $separator) { $str = (string) \substr($str, 0, \strlen($str) - $l); } return $str; } /** * Returns an ASCII version of the string. A set of non-ASCII characters are * replaced with their closest ASCII counterparts, and the rest are removed * unless instructed otherwise. * * EXAMPLE: * ASCII::to_transliterate('déjà σσς iıii'); // 'deja sss iiii' * * * @param string $str

      The input string.

      * @param string|null $unknown [optional]

      Character use if character unknown. (default is '?') * But you can also use NULL to keep the unknown chars.

      * @param bool $strict [optional]

      Use "transliterator_transliterate()" from PHP-Intl * * @psalm-pure * * @return string *

      A String that contains only ASCII characters.

      * * @noinspection ParameterDefaultValueIsNotNullInspection */ public static function to_transliterate( string $str, $unknown = '?', bool $strict = false ): string { /** @var array|null */ static $UTF8_TO_TRANSLIT = null; /** null|\Transliterator */ static $TRANSLITERATOR = null; /** @var bool|null */ static $SUPPORT_INTL = null; if ($str === '') { return ''; } if ($SUPPORT_INTL === null) { $SUPPORT_INTL = \extension_loaded('intl'); } // check if we only have ASCII, first (better performance) $str_tmp = $str; if (self::is_ascii($str)) { return $str; } $str = self::clean($str); // check again, if we only have ASCII, now ... if ( $str_tmp !== $str && self::is_ascii($str) ) { return $str; } if ( $strict && $SUPPORT_INTL === true ) { if (!isset($TRANSLITERATOR)) { // INFO: see "*-Latin" rules via "transliterator_list_ids()" /** @var \Transliterator */ $TRANSLITERATOR = \transliterator_create('NFKC; [:Nonspacing Mark:] Remove; NFKC; Any-Latin; Latin-ASCII;'); } // INFO: https://unicode.org/cldr/utility/character.jsp $str_tmp = \transliterator_transliterate($TRANSLITERATOR, $str); if ($str_tmp !== false) { // check again, if we only have ASCII, now ... if ( $str_tmp !== $str && self::is_ascii($str_tmp) ) { return $str_tmp; } $str = $str_tmp; } } if (self::$ORD === null) { self::$ORD = self::getData('ascii_ord'); } \preg_match_all('/.|[^\x00]$/us', $str, $array_tmp); $chars = $array_tmp[0]; $ord = null; $str_tmp = ''; foreach ($chars as &$c) { $ordC0 = self::$ORD[$c[0]]; if ($ordC0 >= 0 && $ordC0 <= 127) { $str_tmp .= $c; continue; } $ordC1 = self::$ORD[$c[1]]; // ASCII - next please if ($ordC0 >= 192 && $ordC0 <= 223) { $ord = ($ordC0 - 192) * 64 + ($ordC1 - 128); } if ($ordC0 >= 224) { $ordC2 = self::$ORD[$c[2]]; if ($ordC0 <= 239) { $ord = ($ordC0 - 224) * 4096 + ($ordC1 - 128) * 64 + ($ordC2 - 128); } if ($ordC0 >= 240) { $ordC3 = self::$ORD[$c[3]]; if ($ordC0 <= 247) { $ord = ($ordC0 - 240) * 262144 + ($ordC1 - 128) * 4096 + ($ordC2 - 128) * 64 + ($ordC3 - 128); } // We only process valid UTF-8 chars (<= 4 byte), so we don't need this code here ... /* if ($ordC0 >= 248) { $ordC4 = self::$ORD[$c[4]]; if ($ordC0 <= 251) { $ord = ($ordC0 - 248) * 16777216 + ($ordC1 - 128) * 262144 + ($ordC2 - 128) * 4096 + ($ordC3 - 128) * 64 + ($ordC4 - 128); } if ($ordC0 >= 252) { $ordC5 = self::$ORD[$c[5]]; if ($ordC0 <= 253) { $ord = ($ordC0 - 252) * 1073741824 + ($ordC1 - 128) * 16777216 + ($ordC2 - 128) * 262144 + ($ordC3 - 128) * 4096 + ($ordC4 - 128) * 64 + ($ordC5 - 128); } } } */ } } if ( $ordC0 === 254 || $ordC0 === 255 || $ord === null ) { $str_tmp .= $unknown ?? $c; continue; } $bank = $ord >> 8; if (!isset($UTF8_TO_TRANSLIT[$bank])) { $UTF8_TO_TRANSLIT[$bank] = self::getDataIfExists(\sprintf('x%03x', $bank)); } $new_char = $ord & 255; if (isset($UTF8_TO_TRANSLIT[$bank][$new_char])) { // keep for debugging /* echo "file: " . sprintf('x%02x', $bank) . "\n"; echo "char: " . $c . "\n"; echo "ord: " . $ord . "\n"; echo "new_char: " . $new_char . "\n"; echo "new_char: " . mb_chr($new_char) . "\n"; echo "ascii: " . $UTF8_TO_TRANSLIT[$bank][$new_char] . "\n"; echo "bank:" . $bank . "\n\n"; */ $new_char = $UTF8_TO_TRANSLIT[$bank][$new_char]; /** @noinspection MissingOrEmptyGroupStatementInspection */ /** @noinspection PhpStatementHasEmptyBodyInspection */ if ($unknown === null && $new_char === '') { // nothing } elseif ( $new_char === '[?]' || $new_char === '[?] ' ) { $c = $unknown ?? $c; } else { $c = $new_char; } } else { // keep for debugging missing chars /* echo "file: " . sprintf('x%02x', $bank) . "\n"; echo "char: " . $c . "\n"; echo "ord: " . $ord . "\n"; echo "new_char: " . $new_char . "\n"; echo "new_char: " . mb_chr($new_char) . "\n"; echo "bank:" . $bank . "\n\n"; */ $c = $unknown ?? $c; } $str_tmp .= $c; } return $str_tmp; } /** * WARNING: This method will return broken characters and is only for special cases. * * Convert a UTF-8 encoded string to a single-byte string suitable for * functions that need the same string length after the conversion. * * The function simply uses (and updates) a tailored dynamic encoding * (in/out map parameter) where non-ascii characters are remapped to * the range [128-255] in order of appearance. * * Thus, it supports up to 128 different multibyte code points max over * the whole set of strings sharing this encoding. * * Source: https://github.com/KEINOS/mb_levenshtein * * @param string $str

      UTF-8 string to be converted to extended ASCII.

      * @param array $map

      Internal-Map of code points to ASCII characters.

      * * @return string *

      Mapped borken string.

      * * @phpstan-param array $map */ private static function to_ascii_remap_intern(string $str, array &$map): string { // find all utf-8 characters $matches = []; if (!\preg_match_all('/[\xC0-\xF7][\x80-\xBF]+/', $str, $matches)) { return $str; // plain ascii string } // update the encoding map with the characters not already met $mapCount = \count($map); foreach ($matches[0] as $mbc) { if (!isset($map[$mbc])) { $map[$mbc] = \chr(128 + $mapCount); ++$mapCount; } } // finally, remap non-ascii characters return \strtr($str, $map); } /** * Get the language from a string. * * e.g.: de_at -> de_at * de_DE -> de * DE_DE -> de * de-de -> de * * @noinspection ReturnTypeCanBeDeclaredInspection * * @param string $language * * @psalm-pure * * @return string */ private static function get_language(string $language) { if ($language === '') { return ''; } if ( \strpos($language, '_') === false && \strpos($language, '-') === false ) { return \strtolower($language); } $language = \str_replace('-', '_', \strtolower($language)); $regex = '/(?[a-z]+)_\g{first}/'; return (string) \preg_replace($regex, '$1', $language); } /** * Get data from "/data/*.php". * * @noinspection ReturnTypeCanBeDeclaredInspection * * @param string $file * * @psalm-pure * * @return array */ private static function getData(string $file) { /** @noinspection PhpIncludeInspection */ /** @noinspection UsingInclusionReturnValueInspection */ /** @psalm-suppress UnresolvableInclude */ return include __DIR__ . '/data/' . $file . '.php'; } /** * Get data from "/data/*.php". * * @param string $file * * @psalm-pure * * @return array */ private static function getDataIfExists(string $file): array { $file = __DIR__ . '/data/' . $file . '.php'; /** @psalm-suppress ImpureFunctionCall */ if (\is_file($file)) { /** @noinspection PhpIncludeInspection */ /** @noinspection UsingInclusionReturnValueInspection */ /** @psalm-suppress UnresolvableInclude */ return include $file; } return []; } /** * @psalm-pure * * @return void */ private static function prepareAsciiAndExtrasMaps() { if (self::$ASCII_MAPS_AND_EXTRAS === null) { self::prepareAsciiMaps(); self::prepareAsciiExtras(); /** @psalm-suppress PossiblyNullArgument - we use the prepare* methods here, so we don't get NULL here */ self::$ASCII_MAPS_AND_EXTRAS = \array_merge_recursive( self::$ASCII_MAPS ?? [], self::$ASCII_EXTRAS ?? [] ); } } /** * @psalm-pure * * @return void */ private static function prepareAsciiMaps() { if (self::$ASCII_MAPS === null) { self::$ASCII_MAPS = self::getData('ascii_by_languages'); } } /** * @psalm-pure * * @return void */ private static function prepareAsciiExtras() { if (self::$ASCII_EXTRAS === null) { self::$ASCII_EXTRAS = self::getData('ascii_extras_by_languages'); } } } PK̺w[yvoku/helper/data/x020.phpnu[', '.', '..', '...', '.', "\n", "\n\n", '', '', '', '', '', ' ', '%0', '%00', '\'', '\'\'', '\'\'\'', '`', '``', '```', '^', '<', '>', '*', '!!', '!?', '-', '_', '-', '^', '***', '--', '/', '-[', ']-', '??', '?!', '!?', '7', 'PP', '(]', '[)', '*', '[?]', '[?]', '[?]', '%', '~', '[?]', '[?]', '[?]', "''''", // 0x57 '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', ' ', '', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '', '', '', '', '', '', '0', 'i', '', '', '4', '5', '6', '7', '8', '9', '+', '-', '=', '(', ')', 'n', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '-', '=', '(', ')', '[?]', 'a', 'e', 'o', 'x', '[?]', 'h', 'k', 'l', 'm', 'n', 'p', 's', 't', '[?]', '[?]', '[?]', 'ECU', 'CL', 'Cr', 'Fr.', 'L.', 'mil', 'N', 'Pts', 'Rs', 'W', 'NS', 'D', 'EUR', 'K', 'T', 'Dr', 'Pf', 'P', 'G', 'A', 'UAH', 'C|', 'L', 'Sm', 'T', 'Rs', 'L', 'M', 'm', 'R', 'l', 'BTC', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '[?]', '', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', ]; PK̺w[A*Sܓvoku/helper/data/x032.phpnu[>', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '(g)', '(n)', '(d)', '(r)', '(m)', '(b)', '(s)', '()', '(j)', '(c)', '(k)', '(t)', '(p)', '(h)', '(ga)', '(na)', '(da)', '(ra)', '(ma)', '(ba)', '(sa)', '(a)', '(ja)', '(ca)', '(ka)', '(ta)', '(pa)', '(ha)', '[?]', '[?]', '[?]', 'KIS ', '(1) ', '(2) ', '(3) ', '(4) ', '(5) ', '(6) ', '(7) ', '(8) ', '(9) ', '(10) ', '(Yue) ', '(Huo) ', '(Shui) ', '(Mu) ', '(Jin) ', '(Tu) ', '(Ri) ', '(Zhu) ', '(You) ', '(She) ', '(Ming) ', '(Te) ', '(Cai) ', '(Zhu) ', '(Lao) ', '(Mi) ', '(Nan) ', '(Nu) ', '(Shi) ', '(You) ', '(Yin) ', '(Zhu) ', '(Xiang) ', '(Xiu) ', '(Xie) ', '(Zheng) ', '(Shang) ', '(Zhong) ', '(Xia) ', '(Zuo) ', '(You) ', '(Yi) ', '(Zong) ', '(Xue) ', '(Jian) ', '(Qi) ', '(Zi) ', '(Xie) ', '(Ye) ', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '1M', '2M', '3M', '4M', '5M', '6M', '7M', '8M', '9M', '10M', '11M', '12M', 'Hg', 'erg', 'eV', 'LTD', 'a', 'i', 'u', 'u', 'o', 'ka', 'ki', 'ku', 'ke', 'ko', 'sa', 'si', 'su', 'se', 'so', 'ta', 'ti', 'tu', 'te', 'to', 'na', 'ni', 'nu', 'ne', 'no', 'ha', 'hi', 'hu', 'he', 'ho', 'ma', 'mi', 'mu', 'me', 'mo', 'ya', 'yu', 'yo', 'ra', 'ri', 'ru', 're', 'ro', 'wa', 'wi', 'we', 'wo']; PK̺w[Xggvoku/helper/data/x0bc.phpnu[ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 80 => 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 112 => 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 230 => 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ]; PK̺w[Q33voku/helper/data/x09b.phpnu[ ', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]']; PK̺w[jy11voku/helper/data/x003.phpnu[+llvoku/helper/data/x017.phpnu[ 0, 'tk' => 1, 'th' => 0, 'ps' => 0, 'or' => 0, 'mn' => 0, 'ko' => 0, 'ky' => 0, 'hy' => 1, 'bn' => 5, 'be' => 0, 'am' => 0, 'ja' => 0, 'zh' => 0, 'nl' => 1, 'it' => 1, 'mk' => 1, 'pt' => 1, 'el__greeklish' => 2, 'el' => 2, 'hi' => 2, 'sv' => 1, 'tr' => 1, 'bg' => 2, 'hu' => 1, 'my' => 5, 'hr' => 2, 'fi' => 1, 'ka' => 1, 'ru' => 1, 'ru__gost_2000_b' => 1, 'ru__passport_2013' => 1, 'uk' => 1, 'kk' => 1, 'cs' => 1, 'da' => 1, 'pl' => 1, 'ro' => 1, 'eo' => 1, 'et' => 1, 'lv' => 1, 'lt' => 1, 'no' => 1, 'vi' => 1, 'ar' => 1, 'fa' => 1, 'sr' => 1, 'sr__cyr' => 1, 'sr__lat' => 1, 'az' => 1, 'sk' => 1, 'fr' => 1, 'fr_at' => 1, 'fr_ch' => 1, 'de' => 1, 'de_at' => 1, 'de_ch' => 1, 'en' => 0, 'latin' => 3, ' ' => 1, 'msword' => 1, ]; PK̺w[|_7voku/helper/data/x079.phpnu[ ', '<<', '>> ', '[', '] ', '{', '} ', '[(', ')] ', '@', 'X ', '[', '] ', '[[', ']] ', '((', ')) ', '[[', ']] ', '~ ', '``', '\'\'', ',,', '@', '1', '2', '3', '4', '5', '6', '7', '8', '9', '', '', '', '', '', '', '~', '+', '+', '+', '+', '', '@', ' // ', '+10+', '+20+', '+30+', '[?]', '[?]', '[?]', '', '', '[?]', 'a', 'a', 'i', 'i', 'u', 'u', 'e', 'e', 'o', 'o', 'ka', 'ga', 'ki', 'gi', 'ku', 'gu', 'ke', 'ge', 'ko', 'go', 'sa', 'za', 'shi', // 0x57 'zi', 'su', 'zu', 'se', 'ze', 'so', 'zo', 'ta', 'da', 'chi', // 0x61 'di', 'tsu', // 0x63 'tsu', // 0x64 'du', 'te', 'de', 'to', 'do', 'na', 'ni', 'nu', 'ne', 'no', 'ha', 'ba', 'pa', 'hi', 'bi', 'pi', 'hu', 'bu', 'pu', 'he', 'be', 'pe', 'ho', 'bo', 'po', 'ma', 'mi', 'mu', 'me', 'mo', 'ya', 'ya', 'yu', 'yu', 'yo', 'yo', 'ra', 'ri', 'ru', 're', 'ro', 'wa', 'wa', 'wi', 'we', 'wo', 'n', 'vu', '[?]', '[?]', '[?]', '[?]', '', '', '', '', '"', '"', '[?]', '[?]', 'a', 'a', 'i', 'i', 'u', 'u', 'e', 'e', 'o', 'o', 'ka', 'ga', 'ki', 'gi', 'ku', 'gu', 'ke', 'ge', 'ko', 'go', 'sa', 'za', 'shi', // 0xb7 'zi', 'su', 'zu', 'se', 'ze', 'so', 'zo', 'ta', 'da', 'chi', // 0xc1 'di', 'tsu', // 0xc3 'tsu', // 0xc4 'du', 'te', 'de', 'to', 'do', 'na', 'ni', 'nu', 'ne', 'no', 'ha', 'ba', 'pa', 'hi', 'bi', 'pi', 'hu', 'bu', 'pu', 'he', 'be', 'pe', 'ho', 'bo', 'po', 'ma', 'mi', 'mu', 'me', 'mo', 'ya', 'ya', 'yu', 'yu', 'yo', 'yo', 'ra', 'ri', 'ru', 're', 'ro', 'wa', 'wa', 'wi', 'we', 'wo', 'n', 'vu', 'ka', 'ke', 'va', 'vi', 've', 'vo', '', '', '"', '"', ]; PK̺w[@Mvoku/helper/data/x0b3.phpnu[voku/helper/data/x0cc.phpnu[JJvoku/helper/data/x058.phpnu[> ', '<', '> ', '[', '] ', '{', '}', '[?]', '[?]', '[?]', '[?]', '', '', '', '', '', '', '', ',', ',', '.', '', ';', ':', '?', '!', '-', '(', ')', '{', '}', '{', '}', '#', '&', '*', '+', '-', '<', '>', '=', '', '\\', '$', '%', '@', '[?]', '[?]', '[?]', '[?]', '', '', '', '[?]', '', '[?]', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '[?]', '[?]', '']; PK̺w[7{Mvoku/helper/data/x0ff.phpnu[', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '[?]', '[?]', '.', '[', ']', ',', '*', 'wo', 'a', 'i', 'u', 'e', 'o', 'ya', 'yu', 'yo', 'tu', '+', 'a', 'i', 'u', 'e', 'o', 'ka', 'ki', 'ku', 'ke', 'ko', 'sa', 'si', 'su', 'se', 'so', 'ta', 'ti', 'tu', 'te', 'to', 'na', 'ni', 'nu', 'ne', 'no', 'ha', 'hi', 'hu', 'he', 'ho', 'ma', 'mi', 'mu', 'me', 'mo', 'ya', 'yu', 'yo', 'ra', 'ri', 'ru', 're', 'ro', 'wa', 'n', ':', ';', '', 'g', 'gg', 'gs', 'n', 'nj', 'nh', 'd', 'dd', 'r', 'lg', 'lm', 'lb', 'ls', 'lt', 'lp', 'rh', 'm', 'b', 'bb', 'bs', 's', 'ss', '', 'j', 'jj', 'c', 'k', 't', 'p', 'h', '[?]', '[?]', '[?]', 'a', 'ae', 'ya', 'yae', 'eo', 'e', '[?]', '[?]', 'yeo', 'ye', 'o', 'wa', 'wae', 'oe', '[?]', '[?]', 'yo', 'u', 'weo', 'we', 'wi', 'yu', '[?]', '[?]', 'eu', 'yi', 'i', '[?]', '[?]', '[?]', '/C', 'PS', '!', '-', '|', 'Y=', 'W=', '[?]', '|', '-', '|', '-', '|', '#', 'O', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '{', '|', '}', '', '', '', '']; PK̺w[6w voku/helper/data/x0af.phpnu[=', '<=', '>=', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]']; PK̺w[7333voku/helper/data/x064.phpnu[ 'w', 'x', 'y', 'z', 4 => 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 30 => 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 56 => 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 82 => 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 108 => 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 134 => 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 160 => 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 186 => 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 212 => 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 238 => 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', ]; PK̺w[0,,voku/helper/data/x078.phpnu[', '%', '[?]', '[?]', '>', '=', '[?]', '/', '-', '~', '\\', '/', '~', '~', '|-', '-|', '[?]', '[?]', '[?]', '[?]', '<=', '=>', '((', '))', '[?]', '[?]', '::', '[?]', '?', '\'', 'o', '.', ',', '.', ',', ';', '[?]', '[?]', '[?]', '[?]', '----', '------', 'x', '|', '[?]', '[?]', '=', ',', '"', '`--', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?]', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?] ', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]']; PK̺w[~voku/helper/data/x0c0.phpnu[ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 52 => 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 78 => 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 104 => 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 130 => 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 156 => 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 181 => 'Z', 182 => 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 208 => 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 234 => 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; PK̺w[:l_voku/helper/data/x1d6.phpnu[{877voku/helper/data/x001.phpnu[', 'n', 't', 'q', ',', '*', '5', '<', '-', 'u', '8', 'v', '.', '%', '[', '$', '+', 'x', '!', '&', ';', ':', '4', '\\', '0', 'z', '7', '(', '_', '?', 'w', ']', '#', 'y', ')', '=', '[d7]', '[d17]', '[d27]', '[d127]', '[d37]', '[d137]', '[d237]', '[d1237]', '[d47]', '[d147]', '[d247]', '[d1247]', '[d347]', '[d1347]', '[d2347]', '[d12347]', '[d57]', '[d157]', '[d257]', '[d1257]', '[d357]', '[d1357]', '[d2357]', '[d12357]', '[d457]', '[d1457]', '[d2457]', '[d12457]', '[d3457]', '[d13457]', '[d23457]', '[d123457]', '[d67]', '[d167]', '[d267]', '[d1267]', '[d367]', '[d1367]', '[d2367]', '[d12367]', '[d467]', '[d1467]', '[d2467]', '[d12467]', '[d3467]', '[d13467]', '[d23467]', '[d123467]', '[d567]', '[d1567]', '[d2567]', '[d12567]', '[d3567]', '[d13567]', '[d23567]', '[d123567]', '[d4567]', '[d14567]', '[d24567]', '[d124567]', '[d34567]', '[d134567]', '[d234567]', '[d1234567]', '[d8]', '[d18]', '[d28]', '[d128]', '[d38]', '[d138]', '[d238]', '[d1238]', '[d48]', '[d148]', '[d248]', '[d1248]', '[d348]', '[d1348]', '[d2348]', '[d12348]', '[d58]', '[d158]', '[d258]', '[d1258]', '[d358]', '[d1358]', '[d2358]', '[d12358]', '[d458]', '[d1458]', '[d2458]', '[d12458]', '[d3458]', '[d13458]', '[d23458]', '[d123458]', '[d68]', '[d168]', '[d268]', '[d1268]', '[d368]', '[d1368]', '[d2368]', '[d12368]', '[d468]', '[d1468]', '[d2468]', '[d12468]', '[d3468]', '[d13468]', '[d23468]', '[d123468]', '[d568]', '[d1568]', '[d2568]', '[d12568]', '[d3568]', '[d13568]', '[d23568]', '[d123568]', '[d4568]', '[d14568]', '[d24568]', '[d124568]', '[d34568]', '[d134568]', '[d234568]', '[d1234568]', '[d78]', '[d178]', '[d278]', '[d1278]', '[d378]', '[d1378]', '[d2378]', '[d12378]', '[d478]', '[d1478]', '[d2478]', '[d12478]', '[d3478]', '[d13478]', '[d23478]', '[d123478]', '[d578]', '[d1578]', '[d2578]', '[d12578]', '[d3578]', '[d13578]', '[d23578]', '[d123578]', '[d4578]', '[d14578]', '[d24578]', '[d124578]', '[d34578]', '[d134578]', '[d234578]', '[d1234578]', '[d678]', '[d1678]', '[d2678]', '[d12678]', '[d3678]', '[d13678]', '[d23678]', '[d123678]', '[d4678]', '[d14678]', '[d24678]', '[d124678]', '[d34678]', '[d134678]', '[d234678]', '[d1234678]', '[d5678]', '[d15678]', '[d25678]', '[d125678]', '[d35678]', '[d135678]', '[d235678]', '[d1235678]', '[d45678]', '[d145678]', '[d245678]', '[d1245678]', '[d345678]', '[d1345678]', '[d2345678]', '[d12345678]']; PK̺w[G  voku/helper/data/x09e.phpnu[ [ 'Á' => 'A', 'á' => 'a', 'Ä' => 'A', 'ä' => 'a', 'À' => 'A', 'à' => 'a', 'Â' => 'A', 'â' => 'a', 'É' => 'E', 'é' => 'e', 'Ë' => 'E', 'ë' => 'e', 'È' => 'E', 'è' => 'e', 'Ê' => 'E', 'ê' => 'e', 'Í' => 'I', 'í' => 'i', 'Ï' => 'I', 'ï' => 'i', 'Ì' => 'I', 'ì' => 'i', 'Î' => 'I', 'î' => 'i', 'Ó' => 'O', 'ó' => 'o', 'Ö' => 'O', 'ö' => 'o', 'Ò' => 'O', 'ò' => 'o', 'Ô' => 'O', 'ô' => 'o', 'Ú' => 'U', 'ú' => 'u', 'Ü' => 'U', 'ü' => 'u', 'Ù' => 'U', 'ù' => 'u', 'Û' => 'U', 'û' => 'u', 'Ý' => 'Y', 'ý' => 'y', 'Ÿ' => 'Y', ], // Italian 'it' => [ 'à' => 'a', 'À' => 'A', 'é' => 'e', 'É' => 'E', 'è' => 'e', 'È' => 'E', 'ì' => 'i', 'Ì' => 'I', 'Ò' => 'O', 'ò' => 'o', 'ù' => 'u', 'Ù' => 'U', ], // Macedonian 'mk' => [ 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Ѓ' => 'Gj', 'Е' => 'E', 'Ж' => 'Zh', 'З' => 'Z', 'Ѕ' => 'Dz', 'И' => 'I', 'Ј' => 'J', 'К' => 'K', 'Л' => 'L', 'Љ' => 'Lj', 'М' => 'M', 'Н' => 'N', 'Њ' => 'Nj', 'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'Ќ' => 'Kj', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', 'Ч' => 'Ch', 'Џ' => 'Dj', 'Ш' => 'Sh', 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'ѓ' => 'gj', 'е' => 'e', 'ж' => 'zh', 'з' => 'z', 'ѕ' => 'dz', 'и' => 'i', 'ј' => 'j', 'к' => 'k', 'л' => 'l', 'љ' => 'lj', 'м' => 'm', 'н' => 'n', 'њ' => 'nj', 'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'ќ' => 'kj', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'ch', 'џ' => 'dj', 'ш' => 'sh', ], // Portuguese (Brazil) 'pt' => [ 'æ' => 'ae', 'ǽ' => 'ae', 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Å' => 'AA', 'Ǻ' => 'A', 'Ă' => 'A', 'Ǎ' => 'A', 'Æ' => 'AE', 'Ǽ' => 'AE', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'å' => 'aa', 'ǻ' => 'a', 'ă' => 'a', 'ǎ' => 'a', 'ª' => 'a', 'Ĉ' => 'C', 'Ċ' => 'C', 'Ç' => 'C', 'ç' => 'c', 'ĉ' => 'c', 'ċ' => 'c', 'Ð' => 'Dj', 'Đ' => 'D', 'ð' => 'dj', 'đ' => 'd', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ĕ' => 'E', 'Ė' => 'E', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', 'ĕ' => 'e', 'ė' => 'e', 'ƒ' => 'f', 'Ĝ' => 'G', 'Ġ' => 'G', 'ĝ' => 'g', 'ġ' => 'g', 'Ĥ' => 'H', 'Ħ' => 'H', 'ĥ' => 'h', 'ħ' => 'h', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', 'Ï' => 'I', 'Ĩ' => 'I', 'Ĭ' => 'I', 'Ǐ' => 'I', 'Į' => 'I', 'IJ' => 'IJ', 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ĩ' => 'i', 'ĭ' => 'i', 'ǐ' => 'i', 'į' => 'i', 'ij' => 'ij', 'Ĵ' => 'J', 'ĵ' => 'j', 'Ĺ' => 'L', 'Ľ' => 'L', 'Ŀ' => 'L', 'ĺ' => 'l', 'ľ' => 'l', 'ŀ' => 'l', 'Ñ' => 'N', 'ñ' => 'n', 'ʼn' => 'n', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ō' => 'O', 'Ŏ' => 'O', 'Ǒ' => 'O', 'Ő' => 'O', 'Ơ' => 'O', 'Ø' => 'OE', 'Ǿ' => 'O', 'Œ' => 'OE', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'õ' => 'o', 'ō' => 'o', 'ŏ' => 'o', 'ǒ' => 'o', 'ő' => 'o', 'ơ' => 'o', 'ø' => 'oe', 'ǿ' => 'o', 'º' => 'o', 'œ' => 'oe', 'Ŕ' => 'R', 'Ŗ' => 'R', 'ŕ' => 'r', 'ŗ' => 'r', 'Ŝ' => 'S', 'Ș' => 'S', 'ŝ' => 's', 'ș' => 's', 'ſ' => 's', 'Ţ' => 'T', 'Ț' => 'T', 'Ŧ' => 'T', 'Þ' => 'TH', 'ţ' => 't', 'ț' => 't', 'ŧ' => 't', 'þ' => 'th', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ũ' => 'U', 'Ŭ' => 'U', 'Ű' => 'U', 'Ų' => 'U', 'Ư' => 'U', 'Ǔ' => 'U', 'Ǖ' => 'U', 'Ǘ' => 'U', 'Ǚ' => 'U', 'Ǜ' => 'U', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ü' => 'u', 'ũ' => 'u', 'ŭ' => 'u', 'ű' => 'u', 'ų' => 'u', 'ư' => 'u', 'ǔ' => 'u', 'ǖ' => 'u', 'ǘ' => 'u', 'ǚ' => 'u', 'ǜ' => 'u', 'Ŵ' => 'W', 'ŵ' => 'w', 'Ý' => 'Y', 'Ÿ' => 'Y', 'Ŷ' => 'Y', 'ý' => 'y', 'ÿ' => 'y', 'ŷ' => 'y', ], // Greek(lish) (Elláda) 'el__greeklish' => [ 'ΑΥ' => 'AU', 'ΑΎ' => 'AU', 'Αυ' => 'Au', 'Αύ' => 'Au', 'ΕΊ' => 'EI', 'ΕΙ' => 'EI', 'Ει' => 'EI', 'ΕΥ' => 'EU', 'ΕΎ' => 'EU', 'Εί' => 'Ei', 'Ευ' => 'Eu', 'Εύ' => 'Eu', 'ΟΙ' => 'OI', 'ΟΊ' => 'OI', 'ΟΥ' => 'OU', 'ΟΎ' => 'OU', 'Οι' => 'Oi', 'Οί' => 'Oi', 'Ου' => 'Ou', 'Ού' => 'Ou', 'ΥΙ' => 'YI', 'ΎΙ' => 'YI', 'Υι' => 'Yi', 'Ύι' => 'Yi', 'ΥΊ' => 'Yi', 'Υί' => 'Yi', 'αυ' => 'au', 'αύ' => 'au', 'εί' => 'ei', 'ει' => 'ei', 'ευ' => 'eu', 'εύ' => 'eu', 'οι' => 'oi', 'οί' => 'oi', 'ου' => 'ou', 'ού' => 'ou', 'υι' => 'yi', 'ύι' => 'yi', 'υί' => 'yi', 'Α' => 'A', 'Ά' => 'A', 'Β' => 'B', 'Δ' => 'D', 'Ε' => 'E', 'Έ' => 'E', 'Φ' => 'F', 'Γ' => 'G', 'Η' => 'H', 'Ή' => 'H', 'Ι' => 'I', 'Ί' => 'I', 'Ϊ' => 'I', 'Κ' => 'K', 'Ξ' => 'Ks', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Π' => 'N', 'Ο' => 'O', 'Ό' => 'O', 'Ψ' => 'Ps', 'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Θ' => 'Th', 'Ω' => 'W', 'Ώ' => 'W', 'Χ' => 'X', 'ϒ' => 'Y', 'Υ' => 'Y', 'Ύ' => 'Y', 'Ϋ' => 'Y', 'Ζ' => 'Z', 'α' => 'a', 'ά' => 'a', 'β' => 'b', 'δ' => 'd', 'ε' => 'e', 'έ' => 'e', 'φ' => 'f', 'γ' => 'g', 'η' => 'h', 'ή' => 'h', 'ι' => 'i', 'ί' => 'i', 'ϊ' => 'i', 'ΐ' => 'i', 'κ' => 'k', 'ξ' => 'ks', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ο' => 'o', 'ό' => 'o', 'π' => 'p', 'ψ' => 'ps', 'ρ' => 'r', 'σ' => 's', 'ς' => 's', 'τ' => 't', 'ϑ' => 'th', 'θ' => 'th', 'ϐ' => 'v', 'ω' => 'w', 'ώ' => 'w', 'χ' => 'x', 'υ' => 'y', 'ύ' => 'y', 'ΰ' => 'y', 'ϋ' => 'y', 'ζ' => 'z', ], // Greek (Elláda) 'el' => [ 'ΑΥ' => 'AU', 'Αυ' => 'Au', 'ΟΥ' => 'U', 'Ου' => 'u', 'ΕΥ' => 'EF', 'Ευ' => 'Ef', 'ΕΙ' => 'I', 'Ει' => 'I', 'ΟΙ' => 'I', 'Οι' => 'I', 'ΥΙ' => 'I', 'Υι' => 'I', 'ΑΎ' => 'AU', 'Αύ' => 'Au', 'ΟΎ' => 'OU', 'Ού' => 'Ou', 'ΕΎ' => 'EU', 'Εύ' => 'Eu', 'ΕΊ' => 'I', 'Εί' => 'I', 'ΟΊ' => 'I', 'Οί' => 'I', 'ΎΙ' => 'I', 'Ύι' => 'I', 'ΥΊ' => 'I', 'Υί' => 'I', 'αυ' => 'au', 'ου' => 'u', 'ευ' => 'ef', 'ει' => 'i', 'οι' => 'i', 'υι' => 'i', 'αύ' => 'au', 'ού' => 'ou', 'εύ' => 'eu', 'εί' => 'i', 'οί' => 'i', 'ύι' => 'i', 'υί' => 'i', 'α' => 'a', 'β' => 'v', 'γ' => 'gh', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'i', 'θ' => 'th', 'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => 'ks', 'ο' => 'o', 'π' => 'p', 'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'i', 'φ' => 'f', 'χ' => 'kh', 'ψ' => 'ps', 'ω' => 'o', 'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ϒ' => 'Y', 'ύ' => 'y', 'ή' => 'i', 'ώ' => 'w', 'ς' => 's', 'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i', 'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'H', 'Θ' => 'Th', 'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => 'Ks', 'Ο' => 'O', 'Π' => 'P', 'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'Ps', 'Ω' => 'O', 'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y', 'Ή' => 'I', 'Ώ' => 'W', 'Ϊ' => 'I', 'Ϋ' => 'Y', 'ϐ' => 'v', 'ϑ' => 'th', ], // Hindi 'hi' => [ 'अ' => 'a', 'आ' => 'aa', 'ए' => 'e', 'ई' => 'ii', 'ऍ' => 'ei', 'ऎ' => 'ae', 'ऐ' => 'ai', 'इ' => 'i', 'ओ' => 'o', 'ऑ' => 'oi', 'ऒ' => 'oii', 'ऊ' => 'uu', 'औ' => 'ou', 'उ' => 'u', 'ब' => 'B', 'भ' => 'Bha', 'च' => 'Ca', 'छ' => 'Chha', 'ड' => 'Da', 'ढ' => 'Dha', 'फ' => 'Fa', 'फ़' => 'Fi', 'ग' => 'Ga', 'घ' => 'Gha', 'ग़' => 'Ghi', 'ह' => 'Ha', 'ज' => 'Ja', 'झ' => 'Jha', 'क' => 'Ka', 'ख' => 'Kha', 'ख़' => 'Khi', 'ल' => 'L', 'ळ' => 'Li', 'ऌ' => 'Li', 'ऴ' => 'Lii', 'ॡ' => 'Lii', 'म' => 'Ma', 'न' => 'Na', 'ङ' => 'Na', 'ञ' => 'Nia', 'ण' => 'Nae', 'ऩ' => 'Ni', 'ॐ' => 'oms', 'प' => 'Pa', 'क़' => 'Qi', 'र' => 'Ra', 'ऋ' => 'Ri', 'ॠ' => 'Ri', 'ऱ' => 'Ri', 'स' => 'Sa', 'श' => 'Sha', 'ष' => 'Shha', 'ट' => 'Ta', 'त' => 'Ta', 'ठ' => 'Tha', 'द' => 'Tha', 'थ' => 'Tha', 'ध' => 'Thha', 'ड़' => 'ugDha', 'ढ़' => 'ugDhha', 'व' => 'Va', 'य' => 'Ya', 'य़' => 'Yi', 'ज़' => 'Za', ], // Armenian 'hy' => [ 'Ա' => 'A', 'Բ' => 'B', 'Գ' => 'G', 'Դ' => 'D', 'Ե' => 'E', 'Զ' => 'Z', 'Է' => 'E', 'Ը' => 'Y', 'Թ' => 'Th', 'Ժ' => 'Zh', 'Ի' => 'I', 'Լ' => 'L', 'Խ' => 'Kh', 'Ծ' => 'Ts', 'Կ' => 'K', 'Հ' => 'H', 'Ձ' => 'Dz', 'Ղ' => 'Gh', 'Ճ' => 'Tch', 'Մ' => 'M', 'Յ' => 'Y', 'Ն' => 'N', 'Շ' => 'Sh', 'Ո' => 'Vo', 'Չ' => 'Ch', 'Պ' => 'P', 'Ջ' => 'J', 'Ռ' => 'R', 'Ս' => 'S', 'Վ' => 'V', 'Տ' => 'T', 'Ր' => 'R', 'Ց' => 'C', 'Ւ' => 'u', 'Փ' => 'Ph', 'Ք' => 'Q', 'և' => 'ev', 'Օ' => 'O', 'Ֆ' => 'F', 'ա' => 'a', 'բ' => 'b', 'գ' => 'g', 'դ' => 'd', 'ե' => 'e', 'զ' => 'z', 'է' => 'e', 'ը' => 'y', 'թ' => 'th', 'ժ' => 'zh', 'ի' => 'i', 'լ' => 'l', 'խ' => 'kh', 'ծ' => 'ts', 'կ' => 'k', 'հ' => 'h', 'ձ' => 'dz', 'ղ' => 'gh', 'ճ' => 'tch', 'մ' => 'm', 'յ' => 'y', 'ն' => 'n', 'շ' => 'sh', 'ո' => 'vo', 'չ' => 'ch', 'պ' => 'p', 'ջ' => 'j', 'ռ' => 'r', 'ս' => 's', 'վ' => 'v', 'տ' => 't', 'ր' => 'r', 'ց' => 'c', 'ւ' => 'u', 'փ' => 'ph', 'ք' => 'q', 'օ' => 'o', 'ֆ' => 'f', ], // Swedish 'sv' => [ 'Ä' => 'A', 'ä' => 'a', 'Å' => 'A', 'å' => 'a', 'Ö' => 'O', 'ö' => 'o', ], // Turkmen 'tk' => [ 'Ç' => 'C', 'Ä' => 'A', 'Ž' => 'Z', 'Ň' => 'N', 'Ö' => 'O', 'Ş' => 'S', 'Ü' => 'U', 'Ý' => 'Y', 'ç' => 'c', 'ä' => 'a', 'ž' => 'z', 'ň' => 'n', 'ö' => 'o', 'ş' => 's', 'ü' => 'u', 'ý' => 'y', ], // Turkish 'tr' => [ 'ň' => 'n', 'Ň' => 'N', 'ş' => 's', 'Ş' => 'S', 'ı' => 'i', 'İ' => 'I', 'ç' => 'c', 'Ç' => 'C', 'ä' => 'a', 'Ä' => 'A', 'ü' => 'u', 'Ü' => 'U', 'ö' => 'o', 'Ö' => 'O', 'ğ' => 'g', 'Ğ' => 'G', 'ý' => 'y', 'Ý' => 'Y', 'ž' => 'z', 'Ž' => 'Z', ], // Bulgarian 'bg' => [ 'ьо' => 'yo', 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ж' => 'Zh', 'З' => 'Z', 'И' => 'I', 'Й' => 'Y', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sht', 'Ъ' => 'A', 'Ь' => '', 'Ю' => 'Yu', 'Я' => 'Ya', 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ж' => 'zh', 'з' => 'z', 'и' => 'i', 'й' => 'y', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sht', 'ъ' => 'a', 'ь' => '', 'ю' => 'yu', 'я' => 'ya', ], // Hungarian 'hu' => [ 'Á' => 'A', 'Ē' => 'E', 'É' => 'E', 'Í' => 'I', 'Ó' => 'O', 'Ö' => 'O', 'Ő' => 'O', 'Ú' => 'U', 'Ü' => 'U', 'Ű' => 'U', 'á' => 'a', 'ē' => 'e', 'é' => 'e', 'í' => 'i', 'ó' => 'o', 'ö' => 'o', 'ő' => 'o', 'ú' => 'u', 'ü' => 'u', 'ű' => 'u', ], // Myanmar (Burmese) 'my' => [ 'န်ုပ်' => 'nub', 'ောင်' => 'aung', 'ိုက်' => 'aik', 'ိုဒ်' => 'ok', 'ိုင်' => 'aing', 'ိုလ်' => 'ol', 'ေါင်' => 'aung', 'သြော' => 'aw', 'ောက်' => 'auk', 'ိတ်' => 'eik', 'ုတ်' => 'ok', 'ုန်' => 'on', 'ေတ်' => 'it', 'ုဒ်' => 'ait', 'ာန်' => 'an', 'ိန်' => 'ein', 'ွတ်' => 'ut', 'ေါ်' => 'aw', 'ွန်' => 'un', 'ိပ်' => 'eik', 'ုပ်' => 'ok', 'ွပ်' => 'ut', 'ိမ်' => 'ein', 'ုမ်' => 'on', 'ော်' => 'aw', 'ွမ်' => 'un', 'က်' => 'et', 'ေါ' => 'aw', 'ော' => 'aw', 'ျွ' => 'ywa', 'ြွ' => 'yw', 'ို' => 'o', 'ုံ' => 'on', 'တ်' => 'at', 'င်' => 'in', 'ည်' => 'i', 'ဒ်' => 'd', 'န်' => 'an', 'ပ်' => 'at', 'မ်' => 'an', 'စျ' => 'za', 'ယ်' => 'e', 'ဉ်' => 'in', 'စ်' => 'it', 'ိံ' => 'ein', 'ဲ' => 'e', 'း' => '', 'ာ' => 'a', 'ါ' => 'a', 'ေ' => 'e', 'ံ' => 'an', 'ိ' => 'i', 'ီ' => 'i', 'ု' => 'u', 'ူ' => 'u', '်' => 'at', '္' => '', '့' => '', 'က' => 'k', '၉' => '9', 'တ' => 't', 'ရ' => 'ya', 'ယ' => 'y', 'မ' => 'm', 'ဘ' => 'ba', 'ဗ' => 'b', 'ဖ' => 'pa', 'ပ' => 'p', 'န' => 'n', 'ဓ' => 'da', 'ဒ' => 'd', 'ထ' => 'ta', 'ဏ' => 'na', 'ဝ' => 'w', 'ဎ' => 'da', 'ဍ' => 'd', 'ဌ' => 'ta', 'ဋ' => 't', 'ည' => 'ny', 'ဇ' => 'z', 'ဆ' => 'sa', 'စ' => 's', 'င' => 'ng', 'ဃ' => 'ga', 'ဂ' => 'g', 'လ' => 'l', 'သ' => 'th', '၈' => '8', 'ဩ' => 'aw', 'ခ' => 'kh', '၆' => '6', '၅' => '5', '၄' => '4', '၃' => '3', '၂' => '2', '၁' => '1', '၀' => '0', '၌' => 'hnaik', '၍' => 'ywae', 'ဪ' => 'aw', 'ဦ' => '-u', 'ဟ' => 'h', 'ဉ' => 'u', 'ဤ' => '-i', 'ဣ' => 'i', '၏' => '-e', 'ဧ' => 'e', 'ှ' => 'h', 'ွ' => 'w', 'ျ' => 'ya', 'ြ' => 'y', 'အ' => 'a', 'ဠ' => 'la', '၇' => '7', ], // Croatian (Hrvatska) 'hr' => [ 'DŽ' => 'DZ', 'Dž' => 'Dz', 'dž' => 'dz', 'DZ' => 'DZ', 'Dz' => 'Dz', 'dz' => 'dz', 'IJ' => 'IJ', 'ij' => 'ij', 'LJ' => 'LJ', 'Lj' => 'Lj', 'lj' => 'lj', 'NJ' => 'NJ', 'Nj' => 'Nj', 'nj' => 'nj', 'ž' => 'z', 'Ž' => 'Z', 'đ' => 'dj', 'Đ' => 'Dj', 'č' => 'c', 'Č' => 'C', 'ć' => 'c', 'Ć' => 'C', 'š' => 's', 'Š' => 'S', ], // Finnish 'fi' => [ 'Ä' => 'A', 'Ö' => 'O', 'ä' => 'a', 'ö' => 'o', ], // Georgian (Kartvelian) 'ka' => [ 'ა' => 'a', 'ბ' => 'b', 'გ' => 'g', 'დ' => 'd', 'ე' => 'e', 'ვ' => 'v', 'ზ' => 'z', 'თ' => 't', 'ი' => 'i', 'კ' => 'k', 'ლ' => 'l', 'მ' => 'm', 'ნ' => 'n', 'ო' => 'o', 'პ' => 'p', 'ჟ' => 'zh', 'რ' => 'r', 'ს' => 's', 'ტ' => 't', 'უ' => 'u', 'ფ' => 'f', 'ქ' => 'q', 'ღ' => 'gh', 'ყ' => 'y', 'შ' => 'sh', 'ჩ' => 'ch', 'ც' => 'ts', 'ძ' => 'dz', 'წ' => 'ts', 'ჭ' => 'ch', 'ხ' => 'kh', 'ჯ' => 'j', 'ჰ' => 'h', ], // Russian 'ru' => [ 'А' => 'A', 'а' => 'a', 'Б' => 'B', 'б' => 'b', 'В' => 'V', 'в' => 'v', 'Г' => 'G', 'г' => 'g', 'Д' => 'D', 'д' => 'd', 'Е' => 'E', 'е' => 'e', 'Ё' => 'Yo', 'ё' => 'yo', 'Ж' => 'Zh', 'ж' => 'zh', 'З' => 'Z', 'з' => 'z', 'И' => 'I', 'и' => 'i', 'Й' => 'Y', 'й' => 'y', 'К' => 'K', 'к' => 'k', 'Л' => 'L', 'л' => 'l', 'М' => 'M', 'м' => 'm', 'Н' => 'N', 'н' => 'n', 'О' => 'O', 'о' => 'o', 'П' => 'P', 'п' => 'p', 'Р' => 'R', 'р' => 'r', 'С' => 'S', 'с' => 's', 'Т' => 'T', 'т' => 't', 'У' => 'U', 'у' => 'u', 'Ф' => 'F', 'ф' => 'f', 'Х' => 'H', 'х' => 'h', 'Ц' => 'Ts', 'ц' => 'ts', 'Ч' => 'Ch', 'ч' => 'ch', 'ш' => 'sh', 'Ш' => 'Sh', 'Щ' => 'Sch', 'щ' => 'sch', 'Ъ' => '', 'ъ' => '', 'Ы' => 'Y', 'ы' => 'y', 'Ь' => '', 'ь' => '', 'Э' => 'E', 'э' => 'e', 'Ю' => 'Yu', 'ю' => 'yu', 'Я' => 'Ya', 'я' => 'ya', ], // Russian - GOST 7.79-2000(B) // -> https://en.m.wikipedia.org/wiki/Romanization_of_Russian#content-collapsible-block-1 'ru__gost_2000_b' => [ 'А' => 'A', 'а' => 'a', 'Б' => 'B', 'б' => 'b', 'В' => 'V', 'в' => 'v', 'Г' => 'G', 'г' => 'g', 'Д' => 'D', 'д' => 'd', 'Е' => 'E', 'е' => 'e', 'Ё' => 'Yo', 'ё' => 'yo', 'Ж' => 'Zh', 'ж' => 'zh', 'З' => 'Z', 'з' => 'z', 'И' => 'i', 'и' => 'i', 'Й' => 'i', 'й' => 'i', 'К' => 'K', 'к' => 'k', 'Л' => 'L', 'л' => 'l', 'М' => 'M', 'м' => 'm', 'Н' => 'N', 'н' => 'n', 'О' => 'O', 'о' => 'o', 'П' => 'P', 'п' => 'p', 'Р' => 'R', 'р' => 'r', 'С' => 'S', 'с' => 's', 'Т' => 'T', 'т' => 't', 'У' => 'U', 'у' => 'u', 'Ф' => 'F', 'ф' => 'f', 'Х' => 'X', 'х' => 'x', 'Ц' => 'Cz', 'ц' => 'cz', 'Ч' => 'Ch', 'ч' => 'ch', 'ш' => 'sh', 'Ш' => 'Sh', 'Щ' => 'Shh', 'щ' => 'shh', 'Ъ' => '', 'ъ' => '', 'Ы' => 'Y\'', 'ы' => 'y\'', 'Ь' => '', 'ь' => '', 'Э' => 'E\'', 'э' => 'e\'', 'Ю' => 'Yu', 'ю' => 'yu', 'Я' => 'Ya', 'я' => 'ya', 'І' => 'I', 'і' => 'i', 'Ѳ' => 'Fh', 'ѳ' => 'fh', 'Ѣ' => 'Ye', 'ѣ' => 'ye', 'Ѵ' => 'Yh', 'ѵ' => 'yh', 'Є' => '', 'є' => '', 'Ѥ' => '', 'ѥ' => '', 'Ѕ' => 'Js', 'ѕ' => 'js', 'Ꙋ' => '', 'ꙋ' => '', 'Ѡ' => '', 'ѡ' => '', 'Ѿ' => '', 'ѿ' => '', 'Ѫ' => '', 'ѫ' => '', 'Ѧ' => '', 'ѧ' => '', 'Ѭ' => '', 'ѭ' => '', 'Ѩ' => '', 'ѩ' => '', 'Ѯ' => '', 'ѯ' => '', 'Ѱ' => '', 'ѱ' => '', ], // Russian - Passport (2013), ICAO // -> https://en.m.wikipedia.org/wiki/Romanization_of_Russian#content-collapsible-block-1 'ru__passport_2013' => [ 'А' => 'A', 'а' => 'a', 'Б' => 'B', 'б' => 'b', 'В' => 'V', 'в' => 'v', 'Г' => 'G', 'г' => 'g', 'Д' => 'D', 'д' => 'd', 'Е' => 'E', 'е' => 'e', 'Ё' => 'E', 'ё' => 'e', 'Ж' => 'Zh', 'ж' => 'zh', 'З' => 'Z', 'з' => 'z', 'И' => 'i', 'и' => 'i', 'Й' => 'i', 'й' => 'i', 'К' => 'K', 'к' => 'k', 'Л' => 'L', 'л' => 'l', 'М' => 'M', 'м' => 'm', 'Н' => 'N', 'н' => 'n', 'О' => 'O', 'о' => 'o', 'П' => 'P', 'п' => 'p', 'Р' => 'R', 'р' => 'r', 'С' => 'S', 'с' => 's', 'Т' => 'T', 'т' => 't', 'У' => 'U', 'у' => 'u', 'Ф' => 'F', 'ф' => 'f', 'Х' => 'Kh', 'х' => 'kh', 'Ц' => 'Ts', 'ц' => 'ts', 'Ч' => 'Ch', 'ч' => 'ch', 'ш' => 'sh', 'Ш' => 'Sh', 'Щ' => 'Shch', 'щ' => 'shch', 'Ъ' => 'Ie', 'ъ' => 'ie', 'Ы' => 'Y', 'ы' => 'y', 'Ь' => '', 'ь' => '', 'Э' => 'E', 'э' => 'e', 'Ю' => 'Iu', 'ю' => 'iu', 'Я' => 'Ia', 'я' => 'ia', 'І' => '', 'і' => '', 'Ѳ' => '', 'ѳ' => '', 'Ѣ' => '', 'ѣ' => '', 'Ѵ' => '', 'ѵ' => '', 'Є' => '', 'є' => '', 'Ѥ' => '', 'ѥ' => '', 'Ѕ' => '', 'ѕ' => '', 'Ꙋ' => '', 'ꙋ' => '', 'Ѡ' => '', 'ѡ' => '', 'Ѿ' => '', 'ѿ' => '', 'Ѫ' => '', 'ѫ' => '', 'Ѧ' => '', 'ѧ' => '', 'Ѭ' => '', 'ѭ' => '', 'Ѩ' => '', 'ѩ' => '', 'Ѯ' => '', 'ѯ' => '', 'Ѱ' => '', 'ѱ' => '', ], // Ukrainian // -> https://zakon.rada.gov.ua/laws/show/55-2010-%D0%BF?lang=en 'uk' => [ 'Г' => 'H', 'г' => 'h', 'Ґ' => 'G', 'ґ' => 'g', 'Є' => 'Ye', 'є' => 'ye', 'И' => 'Y', 'и' => 'y', 'І' => 'I', 'і' => 'i', 'Ї' => 'Yi', 'ї' => 'yi', 'Й' => 'Y', 'й' => 'y', 'Х' => 'Kh', 'х' => 'kh', 'Ц' => 'Ts', 'ц' => 'ts', 'Ч' => 'Ch', 'ч' => 'ch', 'Ш' => 'Sh', 'ш' => 'sh', 'Щ' => 'Shch', 'щ' => 'shch', ], // Kazakh 'kk' => [ 'Ә' => 'A', 'Ғ' => 'G', 'Қ' => 'Q', 'Ң' => 'N', 'Ө' => 'O', 'Ұ' => 'U', 'Ү' => 'U', 'Һ' => 'H', 'ә' => 'a', 'ғ' => 'g', 'қ' => 'q', 'ң' => 'n', 'ө' => 'o', 'ұ' => 'u', 'ү' => 'u', 'һ' => 'h', ], // Czech 'cs' => [ 'á' => 'a', 'Á' => 'A', 'č' => 'c', 'Č' => 'C', 'ď' => 'd', 'Ď' => 'D', 'é' => 'e', 'É' => 'E', 'ě' => 'e', 'Ě' => 'E', 'í' => 'i', 'Í' => 'I', 'ň' => 'n', 'Ň' => 'N', 'ó' => 'o', 'Ó' => 'O', 'ř' => 'r', 'Ř' => 'R', 'š' => 's', 'Š' => 'S', 'ť' => 't', 'Ť' => 'T', 'ú' => 'u', 'Ú' => 'U', 'ů' => 'u', 'Ů' => 'U', 'ý' => 'y', 'Ý' => 'Y', 'ž' => 'z', 'Ž' => 'Z', ], // Danish 'da' => [ 'Æ' => 'Ae', 'æ' => 'ae', 'Ø' => 'Oe', 'ø' => 'oe', 'Å' => 'Aa', 'å' => 'aa', 'É' => 'E', 'é' => 'e', ], // Polish 'pl' => [ 'ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z', 'ż' => 'z', 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'E', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'O', 'Ś' => 'S', 'Ź' => 'Z', 'Ż' => 'Z', ], // Romanian 'ro' => [ 'ă' => 'a', 'â' => 'a', 'Ă' => 'A', 'Â' => 'A', 'î' => 'i', 'Î' => 'I', 'ș' => 's', 'ş' => 's', 'Ş' => 'S', 'Ș' => 'S', 'ț' => 't', 'ţ' => 't', 'Ţ' => 'T', 'Ț' => 'T', ], // Esperanto 'eo' => [ 'ĉ' => 'cx', 'ĝ' => 'gx', 'ĥ' => 'hx', 'ĵ' => 'jx', 'ŝ' => 'sx', 'ŭ' => 'ux', 'Ĉ' => 'CX', 'Ĝ' => 'GX', 'Ĥ' => 'HX', 'Ĵ' => 'JX', 'Ŝ' => 'SX', 'Ŭ' => 'UX', ], // Estonian 'et' => [ 'Š' => 'S', 'Ž' => 'Z', 'Õ' => 'O', 'Ä' => 'A', 'Ö' => 'O', 'Ü' => 'U', 'š' => 's', 'ž' => 'z', 'õ' => 'o', 'ä' => 'a', 'ö' => 'o', 'ü' => 'u', ], // Latvian 'lv' => [ 'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n', 'š' => 's', 'ū' => 'u', 'ž' => 'z', 'Ā' => 'A', 'Č' => 'C', 'Ē' => 'E', 'Ģ' => 'G', 'Ī' => 'i', 'Ķ' => 'k', 'Ļ' => 'L', 'Ņ' => 'N', 'Š' => 'S', 'Ū' => 'u', 'Ž' => 'Z', ], // Lithuanian 'lt' => [ 'ą' => 'a', 'č' => 'c', 'ę' => 'e', 'ė' => 'e', 'į' => 'i', 'š' => 's', 'ų' => 'u', 'ū' => 'u', 'ž' => 'z', 'Ą' => 'A', 'Č' => 'C', 'Ę' => 'E', 'Ė' => 'E', 'Į' => 'I', 'Š' => 'S', 'Ų' => 'U', 'Ū' => 'U', 'Ž' => 'Z', ], // Norwegian 'no' => [ 'Æ' => 'AE', 'æ' => 'ae', 'Ø' => 'OE', 'ø' => 'oe', 'Å' => 'AA', 'å' => 'aa', ], // Vietnamese 'vi' => [ 'Á' => 'A', 'À' => 'A', 'Ả' => 'A', 'Ã' => 'A', 'Ạ' => 'A', 'Ă' => 'A', 'Ắ' => 'A', 'Ằ' => 'A', 'Ẳ' => 'A', 'Ẵ' => 'A', 'Ặ' => 'A', 'Â' => 'A', 'Ấ' => 'A', 'Ầ' => 'A', 'Ẩ' => 'A', 'Ẫ' => 'A', 'Ậ' => 'A', 'á' => 'a', 'à' => 'a', 'ả' => 'a', 'ã' => 'a', 'ạ' => 'a', 'ă' => 'a', 'ắ' => 'a', 'ằ' => 'a', 'ẳ' => 'a', 'ẵ' => 'a', 'ặ' => 'a', 'â' => 'a', 'ấ' => 'a', 'ầ' => 'a', 'ẩ' => 'a', 'ẫ' => 'a', 'ậ' => 'a', 'É' => 'E', 'È' => 'E', 'Ẻ' => 'E', 'Ẽ' => 'E', 'Ẹ' => 'E', 'Ê' => 'E', 'Ế' => 'E', 'Ề' => 'E', 'Ể' => 'E', 'Ễ' => 'E', 'Ệ' => 'E', 'é' => 'e', 'è' => 'e', 'ẻ' => 'e', 'ẽ' => 'e', 'ẹ' => 'e', 'ê' => 'e', 'ế' => 'e', 'ề' => 'e', 'ể' => 'e', 'ễ' => 'e', 'ệ' => 'e', 'Í' => 'I', 'Ì' => 'I', 'Ỉ' => 'I', 'Ĩ' => 'I', 'Ị' => 'I', 'í' => 'i', 'ì' => 'i', 'ỉ' => 'i', 'ĩ' => 'i', 'ị' => 'i', 'Ó' => 'O', 'Ò' => 'O', 'Ỏ' => 'O', 'Õ' => 'O', 'Ọ' => 'O', 'Ô' => 'O', 'Ố' => 'O', 'Ồ' => 'O', 'Ổ' => 'O', 'Ỗ' => 'O', 'Ộ' => 'O', 'Ơ' => 'O', 'Ớ' => 'O', 'Ờ' => 'O', 'Ở' => 'O', 'Ỡ' => 'O', 'Ợ' => 'O', 'ó' => 'o', 'ò' => 'o', 'ỏ' => 'o', 'õ' => 'o', 'ọ' => 'o', 'ô' => 'o', 'ố' => 'o', 'ồ' => 'o', 'ổ' => 'o', 'ỗ' => 'o', 'ộ' => 'o', 'ơ' => 'o', 'ớ' => 'o', 'ờ' => 'o', 'ở' => 'o', 'ỡ' => 'o', 'ợ' => 'o', 'Ú' => 'U', 'Ù' => 'U', 'Ủ' => 'U', 'Ũ' => 'U', 'Ụ' => 'U', 'Ư' => 'U', 'Ứ' => 'U', 'Ừ' => 'U', 'Ử' => 'U', 'Ữ' => 'U', 'Ự' => 'U', 'ú' => 'u', 'ù' => 'u', 'ủ' => 'u', 'ũ' => 'u', 'ụ' => 'u', 'ư' => 'u', 'ứ' => 'u', 'ừ' => 'u', 'ử' => 'u', 'ữ' => 'u', 'ự' => 'u', 'Ý' => 'Y', 'Ỳ' => 'Y', 'Ỷ' => 'Y', 'Ỹ' => 'Y', 'Ỵ' => 'Y', 'ý' => 'y', 'ỳ' => 'y', 'ỷ' => 'y', 'ỹ' => 'y', 'ỵ' => 'y', 'Đ' => 'D', 'đ' => 'd', ], // Persian (Farsi) 'fa' => [ 'ا' => 'a', 'ب' => 'b', 'پ' => 'p', 'ت' => 't', 'ث' => 's', 'ج' => 'j', 'چ' => 'ch', 'ح' => 'h', 'خ' => 'kh', 'د' => 'd', 'ذ' => 'z', 'ر' => 'r', 'ز' => 'z', 'س' => 's', 'ش' => 'sh', 'ص' => 's', 'ض' => 'z', 'ط' => 't', 'ظ' => 'z', 'ع' => 'a', 'غ' => 'gh', 'ف' => 'f', 'ق' => 'gh', 'ک' => 'k', 'گ' => 'g', 'ل' => 'l', 'ژ' => 'zh', 'ك' => 'k', 'م' => 'm', 'ن' => 'n', 'ه' => 'h', 'و' => 'o', 'ی' => 'y', 'آ' => 'a', '٠' => '0', '١' => '1', '٢' => '2', '٣' => '3', '٤' => '4', '٥' => '5', '٦' => '6', '٧' => '7', '٨' => '8', '٩' => '9', ], // Arabic 'ar' => [ 'أ' => 'a', 'ب' => 'b', 'ت' => 't', 'ث' => 'th', 'ج' => 'g', 'ح' => 'h', 'خ' => 'kh', 'د' => 'd', 'ذ' => 'th', 'ر' => 'r', 'ز' => 'z', 'س' => 's', 'ش' => 'sh', 'ص' => 's', 'ض' => 'd', 'ط' => 't', 'ظ' => 'th', 'ع' => 'aa', 'غ' => 'gh', 'ف' => 'f', 'ق' => 'k', 'ك' => 'k', 'ل' => 'l', 'م' => 'm', 'ن' => 'n', 'ه' => 'h', 'و' => 'o', 'ي' => 'y', 'ا' => 'a', 'إ' => 'a', 'آ' => 'a', 'ؤ' => 'o', 'ئ' => 'y', 'ء' => 'aa', '٠' => '0', '١' => '1', '٢' => '2', '٣' => '3', '٤' => '4', '٥' => '5', '٦' => '6', '٧' => '7', '٨' => '8', '٩' => '9', ], // Serbian 'sr' => [ 'đ' => 'dj', 'ž' => 'z', 'ć' => 'c', 'č' => 'c', 'š' => 's', 'Đ' => 'Dj', 'Ž' => 'Z', 'Ć' => 'C', 'Č' => 'C', 'Š' => 'S', 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'ђ' => 'dj', 'е' => 'e', 'ж' => 'z', 'з' => 'z', 'и' => 'i', 'ј' => 'j', 'к' => 'k', 'л' => 'l', 'љ' => 'lj', 'м' => 'm', 'н' => 'n', 'њ' => 'nj', 'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'ћ' => 'c', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'c', 'џ' => 'dz', 'ш' => 's', 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Ђ' => 'Dj', 'Е' => 'E', 'Ж' => 'Z', 'З' => 'Z', 'И' => 'I', 'Ј' => 'j', 'К' => 'K', 'Л' => 'L', 'Љ' => 'Lj', 'М' => 'M', 'Н' => 'N', 'Њ' => 'Nj', 'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'Ћ' => 'C', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', 'Ч' => 'C', 'Џ' => 'Dz', 'Ш' => 'S', ], // Serbian - Cyrillic 'sr__cyr' => [ 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'ђ' => 'dj', 'е' => 'e', 'ж' => 'z', 'з' => 'z', 'и' => 'i', 'ј' => 'j', 'к' => 'k', 'л' => 'l', 'љ' => 'lj', 'м' => 'm', 'н' => 'n', 'њ' => 'nj', 'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'ћ' => 'c', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'c', 'џ' => 'dz', 'ш' => 's', 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Ђ' => 'Dj', 'Е' => 'E', 'Ж' => 'Z', 'З' => 'Z', 'И' => 'I', 'Ј' => 'j', 'К' => 'K', 'Л' => 'L', 'Љ' => 'Lj', 'М' => 'M', 'Н' => 'N', 'Њ' => 'Nj', 'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'Ћ' => 'C', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', 'Ч' => 'C', 'Џ' => 'Dz', 'Ш' => 'S', ], // Serbian - Latin 'sr__lat' => [ 'đ' => 'dj', 'ž' => 'z', 'ć' => 'c', 'č' => 'c', 'š' => 's', 'Đ' => 'Dj', 'Ž' => 'Z', 'Ć' => 'C', 'Č' => 'C', 'Š' => 'S', ], // Azerbaijani 'az' => [ 'ç' => 'c', 'ə' => 'e', 'ğ' => 'g', 'ı' => 'i', 'ö' => 'o', 'ş' => 's', 'ü' => 'u', 'Ç' => 'C', 'Ə' => 'E', 'Ğ' => 'G', 'İ' => 'I', 'Ö' => 'O', 'Ş' => 'S', 'Ü' => 'U', ], // Slovak 'sk' => [ 'á' => 'a', 'ä' => 'a', 'č' => 'c', 'ď' => 'd', 'é' => 'e', 'í' => 'i', 'ľ' => 'l', 'ĺ' => 'l', 'ň' => 'n', 'ó' => 'o', 'ô' => 'o', 'ŕ' => 'r', 'š' => 's', 'ť' => 't', 'ú' => 'u', 'ý' => 'y', 'ž' => 'z', 'Á' => 'A', 'Ä' => 'A', 'Č' => 'C', 'Ď' => 'D', 'É' => 'E', 'Í' => 'I', 'Ľ' => 'L', 'Ĺ' => 'L', 'Ň' => 'N', 'Ó' => 'O', 'Ô' => 'O', 'Ŕ' => 'R', 'Š' => 'S', 'Ť' => 'T', 'Ú' => 'U', 'Ý' => 'Y', 'Ž' => 'Z', ], // French 'fr' => [ 'Æ' => 'AE', 'æ' => 'ae', 'Œ' => 'OE', 'œ' => 'oe', 'â' => 'a', 'Â' => 'A', 'à' => 'a', 'À' => 'A', 'ä' => 'a', 'Ä' => 'A', 'ç' => 'c', 'Ç' => 'C', 'é' => 'e', 'É' => 'E', 'ê' => 'e', 'Ê' => 'E', 'ë' => 'e', 'Ë' => 'E', 'è' => 'e', 'È' => 'E', 'ï' => 'i', 'î' => 'i', 'Ï' => 'I', 'Î' => 'I', 'ÿ' => 'y', 'Ÿ' => 'Y', 'ô' => 'o', 'Ô' => 'O', 'ö' => 'o', 'Ö' => 'O', 'û' => 'u', 'Û' => 'U', 'ù' => 'u', 'Ù' => 'U', 'ü' => 'u', 'Ü' => 'U', ], // Austrian (French) 'fr_at' => [ 'ß' => 'sz', 'ẞ' => 'SZ', 'Æ' => 'AE', 'æ' => 'ae', 'Œ' => 'OE', 'œ' => 'oe', 'â' => 'a', 'Â' => 'A', 'à' => 'a', 'À' => 'A', 'ä' => 'a', 'Ä' => 'A', 'ç' => 'c', 'Ç' => 'C', 'é' => 'e', 'É' => 'E', 'ê' => 'e', 'Ê' => 'E', 'ë' => 'e', 'Ë' => 'E', 'è' => 'e', 'È' => 'E', 'ï' => 'i', 'î' => 'i', 'Ï' => 'I', 'Î' => 'I', 'ÿ' => 'y', 'Ÿ' => 'Y', 'ô' => 'o', 'Ô' => 'O', 'ö' => 'o', 'Ö' => 'O', 'û' => 'u', 'Û' => 'U', 'ù' => 'u', 'Ù' => 'U', 'ü' => 'u', 'Ü' => 'U', ], // Switzerland (French) 'fr_ch' => [ 'ß' => 'ss', 'ẞ' => 'SS', 'Æ' => 'AE', 'æ' => 'ae', 'Œ' => 'OE', 'œ' => 'oe', 'â' => 'a', 'Â' => 'A', 'à' => 'a', 'À' => 'A', 'ä' => 'a', 'Ä' => 'A', 'ç' => 'c', 'Ç' => 'C', 'é' => 'e', 'É' => 'E', 'ê' => 'e', 'Ê' => 'E', 'ë' => 'e', 'Ë' => 'E', 'è' => 'e', 'È' => 'E', 'ï' => 'i', 'î' => 'i', 'Ï' => 'I', 'Î' => 'I', 'ÿ' => 'y', 'Ÿ' => 'Y', 'ô' => 'o', 'Ô' => 'O', 'ö' => 'o', 'Ö' => 'O', 'û' => 'u', 'Û' => 'U', 'ù' => 'u', 'Ù' => 'U', 'ü' => 'u', 'Ü' => 'U', ], // German 'de' => [ 'Ä' => 'Ae', 'Ö' => 'Oe', 'Ü' => 'Ue', 'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss', 'ẞ' => 'SS', ], // Austrian (German) 'de_at' => [ 'Ä' => 'Ae', 'Ö' => 'Oe', 'Ü' => 'Ue', 'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'sz', 'ẞ' => 'SZ', ], // Switzerland (German) 'de_ch' => [ 'Ä' => 'Ae', 'Ö' => 'Oe', 'Ü' => 'Ue', 'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss', 'ẞ' => 'SS', ], // Bengali (Bangla) 'bn' => [ 'ভ্ল' => 'vl', 'পশ' => 'psh', 'ব্ধ' => 'bdh', 'ব্জ' => 'bj', 'ব্দ' => 'bd', 'ব্ব' => 'bb', 'ব্ল' => 'bl', 'ভ' => 'v', 'ব' => 'b', 'চ্ঞ' => 'cNG', 'চ্ছ' => 'cch', 'চ্চ' => 'cc', 'ছ' => 'ch', 'চ' => 'c', 'ধ্ন' => 'dhn', 'ধ্ম' => 'dhm', 'দ্ঘ' => 'dgh', 'দ্ধ' => 'ddh', 'দ্ভ' => 'dv', 'দ্ম' => 'dm', 'ড্ড' => 'DD', 'ঢ' => 'Dh', 'ধ' => 'dh', 'দ্গ' => 'dg', 'দ্দ' => 'dd', 'ড' => 'D', 'দ' => 'd', '।' => '.', 'ঘ্ন' => 'Ghn', 'গ্ধ' => 'Gdh', 'গ্ণ' => 'GN', 'গ্ন' => 'Gn', 'গ্ম' => 'Gm', 'গ্ল' => 'Gl', 'জ্ঞ' => 'jNG', 'ঘ' => 'Gh', 'গ' => 'g', 'হ্ণ' => 'hN', 'হ্ন' => 'hn', 'হ্ম' => 'hm', 'হ্ল' => 'hl', 'হ' => 'h', 'জ্ঝ' => 'jjh', 'ঝ' => 'jh', 'জ্জ' => 'jj', 'জ' => 'j', 'ক্ষ্ণ' => 'kxN', 'ক্ষ্ম' => 'kxm', 'ক্ষ' => 'ksh', 'কশ' => 'ksh', 'ক্ক' => 'kk', 'ক্ট' => 'kT', 'ক্ত' => 'kt', 'ক্ল' => 'kl', 'ক্স' => 'ks', 'খ' => 'kh', 'ক' => 'k', 'ল্ভ' => 'lv', 'ল্ধ' => 'ldh', 'লখ' => 'lkh', 'লঘ' => 'lgh', 'লফ' => 'lph', 'ল্ক' => 'lk', 'ল্গ' => 'lg', 'ল্ট' => 'lT', 'ল্ড' => 'lD', 'ল্প' => 'lp', 'ল্ম' => 'lm', 'ল্ল' => 'll', 'ল্ব' => 'lb', 'ল' => 'l', 'ম্থ' => 'mth', 'ম্ফ' => 'mf', 'ম্ভ' => 'mv', 'মপ্ল' => 'mpl', 'ম্ন' => 'mn', 'ম্প' => 'mp', 'ম্ম' => 'mm', 'ম্ল' => 'ml', 'ম্ব' => 'mb', 'ম' => 'm', '০' => '0', '১' => '1', '২' => '2', '৩' => '3', '৪' => '4', '৫' => '5', '৬' => '6', '৭' => '7', '৮' => '8', '৯' => '9', 'ঙ্ক্ষ' => 'Ngkx', 'ঞ্ছ' => 'nch', 'ঙ্ঘ' => 'ngh', 'ঙ্খ' => 'nkh', 'ঞ্ঝ' => 'njh', 'ঙ্গৌ' => 'ngOU', 'ঙ্গৈ' => 'ngOI', 'ঞ্চ' => 'nc', 'ঙ্ক' => 'nk', 'ঙ্ষ' => 'Ngx', 'ঙ্গ' => 'ngo', 'ঙ্ম' => 'Ngm', 'ঞ্জ' => 'nj', 'ন্ধ' => 'ndh', 'ন্ঠ' => 'nTh', 'ণ্ঠ' => 'NTh', 'ন্থ' => 'nth', 'ঙ্গা' => 'nga', 'ঙ্গি' => 'ngi', 'ঙ্গী' => 'ngI', 'ঙ্গু' => 'ngu', 'ঙ্গূ' => 'ngU', 'ঙ্গে' => 'nge', 'ঙ্গো' => 'ngO', 'ণ্ঢ' => 'NDh', 'নশ' => 'nsh', 'ঙর' => 'Ngr', 'ঞর' => 'NGr', 'ংর' => 'ngr', 'ঙ' => 'Ng', 'ঞ' => 'NG', 'ং' => 'ng', 'ন্ন' => 'nn', 'ণ্ণ' => 'NN', 'ণ্ন' => 'Nn', 'ন্ম' => 'nm', 'ণ্ম' => 'Nm', 'ন্দ' => 'nd', 'ন্ট' => 'nT', 'ণ্ট' => 'NT', 'ন্ড' => 'nD', 'ণ্ড' => 'ND', 'ন্ত' => 'nt', 'ন্স' => 'ns', 'ন' => 'n', 'ণ' => 'N', 'ৈ' => 'OI', 'ৌ' => 'OU', 'ো' => 'O', 'ঐ' => 'OI', 'ঔ' => 'OU', 'অ' => 'o', 'ও' => 'oo', 'ফ্ল' => 'fl', 'প্ট' => 'pT', 'প্ত' => 'pt', 'প্ন' => 'pn', 'প্প' => 'pp', 'প্ল' => 'pl', 'প্স' => 'ps', 'ফ' => 'f', 'প' => 'p', 'ৃ' => 'rri', 'ঋ' => 'rri', 'রর‍্য' => 'rry', '্র্য' => 'ry', '্রর' => 'rr', 'ড়্গ' => 'Rg', 'ঢ়' => 'Rh', 'ড়' => 'R', 'র' => 'r', '্র' => 'r', 'শ্ছ' => 'Sch', 'ষ্ঠ' => 'ShTh', 'ষ্ফ' => 'Shf', 'স্ক্ল' => 'skl', 'স্খ' => 'skh', 'স্থ' => 'sth', 'স্ফ' => 'sf', 'শ্চ' => 'Sc', 'শ্ত' => 'St', 'শ্ন' => 'Sn', 'শ্ম' => 'Sm', 'শ্ল' => 'Sl', 'ষ্ক' => 'Shk', 'ষ্ট' => 'ShT', 'ষ্ণ' => 'ShN', 'ষ্প' => 'Shp', 'ষ্ম' => 'Shm', 'স্প্ল' => 'spl', 'স্ক' => 'sk', 'স্ট' => 'sT', 'স্ত' => 'st', 'স্ন' => 'sn', 'স্প' => 'sp', 'স্ম' => 'sm', 'স্ল' => 'sl', 'শ' => 'S', 'ষ' => 'Sh', 'স' => 's', 'ু' => 'u', 'উ' => 'u', 'অ্য' => 'oZ', 'ত্থ' => 'tth', 'ৎ' => 'tt', 'ট্ট' => 'TT', 'ট্ম' => 'Tm', 'ঠ' => 'Th', 'ত্ন' => 'tn', 'ত্ম' => 'tm', 'থ' => 'th', 'ত্ত' => 'tt', 'ট' => 'T', 'ত' => 't', 'অ্যা' => 'AZ', 'া' => 'a', 'আ' => 'a', 'য়া' => 'ya', 'য়' => 'y', 'ি' => 'i', 'ই' => 'i', 'ী' => 'ee', 'ঈ' => 'ee', 'ূ' => 'uu', 'ঊ' => 'uu', 'ে' => 'e', 'এ' => 'e', 'য' => 'z', '্য' => 'Z', 'ইয়' => 'y', 'ওয়' => 'w', '্ব' => 'w', 'এক্স' => 'x', 'ঃ' => ':', 'ঁ' => 'nn', '্‌' => '', ], // English 'en' => [ ], // Latin (+ Cyrillic ?) chars // // -> Mix of languages, but we need to keep this here, so that different languages can handle there own behavior. 'latin' => [ '˚' => '0', '¹' => '1', '²' => '2', '³' => '3', '⁴' => '4', '⁵' => '5', '⁶' => '6', '⁷' => '7', '⁸' => '8', '⁹' => '9', '₀' => '0', '₁' => '1', '₂' => '2', '₃' => '3', '₄' => '4', '₅' => '5', '₆' => '6', '₇' => '7', '₈' => '8', '₉' => '9', '௦' => '0', '௧' => '1', '௨' => '2', '௩' => '3', '௪' => '4', '௫' => '5', '௬' => '6', '௭' => '7', '௮' => '8', '௯' => '9', '௰' => '10', '௱' => '100', '௲' => '1000', 'Ꜳ' => 'AA', 'ꜳ' => 'aa', 'Æ' => 'AE', 'æ' => 'ae', 'Ǽ' => 'AE', 'ǽ' => 'ae', 'Ꜵ' => 'AO', 'ꜵ' => 'ao', 'Ꜷ' => 'AU', 'ꜷ' => 'au', 'Ꜹ' => 'AV', 'ꜹ' => 'av', 'Ꜻ' => 'av', 'ꜻ' => 'av', 'Ꜽ' => 'AY', 'ꜽ' => 'ay', 'ȸ' => 'db', 'ʣ' => 'dz', 'ʥ' => 'dz', 'ʤ' => 'dezh', '🙰' => 'et', 'ff' => 'ff', 'ffi' => 'ffi', 'ffl' => 'ffl', 'fi' => 'fi', 'fl' => 'fl', 'ʩ' => 'feng', 'IJ' => 'IJ', 'ij' => 'ij', 'ʪ' => 'ls', 'ʫ' => 'lz', 'ɮ' => 'lezh', 'ȹ' => 'qp', 'ʨ' => 'tc', 'ʦ' => 'ts', 'ʧ' => 'tesh', 'Œ' => 'OE', 'œ' => 'oe', 'Ꝏ' => 'OO', 'ꝏ' => 'oo', 'ẞ' => 'SS', 'ß' => 'ss', 'st' => 'st', 'ſt' => 'st', 'Ꜩ' => 'TZ', 'ꜩ' => 'tz', 'ᵫ' => 'ue', 'Aι' => 'Ai', 'αι' => 'ai', 'Ει' => 'Ei', 'ει' => 'ei', 'Οι' => 'Oi', 'οι' => 'oi', 'Ου' => 'Oy', 'ου' => 'oy', 'Υι' => 'Yi', 'υι' => 'yi', 'ἀ' => 'a', 'ἁ' => 'a', 'ἂ' => 'a', 'ἃ' => 'a', 'ἄ' => 'a', 'ἅ' => 'a', 'ἆ' => 'a', 'ἇ' => 'a', 'Ἀ' => 'A', 'Ἁ' => 'A', 'Ἂ' => 'A', 'Ἃ' => 'A', 'Ἄ' => 'A', 'Ἅ' => 'A', 'Ἆ' => 'A', 'Ἇ' => 'A', 'ᾰ' => 'a', 'ᾱ' => 'a', 'ᾲ' => 'a', 'ᾳ' => 'a', 'ᾴ' => 'a', 'ᾶ' => 'a', 'ᾷ' => 'a', 'Ᾰ' => 'A', 'Ᾱ' => 'A', 'Ὰ' => 'A', 'Ά' => 'A', 'ᾼ' => 'A', 'Ä' => 'A', 'ä' => 'a', 'À' => 'A', 'à' => 'a', 'Á' => 'A', 'á' => 'a', 'Â' => 'A', 'â' => 'a', 'Ã' => 'A', 'ã' => 'a', 'A̧' => 'A', 'a̧' => 'a', 'Ą' => 'A', 'ą' => 'a', 'Ⱥ' => 'A', 'ⱥ' => 'a', 'Å' => 'A', 'å' => 'a', 'Ǻ' => 'A', 'ǻ' => 'a', 'Ă' => 'A', 'ă' => 'a', 'Ǎ' => 'A', 'ǎ' => 'a', 'Ȧ' => 'A', 'ȧ' => 'a', 'Ạ' => 'A', 'ạ' => 'a', 'Ā' => 'A', 'ā' => 'a', 'ª' => 'a', 'Ɓ' => 'B', 'Ѣ' => 'E', 'ѣ' => 'e', 'Ç' => 'C', 'ç' => 'c', 'Ĉ' => 'C', 'ĉ' => 'c', 'C̈' => 'C', 'c̈' => 'c', 'C̨' => 'C', 'c̨' => 'c', 'Ȼ' => 'C', 'ȼ' => 'c', 'Č' => 'C', 'č' => 'c', 'Ć' => 'C', 'ć' => 'c', 'C̀' => 'C', 'c̀' => 'c', 'Ċ' => 'C', 'ċ' => 'c', 'C̣' => 'C', 'c̣' => 'c', 'C̄' => 'C', 'c̄' => 'c', 'C̃' => 'C', 'c̃' => 'c', 'Ð' => 'D', 'Đ' => 'D', 'ð' => 'd', 'đ' => 'd', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ĕ' => 'E', 'Ė' => 'E', 'Ȩ' => 'E', 'ȩ' => 'e', 'Ę' => 'E', 'ę' => 'e', 'Ɇ' => 'E', 'ɇ' => 'e', 'Ě' => 'E', 'ě' => 'e', 'Ẹ' => 'E', 'ẹ' => 'e', 'Ē' => 'E', 'ē' => 'e', 'Ẽ' => 'E', 'ẽ' => 'e', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', 'ĕ' => 'e', 'ė' => 'e', 'ƒ' => 'f', 'Ѳ' => 'F', 'ѳ' => 'f', 'Ĝ' => 'G', 'Ġ' => 'G', 'ĝ' => 'g', 'ġ' => 'g', 'Ĥ' => 'H', 'Ħ' => 'H', 'ĥ' => 'h', 'ħ' => 'h', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', 'Ï' => 'I', 'Ĩ' => 'I', 'Ĭ' => 'I', 'Ǐ' => 'I', 'Į' => 'I', 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ĩ' => 'i', 'ĭ' => 'i', 'ǐ' => 'i', 'į' => 'i', 'І' => 'I', 'і' => 'i', 'I̧' => 'I', 'i̧' => 'i', 'Ɨ' => 'I', 'ɨ' => 'i', 'İ' => 'I', 'i' => 'i', 'Ị' => 'I', 'ị' => 'i', 'Ī' => 'I', 'ī' => 'i', 'Ĵ' => 'J', 'ĵ' => 'j', 'J́́' => 'J', 'j́' => 'j', 'J̀̀' => 'J', 'j̀' => 'j', 'J̈' => 'J', 'j̈' => 'j', 'J̧' => 'J', 'j̧' => 'j', 'J̨' => 'J', 'j̨' => 'j', 'Ɉ' => 'J', 'ɉ' => 'j', 'J̌' => 'J', 'ǰ' => 'j', 'J̇' => 'J', 'j' => 'j', 'J̣' => 'J', 'j̣' => 'j', 'J̄' => 'J', 'j̄' => 'j', 'J̃' => 'J', 'j̃' => 'j', 'Й' => 'i', 'й' => 'i', 'ĸ' => 'k', 'Ĺ' => 'L', 'Ľ' => 'L', 'Ŀ' => 'L', 'ĺ' => 'l', 'ľ' => 'l', 'ŀ' => 'l', 'L̀' => 'L', 'l̀' => 'l', 'L̂' => 'L', 'l̂' => 'l', 'L̈' => 'L', 'l̈' => 'l', 'Ļ' => 'L', 'ļ' => 'l', 'L̨' => 'L', 'l̨' => 'l', 'Ł' => 'L', 'ł' => 'l', 'Ƚ' => 'L', 'ƚ' => 'l', 'L̇' => 'L', 'l̇' => 'l', 'Ḷ' => 'L', 'ḷ' => 'l', 'L̄' => 'L', 'l̄' => 'l', 'L̃' => 'L', 'l̃' => 'l', 'Ñ' => 'N', 'ñ' => 'n', 'Ŋ' => 'N', 'ŋ' => 'n', 'ʼn' => 'n', 'Ń' => 'N', 'ń' => 'n', 'Ǹ' => 'N', 'ǹ' => 'n', 'N̂' => 'N', 'n̂' => 'n', 'N̈' => 'N', 'n̈' => 'n', 'Ņ' => 'N', 'ņ' => 'n', 'N̨' => 'N', 'n̨' => 'n', 'Ꞥ' => 'N', 'ꞥ' => 'n', 'Ň' => 'N', 'ň' => 'n', 'Ṅ' => 'N', 'ṅ' => 'n', 'Ṇ' => 'N', 'ṇ' => 'n', 'N̄' => 'N', 'n̄' => 'n', 'Ö' => 'O', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ō' => 'O', 'Ŏ' => 'O', 'Ǒ' => 'O', 'Ő' => 'O', 'Ơ' => 'O', 'Ø' => 'O', 'Ǿ' => 'O', 'ö' => 'o', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'õ' => 'o', 'ō' => 'o', 'ŏ' => 'o', 'ǒ' => 'o', 'ő' => 'o', 'ơ' => 'o', 'ø' => 'o', 'ǿ' => 'o', 'º' => 'o', 'O̧' => 'O', 'o̧' => 'o', 'Ǫ' => 'O', 'ǫ' => 'o', 'Ɵ' => 'O', 'ɵ' => 'o', 'Ȯ' => 'O', 'ȯ' => 'o', 'Ọ' => 'O', 'ọ' => 'o', 'Ŕ' => 'R', 'Ŗ' => 'R', 'ŕ' => 'r', 'ŗ' => 'r', 'Ŝ' => 'S', 'Ș' => 'S', 'ș' => 's', 'Ś' => 'S', 'ś' => 's', 'S̀' => 'S', 's̀' => 's', 'Ŝ̀' => 'S', 'ŝ' => 's', 'S̈' => 'S', 's̈' => 's', 'Ş' => 'S', 'ş' => 's', 'S̨' => 'S', 's̨' => 's', 'Ꞩ' => 'S', 'ꞩ' => 's', 'Š' => 'S', 'š' => 's', 'Ṡ' => 'S', 'ṡ' => 's', 'Ṣ' => 'S', 'ṣ' => 's', 'S̄' => 'S', 's̄' => 's', 'S̃' => 'S', 's̃' => 's', 'ſ' => 's', 'Ţ' => 'T', 'Ț' => 'T', 'Ŧ' => 'T', 'Þ' => 'TH', 'ţ' => 't', 'ț' => 't', 'ŧ' => 't', 'þ' => 'th', 'T́' => 'T', 't́' => 't', 'T̀' => 'T', 't̀' => 't', 'T̂' => 'T', 't̂' => 't', 'T̈' => 'T', 'ẗ' => 't', 'T̨' => 'T', 't̨' => 't', 'Ⱦ' => 'T', 'ⱦ' => 't', 'Ť' => 'T', 'ť' => 't', 'Ṫ' => 'T', 'ṫ' => 't', 'Ṭ' => 'T', 'ṭ' => 't', 'T̄' => 'T', 't̄' => 't', 'T̃' => 'T', 't̃' => 't', 'Ü' => 'U', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ũ' => 'U', 'Ŭ' => 'U', 'Ű' => 'U', 'Ų' => 'U', 'Ư' => 'U', 'Ǔ' => 'U', 'Ǖ' => 'U', 'Ǘ' => 'U', 'Ǚ' => 'U', 'Ǜ' => 'U', 'ü' => 'u', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ũ' => 'u', 'ŭ' => 'u', 'ű' => 'u', 'ų' => 'u', 'ư' => 'u', 'ǔ' => 'u', 'ǖ' => 'u', 'ǘ' => 'u', 'ǚ' => 'u', 'ǜ' => 'u', 'U̧' => 'U', 'u̧' => 'u', 'Ʉ' => 'U', 'ʉ' => 'u', 'U̇' => 'U', 'u̇' => 'u', 'Ụ' => 'U', 'ụ' => 'u', 'Ū' => 'U', 'ū' => 'u', 'Ʊ' => 'U', 'ʊ' => 'u', 'Ŵ' => 'W', 'ŵ' => 'w', 'Ẁ' => 'W', 'ẁ' => 'w', 'Ẃ' => 'W', 'ẃ' => 'w', 'Ẅ' => 'W', 'ẅ' => 'w', 'Ѵ' => 'I', 'ѵ' => 'i', 'Ꙗ' => 'Ja', 'ꙗ' => 'ja', 'Є' => 'Je', 'є' => 'je', 'Ѥ' => 'Je', 'ѥ' => 'je', 'Ѕ' => 'Dz', 'ѕ' => 'dz', 'Ꙋ' => 'U', 'ꙋ' => 'u', 'Ѡ' => 'O', 'ѡ' => 'o', 'Ѿ' => 'Ot', 'ѿ' => 'ot', 'Ѫ' => 'U', 'ѫ' => 'u', 'Ѧ' => 'Ja', 'ѧ' => 'ja', 'Ѭ' => 'Ju', 'ѭ' => 'ju', 'Ѩ' => 'Ja', 'ѩ' => 'Ja', 'Ѯ' => 'Ks', 'ѯ' => 'ks', 'Ѱ' => 'Ps', 'ѱ' => 'ps', 'Х' => 'X', 'х' => 'x', 'Ý' => 'Y', 'Ÿ' => 'Y', 'Ŷ' => 'Y', 'ý' => 'y', 'ÿ' => 'y', 'ŷ' => 'y', 'Ỳ' => 'Y', 'ỳ' => 'y', 'Y̧' => 'Y', 'y̧' => 'y', 'Y̨' => 'Y', 'y̨' => 'y', 'Ɏ' => 'Y', 'ɏ' => 'y', 'Y̌' => 'Y', 'y̌' => 'y', 'Ẏ' => 'Y', 'ẏ' => 'y', 'Ỵ' => 'Y', 'ỵ' => 'y', 'Ȳ' => 'Y', 'ȳ' => 'y', 'Ỹ' => 'Y', 'ỹ' => 'y', 'Щ' => 'Shh', 'щ' => 'shh', 'Ź' => 'Z', 'ź' => 'z', 'Z̀' => 'Z', 'z̀' => 'z', 'Ẑ' => 'Z', 'ẑ' => 'z', 'Z̈' => 'Z', 'z̈' => 'z', 'Z̧' => 'Z', 'z̧' => 'z', 'Z̨' => 'Z', 'z̨' => 'z', 'Ƶ' => 'Z', 'ƶ' => 'z', 'Ž' => 'Z', 'ž' => 'z', 'Ż' => 'Z', 'ż' => 'z', 'Ẓ' => 'Z', 'ẓ' => 'z', 'Z̄' => 'Z', 'z̄' => 'z', 'Z̃' => 'Z', 'z̃' => 'z', ], // whitespace chars ' ' => [ "\xc2\xa0" => ' ', // 'NO-BREAK SPACE' "\xe1\x9a\x80" => ' ', // 'OGHAM SPACE MARK' "\xe2\x80\x80" => ' ', // 'EN QUAD' "\xe2\x80\x81" => ' ', // 'EM QUAD' "\xe2\x80\x82" => ' ', // 'EN SPACE' "\xe2\x80\x83" => ' ', // 'EM SPACE' "\xe2\x80\x84" => ' ', // 'THREE-PER-EM SPACE' "\xe2\x80\x85" => ' ', // 'FOUR-PER-EM SPACE' "\xe2\x80\x86" => ' ', // 'SIX-PER-EM SPACE' "\xe2\x80\x87" => ' ', // 'FIGURE SPACE' "\xe2\x80\x88" => ' ', // 'PUNCTUATION SPACE' "\xe2\x80\x89" => ' ', // 'THIN SPACE' "\xe2\x80\x8a" => ' ', // 'HAIR SPACE' "\xe2\x80\xa8" => ' ', // 'LINE SEPARATOR' "\xe2\x80\xa9" => ' ', // 'PARAGRAPH SEPARATOR' "\xe2\x80\x8b" => ' ', // 'ZERO WIDTH SPACE' "\xe2\x80\xaf" => ' ', // 'NARROW NO-BREAK SPACE' "\xe2\x81\x9f" => ' ', // 'MEDIUM MATHEMATICAL SPACE' "\xe3\x80\x80" => ' ', // 'IDEOGRAPHIC SPACE' "\xef\xbe\xa0" => ' ', // 'HALFWIDTH HANGUL FILLER' ], // commonly used in Word documents 'msword' => [ "\xc2\xab" => '<<', // « (U+00AB) in UTF-8 "\xc2\xbb" => '>>', // » (U+00BB) in UTF-8 "\xe2\x80\x98" => "'", // ‘ (U+2018) in UTF-8 "\xe2\x80\x99" => "'", // ’ (U+2019) in UTF-8 "\xe2\x80\x9a" => "'", // ‚ (U+201A) in UTF-8 "\xe2\x80\x9b" => "'", // ‛ (U+201B) in UTF-8 "\xe2\x80\x9c" => '"', // “ (U+201C) in UTF-8 "\xe2\x80\x9d" => '"', // ” (U+201D) in UTF-8 "\xe2\x80\x9e" => '"', // „ (U+201E) in UTF-8 "\xe2\x80\x9f" => '"', // ‟ (U+201F) in UTF-8 "\xe2\x80\xb9" => "'", // ‹ (U+2039) in UTF-8 "\xe2\x80\xba" => "'", // › (U+203A) in UTF-8 "\xe2\x80\x93" => '-', // – (U+2013) in UTF-8 "\xe2\x80\x94" => '-', // — (U+2014) in UTF-8 "\xe2\x80\xa6" => '...', // … (U+2026) in UTF-8 ], // Currency // // url => https://en.wikipedia.org/wiki/Currency_symbol 'currency_short' => [ '€' => 'EUR', '$' => '$', '₢' => 'Cr', '₣' => 'Fr.', '£' => 'PS', '₤' => 'L.', 'ℳ' => 'M', '₥' => 'mil', '₦' => 'N', '₧' => 'Pts', '₨' => 'Rs', 'රු' => 'LKR', 'ரூ' => 'LKR', '௹' => 'Rs', 'रू' => 'NPR', '₹' => 'Rs', '૱' => 'Rs', '₩' => 'W', '₪' => 'NS', '₸' => 'KZT', '₫' => 'D', '֏' => 'AMD', '₭' => 'K', '₺' => 'TL', '₼' => 'AZN', '₮' => 'T', '₯' => 'Dr', '₲' => 'PYG', '₾' => 'GEL', '₳' => 'ARA', '₴' => 'UAH', '₽' => 'RUB', '₵' => 'GHS', '₡' => 'CL', '¢' => 'c', '¥' => 'YEN', '円' => 'JPY', '৳' => 'BDT', '元' => 'CNY', '﷼' => 'SAR', '៛' => 'KR', '₠' => 'ECU', '¤' => '$?', '฿' => 'THB', '؋' => 'AFN', ], ]; PK̺w[)ٛvoku/helper/data/x0a2.phpnu[', '[?]', '[?]', '[?]', 'f', 'v', 'u', 'yr', 'y', 'w', 'th', 'th', 'a', 'o', 'ac', 'ae', 'o', 'o', 'o', 'oe', 'on', 'r', 'k', 'c', 'k', 'g', 'ng', 'g', 'g', 'w', 'h', 'h', 'h', 'h', 'n', 'n', 'n', 'i', 'e', 'j', 'g', 'ae', 'a', 'eo', 'p', 'z', 's', 's', 's', 'c', 'z', 't', 't', 'd', 'b', 'b', 'p', 'p', 'e', 'm', 'm', 'm', 'l', 'l', 'ng', 'ng', 'd', 'o', 'ear', 'ior', 'qu', 'qu', 'qu', 's', 'yr', 'yr', 'yr', 'q', 'x', '.', ':', '+', '17', '18', '19', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]']; PK̺w[ARŽvoku/helper/data/x0b1.phpnu[>voku/helper/data/x093.phpnu[', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '', 'EUR', // "\xc2\x80" => "\xe2\x82\xac" => EURO SIGN '', ',', 'f', ',,', // "\xc2\x84" => "\xe2\x80\x9e" => DOUBLE LOW-9 QUOTATION MARK '...', // "\xc2\x85" => "\xe2\x80\xa6" => HORIZONTAL ELLIPSIS '+', '++', // "\xc2\x87" => "\xe2\x80\xa1" => DOUBLE DAGGER '^', '%0', // "\xc2\x89" => "\xe2\x80\xb0" => PER MILLE SIGN 'S', '<', 'OE', // "\xc2\x8c" => "\xc5\x92" => LATIN CAPITAL LIGATURE OE '', 'Z', '', '', '\'', // "\xc2\x91" => "\xe2\x80\x98" => LEFT SINGLE QUOTATION MARK '\'', // "\xc2\x92" => "\xe2\x80\x99" => RIGHT SINGLE QUOTATION MARK '"', '"', '*', '-', '--', // "\xc2\x97" => "\xe2\x80\x94" => EM DASH '~', 'tm', 's', '>', 'oe', '', 'z', 'Y', ' ', '!', 'C/', 'PS', '$?', 'Y=', '|', 'SS', '"', '(c)', 'a', '<<', '!', '', '(r)', '-', 'deg', '+-', '2', '3', '\'', 'u', 'P', '*', ',', '1', 'o', '>>', '1/4', '1/2', '3/4', '?', 'A', 'A', 'A', 'A', // Not "AE" - used in languages other than German 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'D', 'N', 'O', 'O', 'O', 'O', // Not "OE" - used in languages other than German 'O', 'x', 'O', 'U', 'U', 'U', // Not "UE" - used in languages other than German 'U', 'Y', 'Th', 'ss', 'a', 'a', 'a', 'a', // Not "ae" - used in languages other than German 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'd', 'n', 'o', 'o', 'o', 'o', // Not "oe" - used in languages other than German 'o', '/', 'o', 'u', 'u', 'u', // Not "ue" - used in languages other than German 'u', 'y', 'th', 'y', ]; PK̺w[HrBtvoku/helper/data/x021.phpnu[', '>', '>', '>', '>', '>', 'V', 'V', 'V', 'V', '<', '<', '<', '<', '<', '<', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '#', '#', '#', '#', '#', '^', '^', '^', 'O', '#', '#', '#', '#', 'O', 'O', 'O', 'O', '/', '\\\\', '\\\\', '#', '#', '#', '#', '/']; PK̺w[! voku/helper/data/x090.phpnu[ ', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]']; PK̺w[w$QQvoku/helper/data/x051.phpnu[ [ '=' => ' gelijk ', '%' => ' procent ', '∑' => ' som ', '∆' => ' delta ', '∞' => ' oneindig ', '♥' => ' love ', '&' => ' en ', '+' => ' plus ', ], // Italian 'it' => [ '=' => ' uguale ', '%' => ' percent ', '∑' => ' somma ', '∆' => ' delta ', '∞' => ' infinito ', '♥' => ' amore ', '&' => ' e ', '+' => ' piu ', ], // Macedonian 'mk' => [ '=' => ' ednakva ', '%' => ' procenti ', '∑' => ' zbir ', '∆' => ' delta ', '∞' => ' beskonecnost ', '♥' => ' loveubov ', '&' => ' i ', '+' => ' plus ', ], // Portuguese (Brazil) 'pt' => [ '=' => ' igual ', '%' => ' por cento ', '∑' => ' soma ', '∆' => ' delta ', '∞' => ' infinito ', '♥' => ' amor ', '&' => ' e ', '+' => ' mais ', ], // Greek(lish) (Elláda) 'el__greeklish' => [ '=' => ' isos ', '%' => ' tois ekato ', '∑' => ' athroisma ', '∆' => ' delta ', '∞' => ' apeiro ', '♥' => ' agape ', '&' => ' kai ', '+' => ' syn ', ], // Greek (Elláda) 'el' => [ '=' => ' isos ', '%' => ' tois ekato ', '∑' => ' athroisma ', '∆' => ' delta ', '∞' => ' apeiro ', '♥' => ' agape ', '&' => ' kai ', '+' => ' syn ', ], // Hindi 'hi' => [ '=' => ' samana ', '%' => ' paratisata ', '∑' => ' yoga ', '∆' => ' dalata ', '∞' => ' anata ', '♥' => ' payara ', '&' => ' aura ', '+' => ' palasa ', ], // Armenian 'hy' => [ '=' => ' havasar ', '%' => ' tvokvos ', '∑' => ' gvoumar ', '∆' => ' delta ', '∞' => ' ansahmanvouthyvoun ', '♥' => ' ser ', '&' => ' ev ', '+' => ' gvoumarats ', ], // Swedish 'sv' => [ '=' => ' lika ', '%' => ' procent ', '∑' => ' summa ', '∆' => ' delta ', '∞' => ' oandlighet ', '♥' => ' alskar ', '&' => ' och ', '+' => ' plus ', ], // Turkmen 'tk' => [ '=' => ' den ', '%' => ' yuzde ', '∑' => ' jem ', '∆' => ' delta ', '∞' => ' mudimilik ', '♥' => ' soygi ', '&' => ' we ', '+' => ' yzy ', ], // Turkish 'tr' => [ '=' => ' esit ', '%' => ' yuzde ', '∑' => ' Toplam ', '∆' => ' delta ', '∞' => ' sonsuzluk ', '♥' => ' ask ', '&' => ' ve ', '+' => ' arti ', ], // Bulgarian 'bg' => [ '=' => ' raven ', '%' => ' na sto ', '∑' => ' suma ', '∆' => ' delta ', '∞' => ' bezkrajnost ', '♥' => ' obicam ', '&' => ' i ', '+' => ' plus ', ], // Hungarian 'hu' => [ '=' => ' Egyenlo ', '%' => ' Szazalek ', '∑' => ' osszeg ', '∆' => ' delta ', '∞' => ' vegtelenitett ', '♥' => ' love ', '&' => ' Es ', '+' => ' Plusz ', ], // Myanmar (Burmese) 'my' => [ '=' => ' ttn:ttnnym? ', '%' => ' raakhngnn:k ', '∑' => ' ld ', '∆' => ' m?cwk?n:pe? ', '∞' => ' ach:m ', '♥' => ' mettttaa ', '&' => ' n ', '+' => ' ape?ng: ', ], // Croatian (Hrvatska) 'hr' => [ '=' => ' Jednaki ', '%' => ' Posto ', '∑' => ' zbroj ', '∆' => ' Delta ', '∞' => ' beskonacno ', '♥' => ' ljubav ', '&' => ' I ', '+' => ' Plus ', ], // Finnish 'fi' => [ '=' => ' Sama ', '%' => ' Prosenttia ', '∑' => ' sum ', '∆' => ' delta ', '∞' => ' aareton ', '♥' => ' rakkautta ', '&' => ' Ja ', '+' => ' Plus ', ], // Georgian (Kartvelian) 'ka' => [ '=' => ' tanasts\'ori ', '%' => ' p\'rotsent\'i ', '∑' => ' tankha ', '∆' => ' delt\'a ', '∞' => ' usasrulo ', '♥' => ' siq\'varuli ', '&' => ' da ', '+' => ' p\'lus ', ], // Russian 'ru' => [ '=' => ' ravnyj ', '%' => ' procent ', '∑' => ' summa ', '∆' => ' del\'ta ', '∞' => ' beskonecnost\' ', '♥' => ' lublu ', '&' => ' i ', '+' => ' plus ', ], // Russian - GOST 7.79-2000(B) 'ru__gost_2000_b' => [ '=' => ' ravnyj ', '%' => ' procent ', '∑' => ' summa ', '∆' => ' del\'ta ', '∞' => ' beskonecnost\' ', '♥' => ' lublu ', '&' => ' i ', '+' => ' plus ', ], // Russian - Passport (2013), ICAO 'ru__passport_2013' => [ '=' => ' ravnyj ', '%' => ' procent ', '∑' => ' summa ', '∆' => ' del\'ta ', '∞' => ' beskonecnost\' ', '♥' => ' lublu ', '&' => ' i ', '+' => ' plus ', ], // Ukrainian 'uk' => [ '=' => ' rivnij ', '%' => ' vidsotkiv ', '∑' => ' suma ', '∆' => ' del\'ta ', '∞' => ' neskincennist\' ', '♥' => ' lubov ', '&' => ' i ', '+' => ' plus ', ], // Kazakh 'kk' => [ '=' => ' ten\' ', '%' => ' Pajyzdar ', '∑' => ' zalpy ', '∆' => ' ajyrmasylyk, ', '∞' => ' seksiz ', '♥' => ' mahabbat ', '&' => ' z@ne ', '+' => ' plus ', ], // Czech 'cs' => [ '=' => ' rovnat se ', '%' => ' procento ', '∑' => ' soucet ', '∆' => ' delta ', '∞' => ' nekonecno ', '♥' => ' laska ', '&' => ' a ', '+' => ' plus ', ], // Danish 'da' => [ '=' => ' Lige ', '%' => ' Prozent ', '∑' => ' sum ', '∆' => ' delta ', '∞' => ' uendelig ', '♥' => ' kaerlighed ', '&' => ' Og ', '+' => ' Plus ', ], // Polish 'pl' => [ '=' => ' rowny ', '%' => ' procent ', '∑' => ' suma ', '∆' => ' delta ', '∞' => ' nieskonczonosc ', '♥' => ' milosc ', '&' => ' i ', '+' => ' plus ', ], // Romanian 'ro' => [ '=' => ' egal ', '%' => ' la suta ', '∑' => ' suma ', '∆' => ' delta ', '∞' => ' infinit ', '♥' => ' dragoste ', '&' => ' si ', '+' => ' la care se adauga ', ], // Esperanto 'eo' => [ '=' => ' Egalaj ', '%' => ' Procento ', '∑' => ' sumo ', '∆' => ' delto ', '∞' => ' senfina ', '♥' => ' amo ', '&' => ' Kaj ', '+' => ' Pli ', ], // Estonian 'et' => [ '=' => ' Vordsed ', '%' => ' Protsenti ', '∑' => ' summa ', '∆' => ' o ', '∞' => ' loputut ', '♥' => ' armastus ', '&' => ' Ja ', '+' => ' Pluss ', ], // Latvian 'lv' => [ '=' => ' vienads ', '%' => ' procents ', '∑' => ' summa ', '∆' => ' delta ', '∞' => ' bezgaliba ', '♥' => ' milestiba ', '&' => ' un ', '+' => ' pluss ', ], // Lithuanian 'lt' => [ '=' => ' lygus ', '%' => ' procentu ', '∑' => ' suma ', '∆' => ' delta ', '∞' => ' begalybe ', '♥' => ' meile ', '&' => ' ir ', '+' => ' plius ', ], // Norwegian 'no' => [ '=' => ' Lik ', '%' => ' Prosent ', '∑' => ' sum ', '∆' => ' delta ', '∞' => ' uendelig ', '♥' => ' kjaerlighet ', '&' => ' Og ', '+' => ' Pluss ', ], // Vietnamese 'vi' => [ '=' => ' cong bang ', '%' => ' phan tram ', '∑' => ' tong so ', '∆' => ' dong bang ', '∞' => ' vo cuc ', '♥' => ' Yeu ', '&' => ' va ', '+' => ' them ', ], // Arabic 'ar' => [ '=' => ' mtsawy ', '%' => ' nsbh mywyh ', '∑' => ' mjmw\' ', '∆' => ' dlta ', '∞' => ' ma la nhayt ', '♥' => ' hb ', '&' => ' w ', '+' => ' zayd ', ], // Persian (Farsi) 'fa' => [ '=' => ' brabr ', '%' => ' dr sd ', '∑' => ' mjmw\' ', '∆' => ' dlta ', '∞' => ' by nhayt ', '♥' => ' \'shq ', '&' => ' w ', '+' => ' bh \'lawh ', ], // Serbian 'sr' => [ '=' => ' jednak ', '%' => ' procenat ', '∑' => ' zbir ', '∆' => ' delta ', '∞' => ' beskraj ', '♥' => ' lubav ', '&' => ' i ', '+' => ' vise ', ], // Serbian - Cyrillic 'sr__cyr' => [ '=' => ' jednak ', '%' => ' procenat ', '∑' => ' zbir ', '∆' => ' delta ', '∞' => ' beskraj ', '♥' => ' lubav ', '&' => ' i ', '+' => ' vise ', ], // Serbian - Latin 'sr__lat' => [ '=' => ' jednak ', '%' => ' procenat ', '∑' => ' zbir ', '∆' => ' delta ', '∞' => ' beskraj ', '♥' => ' lubav ', '&' => ' i ', '+' => ' vise ', ], // Azerbaijani 'az' => [ '=' => ' b@rab@r ', '%' => ' faiz ', '∑' => ' m@bl@g ', '∆' => ' delta ', '∞' => ' sonsuzluq ', '♥' => ' sevgi ', '&' => ' v@ ', '+' => ' plus ', ], // Slovak 'sk' => [ '=' => ' rovny ', '%' => ' percento ', '∑' => ' sucet ', '∆' => ' delta ', '∞' => ' infinity ', '♥' => ' milovat ', '&' => ' a ', '+' => ' viac ', ], // French 'fr' => [ '=' => ' Egal ', '%' => ' Pourcentage ', '∑' => ' somme ', '∆' => ' delta ', '∞' => ' infini ', '♥' => ' amour ', '&' => ' Et ', '+' => ' Plus ', ], // Austrian (French) 'fr_at' => [ '=' => ' Egal ', '%' => ' Pourcentage ', '∑' => ' somme ', '∆' => ' delta ', '∞' => ' infini ', '♥' => ' amour ', '&' => ' Et ', '+' => ' Plus ', ], // Switzerland (French) 'fr_ch' => [ '=' => ' Egal ', '%' => ' Pourcentage ', '∑' => ' somme ', '∆' => ' delta ', '∞' => ' infini ', '♥' => ' amour ', '&' => ' Et ', '+' => ' Plus ', ], // German 'de' => [ '=' => ' gleich ', '%' => ' Prozent ', '∑' => ' gesamt ', '∆' => ' Unterschied ', '∞' => ' undendlich ', '♥' => ' liebe ', '&' => ' und ', '+' => ' plus ', ], // Austrian (German) 'de_at' => [ '=' => ' gleich ', '%' => ' Prozent ', '∑' => ' gesamt ', '∆' => ' Unterschied ', '∞' => ' undendlich ', '♥' => ' liebe ', '&' => ' und ', '+' => ' plus ', ], // Switzerland (German) 'de_ch' => [ '=' => ' gleich ', '%' => ' Prozent ', '∑' => ' gesamt ', '∆' => ' Unterschied ', '∞' => ' undendlich ', '♥' => ' liebe ', '&' => ' und ', '+' => ' plus ', ], // Bengali (Bangla) 'bn' => [ '=' => ' Saman ', '%' => ' Satakora ', '∑' => ' Samasti ', '∆' => ' Badhip ', '∞' => ' Ananta ', '♥' => ' Valobasa ', '&' => ' Abong ', '+' => ' Songzojon ', ], // English 'en' => [ '=' => ' equal ', '%' => ' percent ', '∑' => ' sum ', '∆' => ' delta ', '∞' => ' infinity ', '♥' => ' love ', '&' => ' and ', '+' => ' plus ', ], // Currency // // url: https://en.wikipedia.org/wiki/Currency_symbol 'currency' => [ '€' => ' Euro ', '$' => ' Dollar ', '₢' => ' cruzeiro ', '₣' => ' French franc ', '£' => ' pound ', '₤' => ' lira ', // Italian '₶' => ' livre tournois ', 'ℳ' => ' mark ', '₥' => ' mill ', '₦' => ' naira ', '₧' => ' peseta ', '₨' => ' rupee ', 'රු' => ' rupee ', // Sri Lankan 'ரூ' => ' rupee ', // Sri Lankan '௹' => ' rupee ', // Tamil 'रू' => ' rupee ', // Nepalese '₹' => ' rupee ', // Indian '૱' => ' rupee ', // Gujarat '₩' => ' won ', '₪' => ' new shequel ', '₸' => ' tenge ', '₫' => ' dong ', '֏' => ' dram ', '₭' => ' kip ', '₺' => ' lira ', // Turkish '₼' => ' manat ', '₮' => ' tugrik ', '₯' => ' drachma ', '₰' => ' pfennig ', '₷' => ' spesmilo ', '₱' => ' peso ', // Philippine '﷼‎' => ' riyal ', '₲' => ' guarani ', '₾' => ' lari ', '₳' => ' austral ', '₴' => ' hryvnia ', '₽' => ' ruble ', '₵' => ' cedi ', '₡' => ' colon ', '¢' => ' cent ', '¥' => ' yen ', '円' => ' yen ', '৳' => ' taka ', '元' => ' yuan ', '﷼' => ' riyal ', '៛' => ' riel ', '₠' => ' European Currency ', '¤' => ' currency ', '฿' => ' baht ', '؋' => ' afghani ', ], // Temperature // // url: https://en.wikipedia.org/wiki/Conversion_of_units_of_temperature 'temperature' => [ '°De' => ' Delisle ', '°Re' => ' Reaumur ', // Réaumur '°Ro' => ' Romer ', // Rømer '°R' => ' Rankine ', '°C' => ' Celsius ', '°F' => ' Fahrenheit ', '°N' => ' Newton ', ], 'latin_symbols' => [ '=' => '=', '%' => '%', '∑' => '∑', '∆' => '∆', '∞' => '∞', '♥' => '♥', '&' => '&', '+' => '+', // --- '©' => ' (c) ', '®' => ' (r) ', '@' => ' (at) ', '№' => ' No. ', '℞' => ' Rx ', '[' => '[', '\' => '\\', ']' => ']', '^' => '^', '_' => '_', '`' => '`', '‐' => '-', '‑' => '-', '‒' => '-', '–' => '-', '−' => '-', '—' => '-', '―' => '-', '﹘' => '-', '│' => '|', '∖' => '\\', '∕' => '/', '⁄' => '/', '←' => '<-', '→' => '->', '↑' => '|', '↓' => '|', '⁅' => '[', '⁆' => ']', '⁎' => '*', '、' => ',', '。' => '.', '〈' => '<', '〉' => '>', '《' => '<<', '》' => '>>', '〔' => '[', '〕' => ']', '〘' => '[', '〙' => ']', '〚' => '[', '〛' => ']', '﹝' => '[', '﹞' => ']', '︹' => '[', '︺' => ']', '﹇' => '[', '﹈' => ']', '︐' => ',', '︑' => ',', '︒' => '.', '︓' => ':', '︔' => ';', '︕' => '!', '︖' => '?', '︙' => '...', '︰' => '..', '︵' => '(', '︶' => ')', '﹙' => '(', '﹚' => ')', '︷' => '{', '︸' => '}', '﹛' => '{', '﹜' => '}', '︽' => '<<', '︾' => '>>', '︿' => '<', '﹀' => '>', '×' => '*', '÷' => '/', '≪' => '<<', '≫' => '>>', '⦅' => '((', '⦆' => '))', '〇' => '0', '′' => '\'', '〝' => '"', '〞' => '"', '«' => '<<', '»' => '>>', '‘' => "'", '’' => "'", '‚' => ',', '‛' => "'", '“' => '"', '”' => '"', '„' => '"', '‟' => '"', '‹' => '<', '›' => '>', '․' => '.', '‥' => '..', '…' => '...', '″' => '"', '‴' => '\'\'\'', '‶' => '``', '‷' => '```', '‼' => '!!', '⁇' => '??', '⁈' => '?!', '⁉' => '!?', '⁗' => '````', '⩴' => '::=', '⩵' => '==', '⩶' => '===', '﹔' => ';', '﹕' => ':', '﹖' => '?', '﹗' => '!', '﹍' => '_', '﹎' => '_', '﹏' => '_', '﹐' => ',', '﹑' => ',', '﹒' => '.', '﹟' => '#', '﹠' => '&', '﹡' => '*', '﹢' => '+', '﹣' => '-', '﹤' => '<', '﹥' => '>', '﹦' => '=', '﹨' => '\\', '﹩' => '$', '﹪' => '%', '﹫' => '@', '!' => '!', '"' => '"', '#' => '#', '$' => '$', '%' => '%', '&' => '&', ''' => '\'', '(' => '(', ')' => ')', '*' => '*', '+' => '+', ',' => ',', '-' => '-', '.' => '.', '/' => '/', ':' => ':', ';' => ';', '<' => '<', '=' => '=', '>' => '>', '?' => '?', '@' => '@', '{' => '{', '|' => '|', '}' => '}', '~' => '~', '⦅' => '((', '⦆' => '))', '¬' => '!', ' ̄' => '-', '¦' => '|', '■' => '#', ], ]; PK̺w[.,voku/helper/data/x057.phpnu[ 0, "\x00" => 0, "\x01" => 1, "\x02" => 2, "\x03" => 3, "\x04" => 4, "\x05" => 5, "\x06" => 6, "\x07" => 7, "\x08" => 8, "\x09" => 9, "\x0A" => 10, "\x0B" => 11, "\x0C" => 12, "\x0D" => 13, "\x0E" => 14, "\x0F" => 15, "\x10" => 16, "\x11" => 17, "\x12" => 18, "\x13" => 19, "\x14" => 20, "\x15" => 21, "\x16" => 22, "\x17" => 23, "\x18" => 24, "\x19" => 25, "\x1A" => 26, "\x1B" => 27, "\x1C" => 28, "\x1D" => 29, "\x1E" => 30, "\x1F" => 31, "\x20" => 32, "\x21" => 33, "\x22" => 34, "\x23" => 35, "\x24" => 36, "\x25" => 37, "\x26" => 38, "\x27" => 39, "\x28" => 40, "\x29" => 41, "\x2A" => 42, "\x2B" => 43, "\x2C" => 44, "\x2D" => 45, "\x2E" => 46, "\x2F" => 47, "\x30" => 48, "\x31" => 49, "\x32" => 50, "\x33" => 51, "\x34" => 52, "\x35" => 53, "\x36" => 54, "\x37" => 55, "\x38" => 56, "\x39" => 57, "\x3A" => 58, "\x3B" => 59, "\x3C" => 60, "\x3D" => 61, "\x3E" => 62, "\x3F" => 63, "\x40" => 64, "\x41" => 65, "\x42" => 66, "\x43" => 67, "\x44" => 68, "\x45" => 69, "\x46" => 70, "\x47" => 71, "\x48" => 72, "\x49" => 73, "\x4A" => 74, "\x4B" => 75, "\x4C" => 76, "\x4D" => 77, "\x4E" => 78, "\x4F" => 79, "\x50" => 80, "\x51" => 81, "\x52" => 82, "\x53" => 83, "\x54" => 84, "\x55" => 85, "\x56" => 86, "\x57" => 87, "\x58" => 88, "\x59" => 89, "\x5A" => 90, "\x5B" => 91, "\x5C" => 92, "\x5D" => 93, "\x5E" => 94, "\x5F" => 95, "\x60" => 96, "\x61" => 97, "\x62" => 98, "\x63" => 99, "\x64" => 100, "\x65" => 101, "\x66" => 102, "\x67" => 103, "\x68" => 104, "\x69" => 105, "\x6A" => 106, "\x6B" => 107, "\x6C" => 108, "\x6D" => 109, "\x6E" => 110, "\x6F" => 111, "\x70" => 112, "\x71" => 113, "\x72" => 114, "\x73" => 115, "\x74" => 116, "\x75" => 117, "\x76" => 118, "\x77" => 119, "\x78" => 120, "\x79" => 121, "\x7A" => 122, "\x7B" => 123, "\x7C" => 124, "\x7D" => 125, "\x7E" => 126, "\x7F" => 127, "\x80" => 128, "\x81" => 129, "\x82" => 130, "\x83" => 131, "\x84" => 132, "\x85" => 133, "\x86" => 134, "\x87" => 135, "\x88" => 136, "\x89" => 137, "\x8A" => 138, "\x8B" => 139, "\x8C" => 140, "\x8D" => 141, "\x8E" => 142, "\x8F" => 143, "\x90" => 144, "\x91" => 145, "\x92" => 146, "\x93" => 147, "\x94" => 148, "\x95" => 149, "\x96" => 150, "\x97" => 151, "\x98" => 152, "\x99" => 153, "\x9A" => 154, "\x9B" => 155, "\x9C" => 156, "\x9D" => 157, "\x9E" => 158, "\x9F" => 159, "\xA0" => 160, "\xA1" => 161, "\xA2" => 162, "\xA3" => 163, "\xA4" => 164, "\xA5" => 165, "\xA6" => 166, "\xA7" => 167, "\xA8" => 168, "\xA9" => 169, "\xAA" => 170, "\xAB" => 171, "\xAC" => 172, "\xAD" => 173, "\xAE" => 174, "\xAF" => 175, "\xB0" => 176, "\xB1" => 177, "\xB2" => 178, "\xB3" => 179, "\xB4" => 180, "\xB5" => 181, "\xB6" => 182, "\xB7" => 183, "\xB8" => 184, "\xB9" => 185, "\xBA" => 186, "\xBB" => 187, "\xBC" => 188, "\xBD" => 189, "\xBE" => 190, "\xBF" => 191, "\xC0" => 192, "\xC1" => 193, "\xC2" => 194, "\xC3" => 195, "\xC4" => 196, "\xC5" => 197, "\xC6" => 198, "\xC7" => 199, "\xC8" => 200, "\xC9" => 201, "\xCA" => 202, "\xCB" => 203, "\xCC" => 204, "\xCD" => 205, "\xCE" => 206, "\xCF" => 207, "\xD0" => 208, "\xD1" => 209, "\xD2" => 210, "\xD3" => 211, "\xD4" => 212, "\xD5" => 213, "\xD6" => 214, "\xD7" => 215, "\xD8" => 216, "\xD9" => 217, "\xDA" => 218, "\xDB" => 219, "\xDC" => 220, "\xDD" => 221, "\xDE" => 222, "\xDF" => 223, "\xE0" => 224, "\xE1" => 225, "\xE2" => 226, "\xE3" => 227, "\xE4" => 228, "\xE5" => 229, "\xE6" => 230, "\xE7" => 231, "\xE8" => 232, "\xE9" => 233, "\xEA" => 234, "\xEB" => 235, "\xEC" => 236, "\xED" => 237, "\xEE" => 238, "\xEF" => 239, "\xF0" => 240, "\xF1" => 241, "\xF2" => 242, "\xF3" => 243, "\xF4" => 244, "\xF5" => 245, "\xF6" => 246, "\xF7" => 247, "\xF8" => 248, "\xF9" => 249, "\xFA" => 250, "\xFB" => 251, "\xFC" => 252, "\xFD" => 253, "\xFE" => 254, "\xFF" => 255]; PK̺w[k;;voku/helper/data/x07c.phpnu[', '^', 'V', '^', 'V', '\'', '-', '/', '\\', ',', '_', '\\', '/', ':', '.', '`', '\'', '^', 'V', '+', '-', 'V', '.', '@', ',', '~', '"', 'R', 'X', 'G', 'l', 's', 'x', '?', '', '', '', '', '', '', '', 'V', '=', '"', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]']; PK̺w[B NNvoku/helper/data/x07e.phpnu[ */ private $enumType; /** @param class-string $enumType */ public function __construct(ReflectionProperty $originalReflectionProperty, string $enumType) { $this->originalReflectionProperty = $originalReflectionProperty; $this->enumType = $enumType; } /** * {@inheritDoc} * * Converts enum instance to its value. * * @param object|null $object * * @return int|string|int[]|string[]|null */ #[ReturnTypeWillChange] public function getValue($object = null) { if ($object === null) { return null; } $enum = $this->originalReflectionProperty->getValue($object); if ($enum === null) { return null; } return $this->fromEnum($enum); } /** * Converts enum value to enum instance. * * @param object $object * @param mixed $value */ public function setValue($object, $value = null): void { if ($value !== null) { $value = $this->toEnum($value); } $this->originalReflectionProperty->setValue($object, $value); } /** * @param BackedEnum|BackedEnum[] $enum * * @return ($enum is BackedEnum ? (string|int) : (string[]|int[])) */ private function fromEnum($enum) { if (is_array($enum)) { return array_map(static function (BackedEnum $enum) { return $enum->value; }, $enum); } return $enum->value; } /** * @param int|string|int[]|string[] $value * * @return ($value is int|string ? BackedEnum : BackedEnum[]) */ private function toEnum($value) { if (is_array($value)) { return array_map([$this->enumType, 'from'], $value); } return $this->enumType::from($value); } } PKx[zHPersistence/Reflection/TypedNoDefaultRuntimePublicReflectionProperty.phpnu[getName()] ?? null : parent::getValue(); } /** * {@inheritDoc} * * Avoids triggering lazy loading via `__set` if the provided object * is a {@see \Doctrine\Common\Proxy\Proxy}. * * @link https://bugs.php.net/bug.php?id=63463 * * @param object|null $object * @param mixed $value * * @return void */ #[ReturnTypeWillChange] public function setValue($object, $value = null) { if (! ($object instanceof Proxy && ! $object->__isInitialized())) { parent::setValue($object, $value); return; } $originalInitializer = $object->__getInitializer(); $object->__setInitializer(null); parent::setValue($object, $value); $object->__setInitializer($originalInitializer); } } PKx[74Persistence/Reflection/RuntimeReflectionProperty.phpnu[key = $this->isPrivate() ? "\0" . ltrim($class, '\\') . "\0" . $name : ($this->isProtected() ? "\0*\0" . $name : $name); } /** * {@inheritDoc} * * @return mixed */ #[ReturnTypeWillChange] public function getValue($object = null) { if ($object === null) { return parent::getValue($object); } return ((array) $object)[$this->key] ?? null; } /** * {@inheritDoc} * * @param object|null $object * @param mixed $value * * @return void */ #[ReturnTypeWillChange] public function setValue($object, $value = null) { if (! ($object instanceof Proxy && ! $object->__isInitialized())) { parent::setValue($object, $value); return; } if ($object instanceof CommonProxy) { $originalInitializer = $object->__getInitializer(); $object->__setInitializer(null); parent::setValue($object, $value); $object->__setInitializer($originalInitializer); return; } if (! method_exists($object, '__setInitialized')) { return; } $object->__setInitialized(true); parent::setValue($object, $value); $object->__setInitialized(false); } } PKx[oy((?Persistence/Reflection/TypedNoDefaultReflectionPropertyBase.phpnu[isInitialized($object) ? parent::getValue($object) : null; } /** * {@inheritDoc} * * Works around the problem with setting typed no default properties to * NULL which is not supported, instead unset() to uninitialize. * * @link https://github.com/doctrine/orm/issues/7999 * * @param object|null $object * * @return void */ #[ReturnTypeWillChange] public function setValue($object, $value = null) { if ($value === null && $this->hasType() && ! $this->getType()->allowsNull()) { $propertyName = $this->getName(); $unsetter = function () use ($propertyName): void { unset($this->$propertyName); }; $unsetter = $unsetter->bindTo($object, $this->getDeclaringClass()->getName()); assert($unsetter instanceof Closure); $unsetter(); return; } parent::setValue($object, $value); } } PKx[΍LL&Persistence/ObjectManagerDecorator.phpnu[wrapped->find($className, $id); } public function persist(object $object) { $this->wrapped->persist($object); } public function remove(object $object) { $this->wrapped->remove($object); } public function clear(): void { $this->wrapped->clear(); } public function detach(object $object) { $this->wrapped->detach($object); } public function refresh(object $object) { $this->wrapped->refresh($object); } public function flush() { $this->wrapped->flush(); } /** * {@inheritdoc} */ public function getRepository(string $className) { return $this->wrapped->getRepository($className); } /** * {@inheritdoc} */ public function getClassMetadata(string $className) { return $this->wrapped->getClassMetadata($className); } /** @psalm-return ClassMetadataFactory> */ public function getMetadataFactory() { return $this->wrapped->getMetadataFactory(); } public function initializeObject(object $obj) { $this->wrapped->initializeObject($obj); } /** * {@inheritdoc} */ public function contains(object $object) { return $this->wrapped->contains($object); } } PKx[   Persistence/ObjectRepository.phpnu[ The objects. * @psalm-return T[] */ public function findAll(); /** * Finds objects by a set of criteria. * * Optionally sorting and limiting details can be passed. An implementation may throw * an UnexpectedValueException if certain values of the sorting or limiting details are * not supported. * * @param array $criteria * @param array|null $orderBy * @psalm-param array|null $orderBy * * @return array The objects. * @psalm-return T[] * * @throws UnexpectedValueException */ public function findBy( array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null ); /** * Finds a single object by a set of criteria. * * @param array $criteria The criteria. * * @return object|null The object. * @psalm-return T|null */ public function findOneBy(array $criteria); /** * Returns the class name of the object managed by the repository. * * @psalm-return class-string */ public function getClassName(); } PKx[6gA22'Persistence/AbstractManagerRegistry.phpnu[ */ private $connections; /** @var array */ private $managers; /** @var string */ private $defaultConnection; /** @var string */ private $defaultManager; /** * @var string * @psalm-var class-string */ private $proxyInterfaceName; /** * @param array $connections * @param array $managers * @psalm-param class-string $proxyInterfaceName */ public function __construct( string $name, array $connections, array $managers, string $defaultConnection, string $defaultManager, string $proxyInterfaceName ) { $this->name = $name; $this->connections = $connections; $this->managers = $managers; $this->defaultConnection = $defaultConnection; $this->defaultManager = $defaultManager; $this->proxyInterfaceName = $proxyInterfaceName; } /** * Fetches/creates the given services. * * A service in this context is connection or a manager instance. * * @param string $name The name of the service. * * @return ObjectManager The instance of the given service. */ abstract protected function getService(string $name); /** * Resets the given services. * * A service in this context is connection or a manager instance. * * @param string $name The name of the service. * * @return void */ abstract protected function resetService(string $name); /** * Gets the name of the registry. * * @return string */ public function getName() { return $this->name; } /** * {@inheritdoc} */ public function getConnection(?string $name = null) { if ($name === null) { $name = $this->defaultConnection; } if (! isset($this->connections[$name])) { throw new InvalidArgumentException( sprintf('Doctrine %s Connection named "%s" does not exist.', $this->name, $name) ); } return $this->getService($this->connections[$name]); } /** * {@inheritdoc} */ public function getConnectionNames() { return $this->connections; } /** * {@inheritdoc} */ public function getConnections() { $connections = []; foreach ($this->connections as $name => $id) { $connections[$name] = $this->getService($id); } return $connections; } /** * {@inheritdoc} */ public function getDefaultConnectionName() { return $this->defaultConnection; } /** * {@inheritdoc} */ public function getDefaultManagerName() { return $this->defaultManager; } /** * {@inheritdoc} * * @throws InvalidArgumentException */ public function getManager(?string $name = null) { if ($name === null) { $name = $this->defaultManager; } if (! isset($this->managers[$name])) { throw new InvalidArgumentException( sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name) ); } return $this->getService($this->managers[$name]); } /** * {@inheritDoc} */ public function getManagerForClass(string $class) { $proxyClass = new ReflectionClass($class); if ($proxyClass->isAnonymous()) { return null; } if ($proxyClass->implementsInterface($this->proxyInterfaceName)) { $parentClass = $proxyClass->getParentClass(); if ($parentClass === false) { return null; } $class = $parentClass->getName(); } foreach ($this->managers as $id) { $manager = $this->getService($id); if (! $manager->getMetadataFactory()->isTransient($class)) { return $manager; } } return null; } /** * {@inheritdoc} */ public function getManagerNames() { return $this->managers; } /** * {@inheritdoc} */ public function getManagers() { $managers = []; foreach ($this->managers as $name => $id) { $manager = $this->getService($id); $managers[$name] = $manager; } return $managers; } /** * {@inheritdoc} */ public function getRepository( string $persistentObject, ?string $persistentManagerName = null ) { return $this ->selectManager($persistentObject, $persistentManagerName) ->getRepository($persistentObject); } /** * {@inheritdoc} */ public function resetManager(?string $name = null) { if ($name === null) { $name = $this->defaultManager; } if (! isset($this->managers[$name])) { throw new InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name)); } // force the creation of a new document manager // if the current one is closed $this->resetService($this->managers[$name]); return $this->getManager($name); } /** @psalm-param class-string $persistentObject */ private function selectManager( string $persistentObject, ?string $persistentManagerName = null ): ObjectManager { if ($persistentManagerName !== null) { return $this->getManager($persistentManagerName); } return $this->getManagerForClass($persistentObject) ?? $this->getManager(); } } PKx[̟' ' (Persistence/Mapping/MappingException.phpnu[ $namespaces * * @return self */ public static function classNotFoundInNamespaces( string $className, array $namespaces ) { return new self(sprintf( "The class '%s' was not found in the chain configured namespaces %s", $className, implode(', ', $namespaces) )); } /** @param class-string $driverClassName */ public static function pathRequiredForDriver(string $driverClassName): self { return new self(sprintf( 'Specifying the paths to your entities is required when using %s to retrieve all class names.', $driverClassName )); } /** @return self */ public static function fileMappingDriversRequireConfiguredDirectoryPath( ?string $path = null ) { if ($path !== null) { $path = '[' . $path . ']'; } return new self(sprintf( 'File mapping drivers must have a valid directory path, ' . 'however the given path %s seems to be incorrect!', (string) $path )); } /** @return self */ public static function mappingFileNotFound(string $entityName, string $fileName) { return new self(sprintf( "No mapping file found named '%s' for class '%s'.", $fileName, $entityName )); } /** @return self */ public static function invalidMappingFile(string $entityName, string $fileName) { return new self(sprintf( "Invalid mapping file '%s' for class '%s'.", $fileName, $entityName )); } /** @return self */ public static function nonExistingClass(string $className) { return new self(sprintf("Class '%s' does not exist", $className)); } /** @param class-string $className */ public static function classIsAnonymous(string $className): self { return new self(sprintf('Class "%s" is anonymous', $className)); } } PKx[=AJI I 0Persistence/Mapping/RuntimeReflectionService.phpnu[supportsTypedPropertiesWorkaround = version_compare(phpversion(), '7.4.0') >= 0; } /** * {@inheritDoc} */ public function getParentClasses(string $class) { if (! class_exists($class)) { throw MappingException::nonExistingClass($class); } $parents = class_parents($class); assert($parents !== false); return $parents; } /** * {@inheritDoc} */ public function getClassShortName(string $class) { $reflectionClass = new ReflectionClass($class); return $reflectionClass->getShortName(); } /** * {@inheritDoc} */ public function getClassNamespace(string $class) { $reflectionClass = new ReflectionClass($class); return $reflectionClass->getNamespaceName(); } /** * @psalm-param class-string $class * * @return ReflectionClass * @psalm-return ReflectionClass * * @template T of object */ public function getClass(string $class) { return new ReflectionClass($class); } /** * {@inheritDoc} */ public function getAccessibleProperty(string $class, string $property) { $reflectionProperty = new RuntimeReflectionProperty($class, $property); if ($this->supportsTypedPropertiesWorkaround && ! array_key_exists($property, $this->getClass($class)->getDefaultProperties())) { $reflectionProperty = new TypedNoDefaultReflectionProperty($class, $property); } $reflectionProperty->setAccessible(true); return $reflectionProperty; } /** * {@inheritDoc} */ public function hasPublicMethod(string $class, string $method) { try { $reflectionMethod = new ReflectionMethod($class, $method); } catch (ReflectionException $e) { return false; } return $reflectionMethod->isPublic(); } } PKx[Θ/ 1Persistence/Mapping/Driver/MappingDriverChain.phpnu[ */ private $drivers = []; /** * Gets the default driver. * * @return MappingDriver|null */ public function getDefaultDriver() { return $this->defaultDriver; } /** * Set the default driver. * * @return void */ public function setDefaultDriver(MappingDriver $driver) { $this->defaultDriver = $driver; } /** * Adds a nested driver. * * @return void */ public function addDriver(MappingDriver $nestedDriver, string $namespace) { $this->drivers[$namespace] = $nestedDriver; } /** * Gets the array of nested drivers. * * @return array $drivers */ public function getDrivers() { return $this->drivers; } /** * {@inheritDoc} */ public function loadMetadataForClass(string $className, ClassMetadata $metadata) { foreach ($this->drivers as $namespace => $driver) { if (strpos($className, $namespace) === 0) { $driver->loadMetadataForClass($className, $metadata); return; } } if ($this->defaultDriver !== null) { $this->defaultDriver->loadMetadataForClass($className, $metadata); return; } throw MappingException::classNotFoundInNamespaces($className, array_keys($this->drivers)); } /** * {@inheritDoc} */ public function getAllClassNames() { $classNames = []; $driverClasses = []; foreach ($this->drivers as $namespace => $driver) { $oid = spl_object_hash($driver); if (! isset($driverClasses[$oid])) { $driverClasses[$oid] = $driver->getAllClassNames(); } foreach ($driverClasses[$oid] as $className) { if (strpos($className, $namespace) !== 0) { continue; } $classNames[$className] = true; } } if ($this->defaultDriver !== null) { foreach ($this->defaultDriver->getAllClassNames() as $className) { $classNames[$className] = true; } } return array_keys($classNames); } /** * {@inheritDoc} */ public function isTransient(string $className) { foreach ($this->drivers as $namespace => $driver) { if (strpos($className, $namespace) === 0) { return $driver->isTransient($className); } } if ($this->defaultDriver !== null) { return $this->defaultDriver->isTransient($className); } return true; } } PKx[5Persistence/Mapping/Driver/ColocatedMappingDriver.phpnu[ */ protected $paths = []; /** * The paths excluded from path where to look for mapping files. * * @var array */ protected $excludePaths = []; /** * The file extension of mapping documents. * * @var string */ protected $fileExtension = '.php'; /** * Cache for getAllClassNames(). * * @var array|null * @psalm-var list|null */ protected $classNames; /** * Appends lookup paths to metadata driver. * * @param array $paths * * @return void */ public function addPaths(array $paths) { $this->paths = array_unique(array_merge($this->paths, $paths)); } /** * Retrieves the defined metadata lookup paths. * * @return array */ public function getPaths() { return $this->paths; } /** * Append exclude lookup paths to metadata driver. * * @param string[] $paths * * @return void */ public function addExcludePaths(array $paths) { $this->excludePaths = array_unique(array_merge($this->excludePaths, $paths)); } /** * Retrieve the defined metadata lookup exclude paths. * * @return array */ public function getExcludePaths() { return $this->excludePaths; } /** * Gets the file extension used to look for mapping files under. * * @return string */ public function getFileExtension() { return $this->fileExtension; } /** * Sets the file extension used to look for mapping files under. * * @return void */ public function setFileExtension(string $fileExtension) { $this->fileExtension = $fileExtension; } /** * {@inheritDoc} * * Returns whether the class with the specified name is transient. Only non-transient * classes, that is entities and mapped superclasses, should have their metadata loaded. * * @psalm-param class-string $className * * @return bool */ abstract public function isTransient(string $className); /** * Gets the names of all mapped classes known to this driver. * * @return string[] The names of all mapped classes known to this driver. * @psalm-return list */ public function getAllClassNames() { if ($this->classNames !== null) { return $this->classNames; } if ($this->paths === []) { throw MappingException::pathRequiredForDriver(static::class); } $classes = []; $includedFiles = []; foreach ($this->paths as $path) { if (! is_dir($path)) { throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); } $iterator = new RegexIterator( new RecursiveIteratorIterator( new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::LEAVES_ONLY ), '/^.+' . preg_quote($this->fileExtension) . '$/i', RecursiveRegexIterator::GET_MATCH ); foreach ($iterator as $file) { $sourceFile = $file[0]; if (preg_match('(^phar:)i', $sourceFile) === 0) { $sourceFile = realpath($sourceFile); } foreach ($this->excludePaths as $excludePath) { $realExcludePath = realpath($excludePath); assert($realExcludePath !== false); $exclude = str_replace('\\', '/', $realExcludePath); $current = str_replace('\\', '/', $sourceFile); if (strpos($current, $exclude) !== false) { continue 2; } } require_once $sourceFile; $includedFiles[] = $sourceFile; } } $declared = get_declared_classes(); foreach ($declared as $className) { $rc = new ReflectionClass($className); $sourceFile = $rc->getFileName(); if (! in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) { continue; } $classes[] = $className; } $this->classNames = $classes; return $classes; } } PKx["(Persistence/Mapping/Driver/PHPDriver.phpnu[ */ protected $metadata; /** @param string|array|FileLocator $locator */ public function __construct($locator) { parent::__construct($locator, '.php'); } /** * {@inheritDoc} */ public function loadMetadataForClass(string $className, ClassMetadata $metadata) { $this->metadata = $metadata; $this->loadMappingFile($this->locator->findMappingFile($className)); } /** * {@inheritDoc} */ protected function loadMappingFile(string $file) { $metadata = $this->metadata; include $file; return [$metadata->getName() => $metadata]; } } PKx[FAz)Persistence/Mapping/Driver/FileDriver.phpnu[>|null */ protected $classCache; /** @var string */ protected $globalBasename = ''; /** * Initializes a new FileDriver that looks in the given path(s) for mapping * documents and operates in the specified operating mode. * * @param string|array|FileLocator $locator A FileLocator or one/multiple paths * where mapping documents can be found. */ public function __construct($locator, ?string $fileExtension = null) { if ($locator instanceof FileLocator) { $this->locator = $locator; } else { $this->locator = new DefaultFileLocator((array) $locator, $fileExtension); } } /** * Sets the global basename. * * @return void */ public function setGlobalBasename(string $file) { $this->globalBasename = $file; } /** * Retrieves the global basename. * * @return string|null */ public function getGlobalBasename() { return $this->globalBasename; } /** * Gets the element of schema meta data for the class from the mapping file. * This will lazily load the mapping file if it is not loaded yet. * * @psalm-param class-string $className * * @return ClassMetadata The element of schema meta data. * @psalm-return ClassMetadata * * @throws MappingException */ public function getElement(string $className) { if ($this->classCache === null) { $this->initialize(); } if (isset($this->classCache[$className])) { return $this->classCache[$className]; } $result = $this->loadMappingFile($this->locator->findMappingFile($className)); if (! isset($result[$className])) { throw MappingException::invalidMappingFile( $className, str_replace('\\', '.', $className) . $this->locator->getFileExtension() ); } $this->classCache[$className] = $result[$className]; return $result[$className]; } /** * {@inheritDoc} */ public function isTransient(string $className) { if ($this->classCache === null) { $this->initialize(); } if (isset($this->classCache[$className])) { return false; } return ! $this->locator->fileExists($className); } /** * {@inheritDoc} */ public function getAllClassNames() { if ($this->classCache === null) { $this->initialize(); } if ($this->classCache === []) { return $this->locator->getAllClassNames($this->globalBasename); } /** @psalm-var array> $classCache */ $classCache = $this->classCache; /** @var list $keys */ $keys = array_keys($classCache); return array_values(array_unique(array_merge( $keys, $this->locator->getAllClassNames($this->globalBasename) ))); } /** * Loads a mapping file with the given name and returns a map * from class/entity names to their corresponding file driver elements. * * @param string $file The mapping file to load. * * @return ClassMetadata[] * @psalm-return array> */ abstract protected function loadMappingFile(string $file); /** * Initializes the class cache from all the global files. * * Using this feature adds a substantial performance hit to file drivers as * more metadata has to be loaded into memory than might actually be * necessary. This may not be relevant to scenarios where caching of * metadata is in place, however hits very hard in scenarios where no * caching is used. * * @return void */ protected function initialize() { $this->classCache = []; if ($this->globalBasename === null) { return; } foreach ($this->locator->getPaths() as $path) { $file = $path . '/' . $this->globalBasename . $this->locator->getFileExtension(); if (! is_file($file)) { continue; } $this->classCache = array_merge( $this->classCache, $this->loadMappingFile($file) ); } } /** * Retrieves the locator used to discover mapping files by className. * * @return FileLocator */ public function getLocator() { return $this->locator; } /** * Sets the locator used to discover mapping files by className. * * @return void */ public function setLocator(FileLocator $locator) { $this->locator = $locator; } } PKx[s ~hh,Persistence/Mapping/Driver/MappingDriver.phpnu[ $className * @psalm-param ClassMetadata $metadata * * @return void * * @template T of object */ public function loadMetadataForClass(string $className, ClassMetadata $metadata); /** * Gets the names of all mapped classes known to this driver. * * @return array The names of all mapped classes known to this driver. * @psalm-return list */ public function getAllClassNames(); /** * Returns whether the class with the specified name should have its metadata loaded. * This is only the case if it is either mapped as an Entity or a MappedSuperclass. * * @psalm-param class-string $className * * @return bool */ public function isTransient(string $className); } PKx[%%1Persistence/Mapping/Driver/DefaultFileLocator.phpnu[ */ protected $paths = []; /** * The file extension of mapping documents. * * @var string|null */ protected $fileExtension; /** * Initializes a new FileDriver that looks in the given path(s) for mapping * documents and operates in the specified operating mode. * * @param string|array $paths One or multiple paths where mapping documents * can be found. * @param string|null $fileExtension The file extension of mapping documents, * usually prefixed with a dot. */ public function __construct($paths, ?string $fileExtension = null) { $this->addPaths((array) $paths); $this->fileExtension = $fileExtension; } /** * Appends lookup paths to metadata driver. * * @param array $paths * * @return void */ public function addPaths(array $paths) { $this->paths = array_unique(array_merge($this->paths, $paths)); } /** * Retrieves the defined metadata lookup paths. * * @return array */ public function getPaths() { return $this->paths; } /** * Gets the file extension used to look for mapping files under. * * @return string|null */ public function getFileExtension() { return $this->fileExtension; } /** * Sets the file extension used to look for mapping files under. * * @param string|null $fileExtension The file extension to set. * * @return void */ public function setFileExtension(?string $fileExtension) { $this->fileExtension = $fileExtension; } /** * {@inheritDoc} */ public function findMappingFile(string $className) { $fileName = str_replace('\\', '.', $className) . $this->fileExtension; // Check whether file exists foreach ($this->paths as $path) { if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) { return $path . DIRECTORY_SEPARATOR . $fileName; } } throw MappingException::mappingFileNotFound($className, $fileName); } /** * {@inheritDoc} */ public function getAllClassNames(string $globalBasename) { if ($this->paths === []) { return []; } $classes = []; foreach ($this->paths as $path) { if (! is_dir($path)) { throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); } $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::LEAVES_ONLY ); foreach ($iterator as $file) { $fileName = $file->getBasename($this->fileExtension); if ($fileName === $file->getBasename() || $fileName === $globalBasename) { continue; } // NOTE: All files found here means classes are not transient! assert(is_string($fileName)); /** @psalm-var class-string */ $class = str_replace('.', '\\', $fileName); $classes[] = $class; } } return $classes; } /** * {@inheritDoc} */ public function fileExists(string $className) { $fileName = str_replace('\\', '.', $className) . $this->fileExtension; // Check whether file exists foreach ($this->paths as $path) { if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) { return true; } } return false; } } PKx[4! .Persistence/Mapping/Driver/StaticPHPDriver.phpnu[ */ private $paths = []; /** * Map of all class names. * * @var array * @psalm-var list */ private $classNames; /** @param array|string $paths */ public function __construct($paths) { $this->addPaths((array) $paths); } /** * @param array $paths * * @return void */ public function addPaths(array $paths) { $this->paths = array_unique(array_merge($this->paths, $paths)); } /** * {@inheritdoc} */ public function loadMetadataForClass(string $className, ClassMetadata $metadata) { $className::loadMetadata($metadata); } /** * {@inheritDoc} * * @todo Same code exists in ColocatedMappingDriver, should we re-use it * somehow or not worry about it? */ public function getAllClassNames() { if ($this->classNames !== null) { return $this->classNames; } if ($this->paths === []) { throw MappingException::pathRequiredForDriver(static::class); } $classes = []; $includedFiles = []; foreach ($this->paths as $path) { if (! is_dir($path)) { throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); } $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::LEAVES_ONLY ); foreach ($iterator as $file) { if ($file->getBasename('.php') === $file->getBasename()) { continue; } $sourceFile = realpath($file->getPathName()); require_once $sourceFile; $includedFiles[] = $sourceFile; } } $declared = get_declared_classes(); foreach ($declared as $className) { $rc = new ReflectionClass($className); $sourceFile = $rc->getFileName(); if (! in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) { continue; } $classes[] = $className; } $this->classNames = $classes; return $classes; } /** * {@inheritdoc} */ public function isTransient(string $className) { return ! method_exists($className, 'loadMetadata'); } } PKx[KK1Persistence/Mapping/Driver/SymfonyFileLocator.phpnu[ */ protected $paths = []; /** * A map of mapping directory path to namespace prefix used to expand class shortnames. * * @var array */ protected $prefixes = []; /** * File extension that is searched for. * * @var string|null */ protected $fileExtension; /** * Represents PHP namespace delimiters when looking for files * * @var string */ private $nsSeparator; /** * @param array $prefixes * @param string $nsSeparator String which would be used when converting FQCN * to filename and vice versa. Should not be empty */ public function __construct( array $prefixes, string $fileExtension = '', string $nsSeparator = '.' ) { $this->addNamespacePrefixes($prefixes); $this->fileExtension = $fileExtension; if ($nsSeparator === '') { throw new InvalidArgumentException('Namespace separator should not be empty'); } $this->nsSeparator = $nsSeparator; } /** * Adds Namespace Prefixes. * * @param array $prefixes * * @return void */ public function addNamespacePrefixes(array $prefixes) { $this->prefixes = array_merge($this->prefixes, $prefixes); $this->paths = array_merge($this->paths, array_keys($prefixes)); } /** * Gets Namespace Prefixes. * * @return string[] */ public function getNamespacePrefixes() { return $this->prefixes; } /** * {@inheritDoc} */ public function getPaths() { return $this->paths; } /** * {@inheritDoc} */ public function getFileExtension() { return $this->fileExtension; } /** * Sets the file extension used to look for mapping files under. * * @param string $fileExtension The file extension to set. * * @return void */ public function setFileExtension(string $fileExtension) { $this->fileExtension = $fileExtension; } /** * {@inheritDoc} */ public function fileExists(string $className) { $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension; foreach ($this->paths as $path) { if (! isset($this->prefixes[$path])) { // global namespace class if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) { return true; } continue; } $prefix = $this->prefixes[$path]; if (strpos($className, $prefix . '\\') !== 0) { continue; } $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension; if (is_file($filename)) { return true; } } return false; } /** * {@inheritDoc} */ public function getAllClassNames(?string $globalBasename = null) { if ($this->paths === []) { return []; } $classes = []; foreach ($this->paths as $path) { if (! is_dir($path)) { throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); } $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::LEAVES_ONLY ); foreach ($iterator as $file) { $fileName = $file->getBasename($this->fileExtension); if ($fileName === $file->getBasename() || $fileName === $globalBasename) { continue; } // NOTE: All files found here means classes are not transient! if (isset($this->prefixes[$path])) { // Calculate namespace suffix for given prefix as a relative path from basepath to file path $nsSuffix = strtr( substr($this->realpath($file->getPath()), strlen($this->realpath($path))), $this->nsSeparator, '\\' ); /** @psalm-var class-string */ $class = $this->prefixes[$path] . str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix) . '\\' . str_replace($this->nsSeparator, '\\', $fileName); } else { /** @psalm-var class-string */ $class = str_replace($this->nsSeparator, '\\', $fileName); } $classes[] = $class; } } return $classes; } /** * {@inheritDoc} */ public function findMappingFile(string $className) { $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension; foreach ($this->paths as $path) { if (! isset($this->prefixes[$path])) { if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) { return $path . DIRECTORY_SEPARATOR . $defaultFileName; } continue; } $prefix = $this->prefixes[$path]; if (strpos($className, $prefix . '\\') !== 0) { continue; } $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension; if (is_file($filename)) { return $filename; } } $pos = strrpos($className, '\\'); assert(is_int($pos)); throw MappingException::mappingFileNotFound( $className, substr($className, $pos + 1) . $this->fileExtension ); } private function realpath(string $path): string { $realpath = realpath($path); if ($realpath === false) { throw new RuntimeException(sprintf('Could not get realpath for %s', $path)); } return $realpath; } } PKx[Y*Persistence/Mapping/Driver/FileLocator.phpnu[ * @psalm-return list */ public function getAllClassNames(string $globalBasename); /** * Checks if a file can be found for this class name. * * @return bool */ public function fileExists(string $className); /** * Gets all the paths that this file locator looks for mapping files. * * @return array */ public function getPaths(); /** * Gets the file extension that mapping files are suffixed with. * * @return string|null */ public function getFileExtension(); } PKx[d)Persistence/Mapping/ReflectionService.phpnu[ $class * * @return ReflectionClass|null * @psalm-return ReflectionClass|null * * @template T of object */ public function getClass(string $class); /** * Returns an accessible property (setAccessible(true)) or null. * * @psalm-param class-string $class * * @return ReflectionProperty|null */ public function getAccessibleProperty(string $class, string $property); /** * Checks if the class have a public method with the given name. * * @psalm-param class-string $class * * @return bool */ public function hasPublicMethod(string $class, string $method); } PKx[[55%Persistence/Mapping/ClassMetadata.phpnu[ */ public function getName(); /** * Gets the mapped identifier field name. * * The returned structure is an array of the identifier field names. * * @return array * @psalm-return list */ public function getIdentifier(); /** * Gets the ReflectionClass instance for this mapped class. * * @return ReflectionClass */ public function getReflectionClass(); /** * Checks if the given field name is a mapped identifier for this class. * * @return bool */ public function isIdentifier(string $fieldName); /** * Checks if the given field is a mapped property for this class. * * @return bool */ public function hasField(string $fieldName); /** * Checks if the given field is a mapped association for this class. * * @return bool */ public function hasAssociation(string $fieldName); /** * Checks if the given field is a mapped single valued association for this class. * * @return bool */ public function isSingleValuedAssociation(string $fieldName); /** * Checks if the given field is a mapped collection valued association for this class. * * @return bool */ public function isCollectionValuedAssociation(string $fieldName); /** * A numerically indexed list of field names of this persistent class. * * This array includes identifier fields if present on this class. * * @return array */ public function getFieldNames(); /** * Returns an array of identifier field names numerically indexed. * * @return array */ public function getIdentifierFieldNames(); /** * Returns a numerically indexed list of association names of this persistent class. * * This array includes identifier associations if present on this class. * * @return array */ public function getAssociationNames(); /** * Returns a type name of this field. * * This type names can be implementation specific but should at least include the php types: * integer, string, boolean, float/double, datetime. * * @return string|null */ public function getTypeOfField(string $fieldName); /** * Returns the target class name of the given association. * * @return string|null * @psalm-return class-string|null */ public function getAssociationTargetClass(string $assocName); /** * Checks if the association is the inverse side of a bidirectional association. * * @return bool */ public function isAssociationInverseSide(string $assocName); /** * Returns the target field of the owning side of the association. * * @return string */ public function getAssociationMappedByTargetField(string $assocName); /** * Returns the identifier of this object as an array with field name as key. * * Has to return an empty array if no identifier isset. * * @return array */ public function getIdentifierValues(object $object); } PKx[ww.Persistence/Mapping/ProxyClassNameResolver.phpnu[>|class-string $className * * @psalm-return class-string * * @template T of object */ public function resolveClassName(string $className): string; } PKx[*994Persistence/Mapping/AbstractClassMetadataFactory.phpnu[ */ abstract class AbstractClassMetadataFactory implements ClassMetadataFactory { /** * Salt used by specific Object Manager implementation. * * @var string */ protected $cacheSalt = '__CLASSMETADATA__'; /** @var CacheItemPoolInterface|null */ private $cache; /** * @var array * @psalm-var CMTemplate[] */ private $loadedMetadata = []; /** @var bool */ protected $initialized = false; /** @var ReflectionService|null */ private $reflectionService = null; /** @var ProxyClassNameResolver|null */ private $proxyClassNameResolver = null; public function setCache(CacheItemPoolInterface $cache): void { $this->cache = $cache; } final protected function getCache(): ?CacheItemPoolInterface { return $this->cache; } /** * Returns an array of all the loaded metadata currently in memory. * * @return ClassMetadata[] * @psalm-return CMTemplate[] */ public function getLoadedMetadata() { return $this->loadedMetadata; } /** * {@inheritDoc} */ public function getAllMetadata() { if (! $this->initialized) { $this->initialize(); } $driver = $this->getDriver(); $metadata = []; foreach ($driver->getAllClassNames() as $className) { $metadata[] = $this->getMetadataFor($className); } return $metadata; } public function setProxyClassNameResolver(ProxyClassNameResolver $resolver): void { $this->proxyClassNameResolver = $resolver; } /** * Lazy initialization of this stuff, especially the metadata driver, * since these are not needed at all when a metadata cache is active. * * @return void */ abstract protected function initialize(); /** * Returns the mapping driver implementation. * * @return MappingDriver */ abstract protected function getDriver(); /** * Wakes up reflection after ClassMetadata gets unserialized from cache. * * @psalm-param CMTemplate $class * * @return void */ abstract protected function wakeupReflection( ClassMetadata $class, ReflectionService $reflService ); /** * Initializes Reflection after ClassMetadata was constructed. * * @psalm-param CMTemplate $class * * @return void */ abstract protected function initializeReflection( ClassMetadata $class, ReflectionService $reflService ); /** * Checks whether the class metadata is an entity. * * This method should return false for mapped superclasses or embedded classes. * * @psalm-param CMTemplate $class * * @return bool */ abstract protected function isEntity(ClassMetadata $class); /** * Removes the prepended backslash of a class string to conform with how php outputs class names * * @psalm-param class-string $className * * @psalm-return class-string */ private function normalizeClassName(string $className): string { return ltrim($className, '\\'); } /** * {@inheritDoc} * * @throws ReflectionException * @throws MappingException */ public function getMetadataFor(string $className) { $className = $this->normalizeClassName($className); if (isset($this->loadedMetadata[$className])) { return $this->loadedMetadata[$className]; } if (class_exists($className, false) && (new ReflectionClass($className))->isAnonymous()) { throw MappingException::classIsAnonymous($className); } if (! class_exists($className, false) && strpos($className, ':') !== false) { throw MappingException::nonExistingClass($className); } $realClassName = $this->getRealClass($className); if (isset($this->loadedMetadata[$realClassName])) { // We do not have the alias name in the map, include it return $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; } try { if ($this->cache !== null) { $cached = $this->cache->getItem($this->getCacheKey($realClassName))->get(); if ($cached instanceof ClassMetadata) { /** @psalm-var CMTemplate $cached */ $this->loadedMetadata[$realClassName] = $cached; $this->wakeupReflection($cached, $this->getReflectionService()); } else { $loadedMetadata = $this->loadMetadata($realClassName); $classNames = array_combine( array_map([$this, 'getCacheKey'], $loadedMetadata), $loadedMetadata ); foreach ($this->cache->getItems(array_keys($classNames)) as $item) { if (! isset($classNames[$item->getKey()])) { continue; } $item->set($this->loadedMetadata[$classNames[$item->getKey()]]); $this->cache->saveDeferred($item); } $this->cache->commit(); } } else { $this->loadMetadata($realClassName); } } catch (MappingException $loadingException) { $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName); if ($fallbackMetadataResponse === null) { throw $loadingException; } $this->loadedMetadata[$realClassName] = $fallbackMetadataResponse; } if ($className !== $realClassName) { // We do not have the alias name in the map, include it $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; } return $this->loadedMetadata[$className]; } /** * {@inheritDoc} */ public function hasMetadataFor(string $className) { $className = $this->normalizeClassName($className); return isset($this->loadedMetadata[$className]); } /** * Sets the metadata descriptor for a specific class. * * NOTE: This is only useful in very special cases, like when generating proxy classes. * * @psalm-param class-string $className * @psalm-param CMTemplate $class * * @return void */ public function setMetadataFor(string $className, ClassMetadata $class) { $this->loadedMetadata[$this->normalizeClassName($className)] = $class; } /** * Gets an array of parent classes for the given entity class. * * @psalm-param class-string $name * * @return string[] * @psalm-return list */ protected function getParentClasses(string $name) { // Collect parent classes, ignoring transient (not-mapped) classes. $parentClasses = []; foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { if ($this->getDriver()->isTransient($parentClass)) { continue; } $parentClasses[] = $parentClass; } return $parentClasses; } /** * Loads the metadata of the class in question and all it's ancestors whose metadata * is still not loaded. * * Important: The class $name does not necessarily exist at this point here. * Scenarios in a code-generation setup might have access to XML/YAML * Mapping files without the actual PHP code existing here. That is why the * {@see \Doctrine\Persistence\Mapping\ReflectionService} interface * should be used for reflection. * * @param string $name The name of the class for which the metadata should get loaded. * @psalm-param class-string $name * * @return array * @psalm-return list */ protected function loadMetadata(string $name) { if (! $this->initialized) { $this->initialize(); } $loaded = []; $parentClasses = $this->getParentClasses($name); $parentClasses[] = $name; // Move down the hierarchy of parent classes, starting from the topmost class $parent = null; $rootEntityFound = false; $visited = []; $reflService = $this->getReflectionService(); foreach ($parentClasses as $className) { if (isset($this->loadedMetadata[$className])) { $parent = $this->loadedMetadata[$className]; if ($this->isEntity($parent)) { $rootEntityFound = true; array_unshift($visited, $className); } continue; } $class = $this->newClassMetadataInstance($className); $this->initializeReflection($class, $reflService); $this->doLoadMetadata($class, $parent, $rootEntityFound, $visited); $this->loadedMetadata[$className] = $class; $parent = $class; if ($this->isEntity($class)) { $rootEntityFound = true; array_unshift($visited, $className); } $this->wakeupReflection($class, $reflService); $loaded[] = $className; } return $loaded; } /** * Provides a fallback hook for loading metadata when loading failed due to reflection/mapping exceptions * * Override this method to implement a fallback strategy for failed metadata loading * * @return ClassMetadata|null * @psalm-return CMTemplate|null */ protected function onNotFoundMetadata(string $className) { return null; } /** * Actually loads the metadata from the underlying metadata. * * @param bool $rootEntityFound True when there is another entity (non-mapped superclass) class above the current class in the PHP class hierarchy. * @param list $nonSuperclassParents All parent class names that are not marked as mapped superclasses, with the direct parent class being the first and the root entity class the last element. * @psalm-param CMTemplate $class * @psalm-param CMTemplate|null $parent * * @return void */ abstract protected function doLoadMetadata( ClassMetadata $class, ?ClassMetadata $parent, bool $rootEntityFound, array $nonSuperclassParents ); /** * Creates a new ClassMetadata instance for the given class name. * * @psalm-param class-string $className * * @return ClassMetadata * @psalm-return CMTemplate * * @template T of object */ abstract protected function newClassMetadataInstance(string $className); /** * {@inheritDoc} */ public function isTransient(string $className) { if (! $this->initialized) { $this->initialize(); } if (class_exists($className, false) && (new ReflectionClass($className))->isAnonymous()) { return false; } if (! class_exists($className, false) && strpos($className, ':') !== false) { throw MappingException::nonExistingClass($className); } /** @psalm-var class-string $className */ return $this->getDriver()->isTransient($className); } /** * Sets the reflectionService. * * @return void */ public function setReflectionService(ReflectionService $reflectionService) { $this->reflectionService = $reflectionService; } /** * Gets the reflection service associated with this metadata factory. * * @return ReflectionService */ public function getReflectionService() { if ($this->reflectionService === null) { $this->reflectionService = new RuntimeReflectionService(); } return $this->reflectionService; } protected function getCacheKey(string $realClassName): string { return str_replace('\\', '__', $realClassName) . $this->cacheSalt; } /** * Gets the real class name of a class name that could be a proxy. * * @psalm-param class-string>|class-string $class * * @psalm-return class-string * * @template T of object */ private function getRealClass(string $class): string { if ($this->proxyClassNameResolver === null) { $this->createDefaultProxyClassNameResolver(); } assert($this->proxyClassNameResolver !== null); return $this->proxyClassNameResolver->resolveClassName($class); } private function createDefaultProxyClassNameResolver(): void { $this->proxyClassNameResolver = new class implements ProxyClassNameResolver { /** * @psalm-param class-string>|class-string $className * * @psalm-return class-string * * @template T of object */ public function resolveClassName(string $className): string { $pos = strrpos($className, '\\' . Proxy::MARKER . '\\'); if ($pos === false) { /** @psalm-var class-string */ return $className; } /** @psalm-var class-string */ return substr($className, $pos + Proxy::MARKER_LENGTH + 2); } }; } } PKx[Ұpp,Persistence/Mapping/ClassMetadataFactory.phpnu[ */ public function getAllMetadata(); /** * Gets the class metadata descriptor for a class. * * @param class-string $className The name of the class. * * @return ClassMetadata * @psalm-return T */ public function getMetadataFor(string $className); /** * Checks whether the factory has the metadata for a class loaded already. * * @param class-string $className * * @return bool TRUE if the metadata of the class in question is already loaded, FALSE otherwise. */ public function hasMetadataFor(string $className); /** * Sets the metadata descriptor for a specific class. * * @param class-string $className * @psalm-param T $class * * @return void */ public function setMetadataFor(string $className, ClassMetadata $class); /** * Returns whether the class with the specified name should have its metadata loaded. * This is only the case if it is either mapped directly or as a MappedSuperclass. * * @psalm-param class-string $className * * @return bool */ public function isTransient(string $className); } PKx[c/Persistence/Mapping/StaticReflectionService.phpnu[ An array of Connection instances. */ public function getConnections(); /** * Gets all connection names. * * @return array An array of connection names. */ public function getConnectionNames(); } PKx[S+Persistence/Proxy.phpnu[find($id). * * @param string $className The class name of the object to find. * @param mixed $id The identity of the object to find. * @psalm-param class-string $className * * @return object|null The found object. * @psalm-return T|null * * @template T of object */ public function find(string $className, $id); /** * Tells the ObjectManager to make an instance managed and persistent. * * The object will be entered into the database as a result of the flush operation. * * NOTE: The persist operation always considers objects that are not yet known to * this ObjectManager as NEW. Do not pass detached objects to the persist operation. * * @param object $object The instance to make managed and persistent. * * @return void */ public function persist(object $object); /** * Removes an object instance. * * A removed object will be removed from the database as a result of the flush operation. * * @param object $object The object instance to remove. * * @return void */ public function remove(object $object); /** * Clears the ObjectManager. All objects that are currently managed * by this ObjectManager become detached. * * @return void */ public function clear(); /** * Detaches an object from the ObjectManager, causing a managed object to * become detached. Unflushed changes made to the object if any * (including removal of the object), will not be synchronized to the database. * Objects which previously referenced the detached object will continue to * reference it. * * @param object $object The object to detach. * * @return void */ public function detach(object $object); /** * Refreshes the persistent state of an object from the database, * overriding any local changes that have not yet been persisted. * * @param object $object The object to refresh. * * @return void */ public function refresh(object $object); /** * Flushes all changes to objects that have been queued up to now to the database. * This effectively synchronizes the in-memory state of managed objects with the * database. * * @return void */ public function flush(); /** * Gets the repository for a class. * * @psalm-param class-string $className * * @psalm-return ObjectRepository * * @template T of object */ public function getRepository(string $className); /** * Returns the ClassMetadata descriptor for a class. * * The class name must be the fully-qualified class name without a leading backslash * (as it is returned by get_class($obj)). * * @psalm-param class-string $className * * @psalm-return ClassMetadata * * @template T of object */ public function getClassMetadata(string $className); /** * Gets the metadata factory used to gather the metadata of classes. * * @psalm-return ClassMetadataFactory> */ public function getMetadataFactory(); /** * Helper method to initialize a lazy loading proxy or persistent collection. * * This method is a no-op for other objects. * * @return void */ public function initializeObject(object $obj); /** * Checks if the object is part of the current UnitOfWork and therefore managed. * * @return bool */ public function contains(object $object); } PKx[haNj (Persistence/Event/PreUpdateEventArgs.phpnu[ */ class PreUpdateEventArgs extends LifecycleEventArgs { /** @var array> */ private $entityChangeSet; /** * @param array> $changeSet * @psalm-param TObjectManager $objectManager */ public function __construct(object $entity, ObjectManager $objectManager, array &$changeSet) { parent::__construct($entity, $objectManager); $this->entityChangeSet = &$changeSet; } /** * Retrieves the entity changeset. * * @return array> */ public function getEntityChangeSet() { return $this->entityChangeSet; } /** * Checks if field has a changeset. * * @return bool */ public function hasChangedField(string $field) { return isset($this->entityChangeSet[$field]); } /** * Gets the old value of the changeset of the changed field. * * @return mixed */ public function getOldValue(string $field) { $this->assertValidField($field); return $this->entityChangeSet[$field][0]; } /** * Gets the new value of the changeset of the changed field. * * @return mixed */ public function getNewValue(string $field) { $this->assertValidField($field); return $this->entityChangeSet[$field][1]; } /** * Sets the new value of this field. * * @param mixed $value * * @return void */ public function setNewValue(string $field, $value) { $this->assertValidField($field); $this->entityChangeSet[$field][1] = $value; } /** * Asserts the field exists in changeset. * * @return void * * @throws InvalidArgumentException */ private function assertValidField(string $field) { if (! isset($this->entityChangeSet[$field])) { throw new InvalidArgumentException(sprintf( 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.', $field, get_class($this->getObject()) )); } } } PKx[O tt&Persistence/Event/OnClearEventArgs.phpnu[objectManager = $objectManager; } /** * Retrieves the associated ObjectManager. * * @return ObjectManager * @psalm-return TObjectManager */ public function getObjectManager() { return $this->objectManager; } } PKx[ڬ]]0Persistence/Event/LoadClassMetadataEventArgs.phpnu[ * @template-covariant TObjectManager of ObjectManager */ class LoadClassMetadataEventArgs extends EventArgs { /** * @var ClassMetadata * @psalm-var TClassMetadata */ private $classMetadata; /** * @var ObjectManager * @psalm-var TObjectManager */ private $objectManager; /** * @psalm-param TClassMetadata $classMetadata * @psalm-param TObjectManager $objectManager */ public function __construct(ClassMetadata $classMetadata, ObjectManager $objectManager) { $this->classMetadata = $classMetadata; $this->objectManager = $objectManager; } /** * Retrieves the associated ClassMetadata. * * @return ClassMetadata * @psalm-return TClassMetadata */ public function getClassMetadata() { return $this->classMetadata; } /** * Retrieves the associated ObjectManager. * * @return TObjectManager */ public function getObjectManager() { return $this->objectManager; } } PKx[4캙**&Persistence/Event/ManagerEventArgs.phpnu[objectManager = $objectManager; } /** * Retrieves the associated ObjectManager. * * @return ObjectManager * @psalm-return TObjectManager */ public function getObjectManager() { return $this->objectManager; } } PKx['8^^(Persistence/Event/LifecycleEventArgs.phpnu[object = $object; $this->objectManager = $objectManager; } /** * Retrieves the associated object. * * @return object */ public function getObject() { return $this->object; } /** * Retrieves the associated ObjectManager. * * @return ObjectManager * @psalm-return TObjectManager */ public function getObjectManager() { return $this->objectManager; } } PKx[#4a Persistence/ManagerRegistry.phpnu[ An array of ObjectManager instances */ public function getManagers(); /** * Resets a named object manager. * * This method is useful when an object manager has been closed * because of a rollbacked transaction AND when you think that * it makes sense to get a new one to replace the closed one. * * Be warned that you will get a brand new object manager as * the existing one is not useable anymore. This means that any * other object with a dependency on this object manager will * hold an obsolete reference. You can inject the registry instead * to avoid this problem. * * @param string|null $name The object manager name (null for the default one). * * @return ObjectManager */ public function resetManager(?string $name = null); /** * Gets all object manager names and associated service IDs. A service ID * is a string that allows to obtain an object manager, typically from a * PSR-11 container. * * @return array An array with object manager names as keys, * and service IDs as values. */ public function getManagerNames(); /** * Gets the ObjectRepository for a persistent object. * * @param string $persistentObject The name of the persistent object. * @param string|null $persistentManagerName The object manager name (null for the default one). * @psalm-param class-string $persistentObject * * @return ObjectRepository * @psalm-return ObjectRepository * * @template T of object */ public function getRepository( string $persistentObject, ?string $persistentManagerName = null ); /** * Gets the object manager associated with a given class. * * @param class-string $class A persistent object class name. * * @return ObjectManager|null */ public function getManagerForClass(string $class); } PKx[}%Persistence/NotifyPropertyChanged.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Webmozart\Assert; use ArrayAccess; use BadMethodCallException; use Closure; use Countable; use DateTime; use DateTimeImmutable; use Exception; use ResourceBundle; use SimpleXMLElement; use Throwable; use Traversable; /** * Efficient assertions to validate the input/output of your methods. * * @since 1.0 * * @author Bernhard Schussek */ class Assert { use Mixin; /** * @psalm-pure * @psalm-assert string $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function string($value, $message = '') { if (!\is_string($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a string. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert non-empty-string $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function stringNotEmpty($value, $message = '') { static::string($value, $message); static::notEq($value, '', $message); } /** * @psalm-pure * @psalm-assert int $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function integer($value, $message = '') { if (!\is_int($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an integer. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert numeric $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function integerish($value, $message = '') { if (!\is_numeric($value) || $value != (int) $value) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an integerish value. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert positive-int $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function positiveInteger($value, $message = '') { if (!(\is_int($value) && $value > 0)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a positive integer. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-assert float $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function float($value, $message = '') { if (!\is_float($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a float. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert numeric $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function numeric($value, $message = '') { if (!\is_numeric($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a numeric. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert positive-int|0 $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function natural($value, $message = '') { if (!\is_int($value) || $value < 0) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a non-negative integer. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-assert bool $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function boolean($value, $message = '') { if (!\is_bool($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a boolean. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert scalar $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function scalar($value, $message = '') { if (!\is_scalar($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a scalar. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert object $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function object($value, $message = '') { if (!\is_object($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an object. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert resource $value * * @param mixed $value * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php * @param string $message * * @throws InvalidArgumentException */ public static function resource($value, $type = null, $message = '') { if (!\is_resource($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a resource. Got: %s', static::typeToString($value) )); } if ($type && $type !== \get_resource_type($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a resource of type %2$s. Got: %s', static::typeToString($value), $type )); } } /** * @psalm-pure * @psalm-assert callable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function isCallable($value, $message = '') { if (!\is_callable($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a callable. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert array $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function isArray($value, $message = '') { if (!\is_array($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an array. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert iterable $value * * @deprecated use "isIterable" or "isInstanceOf" instead * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function isTraversable($value, $message = '') { @\trigger_error( \sprintf( 'The "%s" assertion is deprecated. You should stop using it, as it will soon be removed in 2.0 version. Use "isIterable" or "isInstanceOf" instead.', __METHOD__ ), \E_USER_DEPRECATED ); if (!\is_array($value) && !($value instanceof Traversable)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a traversable. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert array|ArrayAccess $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function isArrayAccessible($value, $message = '') { if (!\is_array($value) && !($value instanceof ArrayAccess)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an array accessible. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert countable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function isCountable($value, $message = '') { if ( !\is_array($value) && !($value instanceof Countable) && !($value instanceof ResourceBundle) && !($value instanceof SimpleXMLElement) ) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a countable. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function isIterable($value, $message = '') { if (!\is_array($value) && !($value instanceof Traversable)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an iterable. Got: %s', static::typeToString($value) )); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert ExpectedType $value * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException */ public static function isInstanceOf($value, $class, $message = '') { if (!($value instanceof $class)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an instance of %2$s. Got: %s', static::typeToString($value), $class )); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert !ExpectedType $value * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException */ public static function notInstanceOf($value, $class, $message = '') { if ($value instanceof $class) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an instance other than %2$s. Got: %s', static::typeToString($value), $class )); } } /** * @psalm-pure * @psalm-param array $classes * * @param mixed $value * @param array $classes * @param string $message * * @throws InvalidArgumentException */ public static function isInstanceOfAny($value, array $classes, $message = '') { foreach ($classes as $class) { if ($value instanceof $class) { return; } } static::reportInvalidArgument(\sprintf( $message ?: 'Expected an instance of any of %2$s. Got: %s', static::typeToString($value), \implode(', ', \array_map(array(static::class, 'valueToString'), $classes)) )); } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert ExpectedType|class-string $value * * @param object|string $value * @param string $class * @param string $message * * @throws InvalidArgumentException */ public static function isAOf($value, $class, $message = '') { static::string($class, 'Expected class as a string. Got: %s'); if (!\is_a($value, $class, \is_string($value))) { static::reportInvalidArgument(sprintf( $message ?: 'Expected an instance of this class or to this class among its parents "%2$s". Got: %s', static::valueToString($value), $class )); } } /** * @psalm-pure * @psalm-template UnexpectedType of object * @psalm-param class-string $class * @psalm-assert !UnexpectedType $value * @psalm-assert !class-string $value * * @param object|string $value * @param string $class * @param string $message * * @throws InvalidArgumentException */ public static function isNotA($value, $class, $message = '') { static::string($class, 'Expected class as a string. Got: %s'); if (\is_a($value, $class, \is_string($value))) { static::reportInvalidArgument(sprintf( $message ?: 'Expected an instance of this class or to this class among its parents other than "%2$s". Got: %s', static::valueToString($value), $class )); } } /** * @psalm-pure * @psalm-param array $classes * * @param object|string $value * @param string[] $classes * @param string $message * * @throws InvalidArgumentException */ public static function isAnyOf($value, array $classes, $message = '') { foreach ($classes as $class) { static::string($class, 'Expected class as a string. Got: %s'); if (\is_a($value, $class, \is_string($value))) { return; } } static::reportInvalidArgument(sprintf( $message ?: 'Expected an instance of any of this classes or any of those classes among their parents "%2$s". Got: %s', static::valueToString($value), \implode(', ', $classes) )); } /** * @psalm-pure * @psalm-assert empty $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function isEmpty($value, $message = '') { if (!empty($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an empty value. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-assert !empty $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function notEmpty($value, $message = '') { if (empty($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a non-empty value. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-assert null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function null($value, $message = '') { if (null !== $value) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected null. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-assert !null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function notNull($value, $message = '') { if (null === $value) { static::reportInvalidArgument( $message ?: 'Expected a value other than null.' ); } } /** * @psalm-pure * @psalm-assert true $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function true($value, $message = '') { if (true !== $value) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to be true. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-assert false $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function false($value, $message = '') { if (false !== $value) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to be false. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-assert !false $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function notFalse($value, $message = '') { if (false === $value) { static::reportInvalidArgument( $message ?: 'Expected a value other than false.' ); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function ip($value, $message = '') { if (false === \filter_var($value, \FILTER_VALIDATE_IP)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to be an IP. Got: %s', static::valueToString($value) )); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function ipv4($value, $message = '') { if (false === \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to be an IPv4. Got: %s', static::valueToString($value) )); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function ipv6($value, $message = '') { if (false === \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to be an IPv6. Got: %s', static::valueToString($value) )); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function email($value, $message = '') { if (false === \filter_var($value, FILTER_VALIDATE_EMAIL)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to be a valid e-mail address. Got: %s', static::valueToString($value) )); } } /** * Does non strict comparisons on the items, so ['3', 3] will not pass the assertion. * * @param array $values * @param string $message * * @throws InvalidArgumentException */ public static function uniqueValues(array $values, $message = '') { $allValues = \count($values); $uniqueValues = \count(\array_unique($values)); if ($allValues !== $uniqueValues) { $difference = $allValues - $uniqueValues; static::reportInvalidArgument(\sprintf( $message ?: 'Expected an array of unique values, but %s of them %s duplicated', $difference, (1 === $difference ? 'is' : 'are') )); } } /** * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException */ public static function eq($value, $expect, $message = '') { if ($expect != $value) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value equal to %2$s. Got: %s', static::valueToString($value), static::valueToString($expect) )); } } /** * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException */ public static function notEq($value, $expect, $message = '') { if ($expect == $value) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a different value than %s.', static::valueToString($expect) )); } } /** * @psalm-pure * * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException */ public static function same($value, $expect, $message = '') { if ($expect !== $value) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value identical to %2$s. Got: %s', static::valueToString($value), static::valueToString($expect) )); } } /** * @psalm-pure * * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException */ public static function notSame($value, $expect, $message = '') { if ($expect === $value) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value not identical to %s.', static::valueToString($expect) )); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException */ public static function greaterThan($value, $limit, $message = '') { if ($value <= $limit) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value greater than %2$s. Got: %s', static::valueToString($value), static::valueToString($limit) )); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException */ public static function greaterThanEq($value, $limit, $message = '') { if ($value < $limit) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value greater than or equal to %2$s. Got: %s', static::valueToString($value), static::valueToString($limit) )); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException */ public static function lessThan($value, $limit, $message = '') { if ($value >= $limit) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value less than %2$s. Got: %s', static::valueToString($value), static::valueToString($limit) )); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException */ public static function lessThanEq($value, $limit, $message = '') { if ($value > $limit) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value less than or equal to %2$s. Got: %s', static::valueToString($value), static::valueToString($limit) )); } } /** * Inclusive range, so Assert::(3, 3, 5) passes. * * @psalm-pure * * @param mixed $value * @param mixed $min * @param mixed $max * @param string $message * * @throws InvalidArgumentException */ public static function range($value, $min, $max, $message = '') { if ($value < $min || $value > $max) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value between %2$s and %3$s. Got: %s', static::valueToString($value), static::valueToString($min), static::valueToString($max) )); } } /** * A more human-readable alias of Assert::inArray(). * * @psalm-pure * * @param mixed $value * @param array $values * @param string $message * * @throws InvalidArgumentException */ public static function oneOf($value, array $values, $message = '') { static::inArray($value, $values, $message); } /** * Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion. * * @psalm-pure * * @param mixed $value * @param array $values * @param string $message * * @throws InvalidArgumentException */ public static function inArray($value, array $values, $message = '') { if (!\in_array($value, $values, true)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected one of: %2$s. Got: %s', static::valueToString($value), \implode(', ', \array_map(array(static::class, 'valueToString'), $values)) )); } } /** * @psalm-pure * * @param string $value * @param string $subString * @param string $message * * @throws InvalidArgumentException */ public static function contains($value, $subString, $message = '') { if (false === \strpos($value, $subString)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain %2$s. Got: %s', static::valueToString($value), static::valueToString($subString) )); } } /** * @psalm-pure * * @param string $value * @param string $subString * @param string $message * * @throws InvalidArgumentException */ public static function notContains($value, $subString, $message = '') { if (false !== \strpos($value, $subString)) { static::reportInvalidArgument(\sprintf( $message ?: '%2$s was not expected to be contained in a value. Got: %s', static::valueToString($value), static::valueToString($subString) )); } } /** * @psalm-pure * * @param string $value * @param string $message * * @throws InvalidArgumentException */ public static function notWhitespaceOnly($value, $message = '') { if (\preg_match('/^\s*$/', $value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a non-whitespace string. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * * @param string $value * @param string $prefix * @param string $message * * @throws InvalidArgumentException */ public static function startsWith($value, $prefix, $message = '') { if (0 !== \strpos($value, $prefix)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to start with %2$s. Got: %s', static::valueToString($value), static::valueToString($prefix) )); } } /** * @psalm-pure * * @param string $value * @param string $prefix * @param string $message * * @throws InvalidArgumentException */ public static function notStartsWith($value, $prefix, $message = '') { if (0 === \strpos($value, $prefix)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value not to start with %2$s. Got: %s', static::valueToString($value), static::valueToString($prefix) )); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function startsWithLetter($value, $message = '') { static::string($value); $valid = isset($value[0]); if ($valid) { $locale = \setlocale(LC_CTYPE, 0); \setlocale(LC_CTYPE, 'C'); $valid = \ctype_alpha($value[0]); \setlocale(LC_CTYPE, $locale); } if (!$valid) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to start with a letter. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * * @param string $value * @param string $suffix * @param string $message * * @throws InvalidArgumentException */ public static function endsWith($value, $suffix, $message = '') { if ($suffix !== \substr($value, -\strlen($suffix))) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to end with %2$s. Got: %s', static::valueToString($value), static::valueToString($suffix) )); } } /** * @psalm-pure * * @param string $value * @param string $suffix * @param string $message * * @throws InvalidArgumentException */ public static function notEndsWith($value, $suffix, $message = '') { if ($suffix === \substr($value, -\strlen($suffix))) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value not to end with %2$s. Got: %s', static::valueToString($value), static::valueToString($suffix) )); } } /** * @psalm-pure * * @param string $value * @param string $pattern * @param string $message * * @throws InvalidArgumentException */ public static function regex($value, $pattern, $message = '') { if (!\preg_match($pattern, $value)) { static::reportInvalidArgument(\sprintf( $message ?: 'The value %s does not match the expected pattern.', static::valueToString($value) )); } } /** * @psalm-pure * * @param string $value * @param string $pattern * @param string $message * * @throws InvalidArgumentException */ public static function notRegex($value, $pattern, $message = '') { if (\preg_match($pattern, $value, $matches, PREG_OFFSET_CAPTURE)) { static::reportInvalidArgument(\sprintf( $message ?: 'The value %s matches the pattern %s (at offset %d).', static::valueToString($value), static::valueToString($pattern), $matches[0][1] )); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function unicodeLetters($value, $message = '') { static::string($value); if (!\preg_match('/^\p{L}+$/u', $value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain only Unicode letters. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function alpha($value, $message = '') { static::string($value); $locale = \setlocale(LC_CTYPE, 0); \setlocale(LC_CTYPE, 'C'); $valid = !\ctype_alpha($value); \setlocale(LC_CTYPE, $locale); if ($valid) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain only letters. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * * @param string $value * @param string $message * * @throws InvalidArgumentException */ public static function digits($value, $message = '') { $locale = \setlocale(LC_CTYPE, 0); \setlocale(LC_CTYPE, 'C'); $valid = !\ctype_digit($value); \setlocale(LC_CTYPE, $locale); if ($valid) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain digits only. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * * @param string $value * @param string $message * * @throws InvalidArgumentException */ public static function alnum($value, $message = '') { $locale = \setlocale(LC_CTYPE, 0); \setlocale(LC_CTYPE, 'C'); $valid = !\ctype_alnum($value); \setlocale(LC_CTYPE, $locale); if ($valid) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain letters and digits only. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-assert lowercase-string $value * * @param string $value * @param string $message * * @throws InvalidArgumentException */ public static function lower($value, $message = '') { $locale = \setlocale(LC_CTYPE, 0); \setlocale(LC_CTYPE, 'C'); $valid = !\ctype_lower($value); \setlocale(LC_CTYPE, $locale); if ($valid) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain lowercase characters only. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-assert !lowercase-string $value * * @param string $value * @param string $message * * @throws InvalidArgumentException */ public static function upper($value, $message = '') { $locale = \setlocale(LC_CTYPE, 0); \setlocale(LC_CTYPE, 'C'); $valid = !\ctype_upper($value); \setlocale(LC_CTYPE, $locale); if ($valid) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain uppercase characters only. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * * @param string $value * @param int $length * @param string $message * * @throws InvalidArgumentException */ public static function length($value, $length, $message = '') { if ($length !== static::strlen($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain %2$s characters. Got: %s', static::valueToString($value), $length )); } } /** * Inclusive min. * * @psalm-pure * * @param string $value * @param int|float $min * @param string $message * * @throws InvalidArgumentException */ public static function minLength($value, $min, $message = '') { if (static::strlen($value) < $min) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain at least %2$s characters. Got: %s', static::valueToString($value), $min )); } } /** * Inclusive max. * * @psalm-pure * * @param string $value * @param int|float $max * @param string $message * * @throws InvalidArgumentException */ public static function maxLength($value, $max, $message = '') { if (static::strlen($value) > $max) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain at most %2$s characters. Got: %s', static::valueToString($value), $max )); } } /** * Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion. * * @psalm-pure * * @param string $value * @param int|float $min * @param int|float $max * @param string $message * * @throws InvalidArgumentException */ public static function lengthBetween($value, $min, $max, $message = '') { $length = static::strlen($value); if ($length < $min || $length > $max) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a value to contain between %2$s and %3$s characters. Got: %s', static::valueToString($value), $min, $max )); } } /** * Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file. * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function fileExists($value, $message = '') { static::string($value); if (!\file_exists($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'The file %s does not exist.', static::valueToString($value) )); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function file($value, $message = '') { static::fileExists($value, $message); if (!\is_file($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'The path %s is not a file.', static::valueToString($value) )); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function directory($value, $message = '') { static::fileExists($value, $message); if (!\is_dir($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'The path %s is no directory.', static::valueToString($value) )); } } /** * @param string $value * @param string $message * * @throws InvalidArgumentException */ public static function readable($value, $message = '') { if (!\is_readable($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'The path %s is not readable.', static::valueToString($value) )); } } /** * @param string $value * @param string $message * * @throws InvalidArgumentException */ public static function writable($value, $message = '') { if (!\is_writable($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'The path %s is not writable.', static::valueToString($value) )); } } /** * @psalm-assert class-string $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function classExists($value, $message = '') { if (!\class_exists($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an existing class name. Got: %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert class-string|ExpectedType $value * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException */ public static function subclassOf($value, $class, $message = '') { if (!\is_subclass_of($value, $class)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected a sub-class of %2$s. Got: %s', static::valueToString($value), static::valueToString($class) )); } } /** * @psalm-assert class-string $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function interfaceExists($value, $message = '') { if (!\interface_exists($value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an existing interface name. got %s', static::valueToString($value) )); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $interface * @psalm-assert class-string $value * * @param mixed $value * @param mixed $interface * @param string $message * * @throws InvalidArgumentException */ public static function implementsInterface($value, $interface, $message = '') { if (!\in_array($interface, \class_implements($value))) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an implementation of %2$s. Got: %s', static::valueToString($value), static::valueToString($interface) )); } } /** * @psalm-pure * @psalm-param class-string|object $classOrObject * * @param string|object $classOrObject * @param mixed $property * @param string $message * * @throws InvalidArgumentException */ public static function propertyExists($classOrObject, $property, $message = '') { if (!\property_exists($classOrObject, $property)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected the property %s to exist.', static::valueToString($property) )); } } /** * @psalm-pure * @psalm-param class-string|object $classOrObject * * @param string|object $classOrObject * @param mixed $property * @param string $message * * @throws InvalidArgumentException */ public static function propertyNotExists($classOrObject, $property, $message = '') { if (\property_exists($classOrObject, $property)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected the property %s to not exist.', static::valueToString($property) )); } } /** * @psalm-pure * @psalm-param class-string|object $classOrObject * * @param string|object $classOrObject * @param mixed $method * @param string $message * * @throws InvalidArgumentException */ public static function methodExists($classOrObject, $method, $message = '') { if (!(\is_string($classOrObject) || \is_object($classOrObject)) || !\method_exists($classOrObject, $method)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected the method %s to exist.', static::valueToString($method) )); } } /** * @psalm-pure * @psalm-param class-string|object $classOrObject * * @param string|object $classOrObject * @param mixed $method * @param string $message * * @throws InvalidArgumentException */ public static function methodNotExists($classOrObject, $method, $message = '') { if ((\is_string($classOrObject) || \is_object($classOrObject)) && \method_exists($classOrObject, $method)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected the method %s to not exist.', static::valueToString($method) )); } } /** * @psalm-pure * * @param array $array * @param string|int $key * @param string $message * * @throws InvalidArgumentException */ public static function keyExists($array, $key, $message = '') { if (!(isset($array[$key]) || \array_key_exists($key, $array))) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected the key %s to exist.', static::valueToString($key) )); } } /** * @psalm-pure * * @param array $array * @param string|int $key * @param string $message * * @throws InvalidArgumentException */ public static function keyNotExists($array, $key, $message = '') { if (isset($array[$key]) || \array_key_exists($key, $array)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected the key %s to not exist.', static::valueToString($key) )); } } /** * Checks if a value is a valid array key (int or string). * * @psalm-pure * @psalm-assert array-key $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException */ public static function validArrayKey($value, $message = '') { if (!(\is_int($value) || \is_string($value))) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected string or integer. Got: %s', static::typeToString($value) )); } } /** * Does not check if $array is countable, this can generate a warning on php versions after 7.2. * * @param Countable|array $array * @param int $number * @param string $message * * @throws InvalidArgumentException */ public static function count($array, $number, $message = '') { static::eq( \count($array), $number, \sprintf( $message ?: 'Expected an array to contain %d elements. Got: %d.', $number, \count($array) ) ); } /** * Does not check if $array is countable, this can generate a warning on php versions after 7.2. * * @param Countable|array $array * @param int|float $min * @param string $message * * @throws InvalidArgumentException */ public static function minCount($array, $min, $message = '') { if (\count($array) < $min) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an array to contain at least %2$d elements. Got: %d', \count($array), $min )); } } /** * Does not check if $array is countable, this can generate a warning on php versions after 7.2. * * @param Countable|array $array * @param int|float $max * @param string $message * * @throws InvalidArgumentException */ public static function maxCount($array, $max, $message = '') { if (\count($array) > $max) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an array to contain at most %2$d elements. Got: %d', \count($array), $max )); } } /** * Does not check if $array is countable, this can generate a warning on php versions after 7.2. * * @param Countable|array $array * @param int|float $min * @param int|float $max * @param string $message * * @throws InvalidArgumentException */ public static function countBetween($array, $min, $max, $message = '') { $count = \count($array); if ($count < $min || $count > $max) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an array to contain between %2$d and %3$d elements. Got: %d', $count, $min, $max )); } } /** * @psalm-pure * @psalm-assert list $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException */ public static function isList($array, $message = '') { if (!\is_array($array)) { static::reportInvalidArgument( $message ?: 'Expected list - non-associative array.' ); } if ($array === \array_values($array)) { return; } $nextKey = -1; foreach ($array as $k => $v) { if ($k !== ++$nextKey) { static::reportInvalidArgument( $message ?: 'Expected list - non-associative array.' ); } } } /** * @psalm-pure * @psalm-assert non-empty-list $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException */ public static function isNonEmptyList($array, $message = '') { static::isList($array, $message); static::notEmpty($array, $message); } /** * @psalm-pure * @psalm-template T * @psalm-param mixed|array $array * @psalm-assert array $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException */ public static function isMap($array, $message = '') { if ( !\is_array($array) || \array_keys($array) !== \array_filter(\array_keys($array), '\is_string') ) { static::reportInvalidArgument( $message ?: 'Expected map - associative array with string keys.' ); } } /** * @psalm-pure * @psalm-template T * @psalm-param mixed|array $array * @psalm-assert array $array * @psalm-assert !empty $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException */ public static function isNonEmptyMap($array, $message = '') { static::isMap($array, $message); static::notEmpty($array, $message); } /** * @psalm-pure * * @param string $value * @param string $message * * @throws InvalidArgumentException */ public static function uuid($value, $message = '') { $value = \str_replace(array('urn:', 'uuid:', '{', '}'), '', $value); // The nil UUID is special form of UUID that is specified to have all // 128 bits set to zero. if ('00000000-0000-0000-0000-000000000000' === $value) { return; } if (!\preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) { static::reportInvalidArgument(\sprintf( $message ?: 'Value %s is not a valid UUID.', static::valueToString($value) )); } } /** * @psalm-param class-string $class * * @param Closure $expression * @param string $class * @param string $message * * @throws InvalidArgumentException */ public static function throws(Closure $expression, $class = 'Exception', $message = '') { static::string($class); $actual = 'none'; try { $expression(); } catch (Exception $e) { $actual = \get_class($e); if ($e instanceof $class) { return; } } catch (Throwable $e) { $actual = \get_class($e); if ($e instanceof $class) { return; } } static::reportInvalidArgument($message ?: \sprintf( 'Expected to throw "%s", got "%s"', $class, $actual )); } /** * @throws BadMethodCallException */ public static function __callStatic($name, $arguments) { if ('nullOr' === \substr($name, 0, 6)) { if (null !== $arguments[0]) { $method = \lcfirst(\substr($name, 6)); \call_user_func_array(array(static::class, $method), $arguments); } return; } if ('all' === \substr($name, 0, 3)) { static::isIterable($arguments[0]); $method = \lcfirst(\substr($name, 3)); $args = $arguments; foreach ($arguments[0] as $entry) { $args[0] = $entry; \call_user_func_array(array(static::class, $method), $args); } return; } throw new BadMethodCallException('No such method: '.$name); } /** * @param mixed $value * * @return string */ protected static function valueToString($value) { if (null === $value) { return 'null'; } if (true === $value) { return 'true'; } if (false === $value) { return 'false'; } if (\is_array($value)) { return 'array'; } if (\is_object($value)) { if (\method_exists($value, '__toString')) { return \get_class($value).': '.self::valueToString($value->__toString()); } if ($value instanceof DateTime || $value instanceof DateTimeImmutable) { return \get_class($value).': '.self::valueToString($value->format('c')); } return \get_class($value); } if (\is_resource($value)) { return 'resource'; } if (\is_string($value)) { return '"'.$value.'"'; } return (string) $value; } /** * @param mixed $value * * @return string */ protected static function typeToString($value) { return \is_object($value) ? \get_class($value) : \gettype($value); } protected static function strlen($value) { if (!\function_exists('mb_detect_encoding')) { return \strlen($value); } if (false === $encoding = \mb_detect_encoding($value)) { return \strlen($value); } return \mb_strlen($value, $encoding); } /** * @param string $message * * @throws InvalidArgumentException * * @psalm-pure this method is not supposed to perform side-effects * @psalm-return never */ protected static function reportInvalidArgument($message) { throw new InvalidArgumentException($message); } private function __construct() { } } PKx[.A Mixin.phpnu[ $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allString($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::string($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrString($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::string($entry, $message); } } /** * @psalm-pure * @psalm-assert non-empty-string|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrStringNotEmpty($value, $message = '') { null === $value || static::stringNotEmpty($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allStringNotEmpty($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::stringNotEmpty($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrStringNotEmpty($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::stringNotEmpty($entry, $message); } } /** * @psalm-pure * @psalm-assert int|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrInteger($value, $message = '') { null === $value || static::integer($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allInteger($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::integer($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrInteger($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::integer($entry, $message); } } /** * @psalm-pure * @psalm-assert numeric|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIntegerish($value, $message = '') { null === $value || static::integerish($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIntegerish($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::integerish($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIntegerish($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::integerish($entry, $message); } } /** * @psalm-pure * @psalm-assert positive-int|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrPositiveInteger($value, $message = '') { null === $value || static::positiveInteger($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allPositiveInteger($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::positiveInteger($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrPositiveInteger($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::positiveInteger($entry, $message); } } /** * @psalm-pure * @psalm-assert float|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrFloat($value, $message = '') { null === $value || static::float($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allFloat($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::float($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrFloat($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::float($entry, $message); } } /** * @psalm-pure * @psalm-assert numeric|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNumeric($value, $message = '') { null === $value || static::numeric($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNumeric($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::numeric($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNumeric($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::numeric($entry, $message); } } /** * @psalm-pure * @psalm-assert positive-int|0|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNatural($value, $message = '') { null === $value || static::natural($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNatural($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::natural($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNatural($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::natural($entry, $message); } } /** * @psalm-pure * @psalm-assert bool|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrBoolean($value, $message = '') { null === $value || static::boolean($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allBoolean($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::boolean($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrBoolean($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::boolean($entry, $message); } } /** * @psalm-pure * @psalm-assert scalar|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrScalar($value, $message = '') { null === $value || static::scalar($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allScalar($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::scalar($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrScalar($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::scalar($entry, $message); } } /** * @psalm-pure * @psalm-assert object|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrObject($value, $message = '') { null === $value || static::object($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allObject($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::object($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrObject($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::object($entry, $message); } } /** * @psalm-pure * @psalm-assert resource|null $value * * @param mixed $value * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrResource($value, $type = null, $message = '') { null === $value || static::resource($value, $type, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allResource($value, $type = null, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::resource($entry, $type, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrResource($value, $type = null, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::resource($entry, $type, $message); } } /** * @psalm-pure * @psalm-assert callable|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsCallable($value, $message = '') { null === $value || static::isCallable($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsCallable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isCallable($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsCallable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isCallable($entry, $message); } } /** * @psalm-pure * @psalm-assert array|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsArray($value, $message = '') { null === $value || static::isArray($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsArray($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isArray($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsArray($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isArray($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable|null $value * * @deprecated use "isIterable" or "isInstanceOf" instead * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsTraversable($value, $message = '') { null === $value || static::isTraversable($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @deprecated use "isIterable" or "isInstanceOf" instead * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsTraversable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isTraversable($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @deprecated use "isIterable" or "isInstanceOf" instead * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsTraversable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isTraversable($entry, $message); } } /** * @psalm-pure * @psalm-assert array|ArrayAccess|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsArrayAccessible($value, $message = '') { null === $value || static::isArrayAccessible($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsArrayAccessible($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isArrayAccessible($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsArrayAccessible($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isArrayAccessible($entry, $message); } } /** * @psalm-pure * @psalm-assert countable|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsCountable($value, $message = '') { null === $value || static::isCountable($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsCountable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isCountable($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsCountable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isCountable($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsIterable($value, $message = '') { null === $value || static::isIterable($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsIterable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isIterable($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsIterable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isIterable($entry, $message); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert ExpectedType|null $value * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsInstanceOf($value, $class, $message = '') { null === $value || static::isInstanceOf($value, $class, $message); } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert iterable $value * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsInstanceOf($value, $class, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isInstanceOf($entry, $class, $message); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert iterable $value * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsInstanceOf($value, $class, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isInstanceOf($entry, $class, $message); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNotInstanceOf($value, $class, $message = '') { null === $value || static::notInstanceOf($value, $class, $message); } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotInstanceOf($value, $class, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notInstanceOf($entry, $class, $message); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert iterable $value * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNotInstanceOf($value, $class, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::notInstanceOf($entry, $class, $message); } } /** * @psalm-pure * @psalm-param array $classes * * @param mixed $value * @param array $classes * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsInstanceOfAny($value, $classes, $message = '') { null === $value || static::isInstanceOfAny($value, $classes, $message); } /** * @psalm-pure * @psalm-param array $classes * * @param mixed $value * @param array $classes * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsInstanceOfAny($value, $classes, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isInstanceOfAny($entry, $classes, $message); } } /** * @psalm-pure * @psalm-param array $classes * * @param mixed $value * @param array $classes * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsInstanceOfAny($value, $classes, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isInstanceOfAny($entry, $classes, $message); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert ExpectedType|class-string|null $value * * @param object|string|null $value * @param string $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsAOf($value, $class, $message = '') { null === $value || static::isAOf($value, $class, $message); } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert iterable> $value * * @param iterable $value * @param string $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsAOf($value, $class, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isAOf($entry, $class, $message); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert iterable|null> $value * * @param iterable $value * @param string $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsAOf($value, $class, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isAOf($entry, $class, $message); } } /** * @psalm-pure * @psalm-template UnexpectedType of object * @psalm-param class-string $class * * @param object|string|null $value * @param string $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsNotA($value, $class, $message = '') { null === $value || static::isNotA($value, $class, $message); } /** * @psalm-pure * @psalm-template UnexpectedType of object * @psalm-param class-string $class * * @param iterable $value * @param string $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsNotA($value, $class, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isNotA($entry, $class, $message); } } /** * @psalm-pure * @psalm-template UnexpectedType of object * @psalm-param class-string $class * @psalm-assert iterable $value * @psalm-assert iterable|null> $value * * @param iterable $value * @param string $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsNotA($value, $class, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isNotA($entry, $class, $message); } } /** * @psalm-pure * @psalm-param array $classes * * @param object|string|null $value * @param string[] $classes * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsAnyOf($value, $classes, $message = '') { null === $value || static::isAnyOf($value, $classes, $message); } /** * @psalm-pure * @psalm-param array $classes * * @param iterable $value * @param string[] $classes * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsAnyOf($value, $classes, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isAnyOf($entry, $classes, $message); } } /** * @psalm-pure * @psalm-param array $classes * * @param iterable $value * @param string[] $classes * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsAnyOf($value, $classes, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isAnyOf($entry, $classes, $message); } } /** * @psalm-pure * @psalm-assert empty $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsEmpty($value, $message = '') { null === $value || static::isEmpty($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsEmpty($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::isEmpty($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsEmpty($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::isEmpty($entry, $message); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNotEmpty($value, $message = '') { null === $value || static::notEmpty($value, $message); } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotEmpty($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notEmpty($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNotEmpty($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::notEmpty($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNull($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::null($entry, $message); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotNull($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notNull($entry, $message); } } /** * @psalm-pure * @psalm-assert true|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrTrue($value, $message = '') { null === $value || static::true($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allTrue($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::true($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrTrue($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::true($entry, $message); } } /** * @psalm-pure * @psalm-assert false|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrFalse($value, $message = '') { null === $value || static::false($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allFalse($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::false($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrFalse($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::false($entry, $message); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNotFalse($value, $message = '') { null === $value || static::notFalse($value, $message); } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotFalse($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notFalse($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNotFalse($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::notFalse($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIp($value, $message = '') { null === $value || static::ip($value, $message); } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIp($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::ip($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIp($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::ip($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIpv4($value, $message = '') { null === $value || static::ipv4($value, $message); } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIpv4($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::ipv4($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIpv4($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::ipv4($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIpv6($value, $message = '') { null === $value || static::ipv6($value, $message); } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIpv6($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::ipv6($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIpv6($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::ipv6($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrEmail($value, $message = '') { null === $value || static::email($value, $message); } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allEmail($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::email($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrEmail($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::email($entry, $message); } } /** * @param array|null $values * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrUniqueValues($values, $message = '') { null === $values || static::uniqueValues($values, $message); } /** * @param iterable $values * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allUniqueValues($values, $message = '') { static::isIterable($values); foreach ($values as $entry) { static::uniqueValues($entry, $message); } } /** * @param iterable $values * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrUniqueValues($values, $message = '') { static::isIterable($values); foreach ($values as $entry) { null === $entry || static::uniqueValues($entry, $message); } } /** * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrEq($value, $expect, $message = '') { null === $value || static::eq($value, $expect, $message); } /** * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allEq($value, $expect, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::eq($entry, $expect, $message); } } /** * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrEq($value, $expect, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::eq($entry, $expect, $message); } } /** * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNotEq($value, $expect, $message = '') { null === $value || static::notEq($value, $expect, $message); } /** * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotEq($value, $expect, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notEq($entry, $expect, $message); } } /** * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNotEq($value, $expect, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::notEq($entry, $expect, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrSame($value, $expect, $message = '') { null === $value || static::same($value, $expect, $message); } /** * @psalm-pure * * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allSame($value, $expect, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::same($entry, $expect, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrSame($value, $expect, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::same($entry, $expect, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNotSame($value, $expect, $message = '') { null === $value || static::notSame($value, $expect, $message); } /** * @psalm-pure * * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotSame($value, $expect, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notSame($entry, $expect, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $expect * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNotSame($value, $expect, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::notSame($entry, $expect, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrGreaterThan($value, $limit, $message = '') { null === $value || static::greaterThan($value, $limit, $message); } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allGreaterThan($value, $limit, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::greaterThan($entry, $limit, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrGreaterThan($value, $limit, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::greaterThan($entry, $limit, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrGreaterThanEq($value, $limit, $message = '') { null === $value || static::greaterThanEq($value, $limit, $message); } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allGreaterThanEq($value, $limit, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::greaterThanEq($entry, $limit, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrGreaterThanEq($value, $limit, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::greaterThanEq($entry, $limit, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrLessThan($value, $limit, $message = '') { null === $value || static::lessThan($value, $limit, $message); } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allLessThan($value, $limit, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::lessThan($entry, $limit, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrLessThan($value, $limit, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::lessThan($entry, $limit, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrLessThanEq($value, $limit, $message = '') { null === $value || static::lessThanEq($value, $limit, $message); } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allLessThanEq($value, $limit, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::lessThanEq($entry, $limit, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $limit * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrLessThanEq($value, $limit, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::lessThanEq($entry, $limit, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $min * @param mixed $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrRange($value, $min, $max, $message = '') { null === $value || static::range($value, $min, $max, $message); } /** * @psalm-pure * * @param mixed $value * @param mixed $min * @param mixed $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allRange($value, $min, $max, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::range($entry, $min, $max, $message); } } /** * @psalm-pure * * @param mixed $value * @param mixed $min * @param mixed $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrRange($value, $min, $max, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::range($entry, $min, $max, $message); } } /** * @psalm-pure * * @param mixed $value * @param array $values * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrOneOf($value, $values, $message = '') { null === $value || static::oneOf($value, $values, $message); } /** * @psalm-pure * * @param mixed $value * @param array $values * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allOneOf($value, $values, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::oneOf($entry, $values, $message); } } /** * @psalm-pure * * @param mixed $value * @param array $values * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrOneOf($value, $values, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::oneOf($entry, $values, $message); } } /** * @psalm-pure * * @param mixed $value * @param array $values * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrInArray($value, $values, $message = '') { null === $value || static::inArray($value, $values, $message); } /** * @psalm-pure * * @param mixed $value * @param array $values * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allInArray($value, $values, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::inArray($entry, $values, $message); } } /** * @psalm-pure * * @param mixed $value * @param array $values * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrInArray($value, $values, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::inArray($entry, $values, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $subString * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrContains($value, $subString, $message = '') { null === $value || static::contains($value, $subString, $message); } /** * @psalm-pure * * @param iterable $value * @param string $subString * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allContains($value, $subString, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::contains($entry, $subString, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $subString * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrContains($value, $subString, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::contains($entry, $subString, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $subString * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNotContains($value, $subString, $message = '') { null === $value || static::notContains($value, $subString, $message); } /** * @psalm-pure * * @param iterable $value * @param string $subString * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotContains($value, $subString, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notContains($entry, $subString, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $subString * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNotContains($value, $subString, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::notContains($entry, $subString, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNotWhitespaceOnly($value, $message = '') { null === $value || static::notWhitespaceOnly($value, $message); } /** * @psalm-pure * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotWhitespaceOnly($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notWhitespaceOnly($entry, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNotWhitespaceOnly($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::notWhitespaceOnly($entry, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $prefix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrStartsWith($value, $prefix, $message = '') { null === $value || static::startsWith($value, $prefix, $message); } /** * @psalm-pure * * @param iterable $value * @param string $prefix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allStartsWith($value, $prefix, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::startsWith($entry, $prefix, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $prefix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrStartsWith($value, $prefix, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::startsWith($entry, $prefix, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $prefix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNotStartsWith($value, $prefix, $message = '') { null === $value || static::notStartsWith($value, $prefix, $message); } /** * @psalm-pure * * @param iterable $value * @param string $prefix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotStartsWith($value, $prefix, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notStartsWith($entry, $prefix, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $prefix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNotStartsWith($value, $prefix, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::notStartsWith($entry, $prefix, $message); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrStartsWithLetter($value, $message = '') { null === $value || static::startsWithLetter($value, $message); } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allStartsWithLetter($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::startsWithLetter($entry, $message); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrStartsWithLetter($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::startsWithLetter($entry, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $suffix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrEndsWith($value, $suffix, $message = '') { null === $value || static::endsWith($value, $suffix, $message); } /** * @psalm-pure * * @param iterable $value * @param string $suffix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allEndsWith($value, $suffix, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::endsWith($entry, $suffix, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $suffix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrEndsWith($value, $suffix, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::endsWith($entry, $suffix, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $suffix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNotEndsWith($value, $suffix, $message = '') { null === $value || static::notEndsWith($value, $suffix, $message); } /** * @psalm-pure * * @param iterable $value * @param string $suffix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotEndsWith($value, $suffix, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notEndsWith($entry, $suffix, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $suffix * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNotEndsWith($value, $suffix, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::notEndsWith($entry, $suffix, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $pattern * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrRegex($value, $pattern, $message = '') { null === $value || static::regex($value, $pattern, $message); } /** * @psalm-pure * * @param iterable $value * @param string $pattern * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allRegex($value, $pattern, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::regex($entry, $pattern, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $pattern * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrRegex($value, $pattern, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::regex($entry, $pattern, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $pattern * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrNotRegex($value, $pattern, $message = '') { null === $value || static::notRegex($value, $pattern, $message); } /** * @psalm-pure * * @param iterable $value * @param string $pattern * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNotRegex($value, $pattern, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::notRegex($entry, $pattern, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $pattern * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrNotRegex($value, $pattern, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::notRegex($entry, $pattern, $message); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrUnicodeLetters($value, $message = '') { null === $value || static::unicodeLetters($value, $message); } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allUnicodeLetters($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::unicodeLetters($entry, $message); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrUnicodeLetters($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::unicodeLetters($entry, $message); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrAlpha($value, $message = '') { null === $value || static::alpha($value, $message); } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allAlpha($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::alpha($entry, $message); } } /** * @psalm-pure * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrAlpha($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::alpha($entry, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrDigits($value, $message = '') { null === $value || static::digits($value, $message); } /** * @psalm-pure * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allDigits($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::digits($entry, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrDigits($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::digits($entry, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrAlnum($value, $message = '') { null === $value || static::alnum($value, $message); } /** * @psalm-pure * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allAlnum($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::alnum($entry, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrAlnum($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::alnum($entry, $message); } } /** * @psalm-pure * @psalm-assert lowercase-string|null $value * * @param string|null $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrLower($value, $message = '') { null === $value || static::lower($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allLower($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::lower($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrLower($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::lower($entry, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrUpper($value, $message = '') { null === $value || static::upper($value, $message); } /** * @psalm-pure * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allUpper($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::upper($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrUpper($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::upper($entry, $message); } } /** * @psalm-pure * * @param string|null $value * @param int $length * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrLength($value, $length, $message = '') { null === $value || static::length($value, $length, $message); } /** * @psalm-pure * * @param iterable $value * @param int $length * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allLength($value, $length, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::length($entry, $length, $message); } } /** * @psalm-pure * * @param iterable $value * @param int $length * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrLength($value, $length, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::length($entry, $length, $message); } } /** * @psalm-pure * * @param string|null $value * @param int|float $min * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrMinLength($value, $min, $message = '') { null === $value || static::minLength($value, $min, $message); } /** * @psalm-pure * * @param iterable $value * @param int|float $min * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allMinLength($value, $min, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::minLength($entry, $min, $message); } } /** * @psalm-pure * * @param iterable $value * @param int|float $min * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrMinLength($value, $min, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::minLength($entry, $min, $message); } } /** * @psalm-pure * * @param string|null $value * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrMaxLength($value, $max, $message = '') { null === $value || static::maxLength($value, $max, $message); } /** * @psalm-pure * * @param iterable $value * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allMaxLength($value, $max, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::maxLength($entry, $max, $message); } } /** * @psalm-pure * * @param iterable $value * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrMaxLength($value, $max, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::maxLength($entry, $max, $message); } } /** * @psalm-pure * * @param string|null $value * @param int|float $min * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrLengthBetween($value, $min, $max, $message = '') { null === $value || static::lengthBetween($value, $min, $max, $message); } /** * @psalm-pure * * @param iterable $value * @param int|float $min * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allLengthBetween($value, $min, $max, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::lengthBetween($entry, $min, $max, $message); } } /** * @psalm-pure * * @param iterable $value * @param int|float $min * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrLengthBetween($value, $min, $max, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::lengthBetween($entry, $min, $max, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrFileExists($value, $message = '') { null === $value || static::fileExists($value, $message); } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allFileExists($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::fileExists($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrFileExists($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::fileExists($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrFile($value, $message = '') { null === $value || static::file($value, $message); } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allFile($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::file($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrFile($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::file($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrDirectory($value, $message = '') { null === $value || static::directory($value, $message); } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allDirectory($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::directory($entry, $message); } } /** * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrDirectory($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::directory($entry, $message); } } /** * @param string|null $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrReadable($value, $message = '') { null === $value || static::readable($value, $message); } /** * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allReadable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::readable($entry, $message); } } /** * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrReadable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::readable($entry, $message); } } /** * @param string|null $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrWritable($value, $message = '') { null === $value || static::writable($value, $message); } /** * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allWritable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::writable($entry, $message); } } /** * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrWritable($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::writable($entry, $message); } } /** * @psalm-assert class-string|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrClassExists($value, $message = '') { null === $value || static::classExists($value, $message); } /** * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allClassExists($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::classExists($entry, $message); } } /** * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrClassExists($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::classExists($entry, $message); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert class-string|ExpectedType|null $value * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrSubclassOf($value, $class, $message = '') { null === $value || static::subclassOf($value, $class, $message); } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert iterable|ExpectedType> $value * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allSubclassOf($value, $class, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::subclassOf($entry, $class, $message); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $class * @psalm-assert iterable|ExpectedType|null> $value * * @param mixed $value * @param string|object $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrSubclassOf($value, $class, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::subclassOf($entry, $class, $message); } } /** * @psalm-assert class-string|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrInterfaceExists($value, $message = '') { null === $value || static::interfaceExists($value, $message); } /** * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allInterfaceExists($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::interfaceExists($entry, $message); } } /** * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrInterfaceExists($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::interfaceExists($entry, $message); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $interface * @psalm-assert class-string|null $value * * @param mixed $value * @param mixed $interface * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrImplementsInterface($value, $interface, $message = '') { null === $value || static::implementsInterface($value, $interface, $message); } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $interface * @psalm-assert iterable> $value * * @param mixed $value * @param mixed $interface * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allImplementsInterface($value, $interface, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::implementsInterface($entry, $interface, $message); } } /** * @psalm-pure * @psalm-template ExpectedType of object * @psalm-param class-string $interface * @psalm-assert iterable|null> $value * * @param mixed $value * @param mixed $interface * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrImplementsInterface($value, $interface, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::implementsInterface($entry, $interface, $message); } } /** * @psalm-pure * @psalm-param class-string|object|null $classOrObject * * @param string|object|null $classOrObject * @param mixed $property * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrPropertyExists($classOrObject, $property, $message = '') { null === $classOrObject || static::propertyExists($classOrObject, $property, $message); } /** * @psalm-pure * @psalm-param iterable $classOrObject * * @param iterable $classOrObject * @param mixed $property * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allPropertyExists($classOrObject, $property, $message = '') { static::isIterable($classOrObject); foreach ($classOrObject as $entry) { static::propertyExists($entry, $property, $message); } } /** * @psalm-pure * @psalm-param iterable $classOrObject * * @param iterable $classOrObject * @param mixed $property * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrPropertyExists($classOrObject, $property, $message = '') { static::isIterable($classOrObject); foreach ($classOrObject as $entry) { null === $entry || static::propertyExists($entry, $property, $message); } } /** * @psalm-pure * @psalm-param class-string|object|null $classOrObject * * @param string|object|null $classOrObject * @param mixed $property * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrPropertyNotExists($classOrObject, $property, $message = '') { null === $classOrObject || static::propertyNotExists($classOrObject, $property, $message); } /** * @psalm-pure * @psalm-param iterable $classOrObject * * @param iterable $classOrObject * @param mixed $property * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allPropertyNotExists($classOrObject, $property, $message = '') { static::isIterable($classOrObject); foreach ($classOrObject as $entry) { static::propertyNotExists($entry, $property, $message); } } /** * @psalm-pure * @psalm-param iterable $classOrObject * * @param iterable $classOrObject * @param mixed $property * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrPropertyNotExists($classOrObject, $property, $message = '') { static::isIterable($classOrObject); foreach ($classOrObject as $entry) { null === $entry || static::propertyNotExists($entry, $property, $message); } } /** * @psalm-pure * @psalm-param class-string|object|null $classOrObject * * @param string|object|null $classOrObject * @param mixed $method * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrMethodExists($classOrObject, $method, $message = '') { null === $classOrObject || static::methodExists($classOrObject, $method, $message); } /** * @psalm-pure * @psalm-param iterable $classOrObject * * @param iterable $classOrObject * @param mixed $method * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allMethodExists($classOrObject, $method, $message = '') { static::isIterable($classOrObject); foreach ($classOrObject as $entry) { static::methodExists($entry, $method, $message); } } /** * @psalm-pure * @psalm-param iterable $classOrObject * * @param iterable $classOrObject * @param mixed $method * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrMethodExists($classOrObject, $method, $message = '') { static::isIterable($classOrObject); foreach ($classOrObject as $entry) { null === $entry || static::methodExists($entry, $method, $message); } } /** * @psalm-pure * @psalm-param class-string|object|null $classOrObject * * @param string|object|null $classOrObject * @param mixed $method * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrMethodNotExists($classOrObject, $method, $message = '') { null === $classOrObject || static::methodNotExists($classOrObject, $method, $message); } /** * @psalm-pure * @psalm-param iterable $classOrObject * * @param iterable $classOrObject * @param mixed $method * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allMethodNotExists($classOrObject, $method, $message = '') { static::isIterable($classOrObject); foreach ($classOrObject as $entry) { static::methodNotExists($entry, $method, $message); } } /** * @psalm-pure * @psalm-param iterable $classOrObject * * @param iterable $classOrObject * @param mixed $method * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrMethodNotExists($classOrObject, $method, $message = '') { static::isIterable($classOrObject); foreach ($classOrObject as $entry) { null === $entry || static::methodNotExists($entry, $method, $message); } } /** * @psalm-pure * * @param array|null $array * @param string|int $key * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrKeyExists($array, $key, $message = '') { null === $array || static::keyExists($array, $key, $message); } /** * @psalm-pure * * @param iterable $array * @param string|int $key * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allKeyExists($array, $key, $message = '') { static::isIterable($array); foreach ($array as $entry) { static::keyExists($entry, $key, $message); } } /** * @psalm-pure * * @param iterable $array * @param string|int $key * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrKeyExists($array, $key, $message = '') { static::isIterable($array); foreach ($array as $entry) { null === $entry || static::keyExists($entry, $key, $message); } } /** * @psalm-pure * * @param array|null $array * @param string|int $key * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrKeyNotExists($array, $key, $message = '') { null === $array || static::keyNotExists($array, $key, $message); } /** * @psalm-pure * * @param iterable $array * @param string|int $key * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allKeyNotExists($array, $key, $message = '') { static::isIterable($array); foreach ($array as $entry) { static::keyNotExists($entry, $key, $message); } } /** * @psalm-pure * * @param iterable $array * @param string|int $key * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrKeyNotExists($array, $key, $message = '') { static::isIterable($array); foreach ($array as $entry) { null === $entry || static::keyNotExists($entry, $key, $message); } } /** * @psalm-pure * @psalm-assert array-key|null $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrValidArrayKey($value, $message = '') { null === $value || static::validArrayKey($value, $message); } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allValidArrayKey($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::validArrayKey($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $value * * @param mixed $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrValidArrayKey($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::validArrayKey($entry, $message); } } /** * @param Countable|array|null $array * @param int $number * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrCount($array, $number, $message = '') { null === $array || static::count($array, $number, $message); } /** * @param iterable $array * @param int $number * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allCount($array, $number, $message = '') { static::isIterable($array); foreach ($array as $entry) { static::count($entry, $number, $message); } } /** * @param iterable $array * @param int $number * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrCount($array, $number, $message = '') { static::isIterable($array); foreach ($array as $entry) { null === $entry || static::count($entry, $number, $message); } } /** * @param Countable|array|null $array * @param int|float $min * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrMinCount($array, $min, $message = '') { null === $array || static::minCount($array, $min, $message); } /** * @param iterable $array * @param int|float $min * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allMinCount($array, $min, $message = '') { static::isIterable($array); foreach ($array as $entry) { static::minCount($entry, $min, $message); } } /** * @param iterable $array * @param int|float $min * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrMinCount($array, $min, $message = '') { static::isIterable($array); foreach ($array as $entry) { null === $entry || static::minCount($entry, $min, $message); } } /** * @param Countable|array|null $array * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrMaxCount($array, $max, $message = '') { null === $array || static::maxCount($array, $max, $message); } /** * @param iterable $array * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allMaxCount($array, $max, $message = '') { static::isIterable($array); foreach ($array as $entry) { static::maxCount($entry, $max, $message); } } /** * @param iterable $array * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrMaxCount($array, $max, $message = '') { static::isIterable($array); foreach ($array as $entry) { null === $entry || static::maxCount($entry, $max, $message); } } /** * @param Countable|array|null $array * @param int|float $min * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrCountBetween($array, $min, $max, $message = '') { null === $array || static::countBetween($array, $min, $max, $message); } /** * @param iterable $array * @param int|float $min * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allCountBetween($array, $min, $max, $message = '') { static::isIterable($array); foreach ($array as $entry) { static::countBetween($entry, $min, $max, $message); } } /** * @param iterable $array * @param int|float $min * @param int|float $max * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrCountBetween($array, $min, $max, $message = '') { static::isIterable($array); foreach ($array as $entry) { null === $entry || static::countBetween($entry, $min, $max, $message); } } /** * @psalm-pure * @psalm-assert list|null $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsList($array, $message = '') { null === $array || static::isList($array, $message); } /** * @psalm-pure * @psalm-assert iterable $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsList($array, $message = '') { static::isIterable($array); foreach ($array as $entry) { static::isList($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsList($array, $message = '') { static::isIterable($array); foreach ($array as $entry) { null === $entry || static::isList($entry, $message); } } /** * @psalm-pure * @psalm-assert non-empty-list|null $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsNonEmptyList($array, $message = '') { null === $array || static::isNonEmptyList($array, $message); } /** * @psalm-pure * @psalm-assert iterable $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsNonEmptyList($array, $message = '') { static::isIterable($array); foreach ($array as $entry) { static::isNonEmptyList($entry, $message); } } /** * @psalm-pure * @psalm-assert iterable $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsNonEmptyList($array, $message = '') { static::isIterable($array); foreach ($array as $entry) { null === $entry || static::isNonEmptyList($entry, $message); } } /** * @psalm-pure * @psalm-template T * @psalm-param mixed|array|null $array * @psalm-assert array|null $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsMap($array, $message = '') { null === $array || static::isMap($array, $message); } /** * @psalm-pure * @psalm-template T * @psalm-param iterable> $array * @psalm-assert iterable> $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsMap($array, $message = '') { static::isIterable($array); foreach ($array as $entry) { static::isMap($entry, $message); } } /** * @psalm-pure * @psalm-template T * @psalm-param iterable|null> $array * @psalm-assert iterable|null> $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsMap($array, $message = '') { static::isIterable($array); foreach ($array as $entry) { null === $entry || static::isMap($entry, $message); } } /** * @psalm-pure * @psalm-template T * @psalm-param mixed|array|null $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrIsNonEmptyMap($array, $message = '') { null === $array || static::isNonEmptyMap($array, $message); } /** * @psalm-pure * @psalm-template T * @psalm-param iterable> $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allIsNonEmptyMap($array, $message = '') { static::isIterable($array); foreach ($array as $entry) { static::isNonEmptyMap($entry, $message); } } /** * @psalm-pure * @psalm-template T * @psalm-param iterable|null> $array * @psalm-assert iterable|null> $array * @psalm-assert iterable $array * * @param mixed $array * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrIsNonEmptyMap($array, $message = '') { static::isIterable($array); foreach ($array as $entry) { null === $entry || static::isNonEmptyMap($entry, $message); } } /** * @psalm-pure * * @param string|null $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrUuid($value, $message = '') { null === $value || static::uuid($value, $message); } /** * @psalm-pure * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allUuid($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { static::uuid($entry, $message); } } /** * @psalm-pure * * @param iterable $value * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrUuid($value, $message = '') { static::isIterable($value); foreach ($value as $entry) { null === $entry || static::uuid($entry, $message); } } /** * @psalm-param class-string $class * * @param Closure|null $expression * @param string $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function nullOrThrows($expression, $class = 'Exception', $message = '') { null === $expression || static::throws($expression, $class, $message); } /** * @psalm-param class-string $class * * @param iterable $expression * @param string $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allThrows($expression, $class = 'Exception', $message = '') { static::isIterable($expression); foreach ($expression as $entry) { static::throws($entry, $class, $message); } } /** * @psalm-param class-string $class * * @param iterable $expression * @param string $class * @param string $message * * @throws InvalidArgumentException * * @return void */ public static function allNullOrThrows($expression, $class = 'Exception', $message = '') { static::isIterable($expression); foreach ($expression as $entry) { null === $entry || static::throws($entry, $class, $message); } } } PKFx[檩33 Optimizer.phpnu[useLogger(new DummyLogger()); } public function getOptimizers(): array { return $this->optimizers; } public function addOptimizer(Optimizer $optimizer) { $this->optimizers[] = $optimizer; return $this; } public function setOptimizers(array $optimizers) { $this->optimizers = []; foreach ($optimizers as $optimizer) { $this->addOptimizer($optimizer); } return $this; } /* * Set the amount of seconds each separate optimizer may use. */ public function setTimeout(int $timeoutInSeconds) { $this->timeout = $timeoutInSeconds; return $this; } public function useLogger(LoggerInterface $log) { $this->logger = $log; return $this; } public function optimize(string $pathToImage, string $pathToOutput = null) { if ($pathToOutput) { copy($pathToImage, $pathToOutput); $pathToImage = $pathToOutput; } $image = new Image($pathToImage); $this->logger->info("Start optimizing {$pathToImage}"); foreach ($this->optimizers as $optimizer) { $this->applyOptimizer($optimizer, $image); } } protected function applyOptimizer(Optimizer $optimizer, Image $image) { if (! $optimizer->canHandle($image)) { return; } $optimizerClass = get_class($optimizer); $this->logger->info("Using optimizer: `{$optimizerClass}`"); $optimizer->setImagePath($image->path()); $command = $optimizer->getCommand(); $this->logger->info("Executing `{$command}`"); $process = Process::fromShellCommandline($command); $process ->setTimeout($this->timeout) ->run(); if ( ($tmpPath = $optimizer->getTmpPath()) && file_exists($tmpPath) ) { unlink($tmpPath); } $this->logResult($process); } protected function logResult(Process $process) { if (! $process->isSuccessful()) { $this->logger->error("Process errored with `{$process->getErrorOutput()}`"); return; } $this->logger->info("Process successfully ended with output `{$process->getOutput()}`"); } } PKFx[Optimizers/Optipng.phpnu[mime() === 'image/png'; } } PKFx[*[  Optimizers/BaseOptimizer.phpnu[setOptions($options); } public function binaryName(): string { return $this->binaryName; } public function setBinaryPath(string $binaryPath) { if (strlen($binaryPath) > 0 && substr($binaryPath, -1) !== DIRECTORY_SEPARATOR) { $binaryPath = $binaryPath.DIRECTORY_SEPARATOR; } $this->binaryPath = $binaryPath; return $this; } public function setImagePath(string $imagePath) { $this->imagePath = $imagePath; return $this; } public function setOptions(array $options = []) { $this->options = $options; return $this; } public function getCommand(): string { $optionString = implode(' ', $this->options); return "\"{$this->binaryPath}{$this->binaryName}\" {$optionString} ".escapeshellarg($this->imagePath); } public function getTmpPath(): ?string { return $this->tmpPath; } } PKFx[z]44Optimizers/Avifenc.phpnu[extension() === 'avif'; } return $image->mime() === 'image/avif'; } public function getCommand(): string { return $this->getDecodeCommand().' && ' .$this->getEncodeCommand(); } protected function getDecodeCommand() { $this->tmpPath = tempnam(sys_get_temp_dir(), 'avifdec').'.png'; $optionString = implode(' ', [ '-j all', '--ignore-icc', '--no-strict', '--png-compress 0', ]); return "\"{$this->binaryPath}{$this->decodeBinaryName}\" {$optionString}" .' '.escapeshellarg($this->imagePath) .' '.escapeshellarg($this->tmpPath); } protected function getEncodeCommand() { $optionString = implode(' ', $this->options); return "\"{$this->binaryPath}{$this->binaryName}\" {$optionString}" .' '.escapeshellarg($this->tmpPath) .' '.escapeshellarg($this->imagePath); } } PKFx[+99Optimizers/Pngquant.phpnu[mime() === 'image/png'; } public function getCommand(): string { $optionString = implode(' ', $this->options); return "\"{$this->binaryPath}{$this->binaryName}\" {$optionString}" .' '.escapeshellarg($this->imagePath) .' --output='.escapeshellarg($this->imagePath); } } PKFx[C..Optimizers/Cwebp.phpnu[mime() === 'image/webp'; } public function getCommand(): string { $optionString = implode(' ', $this->options); return "\"{$this->binaryPath}{$this->binaryName}\" {$optionString}" .' '.escapeshellarg($this->imagePath) .' -o '.escapeshellarg($this->imagePath); } } PKFx[dOptimizers/Svgo.phpnu[extension() !== 'svg') { return false; } return in_array($image->mime(), [ 'text/html', 'image/svg', 'image/svg+xml', 'text/plain', ]); } public function getCommand(): string { $optionString = implode(' ', $this->options); return "\"{$this->binaryPath}{$this->binaryName}\" {$optionString}" .' --input='.escapeshellarg($this->imagePath) .' --output='.escapeshellarg($this->imagePath); } } PKFx[8EOptimizers/Jpegoptim.phpnu[mime() === 'image/jpeg'; } } PKFx[g66Optimizers/Gifsicle.phpnu[mime() === 'image/gif'; } public function getCommand(): string { $optionString = implode(' ', $this->options); return "\"{$this->binaryPath}{$this->binaryName}\" {$optionString}" .' -i '.escapeshellarg($this->imagePath) .' -o '.escapeshellarg($this->imagePath); } } PKFx[N22DummyLogger.phpnu[addOptimizer(new Jpegoptim([ $jpegQuality, '--strip-all', '--all-progressive', ])) ->addOptimizer(new Pngquant([ $pngQuality, '--force', '--skip-if-larger', ])) ->addOptimizer(new Optipng([ '-i0', '-o2', '-quiet', ])) ->addOptimizer(new Svgo([ '--config=svgo.config.js', ])) ->addOptimizer(new Gifsicle([ '-b', '-O3', ])) ->addOptimizer(new Cwebp([ $webpQuality, '-m 6', '-pass 10', '-mt', ])) ->addOptimizer(new Avifenc([ $avifQuality, '-j all', '--min 0', '--max 63', '--minalpha 0', '--maxalpha 63', '-a end-usage=q', '-a tune=ssim', ])); } } PKFx[If Image.phpnu[manipulations = new Manipulations(); } public static function load(string $pathToImage): static { return new static($pathToImage); } public function setTemporaryDirectory($tempDir): static { $this->temporaryDirectory = $tempDir; return $this; } public function setOptimizeChain(OptimizerChain $optimizerChain): static { $this->optimizerChain = $optimizerChain; return $this; } /** * @param string $imageDriver * @return $this * @throws InvalidImageDriver */ public function useImageDriver(string $imageDriver): static { if (! in_array($imageDriver, ['gd', 'imagick'])) { throw InvalidImageDriver::driver($imageDriver); } $this->imageDriver = $imageDriver; InterventionImage::configure([ 'driver' => $this->imageDriver, ]); return $this; } public function manipulate(callable | Manipulations $manipulations): static { if (is_callable($manipulations)) { $manipulations($this->manipulations); } if ($manipulations instanceof Manipulations) { $this->manipulations->mergeManipulations($manipulations); } return $this; } public function __call($name, $arguments): static { if (! method_exists($this->manipulations, $name)) { throw new BadMethodCallException("Manipulation `{$name}` does not exist"); } $this->manipulations->$name(...$arguments); return $this; } public function getWidth(): int { return InterventionImage::make($this->pathToImage)->width(); } public function getHeight(): int { return InterventionImage::make($this->pathToImage)->height(); } public function getManipulationSequence(): ManipulationSequence { return $this->manipulations->getManipulationSequence(); } public function save(string $outputPath = ''): void { if ($outputPath === '') { $outputPath = $this->pathToImage; } $this->addFormatManipulation($outputPath); $glideConversion = GlideConversion::create($this->pathToImage)->useImageDriver($this->imageDriver); if (! is_null($this->temporaryDirectory)) { $glideConversion->setTemporaryDirectory($this->temporaryDirectory); } $glideConversion->performManipulations($this->manipulations); $glideConversion->save($outputPath); if ($this->shouldOptimize()) { $optimizerChainConfiguration = $this->manipulations->getFirstManipulationArgument('optimize'); $optimizerChainConfiguration = json_decode($optimizerChainConfiguration, true); $this->performOptimization($outputPath, $optimizerChainConfiguration); } } protected function shouldOptimize(): bool { return ! is_null($this->manipulations->getFirstManipulationArgument('optimize')); } protected function performOptimization($path, array $optimizerChainConfiguration): void { $optimizerChain = $this->optimizerChain ?? OptimizerChainFactory::create(); if (count($optimizerChainConfiguration)) { $existingOptimizers = $optimizerChain->getOptimizers(); $optimizers = array_map(function (array $optimizerOptions, string $optimizerClassName) use ($existingOptimizers) { $optimizer = array_values(array_filter($existingOptimizers, function ($optimizer) use ($optimizerClassName) { return $optimizer::class === $optimizerClassName; })); $optimizer = isset($optimizer[0]) && $optimizer[0] instanceof BaseOptimizer ? $optimizer[0] : new $optimizerClassName(); return $optimizer->setOptions($optimizerOptions)->setBinaryPath($optimizer->binaryPath); }, $optimizerChainConfiguration, array_keys($optimizerChainConfiguration)); $optimizerChain->setOptimizers($optimizers); } $optimizerChain->optimize($path); } protected function addFormatManipulation($outputPath): void { if ($this->manipulations->hasManipulation('format')) { return; } $inputExtension = strtolower(pathinfo($this->pathToImage, PATHINFO_EXTENSION)); $outputExtension = strtolower(pathinfo($outputPath, PATHINFO_EXTENSION)); if ($inputExtension === $outputExtension) { return; } $supportedFormats = [ Manipulations::FORMAT_JPG, Manipulations::FORMAT_PJPG, Manipulations::FORMAT_PNG, Manipulations::FORMAT_GIF, Manipulations::FORMAT_WEBP, Manipulations::FORMAT_AVIF, ]; //gd driver doesn't support TIFF if ($this->imageDriver === 'imagick') { $supportedFormats[] = Manipulations::FORMAT_TIFF; } if (in_array($outputExtension, $supportedFormats)) { $this->manipulations->format($outputExtension); } } } PK_dompdf = $dompdf; } /** * @param $script */ public function insert($script) { $this->_dompdf->getCanvas()->javascript($script); } /** * @param Frame $frame */ public function render(Frame $frame) { if (!$this->_dompdf->getOptions()->getIsJavascriptEnabled()) { return; } $this->insert($frame->get_node()->nodeValue); } } PK_dom = $dom; $this->_root = null; $this->_registry = []; } /** * Returns the DOMDocument object representing the current html document * * @return DOMDocument */ public function get_dom() { return $this->_dom; } /** * Returns the root frame of the tree * * @return Frame */ public function get_root() { return $this->_root; } /** * Returns a specific frame given its id * * @param string $id * * @return Frame|null */ public function get_frame($id) { return isset($this->_registry[$id]) ? $this->_registry[$id] : null; } /** * Returns a post-order iterator for all frames in the tree * * @deprecated Iterate the tree directly instead * @return FrameTreeIterator */ public function get_frames(): FrameTreeIterator { return new FrameTreeIterator($this->_root); } /** * Returns a post-order iterator for all frames in the tree * * @return FrameTreeIterator */ public function getIterator(): FrameTreeIterator { return new FrameTreeIterator($this->_root); } /** * Builds the tree */ public function build_tree() { $html = $this->_dom->getElementsByTagName("html")->item(0); if (is_null($html)) { $html = $this->_dom->firstChild; } if (is_null($html)) { throw new Exception("Requested HTML document contains no data."); } $this->fix_tables(); $this->_root = $this->_build_tree_r($html); } /** * Adds missing TBODYs around TR */ protected function fix_tables() { $xp = new DOMXPath($this->_dom); // Move table caption before the table // FIXME find a better way to deal with it... $captions = $xp->query('//table/caption'); foreach ($captions as $caption) { $table = $caption->parentNode; $table->parentNode->insertBefore($caption, $table); } $firstRows = $xp->query('//table/tr[1]'); /** @var DOMElement $tableChild */ foreach ($firstRows as $tableChild) { $tbody = $this->_dom->createElement('tbody'); $tableNode = $tableChild->parentNode; do { if ($tableChild->nodeName === 'tr') { $tmpNode = $tableChild; $tableChild = $tableChild->nextSibling; $tableNode->removeChild($tmpNode); $tbody->appendChild($tmpNode); } else { if ($tbody->hasChildNodes() === true) { $tableNode->insertBefore($tbody, $tableChild); $tbody = $this->_dom->createElement('tbody'); } $tableChild = $tableChild->nextSibling; } } while ($tableChild); if ($tbody->hasChildNodes() === true) { $tableNode->appendChild($tbody); } } } // FIXME: temporary hack, preferably we will improve rendering of sequential #text nodes /** * Remove a child from a node * * Remove a child from a node. If the removed node results in two * adjacent #text nodes then combine them. * * @param DOMNode $node the current DOMNode being considered * @param array $children an array of nodes that are the children of $node * @param int $index index from the $children array of the node to remove */ protected function _remove_node(DOMNode $node, array &$children, $index) { $child = $children[$index]; $previousChild = $child->previousSibling; $nextChild = $child->nextSibling; $node->removeChild($child); if (isset($previousChild, $nextChild)) { if ($previousChild->nodeName === "#text" && $nextChild->nodeName === "#text") { $previousChild->nodeValue .= $nextChild->nodeValue; $this->_remove_node($node, $children, $index+1); } } array_splice($children, $index, 1); } /** * Recursively adds {@link Frame} objects to the tree * * Recursively build a tree of Frame objects based on a dom tree. * No layout information is calculated at this time, although the * tree may be adjusted (i.e. nodes and frames for generated content * and images may be created). * * @param DOMNode $node the current DOMNode being considered * * @return Frame */ protected function _build_tree_r(DOMNode $node) { $frame = new Frame($node); $id = $frame->get_id(); $this->_registry[$id] = $frame; if (!$node->hasChildNodes()) { return $frame; } // Store the children in an array so that the tree can be modified $children = []; $length = $node->childNodes->length; for ($i = 0; $i < $length; $i++) { $children[] = $node->childNodes->item($i); } $index = 0; // INFO: We don't advance $index if a node is removed to avoid skipping nodes while ($index < count($children)) { $child = $children[$index]; $nodeName = strtolower($child->nodeName); // Skip non-displaying nodes if (in_array($nodeName, self::$HIDDEN_TAGS)) { if ($nodeName !== "head" && $nodeName !== "style") { $this->_remove_node($node, $children, $index); } else { $index++; } continue; } // Skip empty text nodes if ($nodeName === "#text" && $child->nodeValue === "") { $this->_remove_node($node, $children, $index); continue; } // Skip empty image nodes if ($nodeName === "img" && $child->getAttribute("src") === "") { $this->_remove_node($node, $children, $index); continue; } if (is_object($child)) { $frame->append_child($this->_build_tree_r($child), false); } $index++; } return $frame; } /** * @param DOMElement $node * @param DOMElement $new_node * @param string $pos * * @return mixed */ public function insert_node(DOMElement $node, DOMElement $new_node, $pos) { if ($pos === "after" || !$node->firstChild) { $node->appendChild($new_node); } else { $node->insertBefore($new_node, $node->firstChild); } $this->_build_tree_r($new_node); $frame_id = $new_node->getAttribute("frame_id"); $frame = $this->get_frame($frame_id); $parent_id = $node->getAttribute("frame_id"); $parent = $this->get_frame($parent_id); if ($parent) { if ($pos === "before") { $parent->prepend_child($frame, false); } else { $parent->append_child($frame, false); } } return $frame_id; } } PKset_reflower(new PageFrameReflower($frame)); $root->set_decorator($frame); return $frame; } /** * Decorate a Frame * * @param Frame $frame The frame to decorate * @param Dompdf $dompdf The dompdf instance * @param Frame|null $root The root of the frame * * @throws Exception * @return AbstractFrameDecorator|null * FIXME: this is admittedly a little smelly... */ public static function decorate_frame(Frame $frame, Dompdf $dompdf, ?Frame $root = null): ?AbstractFrameDecorator { $style = $frame->get_style(); $display = $style->display; switch ($display) { case "block": $positioner = "Block"; $decorator = "Block"; $reflower = "Block"; break; case "inline-block": $positioner = "Inline"; $decorator = "Block"; $reflower = "Block"; break; case "inline": $positioner = "Inline"; if ($frame->is_text_node()) { $decorator = "Text"; $reflower = "Text"; } else { $decorator = "Inline"; $reflower = "Inline"; } break; case "table": $positioner = "Block"; $decorator = "Table"; $reflower = "Table"; break; case "inline-table": $positioner = "Inline"; $decorator = "Table"; $reflower = "Table"; break; case "table-row-group": case "table-header-group": case "table-footer-group": $positioner = "NullPositioner"; $decorator = "TableRowGroup"; $reflower = "TableRowGroup"; break; case "table-row": $positioner = "NullPositioner"; $decorator = "TableRow"; $reflower = "TableRow"; break; case "table-cell": $positioner = "TableCell"; $decorator = "TableCell"; $reflower = "TableCell"; break; case "list-item": $positioner = "Block"; $decorator = "Block"; $reflower = "Block"; break; case "-dompdf-list-bullet": if ($style->list_style_position === "inside") { $positioner = "Inline"; } else { $positioner = "ListBullet"; } if ($style->list_style_image !== "none") { $decorator = "ListBulletImage"; } else { $decorator = "ListBullet"; } $reflower = "ListBullet"; break; case "-dompdf-image": $positioner = "Inline"; $decorator = "Image"; $reflower = "Image"; break; case "-dompdf-br": $positioner = "Inline"; $decorator = "Inline"; $reflower = "Inline"; break; default: case "none": if ($style->_dompdf_keep !== "yes") { // Remove the node and the frame $frame->get_parent()->remove_child($frame); return null; } $positioner = "NullPositioner"; $decorator = "NullFrameDecorator"; $reflower = "NullFrameReflower"; break; } // Handle CSS position $position = $style->position; if ($position === "absolute") { $positioner = "Absolute"; } elseif ($position === "fixed") { $positioner = "Fixed"; } $node = $frame->get_node(); // Handle nodeName if ($node->nodeName === "img") { $style->set_prop("display", "-dompdf-image"); $decorator = "Image"; $reflower = "Image"; } $decorator = "Dompdf\\FrameDecorator\\$decorator"; $reflower = "Dompdf\\FrameReflower\\$reflower"; /** @var AbstractFrameDecorator $deco */ $deco = new $decorator($frame, $dompdf); $deco->set_positioner(self::getPositionerInstance($positioner)); $deco->set_reflower(new $reflower($deco, $dompdf->getFontMetrics())); if ($root) { $deco->set_root($root); } if ($display === "list-item") { // Insert a list-bullet frame $xml = $dompdf->getDom(); $bullet_node = $xml->createElement("bullet"); // arbitrary choice $b_f = new Frame($bullet_node); $node = $frame->get_node(); $parent_node = $node->parentNode; if ($parent_node && $parent_node instanceof \DOMElement) { if (!$parent_node->hasAttribute("dompdf-children-count")) { $xpath = new DOMXPath($xml); $count = $xpath->query("li", $parent_node)->length; $parent_node->setAttribute("dompdf-children-count", $count); } if (is_numeric($node->getAttribute("value"))) { $index = intval($node->getAttribute("value")); } else { if (!$parent_node->hasAttribute("dompdf-counter")) { $index = ($parent_node->hasAttribute("start") ? $parent_node->getAttribute("start") : 1); } else { $index = (int)$parent_node->getAttribute("dompdf-counter") + 1; } } $parent_node->setAttribute("dompdf-counter", $index); $bullet_node->setAttribute("dompdf-counter", $index); } $new_style = $dompdf->getCss()->create_style(); $new_style->set_prop("display", "-dompdf-list-bullet"); $new_style->inherit($style); $b_f->set_style($new_style); $deco->prepend_child(Factory::decorate_frame($b_f, $dompdf, $root)); } return $deco; } /** * Creates Positioners * * @param string $type Type of positioner to use * * @return AbstractPositioner */ protected static function getPositionerInstance(string $type): AbstractPositioner { if (!isset(self::$_positioners[$type])) { $class = '\\Dompdf\\Positioner\\'.$type; self::$_positioners[$type] = new $class(); } return self::$_positioners[$type]; } } PK_stack[] = $this->_root = $root; $this->_num = 0; } public function rewind(): void { $this->_stack = [$this->_root]; $this->_num = 0; } /** * @return bool */ public function valid(): bool { return count($this->_stack) > 0; } /** * @return int */ public function key(): int { return $this->_num; } /** * @return Frame */ public function current(): Frame { return end($this->_stack); } public function next(): void { $b = array_pop($this->_stack); $this->_num++; // Push all children onto the stack in reverse order if ($c = $b->get_last_child()) { $this->_stack[] = $c; while ($c = $c->get_prev_sibling()) { $this->_stack[] = $c; } } } } PKparent = $frame; $this->rewind(); } public function rewind(): void { $this->cur = $this->parent->get_first_child(); $this->prev = null; $this->num = 0; } /** * @return bool */ public function valid(): bool { return $this->cur !== null; } /** * @return int */ public function key(): int { return $this->num; } /** * @return Frame|null */ public function current(): ?Frame { return $this->cur; } public function next(): void { if ($this->cur === null) { return; } if ($this->cur->get_parent() === $this->parent) { $this->prev = $this->cur; $this->cur = $this->cur->get_next_sibling(); $this->num++; } else { // Continue from the previous child if the current frame has been // moved to another parent $this->cur = $this->prev !== null ? $this->prev->get_next_sibling() : $this->parent->get_first_child(); } } } PK_dompdf = new Dompdf(); } else { $this->_dompdf = $dompdf; } $this->dpi = $this->get_dompdf()->getOptions()->getDpi(); if ($aa_factor < 1) { $aa_factor = 1; } $this->_aa_factor = $aa_factor; $size[2] *= $aa_factor; $size[3] *= $aa_factor; $this->_width = $size[2] - $size[0]; $this->_height = $size[3] - $size[1]; $this->_actual_width = $this->_upscale($this->_width); $this->_actual_height = $this->_upscale($this->_height); $this->_page_number = $this->_page_count = 0; if (is_null($bg_color) || !is_array($bg_color)) { // Pure white bg $bg_color = [1, 1, 1, 0]; } $this->_bg_color_array = $bg_color; $this->new_page(); } public function get_dompdf() { return $this->_dompdf; } /** * Return the GD image resource * * @return \GdImage|resource */ public function get_image() { return $this->_img; } /** * Return the image's width in pixels * * @return int */ public function get_width() { return round($this->_width / $this->_aa_factor); } /** * Return the image's height in pixels * * @return int */ public function get_height() { return round($this->_height / $this->_aa_factor); } public function get_page_number() { return $this->_page_number; } public function get_page_count() { return $this->_page_count; } /** * Sets the current page number * * @param int $num */ public function set_page_number($num) { $this->_page_number = $num; } public function set_page_count($count) { $this->_page_count = $count; } public function set_opacity(float $opacity, string $mode = "Normal"): void { // FIXME } /** * Allocate a new color. Allocate with GD as needed and store * previously allocated colors in $this->_colors. * * @param array $color The new current color * @return int The allocated color */ protected function _allocate_color($color) { $a = isset($color["alpha"]) ? $color["alpha"] : 1; if (isset($color["c"])) { $color = Helpers::cmyk_to_rgb($color); } list($r, $g, $b) = $color; $r = round($r * 255); $g = round($g * 255); $b = round($b * 255); $a = round(127 - ($a * 127)); // Clip values $r = $r > 255 ? 255 : $r; $g = $g > 255 ? 255 : $g; $b = $b > 255 ? 255 : $b; $a = $a > 127 ? 127 : $a; $r = $r < 0 ? 0 : $r; $g = $g < 0 ? 0 : $g; $b = $b < 0 ? 0 : $b; $a = $a < 0 ? 0 : $a; $key = sprintf("#%02X%02X%02X%02X", $r, $g, $b, $a); if (isset($this->_colors[$key])) { return $this->_colors[$key]; } if ($a != 0) { $this->_colors[$key] = imagecolorallocatealpha($this->get_image(), $r, $g, $b, $a); } else { $this->_colors[$key] = imagecolorallocate($this->get_image(), $r, $g, $b); } return $this->_colors[$key]; } /** * Scales value up to the current canvas DPI from 72 DPI * * @param float $length * @return int */ protected function _upscale($length) { return round(($length * $this->dpi) / 72 * $this->_aa_factor); } /** * Scales value down from the current canvas DPI to 72 DPI * * @param float $length * @return float */ protected function _downscale($length) { return round(($length / $this->dpi * 72) / $this->_aa_factor); } protected function convertStyle(array $style, int $color, int $width): array { $gdStyle = []; if (count($style) === 1) { $style[] = $style[0]; } foreach ($style as $index => $s) { $d = $this->_upscale($s); for ($i = 0; $i < $d; $i++) { for ($j = 0; $j < $width; $j++) { $gdStyle[] = $index % 2 === 0 ? $color : IMG_COLOR_TRANSPARENT; } } } return $gdStyle; } public function line($x1, $y1, $x2, $y2, $color, $width, $style = [], $cap = "butt") { // Account for the fact that round and square caps are expected to // extend outwards if ($cap === "round" || $cap === "square") { // Shift line by half width $w = $width / 2; $a = $x2 - $x1; $b = $y2 - $y1; $c = sqrt($a ** 2 + $b ** 2); $dx = $a * $w / $c; $dy = $b * $w / $c; $x1 -= $dx; $x2 -= $dx; $y1 -= $dy; $y2 -= $dy; // Adapt dash pattern if (is_array($style)) { foreach ($style as $index => &$s) { $s = $index % 2 === 0 ? $s + $width : $s - $width; } } } // Scale by the AA factor and DPI $x1 = $this->_upscale($x1); $y1 = $this->_upscale($y1); $x2 = $this->_upscale($x2); $y2 = $this->_upscale($y2); $width = $this->_upscale($width); $c = $this->_allocate_color($color); // Convert the style array if required if (is_array($style) && count($style) > 0) { $gd_style = $this->convertStyle($style, $c, $width); if (!empty($gd_style)) { imagesetstyle($this->get_image(), $gd_style); $c = IMG_COLOR_STYLED; } } imagesetthickness($this->get_image(), $width); imageline($this->get_image(), $x1, $y1, $x2, $y2, $c); } public function arc($x, $y, $r1, $r2, $astart, $aend, $color, $width, $style = [], $cap = "butt") { // Account for the fact that round and square caps are expected to // extend outwards if ($cap === "round" || $cap === "square") { // Adapt dash pattern if (is_array($style)) { foreach ($style as $index => &$s) { $s = $index % 2 === 0 ? $s + $width : $s - $width; } } } // Scale by the AA factor and DPI $x = $this->_upscale($x); $y = $this->_upscale($y); $w = $this->_upscale($r1 * 2); $h = $this->_upscale($r2 * 2); $width = $this->_upscale($width); // Adapt angles as imagearc counts clockwise $start = 360 - $aend; $end = 360 - $astart; $c = $this->_allocate_color($color); // Convert the style array if required if (is_array($style) && count($style) > 0) { $gd_style = $this->convertStyle($style, $c, $width); if (!empty($gd_style)) { imagesetstyle($this->get_image(), $gd_style); $c = IMG_COLOR_STYLED; } } imagesetthickness($this->get_image(), $width); imagearc($this->get_image(), $x, $y, $w, $h, $start, $end, $c); } public function rectangle($x1, $y1, $w, $h, $color, $width, $style = [], $cap = "butt") { // Account for the fact that round and square caps are expected to // extend outwards if ($cap === "round" || $cap === "square") { // Adapt dash pattern if (is_array($style)) { foreach ($style as $index => &$s) { $s = $index % 2 === 0 ? $s + $width : $s - $width; } } } // Scale by the AA factor and DPI $x1 = $this->_upscale($x1); $y1 = $this->_upscale($y1); $w = $this->_upscale($w); $h = $this->_upscale($h); $width = $this->_upscale($width); $c = $this->_allocate_color($color); // Convert the style array if required if (is_array($style) && count($style) > 0) { $gd_style = $this->convertStyle($style, $c, $width); if (!empty($gd_style)) { imagesetstyle($this->get_image(), $gd_style); $c = IMG_COLOR_STYLED; } } imagesetthickness($this->get_image(), $width); if ($c === IMG_COLOR_STYLED) { imagepolygon($this->get_image(), [ $x1, $y1, $x1 + $w, $y1, $x1 + $w, $y1 + $h, $x1, $y1 + $h ], $c); } else { imagerectangle($this->get_image(), $x1, $y1, $x1 + $w, $y1 + $h, $c); } } public function filled_rectangle($x1, $y1, $w, $h, $color) { // Scale by the AA factor and DPI $x1 = $this->_upscale($x1); $y1 = $this->_upscale($y1); $w = $this->_upscale($w); $h = $this->_upscale($h); $c = $this->_allocate_color($color); imagefilledrectangle($this->get_image(), $x1, $y1, $x1 + $w, $y1 + $h, $c); } public function clipping_rectangle($x1, $y1, $w, $h) { // @todo } public function clipping_roundrectangle($x1, $y1, $w, $h, $rTL, $rTR, $rBR, $rBL) { // @todo } public function clipping_polygon(array $points): void { // @todo } public function clipping_end() { // @todo } public function save() { $this->get_dompdf()->getOptions()->setDpi(72); } public function restore() { $this->get_dompdf()->getOptions()->setDpi($this->dpi); } public function rotate($angle, $x, $y) { // @todo } public function skew($angle_x, $angle_y, $x, $y) { // @todo } public function scale($s_x, $s_y, $x, $y) { // @todo } public function translate($t_x, $t_y) { // @todo } public function transform($a, $b, $c, $d, $e, $f) { // @todo } public function polygon($points, $color, $width = null, $style = [], $fill = false) { // Scale each point by the AA factor and DPI foreach (array_keys($points) as $i) { $points[$i] = $this->_upscale($points[$i]); } $width = isset($width) ? $this->_upscale($width) : null; $c = $this->_allocate_color($color); // Convert the style array if required if (is_array($style) && count($style) > 0 && isset($width) && !$fill) { $gd_style = $this->convertStyle($style, $c, $width); if (!empty($gd_style)) { imagesetstyle($this->get_image(), $gd_style); $c = IMG_COLOR_STYLED; } } imagesetthickness($this->get_image(), isset($width) ? $width : 0); if ($fill) { imagefilledpolygon($this->get_image(), $points, $c); } else { imagepolygon($this->get_image(), $points, $c); } } public function circle($x, $y, $r, $color, $width = null, $style = [], $fill = false) { // Scale by the AA factor and DPI $x = $this->_upscale($x); $y = $this->_upscale($y); $d = $this->_upscale(2 * $r); $width = isset($width) ? $this->_upscale($width) : null; $c = $this->_allocate_color($color); // Convert the style array if required if (is_array($style) && count($style) > 0 && isset($width) && !$fill) { $gd_style = $this->convertStyle($style, $c, $width); if (!empty($gd_style)) { imagesetstyle($this->get_image(), $gd_style); $c = IMG_COLOR_STYLED; } } imagesetthickness($this->get_image(), isset($width) ? $width : 0); if ($fill) { imagefilledellipse($this->get_image(), $x, $y, $d, $d, $c); } else { imageellipse($this->get_image(), $x, $y, $d, $d, $c); } } /** * @throws \Exception */ public function image($img, $x, $y, $w, $h, $resolution = "normal") { $img_type = Cache::detect_type($img, $this->get_dompdf()->getHttpContext()); if (!$img_type) { return; } $func_name = "imagecreatefrom$img_type"; if (!function_exists($func_name)) { if (!method_exists(Helpers::class, $func_name)) { throw new \Exception("Function $func_name() not found. Cannot convert $img_type image: $img. Please install the image PHP extension."); } $func_name = [Helpers::class, $func_name]; } $src = @call_user_func($func_name, $img); if (!$src) { return; // Probably should add to $_dompdf_errors or whatever here } // Scale by the AA factor and DPI $x = $this->_upscale($x); $y = $this->_upscale($y); $w = $this->_upscale($w); $h = $this->_upscale($h); $img_w = imagesx($src); $img_h = imagesy($src); imagecopyresampled($this->get_image(), $src, $x, $y, 0, 0, $w, $h, $img_w, $img_h); } public function text($x, $y, $text, $font, $size, $color = [0, 0, 0], $word_spacing = 0.0, $char_spacing = 0.0, $angle = 0.0) { // Scale by the AA factor and DPI $x = $this->_upscale($x); $y = $this->_upscale($y); $size = $this->_upscale($size) * self::FONT_SCALE; $h = round($this->get_font_height_actual($font, $size)); $c = $this->_allocate_color($color); // imagettftext() converts numeric entities to their respective // character. Preserve any originally double encoded entities to be // represented as is. // eg: &#160; will render   rather than its character. $text = preg_replace('/&(#(?:x[a-fA-F0-9]+|[0-9]+);)/', '&\1', $text); $text = mb_encode_numericentity($text, [0x0080, 0xff, 0, 0xff], 'UTF-8'); $font = $this->get_ttf_file($font); // FIXME: word spacing imagettftext($this->get_image(), $size, $angle, $x, $y + $h, $c, $font, $text); } public function javascript($code) { // Not implemented } public function add_named_dest($anchorname) { // Not implemented } public function add_link($url, $x, $y, $width, $height) { // Not implemented } public function add_info(string $label, string $value): void { // N/A } public function set_default_view($view, $options = []) { // N/A } public function get_text_width($text, $font, $size, $word_spacing = 0.0, $char_spacing = 0.0) { $font = $this->get_ttf_file($font); $size = $this->_upscale($size) * self::FONT_SCALE; // imagettfbbox() converts numeric entities to their respective // character. Preserve any originally double encoded entities to be // represented as is. // eg: &#160; will render   rather than its character. $text = preg_replace('/&(#(?:x[a-fA-F0-9]+|[0-9]+);)/', '&\1', $text); $text = mb_encode_numericentity($text, [0x0080, 0xffff, 0, 0xffff], 'UTF-8'); // FIXME: word spacing list($x1, , $x2) = imagettfbbox($size, 0, $font, $text); // Add additional 1pt to prevent text overflow issues return $this->_downscale($x2 - $x1) + 1; } /** * @param string|null $font * @return string */ public function get_ttf_file($font) { if ($font === null) { $font = ""; } if ( stripos($font, ".ttf") === false ) { $font .= ".ttf"; } if (!file_exists($font)) { $font_metrics = $this->_dompdf->getFontMetrics(); $font = $font_metrics->getFont($this->_dompdf->getOptions()->getDefaultFont()) . ".ttf"; if (!file_exists($font)) { if (strpos($font, "mono")) { $font = $font_metrics->getFont("DejaVu Mono") . ".ttf"; } elseif (strpos($font, "sans") !== false) { $font = $font_metrics->getFont("DejaVu Sans") . ".ttf"; } elseif (strpos($font, "serif")) { $font = $font_metrics->getFont("DejaVu Serif") . ".ttf"; } else { $font = $font_metrics->getFont("DejaVu Sans") . ".ttf"; } } } return $font; } public function get_font_height($font, $size) { $size = $this->_upscale($size) * self::FONT_SCALE; $height = $this->get_font_height_actual($font, $size); return $this->_downscale($height); } /** * @param string $font * @param float $size * * @return float */ protected function get_font_height_actual($font, $size) { $font = $this->get_ttf_file($font); $ratio = $this->_dompdf->getOptions()->getFontHeightRatio(); // FIXME: word spacing list(, $y2, , , , $y1) = imagettfbbox($size, 0, $font, "MXjpqytfhl"); // Test string with ascenders, descenders and caps return ($y2 - $y1) * $ratio; } public function get_font_baseline($font, $size) { $ratio = $this->_dompdf->getOptions()->getFontHeightRatio(); return $this->get_font_height($font, $size) / $ratio; } public function new_page() { $this->_page_number++; $this->_page_count++; $this->_img = imagecreatetruecolor($this->_actual_width, $this->_actual_height); $this->_bg_color = $this->_allocate_color($this->_bg_color_array); imagealphablending($this->_img, true); imagesavealpha($this->_img, true); imagefill($this->_img, 0, 0, $this->_bg_color); $this->_imgs[] = $this->_img; } public function open_object() { // N/A } public function close_object() { // N/A } public function add_object() { // N/A } public function page_script($callback): void { // N/A } public function page_text($x, $y, $text, $font, $size, $color = [0, 0, 0], $word_space = 0.0, $char_space = 0.0, $angle = 0.0) { // N/A } public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = []) { // N/A } /** * Streams the image to the client. * * @param string $filename The filename to present to the client. * @param array $options Associative array: 'type' => jpeg|jpg|png; 'quality' => 0 - 100 (JPEG only); * 'page' => Number of the page to output (defaults to the first); 'Attachment': 1 or 0 (default 1). */ public function stream($filename, $options = []) { if (headers_sent()) { die("Unable to stream image: headers already sent"); } if (!isset($options["type"])) $options["type"] = "png"; if (!isset($options["Attachment"])) $options["Attachment"] = true; $type = strtolower($options["type"]); switch ($type) { case "jpg": case "jpeg": $contentType = "image/jpeg"; $extension = ".jpg"; break; case "png": default: $contentType = "image/png"; $extension = ".png"; break; } header("Cache-Control: private"); header("Content-Type: $contentType"); $filename = str_replace(["\n", "'"], "", basename($filename, ".$type")) . $extension; $attachment = $options["Attachment"] ? "attachment" : "inline"; header(Helpers::buildContentDispositionHeader($attachment, $filename)); $this->_output($options); flush(); } /** * Returns the image as a string. * * @param array $options Associative array: 'type' => jpeg|jpg|png; 'quality' => 0 - 100 (JPEG only); * 'page' => Number of the page to output (defaults to the first). * @return string */ public function output($options = []) { ob_start(); $this->_output($options); return ob_get_clean(); } /** * Outputs the image stream directly. * * @param array $options Associative array: 'type' => jpeg|jpg|png; 'quality' => 0 - 100 (JPEG only); * 'page' => Number of the page to output (defaults to the first). */ protected function _output($options = []) { if (!isset($options["type"])) $options["type"] = "png"; if (!isset($options["page"])) $options["page"] = 1; $type = strtolower($options["type"]); if (isset($this->_imgs[$options["page"] - 1])) { $img = $this->_imgs[$options["page"] - 1]; } else { $img = $this->_imgs[0]; } // Perform any antialiasing if ($this->_aa_factor != 1) { $dst_w = round($this->_actual_width / $this->_aa_factor); $dst_h = round($this->_actual_height / $this->_aa_factor); $dst = imagecreatetruecolor($dst_w, $dst_h); imagecopyresampled($dst, $img, 0, 0, 0, 0, $dst_w, $dst_h, $this->_actual_width, $this->_actual_height); } else { $dst = $img; } switch ($type) { case "jpg": case "jpeg": if (!isset($options["quality"])) { $options["quality"] = 75; } imagejpeg($dst, null, $options["quality"]); break; case "png": default: imagepng($dst); break; } if ($this->_aa_factor != 1) { imagedestroy($dst); } } } PK [0.0, 0.0, 4767.87, 6740.79], "2a0" => [0.0, 0.0, 3370.39, 4767.87], "a0" => [0.0, 0.0, 2383.94, 3370.39], "a1" => [0.0, 0.0, 1683.78, 2383.94], "a2" => [0.0, 0.0, 1190.55, 1683.78], "a3" => [0.0, 0.0, 841.89, 1190.55], "a4" => [0.0, 0.0, 595.28, 841.89], "a5" => [0.0, 0.0, 419.53, 595.28], "a6" => [0.0, 0.0, 297.64, 419.53], "a7" => [0.0, 0.0, 209.76, 297.64], "a8" => [0.0, 0.0, 147.40, 209.76], "a9" => [0.0, 0.0, 104.88, 147.40], "a10" => [0.0, 0.0, 73.70, 104.88], "b0" => [0.0, 0.0, 2834.65, 4008.19], "b1" => [0.0, 0.0, 2004.09, 2834.65], "b2" => [0.0, 0.0, 1417.32, 2004.09], "b3" => [0.0, 0.0, 1000.63, 1417.32], "b4" => [0.0, 0.0, 708.66, 1000.63], "b5" => [0.0, 0.0, 498.90, 708.66], "b6" => [0.0, 0.0, 354.33, 498.90], "b7" => [0.0, 0.0, 249.45, 354.33], "b8" => [0.0, 0.0, 175.75, 249.45], "b9" => [0.0, 0.0, 124.72, 175.75], "b10" => [0.0, 0.0, 87.87, 124.72], "c0" => [0.0, 0.0, 2599.37, 3676.54], "c1" => [0.0, 0.0, 1836.85, 2599.37], "c2" => [0.0, 0.0, 1298.27, 1836.85], "c3" => [0.0, 0.0, 918.43, 1298.27], "c4" => [0.0, 0.0, 649.13, 918.43], "c5" => [0.0, 0.0, 459.21, 649.13], "c6" => [0.0, 0.0, 323.15, 459.21], "c7" => [0.0, 0.0, 229.61, 323.15], "c8" => [0.0, 0.0, 161.57, 229.61], "c9" => [0.0, 0.0, 113.39, 161.57], "c10" => [0.0, 0.0, 79.37, 113.39], "ra0" => [0.0, 0.0, 2437.80, 3458.27], "ra1" => [0.0, 0.0, 1729.13, 2437.80], "ra2" => [0.0, 0.0, 1218.90, 1729.13], "ra3" => [0.0, 0.0, 864.57, 1218.90], "ra4" => [0.0, 0.0, 609.45, 864.57], "sra0" => [0.0, 0.0, 2551.18, 3628.35], "sra1" => [0.0, 0.0, 1814.17, 2551.18], "sra2" => [0.0, 0.0, 1275.59, 1814.17], "sra3" => [0.0, 0.0, 907.09, 1275.59], "sra4" => [0.0, 0.0, 637.80, 907.09], "letter" => [0.0, 0.0, 612.00, 792.00], "half-letter" => [0.0, 0.0, 396.00, 612.00], "legal" => [0.0, 0.0, 612.00, 1008.00], "ledger" => [0.0, 0.0, 1224.00, 792.00], "tabloid" => [0.0, 0.0, 792.00, 1224.00], "executive" => [0.0, 0.0, 521.86, 756.00], "folio" => [0.0, 0.0, 612.00, 936.00], "commercial #10 envelope" => [0.0, 0.0, 684.00, 297.00], "catalog #10 1/2 envelope" => [0.0, 0.0, 648.00, 864.00], "8.5x11" => [0.0, 0.0, 612.00, 792.00], "8.5x14" => [0.0, 0.0, 612.00, 1008.00], "11x17" => [0.0, 0.0, 792.00, 1224.00], ]; /** * The Dompdf object * * @var Dompdf */ protected $_dompdf; /** * Instance of Cpdf class * * @var \Dompdf\Cpdf */ protected $_pdf; /** * PDF width, in points * * @var float */ protected $_width; /** * PDF height, in points * * @var float */ protected $_height; /** * Current page number * * @var int */ protected $_page_number; /** * Total number of pages * * @var int */ protected $_page_count; /** * Array of pages for accessing after rendering is initially complete * * @var array */ protected $_pages; /** * Currently-applied opacity level (0 - 1) * * @var float */ protected $_current_opacity = 1; public function __construct($paper = "letter", string $orientation = "portrait", ?Dompdf $dompdf = null) { if (is_array($paper)) { $size = array_map("floatval", $paper); } else { $paper = strtolower($paper); $size = self::$PAPER_SIZES[$paper] ?? self::$PAPER_SIZES["letter"]; } if (strtolower($orientation) === "landscape") { [$size[2], $size[3]] = [$size[3], $size[2]]; } if ($dompdf === null) { $this->_dompdf = new Dompdf(); } else { $this->_dompdf = $dompdf; } $this->_pdf = new \Dompdf\Cpdf( $size, true, $this->_dompdf->getOptions()->getFontCache(), $this->_dompdf->getOptions()->getTempDir() ); $this->_pdf->addInfo("Producer", sprintf("%s + CPDF", $this->_dompdf->version)); $time = substr_replace(date('YmdHisO'), '\'', -2, 0) . '\''; $this->_pdf->addInfo("CreationDate", "D:$time"); $this->_pdf->addInfo("ModDate", "D:$time"); $this->_width = $size[2] - $size[0]; $this->_height = $size[3] - $size[1]; $this->_page_number = $this->_page_count = 1; $this->_pages = [$this->_pdf->getFirstPageId()]; } public function get_dompdf() { return $this->_dompdf; } /** * Returns the Cpdf instance * * @return \Dompdf\Cpdf */ public function get_cpdf() { return $this->_pdf; } public function add_info(string $label, string $value): void { $this->_pdf->addInfo($label, $value); } /** * Opens a new 'object' * * While an object is open, all drawing actions are recorded in the object, * as opposed to being drawn on the current page. Objects can be added * later to a specific page or to several pages. * * The return value is an integer ID for the new object. * * @see CPDF::close_object() * @see CPDF::add_object() * * @return int */ public function open_object() { $ret = $this->_pdf->openObject(); $this->_pdf->saveState(); return $ret; } /** * Reopens an existing 'object' * * @see CPDF::open_object() * @param int $object the ID of a previously opened object */ public function reopen_object($object) { $this->_pdf->reopenObject($object); $this->_pdf->saveState(); } /** * Closes the current 'object' * * @see CPDF::open_object() */ public function close_object() { $this->_pdf->restoreState(); $this->_pdf->closeObject(); } /** * Adds a specified 'object' to the document * * $object int specifying an object created with {@link * CPDF::open_object()}. $where can be one of: * - 'add' add to current page only * - 'all' add to every page from the current one onwards * - 'odd' add to all odd numbered pages from now on * - 'even' add to all even numbered pages from now on * - 'next' add the object to the next page only * - 'nextodd' add to all odd numbered pages from the next one * - 'nexteven' add to all even numbered pages from the next one * * @see Cpdf::addObject() * * @param int $object * @param string $where */ public function add_object($object, $where = 'all') { $this->_pdf->addObject($object, $where); } /** * Stops the specified 'object' from appearing in the document. * * The object will stop being displayed on the page following the current * one. * * @param int $object */ public function stop_object($object) { $this->_pdf->stopObject($object); } /** * Serialize the pdf object's current state for retrieval later */ public function serialize_object($id) { return $this->_pdf->serializeObject($id); } public function reopen_serialized_object($obj) { return $this->_pdf->restoreSerializedObject($obj); } //........................................................................ public function get_width() { return $this->_width; } public function get_height() { return $this->_height; } public function get_page_number() { return $this->_page_number; } public function get_page_count() { return $this->_page_count; } /** * Sets the current page number * * @param int $num */ public function set_page_number($num) { $this->_page_number = $num; } public function set_page_count($count) { $this->_page_count = $count; } /** * Sets the stroke color * * See {@link Style::set_color()} for the format of the color array. * * @param array $color */ protected function _set_stroke_color($color) { $this->_pdf->setStrokeColor($color); $alpha = isset($color["alpha"]) ? $color["alpha"] : 1; $alpha *= $this->_current_opacity; $this->_set_line_transparency("Normal", $alpha); } /** * Sets the fill colour * * See {@link Style::set_color()} for the format of the colour array. * * @param array $color */ protected function _set_fill_color($color) { $this->_pdf->setColor($color); $alpha = isset($color["alpha"]) ? $color["alpha"] : 1; $alpha *= $this->_current_opacity; $this->_set_fill_transparency("Normal", $alpha); } /** * Sets line transparency * @see Cpdf::setLineTransparency() * * Valid blend modes are (case-sensitive): * * Normal, Multiply, Screen, Overlay, Darken, Lighten, * ColorDodge, ColorBurn, HardLight, SoftLight, Difference, * Exclusion * * @param string $mode the blending mode to use * @param float $opacity 0.0 fully transparent, 1.0 fully opaque */ protected function _set_line_transparency($mode, $opacity) { $this->_pdf->setLineTransparency($mode, $opacity); } /** * Sets fill transparency * @see Cpdf::setFillTransparency() * * Valid blend modes are (case-sensitive): * * Normal, Multiply, Screen, Overlay, Darken, Lighten, * ColorDogde, ColorBurn, HardLight, SoftLight, Difference, * Exclusion * * @param string $mode the blending mode to use * @param float $opacity 0.0 fully transparent, 1.0 fully opaque */ protected function _set_fill_transparency($mode, $opacity) { $this->_pdf->setFillTransparency($mode, $opacity); } /** * Sets the line style * * @see Cpdf::setLineStyle() * * @param float $width * @param string $cap * @param string $join * @param array $dash */ protected function _set_line_style($width, $cap, $join, $dash) { $this->_pdf->setLineStyle($width, $cap, $join, $dash); } public function set_opacity(float $opacity, string $mode = "Normal"): void { $this->_set_line_transparency($mode, $opacity); $this->_set_fill_transparency($mode, $opacity); $this->_current_opacity = $opacity; } public function set_default_view($view, $options = []) { array_unshift($options, $view); call_user_func_array([$this->_pdf, "openHere"], $options); } /** * Remaps y coords from 4th to 1st quadrant * * @param float $y * @return float */ protected function y($y) { return $this->_height - $y; } public function line($x1, $y1, $x2, $y2, $color, $width, $style = [], $cap = "butt") { $this->_set_stroke_color($color); $this->_set_line_style($width, $cap, "", $style); $this->_pdf->line($x1, $this->y($y1), $x2, $this->y($y2)); $this->_set_line_transparency("Normal", $this->_current_opacity); } public function arc($x, $y, $r1, $r2, $astart, $aend, $color, $width, $style = [], $cap = "butt") { $this->_set_stroke_color($color); $this->_set_line_style($width, $cap, "", $style); $this->_pdf->ellipse($x, $this->y($y), $r1, $r2, 0, 8, $astart, $aend, false, false, true, false); $this->_set_line_transparency("Normal", $this->_current_opacity); } public function rectangle($x1, $y1, $w, $h, $color, $width, $style = [], $cap = "butt") { $this->_set_stroke_color($color); $this->_set_line_style($width, $cap, "", $style); $this->_pdf->rectangle($x1, $this->y($y1) - $h, $w, $h); $this->_set_line_transparency("Normal", $this->_current_opacity); } public function filled_rectangle($x1, $y1, $w, $h, $color) { $this->_set_fill_color($color); $this->_pdf->filledRectangle($x1, $this->y($y1) - $h, $w, $h); $this->_set_fill_transparency("Normal", $this->_current_opacity); } public function clipping_rectangle($x1, $y1, $w, $h) { $this->_pdf->clippingRectangle($x1, $this->y($y1) - $h, $w, $h); } public function clipping_roundrectangle($x1, $y1, $w, $h, $rTL, $rTR, $rBR, $rBL) { $this->_pdf->clippingRectangleRounded($x1, $this->y($y1) - $h, $w, $h, $rTL, $rTR, $rBR, $rBL); } public function clipping_polygon(array $points): void { // Adjust y values for ($i = 1; $i < count($points); $i += 2) { $points[$i] = $this->y($points[$i]); } $this->_pdf->clippingPolygon($points); } public function clipping_end() { $this->_pdf->clippingEnd(); } public function save() { $this->_pdf->saveState(); } public function restore() { $this->_pdf->restoreState(); } public function rotate($angle, $x, $y) { $this->_pdf->rotate($angle, $x, $y); } public function skew($angle_x, $angle_y, $x, $y) { $this->_pdf->skew($angle_x, $angle_y, $x, $y); } public function scale($s_x, $s_y, $x, $y) { $this->_pdf->scale($s_x, $s_y, $x, $y); } public function translate($t_x, $t_y) { $this->_pdf->translate($t_x, $t_y); } public function transform($a, $b, $c, $d, $e, $f) { $this->_pdf->transform([$a, $b, $c, $d, $e, $f]); } public function polygon($points, $color, $width = null, $style = [], $fill = false) { $this->_set_fill_color($color); $this->_set_stroke_color($color); if (!$fill && isset($width)) { $this->_set_line_style($width, "square", "miter", $style); } // Adjust y values for ($i = 1; $i < count($points); $i += 2) { $points[$i] = $this->y($points[$i]); } $this->_pdf->polygon($points, $fill); $this->_set_fill_transparency("Normal", $this->_current_opacity); $this->_set_line_transparency("Normal", $this->_current_opacity); } public function circle($x, $y, $r, $color, $width = null, $style = [], $fill = false) { $this->_set_fill_color($color); $this->_set_stroke_color($color); if (!$fill && isset($width)) { $this->_set_line_style($width, "round", "round", $style); } $this->_pdf->ellipse($x, $this->y($y), $r, 0, 0, 8, 0, 360, 1, $fill); $this->_set_fill_transparency("Normal", $this->_current_opacity); $this->_set_line_transparency("Normal", $this->_current_opacity); } /** * Convert image to a PNG image * * @param string $image_url * @param string $type * * @return string|null The url of the newly converted image */ protected function _convert_to_png($image_url, $type) { $filename = Cache::getTempImage($image_url); if ($filename !== null && file_exists($filename)) { return $filename; } $func_name = "imagecreatefrom$type"; set_error_handler([Helpers::class, "record_warnings"]); if (!function_exists($func_name)) { if (!method_exists(Helpers::class, $func_name)) { throw new Exception("Function $func_name() not found. Cannot convert $type image: $image_url. Please install the image PHP extension."); } $func_name = [Helpers::class, $func_name]; } try { $im = call_user_func($func_name, $image_url); if ($im) { imageinterlace($im, false); $tmp_dir = $this->_dompdf->getOptions()->getTempDir(); $tmp_name = @tempnam($tmp_dir, "{$type}_dompdf_img_"); @unlink($tmp_name); $filename = "$tmp_name.png"; imagepng($im, $filename); imagedestroy($im); } else { $filename = null; } } finally { restore_error_handler(); } if ($filename !== null) { Cache::addTempImage($image_url, $filename); } return $filename; } public function image($img, $x, $y, $w, $h, $resolution = "normal") { [$width, $height, $type] = Helpers::dompdf_getimagesize($img, $this->get_dompdf()->getHttpContext()); $debug_png = $this->_dompdf->getOptions()->getDebugPng(); if ($debug_png) { print "[image:$img|$width|$height|$type]"; } switch ($type) { case "jpeg": if ($debug_png) { print '!!!jpg!!!'; } $this->_pdf->addJpegFromFile($img, $x, $this->y($y) - $h, $w, $h); break; case "webp": /** @noinspection PhpMissingBreakStatementInspection */ case "gif": /** @noinspection PhpMissingBreakStatementInspection */ case "bmp": if ($debug_png) print "!!!{$type}!!!"; $img = $this->_convert_to_png($img, $type); if ($img === null) { if ($debug_png) print '!!!conversion to PDF failed!!!'; $this->image(Cache::$broken_image, $x, $y, $w, $h, $resolution); break; } case "png": if ($debug_png) print '!!!png!!!'; $this->_pdf->addPngFromFile($img, $x, $this->y($y) - $h, $w, $h); break; case "svg": if ($debug_png) print '!!!SVG!!!'; $this->_pdf->addSvgFromFile($img, $x, $this->y($y) - $h, $w, $h); break; default: if ($debug_png) print '!!!unknown!!!'; } } public function select($x, $y, $w, $h, $font, $size, $color = [0, 0, 0], $opts = []) { $pdf = $this->_pdf; $font .= ".afm"; $pdf->selectFont($font); if (!isset($pdf->acroFormId)) { $pdf->addForm(); } $ft = \Dompdf\Cpdf::ACROFORM_FIELD_CHOICE; $ff = \Dompdf\Cpdf::ACROFORM_FIELD_CHOICE_COMBO; $id = $pdf->addFormField($ft, rand(), $x, $this->y($y) - $h, $x + $w, $this->y($y), $ff, $size, $color); $pdf->setFormFieldOpt($id, $opts); } public function textarea($x, $y, $w, $h, $font, $size, $color = [0, 0, 0]) { $pdf = $this->_pdf; $font .= ".afm"; $pdf->selectFont($font); if (!isset($pdf->acroFormId)) { $pdf->addForm(); } $ft = \Dompdf\Cpdf::ACROFORM_FIELD_TEXT; $ff = \Dompdf\Cpdf::ACROFORM_FIELD_TEXT_MULTILINE; $pdf->addFormField($ft, rand(), $x, $this->y($y) - $h, $x + $w, $this->y($y), $ff, $size, $color); } public function input($x, $y, $w, $h, $type, $font, $size, $color = [0, 0, 0]) { $pdf = $this->_pdf; $font .= ".afm"; $pdf->selectFont($font); if (!isset($pdf->acroFormId)) { $pdf->addForm(); } $ft = \Dompdf\Cpdf::ACROFORM_FIELD_TEXT; $ff = 0; switch ($type) { case 'text': $ft = \Dompdf\Cpdf::ACROFORM_FIELD_TEXT; break; case 'password': $ft = \Dompdf\Cpdf::ACROFORM_FIELD_TEXT; $ff = \Dompdf\Cpdf::ACROFORM_FIELD_TEXT_PASSWORD; break; case 'submit': $ft = \Dompdf\Cpdf::ACROFORM_FIELD_BUTTON; break; } $pdf->addFormField($ft, rand(), $x, $this->y($y) - $h, $x + $w, $this->y($y), $ff, $size, $color); } public function text($x, $y, $text, $font, $size, $color = [0, 0, 0], $word_space = 0.0, $char_space = 0.0, $angle = 0.0) { $pdf = $this->_pdf; $this->_set_fill_color($color); $is_font_subsetting = $this->_dompdf->getOptions()->getIsFontSubsettingEnabled(); $pdf->selectFont($font . '.afm', '', true, $is_font_subsetting); $pdf->addText($x, $this->y($y) - $pdf->getFontHeight($size), $size, $text, $angle, $word_space, $char_space); $this->_set_fill_transparency("Normal", $this->_current_opacity); } public function javascript($code) { $this->_pdf->addJavascript($code); } //........................................................................ public function add_named_dest($anchorname) { $this->_pdf->addDestination($anchorname, "Fit"); } public function add_link($url, $x, $y, $width, $height) { $y = $this->y($y) - $height; if (strpos($url, '#') === 0) { // Local link $name = substr($url, 1); if ($name) { $this->_pdf->addInternalLink($name, $x, $y, $x + $width, $y + $height); } } else { $this->_pdf->addLink($url, $x, $y, $x + $width, $y + $height); } } /** * @throws FontNotFoundException */ public function get_text_width($text, $font, $size, $word_spacing = 0.0, $char_spacing = 0.0) { $this->_pdf->selectFont($font, '', true, $this->_dompdf->getOptions()->getIsFontSubsettingEnabled()); return $this->_pdf->getTextWidth($size, $text, $word_spacing, $char_spacing); } /** * @throws FontNotFoundException */ public function get_font_height($font, $size) { $options = $this->_dompdf->getOptions(); $this->_pdf->selectFont($font, '', true, $options->getIsFontSubsettingEnabled()); return $this->_pdf->getFontHeight($size) * $options->getFontHeightRatio(); } /*function get_font_x_height($font, $size) { $this->_pdf->selectFont($font); $ratio = $this->_dompdf->getOptions()->getFontHeightRatio(); return $this->_pdf->getFontXHeight($size) * $ratio; }*/ /** * @throws FontNotFoundException */ public function get_font_baseline($font, $size) { $ratio = $this->_dompdf->getOptions()->getFontHeightRatio(); return $this->get_font_height($font, $size) / $ratio; } /** * Processes a callback or script on every page. * * The callback function receives the four parameters `int $pageNumber`, * `int $pageCount`, `Canvas $canvas`, and `FontMetrics $fontMetrics`, in * that order. If a script is passed as string, the variables `$PAGE_NUM`, * `$PAGE_COUNT`, `$pdf`, and `$fontMetrics` are available instead. Passing * a script as string is deprecated and will be removed in a future version. * * This function can be used to add page numbers to all pages after the * first one, for example. * * @param callable|string $callback The callback function or PHP script to process on every page */ public function page_script($callback): void { if (is_string($callback)) { $this->processPageScript(function ( int $PAGE_NUM, int $PAGE_COUNT, self $pdf, FontMetrics $fontMetrics ) use ($callback) { eval($callback); }); return; } $this->processPageScript($callback); } public function page_text($x, $y, $text, $font, $size, $color = [0, 0, 0], $word_space = 0.0, $char_space = 0.0, $angle = 0.0) { $this->processPageScript(function (int $pageNumber, int $pageCount) use ($x, $y, $text, $font, $size, $color, $word_space, $char_space, $angle) { $text = str_replace( ["{PAGE_NUM}", "{PAGE_COUNT}"], [$pageNumber, $pageCount], $text ); $this->text($x, $y, $text, $font, $size, $color, $word_space, $char_space, $angle); }); } public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = []) { $this->processPageScript(function () use ($x1, $y1, $x2, $y2, $color, $width, $style) { $this->line($x1, $y1, $x2, $y2, $color, $width, $style); }); } /** * @return int */ public function new_page() { $this->_page_number++; $this->_page_count++; $ret = $this->_pdf->newPage(); $this->_pages[] = $ret; return $ret; } protected function processPageScript(callable $callback): void { $pageNumber = 1; foreach ($this->_pages as $pid) { $this->reopen_object($pid); $fontMetrics = $this->_dompdf->getFontMetrics(); $callback($pageNumber, $this->_page_count, $this, $fontMetrics); $this->close_object(); $pageNumber++; } } public function stream($filename = "document.pdf", $options = []) { if (headers_sent()) { die("Unable to stream pdf: headers already sent"); } if (!isset($options["compress"])) $options["compress"] = true; if (!isset($options["Attachment"])) $options["Attachment"] = true; $debug = !$options['compress']; $tmp = ltrim($this->_pdf->output($debug)); header("Cache-Control: private"); header("Content-Type: application/pdf"); header("Content-Length: " . mb_strlen($tmp, "8bit")); $filename = str_replace(["\n", "'"], "", basename($filename, ".pdf")) . ".pdf"; $attachment = $options["Attachment"] ? "attachment" : "inline"; header(Helpers::buildContentDispositionHeader($attachment, $filename)); echo $tmp; flush(); } public function output($options = []) { if (!isset($options["compress"])) $options["compress"] = true; $debug = !$options['compress']; return $this->_pdf->output($debug); } /** * Returns logging messages generated by the Cpdf class * * @return string */ public function get_messages() { return $this->_pdf->messages; } } PK "Courier", "courier-bold" => "Courier-Bold", "courier-oblique" => "Courier-Oblique", "courier-boldoblique" => "Courier-BoldOblique", "helvetica" => "Helvetica", "helvetica-bold" => "Helvetica-Bold", "helvetica-oblique" => "Helvetica-Oblique", "helvetica-boldoblique" => "Helvetica-BoldOblique", "times" => "Times-Roman", "times-roman" => "Times-Roman", "times-bold" => "Times-Bold", "times-italic" => "Times-Italic", "times-bolditalic" => "Times-BoldItalic", "symbol" => "Symbol", "zapfdinbats" => "ZapfDingbats", "zapfdingbats" => "ZapfDingbats", ]; /** * @var \Dompdf\Dompdf */ protected $_dompdf; /** * Instance of PDFLib class * * @var \PDFLib */ protected $_pdf; /** * Name of temporary file used for PDFs created on disk * * @var string */ protected $_file; /** * PDF width, in points * * @var float */ protected $_width; /** * PDF height, in points * * @var float */ protected $_height; /** * Last fill color used * * @var array */ protected $_last_fill_color; /** * Last stroke color used * * @var array */ protected $_last_stroke_color; /** * The current opacity level * * @var float|null */ protected $_current_opacity; /** * Cache of image handles * * @var array */ protected $_imgs; /** * Cache of font handles * * @var array */ protected $_fonts; /** * Cache of fontFile checks * * @var array */ protected $_fontsFiles; /** * List of objects (templates) to add to multiple pages * * @var array */ protected $_objs; /** * List of gstate objects created for this PDF (for reuse) * * @var array */ protected $_gstates = []; /** * Current page number * * @var int */ protected $_page_number; /** * Total number of pages * * @var int */ protected $_page_count; /** * Array of pages for accessing after rendering is initially complete * * @var array */ protected $_pages; public function __construct($paper = "letter", string $orientation = "portrait", ?Dompdf $dompdf = null) { if (is_array($paper)) { $size = array_map("floatval", $paper); } else { $paper = strtolower($paper); $size = self::$PAPER_SIZES[$paper] ?? self::$PAPER_SIZES["letter"]; } if (strtolower($orientation) === "landscape") { [$size[2], $size[3]] = [$size[3], $size[2]]; } $this->_width = $size[2] - $size[0]; $this->_height = $size[3] - $size[1]; if ($dompdf === null) { $this->_dompdf = new Dompdf(); } else { $this->_dompdf = $dompdf; } $this->_pdf = new \PDFLib(); $license = $dompdf->getOptions()->getPdflibLicense(); if (strlen($license) > 0) { $this->setPDFLibParameter("license", $license); } if ($this->getPDFLibMajorVersion() < 10) { $this->setPDFLibParameter("textformat", "utf8"); } if ($this->getPDFLibMajorVersion() >= 7) { $this->setPDFLibParameter("errorpolicy", "return"); // $this->_pdf->set_option('logging={filename=' . \APP_PATH . '/logs/pdflib.log classes={api=1 warning=2}}'); // $this->_pdf->set_option('errorpolicy=exception'); } else { $this->setPDFLibParameter("fontwarning", "false"); } $searchPath = $this->_dompdf->getOptions()->getFontDir(); if (empty($searchPath) === false) { $this->_pdf->set_option('searchpath={' . $searchPath . '}'); } // fetch PDFLib version information for the producer field $this->_pdf->set_info("Producer Addendum", sprintf("%s + PDFLib %s", $dompdf->version, $this->getPDFLibMajorVersion())); // Silence pedantic warnings about missing TZ settings $tz = @date_default_timezone_get(); date_default_timezone_set("UTC"); $this->_pdf->set_info("Date", date("Y-m-d")); date_default_timezone_set($tz); if (self::$IN_MEMORY) { $this->_pdf->begin_document("", ""); } else { $tmp_dir = $this->_dompdf->getOptions()->getTempDir(); $tmp_name = @tempnam($tmp_dir, "libdompdf_pdf_"); @unlink($tmp_name); $this->_file = "$tmp_name.pdf"; $this->_pdf->begin_document($this->_file, ""); } $this->_pdf->begin_page_ext($this->_width, $this->_height, ""); $this->_page_number = $this->_page_count = 1; $this->_imgs = []; $this->_fonts = []; $this->_objs = []; } function get_dompdf() { return $this->_dompdf; } /** * Close the pdf */ protected function _close() { $this->_place_objects(); // Close all pages $this->_pdf->suspend_page(""); for ($p = 1; $p <= $this->_page_count; $p++) { $this->_pdf->resume_page("pagenumber=$p"); $this->_pdf->end_page_ext(""); } $this->_pdf->end_document(""); } /** * Returns the PDFLib instance * * @return PDFLib */ public function get_pdflib() { return $this->_pdf; } public function add_info(string $label, string $value): void { $this->_pdf->set_info($label, $value); } /** * Opens a new 'object' (template in PDFLib-speak) * * While an object is open, all drawing actions are recorded to the * object instead of being drawn on the current page. Objects can * be added later to a specific page or to several pages. * * The return value is an integer ID for the new object. * * @see PDFLib::close_object() * @see PDFLib::add_object() * * @return int */ public function open_object() { $this->_pdf->suspend_page(""); if ($this->getPDFLibMajorVersion() >= 7) { $ret = $this->_pdf->begin_template_ext($this->_width, $this->_height, null); } else { $ret = $this->_pdf->begin_template($this->_width, $this->_height); } $this->_pdf->save(); $this->_objs[$ret] = ["start_page" => $this->_page_number]; return $ret; } /** * Reopen an existing object (NOT IMPLEMENTED) * PDFLib does not seem to support reopening templates. * * @param int $object the ID of a previously opened object * * @throws Exception * @return void */ public function reopen_object($object) { throw new Exception("PDFLib does not support reopening objects."); } /** * Close the current template * * @see PDFLib::open_object() */ public function close_object() { $this->_pdf->restore(); if ($this->getPDFLibMajorVersion() >= 7) { $this->_pdf->end_template_ext($this->_width, $this->_height); } else { $this->_pdf->end_template(); } $this->_pdf->resume_page("pagenumber=" . $this->_page_number); } /** * Adds the specified object to the document * * $where can be one of: * - 'add' add to current page only * - 'all' add to every page from the current one onwards * - 'odd' add to all odd numbered pages from now on * - 'even' add to all even numbered pages from now on * - 'next' add the object to the next page only * - 'nextodd' add to all odd numbered pages from the next one * - 'nexteven' add to all even numbered pages from the next one * * @param int $object the object handle returned by open_object() * @param string $where */ public function add_object($object, $where = 'all') { if (mb_strpos($where, "next") !== false) { $this->_objs[$object]["start_page"]++; $where = str_replace("next", "", $where); if ($where == "") { $where = "add"; } } $this->_objs[$object]["where"] = $where; } /** * Stops the specified template from appearing in the document. * * The object will stop being displayed on the page following the * current one. * * @param int $object */ public function stop_object($object) { if (!isset($this->_objs[$object])) { return; } $start = $this->_objs[$object]["start_page"]; $where = $this->_objs[$object]["where"]; // Place the object on this page if required if ($this->_page_number >= $start && (($this->_page_number % 2 == 0 && $where === "even") || ($this->_page_number % 2 == 1 && $where === "odd") || ($where === "all")) ) { $this->_pdf->fit_image($object, 0, 0, ""); } $this->_objs[$object] = null; unset($this->_objs[$object]); } /** * Add all active objects to the current page */ protected function _place_objects() { foreach ($this->_objs as $obj => $props) { $start = $props["start_page"]; $where = $props["where"]; // Place the object on this page if required if ($this->_page_number >= $start && (($this->_page_number % 2 == 0 && $where === "even") || ($this->_page_number % 2 == 1 && $where === "odd") || ($where === "all")) ) { $this->_pdf->fit_image($obj, 0, 0, ""); } } } public function get_width() { return $this->_width; } public function get_height() { return $this->_height; } public function get_page_number() { return $this->_page_number; } public function get_page_count() { return $this->_page_count; } /** * @param $num */ public function set_page_number($num) { $this->_page_number = (int)$num; } public function set_page_count($count) { $this->_page_count = (int)$count; } /** * Sets the line style * * @param float $width * @param string $cap * @param string $join * @param array $dash */ protected function _set_line_style($width, $cap, $join, $dash) { if (!is_array($dash)) { $dash = []; } // Work around PDFLib limitation with 0 dash length: // Value 0 for option 'dasharray' is too small (minimum 1.5e-05) foreach ($dash as &$d) { if ($d == 0) { $d = 1.5e-5; } } if (count($dash) === 1) { $dash[] = $dash[0]; } if ($this->getPDFLibMajorVersion() >= 9) { if (count($dash) > 1) { $this->_pdf->set_graphics_option("dasharray={" . implode(" ", $dash) . "}"); } else { $this->_pdf->set_graphics_option("dasharray=none"); } } else { if (count($dash) > 1) { $this->_pdf->setdashpattern("dasharray={" . implode(" ", $dash) . "}"); } else { $this->_pdf->setdash(0, 0); } } switch ($join) { case "miter": if ($this->getPDFLibMajorVersion() >= 9) { $this->_pdf->set_graphics_option('linejoin=0'); } else { $this->_pdf->setlinejoin(0); } break; case "round": if ($this->getPDFLibMajorVersion() >= 9) { $this->_pdf->set_graphics_option('linejoin=1'); } else { $this->_pdf->setlinejoin(1); } break; case "bevel": if ($this->getPDFLibMajorVersion() >= 9) { $this->_pdf->set_graphics_option('linejoin=2'); } else { $this->_pdf->setlinejoin(2); } break; default: break; } switch ($cap) { case "butt": if ($this->getPDFLibMajorVersion() >= 9) { $this->_pdf->set_graphics_option('linecap=0'); } else { $this->_pdf->setlinecap(0); } break; case "round": if ($this->getPDFLibMajorVersion() >= 9) { $this->_pdf->set_graphics_option('linecap=1'); } else { $this->_pdf->setlinecap(1); } break; case "square": if ($this->getPDFLibMajorVersion() >= 9) { $this->_pdf->set_graphics_option('linecap=2'); } else { $this->_pdf->setlinecap(2); } break; default: break; } $this->_pdf->setlinewidth($width); } /** * Sets the line color * * @param array $color array(r,g,b) */ protected function _set_stroke_color($color) { // TODO: we should check the current PDF stroke color // instead of the cached value if ($this->_last_stroke_color == $color) { // FIXME: do nothing, this optimization is broken by the // stroke being set as a side effect of other operations //return; } $alpha = isset($color["alpha"]) ? $color["alpha"] : 1; if (isset($this->_current_opacity)) { $alpha *= $this->_current_opacity; } $this->_last_stroke_color = $color; if (isset($color[3])) { $type = "cmyk"; list($c1, $c2, $c3, $c4) = [$color[0], $color[1], $color[2], $color[3]]; } elseif (isset($color[2])) { $type = "rgb"; list($c1, $c2, $c3, $c4) = [$color[0], $color[1], $color[2], null]; } else { $type = "gray"; list($c1, $c2, $c3, $c4) = [$color[0], $color[1], null, null]; } $this->_set_stroke_opacity($alpha, "Normal"); $this->_pdf->setcolor("stroke", $type, $c1, $c2, $c3, $c4); } /** * Sets the fill color * * @param array $color array(r,g,b) */ protected function _set_fill_color($color) { // TODO: we should check the current PDF fill color // instead of the cached value if ($this->_last_fill_color == $color) { // FIXME: do nothing, this optimization is broken by the // fill being set as a side effect of other operations //return; } $alpha = isset($color["alpha"]) ? $color["alpha"] : 1; if (isset($this->_current_opacity)) { $alpha *= $this->_current_opacity; } $this->_last_fill_color = $color; if (isset($color[3])) { $type = "cmyk"; list($c1, $c2, $c3, $c4) = [$color[0], $color[1], $color[2], $color[3]]; } elseif (isset($color[2])) { $type = "rgb"; list($c1, $c2, $c3, $c4) = [$color[0], $color[1], $color[2], null]; } else { $type = "gray"; list($c1, $c2, $c3, $c4) = [$color[0], $color[1], null, null]; } $this->_set_fill_opacity($alpha, "Normal"); $this->_pdf->setcolor("fill", $type, $c1, $c2, $c3, $c4); } /** * Sets the fill opacity * * @param float $opacity * @param string $mode */ public function _set_fill_opacity($opacity, $mode = "Normal") { if ($mode === "Normal" && isset($opacity)) { $this->_set_gstate("opacityfill=$opacity"); } } /** * Sets the stroke opacity * * @param float $opacity * @param string $mode */ public function _set_stroke_opacity($opacity, $mode = "Normal") { if ($mode === "Normal" && isset($opacity)) { $this->_set_gstate("opacitystroke=$opacity"); } } public function set_opacity(float $opacity, string $mode = "Normal"): void { if ($mode === "Normal") { $this->_set_gstate("opacityfill=$opacity opacitystroke=$opacity"); $this->_current_opacity = $opacity; } } /** * Sets the gstate * * @param $gstate_options * @return int */ public function _set_gstate($gstate_options) { if (($gstate = array_search($gstate_options, $this->_gstates)) === false) { $gstate = $this->_pdf->create_gstate($gstate_options); $this->_gstates[$gstate] = $gstate_options; } return $this->_pdf->set_gstate($gstate); } public function set_default_view($view, $options = []) { // TODO // http://www.pdflib.com/fileadmin/pdflib/pdf/manuals/PDFlib-8.0.2-API-reference.pdf /** * fitheight Fit the page height to the window, with the x coordinate left at the left edge of the window. * fitrect Fit the rectangle specified by left, bottom, right, and top to the window. * fitvisible Fit the visible contents of the page (the ArtBox) to the window. * fitvisibleheight Fit the visible contents of the page to the window with the x coordinate left at the left edge of the window. * fitvisiblewidth Fit the visible contents of the page to the window with the y coordinate top at the top edge of the window. * fitwidth Fit the page width to the window, with the y coordinate top at the top edge of the window. * fitwindow Fit the complete page to the window. * fixed */ //$this->setPDFLibParameter("openaction", $view); } /** * Loads a specific font and stores the corresponding descriptor. * * @param string $font * @param string $encoding * @param string $options * * @return int the font descriptor for the font */ protected function _load_font($font, $encoding = null, $options = "") { // Fix for PDFLibs case-sensitive font names $baseFont = basename($font); $isNativeFont = false; if (isset(self::$nativeFontsTpPDFLib[$baseFont])) { $font = self::$nativeFontsTpPDFLib[$baseFont]; $isNativeFont = true; } // Check if the font is a native PDF font // Embed non-native fonts $test = strtolower($baseFont); if (in_array($test, DOMPDF::$nativeFonts)) { $font = basename($font); } else { // Embed non-native fonts $options .= " embedding=true"; } $options .= " autosubsetting=" . ($this->_dompdf->getOptions()->getIsFontSubsettingEnabled() === false ? "false" : "true"); if (is_null($encoding)) { // Unicode encoding is only available for the commerical // version of PDFlib and not PDFlib-Lite if (strlen($this->_dompdf->getOptions()->getPdflibLicense()) > 0) { $encoding = "unicode"; } else { $encoding = "auto"; } } $key = "$font:$encoding:$options"; if (isset($this->_fonts[$key])) { return $this->_fonts[$key]; } // Native fonts are build in, just load it if ($isNativeFont) { $this->_fonts[$key] = $this->_pdf->load_font($font, $encoding, $options); return $this->_fonts[$key]; } $fontOutline = $this->getPDFLibParameter("FontOutline", 1); if ($fontOutline === "" || $fontOutline <= 0) { $families = $this->_dompdf->getFontMetrics()->getFontFamilies(); foreach ($families as $files) { foreach ($files as $file) { $face = basename($file); $afm = null; if (isset($this->_fontsFiles[$face])) { continue; } // Prefer ttfs to afms if (file_exists("$file.ttf")) { $outline = "$file.ttf"; } elseif (file_exists("$file.TTF")) { $outline = "$file.TTF"; } elseif (file_exists("$file.pfb")) { $outline = "$file.pfb"; if (file_exists("$file.afm")) { $afm = "$file.afm"; } } elseif (file_exists("$file.PFB")) { $outline = "$file.PFB"; if (file_exists("$file.AFM")) { $afm = "$file.AFM"; } } else { continue; } $this->_fontsFiles[$face] = true; if ($this->getPDFLibMajorVersion() >= 9) { $this->setPDFLibParameter("FontOutline", '{' . "$face=$outline" . '}'); } else { $this->setPDFLibParameter("FontOutline", "\{$face\}=\{$outline\}"); } if (is_null($afm)) { continue; } if ($this->getPDFLibMajorVersion() >= 9) { $this->setPDFLibParameter("FontAFM", '{' . "$face=$afm" . '}'); } else { $this->setPDFLibParameter("FontAFM", "\{$face\}=\{$afm\}"); } } } } $this->_fonts[$key] = $this->_pdf->load_font($font, $encoding, $options); return $this->_fonts[$key]; } /** * Remaps y coords from 4th to 1st quadrant * * @param float $y * @return float */ protected function y($y) { return $this->_height - $y; } public function line($x1, $y1, $x2, $y2, $color, $width, $style = [], $cap = "butt") { $this->_set_line_style($width, $cap, "", $style); $this->_set_stroke_color($color); $y1 = $this->y($y1); $y2 = $this->y($y2); $this->_pdf->moveto($x1, $y1); $this->_pdf->lineto($x2, $y2); $this->_pdf->stroke(); $this->_set_stroke_opacity($this->_current_opacity, "Normal"); } public function arc($x, $y, $r1, $r2, $astart, $aend, $color, $width, $style = [], $cap = "butt") { $this->_set_line_style($width, $cap, "", $style); $this->_set_stroke_color($color); $y = $this->y($y); $this->_pdf->arc($x, $y, $r1, $astart, $aend); $this->_pdf->stroke(); $this->_set_stroke_opacity($this->_current_opacity, "Normal"); } public function rectangle($x1, $y1, $w, $h, $color, $width, $style = [], $cap = "butt") { $this->_set_stroke_color($color); $this->_set_line_style($width, $cap, "", $style); $y1 = $this->y($y1) - $h; $this->_pdf->rect($x1, $y1, $w, $h); $this->_pdf->stroke(); $this->_set_stroke_opacity($this->_current_opacity, "Normal"); } public function filled_rectangle($x1, $y1, $w, $h, $color) { $this->_set_fill_color($color); $y1 = $this->y($y1) - $h; $this->_pdf->rect(floatval($x1), floatval($y1), floatval($w), floatval($h)); $this->_pdf->fill(); $this->_set_fill_opacity($this->_current_opacity, "Normal"); } public function clipping_rectangle($x1, $y1, $w, $h) { $this->_pdf->save(); $y1 = $this->y($y1) - $h; $this->_pdf->rect(floatval($x1), floatval($y1), floatval($w), floatval($h)); $this->_pdf->clip(); } public function clipping_roundrectangle($x1, $y1, $w, $h, $rTL, $rTR, $rBR, $rBL) { if ($this->getPDFLibMajorVersion() < 9) { //TODO: add PDFLib7 support $this->clipping_rectangle($x1, $y1, $w, $h); return; } $this->_pdf->save(); // we use 0,0 for the base coordinates for the path points // since we're drawing the path at the $x1,$y1 coordinates $path = 0; //start: left edge, top end $path = $this->_pdf->add_path_point($path, 0, 0 - $rTL + $h, "move", ""); // line: left edge, bottom end $path = $this->_pdf->add_path_point($path, 0, 0 + $rBL, "line", ""); // curve: bottom-left corner if ($rBL > 0) { $path = $this->_pdf->add_path_point($path, 0 + $rBL, 0, "elliptical", "radius=$rBL clockwise=false"); } // line: bottom edge, left end $path = $this->_pdf->add_path_point($path, 0 - $rBR + $w, 0, "line", ""); // curve: bottom-right corner if ($rBR > 0) { $path = $this->_pdf->add_path_point($path, 0 + $w, 0 + $rBR, "elliptical", "radius=$rBR clockwise=false"); } // line: right edge, top end $path = $this->_pdf->add_path_point($path, 0 + $w, 0 - $rTR + $h, "line", ""); // curve: top-right corner if ($rTR > 0) { $path = $this->_pdf->add_path_point($path, 0 - $rTR + $w, 0 + $h, "elliptical", "radius=$rTR clockwise=false"); } // line: top edge, left end $path = $this->_pdf->add_path_point($path, 0 + $rTL, 0 + $h, "line", ""); // curve: top-left corner if ($rTL > 0) { $path = $this->_pdf->add_path_point($path, 0, 0 - $rTL + $h, "elliptical", "radius=$rTL clockwise=false"); } $this->_pdf->draw_path($path, $x1, $this->_height-$y1-$h, "clip=true"); } public function clipping_polygon(array $points): void { $this->_pdf->save(); $y = $this->y(array_pop($points)); $x = array_pop($points); $this->_pdf->moveto($x, $y); while (count($points) > 1) { $y = $this->y(array_pop($points)); $x = array_pop($points); $this->_pdf->lineto($x, $y); } $this->_pdf->closepath(); $this->_pdf->clip(); } public function clipping_end() { $this->_pdf->restore(); } public function save() { $this->_pdf->save(); } function restore() { $this->_pdf->restore(); } public function rotate($angle, $x, $y) { $pdf = $this->_pdf; $pdf->translate($x, $this->_height - $y); $pdf->rotate(-$angle); $pdf->translate(-$x, -$this->_height + $y); } public function skew($angle_x, $angle_y, $x, $y) { $pdf = $this->_pdf; $pdf->translate($x, $this->_height - $y); $pdf->skew($angle_y, $angle_x); // Needs to be inverted $pdf->translate(-$x, -$this->_height + $y); } public function scale($s_x, $s_y, $x, $y) { $pdf = $this->_pdf; $pdf->translate($x, $this->_height - $y); $pdf->scale($s_x, $s_y); $pdf->translate(-$x, -$this->_height + $y); } public function translate($t_x, $t_y) { $this->_pdf->translate($t_x, -$t_y); } public function transform($a, $b, $c, $d, $e, $f) { $this->_pdf->concat($a, $b, $c, $d, $e, $f); } public function polygon($points, $color, $width = null, $style = [], $fill = false) { $this->_set_fill_color($color); $this->_set_stroke_color($color); if (!$fill && isset($width)) { $this->_set_line_style($width, "square", "miter", $style); } $y = $this->y(array_pop($points)); $x = array_pop($points); $this->_pdf->moveto($x, $y); while (count($points) > 1) { $y = $this->y(array_pop($points)); $x = array_pop($points); $this->_pdf->lineto($x, $y); } if ($fill) { $this->_pdf->fill(); } else { $this->_pdf->closepath_stroke(); } $this->_set_fill_opacity($this->_current_opacity, "Normal"); $this->_set_stroke_opacity($this->_current_opacity, "Normal"); } public function circle($x, $y, $r, $color, $width = null, $style = [], $fill = false) { $this->_set_fill_color($color); $this->_set_stroke_color($color); if (!$fill && isset($width)) { $this->_set_line_style($width, "round", "round", $style); } $y = $this->y($y); $this->_pdf->circle($x, $y, $r); if ($fill) { $this->_pdf->fill(); } else { $this->_pdf->stroke(); } $this->_set_fill_opacity($this->_current_opacity, "Normal"); $this->_set_stroke_opacity($this->_current_opacity, "Normal"); } public function image($img, $x, $y, $w, $h, $resolution = "normal") { $w = (int)$w; $h = (int)$h; $img_type = Cache::detect_type($img, $this->get_dompdf()->getHttpContext()); // Strip file:// prefix if (substr($img, 0, 7) === "file://") { $img = substr($img, 7); } if (!isset($this->_imgs[$img])) { if (strtolower($img_type) === "svg") { //FIXME: PDFLib loads SVG but returns error message "Function must not be called in 'page' scope" $image_load_response = $this->_pdf->load_graphics($img_type, $img, ""); } else { $image_load_response = $this->_pdf->load_image($img_type, $img, ""); } if ($image_load_response === 0) { //TODO: should do something with the error message $error = $this->_pdf->get_errmsg(); return; } $this->_imgs[$img] = $image_load_response; } $img = $this->_imgs[$img]; $y = $this->y($y) - $h; if (strtolower($img_type) === "svg") { $this->_pdf->fit_graphics($img, $x, $y, 'boxsize={' . "$w $h" . '} fitmethod=entire'); } else { $this->_pdf->fit_image($img, $x, $y, 'boxsize={' . "$w $h" . '} fitmethod=entire'); } } public function text($x, $y, $text, $font, $size, $color = [0, 0, 0], $word_spacing = 0, $char_spacing = 0, $angle = 0) { if ($size == 0) { return; } $fh = $this->_load_font($font); $this->_pdf->setfont($fh, $size); $this->_set_fill_color($color); $y = $this->y($y) - $this->get_font_height($font, $size); $word_spacing = (float)$word_spacing; $char_spacing = (float)$char_spacing; $angle = -(float)$angle; $this->_pdf->fit_textline($text, $x, $y, "rotate=$angle wordspacing=$word_spacing charspacing=$char_spacing "); $this->_set_fill_opacity($this->_current_opacity, "Normal"); } public function javascript($code) { if (strlen($this->_dompdf->getOptions()->getPdflibLicense()) > 0) { $this->_pdf->create_action("JavaScript", $code); } } public function add_named_dest($anchorname) { $this->_pdf->add_nameddest($anchorname, ""); } public function add_link($url, $x, $y, $width, $height) { $y = $this->y($y) - $height; if (strpos($url, '#') === 0) { // Local link $name = substr($url, 1); if ($name) { $this->_pdf->create_annotation($x, $y, $x + $width, $y + $height, 'Link', "contents={$url} destname=" . substr($url, 1) . " linewidth=0"); } } else { //TODO: PDFLib::create_action does not permit non-HTTP links for URI actions $action = $this->_pdf->create_action("URI", "url={{$url}}"); // add the annotation only if the action was created if ($action !== 0) { $this->_pdf->create_annotation($x, $y, $x + $width, $y + $height, 'Link', "contents={{$url}} action={activate=$action} linewidth=0"); } } } public function get_text_width($text, $font, $size, $word_spacing = 0.0, $letter_spacing = 0.0) { if ($size == 0) { return 0.0; } $fh = $this->_load_font($font); // Determine the additional width due to extra spacing $num_spaces = mb_substr_count($text, " "); $delta = $word_spacing * $num_spaces; if ($letter_spacing) { $num_chars = mb_strlen($text); $delta += $num_chars * $letter_spacing; } return $this->_pdf->stringwidth($text, $fh, $size) + $delta; } public function get_font_height($font, $size) { if ($size == 0) { return 0.0; } $fh = $this->_load_font($font); $this->_pdf->setfont($fh, $size); $asc = $this->_pdf->info_font($fh, "ascender", "fontsize=$size"); $desc = $this->_pdf->info_font($fh, "descender", "fontsize=$size"); // $desc is usually < 0, $ratio = $this->_dompdf->getOptions()->getFontHeightRatio(); return (abs($asc) + abs($desc)) * $ratio; } public function get_font_baseline($font, $size) { $ratio = $this->_dompdf->getOptions()->getFontHeightRatio(); return $this->get_font_height($font, $size) / $ratio * 1.1; } /** * Processes a callback or script on every page. * * The callback function receives the four parameters `int $pageNumber`, * `int $pageCount`, `Canvas $canvas`, and `FontMetrics $fontMetrics`, in * that order. If a script is passed as string, the variables `$PAGE_NUM`, * `$PAGE_COUNT`, `$pdf`, and `$fontMetrics` are available instead. Passing * a script as string is deprecated and will be removed in a future version. * * This function can be used to add page numbers to all pages after the * first one, for example. * * @param callable|string $callback The callback function or PHP script to process on every page */ public function page_script($callback): void { if (is_string($callback)) { $this->processPageScript(function ( int $PAGE_NUM, int $PAGE_COUNT, self $pdf, FontMetrics $fontMetrics ) use ($callback) { eval($callback); }); return; } $this->processPageScript($callback); } public function page_text($x, $y, $text, $font, $size, $color = [0, 0, 0], $word_space = 0.0, $char_space = 0.0, $angle = 0.0) { $this->processPageScript(function (int $pageNumber, int $pageCount) use ($x, $y, $text, $font, $size, $color, $word_space, $char_space, $angle) { $text = str_replace( ["{PAGE_NUM}", "{PAGE_COUNT}"], [$pageNumber, $pageCount], $text ); $this->text($x, $y, $text, $font, $size, $color, $word_space, $char_space, $angle); }); } public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = []) { $this->processPageScript(function () use ($x1, $y1, $x2, $y2, $color, $width, $style) { $this->line($x1, $y1, $x2, $y2, $color, $width, $style); }); } public function new_page() { // Add objects to the current page $this->_place_objects(); $this->_pdf->suspend_page(""); $this->_pdf->begin_page_ext($this->_width, $this->_height, ""); $this->_page_number = ++$this->_page_count; } protected function processPageScript(callable $callback): void { $this->_pdf->suspend_page(""); for ($p = 1; $p <= $this->_page_count; $p++) { $this->_pdf->resume_page("pagenumber=$p"); $fontMetrics = $this->_dompdf->getFontMetrics(); $callback($p, $this->_page_count, $this, $fontMetrics); $this->_pdf->suspend_page(""); } $this->_pdf->resume_page("pagenumber=" . $this->_page_number); } /** * @throws Exception */ public function stream($filename = "document.pdf", $options = []) { if (headers_sent()) { die("Unable to stream pdf: headers already sent"); } if (!isset($options["compress"])) { $options["compress"] = true; } if (!isset($options["Attachment"])) { $options["Attachment"] = true; } if ($options["compress"]) { $this->setPDFLibValue("compress", 6); } else { $this->setPDFLibValue("compress", 0); } $this->_close(); $data = ""; if (self::$IN_MEMORY) { $data = $this->_pdf->get_buffer(); $size = mb_strlen($data, "8bit"); } else { $size = filesize($this->_file); } header("Cache-Control: private"); header("Content-Type: application/pdf"); header("Content-Length: " . $size); $filename = str_replace(["\n", "'"], "", basename($filename, ".pdf")) . ".pdf"; $attachment = $options["Attachment"] ? "attachment" : "inline"; header(Helpers::buildContentDispositionHeader($attachment, $filename)); if (self::$IN_MEMORY) { echo $data; } else { // Chunked readfile() $chunk = (1 << 21); // 2 MB $fh = fopen($this->_file, "rb"); if (!$fh) { throw new Exception("Unable to load temporary PDF file: " . $this->_file); } while (!feof($fh)) { echo fread($fh, $chunk); } fclose($fh); //debugpng if ($this->_dompdf->getOptions()->getDebugPng()) { print '[pdflib stream unlink ' . $this->_file . ']'; } if (!$this->_dompdf->getOptions()->getDebugKeepTemp()) { unlink($this->_file); } $this->_file = null; unset($this->_file); } flush(); } public function output($options = []) { if (!isset($options["compress"])) { $options["compress"] = true; } if ($options["compress"]) { $this->setPDFLibValue("compress", 6); } else { $this->setPDFLibValue("compress", 0); } $this->_close(); if (self::$IN_MEMORY) { $data = $this->_pdf->get_buffer(); } else { $data = file_get_contents($this->_file); //debugpng if ($this->_dompdf->getOptions()->getDebugPng()) { print '[pdflib output unlink ' . $this->_file . ']'; } if (!$this->_dompdf->getOptions()->getDebugKeepTemp()) { unlink($this->_file); } $this->_file = null; unset($this->_file); } return $data; } /** * @param string $keyword * @param string $optlist * @return mixed */ protected function getPDFLibParameter($keyword, $optlist = "") { if ($this->getPDFLibMajorVersion() >= 9) { return $this->_pdf->get_option($keyword, ""); } return $this->_pdf->get_parameter($keyword, $optlist); } /** * @param string $keyword * @param string $value * @return mixed */ protected function setPDFLibParameter($keyword, $value) { if ($this->getPDFLibMajorVersion() >= 9) { return $this->_pdf->set_option($keyword . "=" . $value); } return $this->_pdf->set_parameter($keyword, $value); } /** * @param string $keyword * @param string $optlist * @return mixed */ protected function getPDFLibValue($keyword, $optlist = "") { if ($this->getPDFLibMajorVersion() >= 9) { return $this->getPDFLibParameter($keyword, $optlist); } return $this->_pdf->get_value($keyword); } /** * @param string $keyword * @param string $value * @return mixed */ protected function setPDFLibValue($keyword, $value) { if ($this->getPDFLibMajorVersion() >= 9) { return $this->setPDFLibParameter($keyword, $value); } return $this->_pdf->set_value($keyword, $value); } /** * @return int */ protected function getPDFLibMajorVersion() { if (is_null(self::$MAJOR_VERSION)) { if (method_exists($this->_pdf, "get_option")) { self::$MAJOR_VERSION = abs(intval($this->_pdf->get_option("major", ""))); } else { self::$MAJOR_VERSION = abs(intval($this->_pdf->get_value("major", ""))); } } return self::$MAJOR_VERSION; } } // Workaround for idiotic limitation on statics... PDFLib::$PAPER_SIZES = CPDF::$PAPER_SIZES; PK_set_content(); $style = $this->_frame->get_style(); $table = TableFrameDecorator::find_parent_table($this->_frame); $cellmap = $table->get_cellmap(); list($x, $y) = $cellmap->get_frame_position($this->_frame); $this->_frame->set_position($x, $y); $cells = $cellmap->get_spanned_cells($this->_frame); $w = 0; foreach ($cells["columns"] as $i) { $col = $cellmap->get_column($i); $w += $col["used-width"]; } //FIXME? $h = $this->_frame->get_containing_block("h"); $left_space = (float)$style->length_in_pt([$style->margin_left, $style->padding_left, $style->border_left_width], $w); $right_space = (float)$style->length_in_pt([$style->padding_right, $style->margin_right, $style->border_right_width], $w); $top_space = (float)$style->length_in_pt([$style->margin_top, $style->padding_top, $style->border_top_width], $h); $bottom_space = (float)$style->length_in_pt([$style->margin_bottom, $style->padding_bottom, $style->border_bottom_width], $h); $cb_w = $w - $left_space - $right_space; $style->set_used("width", $cb_w); $content_x = $x + $left_space; $content_y = $line_y = $y + $top_space; // Adjust the first line based on the text-indent property $indent = (float)$style->length_in_pt($style->text_indent, $w); $this->_frame->increase_line_width($indent); $page = $this->_frame->get_root(); // Set the y position of the first line in the cell $line_box = $this->_frame->get_current_line_box(); $line_box->y = $line_y; // Set the containing blocks and reflow each child foreach ($this->_frame->get_children() as $child) { $child->set_containing_block($content_x, $content_y, $cb_w, $h); $this->process_clear($child); $child->reflow($this->_frame); $this->process_float($child, $content_x, $cb_w); if ($page->is_full()) { break; } } // Determine our height $style_height = (float)$style->length_in_pt($style->height, $h); /** @var FrameDecorator\TableCell */ $frame = $this->_frame; $frame->set_content_height($this->_calculate_content_height()); $height = max($style_height, (float)$frame->get_content_height()); // Let the cellmap know our height $cell_height = $height / count($cells["rows"]); if ($style_height <= $height) { $cell_height += $top_space + $bottom_space; } foreach ($cells["rows"] as $i) { $cellmap->set_row_height($i, $cell_height); } $style->set_used("height", $height); $this->_text_align(); $this->vertical_align(); // Handle relative positioning foreach ($this->_frame->get_children() as $child) { $this->position_relative($child); } } public function get_min_max_content_width(): array { // Ignore percentage values for a specified width here, as they are // relative to the table width, which is not determined yet $style = $this->_frame->get_style(); $width = $style->width; $fixed_width = $width !== "auto" && !Helpers::is_percent($width); [$min, $max] = $this->get_min_max_child_width(); // For table cells: Use specified width if it is greater than the // minimum defined by the content if ($fixed_width) { $width = (float) $style->length_in_pt($width, 0); $min = max($width, $min); $max = $min; } // Handle min/max width style properties $min_width = $this->resolve_min_width(null); $max_width = $this->resolve_max_width(null); $min = Helpers::clamp($min, $min_width, $max_width); $max = Helpers::clamp($max, $min_width, $max_width); return [$min, $max]; } } PK_state = null; parent::__construct($frame); } /** * State is held here so it needs to be reset along with the decorator */ public function reset(): void { parent::reset(); $this->_state = null; } protected function _assign_widths() { $style = $this->_frame->get_style(); // Find the min/max width of the table and sort the columns into // absolute/percent/auto arrays $delta = $this->_state["width_delta"]; $min_width = $this->_state["min_width"]; $max_width = $this->_state["max_width"]; $percent_used = $this->_state["percent_used"]; $absolute_used = $this->_state["absolute_used"]; $auto_min = $this->_state["auto_min"]; $absolute =& $this->_state["absolute"]; $percent =& $this->_state["percent"]; $auto =& $this->_state["auto"]; // Determine the actual width of the table (excluding borders and // padding) $cb = $this->_frame->get_containing_block(); $columns =& $this->_frame->get_cellmap()->get_columns(); $width = $style->width; $min_table_width = $this->resolve_min_width($cb["w"]) - $delta; if ($width !== "auto") { $preferred_width = (float) $style->length_in_pt($width, $cb["w"]) - $delta; if ($preferred_width < $min_table_width) { $preferred_width = $min_table_width; } if ($preferred_width > $min_width) { $width = $preferred_width; } else { $width = $min_width; } } else { if ($max_width + $delta < $cb["w"]) { $width = $max_width; } elseif ($cb["w"] - $delta > $min_width) { $width = $cb["w"] - $delta; } else { $width = $min_width; } if ($width < $min_table_width) { $width = $min_table_width; } } // Store our resolved width $style->set_used("width", $width); $cellmap = $this->_frame->get_cellmap(); if ($cellmap->is_columns_locked()) { return; } // If the whole table fits on the page, then assign each column it's max width if ($width == $max_width) { foreach ($columns as $i => $col) { $cellmap->set_column_width($i, $col["max-width"]); } return; } // Determine leftover and assign it evenly to all columns if ($width > $min_width) { // We have three cases to deal with: // // 1. All columns are auto or absolute width. In this case we // distribute extra space across all auto columns weighted by the // difference between their max and min width, or by max width only // if the width of the table is larger than the max width for all // columns. // // 2. Only absolute widths have been specified, no auto columns. In // this case we distribute extra space across all columns weighted // by their absolute width. // // 3. Percentage widths have been specified. In this case we normalize // the percentage values and try to assign widths as fractions of // the table width. Absolute column widths are fully satisfied and // any remaining space is evenly distributed among all auto columns. // Case 1: if ($percent_used == 0 && count($auto)) { foreach ($absolute as $i) { $w = $columns[$i]["min-width"]; $cellmap->set_column_width($i, $w); } if ($width < $max_width) { $increment = $width - $min_width; $table_delta = $max_width - $min_width; foreach ($auto as $i) { $min = $columns[$i]["min-width"]; $max = $columns[$i]["max-width"]; $col_delta = $max - $min; $w = $min + $increment * ($col_delta / $table_delta); $cellmap->set_column_width($i, $w); } } else { $increment = $width - $max_width; $auto_max = $max_width - $absolute_used; foreach ($auto as $i) { $max = $columns[$i]["max-width"]; $f = $auto_max > 0 ? $max / $auto_max : 1 / count($auto); $w = $max + $increment * $f; $cellmap->set_column_width($i, $w); } } return; } // Case 2: if ($percent_used == 0 && !count($auto)) { $increment = $width - $absolute_used; foreach ($absolute as $i) { $abs = $columns[$i]["min-width"]; $f = $absolute_used > 0 ? $abs / $absolute_used : 1 / count($absolute); $w = $abs + $increment * $f; $cellmap->set_column_width($i, $w); } return; } // Case 3: if ($percent_used > 0) { // Scale percent values if the total percentage is > 100 or // there are no auto values to take up slack if ($percent_used > 100 || count($auto) == 0) { $scale = 100 / $percent_used; } else { $scale = 1; } // Account for the minimum space used by the unassigned auto // columns, by the columns with absolute widths, and the // percentage columns following the current one $used_width = $auto_min + $absolute_used; foreach ($absolute as $i) { $w = $columns[$i]["min-width"]; $cellmap->set_column_width($i, $w); } $percent_min = 0; foreach ($percent as $i) { $percent_min += $columns[$i]["min-width"]; } // First-come, first served foreach ($percent as $i) { $min = $columns[$i]["min-width"]; $percent_min -= $min; $slack = $width - $used_width - $percent_min; $columns[$i]["percent"] *= $scale; $w = min($columns[$i]["percent"] * $width / 100, $slack); if ($w < $min) { $w = $min; } $cellmap->set_column_width($i, $w); $used_width += $w; } // This works because $used_width includes the min-width of each // unassigned column if (count($auto) > 0) { $increment = ($width - $used_width) / count($auto); foreach ($auto as $i) { $w = $columns[$i]["min-width"] + $increment; $cellmap->set_column_width($i, $w); } } return; } } else { // We are over-constrained: // Each column gets its minimum width foreach ($columns as $i => $col) { $cellmap->set_column_width($i, $col["min-width"]); } } } /** * Determine the frame's height based on min/max height * * @return float */ protected function _calculate_height() { $frame = $this->_frame; $style = $frame->get_style(); $cb = $frame->get_containing_block(); $height = $style->length_in_pt($style->height, $cb["h"]); $cellmap = $frame->get_cellmap(); $cellmap->assign_frame_heights(); $rows = $cellmap->get_rows(); // Determine our content height $content_height = 0.0; foreach ($rows as $r) { $content_height += $r["height"]; } if ($height === "auto") { $height = $content_height; } // Handle min/max height // https://www.w3.org/TR/CSS21/visudet.html#min-max-heights $min_height = $this->resolve_min_height($cb["h"]); $max_height = $this->resolve_max_height($cb["h"]); $height = Helpers::clamp($height, $min_height, $max_height); // Use the content height or the height value, whichever is greater if ($height <= $content_height) { $height = $content_height; } else { // FIXME: Borders and row positions are not properly updated by this // $cellmap->set_frame_heights($height, $content_height); } return $height; } /** * @param BlockFrameDecorator|null $block */ function reflow(BlockFrameDecorator $block = null) { /** @var TableFrameDecorator */ $frame = $this->_frame; // Check if a page break is forced $page = $frame->get_root(); $page->check_forced_page_break($frame); // Bail if the page is full if ($page->is_full()) { return; } // Let the page know that we're reflowing a table so that splits // are suppressed (simply setting page-break-inside: avoid won't // work because we may have an arbitrary number of block elements // inside tds.) $page->table_reflow_start(); $this->determine_absolute_containing_block(); // Counters and generated content $this->_set_content(); // Collapse vertical margins, if required $this->_collapse_margins(); // Table layout algorithm: // http://www.w3.org/TR/CSS21/tables.html#auto-table-layout if (is_null($this->_state)) { $this->get_min_max_width(); } $cb = $frame->get_containing_block(); $style = $frame->get_style(); // This is slightly inexact, but should be okay. Add half the // border-spacing to the table as padding. The other half is added to // the cells themselves. if ($style->border_collapse === "separate") { [$h, $v] = $style->border_spacing; $v = $v / 2; $h = $h / 2; $style->set_used("padding_left", (float)$style->length_in_pt($style->padding_left, $cb["w"]) + $h); $style->set_used("padding_right", (float)$style->length_in_pt($style->padding_right, $cb["w"]) + $h); $style->set_used("padding_top", (float)$style->length_in_pt($style->padding_top, $cb["w"]) + $v); $style->set_used("padding_bottom", (float)$style->length_in_pt($style->padding_bottom, $cb["w"]) + $v); } $this->_assign_widths(); // Adjust left & right margins, if they are auto $delta = $this->_state["width_delta"]; $width = $style->width; $left = $style->length_in_pt($style->margin_left, $cb["w"]); $right = $style->length_in_pt($style->margin_right, $cb["w"]); $diff = (float) $cb["w"] - (float) $width - $delta; if ($left === "auto" && $right === "auto") { if ($diff < 0) { $left = 0; $right = $diff; } else { $left = $right = $diff / 2; } } else { if ($left === "auto") { $left = max($diff - $right, 0); } if ($right === "auto") { $right = max($diff - $left, 0); } } $style->set_used("margin_left", $left); $style->set_used("margin_right", $right); $frame->position(); [$x, $y] = $frame->get_position(); // Determine the content edge $offset_x = (float)$left + (float)$style->length_in_pt([ $style->padding_left, $style->border_left_width ], $cb["w"]); $offset_y = (float)$style->length_in_pt([ $style->margin_top, $style->border_top_width, $style->padding_top ], $cb["w"]); $content_x = $x + $offset_x; $content_y = $y + $offset_y; if (isset($cb["h"])) { $h = $cb["h"]; } else { $h = null; } $cellmap = $frame->get_cellmap(); $col =& $cellmap->get_column(0); $col["x"] = $offset_x; $row =& $cellmap->get_row(0); $row["y"] = $offset_y; $cellmap->assign_x_positions(); // Set the containing block of each child & reflow foreach ($frame->get_children() as $child) { $child->set_containing_block($content_x, $content_y, $width, $h); $child->reflow(); if (!$page->in_nested_table()) { // Check if a split has occurred $page->check_page_break($child); if ($page->is_full()) { break; } } } // Stop reflow if a page break has occurred before the frame, in which // case it has been reset, including its position if ($page->is_full() && $frame->get_position("x") === null) { $page->table_reflow_end(); return; } // Assign heights to our cells: $style->set_used("height", $this->_calculate_height()); $page->table_reflow_end(); if ($block && $frame->is_in_flow()) { $block->add_frame_to_line($frame); if ($frame->is_block_level()) { $block->add_line(); } } } public function get_min_max_width(): array { if (!is_null($this->_min_max_cache)) { return $this->_min_max_cache; } $style = $this->_frame->get_style(); $cellmap = $this->_frame->get_cellmap(); $this->_frame->normalize(); // Add the cells to the cellmap (this will calculate column widths as // frames are added) $cellmap->add_frame($this->_frame); // Find the min/max width of the table and sort the columns into // absolute/percent/auto arrays $this->_state = []; $this->_state["min_width"] = 0; $this->_state["max_width"] = 0; $this->_state["percent_used"] = 0; $this->_state["absolute_used"] = 0; $this->_state["auto_min"] = 0; $this->_state["absolute"] = []; $this->_state["percent"] = []; $this->_state["auto"] = []; $columns =& $cellmap->get_columns(); foreach ($columns as $i => $col) { $this->_state["min_width"] += $col["min-width"]; $this->_state["max_width"] += $col["max-width"]; if ($col["absolute"] > 0) { $this->_state["absolute"][] = $i; $this->_state["absolute_used"] += $col["min-width"]; } elseif ($col["percent"] > 0) { $this->_state["percent"][] = $i; $this->_state["percent_used"] += $col["percent"]; } else { $this->_state["auto"][] = $i; $this->_state["auto_min"] += $col["min-width"]; } } // Account for margins, borders, padding, and border spacing $cb_w = $this->_frame->get_containing_block("w"); $lm = (float) $style->length_in_pt($style->margin_left, $cb_w); $rm = (float) $style->length_in_pt($style->margin_right, $cb_w); $dims = [ $style->border_left_width, $style->border_right_width, $style->padding_left, $style->padding_right ]; if ($style->border_collapse !== "collapse") { list($dims[]) = $style->border_spacing; } $delta = (float) $style->length_in_pt($dims, $cb_w); $this->_state["width_delta"] = $delta; $min_width = $this->_state["min_width"] + $delta + $lm + $rm; $max_width = $this->_state["max_width"] + $delta + $lm + $rm; return $this->_min_max_cache = [ $min_width, $max_width, "min" => $min_width, "max" => $max_width ]; } } PK_frame; $style = $frame->get_style(); $absolute = $frame->is_absolute(); $cb = $frame->get_containing_block(); $w = $cb["w"]; $rm = $style->length_in_pt($style->margin_right, $w); $lm = $style->length_in_pt($style->margin_left, $w); $left = $style->length_in_pt($style->left, $w); $right = $style->length_in_pt($style->right, $w); // Handle 'auto' values $dims = [$style->border_left_width, $style->border_right_width, $style->padding_left, $style->padding_right, $width !== "auto" ? $width : 0, $rm !== "auto" ? $rm : 0, $lm !== "auto" ? $lm : 0]; // absolutely positioned boxes take the 'left' and 'right' properties into account if ($absolute) { $dims[] = $left !== "auto" ? $left : 0; $dims[] = $right !== "auto" ? $right : 0; } $sum = (float)$style->length_in_pt($dims, $w); // Compare to the containing block $diff = $w - $sum; if ($absolute) { // Absolutely positioned // http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width if ($width === "auto" || $left === "auto" || $right === "auto") { // "all of the three are 'auto'" logic + otherwise case if ($lm === "auto") { $lm = 0; } if ($rm === "auto") { $rm = 0; } $block_parent = $frame->find_block_parent(); $parent_content = $block_parent->get_content_box(); $line = $block_parent->get_current_line_box(); // TODO: This is the in-flow inline position. Use the in-flow // block position if the original display type is block-level $inflow_x = $parent_content["x"] - $cb["x"] + $line->left + $line->w; if ($width === "auto" && $left === "auto" && $right === "auto") { // rule 3, per instruction preceding rule set // shrink-to-fit width $left = $inflow_x; [$min, $max] = $this->get_min_max_child_width(); $width = min(max($min, $diff - $left), $max); $right = $diff - $left - $width; } elseif ($width === "auto" && $left === "auto") { // rule 1 // shrink-to-fit width [$min, $max] = $this->get_min_max_child_width(); $width = min(max($min, $diff), $max); $left = $diff - $width; } elseif ($width === "auto" && $right === "auto") { // rule 3 // shrink-to-fit width [$min, $max] = $this->get_min_max_child_width(); $width = min(max($min, $diff), $max); $right = $diff - $width; } elseif ($left === "auto" && $right === "auto") { // rule 2 $left = $inflow_x; $right = $diff - $left; } elseif ($left === "auto") { // rule 4 $left = $diff; } elseif ($width === "auto") { // rule 5 $width = max($diff, 0); } else { // $right === "auto" // rule 6 $right = $diff; } } else { // "none of the three are 'auto'" logic described in paragraph preceding the rules if ($diff >= 0) { if ($lm === "auto" && $rm === "auto") { $lm = $rm = $diff / 2; } elseif ($lm === "auto") { $lm = $diff; } elseif ($rm === "auto") { $rm = $diff; } } else { // over-constrained, solve for right $right = $right + $diff; if ($lm === "auto") { $lm = 0; } if ($rm === "auto") { $rm = 0; } } } } elseif ($style->float !== "none" || $style->display === "inline-block") { // Shrink-to-fit width for float and inline block // https://www.w3.org/TR/CSS21/visudet.html#float-width // https://www.w3.org/TR/CSS21/visudet.html#inlineblock-width if ($width === "auto") { [$min, $max] = $this->get_min_max_child_width(); $width = min(max($min, $diff), $max); } if ($lm === "auto") { $lm = 0; } if ($rm === "auto") { $rm = 0; } } else { // Block-level, normal flow // https://www.w3.org/TR/CSS21/visudet.html#blockwidth if ($diff >= 0) { // Find auto properties and get them to take up the slack if ($width === "auto") { $width = $diff; if ($lm === "auto") { $lm = 0; } if ($rm === "auto") { $rm = 0; } } elseif ($lm === "auto" && $rm === "auto") { $lm = $rm = $diff / 2; } elseif ($lm === "auto") { $lm = $diff; } elseif ($rm === "auto") { $rm = $diff; } } else { // We are over constrained--set margin-right to the difference $rm = (float) $rm + $diff; if ($width === "auto") { $width = 0; } if ($lm === "auto") { $lm = 0; } } } return [ "width" => $width, "margin_left" => $lm, "margin_right" => $rm, "left" => $left, "right" => $right, ]; } /** * Call the above function, but resolve max/min widths * * @throws Exception * @return array */ protected function _calculate_restricted_width() { $frame = $this->_frame; $style = $frame->get_style(); $cb = $frame->get_containing_block(); if (!isset($cb["w"])) { throw new Exception("Box property calculation requires containing block width"); } $width = $style->length_in_pt($style->width, $cb["w"]); $values = $this->_calculate_width($width); $margin_left = $values["margin_left"]; $margin_right = $values["margin_right"]; $width = $values["width"]; $left = $values["left"]; $right = $values["right"]; // Handle min/max width // https://www.w3.org/TR/CSS21/visudet.html#min-max-widths $min_width = $this->resolve_min_width($cb["w"]); $max_width = $this->resolve_max_width($cb["w"]); if ($width > $max_width) { $values = $this->_calculate_width($max_width); $margin_left = $values["margin_left"]; $margin_right = $values["margin_right"]; $width = $values["width"]; $left = $values["left"]; $right = $values["right"]; } if ($width < $min_width) { $values = $this->_calculate_width($min_width); $margin_left = $values["margin_left"]; $margin_right = $values["margin_right"]; $width = $values["width"]; $left = $values["left"]; $right = $values["right"]; } return [$width, $margin_left, $margin_right, $left, $right]; } /** * Determine the unrestricted height of content within the block * not by adding each line's height, but by getting the last line's position. * This because lines could have been pushed lower by a clearing element. * * @return float */ protected function _calculate_content_height() { $height = 0; $lines = $this->_frame->get_line_boxes(); if (count($lines) > 0) { $last_line = end($lines); $content_box = $this->_frame->get_content_box(); $height = $last_line->y + $last_line->h - $content_box["y"]; } return $height; } /** * Determine the frame's restricted height * * @return array */ protected function _calculate_restricted_height() { $frame = $this->_frame; $style = $frame->get_style(); $content_height = $this->_calculate_content_height(); $cb = $frame->get_containing_block(); $height = $style->length_in_pt($style->height, $cb["h"]); $margin_top = $style->length_in_pt($style->margin_top, $cb["w"]); $margin_bottom = $style->length_in_pt($style->margin_bottom, $cb["w"]); $top = $style->length_in_pt($style->top, $cb["h"]); $bottom = $style->length_in_pt($style->bottom, $cb["h"]); if ($frame->is_absolute()) { // Absolutely positioned // http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height $h_dims = [ $top !== "auto" ? $top : 0, $height !== "auto" ? $height : 0, $bottom !== "auto" ? $bottom : 0 ]; $w_dims = [ $style->margin_top !== "auto" ? $style->margin_top : 0, $style->padding_top, $style->border_top_width, $style->border_bottom_width, $style->padding_bottom, $style->margin_bottom !== "auto" ? $style->margin_bottom : 0 ]; $sum = (float)$style->length_in_pt($h_dims, $cb["h"]) + (float)$style->length_in_pt($w_dims, $cb["w"]); $diff = $cb["h"] - $sum; if ($height === "auto" || $top === "auto" || $bottom === "auto") { // "all of the three are 'auto'" logic + otherwise case if ($margin_top === "auto") { $margin_top = 0; } if ($margin_bottom === "auto") { $margin_bottom = 0; } $block_parent = $frame->find_block_parent(); $current_line = $block_parent->get_current_line_box(); // TODO: This is the in-flow inline position. Use the in-flow // block position if the original display type is block-level $inflow_y = $current_line->y - $cb["y"]; if ($height === "auto" && $top === "auto" && $bottom === "auto") { // rule 3, per instruction preceding rule set $top = $inflow_y; $height = $content_height; $bottom = $diff - $top - $height; } elseif ($height === "auto" && $top === "auto") { // rule 1 $height = $content_height; $top = $diff - $height; } elseif ($height === "auto" && $bottom === "auto") { // rule 3 $height = $content_height; $bottom = $diff - $height; } elseif ($top === "auto" && $bottom === "auto") { // rule 2 $top = $inflow_y; $bottom = $diff - $top; } elseif ($top === "auto") { // rule 4 $top = $diff; } elseif ($height === "auto") { // rule 5 $height = max($diff, 0); } else { // $bottom === "auto" // rule 6 $bottom = $diff; } } else { // "none of the three are 'auto'" logic described in paragraph preceding the rules if ($diff >= 0) { if ($margin_top === "auto" && $margin_bottom === "auto") { $margin_top = $margin_bottom = $diff / 2; } elseif ($margin_top === "auto") { $margin_top = $diff; } elseif ($margin_bottom === "auto") { $margin_bottom = $diff; } } else { // over-constrained, solve for bottom $bottom = $bottom + $diff; if ($margin_top === "auto") { $margin_top = 0; } if ($margin_bottom === "auto") { $margin_bottom = 0; } } } } else { // https://www.w3.org/TR/CSS21/visudet.html#normal-block // https://www.w3.org/TR/CSS21/visudet.html#block-root-margin if ($height === "auto") { $height = $content_height; } if ($margin_top === "auto") { $margin_top = 0; } if ($margin_bottom === "auto") { $margin_bottom = 0; } // Handle min/max height // https://www.w3.org/TR/CSS21/visudet.html#min-max-heights $min_height = $this->resolve_min_height($cb["h"]); $max_height = $this->resolve_max_height($cb["h"]); $height = Helpers::clamp($height, $min_height, $max_height); } // TODO: Need to also take min/max height into account for absolute // positioning, using similar logic to the `_calculate_width`/ // `calculate_restricted_width` split above. The non-absolute case // can simply clamp height within min/max, as margins and offsets are // not affected return [$height, $margin_top, $margin_bottom, $top, $bottom]; } /** * Adjust the justification of each of our lines. * http://www.w3.org/TR/CSS21/text.html#propdef-text-align */ protected function _text_align() { $style = $this->_frame->get_style(); $w = $this->_frame->get_containing_block("w"); $width = (float)$style->length_in_pt($style->width, $w); $text_indent = (float)$style->length_in_pt($style->text_indent, $w); switch ($style->text_align) { default: case "left": foreach ($this->_frame->get_line_boxes() as $line) { if (!$line->inline) { continue; } $line->trim_trailing_ws(); if ($line->left) { foreach ($line->frames_to_align() as $frame) { $frame->move($line->left, 0); } } } break; case "right": foreach ($this->_frame->get_line_boxes() as $i => $line) { if (!$line->inline) { continue; } $line->trim_trailing_ws(); $indent = $i === 0 ? $text_indent : 0; $dx = $width - $line->w - $line->right - $indent; foreach ($line->frames_to_align() as $frame) { $frame->move($dx, 0); } } break; case "justify": // We justify all lines except the last one, unless the frame // has been split, in which case the actual last line is part of // the split-off frame $lines = $this->_frame->get_line_boxes(); $last_line_index = $this->_frame->is_split ? null : count($lines) - 1; foreach ($lines as $i => $line) { if (!$line->inline) { continue; } $line->trim_trailing_ws(); if ($line->left) { foreach ($line->frames_to_align() as $frame) { $frame->move($line->left, 0); } } if ($line->br || $i === $last_line_index) { continue; } $frames = $line->get_frames(); $other_frame_count = 0; foreach ($frames as $frame) { if (!($frame instanceof TextFrameDecorator)) { $other_frame_count++; } } $word_count = $line->wc + $other_frame_count; // Set the spacing for each child if ($word_count > 1) { $indent = $i === 0 ? $text_indent : 0; $spacing = ($width - $line->get_width() - $indent) / ($word_count - 1); } else { $spacing = 0; } $dx = 0; foreach ($frames as $frame) { if ($frame instanceof TextFrameDecorator) { $text = $frame->get_text(); $spaces = mb_substr_count($text, " "); $frame->move($dx, 0); $frame->set_text_spacing($spacing); $dx += $spaces * $spacing; } else { $frame->move($dx, 0); } } // The line (should) now occupy the entire width $line->w = $width; } break; case "center": case "centre": foreach ($this->_frame->get_line_boxes() as $i => $line) { if (!$line->inline) { continue; } $line->trim_trailing_ws(); $indent = $i === 0 ? $text_indent : 0; $dx = ($width + $line->left - $line->w - $line->right - $indent) / 2; foreach ($line->frames_to_align() as $frame) { $frame->move($dx, 0); } } break; } } /** * Align inline children vertically. * Aligns each child vertically after each line is reflowed */ function vertical_align() { $fontMetrics = $this->get_dompdf()->getFontMetrics(); foreach ($this->_frame->get_line_boxes() as $line) { $height = $line->h; // Move all markers to the top of the line box foreach ($line->get_list_markers() as $marker) { $x = $marker->get_position("x"); $marker->set_position($x, $line->y); } foreach ($line->frames_to_align() as $frame) { $style = $frame->get_style(); $isInlineBlock = $style->display !== "inline" && $style->display !== "-dompdf-list-bullet"; $baseline = $fontMetrics->getFontBaseline($style->font_family, $style->font_size); $y_offset = 0; //FIXME: The 0.8 ratio applied to the height is arbitrary (used to accommodate descenders?) if ($isInlineBlock) { // Workaround: Skip vertical alignment if the frame is the // only one one the line, excluding empty text frames, which // may be the result of trailing white space // FIXME: This special case should be removed once vertical // alignment is properly fixed $skip = true; foreach ($line->get_frames() as $other) { if ($other !== $frame && !($other->is_text_node() && $other->get_node()->nodeValue === "") ) { $skip = false; break; } } if ($skip) { continue; } $marginHeight = $frame->get_margin_height(); $imageHeightDiff = $height * 0.8 - $marginHeight; $align = $frame->get_style()->vertical_align; if (in_array($align, Style::VERTICAL_ALIGN_KEYWORDS, true)) { switch ($align) { case "middle": $y_offset = $imageHeightDiff / 2; break; case "sub": $y_offset = 0.3 * $height + $imageHeightDiff; break; case "super": $y_offset = -0.2 * $height + $imageHeightDiff; break; case "text-top": // FIXME: this should be the height of the frame minus the height of the text $y_offset = $height - $style->line_height; break; case "top": break; case "text-bottom": // FIXME: align bottom of image with the descender? case "bottom": $y_offset = 0.3 * $height + $imageHeightDiff; break; case "baseline": default: $y_offset = $imageHeightDiff; break; } } else { $y_offset = $baseline - (float)$style->length_in_pt($align, $style->font_size) - $marginHeight; } } else { $parent = $frame->get_parent(); if ($parent instanceof TableCellFrameDecorator) { $align = "baseline"; } else { $align = $parent->get_style()->vertical_align; } if (in_array($align, Style::VERTICAL_ALIGN_KEYWORDS, true)) { switch ($align) { case "middle": $y_offset = ($height * 0.8 - $baseline) / 2; break; case "sub": $y_offset = $height * 0.8 - $baseline * 0.5; break; case "super": $y_offset = $height * 0.8 - $baseline * 1.4; break; case "text-top": case "top": // Not strictly accurate, but good enough for now break; case "text-bottom": case "bottom": $y_offset = $height * 0.8 - $baseline; break; case "baseline": default: $y_offset = $height * 0.8 - $baseline; break; } } else { $y_offset = $height * 0.8 - $baseline - (float)$style->length_in_pt($align, $style->font_size); } } if ($y_offset !== 0) { $frame->move(0, $y_offset); } } } } /** * @param AbstractFrameDecorator $child */ function process_clear(AbstractFrameDecorator $child) { $child_style = $child->get_style(); $root = $this->_frame->get_root(); // Handle "clear" if ($child_style->clear !== "none") { //TODO: this is a WIP for handling clear/float frames that are in between inline frames if ($child->get_prev_sibling() !== null) { $this->_frame->add_line(); } if ($child_style->float !== "none" && $child->get_next_sibling()) { $this->_frame->set_current_line_number($this->_frame->get_current_line_number() - 1); } $lowest_y = $root->get_lowest_float_offset($child); // If a float is still applying, we handle it if ($lowest_y) { if ($child->is_in_flow()) { $line_box = $this->_frame->get_current_line_box(); $line_box->y = $lowest_y + $child->get_margin_height(); $line_box->left = 0; $line_box->right = 0; } $child->move(0, $lowest_y - $child->get_position("y")); } } } /** * @param AbstractFrameDecorator $child * @param float $cb_x * @param float $cb_w */ function process_float(AbstractFrameDecorator $child, $cb_x, $cb_w) { $child_style = $child->get_style(); $root = $this->_frame->get_root(); // Handle "float" if ($child_style->float !== "none") { $root->add_floating_frame($child); // Remove next frame's beginning whitespace $next = $child->get_next_sibling(); if ($next && $next instanceof TextFrameDecorator) { $next->set_text(ltrim($next->get_text())); } $line_box = $this->_frame->get_current_line_box(); list($old_x, $old_y) = $child->get_position(); $float_x = $cb_x; $float_y = $old_y; $float_w = $child->get_margin_width(); if ($child_style->clear === "none") { switch ($child_style->float) { case "left": $float_x += $line_box->left; break; case "right": $float_x += ($cb_w - $line_box->right - $float_w); break; } } else { if ($child_style->float === "right") { $float_x += ($cb_w - $float_w); } } if ($cb_w < $float_x + $float_w - $old_x) { // TODO handle when floating elements don't fit } $line_box->get_float_offsets(); if ($child->_float_next_line) { $float_y += $line_box->h; } $child->set_position($float_x, $float_y); $child->move($float_x - $old_x, $float_y - $old_y, true); } } /** * @param BlockFrameDecorator $block */ function reflow(BlockFrameDecorator $block = null) { // Check if a page break is forced $page = $this->_frame->get_root(); $page->check_forced_page_break($this->_frame); // Bail if the page is full if ($page->is_full()) { return; } $this->determine_absolute_containing_block(); // Counters and generated content $this->_set_content(); // Inherit any dangling list markers if ($block && $this->_frame->is_in_flow()) { $this->_frame->inherit_dangling_markers($block); } // Collapse margins if required $this->_collapse_margins(); $style = $this->_frame->get_style(); $cb = $this->_frame->get_containing_block(); // Determine the constraints imposed by this frame: calculate the width // of the content area: [$width, $margin_left, $margin_right, $left, $right] = $this->_calculate_restricted_width(); // Store the calculated properties $style->set_used("width", $width); $style->set_used("margin_left", $margin_left); $style->set_used("margin_right", $margin_right); $style->set_used("left", $left); $style->set_used("right", $right); $margin_top = $style->length_in_pt($style->margin_top, $cb["w"]); $margin_bottom = $style->length_in_pt($style->margin_bottom, $cb["w"]); $auto_top = $style->top === "auto"; $auto_margin_top = $margin_top === "auto"; // Update the position $this->_frame->position(); [$x, $y] = $this->_frame->get_position(); // Adjust the first line based on the text-indent property $indent = (float)$style->length_in_pt($style->text_indent, $cb["w"]); $this->_frame->increase_line_width($indent); // Determine the content edge $top = (float)$style->length_in_pt([ $margin_top !== "auto" ? $margin_top : 0, $style->border_top_width, $style->padding_top ], $cb["w"]); $bottom = (float)$style->length_in_pt([ $margin_bottom !== "auto" ? $margin_bottom : 0, $style->border_bottom_width, $style->padding_bottom ], $cb["w"]); $cb_x = $x + (float)$margin_left + (float)$style->length_in_pt([$style->border_left_width, $style->padding_left], $cb["w"]); $cb_y = $y + $top; $height = $style->length_in_pt($style->height, $cb["h"]); if ($height === "auto") { $height = ($cb["h"] + $cb["y"]) - $bottom - $cb_y; } // Set the y position of the first line in this block $line_box = $this->_frame->get_current_line_box(); $line_box->y = $cb_y; $line_box->get_float_offsets(); // Set the containing blocks and reflow each child foreach ($this->_frame->get_children() as $child) { $child->set_containing_block($cb_x, $cb_y, $width, $height); $this->process_clear($child); $child->reflow($this->_frame); // Check for a page break before the child $page->check_page_break($child); // Don't add the child to the line if a page break has occurred // before it (possibly via a descendant), in which case it has been // reset, including its position if ($page->is_full() && $child->get_position("x") === null) { break; } $this->process_float($child, $cb_x, $width); } // Stop reflow if a page break has occurred before the frame, in which // case it has been reset, including its position if ($page->is_full() && $this->_frame->get_position("x") === null) { return; } // Determine our height [$height, $margin_top, $margin_bottom, $top, $bottom] = $this->_calculate_restricted_height(); $style->set_used("height", $height); $style->set_used("margin_top", $margin_top); $style->set_used("margin_bottom", $margin_bottom); $style->set_used("top", $top); $style->set_used("bottom", $bottom); if ($this->_frame->is_absolute()) { if ($auto_top) { $this->_frame->move(0, $top); } if ($auto_margin_top) { $this->_frame->move(0, $margin_top, true); } } $this->_text_align(); $this->vertical_align(); // Handle relative positioning foreach ($this->_frame->get_children() as $child) { $this->position_relative($child); } if ($block && $this->_frame->is_in_flow()) { $block->add_frame_to_line($this->_frame); if ($this->_frame->is_block_level()) { $block->add_line(); } } } public function get_min_max_content_width(): array { // TODO: While the containing block is not set yet on the frame, it can // already be determined in some cases due to fixed dimensions on the // ancestor forming the containing block. In such cases, percentage // values could be resolved here $style = $this->_frame->get_style(); $width = $style->width; $fixed_width = $width !== "auto" && !Helpers::is_percent($width); // If the frame has a specified width, then we don't need to check // its children if ($fixed_width) { $min = (float) $style->length_in_pt($width, 0); $max = $min; } else { [$min, $max] = $this->get_min_max_child_width(); } // Handle min/max width style properties $min_width = $this->resolve_min_width(null); $max_width = $this->resolve_max_width(null); $min = Helpers::clamp($min, $min_width, $max_width); $max = Helpers::clamp($max, $min_width, $max_width); return [$min, $max]; } } PK_frame; $style = $frame->get_style(); $style->set_used("width", $frame->get_width()); $frame->position(); if ($style->list_style_position === "inside") { $block->add_frame_to_line($frame); } else { $block->add_dangling_marker($frame); } } } PKget_style(); $page_styles = $style->get_stylesheet()->get_page_styles(); // http://www.w3.org/TR/CSS21/page.html#page-selectors if (count($page_styles) > 1) { $odd = $page_number % 2 == 1; $first = $page_number == 1; $style = clone $page_styles["base"]; // FIXME RTL if ($odd && isset($page_styles[":right"])) { $style->merge($page_styles[":right"]); } if ($odd && isset($page_styles[":odd"])) { $style->merge($page_styles[":odd"]); } // FIXME RTL if (!$odd && isset($page_styles[":left"])) { $style->merge($page_styles[":left"]); } if (!$odd && isset($page_styles[":even"])) { $style->merge($page_styles[":even"]); } if ($first && isset($page_styles[":first"])) { $style->merge($page_styles[":first"]); } $frame->set_style($style); } $frame->calculate_bottom_page_edge(); } /** * Paged layout: * http://www.w3.org/TR/CSS21/page.html * * @param BlockFrameDecorator|null $block */ function reflow(BlockFrameDecorator $block = null) { /** @var PageFrameDecorator $frame */ $frame = $this->_frame; $child = $frame->get_first_child(); $fixed_children = []; $prev_child = null; $current_page = 0; while ($child) { $this->apply_page_style($frame, $current_page + 1); $style = $frame->get_style(); // Pages are only concerned with margins $cb = $frame->get_containing_block(); $left = (float)$style->length_in_pt($style->margin_left, $cb["w"]); $right = (float)$style->length_in_pt($style->margin_right, $cb["w"]); $top = (float)$style->length_in_pt($style->margin_top, $cb["h"]); $bottom = (float)$style->length_in_pt($style->margin_bottom, $cb["h"]); $content_x = $cb["x"] + $left; $content_y = $cb["y"] + $top; $content_width = $cb["w"] - $left - $right; $content_height = $cb["h"] - $top - $bottom; // Only if it's the first page, we save the nodes with a fixed position if ($current_page == 0) { foreach ($child->get_children() as $onechild) { if ($onechild->get_style()->position === "fixed") { $fixed_children[] = $onechild->deep_copy(); } } $fixed_children = array_reverse($fixed_children); } $child->set_containing_block($content_x, $content_y, $content_width, $content_height); // Check for begin reflow callback $this->_check_callbacks("begin_page_reflow", $child); //Insert a copy of each node which have a fixed position if ($current_page >= 1) { foreach ($fixed_children as $fixed_child) { $child->insert_child_before($fixed_child->deep_copy(), $child->get_first_child()); } } $child->reflow(); $next_child = $child->get_next_sibling(); // Check for begin render callback $this->_check_callbacks("begin_page_render", $child); // Render the page $frame->get_renderer()->render($child); // Check for end render callback $this->_check_callbacks("end_page_render", $child); if ($next_child) { $frame->next_page(); } // Wait to dispose of all frames on the previous page // so callback will have access to them if ($prev_child) { $prev_child->dispose(true); } $prev_child = $child; $child = $next_child; $current_page++; } // Dispose of previous page if it still exists if ($prev_child) { $prev_child->dispose(true); } } /** * Check for callbacks that need to be performed when a given event * gets triggered on a page * * @param string $event The type of event * @param Frame $frame The frame that event is triggered on */ protected function _check_callbacks(string $event, Frame $frame): void { if (!isset($this->_callbacks)) { $dompdf = $this->get_dompdf(); $this->_callbacks = $dompdf->getCallbacks(); $this->_canvas = $dompdf->getCanvas(); } if (isset($this->_callbacks[$event])) { $fs = $this->_callbacks[$event]; $canvas = $this->_canvas; $fontMetrics = $this->get_dompdf()->getFontMetrics(); foreach ($fs as $f) { $f($frame, $canvas, $fontMetrics); } } } } PK_frame; $page = $frame->get_root(); // Counters and generated content $this->_set_content(); $style = $frame->get_style(); $cb = $frame->get_containing_block(); foreach ($frame->get_children() as $child) { $child->set_containing_block($cb["x"], $cb["y"], $cb["w"], $cb["h"]); $child->reflow(); // Check if a split has occurred $page->check_page_break($child); if ($page->is_full()) { break; } } $table = TableFrameDecorator::find_parent_table($frame); $cellmap = $table->get_cellmap(); // Stop reflow if a page break has occurred before the frame, in which // case it is not part of its parent table's cell map yet if ($page->is_full() && !$cellmap->frame_exists_in_cellmap($frame)) { return; } $style->set_used("width", $cellmap->get_frame_width($frame)); $style->set_used("height", $cellmap->get_frame_height($frame)); $frame->set_position($cellmap->get_frame_position($frame)); } } PK_frame; // Check if a page break is forced $page = $frame->get_root(); $page->check_forced_page_break($frame); // Bail if the page is full if ($page->is_full()) { return; } // Counters and generated content $this->_set_content(); $this->_frame->position(); $style = $this->_frame->get_style(); $cb = $this->_frame->get_containing_block(); foreach ($this->_frame->get_children() as $child) { $child->set_containing_block($cb); $child->reflow(); if ($page->is_full()) { break; } } if ($page->is_full()) { return; } $table = TableFrameDecorator::find_parent_table($this->_frame); $cellmap = $table->get_cellmap(); $style->set_used("width", $cellmap->get_frame_width($this->_frame)); $style->set_used("height", $cellmap->get_frame_height($this->_frame)); $this->_frame->set_position($cellmap->get_frame_position($this->_frame)); } /** * @throws Exception */ public function get_min_max_width(): array { throw new Exception("Min/max width is undefined for table rows"); } } PK_frame; $style = $frame->get_style(); // Resolve width, so the margin width can be checked $style->set_used("width", 0.0); $cb = $frame->get_containing_block(); $line = $block->get_current_line_box(); $width = $frame->get_margin_width(); if ($width > ($cb["w"] - $line->left - $line->w - $line->right)) { $block->add_line(); // Find the appropriate inline ancestor to split $child = $frame; $p = $child->get_parent(); while ($p instanceof InlineFrameDecorator && !$child->get_prev_sibling()) { $child = $p; $p = $p->get_parent(); } if ($p instanceof InlineFrameDecorator) { // Split parent and stop current reflow. Reflow continues // via child-reflow loop of split parent $p->split($child); return; } } $frame->position(); $block->add_frame_to_line($frame); } /** * @param BlockFrameDecorator|null $block */ function reflow(BlockFrameDecorator $block = null) { /** @var InlineFrameDecorator */ $frame = $this->_frame; // Check if a page break is forced $page = $frame->get_root(); $page->check_forced_page_break($frame); if ($page->is_full()) { return; } // Counters and generated content $this->_set_content(); $style = $frame->get_style(); // Resolve auto margins // https://www.w3.org/TR/CSS21/visudet.html#inline-width // https://www.w3.org/TR/CSS21/visudet.html#inline-non-replaced if ($style->margin_left === "auto") { $style->set_used("margin_left", 0.0); } if ($style->margin_right === "auto") { $style->set_used("margin_right", 0.0); } if ($style->margin_top === "auto") { $style->set_used("margin_top", 0.0); } if ($style->margin_bottom === "auto") { $style->set_used("margin_bottom", 0.0); } // Handle line breaks if ($frame->get_node()->nodeName === "br") { if ($block) { $line = $block->get_current_line_box(); $frame->set_containing_line($line); $block->maximize_line_height($frame->get_margin_height(), $frame); $block->add_line(true); $next = $frame->get_next_sibling(); $p = $frame->get_parent(); if ($next && $p instanceof InlineFrameDecorator) { $p->split($next); } } return; } // Handle empty inline frames if (!$frame->get_first_child()) { if ($block) { $this->reflow_empty($block); } return; } // Add our margin, padding & border to the first and last children if (($f = $frame->get_first_child()) && $f instanceof TextFrameDecorator) { $f_style = $f->get_style(); $f_style->margin_left = $style->margin_left; $f_style->padding_left = $style->padding_left; $f_style->border_left_width = $style->border_left_width; $f_style->border_left_style = $style->border_left_style; $f_style->border_left_color = $style->border_left_color; } if (($l = $frame->get_last_child()) && $l instanceof TextFrameDecorator) { $l_style = $l->get_style(); $l_style->margin_right = $style->margin_right; $l_style->padding_right = $style->padding_right; $l_style->border_right_width = $style->border_right_width; $l_style->border_right_style = $style->border_right_style; $l_style->border_right_color = $style->border_right_color; } $cb = $frame->get_containing_block(); // Set the containing blocks and reflow each child. The containing // block is not changed by line boxes. foreach ($frame->get_children() as $child) { $child->set_containing_block($cb); $child->reflow($block); // Stop reflow if the frame has been reset by a line or page break // due to child reflow if (!$frame->content_set) { return; } } if (!$frame->get_first_child()) { return; } // Assume the position of the first child [$x, $y] = $frame->get_first_child()->get_position(); $frame->set_position($x, $y); // Handle relative positioning foreach ($frame->get_children() as $child) { $this->position_relative($child); } if ($block) { $block->add_frame_to_line($frame); } } } PK_frame = $frame; $this->_min_max_child_cache = null; $this->_min_max_cache = null; } /** * @return Dompdf */ function get_dompdf() { return $this->_frame->get_dompdf(); } public function reset(): void { $this->_min_max_child_cache = null; $this->_min_max_cache = null; } /** * Determine the actual containing block for absolute and fixed position. * * https://www.w3.org/TR/CSS21/visudet.html#containing-block-details */ protected function determine_absolute_containing_block(): void { $frame = $this->_frame; $style = $frame->get_style(); switch ($style->position) { case "absolute": $parent = $frame->find_positioned_parent(); if ($parent !== $frame->get_root()) { $parent_style = $parent->get_style(); $parent_padding_box = $parent->get_padding_box(); //FIXME: an accurate measure of the positioned parent height // is not possible until reflow has completed; // we'll fall back to the parent's containing block, // which is wrong for auto-height parents if ($parent_style->height === "auto") { $parent_containing_block = $parent->get_containing_block(); $containing_block_height = $parent_containing_block["h"] - (float)$parent_style->length_in_pt([ $parent_style->margin_top, $parent_style->margin_bottom, $parent_style->border_top_width, $parent_style->border_bottom_width ], $parent_containing_block["w"]); } else { $containing_block_height = $parent_padding_box["h"]; } $frame->set_containing_block($parent_padding_box["x"], $parent_padding_box["y"], $parent_padding_box["w"], $containing_block_height); break; } case "fixed": $initial_cb = $frame->get_root()->get_first_child()->get_containing_block(); $frame->set_containing_block($initial_cb["x"], $initial_cb["y"], $initial_cb["w"], $initial_cb["h"]); break; default: // Nothing to do, containing block already set via parent break; } } /** * Collapse frames margins * http://www.w3.org/TR/CSS21/box.html#collapsing-margins */ protected function _collapse_margins(): void { $frame = $this->_frame; // Margins of float/absolutely positioned/inline-level elements do not collapse if (!$frame->is_in_flow() || $frame->is_inline_level() || $frame->get_root() === $frame || $frame->get_parent() === $frame->get_root() ) { return; } $cb = $frame->get_containing_block(); $style = $frame->get_style(); $t = $style->length_in_pt($style->margin_top, $cb["w"]); $b = $style->length_in_pt($style->margin_bottom, $cb["w"]); // Handle 'auto' values if ($t === "auto") { $style->set_used("margin_top", 0.0); $t = 0.0; } if ($b === "auto") { $style->set_used("margin_bottom", 0.0); $b = 0.0; } // Collapse vertical margins: $n = $frame->get_next_sibling(); if ( $n && !($n->is_block_level() && $n->is_in_flow()) ) { while ($n = $n->get_next_sibling()) { if ($n->is_block_level() && $n->is_in_flow()) { break; } if (!$n->get_first_child()) { $n = null; break; } } } if ($n) { $n_style = $n->get_style(); $n_t = (float)$n_style->length_in_pt($n_style->margin_top, $cb["w"]); $b = $this->get_collapsed_margin_length($b, $n_t); $style->set_used("margin_bottom", $b); $n_style->set_used("margin_top", 0.0); } // Collapse our first child's margin, if there is no border or padding if ($style->border_top_width == 0 && $style->length_in_pt($style->padding_top) == 0) { $f = $this->_frame->get_first_child(); if ( $f && !($f->is_block_level() && $f->is_in_flow()) ) { while ($f = $f->get_next_sibling()) { if ($f->is_block_level() && $f->is_in_flow()) { break; } if (!$f->get_first_child()) { $f = null; break; } } } // Margins are collapsed only between block-level boxes if ($f) { $f_style = $f->get_style(); $f_t = (float)$f_style->length_in_pt($f_style->margin_top, $cb["w"]); $t = $this->get_collapsed_margin_length($t, $f_t); $style->set_used("margin_top", $t); $f_style->set_used("margin_top", 0.0); } } // Collapse our last child's margin, if there is no border or padding if ($style->border_bottom_width == 0 && $style->length_in_pt($style->padding_bottom) == 0) { $l = $this->_frame->get_last_child(); if ( $l && !($l->is_block_level() && $l->is_in_flow()) ) { while ($l = $l->get_prev_sibling()) { if ($l->is_block_level() && $l->is_in_flow()) { break; } if (!$l->get_last_child()) { $l = null; break; } } } // Margins are collapsed only between block-level boxes if ($l) { $l_style = $l->get_style(); $l_b = (float)$l_style->length_in_pt($l_style->margin_bottom, $cb["w"]); $b = $this->get_collapsed_margin_length($b, $l_b); $style->set_used("margin_bottom", $b); $l_style->set_used("margin_bottom", 0.0); } } } /** * Get the combined (collapsed) length of two adjoining margins. * * See http://www.w3.org/TR/CSS21/box.html#collapsing-margins. * * @param float $l1 * @param float $l2 * * @return float */ private function get_collapsed_margin_length(float $l1, float $l2): float { if ($l1 < 0 && $l2 < 0) { return min($l1, $l2); // min(x, y) = - max(abs(x), abs(y)), if x < 0 && y < 0 } if ($l1 < 0 || $l2 < 0) { return $l1 + $l2; // x + y = x - abs(y), if y < 0 } return max($l1, $l2); } /** * Handle relative positioning according to * https://www.w3.org/TR/CSS21/visuren.html#relative-positioning. * * @param AbstractFrameDecorator $frame The frame to handle. */ protected function position_relative(AbstractFrameDecorator $frame): void { $style = $frame->get_style(); if ($style->position === "relative") { $cb = $frame->get_containing_block(); $top = $style->length_in_pt($style->top, $cb["h"]); $right = $style->length_in_pt($style->right, $cb["w"]); $bottom = $style->length_in_pt($style->bottom, $cb["h"]); $left = $style->length_in_pt($style->left, $cb["w"]); // FIXME RTL case: // if ($left !== "auto" && $right !== "auto") $left = -$right; if ($left === "auto" && $right === "auto") { $left = 0; } elseif ($left === "auto") { $left = -$right; } if ($top === "auto" && $bottom === "auto") { $top = 0; } elseif ($top === "auto") { $top = -$bottom; } $frame->move($left, $top); } } /** * @param Block|null $block */ abstract function reflow(Block $block = null); /** * Resolve the `min-width` property. * * Resolves to 0 if not set or if a percentage and the containing-block * width is not defined. * * @param float|null $cbw Width of the containing block. * * @return float */ protected function resolve_min_width(?float $cbw): float { $style = $this->_frame->get_style(); $min_width = $style->min_width; return $min_width !== "auto" ? $style->length_in_pt($min_width, $cbw ?? 0) : 0.0; } /** * Resolve the `max-width` property. * * Resolves to `INF` if not set or if a percentage and the containing-block * width is not defined. * * @param float|null $cbw Width of the containing block. * * @return float */ protected function resolve_max_width(?float $cbw): float { $style = $this->_frame->get_style(); $max_width = $style->max_width; return $max_width !== "none" ? $style->length_in_pt($max_width, $cbw ?? INF) : INF; } /** * Resolve the `min-height` property. * * Resolves to 0 if not set or if a percentage and the containing-block * height is not defined. * * @param float|null $cbh Height of the containing block. * * @return float */ protected function resolve_min_height(?float $cbh): float { $style = $this->_frame->get_style(); $min_height = $style->min_height; return $min_height !== "auto" ? $style->length_in_pt($min_height, $cbh ?? 0) : 0.0; } /** * Resolve the `max-height` property. * * Resolves to `INF` if not set or if a percentage and the containing-block * height is not defined. * * @param float|null $cbh Height of the containing block. * * @return float */ protected function resolve_max_height(?float $cbh): float { $style = $this->_frame->get_style(); $max_height = $style->max_height; return $max_height !== "none" ? $style->length_in_pt($style->max_height, $cbh ?? INF) : INF; } /** * Get the minimum and maximum preferred width of the contents of the frame, * as requested by its children. * * @return array A two-element array of min and max width. */ public function get_min_max_child_width(): array { if (!is_null($this->_min_max_child_cache)) { return $this->_min_max_child_cache; } $low = []; $high = []; for ($iter = $this->_frame->get_children(); $iter->valid(); $iter->next()) { $inline_min = 0; $inline_max = 0; // Add all adjacent inline widths together to calculate max width while ($iter->valid() && ($iter->current()->is_inline_level() || $iter->current()->get_style()->display === "-dompdf-image")) { /** @var AbstractFrameDecorator */ $child = $iter->current(); $child->get_reflower()->_set_content(); $minmax = $child->get_min_max_width(); if (in_array($child->get_style()->white_space, ["pre", "nowrap"], true)) { $inline_min += $minmax["min"]; } else { $low[] = $minmax["min"]; } $inline_max += $minmax["max"]; $iter->next(); } if ($inline_min > 0) { $low[] = $inline_min; } if ($inline_max > 0) { $high[] = $inline_max; } // Skip children with absolute position if ($iter->valid() && !$iter->current()->is_absolute()) { /** @var AbstractFrameDecorator */ $child = $iter->current(); $child->get_reflower()->_set_content(); list($low[], $high[]) = $child->get_min_max_width(); } } $min = count($low) ? max($low) : 0; $max = count($high) ? max($high) : 0; return $this->_min_max_child_cache = [$min, $max]; } /** * Get the minimum and maximum preferred content-box width of the frame. * * @return array A two-element array of min and max width. */ public function get_min_max_content_width(): array { return $this->get_min_max_child_width(); } /** * Get the minimum and maximum preferred border-box width of the frame. * * Required for shrink-to-fit width calculation, as used in automatic table * layout, absolute positioning, float and inline-block. This provides a * basic implementation. Child classes should override this or * `get_min_max_content_width` as necessary. * * @return array An array `[0 => min, 1 => max, "min" => min, "max" => max]` * of min and max width. */ public function get_min_max_width(): array { if (!is_null($this->_min_max_cache)) { return $this->_min_max_cache; } $style = $this->_frame->get_style(); [$min, $max] = $this->get_min_max_content_width(); // Account for margins, borders, and padding $dims = [ $style->padding_left, $style->padding_right, $style->border_left_width, $style->border_right_width, $style->margin_left, $style->margin_right ]; // The containing block is not defined yet, treat percentages as 0 $delta = (float) $style->length_in_pt($dims, 0); $min += $delta; $max += $delta; return $this->_min_max_cache = [$min, $max, "min" => $min, "max" => $max]; } /** * Parses a CSS string containing quotes and escaped hex characters * * @param $string string The CSS string to parse * @param $single_trim * @return string */ protected function _parse_string($string, $single_trim = false) { if ($single_trim) { $string = preg_replace('/^[\"\']/', "", $string); $string = preg_replace('/[\"\']$/', "", $string); } else { $string = trim($string, "'\""); } $string = str_replace(["\\\n", '\\"', "\\'"], ["", '"', "'"], $string); // Convert escaped hex characters into ascii characters (e.g. \A => newline) $string = preg_replace_callback("/\\\\([0-9a-fA-F]{0,6})/", function ($matches) { return \Dompdf\Helpers::unichr(hexdec($matches[1])); }, $string); return $string; } /** * Parses a CSS "quotes" property * * https://www.w3.org/TR/css-content-3/#quotes * * @return array An array of pairs of quotes */ protected function _parse_quotes(): array { $quotes = $this->_frame->get_style()->quotes; if ($quotes === "none") { return []; } if ($quotes === "auto") { // TODO: Use typographically appropriate quotes for the current // language here return [['"', '"'], ["'", "'"]]; } // Matches quote types $re = '/(\'[^\']*\')|(\"[^\"]*\")/'; // Split on spaces, except within quotes if (!preg_match_all($re, $quotes, $matches, PREG_SET_ORDER)) { return []; } $quotes_array = []; foreach ($matches as $_quote) { $quotes_array[] = $this->_parse_string($_quote[0], true); } return array_chunk($quotes_array, 2); } /** * Parses the CSS "content" property * * https://www.w3.org/TR/CSS21/generate.html#content * * @return string The resulting string */ protected function _parse_content(): string { $style = $this->_frame->get_style(); $content = $style->content; if ($content === "normal" || $content === "none") { return ""; } $quotes = $this->_parse_quotes(); $text = ""; foreach ($content as $val) { // String if (in_array(mb_substr($val, 0, 1), ['"', "'"], true)) { $text .= $this->_parse_string($val); continue; } $val = mb_strtolower($val); // Keywords if ($val === "open-quote") { // FIXME: Take quotation depth into account if (isset($quotes[0][0])) { $text .= $quotes[0][0]; } continue; } elseif ($val === "close-quote") { // FIXME: Take quotation depth into account if (isset($quotes[0][1])) { $text .= $quotes[0][1]; } continue; } elseif ($val === "no-open-quote") { // FIXME: Increment quotation depth continue; } elseif ($val === "no-close-quote") { // FIXME: Decrement quotation depth continue; } // attr() if (mb_substr($val, 0, 5) === "attr(") { $i = mb_strpos($val, ")"); if ($i === false) { continue; } $attr = trim(mb_substr($val, 5, $i - 5)); if ($attr === "") { continue; } $text .= $this->_frame->get_parent()->get_node()->getAttribute($attr); continue; } // counter()/counters() if (mb_substr($val, 0, 7) === "counter") { // Handle counter() references: // http://www.w3.org/TR/CSS21/generate.html#content $i = mb_strpos($val, ")"); if ($i === false) { continue; } preg_match('/(counters?)(^\()*?\(\s*([^\s,]+)\s*(,\s*["\']?([^"\'\)]*)["\']?\s*(,\s*([^\s)]+)\s*)?)?\)/i', $val, $args); $counter_id = $args[3]; if (strtolower($args[1]) === "counter") { // counter(name [,style]) if (isset($args[5])) { $type = trim($args[5]); } else { $type = "decimal"; } $p = $this->_frame->lookup_counter_frame($counter_id); $text .= $p->counter_value($counter_id, $type); } elseif (strtolower($args[1]) === "counters") { // counters(name, string [,style]) if (isset($args[5])) { $string = $this->_parse_string($args[5]); } else { $string = ""; } if (isset($args[7])) { $type = trim($args[7]); } else { $type = "decimal"; } $p = $this->_frame->lookup_counter_frame($counter_id); $tmp = []; while ($p) { // We only want to use the counter values when they actually increment the counter if (array_key_exists($counter_id, $p->_counters)) { array_unshift($tmp, $p->counter_value($counter_id, $type)); } $p = $p->lookup_counter_frame($counter_id); } $text .= implode($string, $tmp); } else { // countertops? } continue; } } return $text; } /** * Handle counters and set generated content if the frame is a * generated-content frame. */ protected function _set_content(): void { $frame = $this->_frame; if ($frame->content_set) { return; } $style = $frame->get_style(); if (($reset = $style->counter_reset) !== "none") { $frame->reset_counters($reset); } if (($increment = $style->counter_increment) !== "none") { $frame->increment_counters($increment); } if ($frame->get_node()->nodeName === "dompdf_generated") { $content = $this->_parse_content(); if ($content !== "") { $node = $frame->get_node()->ownerDocument->createTextNode($content); $new_style = $style->get_stylesheet()->create_style(); $new_style->inherit($style); $new_frame = new Frame($node); $new_frame->set_style($new_style); Factory::decorate_frame($new_frame, $frame->get_dompdf(), $frame->get_root()); $frame->append_child($new_frame); } } $frame->content_set = true; } } PK */ const SOFT_HYPHEN = "\xC2\xAD"; /** * The regex splits on everything that's a separator (^\S double negative), * excluding the following non-breaking space characters: * * nbsp (\xA0) * * narrow nbsp (\x{202F}) * * figure space (\x{2007}) */ public static $_whitespace_pattern = '/([^\S\xA0\x{202F}\x{2007}]+)/u'; /** * The regex splits on everything that's a separator (^\S double negative) * plus dashes, excluding the following non-breaking space characters: * * nbsp (\xA0) * * narrow nbsp (\x{202F}) * * figure space (\x{2007}) */ public static $_wordbreak_pattern = '/([^\S\xA0\x{202F}\x{2007}\n]+|\R|\-+|\xAD+)/u'; /** * Frame for this reflower * * @var TextFrameDecorator */ protected $_frame; /** * Saves trailing whitespace trimmed after a line break, so it can be * restored when needed. * * @var string|null */ protected $trailingWs = null; /** * @var FontMetrics */ private $fontMetrics; /** * @param TextFrameDecorator $frame * @param FontMetrics $fontMetrics */ public function __construct(TextFrameDecorator $frame, FontMetrics $fontMetrics) { parent::__construct($frame); $this->setFontMetrics($fontMetrics); } /** * Apply text transform and white-space collapse according to style. * * * http://www.w3.org/TR/CSS21/text.html#propdef-text-transform * * http://www.w3.org/TR/CSS21/text.html#propdef-white-space * * @param string $text * @return string */ protected function pre_process_text(string $text): string { $style = $this->_frame->get_style(); // Handle text transform switch ($style->text_transform) { case "capitalize": $text = Helpers::mb_ucwords($text); break; case "uppercase": $text = mb_convert_case($text, MB_CASE_UPPER); break; case "lowercase": $text = mb_convert_case($text, MB_CASE_LOWER); break; default: break; } // Handle white-space collapse switch ($style->white_space) { default: case "normal": case "nowrap": $text = preg_replace(self::$_whitespace_pattern, " ", $text) ?? ""; break; case "pre-line": // Collapse white space except for line breaks $text = preg_replace('/([^\S\xA0\x{202F}\x{2007}\n]+)/u', " ", $text) ?? ""; break; case "pre": case "pre-wrap": break; } return $text; } /** * @param string $text * @param BlockFrameDecorator $block * @param bool $nowrap * * @return bool|int */ protected function line_break(string $text, BlockFrameDecorator $block, bool $nowrap = false) { $fontMetrics = $this->getFontMetrics(); $frame = $this->_frame; $style = $frame->get_style(); $font = $style->font_family; $size = $style->font_size; $word_spacing = $style->word_spacing; $letter_spacing = $style->letter_spacing; // Determine the available width $current_line = $block->get_current_line_box(); $line_width = $frame->get_containing_block("w"); $current_line_width = $current_line->left + $current_line->w + $current_line->right; $available_width = $line_width - $current_line_width; // Determine the frame width including margin, padding & border $visible_text = preg_replace('/\xAD/u', "", $text); $text_width = $fontMetrics->getTextWidth($visible_text, $font, $size, $word_spacing, $letter_spacing); $mbp_width = (float) $style->length_in_pt([ $style->margin_left, $style->border_left_width, $style->padding_left, $style->padding_right, $style->border_right_width, $style->margin_right ], $line_width); $frame_width = $text_width + $mbp_width; if (Helpers::lengthLessOrEqual($frame_width, $available_width)) { return false; } if ($nowrap) { return $current_line_width == 0 ? false : 0; } // Split the text into words $words = preg_split(self::$_wordbreak_pattern, $text, -1, PREG_SPLIT_DELIM_CAPTURE); $wc = count($words); // Determine the split point $width = 0.0; $str = ""; $space_width = $fontMetrics->getTextWidth(" ", $font, $size, $word_spacing, $letter_spacing); $shy_width = $fontMetrics->getTextWidth(self::SOFT_HYPHEN, $font, $size); // @todo support for ($i = 0; $i < $wc; $i += 2) { // Allow trailing white space to overflow. White space is always // collapsed to the standard space character currently, so only // handle that for now $sep = $words[$i + 1] ?? ""; $word = $sep === " " ? $words[$i] : $words[$i] . $sep; $word_width = $fontMetrics->getTextWidth($word, $font, $size, $word_spacing, $letter_spacing); $used_width = $width + $word_width + $mbp_width; if (Helpers::lengthGreater($used_width, $available_width)) { // If the previous split happened by soft hyphen, we have to // append its width again because the last hyphen of a line // won't be removed if (isset($words[$i - 1]) && self::SOFT_HYPHEN === $words[$i - 1]) { $width += $shy_width; } break; } // If the word is splitted by soft hyphen, but no line break is needed // we have to reduce the width. But the str is not modified, otherwise // the wrong offset is calculated at the end of this method. if ($sep === self::SOFT_HYPHEN) { $width += $word_width - $shy_width; $str .= $word; } elseif ($sep === " ") { $width += $word_width + $space_width; $str .= $word . $sep; } else { $width += $word_width; $str .= $word; } } // The first word has overflowed. Force it onto the line, or as many // characters as fit if breaking words is allowed if ($current_line_width == 0 && $width === 0.0) { if ($sep === " ") { $word .= $sep; } // https://www.w3.org/TR/css-text-3/#overflow-wrap-property $wrap = $style->overflow_wrap; $break_word = $wrap === "anywhere" || $wrap === "break-word"; if ($break_word) { $s = ""; for ($j = 0; $j < mb_strlen($word); $j++) { $c = mb_substr($word, $j, 1); $w = $fontMetrics->getTextWidth($s . $c, $font, $size, $word_spacing, $letter_spacing); if (Helpers::lengthGreater($w, $available_width)) { break; } $s .= $c; } // Always force the first character onto the line $str = $j === 0 ? $s . $c : $s; } else { $str = $word; } } $offset = mb_strlen($str); return $offset; } /** * @param string $text * @return bool|int */ protected function newline_break(string $text) { if (($i = mb_strpos($text, "\n")) === false) { return false; } return $i + 1; } /** * @param BlockFrameDecorator $block * @return bool|null Whether to add a new line at the end. `null` if reflow * should be stopped. */ protected function layout_line(BlockFrameDecorator $block): ?bool { $frame = $this->_frame; $style = $frame->get_style(); $current_line = $block->get_current_line_box(); $text = $frame->get_text(); // Trim leading white space if this is the first text on the line if ($current_line->w === 0.0 && !$frame->is_pre()) { $text = ltrim($text, " "); } if ($text === "") { $frame->set_text(""); $style->set_used("width", 0.0); return false; } // Determine the next line break // http://www.w3.org/TR/CSS21/text.html#propdef-white-space $white_space = $style->white_space; $nowrap = $white_space === "nowrap" || $white_space === "pre"; switch ($white_space) { default: case "normal": case "nowrap": $split = $this->line_break($text, $block, $nowrap); $add_line = false; break; case "pre": case "pre-line": case "pre-wrap": $hard_split = $this->newline_break($text); $first_line = $hard_split !== false ? mb_substr($text, 0, $hard_split) : $text; $soft_split = $this->line_break($first_line, $block, $nowrap); $split = $soft_split !== false ? $soft_split : $hard_split; $add_line = $hard_split !== false; break; } if ($split === 0) { // Make sure to move text when floating frames leave no space to // place anything onto the line // TODO: Would probably be better to move just below the current // floating frame instead of trying to place text in line-height // increments if ($current_line->h === 0.0) { // Line height might be 0 $h = max($frame->get_margin_height(), 1.0); $block->maximize_line_height($h, $frame); } // Break line and repeat layout $block->add_line(); // Find the appropriate inline ancestor to split $child = $frame; $p = $child->get_parent(); while ($p instanceof InlineFrameDecorator && !$child->get_prev_sibling()) { $child = $p; $p = $p->get_parent(); } if ($p instanceof InlineFrameDecorator) { // Split parent and stop current reflow. Reflow continues // via child-reflow loop of split parent $p->split($child); return null; } return $this->layout_line($block); } // Final split point is determined if ($split !== false && $split < mb_strlen($text)) { // Split the line $frame->set_text($text); $frame->split_text($split); $add_line = true; // Remove inner soft hyphens $t = $frame->get_text(); $shyPosition = mb_strpos($t, self::SOFT_HYPHEN); if (false !== $shyPosition && $shyPosition < mb_strlen($t) - 1) { $t = str_replace(self::SOFT_HYPHEN, "", mb_substr($t, 0, -1)) . mb_substr($t, -1); $frame->set_text($t); } } else { // No split required // Remove soft hyphens $text = str_replace(self::SOFT_HYPHEN, "", $text); $frame->set_text($text); } // Set our new width $frame->recalculate_width(); return $add_line; } /** * @param BlockFrameDecorator|null $block */ function reflow(BlockFrameDecorator $block = null) { $frame = $this->_frame; $page = $frame->get_root(); $page->check_forced_page_break($frame); if ($page->is_full()) { return; } // Determine the text height $style = $frame->get_style(); $size = $style->font_size; $font = $style->font_family; $font_height = $this->getFontMetrics()->getFontHeight($font, $size); $style->set_used("height", $font_height); // Handle text transform and white space $text = $this->pre_process_text($frame->get_text()); $frame->set_text($text); if ($block === null) { return; } $add_line = $this->layout_line($block); if ($add_line === null) { return; } $frame->position(); // Skip wrapped white space between block-level elements in case white // space is collapsed if ($frame->get_text() === "" && $frame->get_margin_width() === 0.0) { return; } $line = $block->add_frame_to_line($frame); $trimmed = trim($frame->get_text()); // Split the text into words (used to determine spacing between // words on justified lines) if ($trimmed !== "") { $words = preg_split(self::$_whitespace_pattern, $trimmed); $line->wc += count($words); } if ($add_line) { $block->add_line(); } } /** * Trim trailing white space from the frame text. */ public function trim_trailing_ws(): void { $frame = $this->_frame; $text = $frame->get_text(); $trailing = mb_substr($text, -1); // White space is always collapsed to the standard space character // currently, so only handle that for now if ($trailing === " ") { $this->trailingWs = $trailing; $frame->set_text(mb_substr($text, 0, -1)); $frame->recalculate_width(); } } public function reset(): void { parent::reset(); // Restore trimmed trailing white space, as the frame will go through // another reflow and line breaks might be different after a split if ($this->trailingWs !== null) { $text = $this->_frame->get_text(); $this->_frame->set_text($text . $this->trailingWs); $this->trailingWs = null; } } //........................................................................ public function get_min_max_width(): array { $fontMetrics = $this->getFontMetrics(); $frame = $this->_frame; $style = $frame->get_style(); $text = $frame->get_text(); $font = $style->font_family; $size = $style->font_size; $word_spacing = $style->word_spacing; $letter_spacing = $style->letter_spacing; // Handle text transform and white space $text = $this->pre_process_text($frame->get_text()); if (!$frame->is_pre()) { // Determine whether the frame is at the start of its parent block. // Trim leading white space in that case $child = $frame; $p = $frame->get_parent(); while (!$p->is_block() && !$child->get_prev_sibling()) { $child = $p; $p = $p->get_parent(); } if (!$child->get_prev_sibling()) { $text = ltrim($text, " "); } // Determine whether the frame is at the end of its parent block. // Trim trailing white space in that case $child = $frame; $p = $frame->get_parent(); while (!$p->is_block() && !$child->get_next_sibling()) { $child = $p; $p = $p->get_parent(); } if (!$child->get_next_sibling()) { $text = rtrim($text, " "); } } // Strip soft hyphens for max-line-width calculations $visible_text = preg_replace('/\xAD/u', "", $text); // Determine minimum text width switch ($style->white_space) { default: case "normal": case "pre-line": case "pre-wrap": // The min width is the longest word or, if breaking words is // allowed with the `anywhere` keyword, the widest character. // For performance reasons, we only check the first character in // the latter case. // https://www.w3.org/TR/css-text-3/#overflow-wrap-property if ($style->overflow_wrap === "anywhere") { $char = mb_substr($visible_text, 0, 1); $min = $fontMetrics->getTextWidth($char, $font, $size, $word_spacing, $letter_spacing); } else { // Find the longest word $words = preg_split(self::$_wordbreak_pattern, $text, -1, PREG_SPLIT_DELIM_CAPTURE); $lengths = array_map(function ($chunk) use ($fontMetrics, $font, $size, $word_spacing, $letter_spacing) { // Allow trailing white space to overflow. As in actual // layout above, only handle a single space for now $sep = $chunk[1] ?? ""; $word = $sep === " " ? $chunk[0] : $chunk[0] . $sep; return $fontMetrics->getTextWidth($word, $font, $size, $word_spacing, $letter_spacing); }, array_chunk($words, 2)); $min = max($lengths); } break; case "pre": // Find the longest line $lines = array_flip(preg_split("/\R/u", $visible_text)); array_walk($lines, function (&$chunked_text_width, $chunked_text) use ($fontMetrics, $font, $size, $word_spacing, $letter_spacing) { $chunked_text_width = $fontMetrics->getTextWidth($chunked_text, $font, $size, $word_spacing, $letter_spacing); }); arsort($lines); $min = reset($lines); break; case "nowrap": $min = $fontMetrics->getTextWidth($visible_text, $font, $size, $word_spacing, $letter_spacing); break; } // Determine maximum text width switch ($style->white_space) { default: case "normal": $max = $fontMetrics->getTextWidth($visible_text, $font, $size, $word_spacing, $letter_spacing); break; case "pre-line": case "pre-wrap": // Find the longest line $lines = array_flip(preg_split("/\R/u", $visible_text)); array_walk($lines, function (&$chunked_text_width, $chunked_text) use ($fontMetrics, $font, $size, $word_spacing, $letter_spacing) { $chunked_text_width = $fontMetrics->getTextWidth($chunked_text, $font, $size, $word_spacing, $letter_spacing); }); arsort($lines); $max = reset($lines); break; case "pre": case "nowrap": $max = $min; break; } // Account for margins, borders, and padding $dims = [ $style->padding_left, $style->padding_right, $style->border_left_width, $style->border_right_width, $style->margin_left, $style->margin_right ]; // The containing block is not defined yet, treat percentages as 0 $delta = (float) $style->length_in_pt($dims, 0); $min += $delta; $max += $delta; return [$min, $max, "min" => $min, "max" => $max]; } /** * @param FontMetrics $fontMetrics * @return $this */ public function setFontMetrics(FontMetrics $fontMetrics) { $this->fontMetrics = $fontMetrics; return $this; } /** * @return FontMetrics */ public function getFontMetrics() { return $this->fontMetrics; } } PKdetermine_absolute_containing_block(); // Counters and generated content $this->_set_content(); //FLOAT //$frame = $this->_frame; //$page = $frame->get_root(); //if ($frame->get_style()->float !== "none" ) { // $page->add_floating_frame($this); //} $this->resolve_dimensions(); $this->resolve_margins(); $frame = $this->_frame; $frame->position(); if ($block && $frame->is_in_flow()) { $block->add_frame_to_line($frame); } } public function get_min_max_content_width(): array { // TODO: While the containing block is not set yet on the frame, it can // already be determined in some cases due to fixed dimensions on the // ancestor forming the containing block. In such cases, percentage // values could be resolved here $style = $this->_frame->get_style(); [$width] = $this->calculate_size(null, null); $min_width = $this->resolve_min_width(null); $percent_width = Helpers::is_percent($style->width) || Helpers::is_percent($style->max_width) || ($style->width === "auto" && (Helpers::is_percent($style->height) || Helpers::is_percent($style->max_height))); // Use the specified min width as minimum when width or max width depend // on the containing block and cannot be resolved yet. This mimics // browser behavior $min = $percent_width ? $min_width : $width; $max = $width; return [$min, $max]; } /** * Calculate width and height, accounting for min/max constraints. * * * https://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width * * https://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height * * https://www.w3.org/TR/CSS21/visudet.html#min-max-widths * * https://www.w3.org/TR/CSS21/visudet.html#min-max-heights * * @param float|null $cbw Width of the containing block. * @param float|null $cbh Height of the containing block. * * @return float[] */ protected function calculate_size(?float $cbw, ?float $cbh): array { /** @var ImageFrameDecorator */ $frame = $this->_frame; $style = $frame->get_style(); $computed_width = $style->width; $computed_height = $style->height; $width = $cbw === null && Helpers::is_percent($computed_width) ? "auto" : $style->length_in_pt($computed_width, $cbw ?? 0); $height = $cbh === null && Helpers::is_percent($computed_height) ? "auto" : $style->length_in_pt($computed_height, $cbh ?? 0); $min_width = $this->resolve_min_width($cbw); $max_width = $this->resolve_max_width($cbw); $min_height = $this->resolve_min_height($cbh); $max_height = $this->resolve_max_height($cbh); if ($width === "auto" && $height === "auto") { // Use intrinsic dimensions, resampled to pt [$img_width, $img_height] = $frame->get_intrinsic_dimensions(); $w = $frame->resample($img_width); $h = $frame->resample($img_height); // Resolve min/max constraints according to the constraint-violation // table in https://www.w3.org/TR/CSS21/visudet.html#min-max-widths $max_width = max($min_width, $max_width); $max_height = max($min_height, $max_height); if (($w > $max_width && $h <= $max_height) || ($w > $max_width && $h > $max_height && $max_width / $w <= $max_height / $h) || ($w < $min_width && $h > $min_height) || ($w < $min_width && $h < $min_height && $min_width / $w > $min_height / $h) ) { $width = Helpers::clamp($w, $min_width, $max_width); $height = $width * ($img_height / $img_width); $height = Helpers::clamp($height, $min_height, $max_height); } else { $height = Helpers::clamp($h, $min_height, $max_height); $width = $height * ($img_width / $img_height); $width = Helpers::clamp($width, $min_width, $max_width); } } elseif ($height === "auto") { // Width is fixed, scale height according to aspect ratio [$img_width, $img_height] = $frame->get_intrinsic_dimensions(); $width = Helpers::clamp((float) $width, $min_width, $max_width); $height = $width * ($img_height / $img_width); $height = Helpers::clamp($height, $min_height, $max_height); } elseif ($width === "auto") { // Height is fixed, scale width according to aspect ratio [$img_width, $img_height] = $frame->get_intrinsic_dimensions(); $height = Helpers::clamp((float) $height, $min_height, $max_height); $width = $height * ($img_width / $img_height); $width = Helpers::clamp($width, $min_width, $max_width); } else { // Width and height are fixed $width = Helpers::clamp((float) $width, $min_width, $max_width); $height = Helpers::clamp((float) $height, $min_height, $max_height); } return [$width, $height]; } protected function resolve_dimensions(): void { /** @var ImageFrameDecorator */ $frame = $this->_frame; $style = $frame->get_style(); $debug_png = $this->get_dompdf()->getOptions()->getDebugPng(); if ($debug_png) { [$img_width, $img_height] = $frame->get_intrinsic_dimensions(); print "resolve_dimensions() " . $frame->get_style()->width . " " . $frame->get_style()->height . ";" . $frame->get_parent()->get_style()->width . " " . $frame->get_parent()->get_style()->height . ";" . $frame->get_parent()->get_parent()->get_style()->width . " " . $frame->get_parent()->get_parent()->get_style()->height . ";" . $img_width . " " . $img_height . "|"; } [, , $cbw, $cbh] = $frame->get_containing_block(); [$width, $height] = $this->calculate_size($cbw, $cbh); if ($debug_png) { print $width . " " . $height . ";"; } $style->set_used("width", $width); $style->set_used("height", $height); } protected function resolve_margins(): void { // Only handle the inline case for now // https://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width // https://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height $style = $this->_frame->get_style(); if ($style->margin_left === "auto") { $style->set_used("margin_left", 0.0); } if ($style->margin_right === "auto") { $style->set_used("margin_right", 0.0); } if ($style->margin_top === "auto") { $style->set_used("margin_top", 0.0); } if ($style->margin_bottom === "auto") { $style->set_used("margin_bottom", 0.0); } } } PK ["rules" => []], "http://" => ["rules" => []], "https://" => ["rules" => []] ]; /** * @var string */ private $logOutputFile; /** * Styles targeted to this media type are applied to the document. * This is on top of the media types that are always applied: * all, static, visual, bitmap, paged, dompdf * * @var string */ private $defaultMediaType = "screen"; /** * The default paper size. * * North America standard is "letter"; other countries generally "a4" * @see \Dompdf\Adapter\CPDF::PAPER_SIZES for valid sizes * * @var string|float[] */ private $defaultPaperSize = "letter"; /** * The default paper orientation. * * The orientation of the page (portrait or landscape). * * @var string */ private $defaultPaperOrientation = "portrait"; /** * The default font family * * Used if no suitable fonts can be found. This must exist in the font folder. * * @var string */ private $defaultFont = "serif"; /** * Image DPI setting * * This setting determines the default DPI setting for images and fonts. The * DPI may be overridden for inline images by explicitly setting the * image's width & height style attributes (i.e. if the image's native * width is 600 pixels and you specify the image's width as 72 points, * the image will have a DPI of 600 in the rendered PDF. The DPI of * background images can not be overridden and is controlled entirely * via this parameter. * * For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI). * If a size in html is given as px (or without unit as image size), * this tells the corresponding size in pt at 72 DPI. * This adjusts the relative sizes to be similar to the rendering of the * html page in a reference browser. * * In pdf, always 1 pt = 1/72 inch * * @var int */ private $dpi = 96; /** * A ratio applied to the fonts height to be more like browsers' line height * * @var float */ private $fontHeightRatio = 1.1; /** * Enable embedded PHP * * If this setting is set to true then DOMPDF will automatically evaluate * embedded PHP contained within tags. * * ==== IMPORTANT ==== * Enabling this for documents you do not trust (e.g. arbitrary remote html * pages) is a security risk. Embedded scripts are run with the same level of * system access available to dompdf. Set this option to false (recommended) * if you wish to process untrusted documents. * * This setting may increase the risk of system exploit. Do not change * this settings without understanding the consequences. Additional * documentation is available on the dompdf wiki at: * https://github.com/dompdf/dompdf/wiki * * @var bool */ private $isPhpEnabled = false; /** * Enable remote file access * * If this setting is set to true, DOMPDF will access remote sites for * images and CSS files as required. * * ==== IMPORTANT ==== * This can be a security risk, in particular in combination with isPhpEnabled and * allowing remote html code to be passed to $dompdf = new DOMPDF(); $dompdf->load_html(...); * This allows anonymous users to download legally doubtful internet content which on * tracing back appears to being downloaded by your server, or allows malicious php code * in remote html pages to be executed by your server with your account privileges. * * This setting may increase the risk of system exploit. Do not change * this settings without understanding the consequences. Additional * documentation is available on the dompdf wiki at: * https://github.com/dompdf/dompdf/wiki * * @var bool */ private $isRemoteEnabled = false; /** * Enable inline JavaScript * * If this setting is set to true then DOMPDF will automatically insert * JavaScript code contained within * tags as written into the PDF. * * NOTE: This is PDF-based JavaScript to be executed by the PDF viewer, * not browser-based JavaScript executed by Dompdf. * * @var bool */ private $isJavascriptEnabled = true; /** * Use the HTML5 Lib parser * * @deprecated * @var bool */ private $isHtml5ParserEnabled = true; /** * Whether to enable font subsetting or not. * * @var bool */ private $isFontSubsettingEnabled = true; /** * @var bool */ private $debugPng = false; /** * @var bool */ private $debugKeepTemp = false; /** * @var bool */ private $debugCss = false; /** * @var bool */ private $debugLayout = false; /** * @var bool */ private $debugLayoutLines = true; /** * @var bool */ private $debugLayoutBlocks = true; /** * @var bool */ private $debugLayoutInline = true; /** * @var bool */ private $debugLayoutPaddingBox = true; /** * The PDF rendering backend to use * * Valid settings are 'PDFLib', 'CPDF', 'GD', and 'auto'. 'auto' will * look for PDFLib and use it if found, or if not it will fall back on * CPDF. 'GD' renders PDFs to graphic files. {@link Dompdf\CanvasFactory} * ultimately determines which rendering class to instantiate * based on this setting. * * @var string */ private $pdfBackend = "CPDF"; /** * PDFlib license key * * If you are using a licensed, commercial version of PDFlib, specify * your license key here. If you are using PDFlib-Lite or are evaluating * the commercial version of PDFlib, comment out this setting. * * @link http://www.pdflib.com * * If pdflib present in web server and auto or selected explicitly above, * a real license code must exist! * * @var string */ private $pdflibLicense = ""; /** * HTTP context created with stream_context_create() * Will be used for file_get_contents * * @link https://www.php.net/manual/context.php * * @var resource */ private $httpContext; /** * @param array $attributes */ public function __construct(array $attributes = null) { $rootDir = realpath(__DIR__ . "/../"); $this->setChroot(array($rootDir)); $this->setRootDir($rootDir); $this->setTempDir(sys_get_temp_dir()); $this->setFontDir($rootDir . "/lib/fonts"); $this->setFontCache($this->getFontDir()); $ver = ""; $versionFile = realpath(__DIR__ . '/../VERSION'); if (($version = file_get_contents($versionFile)) !== false) { $version = trim($version); if ($version !== '$Format:<%h>$') { $ver = "/$version"; } } $this->setHttpContext([ "http" => [ "follow_location" => false, "user_agent" => "Dompdf$ver https://github.com/dompdf/dompdf" ] ]); $this->setAllowedProtocols(["file://", "http://", "https://"]); if (null !== $attributes) { $this->set($attributes); } } /** * @param array|string $attributes * @param null|mixed $value * @return $this */ public function set($attributes, $value = null) { if (!is_array($attributes)) { $attributes = [$attributes => $value]; } foreach ($attributes as $key => $value) { if ($key === 'tempDir' || $key === 'temp_dir') { $this->setTempDir($value); } elseif ($key === 'fontDir' || $key === 'font_dir') { $this->setFontDir($value); } elseif ($key === 'fontCache' || $key === 'font_cache') { $this->setFontCache($value); } elseif ($key === 'chroot') { $this->setChroot($value); } elseif ($key === 'allowedProtocols') { $this->setAllowedProtocols($value); } elseif ($key === 'logOutputFile' || $key === 'log_output_file') { $this->setLogOutputFile($value); } elseif ($key === 'defaultMediaType' || $key === 'default_media_type') { $this->setDefaultMediaType($value); } elseif ($key === 'defaultPaperSize' || $key === 'default_paper_size') { $this->setDefaultPaperSize($value); } elseif ($key === 'defaultPaperOrientation' || $key === 'default_paper_orientation') { $this->setDefaultPaperOrientation($value); } elseif ($key === 'defaultFont' || $key === 'default_font') { $this->setDefaultFont($value); } elseif ($key === 'dpi') { $this->setDpi($value); } elseif ($key === 'fontHeightRatio' || $key === 'font_height_ratio') { $this->setFontHeightRatio($value); } elseif ($key === 'isPhpEnabled' || $key === 'is_php_enabled' || $key === 'enable_php') { $this->setIsPhpEnabled($value); } elseif ($key === 'isRemoteEnabled' || $key === 'is_remote_enabled' || $key === 'enable_remote') { $this->setIsRemoteEnabled($value); } elseif ($key === 'isJavascriptEnabled' || $key === 'is_javascript_enabled' || $key === 'enable_javascript') { $this->setIsJavascriptEnabled($value); } elseif ($key === 'isHtml5ParserEnabled' || $key === 'is_html5_parser_enabled' || $key === 'enable_html5_parser') { $this->setIsHtml5ParserEnabled($value); } elseif ($key === 'isFontSubsettingEnabled' || $key === 'is_font_subsetting_enabled' || $key === 'enable_font_subsetting') { $this->setIsFontSubsettingEnabled($value); } elseif ($key === 'debugPng' || $key === 'debug_png') { $this->setDebugPng($value); } elseif ($key === 'debugKeepTemp' || $key === 'debug_keep_temp') { $this->setDebugKeepTemp($value); } elseif ($key === 'debugCss' || $key === 'debug_css') { $this->setDebugCss($value); } elseif ($key === 'debugLayout' || $key === 'debug_layout') { $this->setDebugLayout($value); } elseif ($key === 'debugLayoutLines' || $key === 'debug_layout_lines') { $this->setDebugLayoutLines($value); } elseif ($key === 'debugLayoutBlocks' || $key === 'debug_layout_blocks') { $this->setDebugLayoutBlocks($value); } elseif ($key === 'debugLayoutInline' || $key === 'debug_layout_inline') { $this->setDebugLayoutInline($value); } elseif ($key === 'debugLayoutPaddingBox' || $key === 'debug_layout_padding_box') { $this->setDebugLayoutPaddingBox($value); } elseif ($key === 'pdfBackend' || $key === 'pdf_backend') { $this->setPdfBackend($value); } elseif ($key === 'pdflibLicense' || $key === 'pdflib_license') { $this->setPdflibLicense($value); } elseif ($key === 'httpContext' || $key === 'http_context') { $this->setHttpContext($value); } } return $this; } /** * @param string $key * @return mixed */ public function get($key) { if ($key === 'tempDir' || $key === 'temp_dir') { return $this->getTempDir(); } elseif ($key === 'fontDir' || $key === 'font_dir') { return $this->getFontDir(); } elseif ($key === 'fontCache' || $key === 'font_cache') { return $this->getFontCache(); } elseif ($key === 'chroot') { return $this->getChroot(); } elseif ($key === 'allowedProtocols') { return $this->getAllowedProtocols(); } elseif ($key === 'logOutputFile' || $key === 'log_output_file') { return $this->getLogOutputFile(); } elseif ($key === 'defaultMediaType' || $key === 'default_media_type') { return $this->getDefaultMediaType(); } elseif ($key === 'defaultPaperSize' || $key === 'default_paper_size') { return $this->getDefaultPaperSize(); } elseif ($key === 'defaultPaperOrientation' || $key === 'default_paper_orientation') { return $this->getDefaultPaperOrientation(); } elseif ($key === 'defaultFont' || $key === 'default_font') { return $this->getDefaultFont(); } elseif ($key === 'dpi') { return $this->getDpi(); } elseif ($key === 'fontHeightRatio' || $key === 'font_height_ratio') { return $this->getFontHeightRatio(); } elseif ($key === 'isPhpEnabled' || $key === 'is_php_enabled' || $key === 'enable_php') { return $this->getIsPhpEnabled(); } elseif ($key === 'isRemoteEnabled' || $key === 'is_remote_enabled' || $key === 'enable_remote') { return $this->getIsRemoteEnabled(); } elseif ($key === 'isJavascriptEnabled' || $key === 'is_javascript_enabled' || $key === 'enable_javascript') { return $this->getIsJavascriptEnabled(); } elseif ($key === 'isHtml5ParserEnabled' || $key === 'is_html5_parser_enabled' || $key === 'enable_html5_parser') { return $this->getIsHtml5ParserEnabled(); } elseif ($key === 'isFontSubsettingEnabled' || $key === 'is_font_subsetting_enabled' || $key === 'enable_font_subsetting') { return $this->getIsFontSubsettingEnabled(); } elseif ($key === 'debugPng' || $key === 'debug_png') { return $this->getDebugPng(); } elseif ($key === 'debugKeepTemp' || $key === 'debug_keep_temp') { return $this->getDebugKeepTemp(); } elseif ($key === 'debugCss' || $key === 'debug_css') { return $this->getDebugCss(); } elseif ($key === 'debugLayout' || $key === 'debug_layout') { return $this->getDebugLayout(); } elseif ($key === 'debugLayoutLines' || $key === 'debug_layout_lines') { return $this->getDebugLayoutLines(); } elseif ($key === 'debugLayoutBlocks' || $key === 'debug_layout_blocks') { return $this->getDebugLayoutBlocks(); } elseif ($key === 'debugLayoutInline' || $key === 'debug_layout_inline') { return $this->getDebugLayoutInline(); } elseif ($key === 'debugLayoutPaddingBox' || $key === 'debug_layout_padding_box') { return $this->getDebugLayoutPaddingBox(); } elseif ($key === 'pdfBackend' || $key === 'pdf_backend') { return $this->getPdfBackend(); } elseif ($key === 'pdflibLicense' || $key === 'pdflib_license') { return $this->getPdflibLicense(); } elseif ($key === 'httpContext' || $key === 'http_context') { return $this->getHttpContext(); } return null; } /** * @param string $pdfBackend * @return $this */ public function setPdfBackend($pdfBackend) { $this->pdfBackend = $pdfBackend; return $this; } /** * @return string */ public function getPdfBackend() { return $this->pdfBackend; } /** * @param string $pdflibLicense * @return $this */ public function setPdflibLicense($pdflibLicense) { $this->pdflibLicense = $pdflibLicense; return $this; } /** * @return string */ public function getPdflibLicense() { return $this->pdflibLicense; } /** * @param array|string $chroot * @return $this */ public function setChroot($chroot, $delimiter = ',') { if (is_string($chroot)) { $this->chroot = explode($delimiter, $chroot); } elseif (is_array($chroot)) { $this->chroot = $chroot; } return $this; } /** * @return array */ public function getAllowedProtocols() { return $this->allowedProtocols; } /** * @param array $allowedProtocols The protocols to allow, as an array * formatted as ["protocol://" => ["rules" => [callable]], ...] * or ["protocol://", ...] * * @return $this */ public function setAllowedProtocols(array $allowedProtocols) { $protocols = []; foreach ($allowedProtocols as $protocol => $config) { if (is_string($protocol)) { $protocols[$protocol] = []; if (is_array($config)) { $protocols[$protocol] = $config; } } elseif (is_string($config)) { $protocols[$config] = []; } } $this->allowedProtocols = []; foreach ($protocols as $protocol => $config) { $this->addAllowedProtocol($protocol, ...($config["rules"] ?? [])); } return $this; } /** * Adds a new protocol to the allowed protocols collection * * @param string $protocol The scheme to add (e.g. "http://") * @param callable $rule A callable that validates the protocol * @return $this */ public function addAllowedProtocol(string $protocol, callable ...$rules) { $protocol = strtolower($protocol); if (empty($rules)) { $rules = []; switch ($protocol) { case "file://": $rules[] = [$this, "validateLocalUri"]; break; case "http://": case "https://": $rules[] = [$this, "validateRemoteUri"]; break; case "phar://": $rules[] = [$this, "validatePharUri"]; break; } } $this->allowedProtocols[$protocol] = ["rules" => $rules]; return $this; } /** * @return array */ public function getChroot() { $chroot = []; if (is_array($this->chroot)) { $chroot = $this->chroot; } return $chroot; } /** * @param boolean $debugCss * @return $this */ public function setDebugCss($debugCss) { $this->debugCss = $debugCss; return $this; } /** * @return boolean */ public function getDebugCss() { return $this->debugCss; } /** * @param boolean $debugKeepTemp * @return $this */ public function setDebugKeepTemp($debugKeepTemp) { $this->debugKeepTemp = $debugKeepTemp; return $this; } /** * @return boolean */ public function getDebugKeepTemp() { return $this->debugKeepTemp; } /** * @param boolean $debugLayout * @return $this */ public function setDebugLayout($debugLayout) { $this->debugLayout = $debugLayout; return $this; } /** * @return boolean */ public function getDebugLayout() { return $this->debugLayout; } /** * @param boolean $debugLayoutBlocks * @return $this */ public function setDebugLayoutBlocks($debugLayoutBlocks) { $this->debugLayoutBlocks = $debugLayoutBlocks; return $this; } /** * @return boolean */ public function getDebugLayoutBlocks() { return $this->debugLayoutBlocks; } /** * @param boolean $debugLayoutInline * @return $this */ public function setDebugLayoutInline($debugLayoutInline) { $this->debugLayoutInline = $debugLayoutInline; return $this; } /** * @return boolean */ public function getDebugLayoutInline() { return $this->debugLayoutInline; } /** * @param boolean $debugLayoutLines * @return $this */ public function setDebugLayoutLines($debugLayoutLines) { $this->debugLayoutLines = $debugLayoutLines; return $this; } /** * @return boolean */ public function getDebugLayoutLines() { return $this->debugLayoutLines; } /** * @param boolean $debugLayoutPaddingBox * @return $this */ public function setDebugLayoutPaddingBox($debugLayoutPaddingBox) { $this->debugLayoutPaddingBox = $debugLayoutPaddingBox; return $this; } /** * @return boolean */ public function getDebugLayoutPaddingBox() { return $this->debugLayoutPaddingBox; } /** * @param boolean $debugPng * @return $this */ public function setDebugPng($debugPng) { $this->debugPng = $debugPng; return $this; } /** * @return boolean */ public function getDebugPng() { return $this->debugPng; } /** * @param string $defaultFont * @return $this */ public function setDefaultFont($defaultFont) { if (!($defaultFont === null || trim($defaultFont) === "")) { $this->defaultFont = $defaultFont; } else { $this->defaultFont = "serif"; } return $this; } /** * @return string */ public function getDefaultFont() { return $this->defaultFont; } /** * @param string $defaultMediaType * @return $this */ public function setDefaultMediaType($defaultMediaType) { $this->defaultMediaType = $defaultMediaType; return $this; } /** * @return string */ public function getDefaultMediaType() { return $this->defaultMediaType; } /** * @param string|float[] $defaultPaperSize * @return $this */ public function setDefaultPaperSize($defaultPaperSize): self { $this->defaultPaperSize = $defaultPaperSize; return $this; } /** * @param string $defaultPaperOrientation * @return $this */ public function setDefaultPaperOrientation(string $defaultPaperOrientation): self { $this->defaultPaperOrientation = $defaultPaperOrientation; return $this; } /** * @return string|float[] */ public function getDefaultPaperSize() { return $this->defaultPaperSize; } /** * @return string */ public function getDefaultPaperOrientation(): string { return $this->defaultPaperOrientation; } /** * @param int $dpi * @return $this */ public function setDpi($dpi) { $this->dpi = $dpi; return $this; } /** * @return int */ public function getDpi() { return $this->dpi; } /** * @param string $fontCache * @return $this */ public function setFontCache($fontCache) { $this->fontCache = $fontCache; return $this; } /** * @return string */ public function getFontCache() { return $this->fontCache; } /** * @param string $fontDir * @return $this */ public function setFontDir($fontDir) { $this->fontDir = $fontDir; return $this; } /** * @return string */ public function getFontDir() { return $this->fontDir; } /** * @param float $fontHeightRatio * @return $this */ public function setFontHeightRatio($fontHeightRatio) { $this->fontHeightRatio = $fontHeightRatio; return $this; } /** * @return float */ public function getFontHeightRatio() { return $this->fontHeightRatio; } /** * @param boolean $isFontSubsettingEnabled * @return $this */ public function setIsFontSubsettingEnabled($isFontSubsettingEnabled) { $this->isFontSubsettingEnabled = $isFontSubsettingEnabled; return $this; } /** * @return boolean */ public function getIsFontSubsettingEnabled() { return $this->isFontSubsettingEnabled; } /** * @return boolean */ public function isFontSubsettingEnabled() { return $this->getIsFontSubsettingEnabled(); } /** * @deprecated * @param boolean $isHtml5ParserEnabled * @return $this */ public function setIsHtml5ParserEnabled($isHtml5ParserEnabled) { $this->isHtml5ParserEnabled = $isHtml5ParserEnabled; return $this; } /** * @deprecated * @return boolean */ public function getIsHtml5ParserEnabled() { return $this->isHtml5ParserEnabled; } /** * @deprecated * @return boolean */ public function isHtml5ParserEnabled() { return $this->getIsHtml5ParserEnabled(); } /** * @param boolean $isJavascriptEnabled * @return $this */ public function setIsJavascriptEnabled($isJavascriptEnabled) { $this->isJavascriptEnabled = $isJavascriptEnabled; return $this; } /** * @return boolean */ public function getIsJavascriptEnabled() { return $this->isJavascriptEnabled; } /** * @return boolean */ public function isJavascriptEnabled() { return $this->getIsJavascriptEnabled(); } /** * @param boolean $isPhpEnabled * @return $this */ public function setIsPhpEnabled($isPhpEnabled) { $this->isPhpEnabled = $isPhpEnabled; return $this; } /** * @return boolean */ public function getIsPhpEnabled() { return $this->isPhpEnabled; } /** * @return boolean */ public function isPhpEnabled() { return $this->getIsPhpEnabled(); } /** * @param boolean $isRemoteEnabled * @return $this */ public function setIsRemoteEnabled($isRemoteEnabled) { $this->isRemoteEnabled = $isRemoteEnabled; return $this; } /** * @return boolean */ public function getIsRemoteEnabled() { return $this->isRemoteEnabled; } /** * @return boolean */ public function isRemoteEnabled() { return $this->getIsRemoteEnabled(); } /** * @param string $logOutputFile * @return $this */ public function setLogOutputFile($logOutputFile) { $this->logOutputFile = $logOutputFile; return $this; } /** * @return string */ public function getLogOutputFile() { return $this->logOutputFile; } /** * @param string $tempDir * @return $this */ public function setTempDir($tempDir) { $this->tempDir = $tempDir; return $this; } /** * @return string */ public function getTempDir() { return $this->tempDir; } /** * @param string $rootDir * @return $this */ public function setRootDir($rootDir) { $this->rootDir = $rootDir; return $this; } /** * @return string */ public function getRootDir() { return $this->rootDir; } /** * Sets the HTTP context * * @param resource|array $httpContext * @return $this */ public function setHttpContext($httpContext) { $this->httpContext = is_array($httpContext) ? stream_context_create($httpContext) : $httpContext; return $this; } /** * Returns the HTTP context * * @return resource */ public function getHttpContext() { return $this->httpContext; } public function validateLocalUri(string $uri) { if ($uri === null || strlen($uri) === 0) { return [false, "The URI must not be empty."]; } $realfile = realpath(str_replace("file://", "", $uri)); $dirs = $this->chroot; $dirs[] = $this->rootDir; $chrootValid = false; foreach ($dirs as $chrootPath) { $chrootPath = realpath($chrootPath); if ($chrootPath !== false && strpos($realfile, $chrootPath) === 0) { $chrootValid = true; break; } } if ($chrootValid !== true) { return [false, "Permission denied. The file could not be found under the paths specified by Options::chroot."]; } if (!$realfile) { return [false, "File not found."]; } return [true, null]; } public function validatePharUri(string $uri) { if ($uri === null || strlen($uri) === 0) { return [false, "The URI must not be empty."]; } $file = substr(substr($uri, 0, strpos($uri, ".phar") + 5), 7); return $this->validateLocalUri($file); } public function validateRemoteUri(string $uri) { if ($uri === null || strlen($uri) === 0) { return [false, "The URI must not be empty."]; } if (!$this->isRemoteEnabled) { return [false, "Remote file requested, but remote file download is disabled."]; } return [true, null]; } } PKget_style(); $url = $style->list_style_image; $frame->get_node()->setAttribute("src", $url); $this->_img = new Image($frame, $dompdf); parent::__construct($this->_img, $dompdf); $url = $this->_img->get_image_url(); if (Cache::is_broken($url)) { $this->_width = parent::get_width(); $this->_height = parent::get_height(); } else { // Resample the bullet image to be consistent with 'auto' sized images [$width, $height] = $this->_img->get_intrinsic_dimensions(); $this->_width = $this->_img->resample($width); $this->_height = $this->_img->resample($height); } } public function get_width(): float { return $this->_width; } public function get_height(): float { return $this->_height; } public function get_margin_width(): float { $style = $this->get_style(); return $this->_width + $style->font_size * self::MARKER_INDENT; } public function get_margin_height(): float { $fontMetrics = $this->_dompdf->getFontMetrics(); $style = $this->get_style(); $font = $style->font_family; $size = $style->font_size; $fontHeight = $fontMetrics->getFontHeight($font, $size); $baseline = $fontMetrics->getFontBaseline($font, $size); // This is the same factor as used in // `FrameDecorator\Text::get_margin_height()` $f = $style->line_height / ($size > 0 ? $size : 1); // FIXME: Tries to approximate replacing the space above the font // baseline with the image return $f * ($fontHeight - $baseline) + $this->_height; } /** * Return image url * * @return string */ function get_image_url() { return $this->_img->get_image_url(); } } PK_resolved_borders = []; $this->_content_height = 0; } //........................................................................ function reset() { parent::reset(); $this->_resolved_borders = []; $this->_content_height = 0; $this->_frame->reset(); } /** * @return int */ function get_content_height() { return $this->_content_height; } /** * @param $height */ function set_content_height($height) { $this->_content_height = $height; } /** * @param $height */ function set_cell_height($height) { $style = $this->get_style(); $v_space = (float)$style->length_in_pt( [ $style->margin_top, $style->padding_top, $style->border_top_width, $style->border_bottom_width, $style->padding_bottom, $style->margin_bottom ], (float)$style->length_in_pt($style->height) ); $new_height = $height - $v_space; $style->set_used("height", $new_height); if ($new_height > $this->_content_height) { $y_offset = 0; // Adjust our vertical alignment switch ($style->vertical_align) { default: case "baseline": // FIXME: this isn't right case "top": // Don't need to do anything return; case "middle": $y_offset = ($new_height - $this->_content_height) / 2; break; case "bottom": $y_offset = $new_height - $this->_content_height; break; } if ($y_offset) { // Move our children foreach ($this->get_line_boxes() as $line) { foreach ($line->get_frames() as $frame) { $frame->move(0, $y_offset); } } } } } /** * @param $side * @param $border_spec */ function set_resolved_border($side, $border_spec) { $this->_resolved_borders[$side] = $border_spec; } /** * @param $side * @return mixed */ function get_resolved_border($side) { return $this->_resolved_borders[$side]; } /** * @return array */ function get_resolved_borders() { return $this->_resolved_borders; } } PK_cellmap = new Cellmap($this); if ($frame->get_style()->table_layout === "fixed") { $this->_cellmap->set_layout_fixed(true); } $this->_headers = []; $this->_footers = []; } public function reset() { parent::reset(); $this->_cellmap->reset(); $this->_headers = []; $this->_footers = []; $this->_reflower->reset(); } //........................................................................ /** * Split the table at $row. $row and all subsequent rows will be * added to the clone. This method is overridden in order to remove * frames from the cellmap properly. */ public function split(?Frame $child = null, bool $page_break = false, bool $forced = false): void { if (is_null($child)) { parent::split($child, $page_break, $forced); return; } // If $child is a header or if it is the first non-header row, do // not duplicate headers, simply move the table to the next page. if (count($this->_headers) && !in_array($child, $this->_headers, true) && !in_array($child->get_prev_sibling(), $this->_headers, true) ) { $first_header = null; // Insert copies of the table headers before $child foreach ($this->_headers as $header) { $new_header = $header->deep_copy(); if (is_null($first_header)) { $first_header = $new_header; } $this->insert_child_before($new_header, $child); } parent::split($first_header, $page_break, $forced); } elseif (in_array($child->get_style()->display, self::ROW_GROUPS, true)) { // Individual rows should have already been handled parent::split($child, $page_break, $forced); } else { $iter = $child; while ($iter) { $this->_cellmap->remove_row($iter); $iter = $iter->get_next_sibling(); } parent::split($child, $page_break, $forced); } } public function copy(DOMNode $node) { $deco = parent::copy($node); // In order to keep columns' widths through pages $deco->_cellmap->set_columns($this->_cellmap->get_columns()); $deco->_cellmap->lock_columns(); return $deco; } /** * Static function to locate the parent table of a frame * * @param Frame $frame * * @return Table the table that is an ancestor of $frame */ public static function find_parent_table(Frame $frame) { while ($frame = $frame->get_parent()) { if ($frame->is_table()) { break; } } return $frame; } /** * Return this table's Cellmap * * @return Cellmap */ public function get_cellmap() { return $this->_cellmap; } //........................................................................ /** * Check for text nodes between valid table children that only contain white * space, except if white space is to be preserved. * * @param AbstractFrameDecorator $frame * * @return bool */ private function isEmptyTextNode(AbstractFrameDecorator $frame): bool { // This is based on the white-space pattern in `FrameReflower\Text`, // i.e. only match on collapsible white space $wsPattern = '/^[^\S\xA0\x{202F}\x{2007}]*$/u'; $validChildOrNull = function ($frame) { return $frame === null || in_array($frame->get_style()->display, self::VALID_CHILDREN, true); }; return $frame instanceof Text && !$frame->is_pre() && preg_match($wsPattern, $frame->get_text()) && $validChildOrNull($frame->get_prev_sibling()) && $validChildOrNull($frame->get_next_sibling()); } /** * Restructure tree so that the table has the correct structure. Misplaced * children are appropriately wrapped in anonymous row groups, rows, and * cells. * * https://www.w3.org/TR/CSS21/tables.html#anonymous-boxes */ public function normalize(): void { $column_caption = ["table-column-group", "table-column", "table-caption"]; $children = iterator_to_array($this->get_children()); $tbody = null; foreach ($children as $child) { $display = $child->get_style()->display; if (in_array($display, self::ROW_GROUPS, true)) { // Reset anonymous tbody $tbody = null; // Add headers and footers if ($display === "table-header-group") { $this->_headers[] = $child; } elseif ($display === "table-footer-group") { $this->_footers[] = $child; } continue; } if (in_array($display, $column_caption, true)) { continue; } // Remove empty text nodes between valid children if ($this->isEmptyTextNode($child)) { $this->remove_child($child); continue; } // Catch consecutive misplaced frames within a single anonymous group if ($tbody === null) { $tbody = $this->create_anonymous_child("tbody", "table-row-group"); $this->insert_child_before($tbody, $child); } $tbody->append_child($child); } // Handle empty table: Make sure there is at least one row group if (!$this->get_first_child()) { $tbody = $this->create_anonymous_child("tbody", "table-row-group"); $this->append_child($tbody); } foreach ($this->get_children() as $child) { $display = $child->get_style()->display; if (in_array($display, self::ROW_GROUPS, true)) { $this->normalizeRowGroup($child); } } } private function normalizeRowGroup(AbstractFrameDecorator $frame): void { $children = iterator_to_array($frame->get_children()); $tr = null; foreach ($children as $child) { $display = $child->get_style()->display; if ($display === "table-row") { // Reset anonymous tr $tr = null; continue; } // Remove empty text nodes between valid children if ($this->isEmptyTextNode($child)) { $frame->remove_child($child); continue; } // Catch consecutive misplaced frames within a single anonymous row if ($tr === null) { $tr = $frame->create_anonymous_child("tr", "table-row"); $frame->insert_child_before($tr, $child); } $tr->append_child($child); } // Handle empty row group: Make sure there is at least one row if (!$frame->get_first_child()) { $tr = $frame->create_anonymous_child("tr", "table-row"); $frame->append_child($tr); } foreach ($frame->get_children() as $child) { $this->normalizeRow($child); } } private function normalizeRow(AbstractFrameDecorator $frame): void { $children = iterator_to_array($frame->get_children()); $td = null; foreach ($children as $child) { $display = $child->get_style()->display; if ($display === "table-cell") { // Reset anonymous td $td = null; continue; } // Remove empty text nodes between valid children if ($this->isEmptyTextNode($child)) { $frame->remove_child($child); continue; } // Catch consecutive misplaced frames within a single anonymous cell if ($td === null) { $td = $frame->create_anonymous_child("td", "table-cell"); $frame->insert_child_before($td, $child); } $td->append_child($child); } // Handle empty row: Make sure there is at least one cell if (!$frame->get_first_child()) { $td = $frame->create_anonymous_child("td", "table-cell"); $frame->append_child($td); } } } PK_line_boxes = [new LineBox($this)]; $this->_cl = 0; $this->dangling_markers = []; } function reset() { parent::reset(); $this->_line_boxes = [new LineBox($this)]; $this->_cl = 0; $this->dangling_markers = []; } /** * @return LineBox */ function get_current_line_box() { return $this->_line_boxes[$this->_cl]; } /** * @return int */ function get_current_line_number() { return $this->_cl; } /** * @return LineBox[] */ function get_line_boxes() { return $this->_line_boxes; } /** * @param int $line_number * @return int */ function set_current_line_number($line_number) { $line_boxes_count = count($this->_line_boxes); $cl = max(min($line_number, $line_boxes_count), 0); return ($this->_cl = $cl); } /** * @param int $i */ function clear_line($i) { if (isset($this->_line_boxes[$i])) { unset($this->_line_boxes[$i]); } } /** * @param Frame $frame * @return LineBox|null */ public function add_frame_to_line(Frame $frame): ?LineBox { $current_line = $this->_line_boxes[$this->_cl]; $frame->set_containing_line($current_line); // Inline frames are currently treated as wrappers, and are not actually // added to the line if ($frame instanceof Inline) { return null; } $current_line->add_frame($frame); $this->increase_line_width($frame->get_margin_width()); $this->maximize_line_height($frame->get_margin_height(), $frame); // Add any dangling list markers to the first line box if it is inline if ($this->_cl === 0 && $current_line->inline && $this->dangling_markers !== [] ) { foreach ($this->dangling_markers as $marker) { $current_line->add_list_marker($marker); $this->maximize_line_height($marker->get_margin_height(), $marker); } $this->dangling_markers = []; } return $current_line; } /** * Remove the given frame and all following frames and lines from the block. * * @param Frame $frame */ public function remove_frames_from_line(Frame $frame): void { // Inline frames are not added to line boxes themselves, only their // text frame children $actualFrame = $frame; while ($actualFrame !== null && $actualFrame instanceof Inline) { $actualFrame = $actualFrame->get_first_child(); } if ($actualFrame === null) { return; } // Search backwards through the lines for $frame $frame = $actualFrame; $i = $this->_cl; $j = null; while ($i > 0) { $line = $this->_line_boxes[$i]; foreach ($line->get_frames() as $index => $f) { if ($frame === $f) { $j = $index; break 2; } } $i--; } if ($j === null) { return; } // Remove all lines that follow for ($k = $this->_cl; $k > $i; $k--) { unset($this->_line_boxes[$k]); } // Remove the line, if it is empty if ($j > 0) { $line->remove_frames($j); } else { unset($this->_line_boxes[$i]); } // Reset array indices $this->_line_boxes = array_values($this->_line_boxes); $this->_cl = count($this->_line_boxes) - 1; } /** * @param float $w */ public function increase_line_width(float $w): void { $this->_line_boxes[$this->_cl]->w += $w; } /** * @param float $val * @param Frame $frame */ public function maximize_line_height(float $val, Frame $frame): void { if ($val > $this->_line_boxes[$this->_cl]->h) { $this->_line_boxes[$this->_cl]->tallest_frame = $frame; $this->_line_boxes[$this->_cl]->h = $val; } } /** * @param bool $br */ public function add_line(bool $br = false): void { $line = $this->_line_boxes[$this->_cl]; $line->br = $br; $y = $line->y + $line->h; $new_line = new LineBox($this, $y); $this->_line_boxes[++$this->_cl] = $new_line; } /** * @param ListBullet $marker */ public function add_dangling_marker(ListBullet $marker): void { $this->dangling_markers[] = $marker; } /** * Inherit any dangling markers from the parent block. * * @param Block $block */ public function inherit_dangling_markers(self $block): void { if ($block->dangling_markers !== []) { $this->dangling_markers = $block->dangling_markers; $block->dangling_markers = []; } } } PK_frame->get_style(); if ($style->list_style_type === "none") { return 0.0; } return $style->font_size * self::BULLET_SIZE; } /** * Get the height of the bullet symbol. * * @return float */ public function get_height(): float { $style = $this->_frame->get_style(); if ($style->list_style_type === "none") { return 0.0; } return $style->font_size * self::BULLET_SIZE; } /** * Get the width of the bullet, including indentation. */ public function get_margin_width(): float { $style = $this->get_style(); if ($style->list_style_type === "none") { return 0.0; } return $style->font_size * (self::BULLET_SIZE + self::MARKER_INDENT); } /** * Get the line height for the bullet. * * This increases the height of the corresponding line box when necessary. */ public function get_margin_height(): float { $style = $this->get_style(); if ($style->list_style_type === "none") { return 0.0; } // TODO: This is a copy of `FrameDecorator\Text::get_margin_height()` // Would be nice to properly refactor that at some point $font = $style->font_family; $size = $style->font_size; $fontHeight = $this->_dompdf->getFontMetrics()->getFontHeight($font, $size); return ($style->line_height / ($size > 0 ? $size : 1)) * $fontHeight; } } PK_page_full = false; $this->_in_table = 0; $this->bottom_page_edge = null; } /** * Set the renderer used for this pdf * * @param Renderer $renderer the renderer to use */ function set_renderer($renderer) { $this->_renderer = $renderer; } /** * Return the renderer used for this pdf * * @return Renderer */ function get_renderer() { return $this->_renderer; } /** * Calculate the bottom edge of the page area after margins have been * applied for the current page. */ public function calculate_bottom_page_edge(): void { [, , , $cbh] = $this->get_containing_block(); $style = $this->get_style(); $margin_bottom = (float) $style->length_in_pt($style->margin_bottom, $cbh); $this->bottom_page_edge = $cbh - $margin_bottom; } /** * Returns true if the page is full and is no longer accepting frames. * * @return bool */ function is_full() { return $this->_page_full; } /** * Start a new page by resetting the full flag. */ function next_page() { $this->_floating_frames = []; $this->_renderer->new_page(); $this->_page_full = false; } /** * Indicate to the page that a table is currently being reflowed. */ function table_reflow_start() { $this->_in_table++; } /** * Indicate to the page that table reflow is finished. */ function table_reflow_end() { $this->_in_table--; } /** * Return whether we are currently in a nested table or not * * @return bool */ function in_nested_table() { return $this->_in_table > 1; } /** * Check if a forced page break is required before $frame. This uses the * frame's page_break_before property as well as the preceding frame's * page_break_after property. * * @link http://www.w3.org/TR/CSS21/page.html#forced * * @param AbstractFrameDecorator $frame the frame to check * * @return bool true if a page break occurred */ function check_forced_page_break(Frame $frame) { // Skip check if page is already split and for the body if ($this->_page_full || $frame->get_node()->nodeName === "body") { return false; } $page_breaks = ["always", "left", "right"]; $style = $frame->get_style(); if (($frame->is_block_level() || $style->display === "table-row") && in_array($style->page_break_before, $page_breaks, true) ) { // Prevent cascading splits $frame->split(null, true, true); $style->page_break_before = "auto"; $this->_page_full = true; $frame->_already_pushed = true; return true; } // Find the preceding block-level sibling (or table row). Inline // elements are treated as if wrapped in an anonymous block container // here. See https://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level $prev = $frame->get_prev_sibling(); while ($prev && (($prev->is_text_node() && $prev->get_node()->nodeValue === "") || $prev->get_node()->nodeName === "bullet") ) { $prev = $prev->get_prev_sibling(); } if ($prev && ($prev->is_block_level() || $prev->get_style()->display === "table-row")) { if (in_array($prev->get_style()->page_break_after, $page_breaks, true)) { // Prevent cascading splits $frame->split(null, true, true); $prev->get_style()->page_break_after = "auto"; $this->_page_full = true; $frame->_already_pushed = true; return true; } $prev_last_child = $prev->get_last_child(); while ($prev_last_child && (($prev_last_child->is_text_node() && $prev_last_child->get_node()->nodeValue === "") || $prev_last_child->get_node()->nodeName === "bullet") ) { $prev_last_child = $prev_last_child->get_prev_sibling(); } if ($prev_last_child && $prev_last_child->is_block_level() && in_array($prev_last_child->get_style()->page_break_after, $page_breaks, true) ) { $frame->split(null, true, true); $prev_last_child->get_style()->page_break_after = "auto"; $this->_page_full = true; $frame->_already_pushed = true; return true; } } return false; } /** * Check for a gap between the top content edge of a frame and its child * content. * * Additionally, the top margin, border, and padding of the frame must fit * on the current page. * * @param float $childPos The top margin or line-box edge of the child content. * @param Frame $frame The parent frame to check. * @return bool */ protected function hasGap(float $childPos, Frame $frame): bool { $style = $frame->get_style(); $cbw = $frame->get_containing_block("w"); $contentEdge = $frame->get_position("y") + (float) $style->length_in_pt([ $style->margin_top, $style->border_top_width, $style->padding_top ], $cbw); return Helpers::lengthGreater($childPos, $contentEdge) && Helpers::lengthLessOrEqual($contentEdge, $this->bottom_page_edge); } /** * Determine if a page break is allowed before $frame * http://www.w3.org/TR/CSS21/page.html#allowed-page-breaks * * In the normal flow, page breaks can occur at the following places: * * 1. In the vertical margin between block boxes. When an * unforced page break occurs here, the used values of the * relevant 'margin-top' and 'margin-bottom' properties are set * to '0'. When a forced page break occurs here, the used value * of the relevant 'margin-bottom' property is set to '0'; the * relevant 'margin-top' used value may either be set to '0' or * retained. * 2. Between line boxes inside a block container box. * 3. Between the content edge of a block container box and the * outer edges of its child content (margin edges of block-level * children or line box edges for inline-level children) if there * is a (non-zero) gap between them. * * These breaks are subject to the following rules: * * * Rule A: Breaking at (1) is allowed only if the * 'page-break-after' and 'page-break-before' properties of all * the elements generating boxes that meet at this margin allow * it, which is when at least one of them has the value * 'always', 'left', or 'right', or when all of them are 'auto'. * * * Rule B: However, if all of them are 'auto' and a common * ancestor of all the elements has a 'page-break-inside' value * of 'avoid', then breaking here is not allowed. * * * Rule C: Breaking at (2) is allowed only if the number of line * boxes between the break and the start of the enclosing block * box is the value of 'orphans' or more, and the number of line * boxes between the break and the end of the box is the value * of 'widows' or more. * * * Rule D: In addition, breaking at (2) or (3) is allowed only * if the 'page-break-inside' property of the element and all * its ancestors is 'auto'. * * If the above does not provide enough break points to keep content * from overflowing the page boxes, then rules A, B and D are * dropped in order to find additional breakpoints. * * If that still does not lead to sufficient break points, rule C is * dropped as well, to find still more break points. * * We also allow breaks between table rows. * * @param AbstractFrameDecorator $frame the frame to check * * @return bool true if a break is allowed, false otherwise */ protected function _page_break_allowed(Frame $frame) { Helpers::dompdf_debug("page-break", "_page_break_allowed(" . $frame->get_node()->nodeName . ")"); $display = $frame->get_style()->display; // Block Frames (1): if ($frame->is_block_level() || $display === "-dompdf-image") { // Avoid breaks within table-cells if ($this->_in_table > ($display === "table" ? 1 : 0)) { Helpers::dompdf_debug("page-break", "In table: " . $this->_in_table); return false; } // Rule A if ($frame->get_style()->page_break_before === "avoid") { Helpers::dompdf_debug("page-break", "before: avoid"); return false; } // Find the preceding block-level sibling. Inline elements are // treated as if wrapped in an anonymous block container here. See // https://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level $prev = $frame->get_prev_sibling(); while ($prev && (($prev->is_text_node() && $prev->get_node()->nodeValue === "") || $prev->get_node()->nodeName === "bullet") ) { $prev = $prev->get_prev_sibling(); } // Does the previous element allow a page break after? if ($prev && ($prev->is_block_level() || $prev->get_style()->display === "-dompdf-image") && $prev->get_style()->page_break_after === "avoid" ) { Helpers::dompdf_debug("page-break", "after: avoid"); return false; } // Rules B & D $parent = $frame->get_parent(); $p = $parent; while ($p) { if ($p->get_style()->page_break_inside === "avoid") { Helpers::dompdf_debug("page-break", "parent->inside: avoid"); return false; } $p = $p->find_block_parent(); } // To prevent cascading page breaks when a top-level element has // page-break-inside: avoid, ensure that at least one frame is // on the page before splitting. if ($parent->get_node()->nodeName === "body" && !$prev) { // We are the body's first child Helpers::dompdf_debug("page-break", "Body's first child."); return false; } // Check for a possible type (3) break if (!$prev && $parent && !$this->hasGap($frame->get_position("y"), $parent)) { Helpers::dompdf_debug("page-break", "First block-level frame, no gap"); return false; } Helpers::dompdf_debug("page-break", "block: break allowed"); return true; } // Inline frames (2): else { if ($frame->is_inline_level()) { // Avoid breaks within table-cells if ($this->_in_table) { Helpers::dompdf_debug("page-break", "In table: " . $this->_in_table); return false; } // Rule C $block_parent = $frame->find_block_parent(); $parent_style = $block_parent->get_style(); $line = $block_parent->get_current_line_box(); $line_count = count($block_parent->get_line_boxes()); $line_number = $frame->get_containing_line() && empty($line->get_frames()) ? $line_count - 1 : $line_count; // The line number of the frame can be less than the current // number of line boxes, in case we are backtracking. As long as // we are not checking for widows yet, just checking against the // number of line boxes is sufficient in most cases, though. if ($line_number <= $parent_style->orphans) { Helpers::dompdf_debug("page-break", "orphans"); return false; } // FIXME: Checking widows is tricky without having laid out the // remaining line boxes. Just ignore it for now... // Rule D $p = $block_parent; while ($p) { if ($p->get_style()->page_break_inside === "avoid") { Helpers::dompdf_debug("page-break", "parent->inside: avoid"); return false; } $p = $p->find_block_parent(); } // To prevent cascading page breaks when a top-level element has // page-break-inside: avoid, ensure that at least one frame with // some content is on the page before splitting. $prev = $frame->get_prev_sibling(); while ($prev && ($prev->is_text_node() && trim($prev->get_node()->nodeValue) == "")) { $prev = $prev->get_prev_sibling(); } if ($block_parent->get_node()->nodeName === "body" && !$prev) { // We are the body's first child Helpers::dompdf_debug("page-break", "Body's first child."); return false; } Helpers::dompdf_debug("page-break", "inline: break allowed"); return true; // Table-rows } else { if ($display === "table-row") { // If this is a nested table, prevent the page from breaking if ($this->_in_table > 1) { Helpers::dompdf_debug("page-break", "table: nested table"); return false; } // Rule A (table row) if ($frame->get_style()->page_break_before === "avoid") { Helpers::dompdf_debug("page-break", "before: avoid"); return false; } // Find the preceding row $prev = $frame->get_prev_sibling(); if (!$prev) { $prev_group = $frame->get_parent()->get_prev_sibling(); if ($prev_group && in_array($prev_group->get_style()->display, Table::ROW_GROUPS, true) ) { $prev = $prev_group->get_last_child(); } } // Check if a page break is allowed after the preceding row if ($prev && $prev->get_style()->page_break_after === "avoid") { Helpers::dompdf_debug("page-break", "after: avoid"); return false; } // Avoid breaking before the first row of a table if (!$prev) { Helpers::dompdf_debug("page-break", "table: first-row"); return false; } // Rule B (table row) // Check if the page_break_inside property is not 'avoid' // for the parent table or any of its ancestors $table = Table::find_parent_table($frame); $p = $table; while ($p) { if ($p->get_style()->page_break_inside === "avoid") { Helpers::dompdf_debug("page-break", "parent->inside: avoid"); return false; } $p = $p->find_block_parent(); } Helpers::dompdf_debug("page-break", "table-row: break allowed"); return true; } else { if (in_array($display, Table::ROW_GROUPS, true)) { // Disallow breaks at row-groups: only split at row boundaries return false; } else { Helpers::dompdf_debug("page-break", "? " . $display); return false; } } } } } /** * Check if $frame will fit on the page. If the frame does not fit, * the frame tree is modified so that a page break occurs in the * correct location. * * @param AbstractFrameDecorator $frame the frame to check * * @return bool */ function check_page_break(Frame $frame) { if ($this->_page_full || $frame->_already_pushed // Never check for breaks on empty text nodes || ($frame->is_text_node() && $frame->get_node()->nodeValue === "") ) { return false; } $p = $frame; do { $display = $p->get_style()->display; if ($display == "table-row") { if ($p->_already_pushed) { return false; } } } while ($p = $p->get_parent()); // If the frame is absolute or fixed it shouldn't break $p = $frame; do { if ($p->is_absolute()) { return false; } } while ($p = $p->get_parent()); $margin_height = $frame->get_margin_height(); // Determine the frame's maximum y value $max_y = (float)$frame->get_position("y") + $margin_height; // If a split is to occur here, then the bottom margins & paddings of all // parents of $frame must fit on the page as well: $p = $frame->get_parent(); while ($p && $p !== $this) { $cbw = $p->get_containing_block("w"); $max_y += (float) $p->get_style()->computed_bottom_spacing($cbw); $p = $p->get_parent(); } // Check if $frame flows off the page if (Helpers::lengthLessOrEqual($max_y, $this->bottom_page_edge)) { // no: do nothing return false; } Helpers::dompdf_debug("page-break", "check_page_break"); Helpers::dompdf_debug("page-break", "in_table: " . $this->_in_table); // yes: determine page break location $iter = $frame; $flg = false; $pushed_flg = false; $in_table = $this->_in_table; Helpers::dompdf_debug("page-break", "Starting search"); while ($iter) { // echo "\nbacktrack: " .$iter->get_node()->nodeName ." ".spl_object_hash($iter->get_node()). ""; if ($iter === $this) { Helpers::dompdf_debug("page-break", "reached root."); // We've reached the root in our search. Just split at $frame. break; } if ($iter->_already_pushed) { $pushed_flg = true; } elseif ($this->_page_break_allowed($iter)) { Helpers::dompdf_debug("page-break", "break allowed, splitting."); $iter->split(null, true); $this->_page_full = true; $this->_in_table = $in_table; $iter->_already_pushed = true; $frame->_already_pushed = true; return true; } if (!$flg && $next = $iter->get_last_child()) { Helpers::dompdf_debug("page-break", "following last child."); if ($next->is_table()) { $this->_in_table++; } $iter = $next; $pushed_flg = false; continue; } if ($pushed_flg) { // The frame was already pushed, avoid breaking on a previous page break; } $next = $iter->get_prev_sibling(); // Skip empty text nodes while ($next && $next->is_text_node() && $next->get_node()->nodeValue === "") { $next = $next->get_prev_sibling(); } if ($next) { Helpers::dompdf_debug("page-break", "following prev sibling."); if ($next->is_table() && !$iter->is_table()) { $this->_in_table++; } elseif (!$next->is_table() && $iter->is_table()) { $this->_in_table--; } $iter = $next; $flg = false; continue; } if ($next = $iter->get_parent()) { Helpers::dompdf_debug("page-break", "following parent."); if ($iter->is_table()) { $this->_in_table--; } $iter = $next; $flg = true; continue; } break; } $this->_in_table = $in_table; // No valid page break found. Just break at $frame. Helpers::dompdf_debug("page-break", "no valid break found, just splitting."); // If we are in a table, backtrack to the nearest top-level table row if ($this->_in_table) { $iter = $frame; while ($iter && $iter->get_style()->display !== "table-row" && $iter->get_style()->display !== 'table-row-group' && $iter->_already_pushed === false) { $iter = $iter->get_parent(); } if ($iter) { $iter->split(null, true); $iter->_already_pushed = true; } else { return false; } } else { $frame->split(null, true); } $this->_page_full = true; $frame->_already_pushed = true; return true; } //........................................................................ public function split(?Frame $child = null, bool $page_break = false, bool $forced = false): void { // Do nothing } /** * Add a floating frame * * @param Frame $frame * * @return void */ function add_floating_frame(Frame $frame) { array_unshift($this->_floating_frames, $frame); } /** * @return Frame[] */ function get_floating_frames() { return $this->_floating_frames; } /** * @param $key */ public function remove_floating_frame($key) { unset($this->_floating_frames[$key]); } /** * @param Frame $child * @return int|mixed */ public function get_lowest_float_offset(Frame $child) { $style = $child->get_style(); $side = $style->clear; $float = $style->float; $y = 0; if ($float === "none") { foreach ($this->_floating_frames as $key => $frame) { if ($side === "both" || $frame->get_style()->float === $side) { $y = max($y, $frame->get_position("y") + $frame->get_margin_height()); } $this->remove_floating_frame($key); } } if ($y > 0) { $y++; // add 1px buffer from float } return $y; } } PKget_parent(); $cellmap = $parent->get_cellmap(); $iter = $child; while ($iter) { $cellmap->remove_row($iter); $iter = $iter->get_next_sibling(); } // Remove all subsequent row groups from the cellmap $iter = $this->get_next_sibling(); while ($iter) { $cellmap->remove_row_group($iter); $iter = $iter->get_next_sibling(); } // If we are splitting at the first child remove the // table-row-group from the cellmap as well if ($child === $this->get_first_child()) { $cellmap->remove_row_group($this); parent::split(null, $page_break, $forced); return; } $cellmap->update_row_group($this, $child->get_prev_sibling()); parent::split($child, $page_break, $forced); } } PK counter_value) (for generated content) * * @var array */ public $_counters = []; /** * The root node of the DOM tree * * @var Frame */ protected $_root; /** * The decorated frame * * @var Frame */ protected $_frame; /** * AbstractPositioner object used to position this frame (Strategy pattern) * * @var AbstractPositioner */ protected $_positioner; /** * Reflower object used to calculate frame dimensions (Strategy pattern) * * @var AbstractFrameReflower */ protected $_reflower; /** * Reference to the current dompdf instance * * @var Dompdf */ protected $_dompdf; /** * First block parent * * @var Block */ private $_block_parent; /** * First positioned parent (position: relative | absolute | fixed) * * @var AbstractFrameDecorator */ private $_positioned_parent; /** * Cache for the get_parent while loop results * * @var Frame */ private $_cached_parent; /** * Whether generated content and counters have been set. * * @var bool */ public $content_set = false; /** * Whether the frame has been split * * @var bool */ public $is_split = false; /** * Whether the frame is a split-off frame * * @var bool */ public $is_split_off = false; /** * Class constructor * * @param Frame $frame The decoration target * @param Dompdf $dompdf The Dompdf object */ function __construct(Frame $frame, Dompdf $dompdf) { $this->_frame = $frame; $this->_root = null; $this->_dompdf = $dompdf; $frame->set_decorator($this); } /** * "Destructor": forcibly free all references held by this object * * @param bool $recursive if true, call dispose on all children */ function dispose($recursive = false) { if ($recursive) { while ($child = $this->get_first_child()) { $child->dispose(true); } } $this->_root = null; unset($this->_root); $this->_frame->dispose(true); $this->_frame = null; unset($this->_frame); $this->_positioner = null; unset($this->_positioner); $this->_reflower = null; unset($this->_reflower); } /** * Return a copy of this frame with $node as its node * * @param DOMNode $node * * @return AbstractFrameDecorator */ function copy(DOMNode $node) { $frame = new Frame($node); $style = clone $this->_frame->get_style(); $style->reset(); $frame->set_style($style); if ($node instanceof DOMElement && $node->hasAttribute("id")) { $node->setAttribute("data-dompdf-original-id", $node->getAttribute("id")); $node->removeAttribute("id"); } return Factory::decorate_frame($frame, $this->_dompdf, $this->_root); } /** * Create a deep copy: copy this node and all children * * @return AbstractFrameDecorator */ function deep_copy() { $node = $this->_frame->get_node()->cloneNode(); $frame = new Frame($node); $style = clone $this->_frame->get_style(); $style->reset(); $frame->set_style($style); if ($node instanceof DOMElement && $node->hasAttribute("id")) { $node->setAttribute("data-dompdf-original-id", $node->getAttribute("id")); $node->removeAttribute("id"); } $deco = Factory::decorate_frame($frame, $this->_dompdf, $this->_root); foreach ($this->get_children() as $child) { $deco->append_child($child->deep_copy()); } return $deco; } /** * Create an anonymous child frame, inheriting styles from this frame. * * @param string $node_name * @param string $display * * @return AbstractFrameDecorator */ public function create_anonymous_child(string $node_name, string $display): AbstractFrameDecorator { $style = $this->get_style(); $child_style = $style->get_stylesheet()->create_style(); $child_style->set_prop("display", $display); $child_style->inherit($style); $node = $this->get_node()->ownerDocument->createElement($node_name); $frame = new Frame($node); $frame->set_style($child_style); return Factory::decorate_frame($frame, $this->_dompdf, $this->_root); } function reset() { $this->_frame->reset(); $this->_reflower->reset(); $this->reset_generated_content(); $this->revert_counter_increment(); $this->content_set = false; $this->_counters = []; // clear parent lookup caches $this->_cached_parent = null; $this->_block_parent = null; $this->_positioned_parent = null; // Reset all children foreach ($this->get_children() as $child) { $child->reset(); } } /** * If this represents a generated node then child nodes represent generated * content. Remove the children since the content will be generated next * time this frame is reflowed. */ protected function reset_generated_content(): void { if ($this->content_set && $this->get_node()->nodeName === "dompdf_generated" ) { $content = $this->get_style()->content; if ($content !== "normal" && $content !== "none") { foreach ($this->get_children() as $child) { $this->remove_child($child); } } } } /** * Decrement any counters that were incremented on the current node, unless * that node is the body. */ protected function revert_counter_increment(): void { if ($this->content_set && $this->get_node()->nodeName !== "body" && ($decrement = $this->get_style()->counter_increment) !== "none" ) { $this->decrement_counters($decrement); } } // Getters ----------- function get_id() { return $this->_frame->get_id(); } /** * @return Frame */ function get_frame() { return $this->_frame; } function get_node() { return $this->_frame->get_node(); } function get_style() { return $this->_frame->get_style(); } /** * @deprecated */ function get_original_style() { return $this->_frame->get_style(); } function get_containing_block($i = null) { return $this->_frame->get_containing_block($i); } function get_position($i = null) { return $this->_frame->get_position($i); } /** * @return Dompdf */ function get_dompdf() { return $this->_dompdf; } public function get_margin_width(): float { return $this->_frame->get_margin_width(); } public function get_margin_height(): float { return $this->_frame->get_margin_height(); } public function get_content_box(): array { return $this->_frame->get_content_box(); } public function get_padding_box(): array { return $this->_frame->get_padding_box(); } public function get_border_box(): array { return $this->_frame->get_border_box(); } function set_id($id) { $this->_frame->set_id($id); } public function set_style(Style $style): void { $this->_frame->set_style($style); } function set_containing_block($x = null, $y = null, $w = null, $h = null) { $this->_frame->set_containing_block($x, $y, $w, $h); } function set_position($x = null, $y = null) { $this->_frame->set_position($x, $y); } function is_auto_height() { return $this->_frame->is_auto_height(); } function is_auto_width() { return $this->_frame->is_auto_width(); } function __toString() { return $this->_frame->__toString(); } function prepend_child(Frame $child, $update_node = true) { while ($child instanceof AbstractFrameDecorator) { $child = $child->_frame; } $this->_frame->prepend_child($child, $update_node); } function append_child(Frame $child, $update_node = true) { while ($child instanceof AbstractFrameDecorator) { $child = $child->_frame; } $this->_frame->append_child($child, $update_node); } function insert_child_before(Frame $new_child, Frame $ref, $update_node = true) { while ($new_child instanceof AbstractFrameDecorator) { $new_child = $new_child->_frame; } if ($ref instanceof AbstractFrameDecorator) { $ref = $ref->_frame; } $this->_frame->insert_child_before($new_child, $ref, $update_node); } function insert_child_after(Frame $new_child, Frame $ref, $update_node = true) { $insert_frame = $new_child; while ($insert_frame instanceof AbstractFrameDecorator) { $insert_frame = $insert_frame->_frame; } $reference_frame = $ref; while ($reference_frame instanceof AbstractFrameDecorator) { $reference_frame = $reference_frame->_frame; } $this->_frame->insert_child_after($insert_frame, $reference_frame, $update_node); } function remove_child(Frame $child, $update_node = true) { while ($child instanceof AbstractFrameDecorator) { $child = $child->_frame; } return $this->_frame->remove_child($child, $update_node); } /** * @param bool $use_cache * @return AbstractFrameDecorator */ function get_parent($use_cache = true) { if ($use_cache && $this->_cached_parent) { return $this->_cached_parent; } $p = $this->_frame->get_parent(); if ($p && $deco = $p->get_decorator()) { while ($tmp = $deco->get_decorator()) { $deco = $tmp; } return $this->_cached_parent = $deco; } else { return $this->_cached_parent = $p; } } /** * @return AbstractFrameDecorator */ function get_first_child() { $c = $this->_frame->get_first_child(); if ($c && $deco = $c->get_decorator()) { while ($tmp = $deco->get_decorator()) { $deco = $tmp; } return $deco; } else { if ($c) { return $c; } } return null; } /** * @return AbstractFrameDecorator */ function get_last_child() { $c = $this->_frame->get_last_child(); if ($c && $deco = $c->get_decorator()) { while ($tmp = $deco->get_decorator()) { $deco = $tmp; } return $deco; } else { if ($c) { return $c; } } return null; } /** * @return AbstractFrameDecorator */ function get_prev_sibling() { $s = $this->_frame->get_prev_sibling(); if ($s && $deco = $s->get_decorator()) { while ($tmp = $deco->get_decorator()) { $deco = $tmp; } return $deco; } else { if ($s) { return $s; } } return null; } /** * @return AbstractFrameDecorator */ function get_next_sibling() { $s = $this->_frame->get_next_sibling(); if ($s && $deco = $s->get_decorator()) { while ($tmp = $deco->get_decorator()) { $deco = $tmp; } return $deco; } else { if ($s) { return $s; } } return null; } /** * @return FrameListIterator */ public function get_children(): FrameListIterator { return new FrameListIterator($this); } /** * @return FrameTreeIterator */ function get_subtree(): FrameTreeIterator { return new FrameTreeIterator($this); } function set_positioner(AbstractPositioner $posn) { $this->_positioner = $posn; if ($this->_frame instanceof AbstractFrameDecorator) { $this->_frame->set_positioner($posn); } } function set_reflower(AbstractFrameReflower $reflower) { $this->_reflower = $reflower; if ($this->_frame instanceof AbstractFrameDecorator) { $this->_frame->set_reflower($reflower); } } /** * @return AbstractPositioner */ function get_positioner() { return $this->_positioner; } /** * @return AbstractFrameReflower */ function get_reflower() { return $this->_reflower; } /** * @param Frame $root */ function set_root(Frame $root) { $this->_root = $root; if ($this->_frame instanceof AbstractFrameDecorator) { $this->_frame->set_root($root); } } /** * @return Page */ function get_root() { return $this->_root; } /** * @return Block */ function find_block_parent() { // Find our nearest block level parent if (isset($this->_block_parent)) { return $this->_block_parent; } $p = $this->get_parent(); while ($p) { if ($p->is_block()) { break; } $p = $p->get_parent(); } return $this->_block_parent = $p; } /** * @return AbstractFrameDecorator */ function find_positioned_parent() { // Find our nearest relative positioned parent if (isset($this->_positioned_parent)) { return $this->_positioned_parent; } $p = $this->get_parent(); while ($p) { if ($p->is_positioned()) { break; } $p = $p->get_parent(); } if (!$p) { $p = $this->_root; } return $this->_positioned_parent = $p; } /** * Split this frame at $child. * The current frame is cloned and $child and all children following * $child are added to the clone. The clone is then passed to the * current frame's parent->split() method. * * @param Frame|null $child * @param bool $page_break * @param bool $forced Whether the page break is forced. * * @throws Exception */ public function split(?Frame $child = null, bool $page_break = false, bool $forced = false): void { if (is_null($child)) { $this->get_parent()->split($this, $page_break, $forced); return; } if ($child->get_parent() !== $this) { throw new Exception("Unable to split: frame is not a child of this one."); } $this->revert_counter_increment(); $node = $this->_frame->get_node(); $split = $this->copy($node->cloneNode()); $style = $this->_frame->get_style(); $split_style = $split->get_style(); // Truncate the box decoration at the split, except for the body if ($node->nodeName !== "body") { // Clear bottom decoration of original frame $style->margin_bottom = 0.0; $style->padding_bottom = 0.0; $style->border_bottom_width = 0.0; $style->border_bottom_left_radius = 0.0; $style->border_bottom_right_radius = 0.0; // Clear top decoration of split frame $split_style->margin_top = 0.0; $split_style->padding_top = 0.0; $split_style->border_top_width = 0.0; $split_style->border_top_left_radius = 0.0; $split_style->border_top_right_radius = 0.0; $split_style->page_break_before = "auto"; } $split_style->text_indent = 0.0; $split_style->counter_reset = "none"; $this->is_split = true; $split->is_split_off = true; $split->_already_pushed = true; $this->get_parent()->insert_child_after($split, $this); if ($this instanceof Block) { // Remove the frames that will be moved to the new split node from // the line boxes $this->remove_frames_from_line($child); // recalculate the float offsets after paging foreach ($this->get_line_boxes() as $line_box) { $line_box->get_float_offsets(); } } if (!$forced) { // Reset top margin in case of an unforced page break // https://www.w3.org/TR/CSS21/page.html#allowed-page-breaks $child->get_style()->margin_top = 0.0; } // Add $child and all following siblings to the new split node $iter = $child; while ($iter) { $frame = $iter; $iter = $iter->get_next_sibling(); $frame->reset(); $split->append_child($frame); } $this->get_parent()->split($split, $page_break, $forced); // Preserve the current counter values. This must be done after the // parent split, as counters get reset on frame reset $split->_counters = $this->_counters; } /** * @param array $counters */ public function reset_counters(array $counters): void { foreach ($counters as $id => $value) { $this->reset_counter($id, $value); } } /** * @param string $id * @param int $value */ public function reset_counter(string $id = self::DEFAULT_COUNTER, int $value = 0): void { $this->get_parent()->_counters[$id] = $value; } /** * @param array $counters */ public function decrement_counters(array $counters): void { foreach ($counters as $id => $increment) { $this->increment_counter($id, $increment * -1); } } /** * @param array $counters */ public function increment_counters(array $counters): void { foreach ($counters as $id => $increment) { $this->increment_counter($id, $increment); } } /** * @param string $id * @param int $increment */ public function increment_counter(string $id = self::DEFAULT_COUNTER, int $increment = 1): void { $counter_frame = $this->lookup_counter_frame($id); if ($counter_frame) { if (!isset($counter_frame->_counters[$id])) { $counter_frame->_counters[$id] = 0; } $counter_frame->_counters[$id] += $increment; } } /** * @param string $id * @return AbstractFrameDecorator|null */ function lookup_counter_frame($id = self::DEFAULT_COUNTER) { $f = $this->get_parent(); while ($f) { if (isset($f->_counters[$id])) { return $f; } $fp = $f->get_parent(); if (!$fp) { return $f; } $f = $fp; } return null; } /** * @param string $id * @param string $type * @return bool|string * * TODO: What version is the best : this one or the one in ListBullet ? */ function counter_value(string $id = self::DEFAULT_COUNTER, string $type = "decimal") { $type = mb_strtolower($type); if (!isset($this->_counters[$id])) { $this->_counters[$id] = 0; } $value = $this->_counters[$id]; switch ($type) { default: case "decimal": return $value; case "decimal-leading-zero": return str_pad($value, 2, "0", STR_PAD_LEFT); case "lower-roman": return Helpers::dec2roman($value); case "upper-roman": return mb_strtoupper(Helpers::dec2roman($value)); case "lower-latin": case "lower-alpha": return chr((($value - 1) % 26) + ord('a')); case "upper-latin": case "upper-alpha": return chr((($value - 1) % 26) + ord('A')); case "lower-greek": return Helpers::unichr($value + 944); case "upper-greek": return Helpers::unichr($value + 912); } } final function position() { $this->_positioner->position($this); } /** * @param float $offset_x * @param float $offset_y * @param bool $ignore_self */ final function move(float $offset_x, float $offset_y, bool $ignore_self = false): void { $this->_positioner->move($this, $offset_x, $offset_y, $ignore_self); } /** * @param Block|null $block */ final function reflow(Block $block = null) { // Uncomment this to see the frames before they're laid out, instead of // during rendering. //echo $this->_frame; flush(); $this->_reflower->reflow($block); } /** * @return array */ final public function get_min_max_width(): array { return $this->_reflower->get_min_max_width(); } } PKget_style(); $font = $style->font_family; $size = $style->font_size; $fontHeight = $this->_dompdf->getFontMetrics()->getFontHeight($font, $size); return ($style->line_height / ($size > 0 ? $size : 1)) * $fontHeight; } public function split(?Frame $child = null, bool $page_break = false, bool $forced = false): void { if (is_null($child)) { $this->get_parent()->split($this, $page_break, $forced); return; } if ($child->get_parent() !== $this) { throw new Exception("Unable to split: frame is not a child of this one."); } $this->revert_counter_increment(); $node = $this->_frame->get_node(); $split = $this->copy($node->cloneNode()); $style = $this->_frame->get_style(); $split_style = $split->get_style(); // Unset the current node's right style properties $style->margin_right = 0.0; $style->padding_right = 0.0; $style->border_right_width = 0.0; $style->border_top_right_radius = 0.0; $style->border_bottom_right_radius = 0.0; // Unset the split node's left style properties since we don't want them // to propagate $split_style->margin_left = 0.0; $split_style->padding_left = 0.0; $split_style->border_left_width = 0.0; $split_style->border_top_left_radius = 0.0; $split_style->border_bottom_left_radius = 0.0; // If this is a generated node don't propagate the content style if ($split->get_node()->nodeName == "dompdf_generated") { $split_style->content = "normal"; } //On continuation of inline element on next line, //don't repeat non-horizontally repeatable background images //See e.g. in testcase image_variants, long descriptions if (($url = $style->background_image) && $url !== "none" && ($repeat = $style->background_repeat) && $repeat !== "repeat" && $repeat !== "repeat-x" ) { $split_style->background_image = "none"; } $this->get_parent()->insert_child_after($split, $this); // Add $child and all following siblings to the new split node $iter = $child; while ($iter) { $frame = $iter; $iter = $iter->get_next_sibling(); $frame->reset(); $split->append_child($frame); } $parent = $this->get_parent(); if ($page_break) { $parent->split($split, $page_break, $forced); } elseif ($parent instanceof Inline) { $parent->split($split); } } } PKis_text_node()) { throw new Exception("Text_Decorator can only be applied to #text nodes."); } parent::__construct($frame, $dompdf); $this->text_spacing = 0.0; } function reset() { parent::reset(); $this->text_spacing = 0.0; } // Accessor methods /** * @return float */ public function get_text_spacing(): float { return $this->text_spacing; } /** * @return string */ function get_text() { // FIXME: this should be in a child class (and is incorrect) // if ( $this->_frame->get_style()->content !== "normal" ) { // $this->_frame->get_node()->data = $this->_frame->get_style()->content; // $this->_frame->get_style()->content = "normal"; // } // Helpers::pre_r("---"); // $style = $this->_frame->get_style(); // var_dump($text = $this->_frame->get_node()->data); // var_dump($asc = utf8_decode($text)); // for ($i = 0; $i < strlen($asc); $i++) // Helpers::pre_r("$i: " . $asc[$i] . " - " . ord($asc[$i])); // Helpers::pre_r("width: " . $this->_dompdf->getFontMetrics()->getTextWidth($text, $style->font_family, $style->font_size)); return $this->_frame->get_node()->data; } //........................................................................ /** * Vertical padding, border, and margin do not apply when determining the * height for inline frames. * * http://www.w3.org/TR/CSS21/visudet.html#inline-non-replaced * * The vertical padding, border and margin of an inline, non-replaced box * start at the top and bottom of the content area, not the * 'line-height'. But only the 'line-height' is used to calculate the * height of the line box. * * @return float */ public function get_margin_height(): float { // This function is also called in add_frame_to_line() and is used to // determine the line height $style = $this->get_style(); $font = $style->font_family; $size = $style->font_size; $fontHeight = $this->_dompdf->getFontMetrics()->getFontHeight($font, $size); return ($style->line_height / ($size > 0 ? $size : 1)) * $fontHeight; } public function get_padding_box(): array { $style = $this->_frame->get_style(); $pb = $this->_frame->get_padding_box(); $pb[3] = $pb["h"] = (float) $style->length_in_pt($style->height); return $pb; } /** * @param float $spacing */ public function set_text_spacing(float $spacing): void { $this->text_spacing = $spacing; $this->recalculate_width(); } /** * Recalculate the text width * * @return float */ public function recalculate_width(): float { $fontMetrics = $this->_dompdf->getFontMetrics(); $style = $this->get_style(); $text = $this->get_text(); $font = $style->font_family; $size = $style->font_size; $word_spacing = $this->text_spacing + $style->word_spacing; $letter_spacing = $style->letter_spacing; $text_width = $fontMetrics->getTextWidth($text, $font, $size, $word_spacing, $letter_spacing); $style->set_used("width", $text_width); return $text_width; } // Text manipulation methods /** * Split the text in this frame at the offset specified. The remaining * text is added as a sibling frame following this one and is returned. * * @param int $offset * @return Frame|null */ function split_text($offset) { if ($offset == 0) { return null; } $split = $this->_frame->get_node()->splitText($offset); if ($split === false) { return null; } $deco = $this->copy($split); $p = $this->get_parent(); $p->insert_child_after($deco, $this, false); if ($p instanceof Inline) { $p->split($deco); } return $deco; } /** * @param int $offset * @param int $count */ function delete_text($offset, $count) { $this->_frame->get_node()->deleteData($offset, $count); } /** * @param string $text */ function set_text($text) { $this->_frame->get_node()->data = $text; } } PKget_node()->getAttribute("src"); $debug_png = $dompdf->getOptions()->getDebugPng(); if ($debug_png) { print '[__construct ' . $url . ']'; } list($this->_image_url, /*$type*/, $this->_image_msg) = Cache::resolve_url( $url, $dompdf->getProtocol(), $dompdf->getBaseHost(), $dompdf->getBasePath(), $dompdf->getOptions() ); if (Cache::is_broken($this->_image_url) && $alt = $frame->get_node()->getAttribute("alt") ) { $fontMetrics = $dompdf->getFontMetrics(); $style = $frame->get_style(); $font = $style->font_family; $size = $style->font_size; $word_spacing = $style->word_spacing; $letter_spacing = $style->letter_spacing; $style->width = (4 / 3) * $fontMetrics->getTextWidth($alt, $font, $size, $word_spacing, $letter_spacing); $style->height = $fontMetrics->getFontHeight($font, $size); } } /** * Get the intrinsic pixel dimensions of the image. * * @return array Width and height as `float|int`. */ public function get_intrinsic_dimensions(): array { [$width, $height] = Helpers::dompdf_getimagesize($this->_image_url, $this->_dompdf->getHttpContext()); return [$width, $height]; } /** * Resample the given pixel length according to dpi. * * @param float|int $length * @return float */ public function resample($length): float { $dpi = $this->_dompdf->getOptions()->getDpi(); return ($length * 72) / $dpi; } /** * Return the image's url * * @return string The url of this image */ function get_image_url() { return $this->_image_url; } /** * Return the image's error message * * @return string The image's error message */ function get_image_msg() { return $this->_image_msg; } } PK_frame->get_style(); $style->width = 0; $style->height = 0; $style->margin = 0; $style->padding = 0; } } PKgetAllowedProtocols(); if (!array_key_exists($protocol, $allowed_protocols)) { throw new ImageException("Permission denied on $url. The communication protocol is not supported.", E_WARNING); } foreach ($allowed_protocols[$protocol]["rules"] as $rule) { [$result, $message] = $rule($full_url); if (!$result) { throw new ImageException("Error loading $url: $message", E_WARNING); } } } if ($protocol === "file://") { $resolved_url = $full_url; } elseif (isset(self::$_cache[$full_url])) { $resolved_url = self::$_cache[$full_url]; } else { $tmp_dir = $options->getTempDir(); if (($resolved_url = @tempnam($tmp_dir, "ca_dompdf_img_")) === false) { throw new ImageException("Unable to create temporary image in " . $tmp_dir, E_WARNING); } $tempfile = $resolved_url; $image = null; if ($is_data_uri) { if (($parsed_data_uri = Helpers::parse_data_uri($url)) !== false) { $image = $parsed_data_uri["data"]; } } else { list($image, $http_response_header) = Helpers::getFileContent($full_url, $options->getHttpContext()); } // Image not found or invalid if ($image === null) { $msg = ($is_data_uri ? "Data-URI could not be parsed" : "Image not found"); throw new ImageException($msg, E_WARNING); } if (@file_put_contents($resolved_url, $image) === false) { throw new ImageException("Unable to create temporary image in " . $tmp_dir, E_WARNING); } self::$_cache[$full_url] = $resolved_url; } // Check if the local file is readable if (!is_readable($resolved_url) || !filesize($resolved_url)) { throw new ImageException("Image not readable or empty", E_WARNING); } list($width, $height, $type) = Helpers::dompdf_getimagesize($resolved_url, $options->getHttpContext()); if (($width && $height && in_array($type, ["gif", "png", "jpeg", "bmp", "svg","webp"], true)) === false) { throw new ImageException("Image type unknown", E_WARNING); } if ($type === "svg") { $parser = xml_parser_create("utf-8"); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false); xml_set_element_handler( $parser, function ($parser, $name, $attributes) use ($options, $parsed_url, $full_url) { if (strtolower($name) === "image") { $attributes = array_change_key_case($attributes, CASE_LOWER); $urls = []; $urls[] = $attributes["xlink:href"] ?? ""; $urls[] = $attributes["href"] ?? ""; foreach ($urls as $url) { if (!empty($url)) { $inner_full_url = Helpers::build_url($parsed_url["protocol"], $parsed_url["host"], $parsed_url["path"], $url); if ($inner_full_url === $full_url) { throw new ImageException("SVG self-reference is not allowed", E_WARNING); } [$resolved_url, $type, $message] = self::resolve_url($url, $parsed_url["protocol"], $parsed_url["host"], $parsed_url["path"], $options); if (!empty($message)) { throw new ImageException("This SVG document references a restricted resource. $message", E_WARNING); } } } } }, false ); if (($fp = fopen($resolved_url, "r")) !== false) { while ($line = fread($fp, 8192)) { xml_parse($parser, $line, false); } fclose($fp); xml_parse($parser, "", true); } xml_parser_free($parser); } } catch (ImageException $e) { if ($tempfile) { unlink($tempfile); } $resolved_url = self::$broken_image; list($width, $height, $type) = Helpers::dompdf_getimagesize($resolved_url, $options->getHttpContext()); $message = self::$error_message; Helpers::record_warnings($e->getCode(), $e->getMessage() . " \n $url", $e->getFile(), $e->getLine()); self::$_cache[$full_url] = $resolved_url; } return [$resolved_url, $type, $message]; } /** * Register a temp file for the given original image file. * * @param string $filePath The path of the original image. * @param string $tempPath The path of the temp file to register. * @param string $key An optional key to register the temp file at. */ static function addTempImage(string $filePath, string $tempPath, string $key = "default"): void { if (!isset(self::$tempImages[$filePath])) { self::$tempImages[$filePath] = []; } self::$tempImages[$filePath][$key] = $tempPath; } /** * Get the path of a temp file registered for the given original image file. * * @param string $filePath The path of the original image. * @param string $key The key the temp file is registered at. */ static function getTempImage(string $filePath, string $key = "default"): ?string { return self::$tempImages[$filePath][$key] ?? null; } /** * Unlink all cached images (i.e. temporary images either downloaded * or converted) except for the bundled "broken image" */ static function clear(bool $debugPng = false) { foreach (self::$_cache as $file) { if ($file === self::$broken_image) { continue; } if ($debugPng) { print "[clear unlink $file]"; } if (file_exists($file)) { unlink($file); } } foreach (self::$tempImages as $versions) { foreach ($versions as $file) { if ($file === self::$broken_image) { continue; } if ($debugPng) { print "[unlink temp image $file]"; } if (file_exists($file)) { unlink($file); } } } self::$_cache = []; self::$tempImages = []; } static function detect_type($file, $context = null) { list(, , $type) = Helpers::dompdf_getimagesize($file, $context); return $type; } static function is_broken($url) { return $url === self::$broken_image; } } if (file_exists(realpath(__DIR__ . "/../../lib/res/broken_image.svg"))) { Cache::$broken_image = realpath(__DIR__ . "/../../lib/res/broken_image.svg"); } PKsetOptions($options); } elseif (is_array($options)) { $this->setOptions(new Options($options)); } else { $this->setOptions(new Options()); } $versionFile = realpath(__DIR__ . '/../VERSION'); if (($version = file_get_contents($versionFile)) !== false) { $version = trim($version); if ($version !== '$Format:<%h>$') { $this->version = sprintf('dompdf %s', $version); } } $this->setPhpConfig(); $this->paperSize = $this->options->getDefaultPaperSize(); $this->paperOrientation = $this->options->getDefaultPaperOrientation(); $this->canvas = CanvasFactory::get_instance($this, $this->paperSize, $this->paperOrientation); $this->fontMetrics = new FontMetrics($this->canvas, $this->options); $this->css = new Stylesheet($this); $this->restorePhpConfig(); } /** * Save the system's existing locale, PCRE JIT, and MBString encoding * configuration and configure the system for Dompdf processing */ private function setPhpConfig() { if (sprintf('%.1f', 1.0) !== '1.0') { $this->systemLocale = setlocale(LC_NUMERIC, "0"); setlocale(LC_NUMERIC, "C"); } $this->pcreJit = @ini_get('pcre.jit'); @ini_set('pcre.jit', '0'); $this->mbstringEncoding = mb_internal_encoding(); mb_internal_encoding('UTF-8'); } /** * Restore the system's locale configuration */ private function restorePhpConfig() { if ($this->systemLocale !== null) { setlocale(LC_NUMERIC, $this->systemLocale); $this->systemLocale = null; } if ($this->pcreJit !== null) { @ini_set('pcre.jit', $this->pcreJit); $this->pcreJit = null; } if ($this->mbstringEncoding !== null) { mb_internal_encoding($this->mbstringEncoding); $this->mbstringEncoding = null; } } /** * @param $file * @deprecated */ public function load_html_file($file) { $this->loadHtmlFile($file); } /** * Loads an HTML file * Parse errors are stored in the global array _dompdf_warnings. * * @param string $file a filename or url to load * @param string $encoding Encoding of $file * * @throws Exception */ public function loadHtmlFile($file, $encoding = null) { $this->setPhpConfig(); if (!$this->protocol && !$this->baseHost && !$this->basePath) { [$this->protocol, $this->baseHost, $this->basePath] = Helpers::explode_url($file); } $protocol = strtolower($this->protocol); $uri = Helpers::build_url($this->protocol, $this->baseHost, $this->basePath, $file); $allowed_protocols = $this->options->getAllowedProtocols(); if (!array_key_exists($protocol, $allowed_protocols)) { throw new Exception("Permission denied on $file. The communication protocol is not supported."); } if ($protocol === "file://") { $ext = strtolower(pathinfo($uri, PATHINFO_EXTENSION)); if (!in_array($ext, $this->allowedLocalFileExtensions)) { throw new Exception("Permission denied on $file: The file extension is forbidden."); } } foreach ($allowed_protocols[$protocol]["rules"] as $rule) { [$result, $message] = $rule($uri); if (!$result) { throw new Exception("Error loading $file: $message"); } } [$contents, $http_response_header] = Helpers::getFileContent($uri, $this->options->getHttpContext()); if ($contents === null) { throw new Exception("File '$file' not found."); } // See http://the-stickman.com/web-development/php/getting-http-response-headers-when-using-file_get_contents/ if (isset($http_response_header)) { foreach ($http_response_header as $_header) { if (preg_match("@Content-Type:\s*[\w/]+;\s*?charset=([^\s]+)@i", $_header, $matches)) { $encoding = strtoupper($matches[1]); break; } } } $this->restorePhpConfig(); $this->loadHtml($contents, $encoding); } /** * @param string $str * @param string $encoding * @deprecated */ public function load_html($str, $encoding = null) { $this->loadHtml($str, $encoding); } public function loadDOM($doc, $quirksmode = false) { // Remove #text children nodes in nodes that shouldn't have $tag_names = ["html", "head", "table", "tbody", "thead", "tfoot", "tr"]; foreach ($tag_names as $tag_name) { $nodes = $doc->getElementsByTagName($tag_name); foreach ($nodes as $node) { self::removeTextNodes($node); } } $this->dom = $doc; $this->quirksmode = $quirksmode; $this->tree = new FrameTree($this->dom); } /** * Loads an HTML string * Parse errors are stored in the global array _dompdf_warnings. * * @param string $str HTML text to load * @param string $encoding Encoding of $str */ public function loadHtml($str, $encoding = null) { $this->setPhpConfig(); // Determine character encoding when $encoding parameter not used if ($encoding === null) { mb_detect_order('auto'); if (($encoding = mb_detect_encoding($str, null, true)) === false) { //"auto" is expanded to "ASCII,JIS,UTF-8,EUC-JP,SJIS" $encoding = "auto"; } } if (in_array(strtoupper($encoding), array('UTF-8','UTF8')) === false) { $str = mb_convert_encoding($str, 'UTF-8', $encoding); //Update encoding after converting $encoding = 'UTF-8'; } $metatags = [ '@]*charset\s*=\s*["\']?\s*([^"\' ]+)@i', ]; foreach ($metatags as $metatag) { if (preg_match($metatag, $str, $matches)) { if (isset($matches[1]) && in_array($matches[1], mb_list_encodings())) { $document_encoding = $matches[1]; break; } } } if (isset($document_encoding) && in_array(strtoupper($document_encoding), ['UTF-8','UTF8']) === false) { $str = preg_replace('/charset=([^\s"]+)/i', 'charset=UTF-8', $str); } elseif (isset($document_encoding) === false && strpos($str, '') !== false) { $str = str_replace('', '', $str); } elseif (isset($document_encoding) === false) { $str = '' . $str; } // remove BOM mark from UTF-8, it's treated as document text by DOMDocument // FIXME: roll this into the encoding detection using UTF-8/16/32 BOM (http://us2.php.net/manual/en/function.mb-detect-encoding.php#91051)? if (substr($str, 0, 3) == chr(0xEF) . chr(0xBB) . chr(0xBF)) { $str = substr($str, 3); } // Store parsing warnings as messages set_error_handler([Helpers::class, 'record_warnings']); try { // @todo Take the quirksmode into account // https://quirks.spec.whatwg.org/ // http://hsivonen.iki.fi/doctype/ $quirksmode = false; $html5 = new HTML5(['encoding' => $encoding, 'disable_html_ns' => true]); $dom = $html5->loadHTML($str); // extra step to normalize the HTML document structure // see Masterminds/html5-php#166 $doc = new DOMDocument("1.0", $encoding); $doc->preserveWhiteSpace = true; $doc->loadHTML($html5->saveHTML($dom), LIBXML_NOWARNING | LIBXML_NOERROR); $this->loadDOM($doc, $quirksmode); } finally { restore_error_handler(); $this->restorePhpConfig(); } } /** * @param DOMNode $node * @deprecated */ public static function remove_text_nodes(DOMNode $node) { self::removeTextNodes($node); } /** * @param DOMNode $node */ public static function removeTextNodes(DOMNode $node) { $children = []; for ($i = 0; $i < $node->childNodes->length; $i++) { $child = $node->childNodes->item($i); if ($child->nodeName === "#text") { $children[] = $child; } } foreach ($children as $child) { $node->removeChild($child); } } /** * Builds the {@link FrameTree}, loads any CSS and applies the styles to * the {@link FrameTree} */ private function processHtml() { $this->tree->build_tree(); $this->css->load_css_file($this->css->getDefaultStylesheet(), Stylesheet::ORIG_UA); $acceptedmedia = Stylesheet::$ACCEPTED_GENERIC_MEDIA_TYPES; $acceptedmedia[] = $this->options->getDefaultMediaType(); // /** @var \DOMElement|null */ $baseNode = $this->dom->getElementsByTagName("base")->item(0); $baseHref = $baseNode ? $baseNode->getAttribute("href") : ""; if ($baseHref !== "") { [$this->protocol, $this->baseHost, $this->basePath] = Helpers::explode_url($baseHref); } // Set the base path of the Stylesheet to that of the file being processed $this->css->set_protocol($this->protocol); $this->css->set_host($this->baseHost); $this->css->set_base_path($this->basePath); // Get all the stylesheets so that they are processed in document order $xpath = new DOMXPath($this->dom); $stylesheets = $xpath->query("//*[name() = 'link' or name() = 'style']"); /** @var \DOMElement $tag */ foreach ($stylesheets as $tag) { switch (strtolower($tag->nodeName)) { // load tags case "link": if (mb_strtolower(stripos($tag->getAttribute("rel"), "stylesheet") !== false) || // may be "appendix stylesheet" mb_strtolower($tag->getAttribute("type")) === "text/css" ) { //Check if the css file is for an accepted media type //media not given then always valid $formedialist = preg_split("/[\s\n,]/", $tag->getAttribute("media"), -1, PREG_SPLIT_NO_EMPTY); if (count($formedialist) > 0) { $accept = false; foreach ($formedialist as $type) { if (in_array(mb_strtolower(trim($type)), $acceptedmedia)) { $accept = true; break; } } if (!$accept) { //found at least one mediatype, but none of the accepted ones //Skip this css file. break; } } $url = $tag->getAttribute("href"); $url = Helpers::build_url($this->protocol, $this->baseHost, $this->basePath, $url); if ($url !== null) { $this->css->load_css_file($url, Stylesheet::ORIG_AUTHOR); } } break; // load $child = $child->nextSibling; } } else { $css = $tag->nodeValue; } // Set the base path of the Stylesheet to that of the file being processed $this->css->set_protocol($this->protocol); $this->css->set_host($this->baseHost); $this->css->set_base_path($this->basePath); $this->css->load_css($css, Stylesheet::ORIG_AUTHOR); break; } // Set the base path of the Stylesheet to that of the file being processed $this->css->set_protocol($this->protocol); $this->css->set_host($this->baseHost); $this->css->set_base_path($this->basePath); } } /** * @param string $cacheId * @deprecated */ public function enable_caching($cacheId) { $this->enableCaching($cacheId); } /** * Enable experimental caching capability * * @param string $cacheId */ public function enableCaching($cacheId) { $this->cacheId = $cacheId; } /** * @param string $value * @return bool * @deprecated */ public function parse_default_view($value) { return $this->parseDefaultView($value); } /** * @param string $value * @return bool */ public function parseDefaultView($value) { $valid = ["XYZ", "Fit", "FitH", "FitV", "FitR", "FitB", "FitBH", "FitBV"]; $options = preg_split("/\s*,\s*/", trim($value)); $defaultView = array_shift($options); if (!in_array($defaultView, $valid)) { return false; } $this->setDefaultView($defaultView, $options); return true; } /** * Renders the HTML to PDF */ public function render() { $this->setPhpConfig(); $logOutputFile = $this->options->getLogOutputFile(); if ($logOutputFile) { if (!file_exists($logOutputFile) && is_writable(dirname($logOutputFile))) { touch($logOutputFile); } $startTime = microtime(true); if (is_writable($logOutputFile)) { ob_start(); } } $this->processHtml(); $this->css->apply_styles($this->tree); // @page style rules : size, margins $pageStyles = $this->css->get_page_styles(); $basePageStyle = $pageStyles["base"]; unset($pageStyles["base"]); foreach ($pageStyles as $pageStyle) { $pageStyle->inherit($basePageStyle); } // Set paper size if defined via CSS if (is_array($basePageStyle->size)) { [$width, $height] = $basePageStyle->size; $this->setPaper([0, 0, $width, $height]); } // Create a new canvas instance if the current one does not match the // desired paper size $canvasWidth = $this->canvas->get_width(); $canvasHeight = $this->canvas->get_height(); $size = $this->getPaperSize(); if ($canvasWidth !== $size[2] || $canvasHeight !== $size[3]) { $this->canvas = CanvasFactory::get_instance($this, $this->paperSize, $this->paperOrientation); $this->fontMetrics->setCanvas($this->canvas); } $canvas = $this->canvas; $root_frame = $this->tree->get_root(); $root = Factory::decorate_root($root_frame, $this); foreach ($this->tree as $frame) { if ($frame === $root_frame) { continue; } Factory::decorate_frame($frame, $this, $root); } // Add meta information $title = $this->dom->getElementsByTagName("title"); if ($title->length) { $canvas->add_info("Title", trim($title->item(0)->nodeValue)); } $metas = $this->dom->getElementsByTagName("meta"); $labels = [ "author" => "Author", "keywords" => "Keywords", "description" => "Subject", ]; /** @var \DOMElement $meta */ foreach ($metas as $meta) { $name = mb_strtolower($meta->getAttribute("name")); $value = trim($meta->getAttribute("content")); if (isset($labels[$name])) { $canvas->add_info($labels[$name], $value); continue; } if ($name === "dompdf.view" && $this->parseDefaultView($value)) { $canvas->set_default_view($this->defaultView, $this->defaultViewOptions); } } $root->set_containing_block(0, 0, $canvas->get_width(), $canvas->get_height()); $root->set_renderer(new Renderer($this)); // This is where the magic happens: $root->reflow(); if (isset($this->callbacks["end_document"])) { $fs = $this->callbacks["end_document"]; foreach ($fs as $f) { $canvas->page_script($f); } } // Clean up cached images if (!$this->options->getDebugKeepTemp()) { Cache::clear($this->options->getDebugPng()); } global $_dompdf_warnings, $_dompdf_show_warnings; if ($_dompdf_show_warnings && isset($_dompdf_warnings)) { echo 'Dompdf Warnings
      ';
                  foreach ($_dompdf_warnings as $msg) {
                      echo $msg . "\n";
                  }
      
                  if ($canvas instanceof CPDF) {
                      echo $canvas->get_cpdf()->messages;
                  }
                  echo '
      '; flush(); } if ($logOutputFile && is_writable($logOutputFile)) { $this->writeLog($logOutputFile, $startTime); ob_end_clean(); } $this->restorePhpConfig(); } /** * Writes the output buffer in the log file * * @param string $logOutputFile * @param float $startTime */ private function writeLog(string $logOutputFile, float $startTime): void { $frames = Frame::$ID_COUNTER; $memory = memory_get_peak_usage(true) / 1024; $time = (microtime(true) - $startTime) * 1000; $out = sprintf( "%6d" . "%10.2f KB" . "%10.2f ms" . " " . ($this->quirksmode ? " ON" : "OFF") . "
      ", $frames, $memory, $time); $out .= ob_get_contents(); ob_clean(); file_put_contents($logOutputFile, $out); } /** * Add meta information to the PDF after rendering. * * @deprecated */ public function add_info($label, $value) { $this->addInfo($label, $value); } /** * Add meta information to the PDF after rendering. * * @param string $label Label of the value (Creator, Producer, etc.) * @param string $value The text to set */ public function addInfo(string $label, string $value): void { $this->canvas->add_info($label, $value); } /** * Streams the PDF to the client. * * The file will open a download dialog by default. The options * parameter controls the output. Accepted options (array keys) are: * * 'compress' = > 1 (=default) or 0: * Apply content stream compression * * 'Attachment' => 1 (=default) or 0: * Set the 'Content-Disposition:' HTTP header to 'attachment' * (thereby causing the browser to open a download dialog) * * @param string $filename the name of the streamed file * @param array $options header options (see above) */ public function stream($filename = "document.pdf", $options = []) { $this->setPhpConfig(); $this->canvas->stream($filename, $options); $this->restorePhpConfig(); } /** * Returns the PDF as a string. * * The options parameter controls the output. Accepted options are: * * 'compress' = > 1 or 0 - apply content stream compression, this is * on (1) by default * * @param array $options options (see above) * * @return string|null */ public function output($options = []) { $this->setPhpConfig(); $output = $this->canvas->output($options); $this->restorePhpConfig(); return $output; } /** * @return string * @deprecated */ public function output_html() { return $this->outputHtml(); } /** * Returns the underlying HTML document as a string * * @return string */ public function outputHtml() { return $this->dom->saveHTML(); } /** * Get the dompdf option value * * @param string $key * @return mixed * @deprecated */ public function get_option($key) { return $this->options->get($key); } /** * @param string $key * @param mixed $value * @return $this * @deprecated */ public function set_option($key, $value) { $this->options->set($key, $value); return $this; } /** * @param array $options * @return $this * @deprecated */ public function set_options(array $options) { $this->options->set($options); return $this; } /** * @param string $size * @param string $orientation * @deprecated */ public function set_paper($size, $orientation = "portrait") { $this->setPaper($size, $orientation); } /** * Sets the paper size & orientation * * @param string|float[] $size 'letter', 'legal', 'A4', etc. {@link Dompdf\Adapter\CPDF::$PAPER_SIZES} * @param string $orientation 'portrait' or 'landscape' * @return $this */ public function setPaper($size, string $orientation = "portrait"): self { $this->paperSize = $size; $this->paperOrientation = $orientation; return $this; } /** * Gets the paper size * * @return float[] A four-element float array */ public function getPaperSize(): array { $paper = $this->paperSize; $orientation = $this->paperOrientation; if (is_array($paper)) { $size = array_map("floatval", $paper); } else { $paper = strtolower($paper); $size = CPDF::$PAPER_SIZES[$paper] ?? CPDF::$PAPER_SIZES["letter"]; } if (strtolower($orientation) === "landscape") { [$size[2], $size[3]] = [$size[3], $size[2]]; } return $size; } /** * Gets the paper orientation * * @return string Either "portrait" or "landscape" */ public function getPaperOrientation(): string { return $this->paperOrientation; } /** * @param FrameTree $tree * @return $this */ public function setTree(FrameTree $tree) { $this->tree = $tree; return $this; } /** * @return FrameTree * @deprecated */ public function get_tree() { return $this->getTree(); } /** * Returns the underlying {@link FrameTree} object * * @return FrameTree */ public function getTree() { return $this->tree; } /** * @param string $protocol * @return $this * @deprecated */ public function set_protocol($protocol) { return $this->setProtocol($protocol); } /** * Sets the protocol to use * FIXME validate these * * @param string $protocol * @return $this */ public function setProtocol(string $protocol) { $this->protocol = $protocol; return $this; } /** * @return string * @deprecated */ public function get_protocol() { return $this->getProtocol(); } /** * Returns the protocol in use * * @return string */ public function getProtocol() { return $this->protocol; } /** * @param string $host * @deprecated */ public function set_host($host) { $this->setBaseHost($host); } /** * Sets the base hostname * * @param string $baseHost * @return $this */ public function setBaseHost(string $baseHost) { $this->baseHost = $baseHost; return $this; } /** * @return string * @deprecated */ public function get_host() { return $this->getBaseHost(); } /** * Returns the base hostname * * @return string */ public function getBaseHost() { return $this->baseHost; } /** * Sets the base path * * @param string $path * @deprecated */ public function set_base_path($path) { $this->setBasePath($path); } /** * Sets the base path * * @param string $basePath * @return $this */ public function setBasePath(string $basePath) { $this->basePath = $basePath; return $this; } /** * @return string * @deprecated */ public function get_base_path() { return $this->getBasePath(); } /** * Returns the base path * * @return string */ public function getBasePath() { return $this->basePath; } /** * @param string $default_view The default document view * @param array $options The view's options * @return $this * @deprecated */ public function set_default_view($default_view, $options) { return $this->setDefaultView($default_view, $options); } /** * Sets the default view * * @param string $defaultView The default document view * @param array $options The view's options * @return $this */ public function setDefaultView($defaultView, $options) { $this->defaultView = $defaultView; $this->defaultViewOptions = $options; return $this; } /** * @param resource $http_context * @return $this * @deprecated */ public function set_http_context($http_context) { return $this->setHttpContext($http_context); } /** * Sets the HTTP context * * @param resource|array $httpContext * @return $this */ public function setHttpContext($httpContext) { $this->options->setHttpContext($httpContext); return $this; } /** * @return resource * @deprecated */ public function get_http_context() { return $this->getHttpContext(); } /** * Returns the HTTP context * * @return resource */ public function getHttpContext() { return $this->options->getHttpContext(); } /** * Set a custom `Canvas` instance to render the document to. * * Be aware that the instance will be replaced on render if the document * defines a paper size different from the canvas. * * @param Canvas $canvas * @return $this */ public function setCanvas(Canvas $canvas) { $this->canvas = $canvas; return $this; } /** * @return Canvas * @deprecated */ public function get_canvas() { return $this->getCanvas(); } /** * Return the underlying Canvas instance (e.g. Dompdf\Adapter\CPDF, Dompdf\Adapter\GD) * * @return Canvas */ public function getCanvas() { return $this->canvas; } /** * @param Stylesheet $css * @return $this */ public function setCss(Stylesheet $css) { $this->css = $css; return $this; } /** * @return Stylesheet * @deprecated */ public function get_css() { return $this->getCss(); } /** * Returns the stylesheet * * @return Stylesheet */ public function getCss() { return $this->css; } /** * @param DOMDocument $dom * @return $this */ public function setDom(DOMDocument $dom) { $this->dom = $dom; return $this; } /** * @return DOMDocument * @deprecated */ public function get_dom() { return $this->getDom(); } /** * @return DOMDocument */ public function getDom() { return $this->dom; } /** * @param Options $options * @return $this */ public function setOptions(Options $options) { // For backwards compatibility if ($this->options && $this->options->getHttpContext() && !$options->getHttpContext()) { $options->setHttpContext($this->options->getHttpContext()); } $this->options = $options; $fontMetrics = $this->fontMetrics; if (isset($fontMetrics)) { $fontMetrics->setOptions($options); } return $this; } /** * @return Options */ public function getOptions() { return $this->options; } /** * @return array * @deprecated */ public function get_callbacks() { return $this->getCallbacks(); } /** * Returns the callbacks array * * @return array */ public function getCallbacks() { return $this->callbacks; } /** * @param array $callbacks the set of callbacks to set * @return $this * @deprecated */ public function set_callbacks($callbacks) { return $this->setCallbacks($callbacks); } /** * Define callbacks that allow modifying the document during render. * * The callbacks array should contain arrays with `event` set to a callback * event name and `f` set to a function or any other callable. * * The available callback events are: * * `begin_page_reflow`: called before page reflow * * `begin_frame`: called before a frame is rendered * * `end_frame`: called after frame rendering is complete * * `begin_page_render`: called before a page is rendered * * `end_page_render`: called after page rendering is complete * * `end_document`: called for every page after rendering is complete * * The function `f` receives three arguments `Frame $frame`, `Canvas $canvas`, * and `FontMetrics $fontMetrics` for all events but `end_document`. For * `end_document`, the function receives four arguments `int $pageNumber`, * `int $pageCount`, `Canvas $canvas`, and `FontMetrics $fontMetrics` instead. * * @param array $callbacks The set of callbacks to set. * @return $this */ public function setCallbacks(array $callbacks): self { $this->callbacks = []; foreach ($callbacks as $c) { if (is_array($c) && isset($c["event"]) && isset($c["f"])) { $event = $c["event"]; $f = $c["f"]; if (is_string($event) && is_callable($f)) { $this->callbacks[$event][] = $f; } } } return $this; } /** * @return boolean * @deprecated */ public function get_quirksmode() { return $this->getQuirksmode(); } /** * Get the quirks mode * * @return boolean true if quirks mode is active */ public function getQuirksmode() { return $this->quirksmode; } /** * @param FontMetrics $fontMetrics * @return $this */ public function setFontMetrics(FontMetrics $fontMetrics) { $this->fontMetrics = $fontMetrics; return $this; } /** * @return FontMetrics */ public function getFontMetrics() { return $this->fontMetrics; } /** * PHP5 overloaded getter * Along with {@link Dompdf::__set()} __get() provides access to all * properties directly. Typically __get() is not called directly outside * of this class. * * @param string $prop * * @throws Exception * @return mixed */ function __get($prop) { switch ($prop) { case 'version': return $this->version; default: throw new Exception('Invalid property: ' . $prop); } } } PK_canvas = $canvas; } /** * @param $code * @param array $vars */ public function evaluate($code, $vars = []) { if (!$this->_canvas->get_dompdf()->getOptions()->getIsPhpEnabled()) { return; } // Set up some variables for the inline code $pdf = $this->_canvas; $fontMetrics = $pdf->get_dompdf()->getFontMetrics(); $PAGE_NUM = $pdf->get_page_number(); $PAGE_COUNT = $pdf->get_page_count(); // Override those variables if passed in foreach ($vars as $k => $v) { $$k = $v; } eval($code); } /** * @param Frame $frame */ public function render(Frame $frame) { $this->evaluate($frame->get_node()->nodeValue); } } PKsetCanvas($canvas); $this->setOptions($options); $this->loadFontFamilies(); } /** * @deprecated */ public function save_font_families() { $this->saveFontFamilies(); } /** * Saves the stored font family cache * * The name and location of the cache file are determined by {@link * FontMetrics::USER_FONTS_FILE}. This file should be writable by the * webserver process. * * @see FontMetrics::loadFontFamilies() */ public function saveFontFamilies() { file_put_contents($this->getUserFontsFilePath(), json_encode($this->userFonts, JSON_PRETTY_PRINT)); } /** * @deprecated */ public function load_font_families() { $this->loadFontFamilies(); } /** * Loads the stored font family cache * * @see FontMetrics::saveFontFamilies() */ public function loadFontFamilies() { $file = $this->options->getRootDir() . "/lib/fonts/installed-fonts.dist.json"; $this->bundledFonts = json_decode(file_get_contents($file), true); if (is_readable($this->getUserFontsFilePath())) { $this->userFonts = json_decode(file_get_contents($this->getUserFontsFilePath()), true); } else { $this->loadFontFamiliesLegacy(); } } private function loadFontFamiliesLegacy() { $legacyCacheFile = $this->options->getFontDir() . '/dompdf_font_family_cache.php'; if (is_readable($legacyCacheFile)) { $fontDir = $this->options->getFontDir(); $rootDir = $this->options->getRootDir(); if (!defined("DOMPDF_DIR")) { define("DOMPDF_DIR", $rootDir); } if (!defined("DOMPDF_FONT_DIR")) { define("DOMPDF_FONT_DIR", $fontDir); } $cacheDataClosure = require $legacyCacheFile; $cacheData = is_array($cacheDataClosure) ? $cacheDataClosure : $cacheDataClosure($fontDir, $rootDir); if (is_array($cacheData)) { foreach ($cacheData as $family => $variants) { if (!isset($this->bundledFonts[$family]) && is_array($variants)) { foreach ($variants as $variant => $variantPath) { $variantName = basename($variantPath); $variantDir = dirname($variantPath); if ($variantDir == $fontDir) { $this->userFonts[$family][$variant] = $variantName; } else { $this->userFonts[$family][$variant] = $variantPath; } } } } $this->saveFontFamilies(); } } } /** * @param array $style * @param string $remote_file * @param resource $context * @return bool * @deprecated */ public function register_font($style, $remote_file, $context = null) { return $this->registerFont($style, $remote_file); } /** * @param array $style * @param string $remoteFile * @param resource $context * @return bool */ public function registerFont($style, $remoteFile, $context = null) { $fontname = mb_strtolower($style["family"]); $families = $this->getFontFamilies(); $entry = []; if (isset($families[$fontname])) { $entry = $families[$fontname]; } $styleString = $this->getType("{$style['weight']} {$style['style']}"); $remoteHash = md5($remoteFile); $prefix = $fontname . "_" . $styleString; $prefix = trim($prefix, "-"); if (function_exists('iconv')) { $prefix = @iconv('utf-8', 'us-ascii//TRANSLIT', $prefix); } $prefix_encoding = mb_detect_encoding($prefix, mb_detect_order(), true); $substchar = mb_substitute_character(); mb_substitute_character(0x005F); $prefix = mb_convert_encoding($prefix, "ISO-8859-1", $prefix_encoding); mb_substitute_character($substchar); $prefix = preg_replace("[\W]", "_", $prefix); $prefix = preg_replace("/[^-_\w]+/", "", $prefix); $localFile = $prefix . "_" . $remoteHash; $localFilePath = $this->getOptions()->getFontDir() . "/" . $localFile; if (isset($entry[$styleString]) && $localFilePath == $entry[$styleString]) { return true; } $entry[$styleString] = $localFile; // Download the remote file [$protocol] = Helpers::explode_url($remoteFile); $allowed_protocols = $this->options->getAllowedProtocols(); if (!array_key_exists($protocol, $allowed_protocols)) { Helpers::record_warnings(E_USER_WARNING, "Permission denied on $remoteFile. The communication protocol is not supported.", __FILE__, __LINE__); return false; } foreach ($allowed_protocols[$protocol]["rules"] as $rule) { [$result, $message] = $rule($remoteFile); if ($result !== true) { Helpers::record_warnings(E_USER_WARNING, "Error loading $remoteFile: $message", __FILE__, __LINE__); return false; } } list($remoteFileContent, $http_response_header) = @Helpers::getFileContent($remoteFile, $context); if ($remoteFileContent === null) { return false; } $localTempFile = @tempnam($this->options->get("tempDir"), "dompdf-font-"); file_put_contents($localTempFile, $remoteFileContent); $font = Font::load($localTempFile); if (!$font) { unlink($localTempFile); return false; } $font->parse(); $font->saveAdobeFontMetrics("$localFilePath.ufm"); $font->close(); unlink($localTempFile); if ( !file_exists("$localFilePath.ufm") ) { return false; } $fontExtension = ".ttf"; switch ($font->getFontType()) { case "TrueType": default: $fontExtension = ".ttf"; break; } // Save the changes file_put_contents($localFilePath.$fontExtension, $remoteFileContent); if ( !file_exists($localFilePath.$fontExtension) ) { unlink("$localFilePath.ufm"); return false; } $this->setFontFamily($fontname, $entry); return true; } /** * @param $text * @param $font * @param $size * @param float $word_spacing * @param float $char_spacing * @return float * @deprecated */ public function get_text_width($text, $font, $size, $word_spacing = 0.0, $char_spacing = 0.0) { //return self::$_pdf->get_text_width($text, $font, $size, $word_spacing, $char_spacing); return $this->getTextWidth($text, $font, $size, $word_spacing, $char_spacing); } /** * Calculates text size, in points * * @param string $text The text to be sized * @param string $font The font file to use * @param float $size The font size, in points * @param float $wordSpacing Word spacing, if any * @param float $charSpacing Char spacing, if any * * @return float */ public function getTextWidth(string $text, $font, float $size, float $wordSpacing = 0.0, float $charSpacing = 0.0): float { // @todo Make sure this cache is efficient before enabling it static $cache = []; if ($text === "") { return 0; } // Don't cache long strings $useCache = !isset($text[50]); // Faster than strlen // Text-size calculations depend on the canvas used. Make sure to not // return wrong values when switching canvas backends $canvasClass = get_class($this->canvas); $key = "$canvasClass/$font/$size/$wordSpacing/$charSpacing"; if ($useCache && isset($cache[$key][$text])) { return $cache[$key][$text]; } $width = $this->canvas->get_text_width($text, $font, $size, $wordSpacing, $charSpacing); if ($useCache) { $cache[$key][$text] = $width; } return $width; } /** * @param $font * @param $size * @return float * @deprecated */ public function get_font_height($font, $size) { return $this->getFontHeight($font, $size); } /** * Calculates font height, in points * * @param string $font The font file to use * @param float $size The font size, in points * * @return float */ public function getFontHeight($font, float $size): float { return $this->canvas->get_font_height($font, $size); } /** * Calculates font baseline, in points * * @param string $font The font file to use * @param float $size The font size, in points * * @return float */ public function getFontBaseline($font, float $size): float { return $this->canvas->get_font_baseline($font, $size); } /** * @param $family_raw * @param string $subtype_raw * @return string * @deprecated */ public function get_font($family_raw, $subtype_raw = "normal") { return $this->getFont($family_raw, $subtype_raw); } /** * Resolves a font family & subtype into an actual font file * Subtype can be one of 'normal', 'bold', 'italic' or 'bold_italic'. If * the particular font family has no suitable font file, the default font * ({@link Options::defaultFont}) is used. The font file returned * is the absolute pathname to the font file on the system. * * @param string|null $familyRaw * @param string $subtypeRaw * * @return string|null */ public function getFont($familyRaw, $subtypeRaw = "normal") { static $cache = []; if (isset($cache[$familyRaw][$subtypeRaw])) { return $cache[$familyRaw][$subtypeRaw]; } /* Allow calling for various fonts in search path. Therefore not immediately * return replacement on non match. * Only when called with NULL try replacement. * When this is also missing there is really trouble. * If only the subtype fails, nevertheless return failure. * Only on checking the fallback font, check various subtypes on same font. */ $subtype = strtolower($subtypeRaw); $families = $this->getFontFamilies(); if ($familyRaw) { $family = str_replace(["'", '"'], "", strtolower($familyRaw)); if (isset($families[$family][$subtype])) { return $cache[$familyRaw][$subtypeRaw] = $families[$family][$subtype]; } return null; } $fallback_families = [strtolower($this->options->getDefaultFont()), "serif"]; foreach ($fallback_families as $family) { if (isset($families[$family][$subtype])) { return $cache[$familyRaw][$subtypeRaw] = $families[$family][$subtype]; } if (!isset($families[$family])) { continue; } $family = $families[$family]; foreach ($family as $sub => $font) { if (strpos($subtype, $sub) !== false) { return $cache[$familyRaw][$subtypeRaw] = $font; } } if ($subtype !== "normal") { foreach ($family as $sub => $font) { if ($sub !== "normal") { return $cache[$familyRaw][$subtypeRaw] = $font; } } } $subtype = "normal"; if (isset($family[$subtype])) { return $cache[$familyRaw][$subtypeRaw] = $family[$subtype]; } } return null; } /** * @param $family * @return null|string * @deprecated */ public function get_family($family) { return $this->getFamily($family); } /** * @param string $family * @return null|string */ public function getFamily($family) { $family = str_replace(["'", '"'], "", mb_strtolower($family)); $families = $this->getFontFamilies(); if (isset($families[$family])) { return $families[$family]; } return null; } /** * @param $type * @return string * @deprecated */ public function get_type($type) { return $this->getType($type); } /** * @param string $type * @return string */ public function getType($type) { if (preg_match('/bold/i', $type)) { $weight = 700; } elseif (preg_match('/([1-9]00)/', $type, $match)) { $weight = (int)$match[0]; } else { $weight = 400; } $weight = $weight === 400 ? 'normal' : $weight; $weight = $weight === 700 ? 'bold' : $weight; $style = preg_match('/italic|oblique/i', $type) ? 'italic' : null; if ($weight === 'normal' && $style !== null) { return $style; } return $style === null ? $weight : $weight.'_'.$style; } /** * @return array * @deprecated */ public function get_font_families() { return $this->getFontFamilies(); } /** * Returns the current font lookup table * * @return array */ public function getFontFamilies() { if (!isset($this->fontFamilies)) { $this->setFontFamilies(); } return $this->fontFamilies; } /** * Convert loaded fonts to font lookup table * * @return array */ public function setFontFamilies() { $fontFamilies = []; if (isset($this->bundledFonts) && is_array($this->bundledFonts)) { foreach ($this->bundledFonts as $family => $variants) { if (!isset($fontFamilies[$family])) { $fontFamilies[$family] = array_map(function ($variant) { return $this->getOptions()->getRootDir() . '/lib/fonts/' . $variant; }, $variants); } } } if (isset($this->userFonts) && is_array($this->userFonts)) { foreach ($this->userFonts as $family => $variants) { $fontFamilies[$family] = array_map(function ($variant) { $variantName = basename($variant); if ($variantName === $variant) { return $this->getOptions()->getFontDir() . '/' . $variant; } return $variant; }, $variants); } } $this->fontFamilies = $fontFamilies; } /** * @param string $fontname * @param mixed $entry * @deprecated */ public function set_font_family($fontname, $entry) { $this->setFontFamily($fontname, $entry); } /** * @param string $fontname * @param mixed $entry */ public function setFontFamily($fontname, $entry) { $this->userFonts[mb_strtolower($fontname)] = $entry; $this->saveFontFamilies(); unset($this->fontFamilies); } /** * @return string */ public function getUserFontsFilePath() { return $this->options->getFontDir() . '/' . self::USER_FONTS_FILE; } /** * @param Options $options * @return $this */ public function setOptions(Options $options) { $this->options = $options; unset($this->fontFamilies); return $this; } /** * @return Options */ public function getOptions() { return $this->options; } /** * @param Canvas $canvas * @return $this */ public function setCanvas(Canvas $canvas) { $this->canvas = $canvas; return $this; } /** * @return Canvas */ public function getCanvas() { return $this->canvas; } } PKget_style(); if (trim($frame->get_node()->nodeValue) === "" && $style->empty_cells === "hide") { return; } $this->_set_opacity($frame->get_opacity($style->opacity)); $border_box = $frame->get_border_box(); $table = Table::find_parent_table($frame); if ($table->get_style()->border_collapse !== "collapse") { $this->_render_background($frame, $border_box); $this->_render_border($frame, $border_box); $this->_render_outline($frame, $border_box); } else { // The collapsed case is slightly complicated... $cells = $table->get_cellmap()->get_spanned_cells($frame); if (is_null($cells)) { return; } // Render the background to the padding box, as the cells are // rendered individually one after another, and we don't want the // background to overlap an adjacent border $padding_box = $frame->get_padding_box(); $this->_render_background($frame, $padding_box); $this->_render_collapsed_border($frame, $table); // FIXME: Outline should be drawn over other cells $this->_render_outline($frame, $border_box); } $id = $frame->get_node()->getAttribute("id"); if (strlen($id) > 0) { $this->_canvas->add_named_dest($id); } // $this->debugBlockLayout($frame, "red", false); } /** * @param Frame $frame * @param Table $table */ protected function _render_collapsed_border(Frame $frame, Table $table): void { $cellmap = $table->get_cellmap(); $cells = $cellmap->get_spanned_cells($frame); $num_rows = $cellmap->get_num_rows(); $num_cols = $cellmap->get_num_cols(); [$table_x, $table_y] = $table->get_position(); // Determine the top row spanned by this cell $i = $cells["rows"][0]; $top_row = $cellmap->get_row($i); // Determine if this cell borders on the bottom of the table. If so, // then we draw its bottom border. Otherwise the next row down will // draw its top border instead. if (in_array($num_rows - 1, $cells["rows"])) { $draw_bottom = true; $bottom_row = $cellmap->get_row($num_rows - 1); } else { $draw_bottom = false; } // Draw the horizontal borders foreach ($cells["columns"] as $j) { $bp = $cellmap->get_border_properties($i, $j); $col = $cellmap->get_column($j); $x = $table_x + $col["x"] - $bp["left"]["width"] / 2; $y = $table_y + $top_row["y"] - $bp["top"]["width"] / 2; $w = $col["used-width"] + ($bp["left"]["width"] + $bp["right"]["width"]) / 2; if ($bp["top"]["width"] > 0) { $widths = [ (float)$bp["top"]["width"], (float)$bp["right"]["width"], (float)$bp["bottom"]["width"], (float)$bp["left"]["width"] ]; $method = "_border_" . $bp["top"]["style"]; $this->$method($x, $y, $w, $bp["top"]["color"], $widths, "top", "square"); } if ($draw_bottom) { $bp = $cellmap->get_border_properties($num_rows - 1, $j); if ($bp["bottom"]["width"] <= 0) { continue; } $widths = [ (float)$bp["top"]["width"], (float)$bp["right"]["width"], (float)$bp["bottom"]["width"], (float)$bp["left"]["width"] ]; $y = $table_y + $bottom_row["y"] + $bottom_row["height"] + $bp["bottom"]["width"] / 2; $method = "_border_" . $bp["bottom"]["style"]; $this->$method($x, $y, $w, $bp["bottom"]["color"], $widths, "bottom", "square"); } } $j = $cells["columns"][0]; $left_col = $cellmap->get_column($j); if (in_array($num_cols - 1, $cells["columns"])) { $draw_right = true; $right_col = $cellmap->get_column($num_cols - 1); } else { $draw_right = false; } // Draw the vertical borders foreach ($cells["rows"] as $i) { $bp = $cellmap->get_border_properties($i, $j); $row = $cellmap->get_row($i); $x = $table_x + $left_col["x"] - $bp["left"]["width"] / 2; $y = $table_y + $row["y"] - $bp["top"]["width"] / 2; $h = $row["height"] + ($bp["top"]["width"] + $bp["bottom"]["width"]) / 2; if ($bp["left"]["width"] > 0) { $widths = [ (float)$bp["top"]["width"], (float)$bp["right"]["width"], (float)$bp["bottom"]["width"], (float)$bp["left"]["width"] ]; $method = "_border_" . $bp["left"]["style"]; $this->$method($x, $y, $h, $bp["left"]["color"], $widths, "left", "square"); } if ($draw_right) { $bp = $cellmap->get_border_properties($i, $num_cols - 1); if ($bp["right"]["width"] <= 0) { continue; } $widths = [ (float)$bp["top"]["width"], (float)$bp["right"]["width"], (float)$bp["bottom"]["width"], (float)$bp["left"]["width"] ]; $x = $table_x + $right_col["x"] + $right_col["used-width"] + $bp["right"]["width"] / 2; $method = "_border_" . $bp["right"]["style"]; $this->$method($x, $y, $h, $bp["right"]["color"], $widths, "right", "square"); } } } } PKget_style(); $node = $frame->get_node(); $dompdf = $this->_dompdf; $this->_set_opacity($frame->get_opacity($style->opacity)); [$x, $y, $w, $h] = $frame->get_border_box(); if ($node->nodeName === "body") { // Margins should be fully resolved at this point $mt = $style->margin_top; $mb = $style->margin_bottom; $h = $frame->get_containing_block("h") - $mt - $mb; } $border_box = [$x, $y, $w, $h]; // Draw our background, border and content $this->_render_background($frame, $border_box); $this->_render_border($frame, $border_box); $this->_render_outline($frame, $border_box); // Handle anchors & links if ($node->nodeName === "a" && $href = $node->getAttribute("href")) { $href = Helpers::build_url($dompdf->getProtocol(), $dompdf->getBaseHost(), $dompdf->getBasePath(), $href) ?? $href; $this->_canvas->add_link($href, $x, $y, $w, $h); } $id = $frame->get_node()->getAttribute("id"); if (strlen($id) > 0) { $this->_canvas->add_named_dest($id); } $this->debugBlockLayout($frame, "red", false); } protected function debugBlockLayout(Frame $frame, ?string $color, bool $lines = false): void { $options = $this->_dompdf->getOptions(); $debugLayout = $options->getDebugLayout(); if (!$debugLayout) { return; } if ($color && $options->getDebugLayoutBlocks()) { $this->_debug_layout($frame->get_border_box(), $color); if ($options->getDebugLayoutPaddingBox()) { $this->_debug_layout($frame->get_padding_box(), $color, [0.5, 0.5]); } } if ($lines && $options->getDebugLayoutLines() && $frame instanceof BlockFrameDecorator) { [$cx, , $cw] = $frame->get_content_box(); foreach ($frame->get_line_boxes() as $line) { $lw = $cw - $line->left - $line->right; $this->_debug_layout([$cx + $line->left, $line->y, $lw, $line->h], "orange"); } } } } PKget_parent(); $style = $frame->get_style(); $this->_set_opacity($frame->get_opacity($style->opacity)); // Don't render bullets twice if the list item was split if ($li->is_split_off) { return; } $font_family = $style->font_family; $font_size = $style->font_size; $baseline = $this->_canvas->get_font_baseline($font_family, $font_size); // Handle list-style-image // If list style image is requested but missing, fall back to predefined types if ($frame instanceof ListBulletImage && !Cache::is_broken($img = $frame->get_image_url())) { [$x, $y] = $frame->get_position(); $w = $frame->get_width(); $h = $frame->get_height(); $y += $baseline - $h; $this->_canvas->image($img, $x, $y, $w, $h); } else { $bullet_style = $style->list_style_type; switch ($bullet_style) { default: case "disc": case "circle": [$x, $y] = $frame->get_position(); $offset = $font_size * ListBulletFrameDecorator::BULLET_OFFSET; $r = ($font_size * ListBulletFrameDecorator::BULLET_SIZE) / 2; $x += $r; $y += $baseline - $r - $offset; $o = $font_size * ListBulletFrameDecorator::BULLET_THICKNESS; $this->_canvas->circle($x, $y, $r, $style->color, $o, null, $bullet_style !== "circle"); break; case "square": [$x, $y] = $frame->get_position(); $offset = $font_size * ListBulletFrameDecorator::BULLET_OFFSET; $w = $font_size * ListBulletFrameDecorator::BULLET_SIZE; $y += $baseline - $w - $offset; $this->_canvas->filled_rectangle($x, $y, $w, $w, $style->color); break; case "decimal-leading-zero": case "decimal": case "lower-alpha": case "lower-latin": case "lower-roman": case "lower-greek": case "upper-alpha": case "upper-latin": case "upper-roman": case "1": // HTML 4.0 compatibility case "a": case "i": case "A": case "I": $pad = null; if ($bullet_style === "decimal-leading-zero") { $pad = strlen($li->get_parent()->get_node()->getAttribute("dompdf-children-count")); } $node = $frame->get_node(); if (!$node->hasAttribute("dompdf-counter")) { return; } $index = $node->getAttribute("dompdf-counter"); $text = $this->make_counter($index, $bullet_style, $pad); if (trim($text) === "") { return; } $word_spacing = $style->word_spacing; $letter_spacing = $style->letter_spacing; $text_width = $this->_dompdf->getFontMetrics()->getTextWidth($text, $font_family, $font_size, $word_spacing, $letter_spacing); [$x, $y] = $frame->get_position(); // Correct for static frame width applied by positioner $x += $frame->get_width() - $text_width; $this->_canvas->text($x, $y, $text, $font_family, $font_size, $style->color, $word_spacing, $letter_spacing); case "none": break; } } $id = $frame->get_node()->getAttribute("id"); if (strlen($id) > 0) { $this->_canvas->add_named_dest($id); } } } PKget_style(); $this->_set_opacity($frame->get_opacity($style->opacity)); $border_box = $frame->get_border_box(); $this->_render_border($frame, $border_box); $this->_render_outline($frame, $border_box); $id = $frame->get_node()->getAttribute("id"); if (strlen($id) > 0) { $this->_canvas->add_named_dest($id); } $this->debugBlockLayout($frame, "red"); } } PK_dompdf = $dompdf; $this->_canvas = $dompdf->getCanvas(); } /** * Render a frame. * * Specialized in child classes * * @param Frame $frame The frame to render */ abstract function render(Frame $frame); /** * @param Frame $frame * @param float[] $border_box */ protected function _render_background(Frame $frame, array $border_box): void { $style = $frame->get_style(); $color = $style->background_color; $image = $style->background_image; [$x, $y, $w, $h] = $border_box; if ($color === "transparent" && $image === "none") { return; } if ($style->has_border_radius()) { [$tl, $tr, $br, $bl] = $style->resolve_border_radius($border_box); $this->_canvas->clipping_roundrectangle($x, $y, $w, $h, $tl, $tr, $br, $bl); } if ($color !== "transparent") { $this->_canvas->filled_rectangle($x, $y, $w, $h, $color); } if ($image !== "none") { $this->_background_image($image, $x, $y, $w, $h, $style); } if ($style->has_border_radius()) { $this->_canvas->clipping_end(); } } /** * @param Frame $frame * @param float[] $border_box * @param string $corner_style */ protected function _render_border(Frame $frame, array $border_box, string $corner_style = "bevel"): void { $style = $frame->get_style(); $bp = $style->get_border_properties(); [$x, $y, $w, $h] = $border_box; [$tl, $tr, $br, $bl] = $style->resolve_border_radius($border_box); // Short-cut: If all the borders are "solid" with the same color and // style, and no radius, we'd better draw a rectangle if ($bp["top"]["style"] === "solid" && $bp["top"] === $bp["right"] && $bp["right"] === $bp["bottom"] && $bp["bottom"] === $bp["left"] && !$style->has_border_radius() ) { $props = $bp["top"]; if ($props["color"] === "transparent" || $props["width"] <= 0) { return; } $width = (float)$style->length_in_pt($props["width"]); $this->_canvas->rectangle($x + $width / 2, $y + $width / 2, $w - $width, $h - $width, $props["color"], $width); return; } // Do it the long way $widths = [ (float)$style->length_in_pt($bp["top"]["width"]), (float)$style->length_in_pt($bp["right"]["width"]), (float)$style->length_in_pt($bp["bottom"]["width"]), (float)$style->length_in_pt($bp["left"]["width"]) ]; foreach ($bp as $side => $props) { if ($props["style"] === "none" || $props["style"] === "hidden" || $props["color"] === "transparent" || $props["width"] <= 0 ) { continue; } [$x, $y, $w, $h] = $border_box; $method = "_border_" . $props["style"]; switch ($side) { case "top": $length = $w; $r1 = $tl; $r2 = $tr; break; case "bottom": $length = $w; $y += $h; $r1 = $bl; $r2 = $br; break; case "left": $length = $h; $r1 = $tl; $r2 = $bl; break; case "right": $length = $h; $x += $w; $r1 = $tr; $r2 = $br; break; default: break; } // draw rounded corners $this->$method($x, $y, $length, $props["color"], $widths, $side, $corner_style, $r1, $r2); } } /** * @param Frame $frame * @param float[] $border_box * @param string $corner_style */ protected function _render_outline(Frame $frame, array $border_box, string $corner_style = "bevel"): void { $style = $frame->get_style(); $width = $style->outline_width; $outline_style = $style->outline_style; $color = $style->outline_color; if ($outline_style === "none" || $color === "transparent" || $width <= 0) { return; } $offset = $style->outline_offset; [$x, $y, $w, $h] = $border_box; $d = $width + $offset; $outline_box = [$x - $d, $y - $d, $w + $d * 2, $h + $d * 2]; [$tl, $tr, $br, $bl] = $style->resolve_border_radius($border_box, $outline_box); $x -= $offset; $y -= $offset; $w += $offset * 2; $h += $offset * 2; // For a simple outline, we can draw a rectangle if ($outline_style === "solid" && !$style->has_border_radius()) { $x -= $width / 2; $y -= $width / 2; $w += $width; $h += $width; $this->_canvas->rectangle($x, $y, $w, $h, $color, $width); return; } $x -= $width; $y -= $width; $w += $width * 2; $h += $width * 2; $method = "_border_" . $outline_style; $widths = array_fill(0, 4, $width); $sides = ["top", "right", "left", "bottom"]; foreach ($sides as $side) { switch ($side) { case "top": $length = $w; $side_x = $x; $side_y = $y; $r1 = $tl; $r2 = $tr; break; case "bottom": $length = $w; $side_x = $x; $side_y = $y + $h; $r1 = $bl; $r2 = $br; break; case "left": $length = $h; $side_x = $x; $side_y = $y; $r1 = $tl; $r2 = $bl; break; case "right": $length = $h; $side_x = $x + $w; $side_y = $y; $r1 = $tr; $r2 = $br; break; default: break; } $this->$method($side_x, $side_y, $length, $color, $widths, $side, $corner_style, $r1, $r2); } } /** * Render a background image over a rectangular area * * @param string $url The background image to load * @param float $x The left edge of the rectangular area * @param float $y The top edge of the rectangular area * @param float $width The width of the rectangular area * @param float $height The height of the rectangular area * @param Style $style The associated Style object * * @throws \Exception */ protected function _background_image($url, $x, $y, $width, $height, $style) { if (!function_exists("imagecreatetruecolor")) { throw new \Exception("The PHP GD extension is required, but is not installed."); } $sheet = $style->get_stylesheet(); // Skip degenerate cases if ($width == 0 || $height == 0) { return; } $box_width = $width; $box_height = $height; //debugpng if ($this->_dompdf->getOptions()->getDebugPng()) { print '[_background_image ' . $url . ']'; } list($img, $type, /*$msg*/) = Cache::resolve_url( $url, $sheet->get_protocol(), $sheet->get_host(), $sheet->get_base_path(), $this->_dompdf->getOptions() ); // Bail if the image is no good if (Cache::is_broken($img)) { return; } //Try to optimize away reading and composing of same background multiple times //Postponing read with imagecreatefrom ...() //final composition parameters and name not known yet //Therefore read dimension directly from file, instead of creating gd object first. //$img_w = imagesx($src); $img_h = imagesy($src); list($img_w, $img_h) = Helpers::dompdf_getimagesize($img, $this->_dompdf->getHttpContext()); if ($img_w == 0 || $img_h == 0) { return; } // save for later check if file needs to be resized. $org_img_w = $img_w; $org_img_h = $img_h; $repeat = $style->background_repeat; $dpi = $this->_dompdf->getOptions()->getDpi(); //Increase background resolution and dependent box size according to image resolution to be placed in //Then image can be copied in without resize $bg_width = round((float)($width * $dpi) / 72); $bg_height = round((float)($height * $dpi) / 72); list($img_w, $img_h) = $this->_resize_background_image( $img_w, $img_h, $bg_width, $bg_height, $style->background_size, $dpi ); //Need %bg_x, $bg_y as background pos, where img starts, converted to pixel list($bg_x, $bg_y) = $style->background_position; if (Helpers::is_percent($bg_x)) { // The point $bg_x % from the left edge of the image is placed // $bg_x % from the left edge of the background rectangle $p = ((float)$bg_x) / 100.0; $x1 = $p * $img_w; $x2 = $p * $bg_width; $bg_x = $x2 - $x1; } else { $bg_x = (float)($style->length_in_pt($bg_x) * $dpi) / 72; } $bg_x = round($bg_x + (float)$style->length_in_pt($style->border_left_width) * $dpi / 72); if (Helpers::is_percent($bg_y)) { // The point $bg_y % from the left edge of the image is placed // $bg_y % from the left edge of the background rectangle $p = ((float)$bg_y) / 100.0; $y1 = $p * $img_h; $y2 = $p * $bg_height; $bg_y = $y2 - $y1; } else { $bg_y = (float)($style->length_in_pt($bg_y) * $dpi) / 72; } $bg_y = round($bg_y + (float)$style->length_in_pt($style->border_top_width) * $dpi / 72); //clip background to the image area on partial repeat. Nothing to do if img off area //On repeat, normalize start position to the tile at immediate left/top or 0/0 of area //On no repeat with positive offset: move size/start to have offset==0 //Handle x/y Dimensions separately if ($repeat !== "repeat" && $repeat !== "repeat-x") { //No repeat x if ($bg_x < 0) { $bg_width = $img_w + $bg_x; } else { $x += ($bg_x * 72) / $dpi; $bg_width = $bg_width - $bg_x; if ($bg_width > $img_w) { $bg_width = $img_w; } $bg_x = 0; } if ($bg_width <= 0) { return; } $width = (float)($bg_width * 72) / $dpi; } else { //repeat x if ($bg_x < 0) { $bg_x = -((-$bg_x) % $img_w); } else { $bg_x = $bg_x % $img_w; if ($bg_x > 0) { $bg_x -= $img_w; } } } if ($repeat !== "repeat" && $repeat !== "repeat-y") { //no repeat y if ($bg_y < 0) { $bg_height = $img_h + $bg_y; } else { $y += ($bg_y * 72) / $dpi; $bg_height = $bg_height - $bg_y; if ($bg_height > $img_h) { $bg_height = $img_h; } $bg_y = 0; } if ($bg_height <= 0) { return; } $height = (float)($bg_height * 72) / $dpi; } else { //repeat y if ($bg_y < 0) { $bg_y = -((-$bg_y) % $img_h); } else { $bg_y = $bg_y % $img_h; if ($bg_y > 0) { $bg_y -= $img_h; } } } //Optimization, if repeat has no effect if ($repeat === "repeat" && $bg_y <= 0 && $img_h + $bg_y >= $bg_height) { $repeat = "repeat-x"; } if ($repeat === "repeat" && $bg_x <= 0 && $img_w + $bg_x >= $bg_width) { $repeat = "repeat-y"; } if (($repeat === "repeat-x" && $bg_x <= 0 && $img_w + $bg_x >= $bg_width) || ($repeat === "repeat-y" && $bg_y <= 0 && $img_h + $bg_y >= $bg_height) ) { $repeat = "no-repeat"; } // Avoid rendering identical background-image variants multiple times // This is not dependent of background color of box! .'_'.(is_array($bg_color) ? $bg_color["hex"] : $bg_color) // Note: Here, bg_* are the start values, not end values after going through the tile loops! $key = implode("_", [$bg_width, $bg_height, $img_w, $img_h, $bg_x, $bg_y, $repeat]); // FIXME: This will fail when a file with that exact name exists in the // same directory, included in the document as regular image $cpdfKey = $img . "_" . $key; $tmpFile = Cache::getTempImage($img, $key); $cached = ($this->_canvas instanceof CPDF && $this->_canvas->get_cpdf()->image_iscached($cpdfKey)) || ($tmpFile !== null && file_exists($tmpFile)); if (!$cached) { // img: image url string // img_w, img_h: original image size in px // width, height: box size in pt // bg_width, bg_height: box size in px // x, y: left/top edge of box on page in pt // start_x, start_y: placement of image relative to pattern // $repeat: repeat mode // $bg: GD object of result image // $src: GD object of original image // Create a new image to fit over the background rectangle $bg = imagecreatetruecolor($bg_width, $bg_height); $cpdfFromGd = true; switch (strtolower($type)) { case "png": $cpdfFromGd = false; imagesavealpha($bg, true); imagealphablending($bg, false); $src = @imagecreatefrompng($img); break; case "jpeg": $src = @imagecreatefromjpeg($img); break; case "webp": $src = @imagecreatefromwebp($img); break; case "gif": $src = @imagecreatefromgif($img); break; case "bmp": $src = @Helpers::imagecreatefrombmp($img); break; default: return; // Unsupported image type } if ($src == null) { return; } if ($img_w != $org_img_w || $img_h != $org_img_h) { $newSrc = imagescale($src, $img_w, $img_h); imagedestroy($src); $src = $newSrc; } if ($src == null) { return; } //Background color if box is not relevant here //Non transparent image: box clipped to real size. Background non relevant. //Transparent image: The image controls the transparency and lets shine through whatever background. //However on transparent image preset the composed image with the transparency color, //to keep the transparency when copying over the non transparent parts of the tiles. $ti = imagecolortransparent($src); $palletsize = imagecolorstotal($src); if ($ti >= 0 && $ti < $palletsize) { $tc = imagecolorsforindex($src, $ti); $ti = imagecolorallocate($bg, $tc['red'], $tc['green'], $tc['blue']); imagefill($bg, 0, 0, $ti); imagecolortransparent($bg, $ti); } //This has only an effect for the non repeatable dimension. //compute start of src and dest coordinates of the single copy if ($bg_x < 0) { $dst_x = 0; $src_x = -$bg_x; } else { $src_x = 0; $dst_x = $bg_x; } if ($bg_y < 0) { $dst_y = 0; $src_y = -$bg_y; } else { $src_y = 0; $dst_y = $bg_y; } //For historical reasons exchange meanings of variables: //start_* will be the start values, while bg_* will be the temporary start values in the loops $start_x = $bg_x; $start_y = $bg_y; // Copy regions from the source image to the background if ($repeat === "no-repeat") { // Simply place the image on the background imagecopy($bg, $src, $dst_x, $dst_y, $src_x, $src_y, $img_w, $img_h); } elseif ($repeat === "repeat-x") { for ($bg_x = $start_x; $bg_x < $bg_width; $bg_x += $img_w) { if ($bg_x < 0) { $dst_x = 0; $src_x = -$bg_x; $w = $img_w + $bg_x; } else { $dst_x = $bg_x; $src_x = 0; $w = $img_w; } imagecopy($bg, $src, $dst_x, $dst_y, $src_x, $src_y, $w, $img_h); } } elseif ($repeat === "repeat-y") { for ($bg_y = $start_y; $bg_y < $bg_height; $bg_y += $img_h) { if ($bg_y < 0) { $dst_y = 0; $src_y = -$bg_y; $h = $img_h + $bg_y; } else { $dst_y = $bg_y; $src_y = 0; $h = $img_h; } imagecopy($bg, $src, $dst_x, $dst_y, $src_x, $src_y, $img_w, $h); } } elseif ($repeat === "repeat") { for ($bg_y = $start_y; $bg_y < $bg_height; $bg_y += $img_h) { for ($bg_x = $start_x; $bg_x < $bg_width; $bg_x += $img_w) { if ($bg_x < 0) { $dst_x = 0; $src_x = -$bg_x; $w = $img_w + $bg_x; } else { $dst_x = $bg_x; $src_x = 0; $w = $img_w; } if ($bg_y < 0) { $dst_y = 0; $src_y = -$bg_y; $h = $img_h + $bg_y; } else { $dst_y = $bg_y; $src_y = 0; $h = $img_h; } imagecopy($bg, $src, $dst_x, $dst_y, $src_x, $src_y, $w, $h); } } } else { print 'Unknown repeat!'; } imagedestroy($src); if ($cpdfFromGd && $this->_canvas instanceof CPDF) { // Skip writing temp file as the GD object is added directly } else { $tmpDir = $this->_dompdf->getOptions()->getTempDir(); $tmpName = @tempnam($tmpDir, "bg_dompdf_img_"); @unlink($tmpName); $tmpFile = "$tmpName.png"; imagepng($bg, $tmpFile); imagedestroy($bg); Cache::addTempImage($img, $tmpFile, $key); } } else { $bg = null; $cpdfFromGd = $tmpFile === null; } if ($this->_dompdf->getOptions()->getDebugPng()) { print '[_background_image ' . $tmpFile . ']'; } $this->_canvas->clipping_rectangle($x, $y, $box_width, $box_height); // When using cpdf and optimization to direct png creation from gd object is available, // don't create temp file, but place gd object directly into the pdf if ($cpdfFromGd && $this->_canvas instanceof CPDF) { // Note: CPDF_Adapter image converts y position $this->_canvas->get_cpdf()->addImagePng($bg, $cpdfKey, $x, $this->_canvas->get_height() - $y - $height, $width, $height); if (isset($bg)) { imagedestroy($bg); } } else { $this->_canvas->image($tmpFile, $x, $y, $width, $height); } $this->_canvas->clipping_end(); } // Border rendering functions /** * @param float $x * @param float $y * @param float $length * @param array $color * @param float[] $widths * @param string $side * @param string $corner_style * @param float $r1 * @param float $r2 */ protected function _border_dotted($x, $y, $length, $color, $widths, $side, $corner_style = "bevel", $r1 = 0, $r2 = 0) { $this->_border_line($x, $y, $length, $color, $widths, $side, $corner_style, "dotted", $r1, $r2); } /** * @param float $x * @param float $y * @param float $length * @param array $color * @param float[] $widths * @param string $side * @param string $corner_style * @param float $r1 * @param float $r2 */ protected function _border_dashed($x, $y, $length, $color, $widths, $side, $corner_style = "bevel", $r1 = 0, $r2 = 0) { $this->_border_line($x, $y, $length, $color, $widths, $side, $corner_style, "dashed", $r1, $r2); } /** * @param float $x * @param float $y * @param float $length * @param array $color * @param float[] $widths * @param string $side * @param string $corner_style * @param float $r1 * @param float $r2 */ protected function _border_solid($x, $y, $length, $color, $widths, $side, $corner_style = "bevel", $r1 = 0, $r2 = 0) { $this->_border_line($x, $y, $length, $color, $widths, $side, $corner_style, "solid", $r1, $r2); } /** * @param string $side * @param float $ratio * @param float $top * @param float $right * @param float $bottom * @param float $left * @param float $x * @param float $y * @param float $length * @param float $r1 * @param float $r2 */ protected function _apply_ratio($side, $ratio, $top, $right, $bottom, $left, &$x, &$y, &$length, &$r1, &$r2) { switch ($side) { case "top": $r1 -= $left * $ratio; $r2 -= $right * $ratio; $x += $left * $ratio; $y += $top * $ratio; $length -= $left * $ratio + $right * $ratio; break; case "bottom": $r1 -= $right * $ratio; $r2 -= $left * $ratio; $x += $left * $ratio; $y -= $bottom * $ratio; $length -= $left * $ratio + $right * $ratio; break; case "left": $r1 -= $top * $ratio; $r2 -= $bottom * $ratio; $x += $left * $ratio; $y += $top * $ratio; $length -= $top * $ratio + $bottom * $ratio; break; case "right": $r1 -= $bottom * $ratio; $r2 -= $top * $ratio; $x -= $right * $ratio; $y += $top * $ratio; $length -= $top * $ratio + $bottom * $ratio; break; default: return; } } /** * @param float $x * @param float $y * @param float $length * @param array $color * @param float[] $widths * @param string $side * @param string $corner_style * @param float $r1 * @param float $r2 */ protected function _border_double($x, $y, $length, $color, $widths, $side, $corner_style = "bevel", $r1 = 0, $r2 = 0) { list($top, $right, $bottom, $left) = $widths; $third_widths = [$top / 3, $right / 3, $bottom / 3, $left / 3]; // draw the outer border $this->_border_solid($x, $y, $length, $color, $third_widths, $side, $corner_style, $r1, $r2); $this->_apply_ratio($side, 2 / 3, $top, $right, $bottom, $left, $x, $y, $length, $r1, $r2); $this->_border_solid($x, $y, $length, $color, $third_widths, $side, $corner_style, $r1, $r2); } /** * @param float $x * @param float $y * @param float $length * @param array $color * @param float[] $widths * @param string $side * @param string $corner_style * @param float $r1 * @param float $r2 */ protected function _border_groove($x, $y, $length, $color, $widths, $side, $corner_style = "bevel", $r1 = 0, $r2 = 0) { list($top, $right, $bottom, $left) = $widths; $half_widths = [$top / 2, $right / 2, $bottom / 2, $left / 2]; $this->_border_inset($x, $y, $length, $color, $half_widths, $side, $corner_style, $r1, $r2); $this->_apply_ratio($side, 0.5, $top, $right, $bottom, $left, $x, $y, $length, $r1, $r2); $this->_border_outset($x, $y, $length, $color, $half_widths, $side, $corner_style, $r1, $r2); } /** * @param float $x * @param float $y * @param float $length * @param array $color * @param float[] $widths * @param string $side * @param string $corner_style * @param float $r1 * @param float $r2 */ protected function _border_ridge($x, $y, $length, $color, $widths, $side, $corner_style = "bevel", $r1 = 0, $r2 = 0) { list($top, $right, $bottom, $left) = $widths; $half_widths = [$top / 2, $right / 2, $bottom / 2, $left / 2]; $this->_border_outset($x, $y, $length, $color, $half_widths, $side, $corner_style, $r1, $r2); $this->_apply_ratio($side, 0.5, $top, $right, $bottom, $left, $x, $y, $length, $r1, $r2); $this->_border_inset($x, $y, $length, $color, $half_widths, $side, $corner_style, $r1, $r2); } /** * @param $c * @return mixed */ protected function _tint($c) { if (!is_numeric($c)) { return $c; } return min(1, $c + 0.16); } /** * @param $c * @return mixed */ protected function _shade($c) { if (!is_numeric($c)) { return $c; } return max(0, $c - 0.33); } /** * @param float $x * @param float $y * @param float $length * @param array $color * @param float[] $widths * @param string $side * @param string $corner_style * @param float $r1 * @param float $r2 */ protected function _border_inset($x, $y, $length, $color, $widths, $side, $corner_style = "bevel", $r1 = 0, $r2 = 0) { switch ($side) { case "top": case "left": $shade = array_map([$this, "_shade"], $color); $this->_border_solid($x, $y, $length, $shade, $widths, $side, $corner_style, $r1, $r2); break; case "bottom": case "right": $tint = array_map([$this, "_tint"], $color); $this->_border_solid($x, $y, $length, $tint, $widths, $side, $corner_style, $r1, $r2); break; default: return; } } /** * @param float $x * @param float $y * @param float $length * @param array $color * @param float[] $widths * @param string $side * @param string $corner_style * @param float $r1 * @param float $r2 */ protected function _border_outset($x, $y, $length, $color, $widths, $side, $corner_style = "bevel", $r1 = 0, $r2 = 0) { switch ($side) { case "top": case "left": $tint = array_map([$this, "_tint"], $color); $this->_border_solid($x, $y, $length, $tint, $widths, $side, $corner_style, $r1, $r2); break; case "bottom": case "right": $shade = array_map([$this, "_shade"], $color); $this->_border_solid($x, $y, $length, $shade, $widths, $side, $corner_style, $r1, $r2); break; default: return; } } /** * Get the dash pattern and cap style for the given border style, width, and * line length. * * The base pattern is adjusted so that it fits the given line length * symmetrically. * * @param string $style * @param float $width * @param float $length * * @return array */ protected function dashPattern(string $style, float $width, float $length): array { if ($style === "dashed") { $w = 3 * $width; if ($length < $w) { $s = $w; } else { // Scale dashes and gaps $r = round($length / $w); $r = $r % 2 === 0 ? $r + 1 : $r; $s = $length / $r; } return [[$s], "butt"]; } if ($style === "dotted") { // Draw circles along the line // Round caps extend outwards by half line width, so a zero dash // width results in a circle $gap = $width <= 1 ? 2 : 1; $w = ($gap + 1) * $width; if ($length < $w) { $s = $w; } else { // Only scale gaps $l = $length - $width; $r = max(round($l / $w), 1); $s = $l / $r; } return [[0, $s], "round"]; } return [[], "butt"]; } /** * Draws a solid, dotted, or dashed line, observing the border radius * * @param float $x * @param float $y * @param float $length * @param array $color * @param float[] $widths * @param string $side * @param string $corner_style * @param string $pattern_name * @param float $r1 * @param float $r2 */ protected function _border_line($x, $y, $length, $color, $widths, $side, $corner_style = "bevel", $pattern_name = "none", $r1 = 0, $r2 = 0) { /** used by $$side */ [$top, $right, $bottom, $left] = $widths; $width = $$side; // No need to clip corners if border radius is large enough $cornerClip = $corner_style === "bevel" && ($r1 < $width || $r2 < $width); $lineLength = $length - $r1 - $r2; [$pattern, $cap] = $this->dashPattern($pattern_name, $width, $lineLength); // Determine arc border radius for corner arcs $halfWidth = $width / 2; $ar1 = max($r1 - $halfWidth, 0); $ar2 = max($r2 - $halfWidth, 0); // Small angle adjustments to prevent the background from shining through $adj1 = $ar1 / 80; $adj2 = $ar2 / 80; // Adjust line width and corner angles to account for the fact that // round caps extend outwards. The line is actually only shifted below, // not shortened, as otherwise the end dash (circle) will vanish // occasionally $dl = $cap === "round" ? $halfWidth : 0; if ($cap === "round" && $ar1 > 0) { $adj1 -= rad2deg(asin($halfWidth / $ar1)); } if ($cap === "round" && $ar2 > 0) { $adj2 -= rad2deg(asin($halfWidth / $ar2)); } switch ($side) { case "top": if ($cornerClip) { $points = [ $x, $y, $x, $y - 1, // Extend outwards to avoid gaps $x + $length, $y - 1, // Extend outwards to avoid gaps $x + $length, $y, $x + $length - max($right, $r2), $y + max($width, $r2), $x + max($left, $r1), $y + max($width, $r1) ]; $this->_canvas->clipping_polygon($points); } $y += $halfWidth; if ($ar1 > 0 && $adj1 > -22.5) { $this->_canvas->arc($x + $r1, $y + $ar1, $ar1, $ar1, 90 - $adj1, 135 + $adj1, $color, $width, $pattern, $cap); } if ($lineLength > 0) { $this->_canvas->line($x + $dl + $r1, $y, $x + $dl + $length - $r2, $y, $color, $width, $pattern, $cap); } if ($ar2 > 0 && $adj2 > -22.5) { $this->_canvas->arc($x + $length - $r2, $y + $ar2, $ar2, $ar2, 45 - $adj2, 90 + $adj2, $color, $width, $pattern, $cap); } break; case "bottom": if ($cornerClip) { $points = [ $x, $y, $x, $y + 1, // Extend outwards to avoid gaps $x + $length, $y + 1, // Extend outwards to avoid gaps $x + $length, $y, $x + $length - max($right, $r2), $y - max($width, $r2), $x + max($left, $r1), $y - max($width, $r1) ]; $this->_canvas->clipping_polygon($points); } $y -= $halfWidth; if ($ar1 > 0 && $adj1 > -22.5) { $this->_canvas->arc($x + $r1, $y - $ar1, $ar1, $ar1, 225 - $adj1, 270 + $adj1, $color, $width, $pattern, $cap); } if ($lineLength > 0) { $this->_canvas->line($x + $dl + $r1, $y, $x + $dl + $length - $r2, $y, $color, $width, $pattern, $cap); } if ($ar2 > 0 && $adj2 > -22.5) { $this->_canvas->arc($x + $length - $r2, $y - $ar2, $ar2, $ar2, 270 - $adj2, 315 + $adj2, $color, $width, $pattern, $cap); } break; case "left": if ($cornerClip) { $points = [ $x, $y, $x - 1, $y, // Extend outwards to avoid gaps $x - 1, $y + $length, // Extend outwards to avoid gaps $x, $y + $length, $x + max($width, $r2), $y + $length - max($bottom, $r2), $x + max($width, $r1), $y + max($top, $r1) ]; $this->_canvas->clipping_polygon($points); } $x += $halfWidth; if ($ar1 > 0 && $adj1 > -22.5) { $this->_canvas->arc($x + $ar1, $y + $r1, $ar1, $ar1, 135 - $adj1, 180 + $adj1, $color, $width, $pattern, $cap); } if ($lineLength > 0) { $this->_canvas->line($x, $y + $dl + $r1, $x, $y + $dl + $length - $r2, $color, $width, $pattern, $cap); } if ($ar2 > 0 && $adj2 > -22.5) { $this->_canvas->arc($x + $ar2, $y + $length - $r2, $ar2, $ar2, 180 - $adj2, 225 + $adj2, $color, $width, $pattern, $cap); } break; case "right": if ($cornerClip) { $points = [ $x, $y, $x + 1, $y, // Extend outwards to avoid gaps $x + 1, $y + $length, // Extend outwards to avoid gaps $x, $y + $length, $x - max($width, $r2), $y + $length - max($bottom, $r2), $x - max($width, $r1), $y + max($top, $r1) ]; $this->_canvas->clipping_polygon($points); } $x -= $halfWidth; if ($ar1 > 0 && $adj1 > -22.5) { $this->_canvas->arc($x - $ar1, $y + $r1, $ar1, $ar1, 0 - $adj1, 45 + $adj1, $color, $width, $pattern, $cap); } if ($lineLength > 0) { $this->_canvas->line($x, $y + $dl + $r1, $x, $y + $dl + $length - $r2, $color, $width, $pattern, $cap); } if ($ar2 > 0 && $adj2 > -22.5) { $this->_canvas->arc($x - $ar2, $y + $length - $r2, $ar2, $ar2, 315 - $adj2, 360 + $adj2, $color, $width, $pattern, $cap); } break; } if ($cornerClip) { $this->_canvas->clipping_end(); } } /** * @param float $opacity */ protected function _set_opacity(float $opacity): void { if ($opacity >= 0.0 && $opacity <= 1.0) { $this->_canvas->set_opacity($opacity); } } /** * @param float[] $box * @param string $color * @param array $style */ protected function _debug_layout($box, $color = "red", $style = []) { $this->_canvas->rectangle($box[0], $box[1], $box[2], $box[3], Color::parse($color), 0.1, $style); } /** * @param float $img_width * @param float $img_height * @param float $container_width * @param float $container_height * @param array|string $bg_resize * @param int $dpi * * @return array */ protected function _resize_background_image( $img_width, $img_height, $container_width, $container_height, $bg_resize, $dpi ) { // We got two some specific numbers and/or auto definitions if (is_array($bg_resize)) { $is_auto_width = $bg_resize[0] === 'auto'; if ($is_auto_width) { $new_img_width = $img_width; } else { $new_img_width = $bg_resize[0]; if (Helpers::is_percent($new_img_width)) { $new_img_width = round(($container_width / 100) * (float)$new_img_width); } else { $new_img_width = round($new_img_width * $dpi / 72); } } $is_auto_height = $bg_resize[1] === 'auto'; if ($is_auto_height) { $new_img_height = $img_height; } else { $new_img_height = $bg_resize[1]; if (Helpers::is_percent($new_img_height)) { $new_img_height = round(($container_height / 100) * (float)$new_img_height); } else { $new_img_height = round($new_img_height * $dpi / 72); } } // if one of both was set to auto the other one needs to scale proportionally if ($is_auto_width !== $is_auto_height) { if ($is_auto_height) { $new_img_height = round($new_img_width * ($img_height / $img_width)); } else { $new_img_width = round($new_img_height * ($img_width / $img_height)); } } } else { $container_ratio = $container_height / $container_width; if ($bg_resize === 'cover' || $bg_resize === 'contain') { $img_ratio = $img_height / $img_width; if ( ($bg_resize === 'cover' && $container_ratio > $img_ratio) || ($bg_resize === 'contain' && $container_ratio < $img_ratio) ) { $new_img_height = $container_height; $new_img_width = round($container_height / $img_ratio); } else { $new_img_width = $container_width; $new_img_height = round($container_width * $img_ratio); } } else { $new_img_width = $img_width; $new_img_height = $img_height; } } return [$new_img_width, $new_img_height]; } } PKget_first_child()) { return; // No children, no service } $style = $frame->get_style(); $dompdf = $this->_dompdf; $this->_set_opacity($frame->get_opacity($style->opacity)); $do_debug_layout_line = $dompdf->getOptions()->getDebugLayout() && $dompdf->getOptions()->getDebugLayoutInline(); // Draw the background & border behind each child. To do this we need // to figure out just how much space each child takes: [$x, $y] = $frame->get_first_child()->get_position(); [$w, $h] = $this->get_child_size($frame, $do_debug_layout_line); [, , $cbw] = $frame->get_containing_block(); $margin_left = $style->length_in_pt($style->margin_left, $cbw); $pt = $style->length_in_pt($style->padding_top, $cbw); $pb = $style->length_in_pt($style->padding_bottom, $cbw); // Make sure that border and background start inside the left margin // Extend the drawn box by border and padding in vertical direction, as // these do not affect layout // FIXME: Using a small vertical offset of a fraction of the height here // to work around the vertical position being slightly off in general $x += $margin_left; $y -= $style->border_top_width + $pt - ($h * 0.1); $w += $style->border_left_width + $style->border_right_width; $h += $style->border_top_width + $pt + $style->border_bottom_width + $pb; $border_box = [$x, $y, $w, $h]; $this->_render_background($frame, $border_box); $this->_render_border($frame, $border_box); $this->_render_outline($frame, $border_box); $node = $frame->get_node(); $id = $node->getAttribute("id"); if (strlen($id) > 0) { $this->_canvas->add_named_dest($id); } // Only two levels of links frames $is_link_node = $node->nodeName === "a"; if ($is_link_node) { if (($name = $node->getAttribute("name"))) { $this->_canvas->add_named_dest($name); } } if ($frame->get_parent() && $frame->get_parent()->get_node()->nodeName === "a") { $link_node = $frame->get_parent()->get_node(); } // Handle anchors & links if ($is_link_node) { if ($href = $node->getAttribute("href")) { $href = Helpers::build_url($dompdf->getProtocol(), $dompdf->getBaseHost(), $dompdf->getBasePath(), $href) ?? $href; $this->_canvas->add_link($href, $x, $y, $w, $h); } } } protected function get_child_size(Frame $frame, bool $do_debug_layout_line): array { $w = 0.0; $h = 0.0; foreach ($frame->get_children() as $child) { if ($child->get_node()->nodeValue === " " && $child->get_prev_sibling() && !$child->get_next_sibling()) { break; } $style = $child->get_style(); $auto_width = $style->width === "auto"; $auto_height = $style->height === "auto"; [, , $child_w, $child_h] = $child->get_padding_box(); if ($auto_width || $auto_height) { [$child_w2, $child_h2] = $this->get_child_size($child, $do_debug_layout_line); if ($auto_width) { $child_w = $child_w2; } if ($auto_height) { $child_h = $child_h2; } } $w += $child_w; $h = max($h, $child_h); if ($do_debug_layout_line) { $this->_debug_layout($child->get_border_box(), "blue"); if ($this->_dompdf->getOptions()->getDebugLayoutPaddingBox()) { $this->_debug_layout($child->get_padding_box(), "blue", [0.5, 0.5]); } } } return [$w, $h]; } } PK_canvas, "get_cpdf" ) //- For cpdf these can and must stay 0, because font metrics are used directly. //- For other renderers, if different values are wanted, separate the parameter sets. // But $size and $size-$height seem to be accurate enough /** Relative to bottom of text, as fraction of height */ const UNDERLINE_OFFSET = 0.0; /** Relative to top of text */ const OVERLINE_OFFSET = 0.0; /** Relative to centre of text. */ const LINETHROUGH_OFFSET = 0.0; /** How far to extend lines past either end, in pt */ const DECO_EXTENSION = 0.0; /** * @param \Dompdf\FrameDecorator\Text $frame */ function render(Frame $frame) { $style = $frame->get_style(); $text = $frame->get_text(); if ($text === "") { return; } $this->_set_opacity($frame->get_opacity($style->opacity)); list($x, $y) = $frame->get_position(); $cb = $frame->get_containing_block(); $ml = $style->margin_left; $pl = $style->padding_left; $bl = $style->border_left_width; $x += (float) $style->length_in_pt([$ml, $pl, $bl], $cb["w"]); $font = $style->font_family; $size = $style->font_size; $frame_font_size = $frame->get_dompdf()->getFontMetrics()->getFontHeight($font, $size); $word_spacing = $frame->get_text_spacing() + $style->word_spacing; $letter_spacing = $style->letter_spacing; $width = (float) $style->width; /*$text = str_replace( array("{PAGE_NUM}"), array($this->_canvas->get_page_number()), $text );*/ $this->_canvas->text($x, $y, $text, $font, $size, $style->color, $word_spacing, $letter_spacing); $line = $frame->get_containing_line(); // FIXME Instead of using the tallest frame to position, // the decoration, the text should be well placed if (false && $line->tallest_frame) { $base_frame = $line->tallest_frame; $style = $base_frame->get_style(); $size = $style->font_size; } $line_thickness = $size * self::DECO_THICKNESS; $underline_offset = $size * self::UNDERLINE_OFFSET; $overline_offset = $size * self::OVERLINE_OFFSET; $linethrough_offset = $size * self::LINETHROUGH_OFFSET; $underline_position = -0.08; if ($this->_canvas instanceof CPDF) { $cpdf_font = $this->_canvas->get_cpdf()->fonts[$style->font_family]; if (isset($cpdf_font["UnderlinePosition"])) { $underline_position = $cpdf_font["UnderlinePosition"] / 1000; } if (isset($cpdf_font["UnderlineThickness"])) { $line_thickness = $size * ($cpdf_font["UnderlineThickness"] / 1000); } } $descent = $size * $underline_position; $base = $frame_font_size; // Handle text decoration: // http://www.w3.org/TR/CSS21/text.html#propdef-text-decoration // Draw all applicable text-decorations. Start with the root and work our way down. $p = $frame; $stack = []; while ($p = $p->get_parent()) { $stack[] = $p; } while (isset($stack[0])) { $f = array_pop($stack); if (($text_deco = $f->get_style()->text_decoration) === "none") { continue; } $deco_y = $y; //$line->y; $color = $f->get_style()->color; switch ($text_deco) { default: continue 2; case "underline": $deco_y += $base - $descent + $underline_offset + $line_thickness / 2; break; case "overline": $deco_y += $overline_offset + $line_thickness / 2; break; case "line-through": $deco_y += $base * 0.7 + $linethrough_offset; break; } $dx = 0; $x1 = $x - self::DECO_EXTENSION; $x2 = $x + $width + $dx + self::DECO_EXTENSION; $this->_canvas->line($x1, $deco_y, $x2, $deco_y, $color, $line_thickness); } if ($this->_dompdf->getOptions()->getDebugLayout() && $this->_dompdf->getOptions()->getDebugLayoutLines()) { $text_width = $this->_dompdf->getFontMetrics()->getTextWidth($text, $font, $size, $word_spacing, $letter_spacing); $this->_debug_layout([$x, $y, $text_width, $frame_font_size], "orange", [0.5, 0.5]); } } } PKget_style(); $border_box = $frame->get_border_box(); $this->_set_opacity($frame->get_opacity($style->opacity)); // Render background & borders $this->_render_background($frame, $border_box); $this->_render_border($frame, $border_box); $this->_render_outline($frame, $border_box); $content_box = $frame->get_content_box(); [$x, $y, $w, $h] = $content_box; $src = $frame->get_image_url(); $alt = null; if (Cache::is_broken($src) && $alt = $frame->get_node()->getAttribute("alt") ) { $font = $style->font_family; $size = $style->font_size; $word_spacing = $style->word_spacing; $letter_spacing = $style->letter_spacing; $this->_canvas->text( $x, $y, $alt, $font, $size, $style->color, $word_spacing, $letter_spacing ); } elseif ($w > 0 && $h > 0) { if ($style->has_border_radius()) { [$tl, $tr, $br, $bl] = $style->resolve_border_radius($border_box, $content_box); $this->_canvas->clipping_roundrectangle($x, $y, $w, $h, $tl, $tr, $br, $bl); } $this->_canvas->image($src, $x, $y, $w, $h, $style->image_resolution); if ($style->has_border_radius()) { $this->_canvas->clipping_end(); } } if ($msg = $frame->get_image_msg()) { $parts = preg_split("/\s*\n\s*/", $msg); $font = $style->font_family; $height = 10; $_y = $alt ? $y + $h - count($parts) * $height : $y; foreach ($parts as $i => $_part) { $this->_canvas->text($x, $_y + $i * $height, $_part, $font, $height * 0.8, [0.5, 0.5, 0.5]); } } $id = $frame->get_node()->getAttribute("id"); if (strlen($id) > 0) { $this->_canvas->add_named_dest($id); } $this->debugBlockLayout($frame, "blue"); } } PK 0x00000000, // user agent declarations self::ORIG_USER => 0x10000000, // user normal declarations self::ORIG_AUTHOR => 0x30000000, // author normal declarations ]; /** * Non-CSS presentational hints (i.e. HTML 4 attributes) are handled as if added * to the beginning of an author stylesheet, i.e. anything in author stylesheets * should override them. */ const SPEC_NON_CSS = 0x20000000; /** * Current dompdf instance * * @var Dompdf */ private $_dompdf; /** * Array of currently defined styles * * @var Style[][] */ private $_styles; /** * Base protocol of the document being parsed * Used to handle relative urls. * * @var string */ private $_protocol = ""; /** * Base hostname of the document being parsed * Used to handle relative urls. * * @var string */ private $_base_host = ""; /** * Base path of the document being parsed * Used to handle relative urls. * * @var string */ private $_base_path = ""; /** * The styles defined by @page rules * * @var array